File: Xdecl.l

package info (click to toggle)
euslisp 9.31%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 55,448 kB
  • sloc: ansic: 41,610; lisp: 3,339; makefile: 286; sh: 238; asm: 138; python: 53
file content (337 lines) | stat: -rw-r--r-- 8,528 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
;; Xdecl.l
;; Class and constant declarations for Xwindow interface
;; formerly, Xclasses.l and Xconst.l
;; Copyright 1993, Toshihiro Matsui, Electrotechnical Laboratory
;;
;; May 1994, Solaris2
;;

(eval-when (compile eval)
   (unless (find-package "X")
	(make-package "X") ) )

(in-package "X")

(export '(xobject xcolor colormap gcontext xdrawable xpixmap xwindow))

(export '(panel-item 
	  button-item menu-button-item slider-item joystick-item
	  text-item choice-item))

(export '(Xscroll-bar Xhorizontal-scroll-bar))

(export '(canvas graph-canvas
	  characterWindow textwindow textwindowstream
	  bufferTextWindow ScrollTextWindow))

(export '(panel menu-panel))

(export  '(FileDialog FilePanel TextViewPanel ConfirmPanel eustop-win))

;;;;;; Hara extention
(export '(menubar-panel bitmap-button-item)) 

(export '(
	*display* *xwindows* *xwindows-hash-tab*
	*visual* *visuals*
	*visual-pseudo-8* *visual-true-8* *visual-direct-8*
	*visual-true-15* *visual-direct-15*
	*visual-true-16* *visual-direct-16*
	*visual-true-24* *visual-direct-24*
	*root* *screen* *screen-no* *depth*
       *blackpixel* *whitepixel* *fg-pixel* *bg-pixel*
       *whitegc* *blackgc* *defaultGC*
       *gray25-pixmap* *gray50-pixmap* *gray75-pixmap* 
       *gray25-bitmap* *gray50-bitmap* *gray75-bitmap*
       *gray25-gc* *gray50-gc* *gray75-gc* 
	*eustop-win* *shell-window*
       ;; funcs
         init-xwindow  make-pixmaps make-cleared-pixmap
       make-default-cmap
       make-color-gc
       make-xwindow find-xwindow
       ))

(export '(
	font-cour8	font-cour10	font-cour12 
	font-cour14 	font-cour18
 	font-courb12 	font-courb14 	font-courb18	font-courb24
	font-timesb12	font-timesb14	font-timesb18	font-timesb24
	font-times10    font-times12
	font-lucidasans-bold-12 font-lucidasans-bold-14
	font-helvetica-bold-12 font-helvetica-12 font-a14))

(defvar  *display*)
(defvar  *visual*)
(defvar *visual-pseudo-8*)
(defvar *visual-true-8*)
(defvar *visual-direct-8*)
(defvar *visual-true-15*)
(defvar *visual-direct-15*)
(defvar *visual-true-16*)
(defvar *visual-direct-16*)
(defvar *visual-true-24*)
(defvar *visual-direct-24*)

(defvar  *root*)
(defvar  *screen*)
(defvar  *screen-no*)
(defvar  *blackpixel*)
(defvar  *whitepixel*)
(defvar  *whitegc*)
(defvar  *blackgc*)
(defvar  *defaultGC*)
(defvar  *fg-pixel*)
(defvar  *bg-pixel*)
(defvar  *gray25-pixmap*)
(defvar  *gray50-pixmap*)
(defvar  *gray75-pixmap*)
(defvar  *gray25-gc*)
(defvar  *gray50-gc*)
(defvar  *gray75-gc*)
(defvar  *color-map*)

(defparameter *xwindows* nil)
(defparameter *xwindows-hash-tab* (make-hash-table :size 20))
(defparameter *visuals* nil)

(defvar	font-cour8)
(defvar	font-cour10)
(defvar	font-cour12)
(defvar font-cour14)
(defvar	font-cour18)
(defvar	font-courb12)
(defvar	font-courb14)
(defvar	font-courb18)
(defvar	font-courb24)
(defvar font-lucidasans-bold-12)
(defvar font-lucidasans-bold-14)
(defvar font-helvetica-bold-12)
(defvar font-helvetica-12)
(defvar font-a14)
(defvar font-times10)
(defvar font-times12)
(defvar font-timesb12)
(defvar font-timesb14)
(defvar font-timesb18)
(defvar font-timesb24)

(defvar *save-under*)
(defvar *depth*)
(defvar *default-ximage*)
(defvar *gray-gc*)
(defvar *gray-pixmap*)
(defvar *whitegc* nil)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; propertied-object
;;   +-- colormap
;;   +-- geo:viewsurface
;;	   +-- Xobject
;;		+-- gcontext
;;		+-- Xdrawable
;;			+--- Xpixmap
;;			+--- Xwindow
;;				+--- panel
;;				|	+--- menubar-panel
;;				|       +--- menu-panel
;;				+--- canvas
;;				+--- panel-item
;;				|	+--- text-item
;;				|	+--- slider-item	
;;				|	+--- choice-item
;;				|	+--- joystick-item
;;				|	+--- button-item
;;				|		+-- menu-button-item
;;				|		+-- bitmap-button-item
;;				+--- Xscroll-bar
;;				|         +--- Xhorizontal-scroll-bar
;;				+--- CharacterWindow
;;					+--TextWindow
;;					      +-- BufferTextWindow
;;						      +-- ScrollTextWindow
;;


(defclass Xobject :super geometry:viewsurface
		  :slots (display))

(defclass colormap :super propertied-object
	  :slots (cmapid planes pixels LUT-list))

(defclass gcontext :super Xobject :slots (gcid GCValues))

(defclass Xdrawable :super Xobject
	    :slots (drawable	; X's drawable resource ID
		    (gcon :forward t)
		    bg-color
		    width height))

(defclass Xpixmap :super Xdrawable)

(defclass Xwindow :super Xdrawable
		:slots
		    (parent subwindows visual 
		     backing-pixmap event-forward))

;; Xpanel.l

(defclass panel :super xwindow
	 :slots (pos items fontid
		 rows columns	;total number of rows and columns
		 next-x next-y
		 item-width item-height
		 dark-edge-color light-edge-color
		 topleft-edge-polygon
		 active-menu
))

;; Xcanvas.l

(defclass canvas :super xwindow
		 :slots (topleft bottomright buttonActive
			 menu))

;; panel items

(defclass panel-item :super xwindow
	:slots (pos
		notify-object notify-method
		fontid label labeldots
		buttonPressed))

(defclass button-item :super panel-item
	:slots (submenu
		activeColor 3D-State
		dark-edge-color light-edge-color
		topleft-edge-polygon
		))

(defclass text-item :super panel-item
	:slots (textwin) )
  )

