; $Header: /home/campbell/Languages/Scheme/scm/x-scm/RCS/x11.scm,v 1.1 1992/07/03 03:06:52 campbell Beta $
;
; X11R4 definitions.  These are taken from X11.h and Xlib.h.
; This file is far from complete.
;
;  Author: Larry Campbell (campbell@redsox.bsw.com)
; 
;  Copyright 1992 by The Boston Software Works, Inc.
;  Permission to use for any purpose whatsoever granted, as long
;  as this copyright notice remains intact.  Please send bug fixes
;  or enhancements to the above email address.
; 

; Event mask bits 

(define x:no-event-mask			0)
(define x:key-press-mask		(expt 2 0)  )
(define x:key-release-mask		(expt 2 1)  )
(define x:button-press-mask		(expt 2 2)  )
(define x:button-release-mask		(expt 2 3)  )
(define x:enter-window-mask		(expt 2 4)  )
(define x:leave-window-mask		(expt 2 5)  )
(define x:pointer-motion-mask		(expt 2 6)  )
(define x:pointer-motion-hint-mask	(expt 2 7)  )
(define x:button1-motion-mask		(expt 2 8)  )
(define x:button2-motion-mask		(expt 2 9)  )
(define x:button3-motion-mask		(expt 2 10) )
(define x:button4-motion-mask		(expt 2 11) )
(define x:button5-motion-mask		(expt 2 12) )
(define x:button-motion-mask		(expt 2 13) )
(define x:keymap-state-mask		(expt 2 14) )
(define x:exposure-mask			(expt 2 15) )
(define x:visibility-change-mask	(expt 2 16) )
(define x:structure-notify-mask		(expt 2 17) )
(define x:resize-redirect-mask		(expt 2 18) )
(define x:substructure-notify-mask	(expt 2 19) )
(define x:substructure-redirect-mask	(expt 2 20) )
(define x:focus-change-mask		(expt 2 21) )
(define x:property-change-mask		(expt 2 22) )
(define x:colormap-change-mask		(expt 2 23) )
(define x:owner-grab-button-mask	(expt 2 24) )

; Event types

(define x:key-press		2)
(define x:key-release		3)
(define x:button-press		4)
(define x:button-release	5)
(define x:motion-notify		6)
(define x:enter-notify		7)
(define x:leave-notify		8)
(define x:focus-in		9)
(define x:focus-out		10)
(define x:keymap-notify		11)
(define x:expose		12)
(define x:graphics-expose	13)
(define x:no-expose		14)
(define x:visibility-notify	15)
(define x:create-notify		16)
(define x:destroy-notify	17)
(define x:unmap-notify		18)
(define x:map-notify		19)
(define x:map-request		20)
(define x:reparent-notify	21)
(define x:configure-notify	22)
(define x:configure-request	23)
(define x:gravity-notify	24)
(define x:resize-request	25)
(define x:circulate-notify	26)
(define x:circulate-request	27)
(define x:property-notify	28)
(define x:selection-clear	29)
(define x:selection-request	30)
(define x:selection-notify	31)
(define x:colormap-notify	32)
(define x:client-message	33)
(define x:mapping-notify	34)
(define x:last-event		35)	; must be bigger than any event #


; Bit masks for XCreateGC and friends...

(define x:gc-function		(expt 2 0))
(define x:gc-plane-mask		(expt 2 1))
(define x:gc-foreground		(expt 2 2))
(define x:gc-background		(expt 2 3))
(define x:gc-line-width		(expt 2 4))
(define x:gc-line-style		(expt 2 5))
(define x:gc-cap-style		(expt 2 6))
(define x:gc-join-style		(expt 2 7))
(define x:gc-fill-style		(expt 2 8))
(define x:gc-fill-rule		(expt 2 9)) 
(define x:gc-tile		(expt 2 10))
(define x:gc-stipple		(expt 2 11))
(define x:gc-tile-stip-x-origin	(expt 2 12))
(define x:gc-tile-stip-y-origin	(expt 2 13))
(define x:gc-font 		(expt 2 14))
(define x:gc-subwindow-mode	(expt 2 15))
(define x:gc-graphics-exposures	(expt 2 16))
(define x:gc-clip-x-origin	(expt 2 17))
(define x:gc-clip-y-origin	(expt 2 18))
(define x:gc-clip-mask		(expt 2 19))
(define x:gc-dash-offset	(expt 2 20))
(define x:gc-dash-list		(expt 2 21))
(define x:gc-arc-mode		(expt 2 22))

(define x:coord-mode-origin 0)		; relative to the origin
(define x:coord-mode-previous 1)	; relative to previous point
