File: gdk.defs

package info (click to toggle)
rep-gtk 0.15-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 728 kB
  • ctags: 349
  • sloc: ansic: 3,577; sh: 2,430; lisp: 1,102; makefile: 159
file content (610 lines) | stat: -rw-r--r-- 12,400 bytes parent folder | download
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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
;; -*- scheme -*-

;;; Gdk enums

(define-enum GdkWindowType
  (root GDK_WINDOW_ROOT)
  (toplevel GDK_WINDOW_TOPLEVEL)
  (child GDK_WINDOW_CHILD)
  (dialog GDK_WINDOW_DIALOG)
  (temp GDK_WINDOW_TEMP)
  (pixmap GDK_WINDOW_PIXMAP))

(define-enum GdkWindowClass
  (input-output GDK_INPUT_OUTPUT)
  (input-only GDK_INPUT_ONLY))

(define-enum GdkImageType
  (normal GDK_IMAGE_NORMAL)
  (shared GDK_IMAGE_SHARED)
  (fastest GDK_IMAGE_FASTEST))

(define-enum GdkVisualType
  (static-gray GDK_VISUAL_STATIC_GRAY)
  (grayscale GDK_VISUAL_GRAYSCALE)
  (static-color GDK_VISUAL_STATIC_COLOR)
  (pseudo-color GDK_VISUAL_PSEUDO_COLOR)
  (true-color GDK_VISUAL_TRUE_COLOR)
  (direct-color GDK_VISUAL_DIRECT_COLOR))

(define-flags GdkWindowAttributesType
  (title GDK_WA_TITLE)
  (x GDK_WA_X)
  (y GDK_WA_Y)
  (cursor GDK_WA_CURSOR)
  (colormap GDK_WA_COLORMAP)
  (visual GDK_WA_VISUAL))

(define-flags GdkWindowHints
  (pos GDK_HINT_POS)
  (min-size GDK_HINT_MIN_SIZE)
  (max-size GDK_HINT_MAX_SIZE))

(define-enum GdkFunction
  (copy GDK_COPY)
  (invert GDK_INVERT)
  (xor GDK_XOR))

(define-enum GdkFill
  (solid GDK_SOLID)
  (tiled GDK_TILED)
  (stippled GDK_STIPPLED)
  (opaque-stippled GDK_OPAQUE_STIPPLED))

(define-enum GdkLineStyle
  (solid GDK_LINE_SOLID)
  (on-off-dash GDK_LINE_ON_OFF_DASH)
  (double-dash GDK_LINE_DOUBLE_DASH))

(define-enum GdkCapStyle
  (not-last GDK_CAP_NOT_LAST)
  (butt GDK_CAP_BUTT)
  (round GDK_CAP_ROUND)
  (projecting GDK_CAP_PROJECTING))

(define-enum GdkJoinStyle
  (miter GDK_JOIN_MITER)
  (round GDK_JOIN_ROUND)
  (bevel GDK_JOIN_BEVEL))

(define-enum GdkCursorType
  (cursor GDK_LAST_CURSOR))

(define-enum GdkEventType
  (nothing GDK_NOTHING)
  (delete GDK_DELETE)
  (destroy GDK_DESTROY)
  (expose GDK_EXPOSE)
  (motion-notify GDK_MOTION_NOTIFY)
  (button-press GDK_BUTTON_PRESS)
  (2button-press GDK_2BUTTON_PRESS)
  (3button-press GDK_3BUTTON_PRESS)
  (button-release GDK_BUTTON_RELEASE)
  (key-press GDK_KEY_PRESS)
  (key-release GDK_KEY_RELEASE)
  (enter-notify GDK_ENTER_NOTIFY)
  (leave-notify GDK_LEAVE_NOTIFY)
  (focus-change GDK_FOCUS_CHANGE)
  (configure GDK_CONFIGURE)
  (map GDK_MAP)
  (unmap GDK_UNMAP)
  (property-notify GDK_PROPERTY_NOTIFY)
  (selection-clear GDK_SELECTION_CLEAR)
  (selection-request GDK_SELECTION_REQUEST)
  (selection-notify GDK_SELECTION_NOTIFY)
  (proximity-in GDK_PROXIMITY_IN)
  (proximity-out GDK_PROXIMITY_OUT)
  (drag-enter GDK_DRAG_ENTER)
  (drag-leave GDK_DRAG_LEAVE)
  (drag-motion GDK_DRAG_MOTION)
  (drag-status GDK_DRAG_STATUS)
  (drop-start GDK_DROP_START)
  (drop-finished GDK_DROP_FINISHED)
  (client-event GDK_CLIENT_EVENT)
  (visibility-notify GDK_VISIBILITY_NOTIFY)
  (no-expose GDK_NO_EXPOSE))

