sig
  type color
  type rgba
  type visual
  type screen = [ `gdkscreen ] Gobject.obj
  type region
  type gc
  type window = [ `gdkwindow ] Gobject.obj
  type cairo
  type atom
  type keysym = int
  type +'a event
  type drag_context = [ `dragcontext ] Gobject.obj
  type cursor
  type xid = int32
  type native_window
  type device
  type display
  exception Error of string
  module Tags :
    sig
      type event_type =
          [ `BUTTON_PRESS
          | `BUTTON_RELEASE
          | `CLIENT_EVENT
          | `CONFIGURE
          | `DAMAGE
          | `DELETE
          | `DESTROY
          | `DRAG_ENTER
          | `DRAG_LEAVE
          | `DRAG_MOTION
          | `DRAG_STATUS
          | `DROP_FINISHED
          | `DROP_START
          | `ENTER_NOTIFY
          | `EXPOSE
          | `FOCUS_CHANGE
          | `GRAB_BROKEN
          | `KEY_PRESS
          | `KEY_RELEASE
          | `LEAVE_NOTIFY
          | `MAP
          | `MOTION_NOTIFY
          | `NOTHING
          | `OWNER_CHANGE
          | `PROPERTY_NOTIFY
          | `PROXIMITY_IN
          | `PROXIMITY_OUT
          | `SCROLL
          | `SELECTION_CLEAR
          | `SELECTION_NOTIFY
          | `SELECTION_REQUEST
          | `SETTING
          | `THREE_BUTTON_PRESS
          | `TOUCHPAD_PINCH
          | `TOUCHPAD_SWIPE
          | `TOUCH_BEGIN
          | `TOUCH_CANCEL
          | `TOUCH_END
          | `TOUCH_UPDATE
          | `TWO_BUTTON_PRESS
          | `UNMAP
          | `VISIBILITY_NOTIFY
          | `WINDOW_STATE ]
      type visibility_state = [ `FULLY_OBSCURED | `PARTIAL | `UNOBSCURED ]
      type touchpad_gesture_phase = [ `BEGIN | `CANCEL | `END | `UPDATE ]
      type scroll_direction = [ `DOWN | `LEFT | `RIGHT | `SMOOTH | `UP ]
      type crossing_mode =
          [ `DEVICE_SWITCH
          | `GRAB
          | `GTK_GRAB
          | `GTK_UNGRAB
          | `NORMAL
          | `STATE_CHANGED
          | `TOUCH_BEGIN
          | `TOUCH_END
          | `UNGRAB ]
      type notify_type =
          [ `ANCESTOR
          | `INFERIOR
          | `NONLINEAR
          | `NONLINEAR_VIRTUAL
          | `UNKNOWN
          | `VIRTUAL ]
      type setting_action = [ `CHANGED | `DELETED | `NEW ]
      type owner_change = [ `CLOSE | `DESTROY | `NEW_OWNER ]
      type window_state =
          [ `ABOVE
          | `BELOW
          | `FOCUSED
          | `FULLSCREEN
          | `ICONIFIED
          | `MAXIMIZED
          | `STICKY
          | `TILED
          | `WITHDRAWN ]
      type input_source =
          [ `CURSOR
          | `ERASER
          | `KEYBOARD
          | `MOUSE
          | `PEN
          | `TOUCHPAD
          | `TOUCHSCREEN ]
      type input_mode = [ `DISABLED | `SCREEN | `WINDOW ]
      type device_type = [ `FLOATING | `MASTER | `SLAVE ]
      type visual_type =
          [ `DIRECT_COLOR
          | `GRAYSCALE
          | `PSEUDO_COLOR
          | `STATIC_COLOR
          | `STATIC_GRAY
          | `TRUE_COLOR ]
      type drag_action =
          [ `ASK | `COPY | `DEFAULT | `LINK | `MOVE | `PRIVATE ]
      type drag_protocol =
          [ `LOCAL
          | `MOTIF
          | `NONE
          | `OLE2
          | `ROOTWIN
          | `WAYLAND
          | `WIN32_DROPFILES
          | `XDND ]
      type property_state = [ `DELETE | `NEW_VALUE ]
      type xdata =
          [ `BYTES of string | `INT32S of int32 array | `SHORTS of int array ]
      type xdata_ret =
          [ `BYTES of string
          | `INT32S of int32 array
          | `NONE
          | `SHORTS of int array ]
      type property_mode = [ `APPEND | `PREPEND | `REPLACE ]
      type window_class = [ `INPUT_ONLY | `INPUT_OUTPUT ]
      type window_type =
          [ `CHILD
          | `FOREIGN
          | `OFFSCREEN
          | `ROOT
          | `SUBSURFACE
          | `TEMP
          | `TOPLEVEL ]
      type window_attributes_type =
          [ `CURSOR
          | `NOREDIR
          | `TITLE
          | `TYPE_HINT
          | `VISUAL
          | `WMCLASS
          | `X
          | `Y ]
      type window_hints =
          [ `ASPECT
          | `BASE_SIZE
          | `MAX_SIZE
          | `MIN_SIZE
          | `POS
          | `RESIZE_INC
          | `USER_POS
          | `USER_SIZE
          | `WIN_GRAVITY ]
      type wm_decoration =
          [ `ALL
          | `BORDER
          | `MAXIMIZE
          | `MENU
          | `MINIMIZE
          | `RESIZEH
          | `TITLE ]
      type wm_function =
          [ `ALL | `CLOSE | `MAXIMIZE | `MINIMIZE | `MOVE | `RESIZE ]
      type gravity =
          [ `CENTER
          | `EAST
          | `NORTH
          | `NORTH_EAST
          | `NORTH_WEST
          | `SOUTH
          | `SOUTH_EAST
          | `SOUTH_WEST
          | `STATIC
          | `WEST ]
      type window_edge =
          [ `EAST
          | `NORTH
          | `NORTH_EAST
          | `NORTH_WEST
          | `SOUTH
          | `SOUTH_EAST
          | `SOUTH_WEST
          | `WEST ]
      type fullscreen_mode = [ `ON_ALL_MONITORS | `ON_CURRENT_MONITOR ]
      type modifier =
          [ `BUTTON1
          | `BUTTON2
          | `BUTTON3
          | `BUTTON4
          | `BUTTON5
          | `CONTROL
          | `HYPER
          | `LOCK
          | `META
          | `MOD1
          | `MOD2
          | `MOD3
          | `MOD4
          | `MOD5
          | `RELEASE
          | `SHIFT
          | `SUPER ]
      type modifier_intent =
          [ `CONTEXT_MENU
          | `DEFAULT_MOD_MASK
          | `EXTEND_SELECTION
          | `MODIFY_SELECTION
          | `NO_TEXT_INPUT
          | `PRIMARY_ACCELERATOR
          | `SHIFT_GROUP ]
      type status =
          [ `ERROR | `ERROR_FILE | `ERROR_MEM | `ERROR_PARAM | `OK ]
      type grab_status =
          [ `ALREADY_GRABBED
          | `FAILED
          | `FROZEN
          | `INVALID_TIME
          | `NOT_VIEWABLE
          | `SUCCESS ]
      type grab_ownership = [ `APPLICATION | `NONE | `WINDOW ]
      type event_mask =
          [ `ALL_EVENTS
          | `BUTTON1_MOTION
          | `BUTTON2_MOTION
          | `BUTTON3_MOTION
          | `BUTTON_MOTION
          | `BUTTON_PRESS
          | `BUTTON_RELEASE
          | `ENTER_NOTIFY
          | `EXPOSURE
          | `FOCUS_CHANGE
          | `KEY_PRESS
          | `KEY_RELEASE
          | `LEAVE_NOTIFY
          | `POINTER_MOTION
          | `POINTER_MOTION_HINT
          | `PROPERTY_CHANGE
          | `PROXIMITY_IN
          | `PROXIMITY_OUT
          | `SCROLL
          | `SMOOTH_SCROLL
          | `STRUCTURE
          | `SUBSTRUCTURE
          | `TOUCH
          | `TOUCHPAD_GESTURE
          | `VISIBILITY_NOTIFY ]
      type gl_error =
          [ `NOT_AVAILABLE | `UNSUPPORTED_FORMAT | `UNSUPPORTED_PROFILE ]
      type window_type_hint =
          [ `COMBO
          | `DESKTOP
          | `DIALOG
          | `DND
          | `DOCK
          | `DROPDOWN_MENU
          | `MENU
          | `NORMAL
          | `NOTIFICATION
          | `POPUP_MENU
          | `SPLASHSCREEN
          | `TOOLBAR
          | `TOOLTIP
          | `UTILITY ]
      type axis_use =
          [ `IGNORE | `LAST | `PRESSURE | `WHEEL | `X | `XTILT | `Y | `YTILT ]
    end
  module Convert :
    sig
      val test_modifier : Gdk.Tags.modifier -> int -> bool
      val modifier : int -> Gdk.Tags.modifier list
      val window_state : int -> Gdk.Tags.window_state list
    end
  module Atom :
    sig
      val intern : ?dont_create:bool -> string -> Gdk.atom
      val name : Gdk.atom -> string
      val none : Gdk.atom
      val primary : Gdk.atom
      val secondary : Gdk.atom
      val clipboard : Gdk.atom
      val string : Gdk.atom
    end
  module Property :
    sig
      val change :
        window:Gdk.window ->
        typ:Gdk.atom ->
        ?mode:Gdk.Tags.property_mode -> Gdk.atom -> Gdk.Tags.xdata -> unit
      val get :
        window:Gdk.window ->
        ?max_length:int ->
        ?delete:bool -> Gdk.atom -> (Gdk.atom * Gdk.Tags.xdata) option
      val delete : window:Gdk.window -> Gdk.atom -> unit
    end
  module Screen :
    sig
      val width : ?screen:Gdk.screen -> unit -> int
      val height : ?screen:Gdk.screen -> unit -> int
      val get_pango_context : ?screen:Gdk.screen -> unit -> Pango.context
      val default : unit -> Gdk.screen
    end
  module Visual :
    sig
      type visual_type =
          [ `DIRECT_COLOR
          | `GRAYSCALE
          | `PSEUDO_COLOR
          | `STATIC_COLOR
          | `STATIC_GRAY
          | `TRUE_COLOR ]
      val get_best :
        ?depth:int -> ?kind:Gdk.Visual.visual_type -> unit -> Gdk.visual
      val get_type : Gdk.visual -> Gdk.Visual.visual_type
      val depth : Gdk.visual -> int
    end
  module Color :
    sig
      val red : Gdk.color -> int
      val blue : Gdk.color -> int
      val green : Gdk.color -> int
      val pixel : Gdk.color -> int
      val color_parse : string -> Gdk.color
      val color_to_string : Gdk.color -> string
    end
  module Rectangle :
    sig
      type t
      val create :
        x:int -> y:int -> width:int -> height:int -> Gdk.Rectangle.t
      val x : Gdk.Rectangle.t -> int
      val y : Gdk.Rectangle.t -> int
      val width : Gdk.Rectangle.t -> int
      val height : Gdk.Rectangle.t -> int
    end
  module Window :
    sig
      val cast : 'Gobject.obj -> Gdk.window
      val create_foreign : Gdk.display -> Gdk.xid -> Gdk.window
      val get_parent : Gdk.window -> Gdk.window
      val get_position : Gdk.window -> int * int
      val get_pointer_location : Gdk.window -> int * int
      val get_xwindow : Gdk.window -> Gdk.xid
      val native_of_xid : Gdk.xid -> Gdk.native_window
      val xid_of_native : Gdk.native_window -> Gdk.xid
      val set_cursor : Gdk.window -> Gdk.cursor -> unit
      val set_transient_for : Gdk.window -> Gdk.window -> unit
      val get_visual : Gdk.window -> Gdk.visual
    end
  module DnD :
    sig
      val drag_status :
        Gdk.drag_context -> Gdk.Tags.drag_action option -> time:int32 -> unit
      val drag_context_suggested_action :
        Gdk.drag_context -> Gdk.Tags.drag_action
      val drag_context_targets : Gdk.drag_context -> Gdk.atom list
    end
  module X : sig val flush : unit -> unit val beep : unit -> unit end
  module Cursor :
    sig
      type cursor_type =
          [ `ARROW
          | `BASED_ARROW_DOWN
          | `BASED_ARROW_UP
          | `BOAT
          | `BOGOSITY
          | `BOTTOM_LEFT_CORNER
          | `BOTTOM_RIGHT_CORNER
          | `BOTTOM_SIDE
          | `BOTTOM_TEE
          | `BOX_SPIRAL
          | `CENTER_PTR
          | `CIRCLE
          | `CLOCK
          | `COFFEE_MUG
          | `CROSS
          | `CROSSHAIR
          | `CROSS_REVERSE
          | `DIAMOND_CROSS
          | `DOT
          | `DOTBOX
          | `DOUBLE_ARROW
          | `DRAFT_LARGE
          | `DRAFT_SMALL
          | `DRAPED_BOX
          | `EXCHANGE
          | `FLEUR
          | `GOBBLER
          | `GUMBY
          | `HAND1
          | `HAND2
          | `HEART
          | `ICON
          | `IRON_CROSS
          | `LEFTBUTTON
          | `LEFT_PTR
          | `LEFT_SIDE
          | `LEFT_TEE
          | `LL_ANGLE
          | `LR_ANGLE
          | `MAN
          | `MIDDLEBUTTON
          | `MOUSE
          | `PENCIL
          | `PIRATE
          | `PLUS
          | `QUESTION_ARROW
          | `RIGHTBUTTON
          | `RIGHT_PTR
          | `RIGHT_SIDE
          | `RIGHT_TEE
          | `RTL_LOGO
          | `SAILBOAT
          | `SB_DOWN_ARROW
          | `SB_H_DOUBLE_ARROW
          | `SB_LEFT_ARROW
          | `SB_RIGHT_ARROW
          | `SB_UP_ARROW
          | `SB_V_DOUBLE_ARROW
          | `SHUTTLE
          | `SIZING
          | `SPIDER
          | `SPRAYCAN
          | `STAR
          | `TARGET
          | `TCROSS
          | `TOP_LEFT_ARROW
          | `TOP_LEFT_CORNER
          | `TOP_RIGHT_CORNER
          | `TOP_SIDE
          | `TOP_TEE
          | `TREK
          | `UL_ANGLE
          | `UMBRELLA
          | `UR_ANGLE
          | `WATCH
          | `XTERM
          | `X_CURSOR ]
      val create : Gdk.Cursor.cursor_type -> Gdk.cursor
      val create_from_pixbuf :
        [ `pixbuf ] Gobject.obj -> x:int -> y:int -> Gdk.cursor
      val get_image : Gdk.cursor -> [ `pixbuf ] Gobject.obj
    end
  module Display :
    sig
      val default : unit -> Gdk.display
      val window_at_pointer :
        ?display:Gdk.display -> unit -> (Gdk.window * int * int) option
    end
  module Windowing : sig val platform : [ `QUARTZ | `WIN32 | `X11 ] end
  module Cairo : sig val create : Gdk.window -> Gdk.cairo end
end