sig
type color
type colormap
type visual
type screen = [ `gdkscreen ] Gobject.obj
type region
type gc
type window = [ `drawable | `gdkwindow ] Gobject.obj
type pixmap = [ `drawable | `gdkpixmap ] Gobject.obj
type bitmap = [ `drawable | `gdkbitmap | `gdkpixmap ] Gobject.obj
type font
type image = [ `gdkimage ] Gobject.obj
type atom
type keysym = int
type +'a event
type drag_context = [ `dragcontext ] Gobject.obj
type cursor
type xid = int32
type device
type display
exception Error of string
module Tags :
sig
type event_type =
[ `BUTTON_PRESS
| `BUTTON_RELEASE
| `CLIENT_EVENT
| `CONFIGURE
| `DELETE
| `DESTROY
| `DRAG_ENTER
| `DRAG_LEAVE
| `DRAG_MOTION
| `DRAG_STATUS
| `DROP_FINISHED
| `DROP_START
| `ENTER_NOTIFY
| `EXPOSE
| `FOCUS_CHANGE
| `KEY_PRESS
| `KEY_RELEASE
| `LEAVE_NOTIFY
| `MAP
| `MOTION_NOTIFY
| `NOTHING
| `NO_EXPOSE
| `PROPERTY_NOTIFY
| `PROXIMITY_IN
| `PROXIMITY_OUT
| `SCROLL
| `SELECTION_CLEAR
| `SELECTION_NOTIFY
| `SELECTION_REQUEST
| `SETTING
| `THREE_BUTTON_PRESS
| `TWO_BUTTON_PRESS
| `UNMAP
| `VISIBILITY_NOTIFY
| `WINDOW_STATE ]
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
| `STRUCTURE
| `SUBSTRUCTURE
| `VISIBILITY_NOTIFY ]
type extension_mode = [ `ALL | `CURSOR | `NONE ]
type visibility_state = [ `FULLY_OBSCURED | `PARTIAL | `UNOBSCURED ]
type input_source = [ `CURSOR | `ERASER | `MOUSE | `PEN ]
type scroll_direction = [ `DOWN | `LEFT | `RIGHT | `UP ]
type notify_type =
[ `ANCESTOR
| `INFERIOR
| `NONLINEAR
| `NONLINEAR_VIRTUAL
| `UNKNOWN
| `VIRTUAL ]
type crossing_mode = [ `GRAB | `NORMAL | `UNGRAB ]
type setting_action = [ `CHANGED | `DELETED | `NEW ]
type window_state = [ `ICONIFIED | `MAXIMIZED | `STICKY | `WITHDRAWN ]
type modifier =
[ `BUTTON1
| `BUTTON2
| `BUTTON3
| `BUTTON4
| `BUTTON5
| `CONTROL
| `LOCK
| `MOD1
| `MOD2
| `MOD3
| `MOD4
| `MOD5
| `SHIFT ]
type drag_action =
[ `ASK | `COPY | `DEFAULT | `LINK | `MOVE | `PRIVATE ]
type rgb_dither = [ `MAX | `NONE | `NORMAL ]
type property_state = [ `DELETE | `NEW_VALUE ]
type property_mode = [ `APPEND | `PREPEND | `REPLACE ]
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 gravity =
[ `CENTER
| `EAST
| `NORTH
| `NORTH_EAST
| `NORTH_WEST
| `SOUTH
| `SOUTH_EAST
| `SOUTH_WEST
| `STATIC
| `WEST ]
type window_type_hint =
[ `DESKTOP
| `DIALOG
| `DOCK
| `MENU
| `NORMAL
| `SPLASHSCREEN
| `TOOLBAR
| `UTILITY ]
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
val red_mask : Gdk.visual -> int
val red_shift : Gdk.visual -> int
val red_prec : Gdk.visual -> int
val green_mask : Gdk.visual -> int
val green_shift : Gdk.visual -> int
val green_prec : Gdk.visual -> int
val blue_mask : Gdk.visual -> int
val blue_shift : Gdk.visual -> int
val blue_prec : Gdk.visual -> int
end
module Image :
sig
type image_type = [ `FASTEST | `NORMAL | `SHARED ]
val create :
kind:Gdk.Image.image_type ->
visual:Gdk.visual -> width:int -> height:int -> Gdk.image
val get :
[> `drawable ] Gobject.obj ->
x:int -> y:int -> width:int -> height:int -> Gdk.image
val put_pixel : Gdk.image -> x:int -> y:int -> pixel:int -> unit
val get_pixel : Gdk.image -> x:int -> y:int -> int
val destroy : Gdk.image -> unit
val width : Gdk.image -> int
val height : Gdk.image -> int
val depth : Gdk.image -> int
val get_visual : Gdk.image -> Gdk.visual
end
module Color :
sig
val get_system_colormap : unit -> Gdk.colormap
val get_colormap : ?privat:bool -> Gdk.visual -> Gdk.colormap
val get_visual : Gdk.colormap -> Gdk.visual
type spec =
[ `BLACK | `NAME of string | `RGB of int * int * int | `WHITE ]
val alloc : colormap:Gdk.colormap -> Gdk.Color.spec -> Gdk.color
val red : Gdk.color -> int
val blue : Gdk.color -> int
val green : Gdk.color -> int
val pixel : Gdk.color -> int
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 Drawable :
sig
val cast : 'a Gobject.obj -> [ `drawable ] Gobject.obj
val get_visual : [> `drawable ] Gobject.obj -> Gdk.visual
val get_depth : [> `drawable ] Gobject.obj -> int
val get_colormap : [> `drawable ] Gobject.obj -> Gdk.colormap
val get_size : [> `drawable ] Gobject.obj -> int * int
end
module Window :
sig
val cast : 'a Gobject.obj -> 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 root_parent : unit -> Gdk.window
val clear : Gdk.window -> unit
val get_xwindow : [> `drawable ] Gobject.obj -> Gdk.xid
type background_pixmap =
[ `NONE | `PARENT_RELATIVE | `PIXMAP of Gdk.pixmap ]
val set_back_pixmap :
Gdk.window -> Gdk.Window.background_pixmap -> unit
val set_cursor : Gdk.window -> Gdk.cursor -> unit
val get_visual : Gdk.window -> Gdk.visual
end
module PointArray :
sig
type t = { len : int; }
val create : len:int -> Gdk.PointArray.t
val set : Gdk.PointArray.t -> pos:int -> x:int -> y:int -> unit
end
module Region :
sig
type gdkFillRule = [ `EVEN_ODD_RULE | `WINDING_RULE ]
type gdkOverlapType = [ `IN | `OUT | `PART ]
val create : unit -> Gdk.region
val destroy : Gdk.region -> unit
val polygon : (int * int) list -> Gdk.Region.gdkFillRule -> Gdk.region
val intersect : Gdk.region -> Gdk.region -> Gdk.region
val union : Gdk.region -> Gdk.region -> Gdk.region
val subtract : Gdk.region -> Gdk.region -> Gdk.region
val xor : Gdk.region -> Gdk.region -> Gdk.region
val union_with_rect : Gdk.region -> Gdk.Rectangle.t -> Gdk.region
val offset : Gdk.region -> x:int -> y:int -> unit
val shrink : Gdk.region -> x:int -> y:int -> unit
val empty : Gdk.region -> bool
val equal : Gdk.region -> Gdk.region -> bool
val point_in : Gdk.region -> x:int -> y:int -> bool
val rect_in :
Gdk.region -> Gdk.Rectangle.t -> Gdk.Region.gdkOverlapType
val get_clipbox : Gdk.region -> Gdk.Rectangle.t -> unit
end
module GC :
sig
type gdkFunction = [ `COPY | `INVERT | `XOR ]
type gdkFill = [ `OPAQUE_STIPPLED | `SOLID | `STIPPLED | `TILED ]
type gdkSubwindowMode = [ `CLIP_BY_CHILDREN | `INCLUDE_INFERIORS ]
type gdkLineStyle = [ `DOUBLE_DASH | `ON_OFF_DASH | `SOLID ]
type gdkCapStyle = [ `BUTT | `NOT_LAST | `PROJECTING | `ROUND ]
type gdkJoinStyle = [ `BEVEL | `MITER | `ROUND ]
val create : [> `drawable ] Gobject.obj -> Gdk.gc
val set_foreground : Gdk.gc -> Gdk.color -> unit
val set_background : Gdk.gc -> Gdk.color -> unit
val set_font : Gdk.gc -> Gdk.font -> unit
val set_function : Gdk.gc -> Gdk.GC.gdkFunction -> unit
val set_fill : Gdk.gc -> Gdk.GC.gdkFill -> unit
val set_tile : Gdk.gc -> Gdk.pixmap -> unit
val set_stipple : Gdk.gc -> Gdk.pixmap -> unit
val set_ts_origin : Gdk.gc -> x:int -> y:int -> unit
val set_clip_origin : Gdk.gc -> x:int -> y:int -> unit
val set_clip_mask : Gdk.gc -> Gdk.bitmap -> unit
val set_clip_rectangle : Gdk.gc -> Gdk.Rectangle.t -> unit
val set_clip_region : Gdk.gc -> Gdk.region -> unit
val set_subwindow : Gdk.gc -> Gdk.GC.gdkSubwindowMode -> unit
val set_exposures : Gdk.gc -> bool -> unit
val set_line_attributes :
Gdk.gc ->
width:int ->
style:Gdk.GC.gdkLineStyle ->
cap:Gdk.GC.gdkCapStyle -> join:Gdk.GC.gdkJoinStyle -> unit
val set_dashes : Gdk.gc -> offset:int -> int list -> unit
val copy : dst:Gdk.gc -> Gdk.gc -> unit
type values = {
foreground : Gdk.color;
background : Gdk.color;
font : Gdk.font option;
fonction : Gdk.GC.gdkFunction;
fill : Gdk.GC.gdkFill;
tile : Gdk.pixmap option;
stipple : Gdk.pixmap option;
clip_mask : Gdk.bitmap option;
subwindow_mode : Gdk.GC.gdkSubwindowMode;
ts_x_origin : int;
ts_y_origin : int;
clip_x_origin : int;
clip_y_origin : int;
graphics_exposures : bool;
line_width : int;
line_style : Gdk.GC.gdkLineStyle;
cap_style : Gdk.GC.gdkCapStyle;
join_style : Gdk.GC.gdkJoinStyle;
}
val get_values : Gdk.gc -> Gdk.GC.values
end
module Pixmap :
sig
val cast : 'a Gobject.obj -> Gdk.pixmap
val destroy : [> `gdkpixmap ] Gobject.obj -> unit
val create :
?window:Gdk.window ->
width:int -> height:int -> ?depth:int -> unit -> Gdk.pixmap
val create_from_data :
?window:Gdk.window ->
width:int ->
height:int ->
?depth:int -> fg:Gdk.color -> bg:Gdk.color -> string -> Gdk.pixmap
val create_from_xpm :
?window:Gdk.window ->
?colormap:Gdk.colormap ->
?transparent:Gdk.color ->
file:string -> unit -> Gdk.pixmap * Gdk.bitmap
val create_from_xpm_d :
?window:Gdk.window ->
?colormap:Gdk.colormap ->
?transparent:Gdk.color ->
data:string array -> unit -> Gdk.pixmap * Gdk.bitmap
end
module Bitmap :
sig
val cast : 'a Gobject.obj -> Gdk.bitmap
val create :
?window:Gdk.window -> width:int -> height:int -> unit -> Gdk.bitmap
val create_from_data :
?window:Gdk.window -> width:int -> height:int -> string -> Gdk.bitmap
end
module Font :
sig
val load : string -> Gdk.font
val load_fontset : string -> Gdk.font
val string_width : Gdk.font -> string -> int
val char_width : Gdk.font -> char -> int
val string_height : Gdk.font -> string -> int
val char_height : Gdk.font -> char -> int
val string_measure : Gdk.font -> string -> int
val char_measure : Gdk.font -> char -> int
val get_type : Gdk.font -> [ `FONT | `FONTSET ]
val ascent : Gdk.font -> int
val descent : Gdk.font -> int
end
module Draw :
sig
val point :
[> `drawable ] Gobject.obj -> Gdk.gc -> x:int -> y:int -> unit
val line :
[> `drawable ] Gobject.obj ->
Gdk.gc -> x:int -> y:int -> x:int -> y:int -> unit
val rectangle :
[> `drawable ] Gobject.obj ->
Gdk.gc ->
x:int ->
y:int -> width:int -> height:int -> ?filled:bool -> unit -> unit
val arc :
[> `drawable ] Gobject.obj ->
Gdk.gc ->
x:int ->
y:int ->
width:int ->
height:int ->
?filled:bool -> ?start:float -> ?angle:float -> unit -> unit
val polygon :
[> `drawable ] Gobject.obj ->
Gdk.gc -> ?filled:bool -> (int * int) list -> unit
val string :
[> `drawable ] Gobject.obj ->
font:Gdk.font -> Gdk.gc -> x:int -> y:int -> string -> unit
val layout :
[> `drawable ] Gobject.obj ->
Gdk.gc ->
x:int ->
y:int -> Pango.layout -> ?fore:Gdk.color -> ?back:Gdk.color -> unit
val image :
[> `drawable ] Gobject.obj ->
Gdk.gc ->
?xsrc:int ->
?ysrc:int ->
?xdest:int ->
?ydest:int -> ?width:int -> ?height:int -> Gdk.image -> unit
val pixmap :
[> `drawable ] Gobject.obj ->
Gdk.gc ->
?xsrc:int ->
?ysrc:int ->
?xdest:int ->
?ydest:int -> ?width:int -> ?height:int -> Gdk.pixmap -> unit
val points :
[> `drawable ] Gobject.obj -> Gdk.gc -> (int * int) list -> unit
val lines :
[> `drawable ] Gobject.obj -> Gdk.gc -> (int * int) list -> unit
val segments :
[> `drawable ] Gobject.obj ->
Gdk.gc -> ((int * int) * (int * int)) list -> unit
end
module Rgb :
sig
val init : unit -> unit
val get_visual : unit -> Gdk.visual
val get_cmap : unit -> Gdk.colormap
val draw_image :
[> `drawable ] Gobject.obj ->
Gdk.gc ->
width:int ->
height:int ->
?x:int ->
?y:int ->
?dither:Gdk.Tags.rgb_dither ->
?row_stride:int -> Gpointer.region -> unit
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 Truecolor :
sig
val color_creator :
Gdk.visual -> red:int -> green:int -> blue:int -> int
val color_parser : Gdk.visual -> int -> int * int * int
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_pixmap :
Gdk.pixmap ->
mask:Gdk.bitmap ->
fg:Gdk.color -> bg:Gdk.color -> x:int -> y:int -> 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
end