gdkwindow.inc 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. // included by gdk2.pp
  2. {$IFDEF read_forward_definitions}
  3. {$ENDIF read_forward_definitions}
  4. //------------------------------------------------------------------------------
  5. {$IFDEF read_interface_types}
  6. { Classes of windows.
  7. InputOutput: Almost every window should be of this type. Such windows
  8. receive events and are also displayed on screen.
  9. InputOnly: Used only in special circumstances when events need to be
  10. stolen from another window or windows. Input only windows
  11. have no visible output, so they are handy for placing over
  12. top of a group of windows in order to grab the events (or
  13. filter the events) from those windows.
  14. }
  15. PGdkWindowClass = ^TGdkWindowClass;
  16. TGdkWindowClass = (
  17. GDK_INPUT_OUTPUT,
  18. GDK_INPUT_ONLY
  19. );
  20. { Types of windows.
  21. Root: There is only 1 root window and it is initialized
  22. at startup. Creating a window of type GDK_WINDOW_ROOT
  23. is an error.
  24. Toplevel: Windows which interact with the window manager.
  25. Child: Windows which are children of some other type of window.
  26. (Any other type of window). Most windows are child windows.
  27. Dialog: A special kind of toplevel window which interacts with
  28. the window manager slightly differently than a regular
  29. toplevel window. Dialog windows should be used for any
  30. transient window.
  31. Foreign: A window that actually belongs to another application
  32. }
  33. PGdkWindowType = ^TGdkWindowType;
  34. TGdkWindowType = (
  35. GDK_WINDOW_ROOT,
  36. GDK_WINDOW_TOPLEVEL,
  37. GDK_WINDOW_CHILD,
  38. GDK_WINDOW_DIALOG,
  39. GDK_WINDOW_TEMP,
  40. GDK_WINDOW_FOREIGN
  41. );
  42. { Window attribute mask values.
  43. GDK_WA_TITLE: The "title" field is valid.
  44. GDK_WA_X: The "x" field is valid.
  45. GDK_WA_Y: The "y" field is valid.
  46. GDK_WA_CURSOR: The "cursor" field is valid.
  47. GDK_WA_COLORMAP: The "colormap" field is valid.
  48. GDK_WA_VISUAL: The "visual" field is valid.
  49. }
  50. PGdkWindowAttributesType = ^TGdkWindowAttributesType;
  51. TGdkWindowAttributesType = longint; // see below for possible values
  52. { Size restriction enumeration. }
  53. PGdkWindowHints = ^TGdkWindowHints;
  54. TGdkWindowHints = longint; // see below for possible values
  55. { Window type hints.
  56. These are hints for the window manager that indicate
  57. what type of function the window has. The window manager
  58. can use this when determining decoration and behaviour
  59. of the window. The hint must be set before mapping the
  60. window.
  61. Normal: Normal toplevel window
  62. Dialog: Dialog window
  63. Menu: Window used to implement a menu.
  64. Toolbar: Window used to implement toolbars.
  65. }
  66. PGdkWindowTypeHint = ^TGdkWindowTypeHint;
  67. TGdkWindowTypeHint = (
  68. GDK_WINDOW_TYPE_HINT_NORMAL,
  69. GDK_WINDOW_TYPE_HINT_DIALOG,
  70. GDK_WINDOW_TYPE_HINT_MENU,
  71. GDK_WINDOW_TYPE_HINT_TOOLBAR
  72. );
  73. { The next two enumeration values current match the
  74. Motif constants. If this is changed, the implementation
  75. of gdk_window_set_decorations/gdk_window_set_functions
  76. will need to change as well.
  77. }
  78. PGdkWMDecoration = ^TGdkWMDecoration;
  79. TGdkWMDecoration = longint; // see below for possible values
  80. PGdkWMFunction = ^TGdkWMFunction;
  81. TGdkWMFunction = longint; // see below for possible values
  82. { Currently, these are the same values numerically as in the
  83. X protocol. If you change that, gdkwindow-x11.c/gdk_window_set_geometry_hints()
  84. will need fixing.
  85. }
  86. PGdkGravity = ^TGdkGravity;
  87. TGdkGravity = integer; // see below for possible values
  88. PGdkWindowEdge = ^TGdkWindowEdge;
  89. TGdkWindowEdge = (
  90. GDK_WINDOW_EDGE_NORTH_WEST,
  91. GDK_WINDOW_EDGE_NORTH,
  92. GDK_WINDOW_EDGE_NORTH_EAST,
  93. GDK_WINDOW_EDGE_WEST,
  94. GDK_WINDOW_EDGE_EAST,
  95. GDK_WINDOW_EDGE_SOUTH_WEST,
  96. GDK_WINDOW_EDGE_SOUTH,
  97. GDK_WINDOW_EDGE_SOUTH_EAST
  98. );
  99. PGdkWindowAttr = ^TGdkWindowAttr;
  100. TGdkWindowAttr = record
  101. title : Pgchar;
  102. event_mask : gint;
  103. x : gint;
  104. y : gint;
  105. width : gint;
  106. height : gint;
  107. wclass : TGdkWindowClass;
  108. visual : PGdkVisual;
  109. colormap : PGdkColormap;
  110. window_type : TGdkWindowType;
  111. cursor : PGdkCursor;
  112. wmclass_name : Pgchar;
  113. wmclass_class : Pgchar;
  114. override_redirect : gboolean;
  115. end;
  116. PGdkGeometry = ^TGdkGeometry;
  117. TGdkGeometry = record
  118. min_width : gint;
  119. min_height : gint;
  120. max_width : gint;
  121. max_height : gint;
  122. base_width : gint;
  123. base_height : gint;
  124. width_inc : gint;
  125. height_inc : gint;
  126. min_aspect : gdouble;
  127. max_aspect : gdouble;
  128. win_gravity : TGdkGravity;
  129. end;
  130. { unused for now }
  131. PGdkPointerHooks = ^TGdkPointerHooks;
  132. TGdkPointerHooks = record
  133. get_pointer : function (window:PGdkWindow; x:Pgint; y:Pgint; mask:PGdkModifierType):PGdkWindow; cdecl;
  134. window_at_pointer : function (screen:PGdkScreen; win_x:Pgint; win_y:Pgint):PGdkWindow; cdecl;
  135. end;
  136. { window-system-specific delegate anObject }
  137. PGdkWindowObject = ^TGdkWindowObject;
  138. TGdkWindowObject = record
  139. parent_instance : TGdkDrawable;
  140. impl : PGdkDrawable;
  141. parent : PGdkWindowObject;
  142. user_data : gpointer;
  143. x : gint;
  144. y : gint;
  145. extension_events : gint;
  146. filters : PGList;
  147. children : PGList;
  148. bg_color : TGdkColor;
  149. bg_pixmap : PGdkPixmap;
  150. paint_stack : PGSList;
  151. update_area : PGdkRegion;
  152. update_freeze_count : guint;
  153. window_type : guint8;
  154. depth : guint8;
  155. resize_count : guint8;
  156. state : TGdkWindowState;
  157. flag0 : word; { this is a bit combined flag, combining the following:
  158. guint guffaw_gravity : 1;
  159. guint input_only : 1;
  160. guint modal_hint : 1;
  161. guint destroyed : 2;
  162. use the following functions to access them:
  163. GdkWindowObject_guffaw_gravity
  164. GdkWindowObject_set_guffaw_gravity
  165. GdkWindowObject_input_only
  166. GdkWindowObject_set_input_only
  167. GdkWindowObject_modal_hint
  168. GdkWindowObject_set_modal_hint
  169. GdkWindowObject_destroyed
  170. GdkWindowObject_set_destroyed
  171. }
  172. event_mask : TGdkEventMask;
  173. end;
  174. PGdkWindowObjectClass = ^TGdkWindowObjectClass;
  175. TGdkWindowObjectClass = record
  176. parent_class : TGdkDrawableClass;
  177. end;
  178. gdk_window_invalidate_maybe_recurse_child_func =
  179. function (para1:PGdkWindow; para2:gpointer):gboolean;
  180. {$ENDIF read_interface_types}
  181. //------------------------------------------------------------------------------
  182. {$IFDEF read_interface_rest}
  183. const
  184. // values for TGdkWindowAttributesType
  185. GDK_WA_TITLE = 1 shl 1;
  186. GDK_WA_X = 1 shl 2;
  187. GDK_WA_Y = 1 shl 3;
  188. GDK_WA_CURSOR = 1 shl 4;
  189. GDK_WA_COLORMAP = 1 shl 5;
  190. GDK_WA_VISUAL = 1 shl 6;
  191. GDK_WA_WMCLASS = 1 shl 7;
  192. GDK_WA_NOREDIR = 1 shl 8;
  193. // values for TGdkWindowHints
  194. GDK_HINT_POS = 1 shl 0;
  195. GDK_HINT_MIN_SIZE = 1 shl 1;
  196. GDK_HINT_MAX_SIZE = 1 shl 2;
  197. GDK_HINT_BASE_SIZE = 1 shl 3;
  198. GDK_HINT_ASPECT = 1 shl 4;
  199. GDK_HINT_RESIZE_INC = 1 shl 5;
  200. GDK_HINT_WIN_GRAVITY = 1 shl 6;
  201. GDK_HINT_USER_POS = 1 shl 7;
  202. GDK_HINT_USER_SIZE = 1 shl 8;
  203. // values for TGdkWMDecoration
  204. GDK_DECOR_ALL = 1 shl 0;
  205. GDK_DECOR_BORDER = 1 shl 1;
  206. GDK_DECOR_RESIZEH = 1 shl 2;
  207. GDK_DECOR_TITLE = 1 shl 3;
  208. GDK_DECOR_MENU = 1 shl 4;
  209. GDK_DECOR_MINIMIZE = 1 shl 5;
  210. GDK_DECOR_MAXIMIZE = 1 shl 6;
  211. // values for TGdkWMFunction
  212. GDK_FUNC_ALL = 1 shl 0;
  213. GDK_FUNC_RESIZE = 1 shl 1;
  214. GDK_FUNC_MOVE = 1 shl 2;
  215. GDK_FUNC_MINIMIZE = 1 shl 3;
  216. GDK_FUNC_MAXIMIZE = 1 shl 4;
  217. GDK_FUNC_CLOSE = 1 shl 5;
  218. // values for TGdkGravity
  219. GDK_GRAVITY_NORTH_WEST = 1;
  220. GDK_GRAVITY_NORTH = 2;
  221. GDK_GRAVITY_NORTH_EAST = 3;
  222. GDK_GRAVITY_WEST = 4;
  223. GDK_GRAVITY_CENTER = 5;
  224. GDK_GRAVITY_EAST = 6;
  225. GDK_GRAVITY_SOUTH_WEST = 7;
  226. GDK_GRAVITY_SOUTH = 8;
  227. GDK_GRAVITY_SOUTH_EAST = 9;
  228. GDK_GRAVITY_STATIC = 10;
  229. function GDK_TYPE_WINDOW : GType;
  230. function GDK_WINDOW(anObject : Pointer) : PGdkWindow;
  231. function GDK_WINDOW_CLASS(klass : Pointer) : PGdkWindowObjectClass;
  232. function GDK_IS_WINDOW(anObject : Pointer) : boolean;
  233. function GDK_IS_WINDOW_CLASS(klass : Pointer) : boolean;
  234. function GDK_WINDOW_GET_CLASS(obj : Pointer) : PGdkWindowObjectClass;
  235. function GDK_WINDOW_OBJECT(anObject : Pointer) : PGdkWindowObject;
  236. // constants and functions to access the bits in a TGdkWindowObject
  237. const
  238. bm_TGdkWindowObject_guffaw_gravity = $1;
  239. bp_TGdkWindowObject_guffaw_gravity = 0;
  240. bm_TGdkWindowObject_input_only = $2;
  241. bp_TGdkWindowObject_input_only = 1;
  242. bm_TGdkWindowObject_modal_hint = $4;
  243. bp_TGdkWindowObject_modal_hint = 2;
  244. bm_TGdkWindowObject_destroyed = $18;
  245. bp_TGdkWindowObject_destroyed = 3;
  246. function GdkWindowObject_guffaw_gravity(var a : TGdkWindowObject) : guint;
  247. procedure GdkWindowObject_set_guffaw_gravity(var a : TGdkWindowObject; __guffaw_gravity : guint);
  248. function GdkWindowObject_input_only(var a : TGdkWindowObject) : guint;
  249. procedure GdkWindowObject_set_input_only(var a : TGdkWindowObject; __input_only : guint);
  250. function GdkWindowObject_modal_hint(var a : TGdkWindowObject) : guint;
  251. procedure GdkWindowObject_set_modal_hint(var a : TGdkWindowObject; __modal_hint : guint);
  252. function GdkWindowObject_destroyed(var a : TGdkWindowObject) : guint;
  253. procedure GdkWindowObject_set_destroyed(var a : TGdkWindowObject; __destroyed : guint);
  254. { Windows }
  255. function gdk_window_object_get_type:GType; cdecl; external gdklib;
  256. function gdk_window_new(parent:PGdkWindow; attributes:PGdkWindowAttr; attributes_mask:gint):PGdkWindow; cdecl; external gdklib;
  257. procedure gdk_window_destroy(window:PGdkWindow); cdecl; external gdklib;
  258. function gdk_window_get_window_type(window:PGdkWindow):TGdkWindowType; cdecl; external gdklib;
  259. function gdk_window_at_pointer(win_x:Pgint; win_y:Pgint):PGdkWindow; cdecl; external gdklib;
  260. procedure gdk_window_show(window:PGdkWindow); cdecl; external gdklib;
  261. procedure gdk_window_hide(window:PGdkWindow); cdecl; external gdklib;
  262. procedure gdk_window_withdraw(window:PGdkWindow); cdecl; external gdklib;
  263. procedure gdk_window_show_unraised(window:PGdkWindow); cdecl; external gdklib;
  264. procedure gdk_window_move(window:PGdkWindow; x:gint; y:gint); cdecl; external gdklib;
  265. procedure gdk_window_resize(window:PGdkWindow; width:gint; height:gint); cdecl; external gdklib;
  266. procedure gdk_window_move_resize(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint); cdecl; external gdklib;
  267. procedure gdk_window_reparent(window:PGdkWindow; new_parent:PGdkWindow; x:gint; y:gint); cdecl; external gdklib;
  268. procedure gdk_window_clear(window:PGdkWindow); cdecl; external gdklib;
  269. procedure gdk_window_clear_area(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint); cdecl; external gdklib;
  270. procedure gdk_window_clear_area_e(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint); cdecl; external gdklib;
  271. procedure gdk_window_raise(window:PGdkWindow); cdecl; external gdklib;
  272. procedure gdk_window_lower(window:PGdkWindow); cdecl; external gdklib;
  273. procedure gdk_window_focus(window:PGdkWindow; timestamp:guint32); cdecl; external gdklib;
  274. procedure gdk_window_set_user_data(window:PGdkWindow; user_data:gpointer); cdecl; external gdklib;
  275. procedure gdk_window_set_override_redirect(window:PGdkWindow; override_redirect:gboolean); cdecl; external gdklib;
  276. procedure gdk_window_add_filter(window:PGdkWindow; _function:TGdkFilterFunc; data:gpointer); cdecl; external gdklib;
  277. procedure gdk_window_remove_filter(window:PGdkWindow; _function:TGdkFilterFunc; data:gpointer); cdecl; external gdklib;
  278. procedure gdk_window_scroll(window:PGdkWindow; dx:gint; dy:gint); cdecl; external gdklib;
  279. {
  280. This allows for making shaped (partially transparent) windows
  281. - cool feature, needed for Drag and Drag for example.
  282. The shape_mask can be the mask
  283. from gdk_pixmap_create_from_xpm. Stefan Wille
  284. }
  285. procedure gdk_window_shape_combine_mask(window:PGdkWindow; mask:PGdkBitmap; x:gint; y:gint); cdecl; external gdklib;
  286. procedure gdk_window_shape_combine_region(window:PGdkWindow; shape_region:PGdkRegion; offset_x:gint; offset_y:gint); cdecl; external gdklib;
  287. {
  288. This routine allows you to quickly take the shapes of all the child windows
  289. of a window and use their shapes as the shape mask for this window - useful
  290. for container windows that dont want to look like a big box
  291. - Raster
  292. }
  293. procedure gdk_window_set_child_shapes(window:PGdkWindow); cdecl; external gdklib;
  294. {
  295. This routine allows you to merge (ie ADD) child shapes to your
  296. own window's shape keeping its current shape and ADDING the child
  297. shapes to it.
  298. - Raster
  299. }
  300. procedure gdk_window_merge_child_shapes(window:PGdkWindow); cdecl; external gdklib;
  301. {
  302. Check if a window has been shown, and whether all its
  303. parents up to a toplevel have been shown, respectively.
  304. Note that a window that is_viewable below is not necessarily
  305. viewable in the X sense.
  306. }
  307. function gdk_window_is_visible(window:PGdkWindow):gboolean; cdecl; external gdklib;
  308. function gdk_window_is_viewable(window:PGdkWindow):gboolean; cdecl; external gdklib;
  309. function gdk_window_get_state(window:PGdkWindow):TGdkWindowState; cdecl; external gdklib;
  310. { Set static bit gravity on the parent, and static
  311. window gravity on all children.
  312. }
  313. function gdk_window_set_static_gravities(window:PGdkWindow; use_static:gboolean):gboolean; cdecl; external gdklib;
  314. { Functions to create/lookup windows from their native equivalents }
  315. {$ifndef GDK_MULTIHEAD_SAFE}
  316. function gdk_window_foreign_new(anid:TGdkNativeWindow):PGdkWindow; cdecl; external gdklib;
  317. function gdk_window_lookup(anid:TGdkNativeWindow):PGdkWindow; cdecl; external gdklib;
  318. {$endif}
  319. function gdk_window_foreign_new_for_display(display:PGdkDisplay; anid:TGdkNativeWindow):PGdkWindow; cdecl; external gdklib;
  320. function gdk_window_lookup_for_display(display:PGdkDisplay; anid:TGdkNativeWindow):PGdkWindow; cdecl; external gdklib;
  321. { GdkWindow }
  322. {$ifndef GDK_DISABLE_DEPRECATED}
  323. procedure gdk_window_set_hints(window:PGdkWindow; x:gint; y:gint; min_width:gint; min_height:gint;
  324. max_width:gint; max_height:gint; flags:gint); cdecl; external gdklib;
  325. {$endif}
  326. procedure gdk_window_set_type_hint(window:PGdkWindow; hint:TGdkWindowTypeHint); cdecl; external gdklib;
  327. procedure gdk_window_set_modal_hint(window:PGdkWindow; modal:gboolean); cdecl; external gdklib;
  328. procedure gdk_window_set_geometry_hints(window:PGdkWindow; geometry:PGdkGeometry; geom_mask:TGdkWindowHints); cdecl; external gdklib;
  329. procedure gdk_set_sm_client_id(sm_client_id:Pgchar); cdecl; external gdklib;
  330. procedure gdk_window_begin_paint_rect(window:PGdkWindow; rectangle:PGdkRectangle); cdecl; external gdklib;
  331. procedure gdk_window_begin_paint_region(window:PGdkWindow; region:PGdkRegion); cdecl; external gdklib;
  332. procedure gdk_window_end_paint(window:PGdkWindow); cdecl; external gdklib;
  333. procedure gdk_window_set_title(window:PGdkWindow; title:Pgchar); cdecl; external gdklib;
  334. procedure gdk_window_set_role(window:PGdkWindow; role:Pgchar); cdecl; external gdklib;
  335. procedure gdk_window_set_transient_for(window:PGdkWindow; parent:PGdkWindow); cdecl; external gdklib;
  336. procedure gdk_window_set_background(window:PGdkWindow; color:PGdkColor); cdecl; external gdklib;
  337. procedure gdk_window_set_back_pixmap(window:PGdkWindow; pixmap:PGdkPixmap; parent_relative:gboolean); cdecl; external gdklib;
  338. procedure gdk_window_set_cursor(window:PGdkWindow; cursor:PGdkCursor); cdecl; external gdklib;
  339. procedure gdk_window_get_user_data(window:PGdkWindow; data:gpointer); cdecl; external gdklib;
  340. procedure gdk_window_get_geometry(window:PGdkWindow; x:Pgint; y:Pgint; width:Pgint; height:Pgint;
  341. depth:Pgint); cdecl; external gdklib;
  342. procedure gdk_window_get_position(window:PGdkWindow; x:Pgint; y:Pgint); cdecl; external gdklib;
  343. function gdk_window_get_origin(window:PGdkWindow; x:Pgint; y:Pgint):gint; cdecl; external gdklib;
  344. {$ifndef GDK_DISABLE_DEPRECATED}
  345. function gdk_window_get_deskrelative_origin(window:PGdkWindow; x:Pgint; y:Pgint):gboolean; cdecl; external gdklib;
  346. {$endif}
  347. procedure gdk_window_get_root_origin(window:PGdkWindow; x:Pgint; y:Pgint); cdecl; external gdklib;
  348. procedure gdk_window_get_frame_extents(window:PGdkWindow; rect:PGdkRectangle); cdecl; external gdklib;
  349. function gdk_window_get_pointer(window:PGdkWindow; x:Pgint; y:Pgint; mask:PGdkModifierType):PGdkWindow; cdecl; external gdklib;
  350. function gdk_window_get_parent(window:PGdkWindow):PGdkWindow; cdecl; external gdklib;
  351. function gdk_window_get_toplevel(window:PGdkWindow):PGdkWindow; cdecl; external gdklib;
  352. function gdk_window_get_children(window:PGdkWindow):PGList; cdecl; external gdklib;
  353. function gdk_window_peek_children(window:PGdkWindow):PGList; cdecl; external gdklib;
  354. function gdk_window_get_events(window:PGdkWindow):TGdkEventMask; cdecl; external gdklib;
  355. procedure gdk_window_set_events(window:PGdkWindow; event_mask:TGdkEventMask); cdecl; external gdklib;
  356. procedure gdk_window_set_icon_list(window:PGdkWindow; pixbufs:PGList); cdecl; external gdklib;
  357. procedure gdk_window_set_icon(window:PGdkWindow; icon_window:PGdkWindow; pixmap:PGdkPixmap; mask:PGdkBitmap); cdecl; external gdklib;
  358. procedure gdk_window_set_icon_name(window:PGdkWindow; name:Pgchar); cdecl; external gdklib;
  359. procedure gdk_window_set_group(window:PGdkWindow; leader:PGdkWindow); cdecl; external gdklib;
  360. procedure gdk_window_set_decorations(window:PGdkWindow; decorations:TGdkWMDecoration); cdecl; external gdklib;
  361. function gdk_window_get_decorations(window:PGdkWindow; decorations:PGdkWMDecoration):gboolean; cdecl; external gdklib;
  362. procedure gdk_window_set_functions(window:PGdkWindow; functions:TGdkWMFunction); cdecl; external gdklib;
  363. {$ifndef GDK_MULTIHEAD_SAFE}
  364. function gdk_window_get_toplevels:PGList; cdecl; external gdklib;
  365. // Already defined: procedure gdk_set_sm_client_id(sm_client_id:Pgchar); cdecl; external gdklib;
  366. {$endif}
  367. procedure gdk_window_iconify(window:PGdkWindow); cdecl; external gdklib;
  368. procedure gdk_window_deiconify(window:PGdkWindow); cdecl; external gdklib;
  369. procedure gdk_window_stick(window:PGdkWindow); cdecl; external gdklib;
  370. procedure gdk_window_unstick(window:PGdkWindow); cdecl; external gdklib;
  371. procedure gdk_window_maximize(window:PGdkWindow); cdecl; external gdklib;
  372. procedure gdk_window_unmaximize(window:PGdkWindow); cdecl; external gdklib;
  373. procedure gdk_window_register_dnd(window:PGdkWindow); cdecl; external gdklib;
  374. procedure gdk_window_begin_resize_drag(window:PGdkWindow; edge:TGdkWindowEdge; button:gint; root_x:gint; root_y:gint;
  375. timestamp:guint32); cdecl; external gdklib;
  376. procedure gdk_window_begin_move_drag(window:PGdkWindow; button:gint; root_x:gint; root_y:gint; timestamp:guint32); cdecl; external gdklib;
  377. { Interface for dirty-region queueing }
  378. procedure gdk_window_invalidate_rect(window:PGdkWindow; rect:PGdkRectangle; invalidate_children:gboolean); cdecl; external gdklib;
  379. procedure gdk_window_invalidate_region(window:PGdkWindow; region:PGdkRegion; invalidate_children:gboolean); cdecl; external gdklib;
  380. procedure gdk_window_invalidate_maybe_recurse(window:PGdkWindow; region:PGdkRegion; child_func:gdk_window_invalidate_maybe_recurse_child_func; user_data:gpointer); cdecl; external gdklib;
  381. function gdk_window_get_update_area(window:PGdkWindow):PGdkRegion; cdecl; external gdklib;
  382. procedure gdk_window_freeze_updates(window:PGdkWindow); cdecl; external gdklib;
  383. procedure gdk_window_thaw_updates(window:PGdkWindow); cdecl; external gdklib;
  384. procedure gdk_window_process_all_updates; cdecl; external gdklib;
  385. procedure gdk_window_process_updates(window:PGdkWindow; update_children:gboolean); cdecl; external gdklib;
  386. { Enable/disable flicker, so you can tell if your code is inefficient. }
  387. procedure gdk_window_set_debug_updates(setting:gboolean); cdecl; external gdklib;
  388. procedure gdk_window_constrain_size(geometry:PGdkGeometry; flags:guint; width:gint; height:gint; new_width:Pgint;
  389. new_height:Pgint); cdecl; external gdklib;
  390. procedure gdk_window_get_internal_paint_info(window:PGdkWindow; var real_drawable:PGdkDrawable; x_offset:Pgint; y_offset:Pgint); cdecl; external gdklib;
  391. function gdk_set_pointer_hooks(new_hooks:PGdkPointerHooks):PGdkPointerHooks; cdecl; external gdklib;
  392. function gdk_get_default_root_window:PGdkWindow; cdecl; external gdklib;
  393. {$ifndef GDK_DISABLE_DEPRECATED}
  394. function GDK_ROOT_PARENT : PGdkWindow;
  395. procedure gdk_window_get_size(drawable:PGdkDrawable; width:Pgint; height:Pgint);
  396. function gdk_window_get_type(window:PGdkWindow):TGdkWindowType;
  397. function gdk_window_get_colormap(drawable:PGdkDrawable):PGdkColormap;
  398. procedure gdk_window_set_colormap(drawable:PGdkDrawable; colormap:PGdkColormap);
  399. function gdk_window_get_visual(drawable:PGdkDrawable):PGdkVisual;
  400. function gdk_window_ref(drawable:PGdkDrawable):PGdkDrawable;
  401. procedure gdk_window_unref(drawable:PGdkDrawable);
  402. procedure gdk_window_copy_area(drawable:PGdkDrawable; gc:PGdkGC;
  403. x,y: gint; source_drawable:PGdkDrawable; source_x,source_y: gint;
  404. width,height : gint);
  405. {$endif}
  406. { GDK_DISABLE_DEPRECATED }
  407. {$endif read_interface_rest}
  408. //------------------------------------------------------------------------------
  409. {$IFDEF read_implementation}
  410. function GDK_TYPE_WINDOW : GType;
  411. begin
  412. GDK_TYPE_WINDOW:=gdk_window_object_get_type;
  413. end;
  414. function GDK_WINDOW(anObject : Pointer) : PGdkWindow;
  415. begin
  416. GDK_WINDOW:=PGdkWindow(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_WINDOW));
  417. end;
  418. function GDK_WINDOW_CLASS(klass : Pointer) : PGdkWindowObjectClass;
  419. begin
  420. GDK_WINDOW_CLASS:=PGdkWindowObjectClass(G_TYPE_CHECK_CLASS_CAST(klass,
  421. GDK_TYPE_WINDOW));
  422. end;
  423. function GDK_IS_WINDOW(anObject : Pointer) : boolean;
  424. begin
  425. GDK_IS_WINDOW:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_WINDOW);
  426. end;
  427. function GDK_IS_WINDOW_CLASS(klass : Pointer) : boolean;
  428. begin
  429. GDK_IS_WINDOW_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_WINDOW);
  430. end;
  431. function GDK_WINDOW_GET_CLASS(obj : Pointer) : PGdkWindowObjectClass;
  432. begin
  433. GDK_WINDOW_GET_CLASS:=PGdkWindowObjectClass(G_TYPE_INSTANCE_GET_CLASS(obj,
  434. GDK_TYPE_WINDOW));
  435. end;
  436. function GDK_WINDOW_OBJECT(anObject : Pointer) : PGdkWindowObject;
  437. begin
  438. GDK_WINDOW_OBJECT:=PGdkWindowObject(GDK_WINDOW(anObject));
  439. end;
  440. function GdkWindowObject_guffaw_gravity(var a : TGdkWindowObject) : guint;
  441. begin
  442. GdkWindowObject_guffaw_gravity:=
  443. (a.flag0 and bm_TGdkWindowObject_guffaw_gravity)
  444. shr bp_TGdkWindowObject_guffaw_gravity;
  445. end;
  446. procedure GdkWindowObject_set_guffaw_gravity(var a : TGdkWindowObject; __guffaw_gravity : guint);
  447. begin
  448. a.flag0:=
  449. a.flag0 or ((__guffaw_gravity shl bp_TGdkWindowObject_guffaw_gravity)
  450. and bm_TGdkWindowObject_guffaw_gravity);
  451. end;
  452. function GdkWindowObject_input_only(var a : TGdkWindowObject) : guint;
  453. begin
  454. GdkWindowObject_input_only:=
  455. (a.flag0 and bm_TGdkWindowObject_input_only) shr bp_TGdkWindowObject_input_only;
  456. end;
  457. procedure GdkWindowObject_set_input_only(var a : TGdkWindowObject; __input_only : guint);
  458. begin
  459. a.flag0:=a.flag0 or ((__input_only shl bp_TGdkWindowObject_input_only)
  460. and bm_TGdkWindowObject_input_only);
  461. end;
  462. function GdkWindowObject_modal_hint(var a : TGdkWindowObject) : guint;
  463. begin
  464. GdkWindowObject_modal_hint:=(a.flag0 and bm_TGdkWindowObject_modal_hint)
  465. shr bp_TGdkWindowObject_modal_hint;
  466. end;
  467. procedure GdkWindowObject_set_modal_hint(var a : TGdkWindowObject; __modal_hint : guint);
  468. begin
  469. a.flag0:=a.flag0 or ((__modal_hint shl bp_TGdkWindowObject_modal_hint)
  470. and bm_TGdkWindowObject_modal_hint);
  471. end;
  472. function GdkWindowObject_destroyed(var a : TGdkWindowObject) : guint;
  473. begin
  474. GdkWindowObject_destroyed:=(a.flag0 and bm_TGdkWindowObject_destroyed)
  475. shr bp_TGdkWindowObject_destroyed;
  476. end;
  477. procedure GdkWindowObject_set_destroyed(var a : TGdkWindowObject; __destroyed : guint);
  478. begin
  479. a.flag0:=a.flag0 or ((__destroyed shl bp_TGdkWindowObject_destroyed)
  480. and bm_TGdkWindowObject_destroyed);
  481. end;
  482. function GDK_ROOT_PARENT : PGdkWindow;
  483. begin
  484. GDK_ROOT_PARENT:=gdk_get_default_root_window;
  485. end;
  486. procedure gdk_window_get_size(drawable:PGdkDrawable; width:Pgint; height:Pgint);
  487. begin
  488. gdk_drawable_get_size(drawable,width,height);
  489. end;
  490. function gdk_window_get_type(window:PGdkWindow):TGdkWindowType;
  491. begin
  492. gdk_window_get_type:=gdk_window_get_window_type(window);
  493. end;
  494. function gdk_window_get_colormap(drawable:PGdkDrawable):PGdkColormap;
  495. begin
  496. gdk_window_get_colormap:=gdk_drawable_get_colormap(drawable);
  497. end;
  498. procedure gdk_window_set_colormap(drawable:PGdkDrawable; colormap:PGdkColormap);
  499. begin
  500. gdk_drawable_set_colormap(drawable,colormap);
  501. end;
  502. function gdk_window_get_visual(drawable:PGdkDrawable):PGdkVisual;
  503. begin
  504. gdk_window_get_visual:=gdk_drawable_get_visual(drawable);
  505. end;
  506. function gdk_window_ref(drawable:PGdkDrawable):PGdkDrawable;
  507. begin
  508. gdk_window_ref:=GDK_DRAWABLE(g_object_ref(G_OBJECT(drawable)));
  509. end;
  510. procedure gdk_window_unref(drawable:PGdkDrawable);
  511. begin
  512. g_object_unref(G_OBJECT(drawable));
  513. end;
  514. procedure gdk_window_copy_area(drawable:PGdkDrawable; gc:PGdkGC;
  515. x,y: gint; source_drawable:PGdkDrawable; source_x,source_y: gint;
  516. width,height : gint);
  517. begin
  518. gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,
  519. x,y,width,height);
  520. end;
  521. {$ENDIF}