;; From gdkdevice.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_SOURCE_MOUSE,
;;   GDK_SOURCE_PEN,
;;   GDK_SOURCE_KEYBOARD,
;;   GDK_SOURCE_TOUCHSCREEN,
;;   GDK_SOURCE_TOUCHPAD,
;;   GDK_SOURCE_TRACKPOINT,
;;   GDK_SOURCE_TABLET_PAD
;; } GdkInputSource;

(define-enum-extended InputSource
  (in-module "Gdk")
  (c-name "GdkInputSource")
  (values
    '("mouse" "GDK_SOURCE_MOUSE" "0")
    '("pen" "GDK_SOURCE_PEN" "1")
    '("keyboard" "GDK_SOURCE_KEYBOARD" "2")
    '("touchscreen" "GDK_SOURCE_TOUCHSCREEN" "3")
    '("touchpad" "GDK_SOURCE_TOUCHPAD" "4")
    '("trackpoint" "GDK_SOURCE_TRACKPOINT" "5")
    '("tablet-pad" "GDK_SOURCE_TABLET_PAD" "6")
  )
)

;; From gdkdevicepad.h

;; Original typedef:
;; typedef enum {
;;   GDK_DEVICE_PAD_FEATURE_BUTTON,
;;   GDK_DEVICE_PAD_FEATURE_RING,
;;   GDK_DEVICE_PAD_FEATURE_STRIP
;; } GdkDevicePadFeature;

(define-enum-extended DevicePadFeature
  (in-module "Gdk")
  (c-name "GdkDevicePadFeature")
  (values
    '("button" "GDK_DEVICE_PAD_FEATURE_BUTTON" "0")
    '("ring" "GDK_DEVICE_PAD_FEATURE_RING" "1")
    '("strip" "GDK_DEVICE_PAD_FEATURE_STRIP" "2")
  )
)

;; From gdkdevicetool.h

;; Original typedef:
;; typedef enum {
;;   GDK_DEVICE_TOOL_TYPE_UNKNOWN,
;;   GDK_DEVICE_TOOL_TYPE_PEN,
;;   GDK_DEVICE_TOOL_TYPE_ERASER,
;;   GDK_DEVICE_TOOL_TYPE_BRUSH,
;;   GDK_DEVICE_TOOL_TYPE_PENCIL,
;;   GDK_DEVICE_TOOL_TYPE_AIRBRUSH,
;;   GDK_DEVICE_TOOL_TYPE_MOUSE,
;;   GDK_DEVICE_TOOL_TYPE_LENS,
;; } GdkDeviceToolType;

(define-enum-extended DeviceToolType
  (in-module "Gdk")
  (c-name "GdkDeviceToolType")
  (values
    '("unknown" "GDK_DEVICE_TOOL_TYPE_UNKNOWN" "0")
    '("pen" "GDK_DEVICE_TOOL_TYPE_PEN" "1")
    '("eraser" "GDK_DEVICE_TOOL_TYPE_ERASER" "2")
    '("brush" "GDK_DEVICE_TOOL_TYPE_BRUSH" "3")
    '("pencil" "GDK_DEVICE_TOOL_TYPE_PENCIL" "4")
    '("airbrush" "GDK_DEVICE_TOOL_TYPE_AIRBRUSH" "5")
    '("mouse" "GDK_DEVICE_TOOL_TYPE_MOUSE" "6")
    '("lens" "GDK_DEVICE_TOOL_TYPE_LENS" "7")
  )
)

;; From gdkdrag.h

;; Original typedef:
;; typedef enum {
;;   GDK_DRAG_CANCEL_NO_TARGET,
;;   GDK_DRAG_CANCEL_USER_CANCELLED,
;;   GDK_DRAG_CANCEL_ERROR
;; } GdkDragCancelReason;

(define-enum-extended DragCancelReason
  (in-module "Gdk")
  (c-name "GdkDragCancelReason")
  (values
    '("no-target" "GDK_DRAG_CANCEL_NO_TARGET" "0")
    '("user-cancelled" "GDK_DRAG_CANCEL_USER_CANCELLED" "1")
    '("error" "GDK_DRAG_CANCEL_ERROR" "2")
  )
)

;; From gdkenums.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_GRAVITY_NORTH_WEST = 1,
;;   GDK_GRAVITY_NORTH,
;;   GDK_GRAVITY_NORTH_EAST,
;;   GDK_GRAVITY_WEST,
;;   GDK_GRAVITY_CENTER,
;;   GDK_GRAVITY_EAST,
;;   GDK_GRAVITY_SOUTH_WEST,
;;   GDK_GRAVITY_SOUTH,
;;   GDK_GRAVITY_SOUTH_EAST,
;;   GDK_GRAVITY_STATIC
;; } GdkGravity;