(define-flags GdkEventMask
  (exposure-mask GDK_EXPOSURE_MASK)
  (pointer-motion-mask GDK_POINTER_MOTION_MASK)
  (pointer-motion-hint-mask GDK_POINTER_MOTION_HINT_MASK)
  (button-motion-mask GDK_BUTTON_MOTION_MASK)
  (button1-motion-mask GDK_BUTTON1_MOTION_MASK)
  (button2-motion-mask GDK_BUTTON2_MOTION_MASK)
  (button3-motion-mask GDK_BUTTON3_MOTION_MASK)
  (button-press-mask GDK_BUTTON_PRESS_MASK)
  (button-release-mask GDK_BUTTON_RELEASE_MASK)
  (key-press-mask GDK_KEY_PRESS_MASK)
  (key-release-mask GDK_KEY_RELEASE_MASK)
  (enter-notify-mask GDK_ENTER_NOTIFY_MASK)
  (leave-notify-mask GDK_LEAVE_NOTIFY_MASK)
  (focus-change-mask GDK_FOCUS_CHANGE_MASK)
  (structure-mask GDK_STRUCTURE_MASK)
  (all-events-mask GDK_ALL_EVENTS_MASK))

(define-enum GdkNotifyType
  (ancestor GDK_NOTIFY_ANCESTOR)
  (virtual GDK_NOTIFY_VIRTUAL)
  (inferior GDK_NOTIFY_INFERIOR)
  (nonlinear GDK_NOTIFY_NONLINEAR)
  (nonlinear-virtual GDK_NOTIFY_NONLINEAR_VIRTUAL)
  (unknown GDK_NOTIFY_UNKNOWN))

(define-flags GdkModifierType
  (shift-mask GDK_SHIFT_MASK)
  (lock-mask GDK_LOCK_MASK)
  (control-mask GDK_CONTROL_MASK)
  (mod1-mask GDK_MOD1_MASK)
  (mod2-mask GDK_MOD2_MASK)
  (mod3-mask GDK_MOD3_MASK)
  (mod4-mask GDK_MOD4_MASK)
  (mod5-mask GDK_MOD5_MASK)
  (button1-mask GDK_BUTTON1_MASK)
  (button2-mask GDK_BUTTON2_MASK)
  (button3-mask GDK_BUTTON3_MASK)
  (button4-mask GDK_BUTTON4_MASK)
  (button5-mask GDK_BUTTON5_MASK))

(define-enum GdkSubwindowMode
  (clip-by-children GDK_CLIP_BY_CHILDREN)
  (include-inferiors GDK_INCLUDE_INFERIORS))

(define-flags GdkInputCondition
  (read GDK_INPUT_READ)
  (write GDK_INPUT_WRITE)
  (exception GDK_INPUT_EXCEPTION))

(define-enum GdkStatus
  (ok GDK_OK)
  (error GDK_ERROR)
  (error-param GDK_ERROR_PARAM)
  (error-file GDK_ERROR_FILE)
  (error-mem GDK_ERROR_MEM))

(define-enum GdkByteOrder
  (lsb-first GDK_LSB_FIRST)
  (msb-first GDK_MSB_FIRST))

(define-flags GdkGCValuesMask
  (foreground GDK_GC_FOREGROUND)
  (background GDK_GC_BACKGROUND)
  (font GDK_GC_FONT)
  (function GDK_GC_FUNCTION)
  (fill GDK_GC_FILL)
  (tile GDK_GC_TILE)
  (stipple GDK_GC_STIPPLE)
  (clip-mask GDK_GC_CLIP_MASK)
  (subwindow GDK_GC_SUBWINDOW)
  (ts-x-origin GDK_GC_TS_X_ORIGIN)
  (ts-y-origin GDK_GC_TS_Y_ORIGIN)
  (clip-x-origin GDK_GC_CLIP_X_ORIGIN)
  (clip-y-origin GDK_GC_CLIP_Y_ORIGIN)
  (exposures GDK_GC_EXPOSURES)
  (line-width GDK_GC_LINE_WIDTH)
  (line-style GDK_GC_LINE_STYLE)
  (cap-style GDK_GC_CAP_STYLE)
  (join-style GDK_GC_JOIN_STYLE))

(define-enum GdkSelection
  (primary GDK_SELECTION_PRIMARY)
  (secondary GDK_SELECTION_SECONDARY))

(define-enum GdkPropertyState
  (new-value GDK_PROPERTY_NEW_VALUE)
  (delete GDK_PROPERTY_DELETE))

(define-enum GdkPropMode
  (replace GDK_PROP_MODE_REPLACE)
  (prepend GDK_PROP_MODE_PREPEND)
  (append GDK_PROP_MODE_APPEND))

