3 (define-g-enum "GdkGrabStatus" grab-status
() :success
:already-grabbed
:invalid-time
:not-viewable
:frozen
)
5 (defcenum crossing-mode
:normal
:grab
:ungrab
:gtk-grab
:gtk-ungrab
:state-changed
)
6 (export 'crossing-mode
)
8 (defcenum notify-type
(:ancestor
0) :virtual
:inferior
:nonlinear
:nonlinear-virtual
:unknown
)
11 (define-g-enum "GdkFillRule"
13 (:export t
:type-initializer
"gdk_fill_rule_get_type")
17 (define-g-enum "GdkOverlapType"
19 (:export t
:type-initializer
"gdk_overlap_type_get_type")
24 (define-g-flags "GdkGCValuesMask"
26 (:export t
:type-initializer
"gdk_gc_values_mask_get_type")
46 (define-g-enum "GdkFunction"
48 (:export t
:type-initializer
"gdk_function_get_type")
66 (define-g-enum "GdkFill"
68 (:export t
:type-initializer
"gdk_fill_get_type")
74 (define-g-enum "GdkSubwindowMode"
76 (:export t
:type-initializer
"gdk_subwindow_mode_get_type")
78 (:include-inferiors
1))
80 (define-g-enum "GdkLineStyle"
82 (:export t
:type-initializer
"gdk_line_style_get_type")
87 (define-g-enum "GdkCapStyle"
89 (:export t
:type-initializer
"gdk_cap_style_get_type")
95 (define-g-enum "GdkJoinStyle"
97 (:export t
:type-initializer
"gdk_join_style_get_type")
102 (define-g-enum "GdkRgbDither"
104 (:export t
:type-initializer
"gdk_rgb_dither_get_type")
109 (define-g-enum "GdkVisualType"
111 (:export t
:type-initializer
"gdk_visual_type_get_type")
119 (define-g-enum "GdkByteOrder"
121 (:export t
:type-initializer
"gdk_byte_order_get_type")
125 (define-g-enum "GdkCursorType"
127 (:export t
:type-initializer
"gdk_cursor_type_get_type")
130 (:based-arrow-down
4)
134 (:bottom-left-corner
12)
135 (:bottom-right-corner
14)
182 (:sb-h-double-arrow
108)
184 (:sb-right-arrow
112)
186 (:sb-v-double-arrow
116)
194 (:top-left-arrow
132)
195 (:top-left-corner
134)
196 (:top-right-corner
136)
207 (:cursor-is-pixmap -
1))
209 (define-g-flags "GdkWindowState"
211 (:export t
:type-initializer
"gdk_window_state_get_type")
220 ;gdk_display_get_screen
222 (define-g-enum "GdkEventType" event-type
()
223 (:nothing -
1) (:delete
0)
224 (:destroy
1) (:expose
2) (:motion-notify
3)
225 (:button-press
4) (:2button-press
5) (:3button-press
6)
226 (:button-release
7) (:key-press
8) (:key-release
9)
227 (:enter-notify
10) (:leave-notify
11) (:focus-change
12)
228 (:configure
13) (:map
14) (:unmap
15) (:property-notify
16)
229 (:selection-clear
17) (:selection-request
18)
230 (:selection-notify
19) (:proximity-in
20)
231 (:proximity-out
21) (:drag-enter
22) (:drag-leave
23)
232 (:drag-motion
24) (:drag-status
25) (:drop-start
26)
233 (:drop-finished
27) (:client-event
28)
234 (:visibility-notify
29) (:no-expose
30) (:scroll
31)
235 (:window-state
32) (:setting
33) (:owner-change
34)
236 (:grab-broken
35) (:damage
36))
238 (define-g-enum "GdkExtensionMode" extension-mode
(:export t
:type-initializer
"gdk_extension_mode_get_type")
239 (:none
0) (:all
1) (:cursor
2))
241 (define-g-enum "GdkWindowTypeHint" gdk-window-type-hint
(:export t
:type-initializer
"gdk_window_type_hint_get_type")
242 (:normal
0) (:dialog
1) (:menu
2) (:toolbar
3)
243 (:splashscreen
4) (:utility
5) (:dock
6) (:desktop
7)
244 (:dropdown-menu
8) (:popup-menu
9) (:tooltip
10)
245 (:notification
11) (:combo
12) (:dnd
13))
247 (define-g-flags "GdkModifierType" modifier-type
()
248 (:shift-mask
1) (:lock-mask
2) (:control-mask
4)
249 (:mod1-mask
8) (:mod2-mask
16) (:mod3-mask
32)
250 (:mod4-mask
64) (:mod5-mask
128)
251 (:button1-mask
256) (:button2-mask
512)
252 (:button3-mask
1024) (:button4-mask
2048)
253 (:button5-mask
4096) (:super-mask
67108864)
254 (:hyper-mask
134217728) (:meta-mask
268435456)
255 (:release-mask
1073741824)
256 (:modifier-mask
1543512063))
258 (define-g-enum "GdkScrollDirection" scroll-direction
()
260 (:left
2) (:right
3))
262 (define-g-enum "GdkVisibilityState" visibility-state
()
264 (:partial
1) (:fully-obscured
2))
266 (define-g-enum "GdkPropertyState" property-state
()
269 (define-g-flags "GdkWindowState" window-state
()
271 (:iconified
2) (:maximized
4) (:sticky
8) (:fullscreen
16)
272 (:above
32) (:below
64))
274 (define-g-enum "GdkSettingAction" setting-action
()
275 (:new
0) (:changed
1)
278 (define-g-enum "GdkOwnerChange" owner-change
()
280 (:destroy
1) (:close
2))
282 (define-g-flags "GdkEventMask" event-mask
()
284 (:pointer-motion-mask
4) (:pointer-motion-hint-mask
8)
285 (:button-motion-mask
16) (:button1-motion-mask
32)
286 (:button2-motion-mask
64) (:button3-motion-mask
128)
287 (:button-press-mask
256) (:button-release-mask
512)
288 (:key-press-mask
1024) (:key-release-mask
2048)
289 (:enter-notify-mask
4096) (:leave-notify-mask
8192)
290 (:focus-change-mask
16384) (:structure-mask
32768)
291 (:property-change-mask
65536)
292 (:visibility-notify-mask
131072)
293 (:proximity-in-mask
262144) (:proximity-out-mask
524288)
294 (:substructure-mask
1048576) (:scroll-mask
2097152)
295 (:all-events-mask
4194302))
297 (define-g-enum "GdkFontType" font-type
() :font
:fontset
)
299 (define-g-enum "GdkGravity" gravity
()
311 (define-g-enum "GdkWindowType"
313 (:export t
:type-initializer
"gdk_window_type_get_type")
322 (define-g-enum "GdkWindowClass"
324 (:export t
:type-initializer
"gdk_window_class_get_type")
328 (define-g-flags "GdkWindowHints"
330 (:export t
:type-initializer
"gdk_window_hints_get_type")
341 (define-g-enum "GdkWindowEdge"
343 (:export t
:type-initializer
"gdk_window_edge_get_type")
353 (define-g-flags "GdkWindowAttributesType"
354 gdk-window-attributes-type
355 (:export t
:type-initializer
"gdk_window_attributes_type_get_type")
366 (define-g-enum "GdkFilterReturn"
368 (:export t
:type-initializer
"gdk_filter_return_get_type")
373 (define-g-flags "GdkWMDecoration"
375 (:export t
:type-initializer
"gdk_wm_decoration_get_type")
384 (define-g-flags "GdkWMFunction"
386 (:export t
:type-initializer
"gdk_wm_function_get_type")
394 (define-g-enum "GdkCursorType" cursor-type
(:export t
:type-initializer
"gdk_cursor_type_get_type")
395 (:x-cursor
0) (:arrow
2) (:based-arrow-down
4)
396 (:based-arrow-up
6) (:boat
8) (:bogosity
10)
397 (:bottom-left-corner
12) (:bottom-right-corner
14)
398 (:bottom-side
16) (:bottom-tee
18) (:box-spiral
20)
399 (:center-ptr
22) (:circle
24) (:clock
26)
400 (:coffee-mug
28) (:cross
30) (:cross-reverse
32)
401 (:crosshair
34) (:diamond-cross
36) (:dot
38)
402 (:dotbox
40) (:double-arrow
42) (:draft-large
44)
403 (:draft-small
46) (:draped-box
48) (:exchange
50)
404 (:fleur
52) (:gobbler
54) (:gumby
56) (:hand1
58)
405 (:hand2
60) (:heart
62) (:icon
64) (:iron-cross
66)
406 (:left-ptr
68) (:left-side
70) (:left-tee
72)
407 (:leftbutton
74) (:ll-angle
76) (:lr-angle
78)
408 (:man
80) (:middlebutton
82) (:mouse
84)
409 (:pencil
86) (:pirate
88) (:plus
90)
410 (:question-arrow
92) (:right-ptr
94)
411 (:right-side
96) (:right-tee
98) (:rightbutton
100)
412 (:rtl-logo
102) (:sailboat
104)
413 (:sb-down-arrow
106) (:sb-h-double-arrow
108)
414 (:sb-left-arrow
110) (:sb-right-arrow
112)
415 (:sb-up-arrow
114) (:sb-v-double-arrow
116)
416 (:shuttle
118) (:sizing
120) (:spider
122)
417 (:spraycan
124) (:star
126) (:target
128)
418 (:tcross
130) (:top-left-arrow
132)
419 (:top-left-corner
134) (:top-right-corner
136)
420 (:top-side
138) (:top-tee
140) (:trek
142)
421 (:ul-angle
144) (:umbrella
146) (:ur-angle
148)
422 (:watch
150) (:xterm
152) (:last-cursor
153)
423 (:blank-cursor -
2) (:cursor-is-pixmap -
1))
425 (define-g-enum "GdkImageType"
427 (:export t
:type-initializer
"gdk_image_type_get_type")
432 (define-g-enum "GdkPixbufAlphaMode"
434 (:export t
:type-initializer
"gdk_pixbuf_alpha_mode_get_type")
438 (define-g-enum "GdkColorspace" colorspace
()
441 (define-g-enum "GdkAxisUse"
443 (:export t
:type-initializer
"gdk_axis_use_get_type")
453 (define-g-enum "GdkDragProtocol"
455 (:export t
:type-initializer
"gdk_drag_protocol_get_type")
464 (define-g-flags "GdkDragAction"
466 (:export t
:type-initializer
"gdk_drag_action_get_type")
474 (define-g-enum "GdkInputSource"
476 (:export t
:type-initializer
"gdk_input_source_get_type")
482 (define-g-enum "GdkInputMode"
484 (:export t
:type-initializer
"gdk_input_mode_get_type")
489 (define-g-enum "GdkExtensionMode"
491 (:export t
:type-initializer
"gdk_extension_mode_get_type")
496 (export 'cursor-type
)
498 (define-g-boxed-cstruct geometry nil
499 (min-width :int
:initform
0)
500 (min-height :int
:initform
0)
501 (max-width :int
:initform
0)
502 (max-height :int
:initform
0)
503 (base-width :int
:initform
0)
504 (base-height :int
:initform
0)
505 (width-increment :int
:initform
0)
506 (height-increment :int
:initform
0)
507 (min-aspect :double
:initform
0.0d0
)
508 (max-aspect :double
:initform
0.0d0
)
509 (gravity gravity
:initform
:north-west
))
511 (export (boxed-related-symbols 'geometry
))
513 (glib:at-init
() (foreign-funcall-pointer (foreign-symbol-pointer "gdk_cursor_get_type") () :int
))
515 (define-g-boxed-opaque cursor
"GdkCursor" :alloc
(error "GdkCursor can not be created from Lisp side"))
517 (export (boxed-related-symbols 'cursor
))
519 (defctype gdk-atom
:pointer
)
521 (define-foreign-type gdk-atom-as-string-type
()
523 (:actual-type
:pointer
)
524 (:simple-parser gdk-atom-as-string
))
526 (defmethod translate-from-foreign (value (type gdk-atom-as-string-type
))
527 (gdk-atom-name value
))
529 (defmethod translate-to-foreign (value (type gdk-atom-as-string-type
))
530 (gdk-atom-intern value nil
))
532 (define-g-object-class "GdkWindow" gdk-window
(:superclass drawable
)
533 ((:cffi window-type gdk-window-window-type gdk-window-type
534 "gdk_window_get_window_type" nil
)
535 (:cffi is-destroyed gdk-window-is-destroyed
:boolean
536 "gdk_window_is_destroyed" nil
)
537 (:cffi is-visible gdk-window-is-visible
:boolean
538 "gdk_window_is_visible" nil
)
539 (:cffi is-viewable gdk-window-is-viewable
:boolean
540 "gdk_window_is_viewable" nil
)
541 (:cffi state gdk-window-state gdk-window-state
542 "gdk_window_get_state" nil
)
543 (:cffi keep-above gdk-window-keep-above
:boolean
544 nil
"gdk_window_set_keep_above")
545 (:cffi keep-below gdk-window-keep-below
:boolean
546 nil
"gdk_window_set_keep_below" )
547 (:cffi opacity gdk-window-opacity
:double
548 nil
"gdk_window_set_opacity")
549 (:cffi composited gdk-window-composited
:boolean
550 nil
"gdk_window_set_composited")
551 (:cffi user-data gdk-window-user-data
:pointer
552 "gdk_window_get_user_data" "gdk_window_set_user_data")
553 (:cffi override-redirect gdk-window-override-redirect
:boolean
554 nil
"gdk_window_set_override_redirect")
555 (:cffi accept-focus gdk-window-accept-focus
:boolean
556 nil
"gdk_window_set_accept_focus")
557 (:cffi focus-on-map gdk-window-focus-on-map
:boolean
558 nil
"gdk_window_set_focus_on_map")
559 (:cffi title gdk-window-title
:string
560 nil
"gdk_window_set_title")
561 (:cffi background gdk-window-background
(g-boxed-foreign color
)
562 nil
"gdk_window_set_background")
563 (:cffi icon-list gdk-window-icon-list
(glib:glist
(g-object pixbuf
))
564 nil
"gdk_window_set_icon_list")
565 (:cffi modal-hint gdk-window-modal-hint
:boolean
566 nil
"gdk_window_set_modal_hint")
567 (:cffi type-hint gdk-window-type-hint gdk-window-type-hint
568 "gdk_window_get_type_hint" "gdk_window_set_type_hint")
569 (:cffi skip-taskbar-hint gdk-window-skip-taskbar-hint
:boolean
570 nil
"gdk_window_set_skip_taskbar_hint")
571 (:cffi skip-pager-hint gdk-window-skip-pager-hint
:boolean
572 nil
"gdk_window_set_skip_pager_hint")
573 (:cffi urgency-hint gdk-window-urgency-hint
:boolean
574 nil
"gdk_window_set_urgency_hint")
575 (:cffi parent gdk-window-parent
(g-object gdk-window
)
576 "gdk_window_get_parent" nil
)
577 (:cffi toplevel gdk-window-get-toplevel
(g-object gdk-window
)
578 "gdk_window_get_toplevel" nil
)
579 (:cffi children gdk-window-children
(glib:glist
(g-object gdk-window
) :free-from-foreign nil
)
580 "gdk_window_peek_children" nil
)
581 (:cffi events gdk-window-events event-mask
582 "gdk_window_get_events" "gdk_window_set_events")
583 (:cffi icon-name gdk-window-icon-name
:string
584 nil
"gdk_window_set_icon_name")
585 (:cffi transient-for gdk-window-transient-for
(g-object gdk-window
)
586 nil
"gdk_window_set_transient_for")
587 (:cffi role gdk-window-role
:string
588 nil
"gdk_window_set_role")
589 (:cffi startup-id gdk-window-startup-id
:string
590 nil
"gdk_window_set_startup_id")
591 (:cffi group gdk-window-group
(g-object gdk-window
)
592 "gdk_window_get_group" "gdk_window_set_group")
593 (:cffi decorations gdk-window-decorations gdk-w-m-decoration
594 gdk-window-get-decorations
"gdk_window_set_decorations")
595 (:cffi functions gdk-window-functions gdk-w-m-function
596 nil
"gdk_window_set_functions")))
599 ;;;FIXME: Check correct type
601 (defctype native-window
:pointer
)
603 (defctype native-window
:uint32
)
605 (define-foreign-type fixed-array
()
606 ((element-type :reader fixed-array-element-type
:initarg
:element-type
:initform
(error "Element type must be specified"))
607 (array-size :reader fixed-array-array-size
:initarg
:array-size
:initform
(error "Array size must be specified")))
608 (:actual-type
:pointer
)
610 "CFFI foreign type for an array of a fixed length. Slot @code{element-type}@see-slot{fixed-array-element-type} specifies the type of elements and slot @code{array-size}@see-slot{fixed-array-array-size} specifies the size of array (in elements)."))
612 (define-parse-method fixed-array
(element-type array-size
)
613 (make-instance 'fixed-array
:element-type element-type
:array-size array-size
))
615 (defmethod translate-from-foreign (ptr (type fixed-array
))
616 (when (not (null-pointer-p ptr
))
617 (let ((result (make-array (fixed-array-array-size type
)))
618 (el-type (fixed-array-element-type type
)))
620 for i from
0 below
(fixed-array-array-size type
)
621 do
(setf (aref result i
) (mem-aref ptr el-type i
)))
624 (define-g-boxed-cstruct rectangle
"GdkRectangle"
627 (width :int
:initform
0)
628 (height :int
:initform
0))
630 (export (boxed-related-symbols 'rectangle
))
632 (define-g-boxed-variant-cstruct event
"GdkEvent"
634 (window (g-object gdk-window
))
635 (send-event (:boolean
:int8
))
637 ((:key-press
:key-release
) event-key
639 (state modifier-type
)
642 (string (:string
:free-from-foreign nil
643 :free-to-foreign nil
))
644 (hardware-keycode :uint16
)
650 :button-release
) event-button
654 (axes (fixed-array :double
2))
657 (device (g-object device
))
660 ((:scroll
) event-scroll
664 (state modifier-type
)
665 (direction scroll-direction
)
666 (device (g-object device
))
669 ((:motion-notify
) event-motion
673 (axes (fixed-array :double
2))
674 (state modifier-type
)
676 (device (g-object device
))
679 ((:expose
) event-expose
680 (area rectangle
:inline t
)
683 ((:visibility-notify
) event-visibility
684 (state visibility-state
))
685 ((:enter-notify
:leave-notify
) event-crossing
686 (sub-window (g-object gdk-window
))
696 ((:focus-change
) event-focus
698 ((:configure
) event-configure
703 ((:property-notify
) event-property
706 (state property-state
))
709 :selection-request
) event-selection
714 (requestor native-window
))
720 :drop-finished
) event-dnd
721 (drag-context (g-object drag-context
))
726 :proximity-out
) event-proximity
728 (device (g-object device
)))
729 ((:client-event
) event-client
730 (message-time gdk-atom
)
731 (data-format :ushort
)
732 (:variant data-format
734 (data :uchar
:count
20))
736 (data :ushort
:count
10))
738 (data :ulong
:count
5))))
739 ((:no-expose
) event-no-expose
)
740 ((:window-state
) event-window-state
741 (changed-mask window-state
)
742 (new-window-state window-state
))
743 ((:setting
) event-setting
744 (action setting-action
)
745 (name (:string
:free-from-foreign nil
:free-to-foreign nil
)))
746 ((:owner-change
) event-owner-change
747 (owner native-window
)
748 (reason owner-change
)
751 (selection-time :uint32
))
752 ((:grab-broken
) event-grab-broken
755 (grab-window (g-object gdk-window
)))))
757 (export (boxed-related-symbols 'event
))
759 (define-g-object-class "GdkDragContext" drag-context
()
760 ((:cffi protocol drag-context-protocol gdk-drag-protocol
761 %gdk-drag-context-get-protocol nil
)
762 (:cffi is-source drag-context-is-source
:boolean
763 %gdk-drag-context-get-is-source nil
)
764 (:cffi source-window drag-context-source-window
(g-object gdk-window
)
765 %gdk-drag-context-get-source-window nil
)
766 (:cffi dest-window drag-context-dest-window
(g-object gdk-window
)
767 %gdk-drag-context-get-dest-window nil
)
768 (:cffi targets drag-context-targets
(glib:glist gdk-atom-as-string
:free-from-foreign nil
)
769 %gdk-drag-context-get-targets nil
)
770 (:cffi actions drag-context-actions gdk-drag-action
771 %gdk-drag-context-get-actions nil
)
772 (:cffi suggested-action drag-context-suggested-action gdk-drag-action
773 %gdk-drag-context-get-suggested-action nil
)
774 (:cffi action drag-context-action gdk-drag-action
775 %gdk-drag-context-get-action nil
)
776 (:cffi start-time drag-context-start-time
:uint32
777 %gdk-drag-context-get-start-time nil
)))
779 (define-g-object-class "GdkPixbuf" pixbuf
()
780 ((colorspace pixbuf-colorspace
"colorspace" "GdkColorspace" t nil
)
781 (n-channels pixbuf-n-channels
"n-channels" "gint" t nil
)
782 (has-alpha pixbuf-has-alpha
"has-alpha" "gboolean" t nil
)
783 (bits-per-sample pixbuf-bits-per-sample
"bits-per-sample" "gint" t nil
)
784 (width pixbuf-width
"width" "gint" t nil
)
785 (height pixbuf-height
"height" "gint" t nil
)
786 (rowstride pixbuf-rowstride
"rowstride" "gint" t nil
)
787 (pixels pixbuf-pixels
"pixels" "gpointer" t nil
)))
789 (define-g-object-class "GdkPixbufAnimation" pixbuf-animation
()
792 (define-g-object-class "GdkImage" gdk-image
793 (:superclass g-object
:export t
:interfaces
794 nil
:type-initializer
795 "gdk_image_get_type")
796 ((:cffi colormap gdk-image-colormap
(g-object gdk-colormap
)
797 "gdk_image_get_colormap" "gdk_image_set_colormap")))
799 (define-g-object-class "GdkDisplay" display
()
800 ((:cffi name display-name
(glib:g-string
:free-from-foreign nil
)
801 "gdk_display_get_name" nil
)
802 (:cffi n-screens display-n-screens
:int
803 "gdk_display_get_n_screens" nil
)
804 (:cffi default-screen display-default-screen
(g-object screen
)
805 "gdk_display_get_default_screen" nil
)
806 (:cffi devices display-devices
(glib:glist g-object
:free-from-foreign nil
)
807 "gdk_display_list_devices" nil
)
808 (:cffi supports-cursor-color display-supports-cursor-color
:boolean
809 "gdk_display_supports_cursor_color" nil
)
810 (:cffi supports-cursor-alpha display-supports-color-alpha
:boolean
811 "gdk_display_supports_cursor_alpha" nil
)
812 (:cffi default-cursor-size display-default-cursor-size
:uint
813 "gdk_display_get_default_cursor_size" nil
)
814 (:cffi default-group display-default-group
(g-object gdk-window
)
815 "gdk_display_get_default_group" nil
)
816 (:cffi supports-selection-notification display-supports-selection-notification
:boolean
817 "gdk_display_supports_selection_notification" nil
)
818 (:cffi supports-clipboard-persistence display-supports-clipboard-persistence
:boolean
819 "gdk_display_supports_clipboard_persistence" nil
)
820 (:cffi supports-shapes display-supports-shapes
:boolean
821 "gdk_display_supports_shapes" nil
)
822 (:cffi supports-input-shapes display-supports-input-shapes
:boolean
823 "gdk_display_supports_input_shapes" nil
)
824 (:cffi supports-composite display-supports-composite
:boolean
825 "gdk_display_supports_composite" nil
)
826 (:cffi core-pointer display-core-pointer g-object
827 "gdk_display_get_core_pointer" nil
)))
829 (define-g-object-class "GdkDisplayManager" display-manager
()
830 ((default-display display-manager-default-display
"default-display" "GdkDisplay" t t
)
831 (:cffi displays display-manager-displays
(glib:gslist
(g-object display
) :free-from-foreign t
)
832 "gdk_display_manager_list_displays" nil
)))
834 (define-g-object-class "GdkVisual" visual
()
835 ((:cffi screen visual-screen
(g-object screen
) "gdk_visual_get_screen" nil
)
836 (:cffi visual-type visual-visual-type visual-type gdk-visual-get-visual-type nil
)
837 (:cffi depth visual-depth
:int gdk-visual-get-depth nil
)
838 (:cffi byte-order visual-byte-order byte-order gdk-visual-get-byte-order nil
)
839 (:cffi colormap-size visual-colormap-size
:int gdk-visual-get-colormap-size nil
)
840 (:cffi bits-per-rgb visual-bits-per-rgb
:int gdk-visual-get-bits-per-rgb nil
)
841 (:cffi red-mask visual-red-mask
:uint32 gdk-visual-get-red-mask nil
)
842 (:cffi red-shift visual-red-shift
:int gdk-visual-get-red-shift nil
)
843 (:cffi red-prec visual-red-prec
:int gdk-visual-get-red-prec nil
)
844 (:cffi green-mask visual-green-mask
:uint32 gdk-visual-get-green-mask nil
)
845 (:cffi green-shift visual-green-shift
:int gdk-visual-get-green-shift nil
)
846 (:cffi green-prec visual-green-prec
:int gdk-visual-get-green-prec nil
)
847 (:cffi blue-mask visual-blue-mask
:uint32 gdk-visual-get-blue-mask nil
)
848 (:cffi blue-shift visual-blue-shift
:int gdk-visual-get-blue-shift nil
)
849 (:cffi blue-prec visual-blue-prec
:int gdk-visual-get-blue-prec nil
)))
851 (define-g-object-class "GdkColormap" gdk-colormap
852 (:superclass g-object
:export t
:interfaces
853 nil
:type-initializer
854 "gdk_colormap_get_type")
855 ((:cffi visual colormap-visual
(g-object visual
)
856 "gdk_colormap_get_visual" nil
)
857 (:cffi screen colormap-screen
(g-object screen
)
858 "gdk_colormap_get_screeen" nil
)))
860 (define-g-object-class "GdkScreen" screen
()
861 ((font-options screen-font-options
"font-options" "gpointer" t t
)
862 (resolution screen-resolution
"resolution" "gdouble" t t
)
863 (:cffi default-colormap screen-default-colormap
(g-object colormap
)
864 "gdk_screen_get_default_colormap" "gdk_screen_set_default_colormap")
865 (:cffi system-colormap screen-system-colormap
(g-object colormap
)
866 "gdk_screen_get_system_colormap" nil
)
867 (:cffi system-visual screen-system-visual
(g-object visual
)
868 "gdk_screen_get_system_visual" nil
)
869 (:cffi rgb-colormap screen-rgb-colormap
(g-object colormap
)
870 "gdk_screen_get_rgb_colormap" nil
)
871 (:cffi rgb-visual screen-visual
(g-object visual
)
872 "gdk_screen_get_rgb_visual" nil
)
873 (:cffi rgba-colormap screen-rgba-colormap
(g-object colormap
)
874 "gdk_screen_get_rgba_colormap" nil
)
875 (:cffi rgba-visual screen-rgba-visual
(g-object visual
)
876 "gdk_screen_get_rgba_visual" nil
)
877 (:cffi composited-p screen-composited-p
:boolean
878 "gdk_screen_is_composited" nil
)
879 (:cffi root-window screen-root-window
(g-object gdk-window
)
880 "gdk_screen_get_root_window" nil
)
881 (:cffi display screen-display
(g-object display
)
882 "gdk_screen_get_display" nil
)
883 (:cffi number screen-number
:int
884 "gdk_screen_get_number" nil
)
885 (:cffi width screen-widget
:int
886 "gdk_screen_get_width" nil
)
887 (:cffi height screen-height
:int
888 "gdk_screen_get_height" nil
)
889 (:cffi width-mm screen-width-mm
:int
890 "gdk_screen_get_width_mm" nil
)
891 (:cffi height-mm screen-height-mm
:int
892 "gdk_screen_get_height_mm" nil
)
893 (:cffi visuals screen-visuals
(glib:glist
(g-object visual
) :free-from-foreign t
)
894 "gdk_screen_list_visuals" nil
)
895 (:cffi toplevel-windows screen-toplevel-windows
(glib:glist
(g-object gdk-window
) :free-from-foreign t
)
896 "gdk_screen_get_toplevel_windows" nil
)
897 (:cffi display-name screen-display-name
(glib:g-string
:free-from-foreign t
)
898 "gdk_screen_make_display_name" nil
)
899 (:cffi n-monitors screen-n-monitors
:int
900 "gdk_screen_get_n_monitors" nil
)
901 (:cffi active-window screen-active-window
(g-object gdk-window
)
902 "gdk_screen_get_active_window" nil
)
903 (:cffi window-stack screen-window-stack
(glib:glist
(g-object gdk-window
) :free-from-foreign t
)
904 "gdk_screen_get_window_stack" nil
)))
906 (defcfun gdk-region-new
:pointer
)
908 (define-g-boxed-opaque region nil
:alloc
(gdk-region-new))
910 (export (boxed-related-symbols 'region
))
912 (define-g-boxed-cstruct point nil
914 (y :int
:initform
0))
916 (export (boxed-related-symbols 'point
))
918 (define-g-boxed-cstruct span nil
921 (width :int
:initform
0))
923 (export (boxed-related-symbols 'span
))
925 (define-g-boxed-cstruct segment nil
926 (x1 :int
:initform
0)
927 (y1 :int
:initform
0)
928 (x2 :int
:initform
0)
929 (y2 :int
:initform
0))
931 (export (boxed-related-symbols 'segment
))
933 (define-g-boxed-cstruct trapezoid nil
934 (y1 :double
:initform
0d0
)
935 (x11 :double
:initform
0d0
)
936 (x21 :double
:initform
0d0
)
937 (y2 :double
:initform
0d0
)
938 (x12 :double
:initform
0d0
)
939 (x22 :double
:initform
0d0
))
941 (export (boxed-related-symbols 'trapezoid
))
943 (define-g-boxed-opaque font
"GdkFont"
944 :alloc
(error "GDK:FONT objects may not be allocated directly"))
946 (export (boxed-related-symbols 'font
))
948 (define-g-boxed-cstruct color
"GdkColor"
949 (pixel :uint32
:initform
0)
950 (red :uint16
:initform
0)
951 (green :uint16
:initform
0)
952 (blue :uint16
:initform
0))
954 (export (boxed-related-symbols 'color
))
956 (define-g-object-class "GdkGC" graphics-context
()
957 ((:cffi screen graphics-context-screen
(g-object screen
)
958 "gdk_gc_get_screen" nil
)
959 (:cffi foreground graphics-context-foreground
(g-boxed-foreign color
)
960 nil
"gdk_gc_set_foreground")
961 (:cffi background graphics-context-background
(g-boxed-foreign color
)
962 nil
"gdk_gc_set_background")
963 (:cffi rgb-fg-color graphics-context-rgb-fg-color
(g-boxed-foreign color
)
964 nil
"gdk_gc_set_rgb_fg_color")
965 (:cffi rgb-bg-color graphics-context-rgb-bg-color
(g-boxed-foreign color
)
966 nil
"gdk_gc_set_rgb_bg_color")
967 (:cffi font graphics-context-font
(g-boxed-foreign font
)
968 nil
"gdk_gc_set_font")
969 (:cffi function graphics-context-function gdk-function
970 nil
"gdk_gc_set_function")
971 (:cffi fill graphics-context-fill gdk-fill
972 nil
"gdk_gc_set_fill")
973 (:cffi tile graphics-context-tile
(g-object pixmap
)
974 nil
"gdk_gc_set_tile")
975 (:cffi stipple graphics-context-stipple
(g-object pixmap
)
976 nil
"gdk_gc_set_stipple")
977 (:cffi clip-mask graphics-context-clip-mask
(g-object pixmap
)
978 nil
"gdk_gc_set_clip_mask")
979 (:cffi clip-rectangle graphics-context-clip-rectangle
(g-boxed-foreign rectangle
)
980 nil
"gdk_gc_set_clip_rectangle")
981 (:cffi clip-region graphics-context-clip-region
(g-boxed-foreign region
)
982 nil
"gdk_gc_set_clip_region")
983 (:cffi subwindow graphics-context-subwindow subwindow-mode
984 nil
"gdk_gc_set_subwindow")
985 (:cffi exposures graphics-context-exposures
:boolean
986 nil
"gdk_gc_set_exposures")
987 (:cffi colormap graphics-context-colormap
(g-object colormap
)
988 "gdk_gc_get_colormap" "gdk_gc_set_colormap")))
990 (define-g-object-class "GdkDrawable" drawable
()
991 ((:cffi display drawable-display
(g-object display
)
992 "gdk_drawable_get_display" nil
)
993 (:cffi screen drawable-screen
(g-object screen
)
994 "gdk_drawable_get_screen" nil
)
995 (:cffi visual drawable-visual
(g-object visual
)
996 "gdk_drawable_get_visual" nil
)
997 (:cffi colormap drawable-colormap
(g-object colormap
)
998 "gdk_drawable_get_colormap" "gdk_drawable_set_colormap")
999 (:cffi depth drawable-depth
:int
1000 "gdk_drawable_get_depth" nil
)
1001 (:cffi clip-region drawable-clip-region
(g-boxed-foreign region
:return
)
1002 "gdk_drawable_get_clip_region" nil
)
1003 (:cffi visible-region drawable-visible-region
(g-boxed-foreign region
:return
)
1004 "gdk_drawable_get_visible_region" nil
)))
1006 (define-g-object-class "GdkPixmap" pixmap
(:superclass drawable
) ())
1008 (define-g-object-class "GdkKeymap" keymap
1009 (:superclass g-object
:export t
:interfaces
1010 nil
:type-initializer
"gdk_keymap_get_type")
1011 ((:cffi direction keymap-direction pango
:pango-direction
1012 "gdk_keymap_get_direction" nil
)
1013 (:cffi has-bidi-layouts keymap-has-bidi-layouts
:boolean
1014 "gdk_keymap_have_bidi_layouts" nil
)
1015 (:cffi caps-lock-state keymap-caps-lock-state
:boolean
1016 "gdk_keymap_get_caps_lock_state" nil
)))
1018 (define-g-boxed-cstruct keymap-key nil
1019 (keycode :uint
:initform
0)
1020 (group :int
:initform
0)
1021 (level :int
:initform
0))
1023 (define-g-boxed-cstruct gdk-window-attr nil
1024 (title (:string
:free-from-foreign nil
) :initform nil
)
1025 (event-mask event-mask
:initform nil
)
1026 (x :int
:initform
0)
1027 (y :int
:initform
0)
1028 (width :int
:initform
0)
1029 (height :int
:initform
0)
1030 (window-class gdk-window-class
:initform
:input-output
)
1031 (visual (g-object visual
) :initform nil
)
1032 (colormap (g-object colormap
) :initform nil
)
1033 (window-type gdk-window-type
:initform
:toplevel
)
1034 (cursor (g-object cursor
) :initform nil
)
1035 (wmclass-name (:string
:free-from-foreign nil
) :initform nil
)
1036 (wmclass-class (:string
:free-from-foreign nil
) :initform nil
)
1037 (override-redirect :boolean
:initform nil
)
1038 (type-hint gdk-window-type-hint
:initform
:normal
))
1040 (export (boxed-related-symbols 'gdk-window-attr
))
1042 (define-g-object-class "GdkDevice" gdk-device
1043 (:superclass g-object
:export t
:interfaces
1044 nil
:type-initializer
1045 "gdk_device_get_type")
1046 ((:cffi name gdk-device-name
:string
1047 %gdk-device-name nil
)
1048 (:cffi source gdk-device-source gdk-input-source
1049 %gdk-device-source
"gdk_device_set_source")
1050 (:cffi mode gdk-device-mode gdk-input-mode
1051 %gdk-device-mode gdk_device_set_mode
)
1052 (:cffi has-cursor gdk-device-has-cursor
:boolean
1053 %gdk-device-has-cursor nil
)
1054 (:cffi n-axes gdk-device-n-axes
:int
1055 %gdk-device-n-axes nil
)
1056 (:cffi axes gdk-device-axes nil
1057 %gdk-device-axes nil
)
1058 (:cffi keys gdk-device-keys nil
1059 %gdk-device-keys nil
)
1060 (:cffi n-keys gdk-device-n-keys nil
1061 %gdk-device-n-keys nil
)))
1063 (define-g-object-class "GdkAppLaunchContext"
1064 gdk-app-launch-context
1065 (:superclass g-object
:export t
1066 :interfaces nil
:type-initializer
1067 "gdk_app_launch_context_get_type")
1068 ((:cffi display gdk-app-launch-context-display
(g-object display
)
1069 nil
"gdk_app_launch_context_set_display")
1070 (:cffi screen gdk-app-launch-context-screen
(g-object screen
)
1071 nil
"gdk_app_launch_context_set_screen")
1072 (:cffi desktop gdk-app-launch-context-desktop
:int
1073 nil
"gdk_app_launch_context_set_desktop")
1074 (:cffi timestamp gdk-app-launch-context-timestamp
:uint32
1075 nil
"gdk_app_launch_context_set_timestamp")
1076 (:cffi icon gdk-app-launch-context-icon g-object
1077 nil
"gdk_app_launch_context_set_icon")
1078 (:cffi icon-name gdk-app-launch-context-icon-name
:string
1079 nil
"gdk_app_launch_context_set_icon_name"))) ;; TODO: GIcon