+(export (boxed-related-symbols 'geometry))
+
+(glib:at-init () (foreign-funcall-pointer (foreign-symbol-pointer "gdk_cursor_get_type") () :int))
+
+(define-g-boxed-opaque cursor "GdkCursor" :alloc (error "GdkCursor can not be created from Lisp side"))
+
+(export (boxed-related-symbols 'cursor))
+
+(defctype gdk-atom :pointer)
+
+(define-foreign-type gdk-atom-as-string-type ()
+ ()
+ (:actual-type :pointer)
+ (:simple-parser gdk-atom-as-string))
+
+(defmethod translate-from-foreign (value (type gdk-atom-as-string-type))
+ (gdk-atom-name value))
+
+(defmethod translate-to-foreign (value (type gdk-atom-as-string-type))
+ (gdk-atom-intern value nil))
+
+(defcfun gdk-region-new :pointer)
+
+(define-g-boxed-opaque region nil :alloc (gdk-region-new))
+
+(export (boxed-related-symbols 'region))
+
+(define-g-boxed-cstruct point nil
+ (x :int :initform 0)
+ (y :int :initform 0))
+
+(export (boxed-related-symbols 'point))
+
+(define-g-boxed-cstruct span nil
+ (x :int :initform 0)
+ (y :int :initform 0)
+ (width :int :initform 0))
+
+(export (boxed-related-symbols 'span))
+
+(define-g-boxed-cstruct segment nil
+ (x1 :int :initform 0)
+ (y1 :int :initform 0)
+ (x2 :int :initform 0)
+ (y2 :int :initform 0))
+
+(export (boxed-related-symbols 'segment))
+
+(define-g-boxed-cstruct trapezoid nil
+ (y1 :double :initform 0d0)
+ (x11 :double :initform 0d0)
+ (x21 :double :initform 0d0)
+ (y2 :double :initform 0d0)
+ (x12 :double :initform 0d0)
+ (x22 :double :initform 0d0))
+
+(export (boxed-related-symbols 'trapezoid))
+
+(define-g-boxed-opaque font "GdkFont"
+ :alloc (error "GDK:FONT objects may not be allocated directly"))
+
+(export (boxed-related-symbols 'font))
+
+(define-g-boxed-cstruct color "GdkColor"
+ (pixel :uint32 :initform 0)
+ (red :uint16 :initform 0)
+ (green :uint16 :initform 0)
+ (blue :uint16 :initform 0))
+
+(export (boxed-related-symbols 'color))
+
+(define-g-object-class "GdkDrawable" drawable (:type-initializer "gdk_drawable_get_type")
+ ((:cffi display drawable-display (g-object display)
+ "gdk_drawable_get_display" nil)
+ (:cffi screen drawable-screen (g-object screen)
+ "gdk_drawable_get_screen" nil)
+ (:cffi visual drawable-visual (g-object visual)
+ "gdk_drawable_get_visual" nil)
+ (:cffi colormap drawable-colormap (g-object colormap)
+ "gdk_drawable_get_colormap" "gdk_drawable_set_colormap")
+ (:cffi depth drawable-depth :int
+ "gdk_drawable_get_depth" nil)
+ (:cffi clip-region drawable-clip-region (g-boxed-foreign region :return)
+ "gdk_drawable_get_clip_region" nil)
+ (:cffi visible-region drawable-visible-region (g-boxed-foreign region :return)
+ "gdk_drawable_get_visible_region" nil)))
+
+(define-g-object-class "GdkWindow" gdk-window (:superclass drawable)
+ (#+gtk-2.18
+ (cursor gdk-window-cursor "cursor"
+ "GdkCursor" t t)
+ #-gtk-2.18
+ (:cffi cursor gdk-window-cursor (g-boxed-foreign cursor :return)
+ "gdk_window_get_cursor" "gdk_window_set_cursor")
+ (:cffi window-type gdk-window-window-type gdk-window-type
+ "gdk_window_get_window_type" nil)
+ (:cffi is-destroyed gdk-window-is-destroyed :boolean
+ "gdk_window_is_destroyed" nil)
+ (:cffi is-visible gdk-window-is-visible :boolean
+ "gdk_window_is_visible" nil)
+ (:cffi is-viewable gdk-window-is-viewable :boolean
+ "gdk_window_is_viewable" nil)
+ (:cffi state gdk-window-state gdk-window-state
+ "gdk_window_get_state" nil)
+ (:cffi keep-above gdk-window-keep-above :boolean
+ nil "gdk_window_set_keep_above")
+ (:cffi keep-below gdk-window-keep-below :boolean
+ nil "gdk_window_set_keep_below" )
+ (:cffi opacity gdk-window-opacity :double
+ nil "gdk_window_set_opacity")
+ (:cffi composited gdk-window-composited :boolean
+ nil "gdk_window_set_composited")
+ (:cffi user-data gdk-window-user-data :pointer
+ "gdk_window_get_user_data" "gdk_window_set_user_data")
+ (:cffi override-redirect gdk-window-override-redirect :boolean
+ nil "gdk_window_set_override_redirect")
+ (:cffi accept-focus gdk-window-accept-focus :boolean
+ nil "gdk_window_set_accept_focus")
+ (:cffi focus-on-map gdk-window-focus-on-map :boolean
+ nil "gdk_window_set_focus_on_map")
+ (:cffi title gdk-window-title :string
+ nil "gdk_window_set_title")
+ (:cffi background gdk-window-background (g-boxed-foreign color)
+ nil "gdk_window_set_background")
+ (:cffi icon-list gdk-window-icon-list (glib:glist (g-object pixbuf))
+ nil "gdk_window_set_icon_list")
+ (:cffi modal-hint gdk-window-modal-hint :boolean
+ nil "gdk_window_set_modal_hint")
+ (:cffi type-hint gdk-window-type-hint gdk-window-type-hint
+ "gdk_window_get_type_hint" "gdk_window_set_type_hint")
+ (:cffi skip-taskbar-hint gdk-window-skip-taskbar-hint :boolean
+ nil "gdk_window_set_skip_taskbar_hint")
+ (:cffi skip-pager-hint gdk-window-skip-pager-hint :boolean
+ nil "gdk_window_set_skip_pager_hint")
+ (:cffi urgency-hint gdk-window-urgency-hint :boolean
+ nil "gdk_window_set_urgency_hint")
+ (:cffi parent gdk-window-parent (g-object gdk-window)
+ "gdk_window_get_parent" nil)
+ (:cffi toplevel gdk-window-get-toplevel (g-object gdk-window)
+ "gdk_window_get_toplevel" nil)
+ (:cffi children gdk-window-children (glib:glist (g-object gdk-window) :free-from-foreign nil)
+ "gdk_window_peek_children" nil)
+ (:cffi events gdk-window-events event-mask
+ "gdk_window_get_events" "gdk_window_set_events")
+ (:cffi icon-name gdk-window-icon-name :string
+ nil "gdk_window_set_icon_name")
+ (:cffi transient-for gdk-window-transient-for (g-object gdk-window)
+ nil "gdk_window_set_transient_for")
+ (:cffi role gdk-window-role :string
+ nil "gdk_window_set_role")
+ (:cffi startup-id gdk-window-startup-id :string
+ nil "gdk_window_set_startup_id")
+ (:cffi group gdk-window-group (g-object gdk-window)
+ "gdk_window_get_group" "gdk_window_set_group")
+ (:cffi decorations gdk-window-decorations gdk-w-m-decoration
+ gdk-window-get-decorations "gdk_window_set_decorations")
+ (:cffi functions gdk-window-functions gdk-w-m-function
+ nil "gdk_window_set_functions")))
+
+
+;;;FIXME: Check correct type
+#+ windows
+(defctype native-window :pointer)
+#- windows
+(defctype native-window :uint32)
+
+(define-foreign-type fixed-array ()
+ ((element-type :reader fixed-array-element-type :initarg :element-type :initform (error "Element type must be specified"))
+ (array-size :reader fixed-array-array-size :initarg :array-size :initform (error "Array size must be specified")))
+ (:actual-type :pointer)
+ (:documentation
+ "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)."))
+
+(define-parse-method fixed-array (element-type array-size)
+ (make-instance 'fixed-array :element-type element-type :array-size array-size))
+
+(defmethod translate-from-foreign (ptr (type fixed-array))
+ (when (not (null-pointer-p ptr))
+ (let ((result (make-array (fixed-array-array-size type)))
+ (el-type (fixed-array-element-type type)))
+ (loop
+ for i from 0 below (fixed-array-array-size type)
+ do (setf (aref result i) (mem-aref ptr el-type i)))
+ result)))
+
+(defmethod translate-to-foreign (value (type fixed-array))
+ (if (null value)
+ (null-pointer)
+ (foreign-alloc (fixed-array-element-type type) :count (length value) :initial-contents value)))
+
+(defmethod free-translated-object (value (type fixed-array) param)
+ (declare (ignore param))
+ (unless (null-pointer-p value)
+ (foreign-free value)))
+
+(define-g-boxed-cstruct rectangle "GdkRectangle"
+ (x :int :initform 0)
+ (y :int :initform 0)
+ (width :int :initform 0)
+ (height :int :initform 0))
+
+(export (boxed-related-symbols 'rectangle))
+
+(define-g-boxed-variant-cstruct event "GdkEvent"
+ (type event-type)
+ (window (g-object gdk-window))
+ (send-event (:boolean :int8))
+ (:variant type
+ ((:key-press :key-release) event-key
+ (time :uint32)
+ (state modifier-type)
+ (keyval :uint)
+ (length :int)
+ (string (:string :free-from-foreign nil
+ :free-to-foreign nil))
+ (hardware-keycode :uint16)
+ (group :uint8)
+ (is-modifier :uint))
+ ((:button-press
+ :2button-press
+ :3button-press
+ :button-release) event-button
+ (time :uint32)
+ (x :double)
+ (y :double)
+ (axes (fixed-array :double 2))
+ (state :uint)
+ (button :uint)
+ (device (g-object gdk-device))
+ (x-root :double)
+ (y-root :double))
+ ((:scroll) event-scroll
+ (time :uint32)
+ (x :double)
+ (y :double)
+ (state modifier-type)
+ (direction scroll-direction)
+ (device (g-object gdk-device))
+ (x-root :double)
+ (y-root :double))
+ ((:motion-notify) event-motion
+ (time :uint32)
+ (x :double)
+ (y :double)
+ (axes (fixed-array :double 2))
+ (state modifier-type)
+ (is-hint :int16)
+ (device (g-object gdk-device))
+ (x-root :double)
+ (y-root :double))
+ ((:expose) event-expose
+ (area rectangle :inline t)
+ (region :pointer)
+ (count :int))
+ ((:visibility-notify) event-visibility
+ (state visibility-state))
+ ((:enter-notify :leave-notify) event-crossing
+ (sub-window (g-object gdk-window))
+ (time :uint32)
+ (x :double)
+ (y :double)
+ (x-root :double)
+ (y-root :double)
+ (mode crossing-mode)
+ (detail notify-type)
+ (focus :boolean)
+ (state :uint))
+ ((:focus-change) event-focus
+ (in :int16))
+ ((:configure) event-configure
+ (x :int)
+ (y :int)
+ (width :int)
+ (height :int))
+ ((:property-notify) event-property
+ (atom gdk-atom)
+ (time :uint32)
+ (state property-state))
+ ((:selection-clear
+ :selection-notify
+ :selection-request) event-selection
+ (selection gdk-atom)
+ (target gdk-atom)
+ (property gdk-atom)
+ (time :uint32)
+ (requestor native-window))
+ ((:drag-enter
+ :drag-leave
+ :drag-motion
+ :drag-status
+ :drop-start
+ :drop-finished) event-dnd
+ (drag-context (g-object drag-context))
+ (time :uint32)
+ (x-root :short)
+ (y-root :short))
+ ((:proximity-in
+ :proximity-out) event-proximity
+ (time :uint32)
+ (device (g-object gdk-device)))
+ ((:client-event) event-client
+ (message-time gdk-atom)
+ (data-format :ushort)
+ (:variant data-format
+ (8 event-client-8
+ (data :uchar :count 20))
+ (16 event-client-16
+ (data :ushort :count 10))
+ (32 event-client-32
+ (data :ulong :count 5))))
+ ((:no-expose) event-no-expose)
+ ((:window-state) event-window-state
+ (changed-mask window-state)
+ (new-window-state window-state))
+ ((:setting) event-setting
+ (action setting-action)
+ (name (:string :free-from-foreign nil :free-to-foreign nil)))
+ ((:owner-change) event-owner-change
+ (owner native-window)
+ (reason owner-change)
+ (selection gdk-atom)
+ (time :uint32)
+ (selection-time :uint32))
+ ((:grab-broken) event-grab-broken
+ (keyboard :boolean)
+ (implicit :boolean)
+ (grab-window (g-object gdk-window)))))
+
+(export (boxed-related-symbols 'event))
+
+(define-g-object-class "GdkDragContext" drag-context (:type-initializer "gdk_drag_context_get_type")
+ ((:cffi protocol drag-context-protocol gdk-drag-protocol
+ %gdk-drag-context-get-protocol nil)
+ (:cffi is-source drag-context-is-source :boolean
+ %gdk-drag-context-get-is-source nil)
+ (:cffi source-window drag-context-source-window (g-object gdk-window)
+ %gdk-drag-context-get-source-window nil)
+ (:cffi dest-window drag-context-dest-window (g-object gdk-window)
+ %gdk-drag-context-get-dest-window nil)
+ (:cffi targets drag-context-targets (glib:glist gdk-atom-as-string :free-from-foreign nil)
+ %gdk-drag-context-get-targets nil)
+ (:cffi actions drag-context-actions gdk-drag-action
+ %gdk-drag-context-get-actions nil)
+ (:cffi suggested-action drag-context-suggested-action gdk-drag-action
+ %gdk-drag-context-get-suggested-action nil)
+ (:cffi action drag-context-action gdk-drag-action
+ %gdk-drag-context-get-action nil)
+ (:cffi start-time drag-context-start-time :uint32
+ %gdk-drag-context-get-start-time nil)))
+
+(define-g-object-class "GdkPixbuf" pixbuf (:type-initializer "gdk_pixbuf_get_type")
+ ((colorspace pixbuf-colorspace "colorspace" "GdkColorspace" t nil)
+ (n-channels pixbuf-n-channels "n-channels" "gint" t nil)
+ (has-alpha pixbuf-has-alpha "has-alpha" "gboolean" t nil)
+ (bits-per-sample pixbuf-bits-per-sample "bits-per-sample" "gint" t nil)
+ (width pixbuf-width "width" "gint" t nil)
+ (height pixbuf-height "height" "gint" t nil)
+ (rowstride pixbuf-rowstride "rowstride" "gint" t nil)
+ (pixels pixbuf-pixels "pixels" "gpointer" t nil)))
+
+(define-g-object-class "GdkPixbufAnimation" pixbuf-animation (:type-initializer "gdk_pixbuf_animation_get_type")
+ nil)
+
+(define-g-object-class "GdkImage" gdk-image
+ (:superclass g-object :export t :interfaces
+ nil :type-initializer
+ "gdk_image_get_type")
+ ((:cffi colormap gdk-image-colormap (g-object gdk-colormap)
+ "gdk_image_get_colormap" "gdk_image_set_colormap")))
+
+(define-g-object-class "GdkDisplay" display (:type-initializer "gdk_display_get_type")
+ ((:cffi name display-name (glib:g-string :free-from-foreign nil)
+ "gdk_display_get_name" nil)
+ (:cffi n-screens display-n-screens :int
+ "gdk_display_get_n_screens" nil)
+ (:cffi default-screen display-default-screen (g-object screen)
+ "gdk_display_get_default_screen" nil)
+ (:cffi devices display-devices (glib:glist g-object :free-from-foreign nil)
+ "gdk_display_list_devices" nil)
+ (:cffi supports-cursor-color display-supports-cursor-color :boolean
+ "gdk_display_supports_cursor_color" nil)
+ (:cffi supports-cursor-alpha display-supports-color-alpha :boolean
+ "gdk_display_supports_cursor_alpha" nil)
+ (:cffi default-cursor-size display-default-cursor-size :uint
+ "gdk_display_get_default_cursor_size" nil)
+ (:cffi default-group display-default-group (g-object gdk-window)
+ "gdk_display_get_default_group" nil)
+ (:cffi supports-selection-notification display-supports-selection-notification :boolean
+ "gdk_display_supports_selection_notification" nil)
+ (:cffi supports-clipboard-persistence display-supports-clipboard-persistence :boolean
+ "gdk_display_supports_clipboard_persistence" nil)
+ (:cffi supports-shapes display-supports-shapes :boolean
+ "gdk_display_supports_shapes" nil)
+ (:cffi supports-input-shapes display-supports-input-shapes :boolean
+ "gdk_display_supports_input_shapes" nil)
+ (:cffi supports-composite display-supports-composite :boolean
+ "gdk_display_supports_composite" nil)
+ (:cffi core-pointer display-core-pointer g-object
+ "gdk_display_get_core_pointer" nil)))
+
+(define-g-object-class "GdkDisplayManager" display-manager (:type-initializer "gdk_display_manager_get_type")
+ ((default-display display-manager-default-display "default-display" "GdkDisplay" t t)
+ (:cffi displays display-manager-displays (glib:gslist (g-object display) :free-from-foreign t)
+ "gdk_display_manager_list_displays" nil)))
+
+(define-g-object-class "GdkVisual" visual (:type-initializer "gdk_visual_get_type")
+ ((:cffi screen visual-screen (g-object screen) "gdk_visual_get_screen" nil)
+ (:cffi visual-type visual-visual-type visual-type gdk-visual-get-visual-type nil)
+ (:cffi depth visual-depth :int gdk-visual-get-depth nil)
+ (:cffi byte-order visual-byte-order byte-order gdk-visual-get-byte-order nil)
+ (:cffi colormap-size visual-colormap-size :int gdk-visual-get-colormap-size nil)
+ (:cffi bits-per-rgb visual-bits-per-rgb :int gdk-visual-get-bits-per-rgb nil)
+ (:cffi red-mask visual-red-mask :uint32 gdk-visual-get-red-mask nil)
+ (:cffi red-shift visual-red-shift :int gdk-visual-get-red-shift nil)
+ (:cffi red-prec visual-red-prec :int gdk-visual-get-red-prec nil)
+ (:cffi green-mask visual-green-mask :uint32 gdk-visual-get-green-mask nil)
+ (:cffi green-shift visual-green-shift :int gdk-visual-get-green-shift nil)
+ (:cffi green-prec visual-green-prec :int gdk-visual-get-green-prec nil)
+ (:cffi blue-mask visual-blue-mask :uint32 gdk-visual-get-blue-mask nil)
+ (:cffi blue-shift visual-blue-shift :int gdk-visual-get-blue-shift nil)
+ (:cffi blue-prec visual-blue-prec :int gdk-visual-get-blue-prec nil)))
+
+(define-g-object-class "GdkColormap" gdk-colormap
+ (:superclass g-object :export t :interfaces
+ nil :type-initializer
+ "gdk_colormap_get_type")
+ ((:cffi visual colormap-visual (g-object visual)
+ "gdk_colormap_get_visual" nil)
+ (:cffi screen colormap-screen (g-object screen)
+ "gdk_colormap_get_screen" nil)))
+
+(define-g-object-class "GdkScreen" screen (:type-initializer "gdk_screen_get_type")
+ ((font-options screen-font-options "font-options" "gpointer" t t)
+ (resolution screen-resolution "resolution" "gdouble" t t)
+ (:cffi default-colormap screen-default-colormap (g-object colormap)
+ "gdk_screen_get_default_colormap" "gdk_screen_set_default_colormap")
+ (:cffi system-colormap screen-system-colormap (g-object colormap)
+ "gdk_screen_get_system_colormap" nil)
+ (:cffi system-visual screen-system-visual (g-object visual)
+ "gdk_screen_get_system_visual" nil)
+ (:cffi rgb-colormap screen-rgb-colormap (g-object colormap)
+ "gdk_screen_get_rgb_colormap" nil)
+ (:cffi rgb-visual screen-visual (g-object visual)
+ "gdk_screen_get_rgb_visual" nil)
+ (:cffi rgba-colormap screen-rgba-colormap (g-object colormap)
+ "gdk_screen_get_rgba_colormap" nil)
+ (:cffi rgba-visual screen-rgba-visual (g-object visual)
+ "gdk_screen_get_rgba_visual" nil)
+ (:cffi composited-p screen-composited-p :boolean
+ "gdk_screen_is_composited" nil)
+ (:cffi root-window screen-root-window (g-object gdk-window)
+ "gdk_screen_get_root_window" nil)
+ (:cffi display screen-display (g-object display)
+ "gdk_screen_get_display" nil)
+ (:cffi number screen-number :int
+ "gdk_screen_get_number" nil)
+ (:cffi width screen-widget :int
+ "gdk_screen_get_width" nil)
+ (:cffi height screen-height :int
+ "gdk_screen_get_height" nil)
+ (:cffi width-mm screen-width-mm :int
+ "gdk_screen_get_width_mm" nil)
+ (:cffi height-mm screen-height-mm :int
+ "gdk_screen_get_height_mm" nil)
+ (:cffi visuals screen-visuals (glib:glist (g-object visual) :free-from-foreign t)
+ "gdk_screen_list_visuals" nil)
+ (:cffi toplevel-windows screen-toplevel-windows (glib:glist (g-object gdk-window) :free-from-foreign t)
+ "gdk_screen_get_toplevel_windows" nil)
+ (:cffi display-name screen-display-name (glib:g-string :free-from-foreign t)
+ "gdk_screen_make_display_name" nil)
+ (:cffi n-monitors screen-n-monitors :int
+ "gdk_screen_get_n_monitors" nil)
+ (:cffi active-window screen-active-window (g-object gdk-window)
+ "gdk_screen_get_active_window" nil)
+ (:cffi window-stack screen-window-stack (glib:glist (g-object gdk-window) :free-from-foreign t)
+ "gdk_screen_get_window_stack" nil)))
+
+(define-g-object-class "GdkGC" graphics-context (:type-initializer "gdk_gc_get_type")
+ ((:cffi screen graphics-context-screen (g-object screen)
+ "gdk_gc_get_screen" nil)
+ (:cffi foreground graphics-context-foreground (g-boxed-foreign color)
+ nil "gdk_gc_set_foreground")
+ (:cffi background graphics-context-background (g-boxed-foreign color)
+ nil "gdk_gc_set_background")
+ (:cffi rgb-fg-color graphics-context-rgb-fg-color (g-boxed-foreign color)
+ nil "gdk_gc_set_rgb_fg_color")
+ (:cffi rgb-bg-color graphics-context-rgb-bg-color (g-boxed-foreign color)
+ nil "gdk_gc_set_rgb_bg_color")
+ (:cffi font graphics-context-font (g-boxed-foreign font)
+ nil "gdk_gc_set_font")
+ (:cffi function graphics-context-function gdk-function
+ nil "gdk_gc_set_function")
+ (:cffi fill graphics-context-fill gdk-fill
+ nil "gdk_gc_set_fill")
+ (:cffi tile graphics-context-tile (g-object pixmap)
+ nil "gdk_gc_set_tile")
+ (:cffi stipple graphics-context-stipple (g-object pixmap)
+ nil "gdk_gc_set_stipple")
+ (:cffi clip-mask graphics-context-clip-mask (g-object pixmap)
+ nil "gdk_gc_set_clip_mask")
+ (:cffi clip-rectangle graphics-context-clip-rectangle (g-boxed-foreign rectangle)
+ nil "gdk_gc_set_clip_rectangle")
+ (:cffi clip-region graphics-context-clip-region (g-boxed-foreign region)
+ nil "gdk_gc_set_clip_region")
+ (:cffi subwindow graphics-context-subwindow subwindow-mode
+ nil "gdk_gc_set_subwindow")
+ (:cffi exposures graphics-context-exposures :boolean
+ nil "gdk_gc_set_exposures")
+ (:cffi colormap graphics-context-colormap (g-object colormap)
+ "gdk_gc_get_colormap" "gdk_gc_set_colormap")))
+
+(define-g-object-class "GdkPixmap" pixmap (:superclass drawable :type-initializer "gdk_pixmap_get_type") ())
+
+(define-g-object-class "GdkKeymap" keymap
+ (:superclass g-object :export t :interfaces
+ nil :type-initializer "gdk_keymap_get_type")
+ ((:cffi direction keymap-direction pango:pango-direction
+ "gdk_keymap_get_direction" nil)
+ (:cffi has-bidi-layouts keymap-has-bidi-layouts :boolean
+ "gdk_keymap_have_bidi_layouts" nil)
+ (:cffi caps-lock-state keymap-caps-lock-state :boolean
+ "gdk_keymap_get_caps_lock_state" nil)))
+
+(define-g-boxed-cstruct keymap-key nil
+ (keycode :uint :initform 0)
+ (group :int :initform 0)
+ (level :int :initform 0))
+
+(define-g-boxed-cstruct gdk-window-attr nil
+ (title (:string :free-from-foreign nil) :initform nil)
+ (event-mask event-mask :initform nil)
+ (x :int :initform 0)
+ (y :int :initform 0)
+ (width :int :initform 0)
+ (height :int :initform 0)
+ (window-class gdk-window-class :initform :input-output)
+ (visual (g-object visual) :initform nil)
+ (colormap (g-object colormap) :initform nil)
+ (window-type gdk-window-type :initform :toplevel)
+ (cursor (g-object cursor) :initform nil)
+ (wmclass-name (:string :free-from-foreign nil) :initform nil)
+ (wmclass-class (:string :free-from-foreign nil) :initform nil)
+ (override-redirect :boolean :initform nil)
+ (type-hint gdk-window-type-hint :initform :normal))
+
+(export (boxed-related-symbols 'gdk-window-attr))
+
+(define-g-object-class "GdkDevice" gdk-device
+ (:superclass g-object :export t :interfaces
+ nil :type-initializer
+ "gdk_device_get_type")
+ ((:cffi name gdk-device-name :string
+ %gdk-device-name nil)
+ (:cffi source gdk-device-source gdk-input-source
+ %gdk-device-source "gdk_device_set_source")
+ (:cffi mode gdk-device-mode gdk-input-mode
+ %gdk-device-mode gdk_device_set_mode)
+ (:cffi has-cursor gdk-device-has-cursor :boolean
+ %gdk-device-has-cursor nil)
+ (:cffi n-axes gdk-device-n-axes :int
+ %gdk-device-n-axes nil)
+ (:cffi axes gdk-device-axes nil
+ %gdk-device-axes nil)
+ (:cffi keys gdk-device-keys nil
+ %gdk-device-keys nil)
+ (:cffi n-keys gdk-device-n-keys nil
+ %gdk-device-n-keys nil)))
+
+(define-g-object-class "GdkAppLaunchContext"
+ gdk-app-launch-context
+ (:superclass g-object :export t
+ :interfaces nil :type-initializer
+ "gdk_app_launch_context_get_type")
+ ((:cffi display gdk-app-launch-context-display (g-object display)
+ nil "gdk_app_launch_context_set_display")
+ (:cffi screen gdk-app-launch-context-screen (g-object screen)
+ nil "gdk_app_launch_context_set_screen")
+ (:cffi desktop gdk-app-launch-context-desktop :int
+ nil "gdk_app_launch_context_set_desktop")
+ (:cffi timestamp gdk-app-launch-context-timestamp :uint32
+ nil "gdk_app_launch_context_set_timestamp")
+ (:cffi icon gdk-app-launch-context-icon g-object
+ nil "gdk_app_launch_context_set_icon")
+ (:cffi icon-name gdk-app-launch-context-icon-name :string
+ nil "gdk_app_launch_context_set_icon_name"))) ;; TODO: GIcon