(define-enum GdkOverlapType
  (in GDK_OVERLAP_RECTANGLE_IN)
  (out GDK_OVERLAP_RECTANGLE_OUT)
  (part GDK_OVERLAP_RECTANGLE_PART))

(define-flags GdkWMDecoration
  (all GDK_DECOR_ALL)
  (border GDK_DECOR_BORDER)
  (resizeh GDK_DECOR_RESIZEH)
  (title GDK_DECOR_TITLE)
  (menu GDK_DECOR_MENU)
  (minimize GDK_DECOR_MINIMIZE)
  (maximize GDK_DECOR_MAXIMIZE))

(define-flags GdkWMFunction
  (all GDK_FUNC_ALL)
  (resize GDK_FUNC_RESIZE)
  (move GDK_FUNC_MOVE)
  (minimize GDK_FUNC_MINIMIZE)
  (maximize GDK_FUNC_MAXIMIZE)
  (close GDK_FUNC_CLOSE))

(define-enum GdkVisibilityState
  (unobscured GDK_VISIBILITY_UNOBSCURED)
  (partial GDK_VISIBILITY_PARTIAL)
  (fully-obscured GDK_VISIBILITY_FULLY_OBSCURED))

(define-enum GdkInputSource
  (mouse GDK_SOURCE_MOUSE)
  (pen GDK_SOURCE_PEN)
  (eraser GDK_SOURCE_ERASER)
  (cursor GDK_SOURCE_CURSOR))

;;; Gdk boxed types

;;(define-boxed GdkPoint
;;  (copy gdk_point_copy)
;;  (free gdk_point_destroy))

(define-boxed GdkColormap
  (copy gdk_colormap_ref)
  (free gdk_colormap_unref))

(define-boxed GdkVisual
  (copy gdk_visual_ref)
  (free gdk_visual_unref))

(define-boxed GdkFont
  (copy gdk_font_ref)
  (free gdk_font_unref)
  (conversion "sgtk_font_conversion"))

(add-options GdkFont (conversion "sgtk_font_conversion"))

(define-boxed GdkWindow
  (copy gdk_window_ref)
  (free gdk_window_unref))

(define-boxed GdkEvent
  (copy gdk_event_copy)
  (free gdk_event_free)
  (size "sizeof(GdkEvent)"))

(define-boxed GdkColor
  (copy gdk_color_copy)
  (free gdk_color_free)
  (size "sizeof(GdkColor)")
  (fields (uint red)
	  (uint green)
	  (uint blue))
  (conversion "sgtk_color_conversion"))

(add-options GdkColor (conversion "sgtk_color_conversion"))

;;; GdkGC

(define-boxed GdkGC
  (copy gdk_gc_ref)
  (free gdk_gc_unref))

(define-func gdk_gc_new
  (GdkGC (copy nil))
  ((GdkWindow window)))

(define-func gdk_gc_set_foreground
  none
  ((GdkGC gc)
   (GdkColor color)))

(define-func gdk_gc_set_background
  none
  ((GdkGC gc)
   (GdkColor color)))

(define-func gdk_gc_set_font
  none
  ((GdkGC gc)
   (GdkFont font)))

(define-func gdk_gc_set_function
  none
  ((GdkGC gc)
   (GdkFunction function)))

(define-func gdk_gc_set_fill
  none
  ((GdkGC gc)
   (GdkFill fill)))

;(define-func gdk_gc_set_tile
;  none
;  ((GdkGC gc)
;   (GdkPixmap tile)))

;(define-func gdk_gc_set_stipple
;  none
;  ((GdkGC gc)
;   (GdkPixmap stipple)))

(define-func gdk_gc_set_ts_origin
  none
  ((GdkGC gc)
   (int x)
   (int y)))

(define-func gdk_gc_set_clip_origin
  none
  ((GdkGC gc)
   (int x)
   (int y)))

;(define-func gdk_gc_set_clip_mask
;  none
;  ((GdkGC gc)
;   (GdkBitmap mask)))

(define-func gdk_gc_set_subwindow
  none
  ((GdkGC gc)
   (GdkSubwindowMode mode)))

(define-func gdk_gc_set_exposures
  none
  ((GdkGC gc)
   (bool exposures)))

(define-func gdk_gc_set_line_attributes
  none
  ((GdkGC gc)
   (int line_width)
   (GdkLineStyle line_style)
   (GdkCapStyle cap_style)
   (GdkJoinStyle join_style)))

(define-func gdk_draw_line
  none
  ((GdkWindow window)
   (GdkGC gc)
   (int x1)
   (int y1)
   (int x2)
   (int y2)))

(define-func gdk_draw_lines
  none
  ((GdkWindow window)
   (GdkGC gc)
   ((cvecr point) points)))