(defclass slider-item :super panel-item
	:slots (min-value max-value value
		minlabel maxlabel valueformat
		bar-x bar-y bar-width bar-height valuedots label-base
		nob-x nob-moving 
	        charwidth
		continuous-notify) )

(defclass menu-button-item :super button-item
	:slots (items item-dots item-labels
		charwidth charheight
		menu-window
		window-pos
		high-light))

(defclass choice-item :super panel-item 
	:slots (choice-list active-choice transient-choice
		choice-pos button-size))

(defclass joystick-item :super panel-item
	:slots (stick-size min-x min-y max-x max-y
		center-x center-y stick-x stick-y
		value-x value-y
		stick-return stick-grabbed
		fraction-x fraction-y follow-move))


;; Xmenu.l

(defclass menu-panel :super panel
        :slots (height-offset menu-buttons)
)


;; Xscroll.l

(defclass Xscroll-bar :super xwindow
	:slots (arrow-length handle-pos handle-length
		verticalp
		handle-grabbed))

(defclass Xhorizontal-scroll-bar :super xscroll-bar)


;; Xtext.l

(defclass CharacterWindow :super xwindow
	  :slots (fontid
		  charwidth charheight charascent
		  win-row-max win-col-max
		  x y))

(defclass textWindow :super CharacterWindow
	  :slots (win-row win-col	;physical current position in window
		  charbuf	; for charcode conversion
		  keybuf keycount	;for key input
		  echo
		  show-cursor cursor-on ;boolean
		  ;;;	kill delete	;control character
		  notify-object notify-method
		  buttonActive
		  ))

(defclass BufferTextWindow :super textWindow
	  :slots (linebuf expbuf max-line-length selected-pos))


(defclass ScrollTextWindow :super BufferTextWindow
	  :slots (row col		;logical current position in the buffer
		  top-row top-col 	;display-starting position
		  scroll-bar-window
		  horizontal-scroll-bar-window
		  selected-line
		  ))

(defclass textWindowStream :super stream
		:slots (textwin))


;;;;;;;;;;;;;;;; Hara 

(defclass menubar-panel :super panel
        :slots ()
)

(defclass bitmap-button-item :super button-item
        :slots (pixmap-id bitmap-width bitmap-height)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconstant	NoEventMask		0)
(defconstant	KeyPressMask		#,(ash 1 0))  
(defconstant	KeyReleaseMask		#,(ash 1 1))  
(defconstant	ButtonPressMask		#,(ash 1 2))
(defconstant	ButtonReleaseMask	#,(ash 1 3))
(defconstant	EnterWindowMask		#,(ash 1 4))
(defconstant	LeaveWindowMask		#,(ash 1 5))
(defconstant	PointerMotionMask	#,(ash 1 6))
(defconstant	PointerMotionHintMask	#,(ash 1 7))
(defconstant	Button1MotionMask	#,(ash 1 8))
(defconstant	Button2MotionMask	#,(ash 1 9))
(defconstant	Button3MotionMask	#,(ash 1 10) )
(defconstant	Button4MotionMask	#,(ash 1 11) )
(defconstant	Button5MotionMask	#,(ash 1 12) )
(defconstant	ButtonMotionMask	#,(ash 1 13) )
(defconstant	KeymapStateMask		#,(ash 1 14))
(defconstant	ExposureMask		#,(ash 1 15) )
(defconstant	VisibilityChangeMask	#,(ash 1 16) )
(defconstant	StructureNotifyMask	#,(ash 1 17) )
(defconstant	ResizeRedirectMask	#,(ash 1 18) )
(defconstant	SubstructureNotifyMask	#,(ash 1 19) )
(defconstant	SubstructureRedirectMask #,(ash 1 20) )
(defconstant	FocusChangeMask		#,(ash 1 21) )
(defconstant	PropertyChangeMask	#,(ash 1 22) )
(defconstant	ColormapChangeMask	#,(ash 1 23) )
(defconstant	OwnerGrabButtonMask	#,(ash 1 24) )

(defcarray c-long :long)
(defcarray c-int :integer)
;;;;;;;

(provide :xdecl "@(#)$Id: Xdecl.l,v 1.1.1.1 2003/11/20 07:46:34 eus Exp $")