;; From gdkcursor.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_X_CURSOR 		  = 0,
;;   GDK_ARROW 		  = 2,
;;   GDK_BASED_ARROW_DOWN    = 4,
;;   GDK_BASED_ARROW_UP 	  = 6,
;;   GDK_BOAT 		  = 8,
;;   GDK_BOGOSITY 		  = 10,
;;   GDK_BOTTOM_LEFT_CORNER  = 12,
;;   GDK_BOTTOM_RIGHT_CORNER = 14,
;;   GDK_BOTTOM_SIDE 	  = 16,
;;   GDK_BOTTOM_TEE 	  = 18,
;;   GDK_BOX_SPIRAL 	  = 20,
;;   GDK_CENTER_PTR 	  = 22,
;;   GDK_CIRCLE 		  = 24,
;;   GDK_CLOCK	 	  = 26,
;;   GDK_COFFEE_MUG 	  = 28,
;;   GDK_CROSS 		  = 30,
;;   GDK_CROSS_REVERSE 	  = 32,
;;   GDK_CROSSHAIR 	  = 34,
;;   GDK_DIAMOND_CROSS 	  = 36,
;;   GDK_DOT 		  = 38,
;;   GDK_DOTBOX 		  = 40,
;;   GDK_DOUBLE_ARROW 	  = 42,
;;   GDK_DRAFT_LARGE 	  = 44,
;;   GDK_DRAFT_SMALL 	  = 46,
;;   GDK_DRAPED_BOX 	  = 48,
;;   GDK_EXCHANGE 		  = 50,
;;   GDK_FLEUR 		  = 52,
;;   GDK_GOBBLER 		  = 54,
;;   GDK_GUMBY 		  = 56,
;;   GDK_HAND1 		  = 58,
;;   GDK_HAND2 		  = 60,
;;   GDK_HEART 		  = 62,
;;   GDK_ICON 		  = 64,
;;   GDK_IRON_CROSS 	  = 66,
;;   GDK_LEFT_PTR 		  = 68,
;;   GDK_LEFT_SIDE 	  = 70,
;;   GDK_LEFT_TEE 		  = 72,
;;   GDK_LEFTBUTTON 	  = 74,
;;   GDK_LL_ANGLE 		  = 76,
;;   GDK_LR_ANGLE 	 	  = 78,
;;   GDK_MAN 		  = 80,
;;   GDK_MIDDLEBUTTON 	  = 82,
;;   GDK_MOUSE 		  = 84,
;;   GDK_PENCIL 		  = 86,
;;   GDK_PIRATE 		  = 88,
;;   GDK_PLUS 		  = 90,
;;   GDK_QUESTION_ARROW 	  = 92,
;;   GDK_RIGHT_PTR 	  = 94,
;;   GDK_RIGHT_SIDE 	  = 96,
;;   GDK_RIGHT_TEE 	  = 98,
;;   GDK_RIGHTBUTTON 	  = 100,
;;   GDK_RTL_LOGO 		  = 102,
;;   GDK_SAILBOAT 		  = 104,
;;   GDK_SB_DOWN_ARROW 	  = 106,
;;   GDK_SB_H_DOUBLE_ARROW   = 108,
;;   GDK_SB_LEFT_ARROW 	  = 110,
;;   GDK_SB_RIGHT_ARROW 	  = 112,
;;   GDK_SB_UP_ARROW 	  = 114,
;;   GDK_SB_V_DOUBLE_ARROW   = 116,
;;   GDK_SHUTTLE 		  = 118,
;;   GDK_SIZING 		  = 120,
;;   GDK_SPIDER		  = 122,
;;   GDK_SPRAYCAN 		  = 124,
;;   GDK_STAR 		  = 126,
;;   GDK_TARGET 		  = 128,
;;   GDK_TCROSS 		  = 130,
;;   GDK_TOP_LEFT_ARROW 	  = 132,
;;   GDK_TOP_LEFT_CORNER 	  = 134,
;;   GDK_TOP_RIGHT_CORNER 	  = 136,
;;   GDK_TOP_SIDE 		  = 138,
;;   GDK_TOP_TEE 		  = 140,
;;   GDK_TREK 		  = 142,
;;   GDK_UL_ANGLE 		  = 144,
;;   GDK_UMBRELLA 		  = 146,
;;   GDK_UR_ANGLE 		  = 148,
;;   GDK_WATCH 		  = 150,
;;   GDK_XTERM 		  = 152,
;;   GDK_LAST_CURSOR,
;;   GDK_BLANK_CURSOR        = -2,
;;   GDK_CURSOR_IS_PIXMAP 	  = -1
;; } GdkCursorType;