(define-func gdk_draw_rectangle
  none
  ((GdkWindow window)
   (GdkGC gc)
   (bool filled)
   (int x)
   (int y)
   (int width)
   (int height)))

(define-func gdk_draw_polygon
  none
  ((GdkWindow window)
   (GdkGC gc)
   (bool filled)
   ((cvecr point) points)))

(define-func gdk_draw_arc
  none
  ((GdkWindow window)
   (GdkGC gc)
   (bool filled)
   (int x)
   (int y)
   (int width)
   (int height)
   (int angle1)
   (int angle2)))

(define-func gdk_draw_string
  none
  ((GdkWindow window)
   (GdkFont font)
   (GdkGC gc)
   (int x)
   (int y)
   (string string)))

(define-func gdk_window_clear_area
  none
  ((GdkWindow window)
   (int x)
   (int y)
   (int width)
   (int height)))

(define-func gdk_window_clear_area_e
  none
  ((GdkWindow window)
   (int x)
   (int y)
   (int width)
   (int height)))

(define-func gdk_window_xid
  uint
  ((GdkWindow window)))

(define-func gdk_pixmap_new
  GdkWindow
  ((GdkWindow window (null-ok))
   (int width)
   (int height)
   (int depth (= "-1"))))

(define-func gdk_draw_pixmap
  none
  ((GdkWindow drawable)
   (GdkGC gc)
   (GdkWindow src)
   (int xsrc)
   (int ysrc)
   (int xdest)
   (int ydest)
   (int width)
   (int height)))

(define-func gdk_set_locale
  static_string
  ())

;; Gdk functions

(define-func gdk_font_load
  (GdkFont (copy nil))
  ((string name)))

(define-func gdk_fontset_load
  (GdkFont (copy nil))
  ((string name)))

(define-func gdk_flush
  none
  ())

(define-func gdk_screen_width
  int
  ())

(define-func gdk_screen_height
  int
  ())

;; Color

;; XXX lots missing

(define-func gdk_color_parse_interp
  GdkColor
  ((string spec)))

(define-func gdk_color_intern
  GdkColor
  ((GdkColor color)))

(define-func gdk_font_intern
  GdkFont
  ((GdkFont font)))

(define-func gdk_event_type
  GdkEventType
  ((GdkEvent event)))

(define-func gdk_event_window
  GdkWindow
  ((GdkEvent event)))

(define-func gdk_event_send_event
  bool
  ((GdkEvent event)))

;(define-func gdk_event_area
;  GdkRectangle
;  ((GdkEvent event)))

(define-func gdk_event_visibility_state
  GdkVisibilityState
  ((GdkEvent event)))

(define-func gdk_event_time
  uint
  ((GdkEvent event)))

(define-func gdk_event_x
  float
  ((GdkEvent event)))

(define-func gdk_event_y
  float
  ((GdkEvent event)))

(define-func gdk_event_pressure
  float
  ((GdkEvent event)))

(define-func gdk_event_xtilt
  float
  ((GdkEvent event)))

(define-func gdk_event_ytilt
  float
  ((GdkEvent event)))

(define-func gdk_event_button
  int
  ((GdkEvent event)))

(define-func gdk_event_button_state
  bool
  ((GdkEvent event)))

(define-func gdk_event_is_hint
  bool
  ((GdkEvent event)))

(define-func gdk_event_source
  GdkInputSource
  ((GdkEvent event)))

(define-func gdk_event_deviceid
  uint
  ((GdkEvent event)))

(define-func gdk_event_x_root
  float
  ((GdkEvent event)))

(define-func gdk_event_y_root
  float
  ((GdkEvent event)))

(define-func gdk_event_key_state
  bool
  ((GdkEvent event)))

(define-func gdk_event_keyval
  uint
  ((GdkEvent event)))

(define-func gdk_event_string
  string
  ((GdkEvent event)))

(define-func gdk_event_subwindow
  GdkWindow
  ((GdkEvent event)))

(define-func gdk_event_notify_detail
  GdkNotifyType
  ((GdkEvent event)))

(define-func gdk_event_in
  bool
  ((GdkEvent event)))

(define-func gdk_event_configure_x
  int
  ((GdkEvent event)))

(define-func gdk_event_configure_y
  int
  ((GdkEvent event)))

(define-func gdk_event_configure_width
  int
  ((GdkEvent event)))

(define-func gdk_event_configure_height
  int
  ((GdkEvent event)))

(define-func gdk_get_leader_window_id
  uint
  ())

;; Options

(options
 (includes "#include <gdk/gdk.h>")
 (init-func "sgtk_init_gtk_gdk_glue")
 (other-inits "sgtk_init_gtk_gtk_glue"))