(define-enum-extended Gravity
  (in-module "Gdk")
  (c-name "GdkGravity")
  (values
    '("north-west" "GDK_GRAVITY_NORTH_WEST" "1")
    '("north" "GDK_GRAVITY_NORTH" "2")
    '("north-east" "GDK_GRAVITY_NORTH_EAST" "3")
    '("west" "GDK_GRAVITY_WEST" "4")
    '("center" "GDK_GRAVITY_CENTER" "5")
    '("east" "GDK_GRAVITY_EAST" "6")
    '("south-west" "GDK_GRAVITY_SOUTH_WEST" "7")
    '("south" "GDK_GRAVITY_SOUTH" "8")
    '("south-east" "GDK_GRAVITY_SOUTH_EAST" "9")
    '("static" "GDK_GRAVITY_STATIC" "10")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_SHIFT_MASK    = 1 << 0,
;;   GDK_LOCK_MASK     = 1 << 1,
;;   GDK_CONTROL_MASK  = 1 << 2,
;;   GDK_ALT_MASK      = 1 << 3,
;; 
;;   GDK_BUTTON1_MASK  = 1 << 8,
;;   GDK_BUTTON2_MASK  = 1 << 9,
;;   GDK_BUTTON3_MASK  = 1 << 10,
;;   GDK_BUTTON4_MASK  = 1 << 11,
;;   GDK_BUTTON5_MASK  = 1 << 12,
;; 
;;   GDK_SUPER_MASK    = 1 << 26,
;;   GDK_HYPER_MASK    = 1 << 27,
;;   GDK_META_MASK     = 1 << 28,
;; } GdkModifierType;

(define-flags-extended ModifierType
  (in-module "Gdk")
  (c-name "GdkModifierType")
  (values
    '("shift-mask" "GDK_SHIFT_MASK" "1 << 0")
    '("lock-mask" "GDK_LOCK_MASK" "1 << 1")
    '("control-mask" "GDK_CONTROL_MASK" "1 << 2")
    '("alt-mask" "GDK_ALT_MASK" "1 << 3")
    '("button1-mask" "GDK_BUTTON1_MASK" "1 << 8")
    '("button2-mask" "GDK_BUTTON2_MASK" "1 << 9")
    '("button3-mask" "GDK_BUTTON3_MASK" "1 << 10")
    '("button4-mask" "GDK_BUTTON4_MASK" "1 << 11")
    '("button5-mask" "GDK_BUTTON5_MASK" "1 << 12")
    '("super-mask" "GDK_SUPER_MASK" "1 << 26")
    '("hyper-mask" "GDK_HYPER_MASK" "1 << 27")
    '("meta-mask" "GDK_META_MASK" "1 << 28")
  )
)

;; Original typedef:
;; typedef enum {
;;   GDK_GL_ERROR_NOT_AVAILABLE,
;;   GDK_GL_ERROR_UNSUPPORTED_FORMAT,
;;   GDK_GL_ERROR_UNSUPPORTED_PROFILE,
;;   GDK_GL_ERROR_COMPILATION_FAILED,
;;   GDK_GL_ERROR_LINK_FAILED
;; } GdkGLError;

(define-enum-extended GLError
  (in-module "Gdk")
  (c-name "GdkGLError")
  (values
    '("not-available" "GDK_GL_ERROR_NOT_AVAILABLE" "0")
    '("unsupported-format" "GDK_GL_ERROR_UNSUPPORTED_FORMAT" "1")
    '("unsupported-profile" "GDK_GL_ERROR_UNSUPPORTED_PROFILE" "2")
    '("compilation-failed" "GDK_GL_ERROR_COMPILATION_FAILED" "3")
    '("link-failed" "GDK_GL_ERROR_LINK_FAILED" "4")
  )
)

;; Original typedef:
;; typedef enum {
;;   GDK_VULKAN_ERROR_UNSUPPORTED,
;;   GDK_VULKAN_ERROR_NOT_AVAILABLE,
;; } GdkVulkanError;

(define-enum-extended VulkanError
  (in-module "Gdk")
  (c-name "GdkVulkanError")
  (values
    '("unsupported" "GDK_VULKAN_ERROR_UNSUPPORTED" "0")
    '("not-available" "GDK_VULKAN_ERROR_NOT_AVAILABLE" "1")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_AXIS_IGNORE,
;;   GDK_AXIS_X,
;;   GDK_AXIS_Y,
;;   GDK_AXIS_DELTA_X,
;;   GDK_AXIS_DELTA_Y,
;;   GDK_AXIS_PRESSURE,
;;   GDK_AXIS_XTILT,
;;   GDK_AXIS_YTILT,
;;   GDK_AXIS_WHEEL,
;;   GDK_AXIS_DISTANCE,
;;   GDK_AXIS_ROTATION,
;;   GDK_AXIS_SLIDER,
;;   GDK_AXIS_LAST
;; } GdkAxisUse;

(define-enum-extended AxisUse
  (in-module "Gdk")
  (c-name "GdkAxisUse")
  (values
    '("ignore" "GDK_AXIS_IGNORE" "0")
    '("x" "GDK_AXIS_X" "1")
    '("y" "GDK_AXIS_Y" "2")
    '("delta-x" "GDK_AXIS_DELTA_X" "3")
    '("delta-y" "GDK_AXIS_DELTA_Y" "4")
    '("pressure" "GDK_AXIS_PRESSURE" "5")
    '("xtilt" "GDK_AXIS_XTILT" "6")
    '("ytilt" "GDK_AXIS_YTILT" "7")
    '("wheel" "GDK_AXIS_WHEEL" "8")
    '("distance" "GDK_AXIS_DISTANCE" "9")
    '("rotation" "GDK_AXIS_ROTATION" "10")
    '("slider" "GDK_AXIS_SLIDER" "11")
    '("last" "GDK_AXIS_LAST" "12")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_AXIS_FLAG_X        = 1 << GDK_AXIS_X,
;;   GDK_AXIS_FLAG_Y        = 1 << GDK_AXIS_Y,
;;   GDK_AXIS_FLAG_DELTA_X  = 1 << GDK_AXIS_DELTA_X,
;;   GDK_AXIS_FLAG_DELTA_Y  = 1 << GDK_AXIS_DELTA_Y,
;;   GDK_AXIS_FLAG_PRESSURE = 1 << GDK_AXIS_PRESSURE,
;;   GDK_AXIS_FLAG_XTILT    = 1 << GDK_AXIS_XTILT,
;;   GDK_AXIS_FLAG_YTILT    = 1 << GDK_AXIS_YTILT,
;;   GDK_AXIS_FLAG_WHEEL    = 1 << GDK_AXIS_WHEEL,
;;   GDK_AXIS_FLAG_DISTANCE = 1 << GDK_AXIS_DISTANCE,
;;   GDK_AXIS_FLAG_ROTATION = 1 << GDK_AXIS_ROTATION,
;;   GDK_AXIS_FLAG_SLIDER   = 1 << GDK_AXIS_SLIDER,
;; } GdkAxisFlags;

(define-flags-extended AxisFlags
  (in-module "Gdk")
  (c-name "GdkAxisFlags")
  (values
    '("x" "GDK_AXIS_FLAG_X" "0x2")
    '("y" "GDK_AXIS_FLAG_Y" "0x4")
    '("delta-x" "GDK_AXIS_FLAG_DELTA_X" "0x8")
    '("delta-y" "GDK_AXIS_FLAG_DELTA_Y" "0x10")
    '("pressure" "GDK_AXIS_FLAG_PRESSURE" "0x20")
    '("xtilt" "GDK_AXIS_FLAG_XTILT" "0x40")
    '("ytilt" "GDK_AXIS_FLAG_YTILT" "0x80")
    '("wheel" "GDK_AXIS_FLAG_WHEEL" "0x100")
    '("distance" "GDK_AXIS_FLAG_DISTANCE" "0x200")
    '("rotation" "GDK_AXIS_FLAG_ROTATION" "0x400")
    '("slider" "GDK_AXIS_FLAG_SLIDER" "0x800")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_ACTION_COPY    = 1 << 0,
;;   GDK_ACTION_MOVE    = 1 << 1,
;;   GDK_ACTION_LINK    = 1 << 2,
;;   GDK_ACTION_ASK     = 1 << 3
;; } GdkDragAction;

(define-flags-extended DragAction
  (in-module "Gdk")
  (c-name "GdkDragAction")
  (values
    '("copy" "GDK_ACTION_COPY" "1 << 0")
    '("move" "GDK_ACTION_MOVE" "1 << 1")
    '("link" "GDK_ACTION_LINK" "1 << 2")
    '("ask" "GDK_ACTION_ASK" "1 << 3")
  )
)

;; Original typedef:
;; typedef enum {
;;   GDK_MEMORY_B8G8R8A8_PREMULTIPLIED,
;;   GDK_MEMORY_A8R8G8B8_PREMULTIPLIED,
;;   GDK_MEMORY_R8G8B8A8_PREMULTIPLIED,
;;   GDK_MEMORY_B8G8R8A8,
;;   GDK_MEMORY_A8R8G8B8,
;;   GDK_MEMORY_R8G8B8A8,
;;   GDK_MEMORY_A8B8G8R8,
;;   GDK_MEMORY_R8G8B8,
;;   GDK_MEMORY_B8G8R8,
;;   GDK_MEMORY_R16G16B16,
;;   GDK_MEMORY_R16G16B16A16_PREMULTIPLIED,
;;   GDK_MEMORY_R16G16B16A16,
;;   GDK_MEMORY_R16G16B16_FLOAT,
;;   GDK_MEMORY_R16G16B16A16_FLOAT_PREMULTIPLIED,
;;   GDK_MEMORY_R16G16B16A16_FLOAT,
;;   GDK_MEMORY_R32G32B32_FLOAT,
;;   GDK_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED,
;;   GDK_MEMORY_R32G32B32A32_FLOAT,
;; 
;;   GDK_MEMORY_N_FORMATS
;; } GdkMemoryFormat;

(define-enum-extended MemoryFormat
  (in-module "Gdk")
  (c-name "GdkMemoryFormat")
  (values
    '("b8g8r8a8-premultiplied" "GDK_MEMORY_B8G8R8A8_PREMULTIPLIED" "0")
    '("a8r8g8b8-premultiplied" "GDK_MEMORY_A8R8G8B8_PREMULTIPLIED" "1")
    '("r8g8b8a8-premultiplied" "GDK_MEMORY_R8G8B8A8_PREMULTIPLIED" "2")
    '("b8g8r8a8" "GDK_MEMORY_B8G8R8A8" "3")
    '("a8r8g8b8" "GDK_MEMORY_A8R8G8B8" "4")
    '("r8g8b8a8" "GDK_MEMORY_R8G8B8A8" "5")
    '("a8b8g8r8" "GDK_MEMORY_A8B8G8R8" "6")
    '("r8g8b8" "GDK_MEMORY_R8G8B8" "7")
    '("b8g8r8" "GDK_MEMORY_B8G8R8" "8")
    '("r16g16b16" "GDK_MEMORY_R16G16B16" "9")
    '("r16g16b16a16-premultiplied" "GDK_MEMORY_R16G16B16A16_PREMULTIPLIED" "10")
    '("r16g16b16a16" "GDK_MEMORY_R16G16B16A16" "11")
    '("r16g16b16-float" "GDK_MEMORY_R16G16B16_FLOAT" "12")
    '("r16g16b16a16-float-premultiplied" "GDK_MEMORY_R16G16B16A16_FLOAT_PREMULTIPLIED" "13")
    '("r16g16b16a16-float" "GDK_MEMORY_R16G16B16A16_FLOAT" "14")
    '("r32g32b32-float" "GDK_MEMORY_R32G32B32_FLOAT" "15")
    '("r32g32b32a32-float-premultiplied" "GDK_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED" "16")
    '("r32g32b32a32-float" "GDK_MEMORY_R32G32B32A32_FLOAT" "17")
    '("n-formats" "GDK_MEMORY_N_FORMATS" "18")
  )
)

;; From gdkevents.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_DELETE,
;;   GDK_MOTION_NOTIFY,
;;   GDK_BUTTON_PRESS,
;;   GDK_BUTTON_RELEASE,
;;   GDK_KEY_PRESS,
;;   GDK_KEY_RELEASE,
;;   GDK_ENTER_NOTIFY,
;;   GDK_LEAVE_NOTIFY,
;;   GDK_FOCUS_CHANGE,
;;   GDK_PROXIMITY_IN,
;;   GDK_PROXIMITY_OUT,
;;   GDK_DRAG_ENTER,
;;   GDK_DRAG_LEAVE,
;;   GDK_DRAG_MOTION,
;;   GDK_DROP_START,
;;   GDK_SCROLL,
;;   GDK_GRAB_BROKEN,
;;   GDK_TOUCH_BEGIN,
;;   GDK_TOUCH_UPDATE,
;;   GDK_TOUCH_END,
;;   GDK_TOUCH_CANCEL,
;;   GDK_TOUCHPAD_SWIPE,
;;   GDK_TOUCHPAD_PINCH,
;;   GDK_PAD_BUTTON_PRESS,
;;   GDK_PAD_BUTTON_RELEASE,
;;   GDK_PAD_RING,
;;   GDK_PAD_STRIP,
;;   GDK_PAD_GROUP_MODE,
;;   GDK_TOUCHPAD_HOLD,
;;   GDK_EVENT_LAST        /* helper variable for decls */
;; } GdkEventType;

(define-enum-extended EventType
  (in-module "Gdk")
  (c-name "GdkEventType")
  (values
    '("delete" "GDK_DELETE" "0")
    '("motion-notify" "GDK_MOTION_NOTIFY" "1")
    '("button-press" "GDK_BUTTON_PRESS" "2")
    '("button-release" "GDK_BUTTON_RELEASE" "3")
    '("key-press" "GDK_KEY_PRESS" "4")
    '("key-release" "GDK_KEY_RELEASE" "5")
    '("enter-notify" "GDK_ENTER_NOTIFY" "6")
    '("leave-notify" "GDK_LEAVE_NOTIFY" "7")
    '("focus-change" "GDK_FOCUS_CHANGE" "8")
    '("proximity-in" "GDK_PROXIMITY_IN" "9")
    '("proximity-out" "GDK_PROXIMITY_OUT" "10")
    '("drag-enter" "GDK_DRAG_ENTER" "11")
    '("drag-leave" "GDK_DRAG_LEAVE" "12")
    '("drag-motion" "GDK_DRAG_MOTION" "13")
    '("drop-start" "GDK_DROP_START" "14")
    '("scroll" "GDK_SCROLL" "15")
    '("grab-broken" "GDK_GRAB_BROKEN" "16")
    '("touch-begin" "GDK_TOUCH_BEGIN" "17")
    '("touch-update" "GDK_TOUCH_UPDATE" "18")
    '("touch-end" "GDK_TOUCH_END" "19")
    '("touch-cancel" "GDK_TOUCH_CANCEL" "20")
    '("touchpad-swipe" "GDK_TOUCHPAD_SWIPE" "21")
    '("touchpad-pinch" "GDK_TOUCHPAD_PINCH" "22")
    '("pad-button-press" "GDK_PAD_BUTTON_PRESS" "23")
    '("pad-button-release" "GDK_PAD_BUTTON_RELEASE" "24")
    '("pad-ring" "GDK_PAD_RING" "25")
    '("pad-strip" "GDK_PAD_STRIP" "26")
    '("pad-group-mode" "GDK_PAD_GROUP_MODE" "27")
    '("touchpad-hold" "GDK_TOUCHPAD_HOLD" "28")
    '("event-last" "GDK_EVENT_LAST" "29")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_TOUCHPAD_GESTURE_PHASE_BEGIN,
;;   GDK_TOUCHPAD_GESTURE_PHASE_UPDATE,
;;   GDK_TOUCHPAD_GESTURE_PHASE_END,
;;   GDK_TOUCHPAD_GESTURE_PHASE_CANCEL
;; } GdkTouchpadGesturePhase;

(define-enum-extended TouchpadGesturePhase
  (in-module "Gdk")
  (c-name "GdkTouchpadGesturePhase")
  (values
    '("begin" "GDK_TOUCHPAD_GESTURE_PHASE_BEGIN" "0")
    '("update" "GDK_TOUCHPAD_GESTURE_PHASE_UPDATE" "1")
    '("end" "GDK_TOUCHPAD_GESTURE_PHASE_END" "2")
    '("cancel" "GDK_TOUCHPAD_GESTURE_PHASE_CANCEL" "3")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_SCROLL_UP,
;;   GDK_SCROLL_DOWN,
;;   GDK_SCROLL_LEFT,
;;   GDK_SCROLL_RIGHT,
;;   GDK_SCROLL_SMOOTH
;; } GdkScrollDirection;

(define-enum-extended ScrollDirection
  (in-module "Gdk")
  (c-name "GdkScrollDirection")
  (values
    '("up" "GDK_SCROLL_UP" "0")
    '("down" "GDK_SCROLL_DOWN" "1")
    '("left" "GDK_SCROLL_LEFT" "2")
    '("right" "GDK_SCROLL_RIGHT" "3")
    '("smooth" "GDK_SCROLL_SMOOTH" "4")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_SCROLL_UNIT_WHEEL,
;;   GDK_SCROLL_UNIT_SURFACE
;; } GdkScrollUnit;

(define-enum-extended ScrollUnit
  (in-module "Gdk")
  (c-name "GdkScrollUnit")
  (values
    '("wheel" "GDK_SCROLL_UNIT_WHEEL" "0")
    '("surface" "GDK_SCROLL_UNIT_SURFACE" "1")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_NOTIFY_ANCESTOR		= 0,
;;   GDK_NOTIFY_VIRTUAL		= 1,
;;   GDK_NOTIFY_INFERIOR		= 2,
;;   GDK_NOTIFY_NONLINEAR		= 3,
;;   GDK_NOTIFY_NONLINEAR_VIRTUAL	= 4,
;;   GDK_NOTIFY_UNKNOWN		= 5
;; } GdkNotifyType;

(define-enum-extended NotifyType
  (in-module "Gdk")
  (c-name "GdkNotifyType")
  (values
    '("ancestor" "GDK_NOTIFY_ANCESTOR" "0")
    '("virtual" "GDK_NOTIFY_VIRTUAL" "1")
    '("inferior" "GDK_NOTIFY_INFERIOR" "2")
    '("nonlinear" "GDK_NOTIFY_NONLINEAR" "3")
    '("nonlinear-virtual" "GDK_NOTIFY_NONLINEAR_VIRTUAL" "4")
    '("unknown" "GDK_NOTIFY_UNKNOWN" "5")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_CROSSING_NORMAL,
;;   GDK_CROSSING_GRAB,
;;   GDK_CROSSING_UNGRAB,
;;   GDK_CROSSING_GTK_GRAB,
;;   GDK_CROSSING_GTK_UNGRAB,
;;   GDK_CROSSING_STATE_CHANGED,
;;   GDK_CROSSING_TOUCH_BEGIN,
;;   GDK_CROSSING_TOUCH_END,
;;   GDK_CROSSING_DEVICE_SWITCH
;; } GdkCrossingMode;

(define-enum-extended CrossingMode
  (in-module "Gdk")
  (c-name "GdkCrossingMode")
  (values
    '("normal" "GDK_CROSSING_NORMAL" "0")
    '("grab" "GDK_CROSSING_GRAB" "1")
    '("ungrab" "GDK_CROSSING_UNGRAB" "2")
    '("gtk-grab" "GDK_CROSSING_GTK_GRAB" "3")
    '("gtk-ungrab" "GDK_CROSSING_GTK_UNGRAB" "4")
    '("state-changed" "GDK_CROSSING_STATE_CHANGED" "5")
    '("touch-begin" "GDK_CROSSING_TOUCH_BEGIN" "6")
    '("touch-end" "GDK_CROSSING_TOUCH_END" "7")
    '("device-switch" "GDK_CROSSING_DEVICE_SWITCH" "8")
  )
)

;; Original typedef:
;; typedef enum {
;;   GDK_KEY_MATCH_NONE,
;;   GDK_KEY_MATCH_PARTIAL,
;;   GDK_KEY_MATCH_EXACT
;; } GdkKeyMatch;

(define-enum-extended KeyMatch
  (in-module "Gdk")
  (c-name "GdkKeyMatch")
  (values
    '("none" "GDK_KEY_MATCH_NONE" "0")
    '("partial" "GDK_KEY_MATCH_PARTIAL" "1")
    '("exact" "GDK_KEY_MATCH_EXACT" "2")
  )
)

;; From gdkframeclock.h

;; Original typedef:
;; typedef enum {
;;   GDK_FRAME_CLOCK_PHASE_NONE          = 0,
;;   GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS  = 1 << 0,
;;   GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT  = 1 << 1,
;;   GDK_FRAME_CLOCK_PHASE_UPDATE        = 1 << 2,
;;   GDK_FRAME_CLOCK_PHASE_LAYOUT        = 1 << 3,
;;   GDK_FRAME_CLOCK_PHASE_PAINT         = 1 << 4,
;;   GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS = 1 << 5,
;;   GDK_FRAME_CLOCK_PHASE_AFTER_PAINT   = 1 << 6
;; } GdkFrameClockPhase;

(define-flags-extended FrameClockPhase
  (in-module "Gdk")
  (c-name "GdkFrameClockPhase")
  (values
    '("none" "GDK_FRAME_CLOCK_PHASE_NONE" "0x0")
    '("flush-events" "GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS" "1 << 0")
    '("before-paint" "GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT" "1 << 1")
    '("update" "GDK_FRAME_CLOCK_PHASE_UPDATE" "1 << 2")
    '("layout" "GDK_FRAME_CLOCK_PHASE_LAYOUT" "1 << 3")
    '("paint" "GDK_FRAME_CLOCK_PHASE_PAINT" "1 << 4")
    '("resume-events" "GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS" "1 << 5")
    '("after-paint" "GDK_FRAME_CLOCK_PHASE_AFTER_PAINT" "1 << 6")
  )
)

;; From gdkglcontext.h

;; Original typedef:
;; typedef enum { /*< underscore_name=GDK_GL_API >*/
;;   GDK_GL_API_GL   = 1 << 0,
;;   GDK_GL_API_GLES = 1 << 1
;; } GdkGLAPI;

(define-flags-extended GLAPI
  (in-module "Gdk")
  (c-name "GdkGLAPI")
  (values
    '("gl" "GDK_GL_API_GL" "1 << 0")
    '("gles" "GDK_GL_API_GLES" "1 << 1")
  )
)

;; From gdkmonitor.h

;; Original typedef:
;; typedef enum {
;;   GDK_SUBPIXEL_LAYOUT_UNKNOWN,
;;   GDK_SUBPIXEL_LAYOUT_NONE,
;;   GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB,
;;   GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR,
;;   GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB,
;;   GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR
;; } GdkSubpixelLayout;

(define-enum-extended SubpixelLayout
  (in-module "Gdk")
  (c-name "GdkSubpixelLayout")
  (values
    '("unknown" "GDK_SUBPIXEL_LAYOUT_UNKNOWN" "0")
    '("none" "GDK_SUBPIXEL_LAYOUT_NONE" "1")
    '("horizontal-rgb" "GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB" "2")
    '("horizontal-bgr" "GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR" "3")
    '("vertical-rgb" "GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB" "4")
    '("vertical-bgr" "GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR" "5")
  )
)

;; From gdkpaintable.h

;; Original typedef:
;; typedef enum {
;;   GDK_PAINTABLE_STATIC_SIZE = 1 << 0,
;;   GDK_PAINTABLE_STATIC_CONTENTS = 1 << 1
;; } GdkPaintableFlags;

(define-flags-extended PaintableFlags
  (in-module "Gdk")
  (c-name "GdkPaintableFlags")
  (values
    '("size" "GDK_PAINTABLE_STATIC_SIZE" "1 << 0")
    '("contents" "GDK_PAINTABLE_STATIC_CONTENTS" "1 << 1")
  )
)

;; From gdkpopuplayout.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_ANCHOR_FLIP_X   = 1 << 0,
;;   GDK_ANCHOR_FLIP_Y   = 1 << 1,
;;   GDK_ANCHOR_SLIDE_X  = 1 << 2,
;;   GDK_ANCHOR_SLIDE_Y  = 1 << 3,
;;   GDK_ANCHOR_RESIZE_X = 1 << 4,
;;   GDK_ANCHOR_RESIZE_Y = 1 << 5,
;;   GDK_ANCHOR_FLIP     = GDK_ANCHOR_FLIP_X | GDK_ANCHOR_FLIP_Y,
;;   GDK_ANCHOR_SLIDE    = GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_SLIDE_Y,
;;   GDK_ANCHOR_RESIZE   = GDK_ANCHOR_RESIZE_X | GDK_ANCHOR_RESIZE_Y,
;; } GdkAnchorHints;

(define-flags-extended AnchorHints
  (in-module "Gdk")
  (c-name "GdkAnchorHints")
  (values
    '("flip-x" "GDK_ANCHOR_FLIP_X" "1 << 0")
    '("flip-y" "GDK_ANCHOR_FLIP_Y" "1 << 1")
    '("slide-x" "GDK_ANCHOR_SLIDE_X" "1 << 2")
    '("slide-y" "GDK_ANCHOR_SLIDE_Y" "1 << 3")
    '("resize-x" "GDK_ANCHOR_RESIZE_X" "1 << 4")
    '("resize-y" "GDK_ANCHOR_RESIZE_Y" "1 << 5")
    '("flip" "GDK_ANCHOR_FLIP" "0x3")
    '("slide" "GDK_ANCHOR_SLIDE" "0xC")
    '("resize" "GDK_ANCHOR_RESIZE" "0x30")
  )
)

;; From gdkseat.h

;; Original typedef:
;; typedef enum {
;;   GDK_SEAT_CAPABILITY_NONE          = 0,
;;   GDK_SEAT_CAPABILITY_POINTER       = 1 << 0,
;;   GDK_SEAT_CAPABILITY_TOUCH         = 1 << 1,
;;   GDK_SEAT_CAPABILITY_TABLET_STYLUS = 1 << 2,
;;   GDK_SEAT_CAPABILITY_KEYBOARD      = 1 << 3,
;;   GDK_SEAT_CAPABILITY_TABLET_PAD    = 1 << 4,
;;   GDK_SEAT_CAPABILITY_ALL_POINTING  = (GDK_SEAT_CAPABILITY_POINTER | GDK_SEAT_CAPABILITY_TOUCH | GDK_SEAT_CAPABILITY_TABLET_STYLUS),
;;   GDK_SEAT_CAPABILITY_ALL           = (GDK_SEAT_CAPABILITY_ALL_POINTING | GDK_SEAT_CAPABILITY_KEYBOARD)
;; } GdkSeatCapabilities;

(define-flags-extended SeatCapabilities
  (in-module "Gdk")
  (c-name "GdkSeatCapabilities")
  (values
    '("none" "GDK_SEAT_CAPABILITY_NONE" "0x0")
    '("pointer" "GDK_SEAT_CAPABILITY_POINTER" "1 << 0")
    '("touch" "GDK_SEAT_CAPABILITY_TOUCH" "1 << 1")
    '("tablet-stylus" "GDK_SEAT_CAPABILITY_TABLET_STYLUS" "1 << 2")
    '("keyboard" "GDK_SEAT_CAPABILITY_KEYBOARD" "1 << 3")
    '("tablet-pad" "GDK_SEAT_CAPABILITY_TABLET_PAD" "1 << 4")
    '("all-pointing" "GDK_SEAT_CAPABILITY_ALL_POINTING" "0x7")
    '("all" "GDK_SEAT_CAPABILITY_ALL" "0xF")
  )
)

;; From gdktexture.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_TEXTURE_ERROR_TOO_LARGE,
;;   GDK_TEXTURE_ERROR_CORRUPT_IMAGE,
;;   GDK_TEXTURE_ERROR_UNSUPPORTED_CONTENT,
;;   GDK_TEXTURE_ERROR_UNSUPPORTED_FORMAT,
;; } GdkTextureError;

(define-enum-extended TextureError
  (in-module "Gdk")
  (c-name "GdkTextureError")
  (values
    '("too-large" "GDK_TEXTURE_ERROR_TOO_LARGE" "0")
    '("corrupt-image" "GDK_TEXTURE_ERROR_CORRUPT_IMAGE" "1")
    '("unsupported-content" "GDK_TEXTURE_ERROR_UNSUPPORTED_CONTENT" "2")
    '("unsupported-format" "GDK_TEXTURE_ERROR_UNSUPPORTED_FORMAT" "3")
  )
)

;; From gdktoplevel.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_SURFACE_EDGE_NORTH_WEST,
;;   GDK_SURFACE_EDGE_NORTH,
;;   GDK_SURFACE_EDGE_NORTH_EAST,
;;   GDK_SURFACE_EDGE_WEST,
;;   GDK_SURFACE_EDGE_EAST,
;;   GDK_SURFACE_EDGE_SOUTH_WEST,
;;   GDK_SURFACE_EDGE_SOUTH,
;;   GDK_SURFACE_EDGE_SOUTH_EAST
;; } GdkSurfaceEdge;

(define-enum-extended SurfaceEdge
  (in-module "Gdk")
  (c-name "GdkSurfaceEdge")
  (values
    '("north-west" "GDK_SURFACE_EDGE_NORTH_WEST" "0")
    '("north" "GDK_SURFACE_EDGE_NORTH" "1")
    '("north-east" "GDK_SURFACE_EDGE_NORTH_EAST" "2")
    '("west" "GDK_SURFACE_EDGE_WEST" "3")
    '("east" "GDK_SURFACE_EDGE_EAST" "4")
    '("south-west" "GDK_SURFACE_EDGE_SOUTH_WEST" "5")
    '("south" "GDK_SURFACE_EDGE_SOUTH" "6")
    '("south-east" "GDK_SURFACE_EDGE_SOUTH_EAST" "7")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_FULLSCREEN_ON_CURRENT_MONITOR,
;;   GDK_FULLSCREEN_ON_ALL_MONITORS
;; } GdkFullscreenMode;

(define-enum-extended FullscreenMode
  (in-module "Gdk")
  (c-name "GdkFullscreenMode")
  (values
    '("current-monitor" "GDK_FULLSCREEN_ON_CURRENT_MONITOR" "0")
    '("all-monitors" "GDK_FULLSCREEN_ON_ALL_MONITORS" "1")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_TOPLEVEL_STATE_MINIMIZED        = 1 << 0,
;;   GDK_TOPLEVEL_STATE_MAXIMIZED        = 1 << 1,
;;   GDK_TOPLEVEL_STATE_STICKY           = 1 << 2,
;;   GDK_TOPLEVEL_STATE_FULLSCREEN       = 1 << 3,
;;   GDK_TOPLEVEL_STATE_ABOVE            = 1 << 4,
;;   GDK_TOPLEVEL_STATE_BELOW            = 1 << 5,
;;   GDK_TOPLEVEL_STATE_FOCUSED          = 1 << 6,
;;   GDK_TOPLEVEL_STATE_TILED            = 1 << 7,
;;   GDK_TOPLEVEL_STATE_TOP_TILED        = 1 << 8,
;;   GDK_TOPLEVEL_STATE_TOP_RESIZABLE    = 1 << 9,
;;   GDK_TOPLEVEL_STATE_RIGHT_TILED      = 1 << 10,
;;   GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE  = 1 << 11,
;;   GDK_TOPLEVEL_STATE_BOTTOM_TILED     = 1 << 12,
;;   GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE = 1 << 13,
;;   GDK_TOPLEVEL_STATE_LEFT_TILED       = 1 << 14,
;;   GDK_TOPLEVEL_STATE_LEFT_RESIZABLE   = 1 << 15
;; } GdkToplevelState;

(define-flags-extended ToplevelState
  (in-module "Gdk")
  (c-name "GdkToplevelState")
  (values
    '("minimized" "GDK_TOPLEVEL_STATE_MINIMIZED" "1 << 0")
    '("maximized" "GDK_TOPLEVEL_STATE_MAXIMIZED" "1 << 1")
    '("sticky" "GDK_TOPLEVEL_STATE_STICKY" "1 << 2")
    '("fullscreen" "GDK_TOPLEVEL_STATE_FULLSCREEN" "1 << 3")
    '("above" "GDK_TOPLEVEL_STATE_ABOVE" "1 << 4")
    '("below" "GDK_TOPLEVEL_STATE_BELOW" "1 << 5")
    '("focused" "GDK_TOPLEVEL_STATE_FOCUSED" "1 << 6")
    '("tiled" "GDK_TOPLEVEL_STATE_TILED" "1 << 7")
    '("top-tiled" "GDK_TOPLEVEL_STATE_TOP_TILED" "1 << 8")
    '("top-resizable" "GDK_TOPLEVEL_STATE_TOP_RESIZABLE" "1 << 9")
    '("right-tiled" "GDK_TOPLEVEL_STATE_RIGHT_TILED" "1 << 10")
    '("right-resizable" "GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE" "1 << 11")
    '("bottom-tiled" "GDK_TOPLEVEL_STATE_BOTTOM_TILED" "1 << 12")
    '("bottom-resizable" "GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE" "1 << 13")
    '("left-tiled" "GDK_TOPLEVEL_STATE_LEFT_TILED" "1 << 14")
    '("left-resizable" "GDK_TOPLEVEL_STATE_LEFT_RESIZABLE" "1 << 15")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_TITLEBAR_GESTURE_DOUBLE_CLICK   = 1,
;;   GDK_TITLEBAR_GESTURE_RIGHT_CLICK    = 2,
;;   GDK_TITLEBAR_GESTURE_MIDDLE_CLICK   = 3
;; } GdkTitlebarGesture;

(define-enum-extended TitlebarGesture
  (in-module "Gdk")
  (c-name "GdkTitlebarGesture")
  (values
    '("double-click" "GDK_TITLEBAR_GESTURE_DOUBLE_CLICK" "1")
    '("right-click" "GDK_TITLEBAR_GESTURE_RIGHT_CLICK" "2")
    '("middle-click" "GDK_TITLEBAR_GESTURE_MIDDLE_CLICK" "3")
  )
)