(define-enum-extended CursorType
  (in-module "Gdk")
  (c-name "GdkCursorType")
  (values
    '("x-cursor" "GDK_X_CURSOR" "0")
    '("arrow" "GDK_ARROW" "2")
    '("based-arrow-down" "GDK_BASED_ARROW_DOWN" "4")
    '("based-arrow-up" "GDK_BASED_ARROW_UP" "6")
    '("boat" "GDK_BOAT" "8")
    '("bogosity" "GDK_BOGOSITY" "10")
    '("bottom-left-corner" "GDK_BOTTOM_LEFT_CORNER" "12")
    '("bottom-right-corner" "GDK_BOTTOM_RIGHT_CORNER" "14")
    '("bottom-side" "GDK_BOTTOM_SIDE" "16")
    '("bottom-tee" "GDK_BOTTOM_TEE" "18")
    '("box-spiral" "GDK_BOX_SPIRAL" "20")
    '("center-ptr" "GDK_CENTER_PTR" "22")
    '("circle" "GDK_CIRCLE" "24")
    '("clock" "GDK_CLOCK" "26")
    '("coffee-mug" "GDK_COFFEE_MUG" "28")
    '("cross" "GDK_CROSS" "30")
    '("cross-reverse" "GDK_CROSS_REVERSE" "32")
    '("crosshair" "GDK_CROSSHAIR" "34")
    '("diamond-cross" "GDK_DIAMOND_CROSS" "36")
    '("dot" "GDK_DOT" "38")
    '("dotbox" "GDK_DOTBOX" "40")
    '("double-arrow" "GDK_DOUBLE_ARROW" "42")
    '("draft-large" "GDK_DRAFT_LARGE" "44")
    '("draft-small" "GDK_DRAFT_SMALL" "46")
    '("draped-box" "GDK_DRAPED_BOX" "48")
    '("exchange" "GDK_EXCHANGE" "50")
    '("fleur" "GDK_FLEUR" "52")
    '("gobbler" "GDK_GOBBLER" "54")
    '("gumby" "GDK_GUMBY" "56")
    '("hand1" "GDK_HAND1" "58")
    '("hand2" "GDK_HAND2" "60")
    '("heart" "GDK_HEART" "62")
    '("icon" "GDK_ICON" "64")
    '("iron-cross" "GDK_IRON_CROSS" "66")
    '("left-ptr" "GDK_LEFT_PTR" "68")
    '("left-side" "GDK_LEFT_SIDE" "70")
    '("left-tee" "GDK_LEFT_TEE" "72")
    '("leftbutton" "GDK_LEFTBUTTON" "74")
    '("ll-angle" "GDK_LL_ANGLE" "76")
    '("lr-angle" "GDK_LR_ANGLE" "78")
    '("man" "GDK_MAN" "80")
    '("middlebutton" "GDK_MIDDLEBUTTON" "82")
    '("mouse" "GDK_MOUSE" "84")
    '("pencil" "GDK_PENCIL" "86")
    '("pirate" "GDK_PIRATE" "88")
    '("plus" "GDK_PLUS" "90")
    '("question-arrow" "GDK_QUESTION_ARROW" "92")
    '("right-ptr" "GDK_RIGHT_PTR" "94")
    '("right-side" "GDK_RIGHT_SIDE" "96")
    '("right-tee" "GDK_RIGHT_TEE" "98")
    '("rightbutton" "GDK_RIGHTBUTTON" "100")
    '("rtl-logo" "GDK_RTL_LOGO" "102")
    '("sailboat" "GDK_SAILBOAT" "104")
    '("sb-down-arrow" "GDK_SB_DOWN_ARROW" "106")
    '("sb-h-double-arrow" "GDK_SB_H_DOUBLE_ARROW" "108")
    '("sb-left-arrow" "GDK_SB_LEFT_ARROW" "110")
    '("sb-right-arrow" "GDK_SB_RIGHT_ARROW" "112")
    '("sb-up-arrow" "GDK_SB_UP_ARROW" "114")
    '("sb-v-double-arrow" "GDK_SB_V_DOUBLE_ARROW" "116")
    '("shuttle" "GDK_SHUTTLE" "118")
    '("sizing" "GDK_SIZING" "120")
    '("spider" "GDK_SPIDER" "122")
    '("spraycan" "GDK_SPRAYCAN" "124")
    '("star" "GDK_STAR" "126")
    '("target" "GDK_TARGET" "128")
    '("tcross" "GDK_TCROSS" "130")
    '("top-left-arrow" "GDK_TOP_LEFT_ARROW" "132")
    '("top-left-corner" "GDK_TOP_LEFT_CORNER" "134")
    '("top-right-corner" "GDK_TOP_RIGHT_CORNER" "136")
    '("top-side" "GDK_TOP_SIDE" "138")
    '("top-tee" "GDK_TOP_TEE" "140")
    '("trek" "GDK_TREK" "142")
    '("ul-angle" "GDK_UL_ANGLE" "144")
    '("umbrella" "GDK_UMBRELLA" "146")
    '("ur-angle" "GDK_UR_ANGLE" "148")
    '("watch" "GDK_WATCH" "150")
    '("xterm" "GDK_XTERM" "152")
    '("last-cursor" "GDK_LAST_CURSOR" "153")
    '("blank-cursor" "GDK_BLANK_CURSOR" "-2")
    '("cursor-is-pixmap" "GDK_CURSOR_IS_PIXMAP" "-1")
  )
)

;; From gdkdevice.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_SOURCE_MOUSE,
;;   GDK_SOURCE_PEN,
;;   GDK_SOURCE_ERASER,
;;   GDK_SOURCE_CURSOR,
;;   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")
    '("eraser" "GDK_SOURCE_ERASER" "2")
    '("cursor" "GDK_SOURCE_CURSOR" "3")
    '("keyboard" "GDK_SOURCE_KEYBOARD" "4")
    '("touchscreen" "GDK_SOURCE_TOUCHSCREEN" "5")
    '("touchpad" "GDK_SOURCE_TOUCHPAD" "6")
    '("trackpoint" "GDK_SOURCE_TRACKPOINT" "7")
    '("tablet-pad" "GDK_SOURCE_TABLET_PAD" "8")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_MODE_DISABLED,
;;   GDK_MODE_SCREEN,
;;   GDK_MODE_WINDOW
;; } GdkInputMode;

(define-enum-extended InputMode
  (in-module "Gdk")
  (c-name "GdkInputMode")
  (values
    '("disabled" "GDK_MODE_DISABLED" "0")
    '("screen" "GDK_MODE_SCREEN" "1")
    '("window" "GDK_MODE_WINDOW" "2")
  )
)

;; Original typedef:
;; typedef enum {
;;   GDK_DEVICE_TYPE_MASTER,
;;   GDK_DEVICE_TYPE_SLAVE,
;;   GDK_DEVICE_TYPE_FLOATING
;; } GdkDeviceType;

(define-enum-extended DeviceType
  (in-module "Gdk")
  (c-name "GdkDeviceType")
  (values
    '("master" "GDK_DEVICE_TYPE_MASTER" "0")
    '("slave" "GDK_DEVICE_TYPE_SLAVE" "1")
    '("floating" "GDK_DEVICE_TYPE_FLOATING" "2")
  )
)

;; 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 gdkdnd.h

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

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

;; 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")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_DRAG_PROTO_NONE = 0,
;;   GDK_DRAG_PROTO_MOTIF,
;;   GDK_DRAG_PROTO_XDND,
;;   GDK_DRAG_PROTO_ROOTWIN,
;;   GDK_DRAG_PROTO_WIN32_DROPFILES,
;;   GDK_DRAG_PROTO_OLE2,
;;   GDK_DRAG_PROTO_LOCAL,
;;   GDK_DRAG_PROTO_WAYLAND
;; } GdkDragProtocol;

(define-enum-extended DragProtocol
  (in-module "Gdk")
  (c-name "GdkDragProtocol")
  (values
    '("none" "GDK_DRAG_PROTO_NONE" "0")
    '("motif" "GDK_DRAG_PROTO_MOTIF" "1")
    '("xdnd" "GDK_DRAG_PROTO_XDND" "2")
    '("rootwin" "GDK_DRAG_PROTO_ROOTWIN" "3")
    '("win32-dropfiles" "GDK_DRAG_PROTO_WIN32_DROPFILES" "4")
    '("ole2" "GDK_DRAG_PROTO_OLE2" "5")
    '("local" "GDK_DRAG_PROTO_LOCAL" "6")
    '("wayland" "GDK_DRAG_PROTO_WAYLAND" "7")
  )
)

;; From gdkevents.h

;; Original typedef:
;; typedef enum {
;;   GDK_FILTER_CONTINUE,	  /* Event not handled, continue processesing */
;;   GDK_FILTER_TRANSLATE,	  /* Native event translated into a GDK event and
;;                              stored in the "event" structure that was
;;                              passed in */
;;   GDK_FILTER_REMOVE	  /* Terminate processing, removing event */
;; } GdkFilterReturn;

(define-enum-extended FilterReturn
  (in-module "Gdk")
  (c-name "GdkFilterReturn")
  (values
    '("continue" "GDK_FILTER_CONTINUE" "0")
    '("translate" "GDK_FILTER_TRANSLATE" "1")
    '("remove" "GDK_FILTER_REMOVE" "2")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_NOTHING		= -1,
;;   GDK_DELETE		= 0,
;;   GDK_DESTROY		= 1,
;;   GDK_EXPOSE		= 2,
;;   GDK_MOTION_NOTIFY	= 3,
;;   GDK_BUTTON_PRESS	= 4,
;;   GDK_2BUTTON_PRESS	= 5,
;;   GDK_DOUBLE_BUTTON_PRESS = GDK_2BUTTON_PRESS,
;;   GDK_3BUTTON_PRESS	= 6,
;;   GDK_TRIPLE_BUTTON_PRESS = GDK_3BUTTON_PRESS,
;;   GDK_BUTTON_RELEASE	= 7,
;;   GDK_KEY_PRESS		= 8,
;;   GDK_KEY_RELEASE	= 9,
;;   GDK_ENTER_NOTIFY	= 10,
;;   GDK_LEAVE_NOTIFY	= 11,
;;   GDK_FOCUS_CHANGE	= 12,
;;   GDK_CONFIGURE		= 13,
;;   GDK_MAP		= 14,
;;   GDK_UNMAP		= 15,
;;   GDK_PROPERTY_NOTIFY	= 16,
;;   GDK_SELECTION_CLEAR	= 17,
;;   GDK_SELECTION_REQUEST = 18,
;;   GDK_SELECTION_NOTIFY	= 19,
;;   GDK_PROXIMITY_IN	= 20,
;;   GDK_PROXIMITY_OUT	= 21,
;;   GDK_DRAG_ENTER        = 22,
;;   GDK_DRAG_LEAVE        = 23,
;;   GDK_DRAG_MOTION       = 24,
;;   GDK_DRAG_STATUS       = 25,
;;   GDK_DROP_START        = 26,
;;   GDK_DROP_FINISHED     = 27,
;;   GDK_CLIENT_EVENT	= 28,
;;   GDK_VISIBILITY_NOTIFY = 29,
;;   GDK_SCROLL            = 31,
;;   GDK_WINDOW_STATE      = 32,
;;   GDK_SETTING           = 33,
;;   GDK_OWNER_CHANGE      = 34,
;;   GDK_GRAB_BROKEN       = 35,
;;   GDK_DAMAGE            = 36,
;;   GDK_TOUCH_BEGIN       = 37,
;;   GDK_TOUCH_UPDATE      = 38,
;;   GDK_TOUCH_END         = 39,
;;   GDK_TOUCH_CANCEL      = 40,
;;   GDK_TOUCHPAD_SWIPE    = 41,
;;   GDK_TOUCHPAD_PINCH    = 42,
;;   GDK_PAD_BUTTON_PRESS  = 43,
;;   GDK_PAD_BUTTON_RELEASE = 44,
;;   GDK_PAD_RING          = 45,
;;   GDK_PAD_STRIP         = 46,
;;   GDK_PAD_GROUP_MODE    = 47,
;;   GDK_EVENT_LAST        /* helper variable for decls */
;; } GdkEventType;

(define-enum-extended EventType
  (in-module "Gdk")
  (c-name "GdkEventType")
  (values
    '("nothing" "GDK_NOTHING" "-1")
    '("delete" "GDK_DELETE" "0")
    '("destroy" "GDK_DESTROY" "1")
    '("expose" "GDK_EXPOSE" "2")
    '("motion-notify" "GDK_MOTION_NOTIFY" "3")
    '("button-press" "GDK_BUTTON_PRESS" "4")
    '("2button-press" "GDK_2BUTTON_PRESS" "5")
    '("double-button-press" "GDK_DOUBLE_BUTTON_PRESS" "5")
    '("3button-press" "GDK_3BUTTON_PRESS" "6")
    '("triple-button-press" "GDK_TRIPLE_BUTTON_PRESS" "6")
    '("button-release" "GDK_BUTTON_RELEASE" "7")
    '("key-press" "GDK_KEY_PRESS" "8")
    '("key-release" "GDK_KEY_RELEASE" "9")
    '("enter-notify" "GDK_ENTER_NOTIFY" "10")
    '("leave-notify" "GDK_LEAVE_NOTIFY" "11")
    '("focus-change" "GDK_FOCUS_CHANGE" "12")
    '("configure" "GDK_CONFIGURE" "13")
    '("map" "GDK_MAP" "14")
    '("unmap" "GDK_UNMAP" "15")
    '("property-notify" "GDK_PROPERTY_NOTIFY" "16")
    '("selection-clear" "GDK_SELECTION_CLEAR" "17")
    '("selection-request" "GDK_SELECTION_REQUEST" "18")
    '("selection-notify" "GDK_SELECTION_NOTIFY" "19")
    '("proximity-in" "GDK_PROXIMITY_IN" "20")
    '("proximity-out" "GDK_PROXIMITY_OUT" "21")
    '("drag-enter" "GDK_DRAG_ENTER" "22")
    '("drag-leave" "GDK_DRAG_LEAVE" "23")
    '("drag-motion" "GDK_DRAG_MOTION" "24")
    '("drag-status" "GDK_DRAG_STATUS" "25")
    '("drop-start" "GDK_DROP_START" "26")
    '("drop-finished" "GDK_DROP_FINISHED" "27")
    '("client-event" "GDK_CLIENT_EVENT" "28")
    '("visibility-notify" "GDK_VISIBILITY_NOTIFY" "29")
    '("scroll" "GDK_SCROLL" "31")
    '("window-state" "GDK_WINDOW_STATE" "32")
    '("setting" "GDK_SETTING" "33")
    '("owner-change" "GDK_OWNER_CHANGE" "34")
    '("grab-broken" "GDK_GRAB_BROKEN" "35")
    '("damage" "GDK_DAMAGE" "36")
    '("touch-begin" "GDK_TOUCH_BEGIN" "37")
    '("touch-update" "GDK_TOUCH_UPDATE" "38")
    '("touch-end" "GDK_TOUCH_END" "39")
    '("touch-cancel" "GDK_TOUCH_CANCEL" "40")
    '("touchpad-swipe" "GDK_TOUCHPAD_SWIPE" "41")
    '("touchpad-pinch" "GDK_TOUCHPAD_PINCH" "42")
    '("pad-button-press" "GDK_PAD_BUTTON_PRESS" "43")
    '("pad-button-release" "GDK_PAD_BUTTON_RELEASE" "44")
    '("pad-ring" "GDK_PAD_RING" "45")
    '("pad-strip" "GDK_PAD_STRIP" "46")
    '("pad-group-mode" "GDK_PAD_GROUP_MODE" "47")
    '("event-last" "GDK_EVENT_LAST" "48")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_VISIBILITY_UNOBSCURED,
;;   GDK_VISIBILITY_PARTIAL,
;;   GDK_VISIBILITY_FULLY_OBSCURED
;; } GdkVisibilityState;

(define-enum-extended VisibilityState
  (in-module "Gdk")
  (c-name "GdkVisibilityState")
  (values
    '("unobscured" "GDK_VISIBILITY_UNOBSCURED" "0")
    '("partial" "GDK_VISIBILITY_PARTIAL" "1")
    '("fully-obscured" "GDK_VISIBILITY_FULLY_OBSCURED" "2")
  )
)

;; 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_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_PROPERTY_NEW_VALUE,
;;   GDK_PROPERTY_DELETE
;; } GdkPropertyState;

(define-enum-extended PropertyState
  (in-module "Gdk")
  (c-name "GdkPropertyState")
  (values
    '("new-value" "GDK_PROPERTY_NEW_VALUE" "0")
    '("delete" "GDK_PROPERTY_DELETE" "1")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_WINDOW_STATE_WITHDRAWN  = 1 << 0,
;;   GDK_WINDOW_STATE_ICONIFIED  = 1 << 1,
;;   GDK_WINDOW_STATE_MAXIMIZED  = 1 << 2,
;;   GDK_WINDOW_STATE_STICKY     = 1 << 3,
;;   GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
;;   GDK_WINDOW_STATE_ABOVE      = 1 << 5,
;;   GDK_WINDOW_STATE_BELOW      = 1 << 6,
;;   GDK_WINDOW_STATE_FOCUSED    = 1 << 7,
;;   GDK_WINDOW_STATE_TILED      = 1 << 8
;; } GdkWindowState;

(define-flags-extended WindowState
  (in-module "Gdk")
  (c-name "GdkWindowState")
  (values
    '("withdrawn" "GDK_WINDOW_STATE_WITHDRAWN" "1 << 0")
    '("iconified" "GDK_WINDOW_STATE_ICONIFIED" "1 << 1")
    '("maximized" "GDK_WINDOW_STATE_MAXIMIZED" "1 << 2")
    '("sticky" "GDK_WINDOW_STATE_STICKY" "1 << 3")
    '("fullscreen" "GDK_WINDOW_STATE_FULLSCREEN" "1 << 4")
    '("above" "GDK_WINDOW_STATE_ABOVE" "1 << 5")
    '("below" "GDK_WINDOW_STATE_BELOW" "1 << 6")
    '("focused" "GDK_WINDOW_STATE_FOCUSED" "1 << 7")
    '("tiled" "GDK_WINDOW_STATE_TILED" "1 << 8")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_SETTING_ACTION_NEW,
;;   GDK_SETTING_ACTION_CHANGED,
;;   GDK_SETTING_ACTION_DELETED
;; } GdkSettingAction;

(define-enum-extended SettingAction
  (in-module "Gdk")
  (c-name "GdkSettingAction")
  (values
    '("new" "GDK_SETTING_ACTION_NEW" "0")
    '("changed" "GDK_SETTING_ACTION_CHANGED" "1")
    '("deleted" "GDK_SETTING_ACTION_DELETED" "2")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_OWNER_CHANGE_NEW_OWNER,
;;   GDK_OWNER_CHANGE_DESTROY,
;;   GDK_OWNER_CHANGE_CLOSE
;; } GdkOwnerChange;

(define-enum-extended OwnerChange
  (in-module "Gdk")
  (c-name "GdkOwnerChange")
  (values
    '("new-owner" "GDK_OWNER_CHANGE_NEW_OWNER" "0")
    '("destroy" "GDK_OWNER_CHANGE_DESTROY" "1")
    '("close" "GDK_OWNER_CHANGE_CLOSE" "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 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 gdkproperty.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_PROP_MODE_REPLACE,
;;   GDK_PROP_MODE_PREPEND,
;;   GDK_PROP_MODE_APPEND
;; } GdkPropMode;

(define-enum-extended PropMode
  (in-module "Gdk")
  (c-name "GdkPropMode")
  (values
    '("replace" "GDK_PROP_MODE_REPLACE" "0")
    '("prepend" "GDK_PROP_MODE_PREPEND" "1")
    '("append" "GDK_PROP_MODE_APPEND" "2")
  )
)

;; 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_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")
    '("all-pointing" "GDK_SEAT_CAPABILITY_ALL_POINTING" "0x7")
    '("all" "GDK_SEAT_CAPABILITY_ALL" "0xF")
  )
)

;; From gdktypes.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_LSB_FIRST,
;;   GDK_MSB_FIRST
;; } GdkByteOrder;

(define-enum-extended ByteOrder
  (in-module "Gdk")
  (c-name "GdkByteOrder")
  (values
    '("lsb-first" "GDK_LSB_FIRST" "0")
    '("msb-first" "GDK_MSB_FIRST" "1")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_SHIFT_MASK    = 1 << 0,
;;   GDK_LOCK_MASK     = 1 << 1,
;;   GDK_CONTROL_MASK  = 1 << 2,
;;   GDK_MOD1_MASK     = 1 << 3,
;;   GDK_MOD2_MASK     = 1 << 4,
;;   GDK_MOD3_MASK     = 1 << 5,
;;   GDK_MOD4_MASK     = 1 << 6,
;;   GDK_MOD5_MASK     = 1 << 7,
;;   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_MODIFIER_RESERVED_13_MASK  = 1 << 13,
;;   GDK_MODIFIER_RESERVED_14_MASK  = 1 << 14,
;;   GDK_MODIFIER_RESERVED_15_MASK  = 1 << 15,
;;   GDK_MODIFIER_RESERVED_16_MASK  = 1 << 16,
;;   GDK_MODIFIER_RESERVED_17_MASK  = 1 << 17,
;;   GDK_MODIFIER_RESERVED_18_MASK  = 1 << 18,
;;   GDK_MODIFIER_RESERVED_19_MASK  = 1 << 19,
;;   GDK_MODIFIER_RESERVED_20_MASK  = 1 << 20,
;;   GDK_MODIFIER_RESERVED_21_MASK  = 1 << 21,
;;   GDK_MODIFIER_RESERVED_22_MASK  = 1 << 22,
;;   GDK_MODIFIER_RESERVED_23_MASK  = 1 << 23,
;;   GDK_MODIFIER_RESERVED_24_MASK  = 1 << 24,
;;   GDK_MODIFIER_RESERVED_25_MASK  = 1 << 25,
;; 
;;   /* The next few modifiers are used by XKB, so we skip to the end.
;;    * Bits 15 - 25 are currently unused. Bit 29 is used internally.
;;    */
;;   
;;   GDK_SUPER_MASK    = 1 << 26,
;;   GDK_HYPER_MASK    = 1 << 27,
;;   GDK_META_MASK     = 1 << 28,
;;   
;;   GDK_MODIFIER_RESERVED_29_MASK  = 1 << 29,
;; 
;;   GDK_RELEASE_MASK  = 1 << 30,
;; 
;;   /* Combination of GDK_SHIFT_MASK..GDK_BUTTON5_MASK + GDK_SUPER_MASK
;;      + GDK_HYPER_MASK + GDK_META_MASK + GDK_RELEASE_MASK */
;;   GDK_MODIFIER_MASK = 0x5c001fff
;; } 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")
    '("mod1-mask" "GDK_MOD1_MASK" "1 << 3")
    '("mod2-mask" "GDK_MOD2_MASK" "1 << 4")
    '("mod3-mask" "GDK_MOD3_MASK" "1 << 5")
    '("mod4-mask" "GDK_MOD4_MASK" "1 << 6")
    '("mod5-mask" "GDK_MOD5_MASK" "1 << 7")
    '("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")
    '("modifier-reserved-13-mask" "GDK_MODIFIER_RESERVED_13_MASK" "1 << 13")
    '("modifier-reserved-14-mask" "GDK_MODIFIER_RESERVED_14_MASK" "1 << 14")
    '("modifier-reserved-15-mask" "GDK_MODIFIER_RESERVED_15_MASK" "1 << 15")
    '("modifier-reserved-16-mask" "GDK_MODIFIER_RESERVED_16_MASK" "1 << 16")
    '("modifier-reserved-17-mask" "GDK_MODIFIER_RESERVED_17_MASK" "1 << 17")
    '("modifier-reserved-18-mask" "GDK_MODIFIER_RESERVED_18_MASK" "1 << 18")
    '("modifier-reserved-19-mask" "GDK_MODIFIER_RESERVED_19_MASK" "1 << 19")
    '("modifier-reserved-20-mask" "GDK_MODIFIER_RESERVED_20_MASK" "1 << 20")
    '("modifier-reserved-21-mask" "GDK_MODIFIER_RESERVED_21_MASK" "1 << 21")
    '("modifier-reserved-22-mask" "GDK_MODIFIER_RESERVED_22_MASK" "1 << 22")
    '("modifier-reserved-23-mask" "GDK_MODIFIER_RESERVED_23_MASK" "1 << 23")
    '("modifier-reserved-24-mask" "GDK_MODIFIER_RESERVED_24_MASK" "1 << 24")
    '("modifier-reserved-25-mask" "GDK_MODIFIER_RESERVED_25_MASK" "1 << 25")
    '("super-mask" "GDK_SUPER_MASK" "1 << 26")
    '("hyper-mask" "GDK_HYPER_MASK" "1 << 27")
    '("meta-mask" "GDK_META_MASK" "1 << 28")
    '("modifier-reserved-29-mask" "GDK_MODIFIER_RESERVED_29_MASK" "1 << 29")
    '("release-mask" "GDK_RELEASE_MASK" "1 << 30")
    '("modifier-mask" "GDK_MODIFIER_MASK" "0x5c001fff")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR,
;;   GDK_MODIFIER_INTENT_CONTEXT_MENU,
;;   GDK_MODIFIER_INTENT_EXTEND_SELECTION,
;;   GDK_MODIFIER_INTENT_MODIFY_SELECTION,
;;   GDK_MODIFIER_INTENT_NO_TEXT_INPUT,
;;   GDK_MODIFIER_INTENT_SHIFT_GROUP,
;;   GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK,
;; } GdkModifierIntent;

(define-enum-extended ModifierIntent
  (in-module "Gdk")
  (c-name "GdkModifierIntent")
  (values
    '("primary-accelerator" "GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR" "0")
    '("context-menu" "GDK_MODIFIER_INTENT_CONTEXT_MENU" "1")
    '("extend-selection" "GDK_MODIFIER_INTENT_EXTEND_SELECTION" "2")
    '("modify-selection" "GDK_MODIFIER_INTENT_MODIFY_SELECTION" "3")
    '("no-text-input" "GDK_MODIFIER_INTENT_NO_TEXT_INPUT" "4")
    '("shift-group" "GDK_MODIFIER_INTENT_SHIFT_GROUP" "5")
    '("default-mod-mask" "GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK" "6")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_OK          = 0,
;;   GDK_ERROR       = -1,
;;   GDK_ERROR_PARAM = -2,
;;   GDK_ERROR_FILE  = -3,
;;   GDK_ERROR_MEM   = -4
;; } GdkStatus;

(define-enum-extended Status
  (in-module "Gdk")
  (c-name "GdkStatus")
  (values
    '("ok" "GDK_OK" "0")
    '("error" "GDK_ERROR" "-1")
    '("error-param" "GDK_ERROR_PARAM" "-2")
    '("error-file" "GDK_ERROR_FILE" "-3")
    '("error-mem" "GDK_ERROR_MEM" "-4")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_GRAB_SUCCESS         = 0,
;;   GDK_GRAB_ALREADY_GRABBED = 1,
;;   GDK_GRAB_INVALID_TIME    = 2,
;;   GDK_GRAB_NOT_VIEWABLE    = 3,
;;   GDK_GRAB_FROZEN          = 4,
;;   GDK_GRAB_FAILED          = 5
;; } GdkGrabStatus;

(define-enum-extended GrabStatus
  (in-module "Gdk")
  (c-name "GdkGrabStatus")
  (values
    '("success" "GDK_GRAB_SUCCESS" "0")
    '("already-grabbed" "GDK_GRAB_ALREADY_GRABBED" "1")
    '("invalid-time" "GDK_GRAB_INVALID_TIME" "2")
    '("not-viewable" "GDK_GRAB_NOT_VIEWABLE" "3")
    '("frozen" "GDK_GRAB_FROZEN" "4")
    '("failed" "GDK_GRAB_FAILED" "5")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_OWNERSHIP_NONE,
;;   GDK_OWNERSHIP_WINDOW,
;;   GDK_OWNERSHIP_APPLICATION
;; } GdkGrabOwnership;

(define-enum-extended GrabOwnership
  (in-module "Gdk")
  (c-name "GdkGrabOwnership")
  (values
    '("none" "GDK_OWNERSHIP_NONE" "0")
    '("window" "GDK_OWNERSHIP_WINDOW" "1")
    '("application" "GDK_OWNERSHIP_APPLICATION" "2")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_EXPOSURE_MASK             = 1 << 1,
;;   GDK_POINTER_MOTION_MASK       = 1 << 2,
;;   GDK_POINTER_MOTION_HINT_MASK  = 1 << 3,
;;   GDK_BUTTON_MOTION_MASK        = 1 << 4,
;;   GDK_BUTTON1_MOTION_MASK       = 1 << 5,
;;   GDK_BUTTON2_MOTION_MASK       = 1 << 6,
;;   GDK_BUTTON3_MOTION_MASK       = 1 << 7,
;;   GDK_BUTTON_PRESS_MASK         = 1 << 8,
;;   GDK_BUTTON_RELEASE_MASK       = 1 << 9,
;;   GDK_KEY_PRESS_MASK            = 1 << 10,
;;   GDK_KEY_RELEASE_MASK          = 1 << 11,
;;   GDK_ENTER_NOTIFY_MASK         = 1 << 12,
;;   GDK_LEAVE_NOTIFY_MASK         = 1 << 13,
;;   GDK_FOCUS_CHANGE_MASK         = 1 << 14,
;;   GDK_STRUCTURE_MASK            = 1 << 15,
;;   GDK_PROPERTY_CHANGE_MASK      = 1 << 16,
;;   GDK_VISIBILITY_NOTIFY_MASK    = 1 << 17,
;;   GDK_PROXIMITY_IN_MASK         = 1 << 18,
;;   GDK_PROXIMITY_OUT_MASK        = 1 << 19,
;;   GDK_SUBSTRUCTURE_MASK         = 1 << 20,
;;   GDK_SCROLL_MASK               = 1 << 21,
;;   GDK_TOUCH_MASK                = 1 << 22,
;;   GDK_SMOOTH_SCROLL_MASK        = 1 << 23,
;;   GDK_TOUCHPAD_GESTURE_MASK     = 1 << 24,
;;   GDK_TABLET_PAD_MASK           = 1 << 25,
;;   GDK_ALL_EVENTS_MASK           = 0xFFFFFE
;; } GdkEventMask;

(define-flags-extended EventMask
  (in-module "Gdk")
  (c-name "GdkEventMask")
  (values
    '("exposure-mask" "GDK_EXPOSURE_MASK" "1 << 1")
    '("pointer-motion-mask" "GDK_POINTER_MOTION_MASK" "1 << 2")
    '("pointer-motion-hint-mask" "GDK_POINTER_MOTION_HINT_MASK" "1 << 3")
    '("button-motion-mask" "GDK_BUTTON_MOTION_MASK" "1 << 4")
    '("button1-motion-mask" "GDK_BUTTON1_MOTION_MASK" "1 << 5")
    '("button2-motion-mask" "GDK_BUTTON2_MOTION_MASK" "1 << 6")
    '("button3-motion-mask" "GDK_BUTTON3_MOTION_MASK" "1 << 7")
    '("button-press-mask" "GDK_BUTTON_PRESS_MASK" "1 << 8")
    '("button-release-mask" "GDK_BUTTON_RELEASE_MASK" "1 << 9")
    '("key-press-mask" "GDK_KEY_PRESS_MASK" "1 << 10")
    '("key-release-mask" "GDK_KEY_RELEASE_MASK" "1 << 11")
    '("enter-notify-mask" "GDK_ENTER_NOTIFY_MASK" "1 << 12")
    '("leave-notify-mask" "GDK_LEAVE_NOTIFY_MASK" "1 << 13")
    '("focus-change-mask" "GDK_FOCUS_CHANGE_MASK" "1 << 14")
    '("structure-mask" "GDK_STRUCTURE_MASK" "1 << 15")
    '("property-change-mask" "GDK_PROPERTY_CHANGE_MASK" "1 << 16")
    '("visibility-notify-mask" "GDK_VISIBILITY_NOTIFY_MASK" "1 << 17")
    '("proximity-in-mask" "GDK_PROXIMITY_IN_MASK" "1 << 18")
    '("proximity-out-mask" "GDK_PROXIMITY_OUT_MASK" "1 << 19")
    '("substructure-mask" "GDK_SUBSTRUCTURE_MASK" "1 << 20")
    '("scroll-mask" "GDK_SCROLL_MASK" "1 << 21")
    '("touch-mask" "GDK_TOUCH_MASK" "1 << 22")
    '("smooth-scroll-mask" "GDK_SMOOTH_SCROLL_MASK" "1 << 23")
    '("touchpad-gesture-mask" "GDK_TOUCHPAD_GESTURE_MASK" "1 << 24")
    '("tablet-pad-mask" "GDK_TABLET_PAD_MASK" "1 << 25")
    '("all-events-mask" "GDK_ALL_EVENTS_MASK" "0xFFFFFE")
  )
)

;; 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_WINDOW_TYPE_HINT_NORMAL,
;;   GDK_WINDOW_TYPE_HINT_DIALOG,
;;   GDK_WINDOW_TYPE_HINT_MENU,		/* Torn off menu */
;;   GDK_WINDOW_TYPE_HINT_TOOLBAR,
;;   GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
;;   GDK_WINDOW_TYPE_HINT_UTILITY,
;;   GDK_WINDOW_TYPE_HINT_DOCK,
;;   GDK_WINDOW_TYPE_HINT_DESKTOP,
;;   GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU,	/* A drop down menu (from a menubar) */
;;   GDK_WINDOW_TYPE_HINT_POPUP_MENU,	/* A popup menu (from right-click) */
;;   GDK_WINDOW_TYPE_HINT_TOOLTIP,
;;   GDK_WINDOW_TYPE_HINT_NOTIFICATION,
;;   GDK_WINDOW_TYPE_HINT_COMBO,
;;   GDK_WINDOW_TYPE_HINT_DND
;; } GdkWindowTypeHint;

(define-enum-extended WindowTypeHint
  (in-module "Gdk")
  (c-name "GdkWindowTypeHint")
  (values
    '("normal" "GDK_WINDOW_TYPE_HINT_NORMAL" "0")
    '("dialog" "GDK_WINDOW_TYPE_HINT_DIALOG" "1")
    '("menu" "GDK_WINDOW_TYPE_HINT_MENU" "2")
    '("toolbar" "GDK_WINDOW_TYPE_HINT_TOOLBAR" "3")
    '("splashscreen" "GDK_WINDOW_TYPE_HINT_SPLASHSCREEN" "4")
    '("utility" "GDK_WINDOW_TYPE_HINT_UTILITY" "5")
    '("dock" "GDK_WINDOW_TYPE_HINT_DOCK" "6")
    '("desktop" "GDK_WINDOW_TYPE_HINT_DESKTOP" "7")
    '("dropdown-menu" "GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU" "8")
    '("popup-menu" "GDK_WINDOW_TYPE_HINT_POPUP_MENU" "9")
    '("tooltip" "GDK_WINDOW_TYPE_HINT_TOOLTIP" "10")
    '("notification" "GDK_WINDOW_TYPE_HINT_NOTIFICATION" "11")
    '("combo" "GDK_WINDOW_TYPE_HINT_COMBO" "12")
    '("dnd" "GDK_WINDOW_TYPE_HINT_DND" "13")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_AXIS_IGNORE,
;;   GDK_AXIS_X,
;;   GDK_AXIS_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")
    '("pressure" "GDK_AXIS_PRESSURE" "3")
    '("xtilt" "GDK_AXIS_XTILT" "4")
    '("ytilt" "GDK_AXIS_YTILT" "5")
    '("wheel" "GDK_AXIS_WHEEL" "6")
    '("distance" "GDK_AXIS_DISTANCE" "7")
    '("rotation" "GDK_AXIS_ROTATION" "8")
    '("slider" "GDK_AXIS_SLIDER" "9")
    '("last" "GDK_AXIS_LAST" "10")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_AXIS_FLAG_X        = 1 << GDK_AXIS_X,
;;   GDK_AXIS_FLAG_Y        = 1 << GDK_AXIS_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" "1 << GDK_AXIS_X")
    '("y" "GDK_AXIS_FLAG_Y" "1 << GDK_AXIS_Y")
    '("pressure" "GDK_AXIS_FLAG_PRESSURE" "1 << GDK_AXIS_PRESSURE")
    '("xtilt" "GDK_AXIS_FLAG_XTILT" "1 << GDK_AXIS_XTILT")
    '("ytilt" "GDK_AXIS_FLAG_YTILT" "1 << GDK_AXIS_YTILT")
    '("wheel" "GDK_AXIS_FLAG_WHEEL" "1 << GDK_AXIS_WHEEL")
    '("distance" "GDK_AXIS_FLAG_DISTANCE" "1 << GDK_AXIS_DISTANCE")
    '("rotation" "GDK_AXIS_FLAG_ROTATION" "1 << GDK_AXIS_ROTATION")
    '("slider" "GDK_AXIS_FLAG_SLIDER" "1 << GDK_AXIS_SLIDER")
  )
)

;; From gdkvisual.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_VISUAL_STATIC_GRAY,
;;   GDK_VISUAL_GRAYSCALE,
;;   GDK_VISUAL_STATIC_COLOR,
;;   GDK_VISUAL_PSEUDO_COLOR,
;;   GDK_VISUAL_TRUE_COLOR,
;;   GDK_VISUAL_DIRECT_COLOR
;; } GdkVisualType;

(define-enum-extended VisualType
  (in-module "Gdk")
  (c-name "GdkVisualType")
  (values
    '("static-gray" "GDK_VISUAL_STATIC_GRAY" "0")
    '("grayscale" "GDK_VISUAL_GRAYSCALE" "1")
    '("static-color" "GDK_VISUAL_STATIC_COLOR" "2")
    '("pseudo-color" "GDK_VISUAL_PSEUDO_COLOR" "3")
    '("true-color" "GDK_VISUAL_TRUE_COLOR" "4")
    '("direct-color" "GDK_VISUAL_DIRECT_COLOR" "5")
  )
)

;; From gdkwindow.h

;; Original typedef:
;; typedef enum
;; {
;;   GDK_INPUT_OUTPUT, /*< nick=input-output >*/
;;   GDK_INPUT_ONLY    /*< nick=input-only >*/
;; } GdkWindowWindowClass;

(define-enum-extended WindowWindowClass
  (in-module "Gdk")
  (c-name "GdkWindowWindowClass")
  (values
    '("output" "GDK_INPUT_OUTPUT" "0")
    '("only" "GDK_INPUT_ONLY" "1")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_WINDOW_ROOT,
;;   GDK_WINDOW_TOPLEVEL,
;;   GDK_WINDOW_CHILD,
;;   GDK_WINDOW_TEMP,
;;   GDK_WINDOW_FOREIGN,
;;   GDK_WINDOW_SUBSURFACE
;; } GdkWindowType;

(define-enum-extended WindowType
  (in-module "Gdk")
  (c-name "GdkWindowType")
  (values
    '("root" "GDK_WINDOW_ROOT" "0")
    '("toplevel" "GDK_WINDOW_TOPLEVEL" "1")
    '("child" "GDK_WINDOW_CHILD" "2")
    '("temp" "GDK_WINDOW_TEMP" "3")
    '("foreign" "GDK_WINDOW_FOREIGN" "4")
    '("subsurface" "GDK_WINDOW_SUBSURFACE" "5")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_HINT_POS	       = 1 << 0,
;;   GDK_HINT_MIN_SIZE    = 1 << 1,
;;   GDK_HINT_MAX_SIZE    = 1 << 2,
;;   GDK_HINT_BASE_SIZE   = 1 << 3,
;;   GDK_HINT_ASPECT      = 1 << 4,
;;   GDK_HINT_RESIZE_INC  = 1 << 5,
;;   GDK_HINT_WIN_GRAVITY = 1 << 6,
;;   GDK_HINT_USER_POS    = 1 << 7,
;;   GDK_HINT_USER_SIZE   = 1 << 8
;; } GdkWindowHints;

(define-flags-extended WindowHints
  (in-module "Gdk")
  (c-name "GdkWindowHints")
  (values
    '("pos" "GDK_HINT_POS" "1 << 0")
    '("min-size" "GDK_HINT_MIN_SIZE" "1 << 1")
    '("max-size" "GDK_HINT_MAX_SIZE" "1 << 2")
    '("base-size" "GDK_HINT_BASE_SIZE" "1 << 3")
    '("aspect" "GDK_HINT_ASPECT" "1 << 4")
    '("resize-inc" "GDK_HINT_RESIZE_INC" "1 << 5")
    '("win-gravity" "GDK_HINT_WIN_GRAVITY" "1 << 6")
    '("user-pos" "GDK_HINT_USER_POS" "1 << 7")
    '("user-size" "GDK_HINT_USER_SIZE" "1 << 8")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_DECOR_ALL		= 1 << 0,
;;   GDK_DECOR_BORDER	= 1 << 1,
;;   GDK_DECOR_RESIZEH	= 1 << 2,
;;   GDK_DECOR_TITLE	= 1 << 3,
;;   GDK_DECOR_MENU	= 1 << 4,
;;   GDK_DECOR_MINIMIZE	= 1 << 5,
;;   GDK_DECOR_MAXIMIZE	= 1 << 6
;; } GdkWMDecoration;

(define-flags-extended WMDecoration
  (in-module "Gdk")
  (c-name "GdkWMDecoration")
  (values
    '("all" "GDK_DECOR_ALL" "1 << 0")
    '("border" "GDK_DECOR_BORDER" "1 << 1")
    '("resizeh" "GDK_DECOR_RESIZEH" "1 << 2")
    '("title" "GDK_DECOR_TITLE" "1 << 3")
    '("menu" "GDK_DECOR_MENU" "1 << 4")
    '("minimize" "GDK_DECOR_MINIMIZE" "1 << 5")
    '("maximize" "GDK_DECOR_MAXIMIZE" "1 << 6")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_FUNC_ALL		= 1 << 0,
;;   GDK_FUNC_RESIZE	= 1 << 1,
;;   GDK_FUNC_MOVE		= 1 << 2,
;;   GDK_FUNC_MINIMIZE	= 1 << 3,
;;   GDK_FUNC_MAXIMIZE	= 1 << 4,
;;   GDK_FUNC_CLOSE	= 1 << 5
;; } GdkWMFunction;

(define-flags-extended WMFunction
  (in-module "Gdk")
  (c-name "GdkWMFunction")
  (values
    '("all" "GDK_FUNC_ALL" "1 << 0")
    '("resize" "GDK_FUNC_RESIZE" "1 << 1")
    '("move" "GDK_FUNC_MOVE" "1 << 2")
    '("minimize" "GDK_FUNC_MINIMIZE" "1 << 3")
    '("maximize" "GDK_FUNC_MAXIMIZE" "1 << 4")
    '("close" "GDK_FUNC_CLOSE" "1 << 5")
  )
)

;; 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_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")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   GDK_WINDOW_EDGE_NORTH_WEST,
;;   GDK_WINDOW_EDGE_NORTH,
;;   GDK_WINDOW_EDGE_NORTH_EAST,
;;   GDK_WINDOW_EDGE_WEST,
;;   GDK_WINDOW_EDGE_EAST,
;;   GDK_WINDOW_EDGE_SOUTH_WEST,
;;   GDK_WINDOW_EDGE_SOUTH,
;;   GDK_WINDOW_EDGE_SOUTH_EAST  
;; } GdkWindowEdge;

(define-enum-extended WindowEdge
  (in-module "Gdk")
  (c-name "GdkWindowEdge")
  (values
    '("north-west" "GDK_WINDOW_EDGE_NORTH_WEST" "0")
    '("north" "GDK_WINDOW_EDGE_NORTH" "1")
    '("north-east" "GDK_WINDOW_EDGE_NORTH_EAST" "2")
    '("west" "GDK_WINDOW_EDGE_WEST" "3")
    '("east" "GDK_WINDOW_EDGE_EAST" "4")
    '("south-west" "GDK_WINDOW_EDGE_SOUTH_WEST" "5")
    '("south" "GDK_WINDOW_EDGE_SOUTH" "6")
    '("south-east" "GDK_WINDOW_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")
  )
)

