PageRenderTime 53ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/src/wrappers/gdk/library/gdk_window.e

http://github.com/tybor/Liberty
Specman e | 1189 lines | 62 code | 321 blank | 806 comment | 4 complexity | 323838a0115d392c773e7f831d955f9d MD5 | raw file
Possible License(s): GPL-3.0, LGPL-2.1, GPL-2.0
  1. indexing
  2. description: "Windows -- Onscreen display areas in the target window system."
  3. copyright: "[
  4. Copyright (C) 2006 eiffel-libraries team, GTK+ team
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. class GDK_WINDOW
  19. -- A GdkWindow is a rectangular region on the screen. It's a low-level
  20. -- object, used to implement high-level objects such as GtkWidget and
  21. -- GtkWindow on the GTK+ level. A GtkWindow is a toplevel window, the thing
  22. -- a user might think of as a "window" with a titlebar and so on; a
  23. -- GtkWindow may contain many GdkWindow. For example, each GtkButton has a
  24. -- GdkWindow associated with it.
  25. inherit GDK_DRAWABLE
  26. insert
  27. GDK_WINDOW_EXTERNALS
  28. GDK_MODIFIER_TYPE
  29. creation {WRAPPER, WRAPPER_HANDLER} from_external_pointer, secondary_wrapper_from
  30. feature -- size
  31. struct_size: INTEGER is
  32. external "C inline use <gdk/gdk.h>"
  33. alias "sizeof(GdkWindow)"
  34. end
  35. feature
  36. set_cursor (a_cursor: GDK_CURSOR) is
  37. require
  38. a_cursor /= Void
  39. do
  40. gdk_window_set_cursor (handle, a_cursor.handle)
  41. end
  42. unset_cursor is
  43. do
  44. gdk_window_set_cursor (handle, default_pointer)
  45. end
  46. get_pointer: TUPLE [GDK_WINDOW, INTEGER, INTEGER, INTEGER] is
  47. -- GdkWindow* gdk_window_get_pointer (GdkWindow *window,
  48. -- gint *x,
  49. -- gint *y,
  50. -- GdkModifierType *mask);
  51. local
  52. res: POINTER
  53. window: GDK_WINDOW
  54. x, y, mask: INTEGER
  55. factory: G_OBJECT_EXPANDED_FACTORY [GDK_WINDOW]
  56. do
  57. res := gdk_window_get_pointer (handle, $x, $y, $mask)
  58. if res.is_not_null then
  59. window := factory.existant_wrapper (res)
  60. if window=Void then
  61. create window.from_external_pointer (res)
  62. end
  63. end
  64. mask := mask & gdk_modifier_mask
  65. Result := [window, x, y, mask]
  66. ensure
  67. Result /= Void implies is_valid_gdk_modifier_type (Result.fourth)
  68. end
  69. children: G_LIST [GDK_WINDOW] is
  70. do
  71. create {G_OBJECT_LIST[GDK_WINDOW]} Result.from_external_pointer(gdk_window_get_children(handle))
  72. end
  73. -- GList* gdk_window_peek_children (GdkWindow *window);
  74. -- GdkEventMask gdk_window_get_events (GdkWindow *window);
  75. -- void gdk_window_set_events (GdkWindow *window,
  76. -- GdkEventMask event_mask);
  77. -- void gdk_window_set_icon (GdkWindow *window,
  78. -- GdkWindow *icon_window,
  79. -- GdkPixmap *pixmap,
  80. -- GdkBitmap *mask);
  81. -- void gdk_window_set_icon_name (GdkWindow *window,
  82. -- const gchar *name);
  83. -- void gdk_window_set_transient_for (GdkWindow *window,
  84. -- GdkWindow *parent);
  85. -- void gdk_window_set_role (GdkWindow *window,
  86. -- const gchar *role);
  87. -- void gdk_window_set_group (GdkWindow *window,
  88. -- GdkWindow *leader);
  89. -- GdkWindow* gdk_window_get_group (GdkWindow *window);
  90. -- void gdk_window_set_decorations (GdkWindow *window,
  91. -- GdkWMDecoration decorations);
  92. -- gboolean gdk_window_get_decorations (GdkWindow *window,
  93. -- GdkWMDecoration *decorations);
  94. -- enum GdkWMDecoration;
  95. -- void gdk_window_set_functions (GdkWindow *window,
  96. -- GdkWMFunction functions);
  97. -- enum GdkWMFunction;
  98. -- GList* gdk_window_get_toplevels (void);
  99. -- GdkWindow* gdk_get_default_root_window (void);
  100. -- GdkPointerHooks;
  101. -- GdkPointerHooks* gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks);
  102. -- An opaque structure representing an onscreen drawable. Pointers to structures of type GdkPixmap, GdkBitmap, and GdkWindow, can often be used interchangeably. The type GdkDrawable refers generically to any of these types.
  103. -- enum GdkWindowType
  104. -- typedef enum
  105. -- {
  106. -- GDK_WINDOW_ROOT,
  107. -- GDK_WINDOW_TOPLEVEL,
  108. -- GDK_WINDOW_CHILD,
  109. -- GDK_WINDOW_DIALOG,
  110. -- GDK_WINDOW_TEMP,
  111. -- GDK_WINDOW_FOREIGN
  112. -- } GdkWindowType;
  113. -- Describes the kind of window.
  114. -- GDK_WINDOW_ROOT root window; this window has no parent, covers the entire screen, and is created by the window system
  115. -- GDK_WINDOW_TOPLEVEL toplevel window (used to implement GtkWindow)
  116. -- GDK_WINDOW_CHILD child window (used to implement e.g. GtkButton)
  117. -- GDK_WINDOW_DIALOG useless/deprecated compatibility type
  118. -- GDK_WINDOW_TEMP override redirect temporary window (used to implement GtkMenu)
  119. -- GDK_WINDOW_FOREIGN foreign window (see gdk_window_foreign_new())
  120. -- enum GdkWindowClass
  121. -- typedef enum
  122. -- {
  123. -- GDK_INPUT_OUTPUT,
  124. -- GDK_INPUT_ONLY
  125. -- } GdkWindowClass;
  126. -- GDK_INPUT_OUTPUT windows are the standard kind of window you might expect. GDK_INPUT_ONLY windows are invisible; they are used to trap events, but you can't draw on them.
  127. -- GDK_INPUT_OUTPUT window for graphics and events
  128. -- GDK_INPUT_ONLY window for events only
  129. -- enum GdkWindowHints
  130. -- typedef enum
  131. -- {
  132. -- GDK_HINT_POS = 1 < < 0,
  133. -- GDK_HINT_MIN_SIZE = 1 < < 1,
  134. -- GDK_HINT_MAX_SIZE = 1 < < 2,
  135. -- GDK_HINT_BASE_SIZE = 1 < < 3,
  136. -- GDK_HINT_ASPECT = 1 < < 4,
  137. -- GDK_HINT_RESIZE_INC = 1 < < 5,
  138. -- GDK_HINT_WIN_GRAVITY = 1 < < 6,
  139. -- GDK_HINT_USER_POS = 1 < < 7,
  140. -- GDK_HINT_USER_SIZE = 1 < < 8
  141. -- } GdkWindowHints;
  142. -- Used to indicate which fields of a GdkGeometry struct should be paid attention to. Also, the presence/absence of GDK_HINT_POS, GDK_HINT_USER_POS, and GDK_HINT_USER_SIZE is significant, though they don't directly refer to GdkGeometry fields. GDK_HINT_USER_POS will be set automatically by GtkWindow if you call gtk_window_move(). GDK_HINT_USER_POS and GDK_HINT_USER_SIZE should be set if the user specified a size/position using a --geometry command-line argument; gtk_window_parse_geometry() automatically sets these flags.
  143. -- GDK_HINT_POS indicates that the program has positioned the window
  144. -- GDK_HINT_MIN_SIZE min size fields are set
  145. -- GDK_HINT_MAX_SIZE max size fields are set
  146. -- GDK_HINT_BASE_SIZE base size fields are set
  147. -- GDK_HINT_ASPECT aspect ratio fields are set
  148. -- GDK_HINT_RESIZE_INC resize increment fields are set
  149. -- GDK_HINT_WIN_GRAVITY window gravity field is set
  150. -- GDK_HINT_USER_POS indicates that the window's position was explicitly set by the user
  151. -- GDK_HINT_USER_SIZE indicates that the window's size was explicitly set by the user
  152. -- GdkGeometry
  153. -- typedef struct {
  154. -- gint min_width;
  155. -- gint min_height;
  156. -- gint max_width;
  157. -- gint max_height;
  158. -- gint base_width;
  159. -- gint base_height;
  160. -- gint width_inc;
  161. -- gint height_inc;
  162. -- gdouble min_aspect;
  163. -- gdouble max_aspect;
  164. -- GdkGravity win_gravity;
  165. -- } GdkGeometry;
  166. -- The GdkGeometry struct gives the window manager information about a window's geometry constraints. Normally you would set these on the GTK+ level using gtk_window_set_geometry_hints(). GtkWindow then sets the hints on the GdkWindow it creates.
  167. -- gdk_window_set_geometry_hints() expects the hints to be fully valid already and simply passes them to the window manager; in contrast, gtk_window_set_geometry_hints() performs some interpretation. For example, GtkWindow will apply the hints to the geometry widget instead of the toplevel window, if you set a geometry widget. Also, the min_width/min_height/max_width/max_height fields may be set to -1, and GtkWindow will substitute the size request of the window or geometry widget. If the minimum size hint is not provided, GtkWindow will use its requisition as the minimum size. If the minimum size is provided and a geometry widget is set, GtkWindow will take the minimum size as the minimum size of the geometry widget rather than the entire window. The base size is treated similarly.
  168. -- The canonical use-case for gtk_window_set_geometry_hints() is to get a terminal widget to resize properly. Here, the terminal text area should be the geometry widget; GtkWindow will then automatically set the base size to the size of other widgets in the terminal window, such as the menubar and scrollbar. Then, the width_inc and height_inc fields should be set to the size of one character in the terminal. Finally, the base size should be set to the size of one character. The net effect is that the minimum size of the terminal will have a 1x1 character terminal area, and only terminal sizes on the "character grid" will be allowed.
  169. -- Here's an example of how the terminal example would be implemented, assuming a terminal area widget called "terminal" and a toplevel window "toplevel":
  170. -- GdkGeometry hints;
  171. -- hints.base_width = terminal->char_width;
  172. -- hints.base_height = terminal->char_height;
  173. -- hints.min_width = terminal->char_width;
  174. -- hints.min_height = terminal->char_height;
  175. -- hints.width_inc = terminal->char_width;
  176. -- hints.height_inc = terminal->char_height;
  177. -- gtk_window_set_geometry_hints (GTK_WINDOW (toplevel),
  178. -- GTK_WIDGET (terminal),
  179. -- &hints,
  180. -- GDK_HINT_RESIZE_INC |
  181. -- GDK_HINT_MIN_SIZE |
  182. -- GDK_HINT_BASE_SIZE);
  183. -- The other useful fields are the min_aspect and max_aspect fields; these contain a width/height ratio as a floating point number. If a geometry widget is set, the aspect applies to the geometry widget rather than the entire window. The most common use of these hints is probably to set min_aspect and max_aspect to the same value, thus forcing the window to keep a constant aspect ratio.
  184. -- gint min_width; minimum width of window (or -1 to use requisition, with GtkWindow only) min_height minimum height of window (or -1 to use requisition, with GtkWindow only)
  185. -- gint min_height;
  186. -- gint max_width; maximum width of window (or -1 to use requisition, with GtkWindow only)
  187. -- gint max_height; maximum height of window (or -1 to use requisition, with GtkWindow only)
  188. -- gint base_width; allowed window widths are base_width + width_inc * N where N is any integer (-1 allowed with GtkWindow)
  189. -- gint base_height; allowed window widths are base_height + height_inc * N where N is any integer (-1 allowed with GtkWindow)
  190. -- gint width_inc; width resize increment
  191. -- gint height_inc; height resize increment
  192. -- gdouble min_aspect; minimum width/height ratio
  193. -- gdouble max_aspect; maximum width/height ratio
  194. -- GdkGravity win_gravity; window gravity, see gtk_window_set_gravity()
  195. -- enum GdkGravity
  196. -- typedef enum
  197. -- {
  198. -- GDK_GRAVITY_NORTH_WEST = 1,
  199. -- GDK_GRAVITY_NORTH,
  200. -- GDK_GRAVITY_NORTH_EAST,
  201. -- GDK_GRAVITY_WEST,
  202. -- GDK_GRAVITY_CENTER,
  203. -- GDK_GRAVITY_EAST,
  204. -- GDK_GRAVITY_SOUTH_WEST,
  205. -- GDK_GRAVITY_SOUTH,
  206. -- GDK_GRAVITY_SOUTH_EAST,
  207. -- GDK_GRAVITY_STATIC
  208. -- } GdkGravity;
  209. -- Defines the reference point of a window and the meaning of coordinates passed to gtk_window_move(). See gtk_window_move() and the "implementation notes" section of the Extended Window Manager Hints specification for more details.
  210. -- GDK_GRAVITY_NORTH_WEST the reference point is at the top left corner.
  211. -- GDK_GRAVITY_NORTH the reference point is in the middle of the top edge.
  212. -- GDK_GRAVITY_NORTH_EAST the reference point is at the top right corner.
  213. -- GDK_GRAVITY_WEST the reference point is at the middle of the left edge.
  214. -- GDK_GRAVITY_CENTER the reference point is at the center of the window.
  215. -- GDK_GRAVITY_EAST the reference point is at the middle of the right edge.
  216. -- GDK_GRAVITY_SOUTH_WEST the reference point is at the lower left corner.
  217. -- GDK_GRAVITY_SOUTH the reference point is at the middle of the lower edge.
  218. -- GDK_GRAVITY_SOUTH_EAST the reference point is at the lower right corner.
  219. -- GDK_GRAVITY_STATIC the reference point is at the top left corner of the window itself, ignoring window manager decorations.
  220. -- enum GdkWindowEdge
  221. -- typedef enum
  222. -- {
  223. -- GDK_WINDOW_EDGE_NORTH_WEST,
  224. -- GDK_WINDOW_EDGE_NORTH,
  225. -- GDK_WINDOW_EDGE_NORTH_EAST,
  226. -- GDK_WINDOW_EDGE_WEST,
  227. -- GDK_WINDOW_EDGE_EAST,
  228. -- GDK_WINDOW_EDGE_SOUTH_WEST,
  229. -- GDK_WINDOW_EDGE_SOUTH,
  230. -- GDK_WINDOW_EDGE_SOUTH_EAST
  231. -- } GdkWindowEdge;
  232. -- Determines a window edge or corner.
  233. -- GDK_WINDOW_EDGE_NORTH_WEST the top left corner.
  234. -- GDK_WINDOW_EDGE_NORTH the top edge.
  235. -- GDK_WINDOW_EDGE_NORTH_EAST the top right corner.
  236. -- GDK_WINDOW_EDGE_WEST the left edge.
  237. -- GDK_WINDOW_EDGE_EAST the right edge.
  238. -- GDK_WINDOW_EDGE_SOUTH_WEST the lower left corner.
  239. -- GDK_WINDOW_EDGE_SOUTH the lower edge.
  240. -- GDK_WINDOW_EDGE_SOUTH_EAST the lower right corner.
  241. -- enum GdkWindowTypeHint
  242. -- typedef enum
  243. -- {
  244. -- GDK_WINDOW_TYPE_HINT_NORMAL,
  245. -- GDK_WINDOW_TYPE_HINT_DIALOG,
  246. -- GDK_WINDOW_TYPE_HINT_MENU,
  247. -- GDK_WINDOW_TYPE_HINT_TOOLBAR,
  248. -- GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
  249. -- GDK_WINDOW_TYPE_HINT_UTILITY,
  250. -- GDK_WINDOW_TYPE_HINT_DOCK,
  251. -- GDK_WINDOW_TYPE_HINT_DESKTOP
  252. -- } GdkWindowTypeHint;
  253. -- These are hints for the window manager that indicate what type of function the window has. The window manager can use this when determining decoration and behaviour of the window. The hint must be set before mapping the window.
  254. -- See the Extended Window Manager Hints specification for more details about window types.
  255. -- GDK_WINDOW_TYPE_HINT_NORMAL Normal toplevel window.
  256. -- GDK_WINDOW_TYPE_HINT_DIALOG Dialog window.
  257. -- GDK_WINDOW_TYPE_HINT_MENU Window used to implement a menu.
  258. -- GDK_WINDOW_TYPE_HINT_TOOLBAR Window used to implement toolbars.
  259. -- GDK_WINDOW_TYPE_HINT_SPLASHSCREEN Window used to display a splash screen during application startup.
  260. -- GDK_WINDOW_TYPE_HINT_UTILITY Utility windows which are not detached toolbars or dialogs.
  261. -- GDK_WINDOW_TYPE_HINT_DOCK Used for creating dock or panel windows.
  262. -- GDK_WINDOW_TYPE_HINT_DESKTOP Used for creating the desktop background window.
  263. -- GdkWindowAttr
  264. -- typedef struct {
  265. -- gchar *title;
  266. -- gint event_mask;
  267. -- gint x, y;
  268. -- gint width;
  269. -- gint height;
  270. -- GdkWindowClass wclass;
  271. -- GdkVisual *visual;
  272. -- GdkColormap *colormap;
  273. -- GdkWindowType window_type;
  274. -- GdkCursor *cursor;
  275. -- gchar *wmclass_name;
  276. -- gchar *wmclass_class;
  277. -- gboolean override_redirect;
  278. -- } GdkWindowAttr;
  279. -- Attributes to use for a newly-created window.
  280. -- gchar *title; title of the window (for toplevel windows)
  281. -- gint event_mask; event mask (see gdk_window_set_events())
  282. -- gint x; X coordinate relative to parent window (see gdk_window_move())
  283. -- gint y; Y coordinate relative to parent window (see gdk_window_move())
  284. -- gint width; width of window
  285. -- gint height; height of window
  286. -- GdkWindowClass wclass; GDK_INPUT_OUTPUT (normal window) or GDK_INPUT_ONLY (invisible window that receives events)
  287. -- GdkVisual *visual; GdkVisual for window
  288. -- GdkColormap *colormap; GdkColormap for window
  289. -- GdkWindowType window_type; type of window
  290. -- GdkCursor *cursor; cursor for the window (see gdk_window_set_cursor())
  291. -- gchar *wmclass_name; don't use (see gtk_window_set_wmclass())
  292. -- gchar *wmclass_class; don't use (see gtk_window_set_wmclass())
  293. -- gboolean override_redirect; TRUE to bypass the window manager
  294. -- enum GdkWindowAttributesType
  295. -- typedef enum
  296. -- {
  297. -- GDK_WA_TITLE = 1 < < 1,
  298. -- GDK_WA_X = 1 < < 2,
  299. -- GDK_WA_Y = 1 < < 3,
  300. -- GDK_WA_CURSOR = 1 < < 4,
  301. -- GDK_WA_COLORMAP = 1 < < 5,
  302. -- GDK_WA_VISUAL = 1 < < 6,
  303. -- GDK_WA_WMCLASS = 1 < < 7,
  304. -- GDK_WA_NOREDIR = 1 < < 8
  305. -- } GdkWindowAttributesType;
  306. -- Used to indicate which fields in the GdkWindowAttr struct should be honored. For example, if you filled in the "cursor" and "x" fields of GdkWindowAttr, pass "GDK_WA_X | GDK_WA_CURSOR" to gdk_window_new(). Fields in GdkWindowAttr not covered by a bit in this enum are required; for example, the width/height, wclass, and window_type fields are required, they have no corresponding flag in GdkWindowAttributesType.
  307. -- GDK_WA_TITLE Honor the title field
  308. -- GDK_WA_X Honor the X coordinate field
  309. -- GDK_WA_Y Honor the Y coordinate field
  310. -- GDK_WA_CURSOR Honor the cursor field
  311. -- GDK_WA_COLORMAP Honor the colormap field
  312. -- GDK_WA_VISUAL Honor the visual field
  313. -- GDK_WA_WMCLASS Honor the wmclass_class and wmclass_name fields
  314. -- GDK_WA_NOREDIR Honor the override_redirect field
  315. -- gdk_window_new ()
  316. -- GdkWindow* gdk_window_new (GdkWindow *parent,
  317. -- GdkWindowAttr *attributes,
  318. -- gint attributes_mask);
  319. -- Creates a new GdkWindow using the attributes from attributes. See GdkWindowAttr and GdkWindowAttributesType for more details. Note: to use this on displays other than the default display, parent must be specified.
  320. -- parent : a GdkWindow, or NULL to create the window as a child of the default root window for the default display.
  321. -- attributes : attributes of the new window
  322. -- attributes_mask : mask indicating which fields in attributes are valid
  323. -- Returns : the new GdkWindow
  324. -- gdk_window_destroy ()
  325. -- void gdk_window_destroy (GdkWindow *window);
  326. -- Destroys the window system resources associated with window and decrements window's reference count. The window system resources for all children of window are also destroyed, but the children's reference counts are not decremented.
  327. -- Note that a window will not be destroyed automatically when its reference count reaches zero. You must call this function yourself before that happens.
  328. -- window : a GdkWindow
  329. -- gdk_window_ref
  330. -- #define gdk_window_ref gdk_drawable_ref
  331. -- Warning
  332. -- gdk_window_ref is deprecated and should not be used in newly-written code.
  333. -- Deprecated equivalent of g_object_ref()
  334. -- Returns : the window
  335. -- gdk_window_unref
  336. -- #define gdk_window_unref gdk_drawable_unref
  337. -- Warning
  338. -- gdk_window_unref is deprecated and should not be used in newly-written code.
  339. -- Deprecated equivalent of g_object_unref()
  340. -- gdk_window_get_window_type ()
  341. -- GdkWindowType gdk_window_get_window_type (GdkWindow *window);
  342. -- Gets the type of the window. See GdkWindowType.
  343. -- window : a GdkWindow
  344. -- Returns : type of window
  345. -- gdk_window_at_pointer ()
  346. -- GdkWindow* gdk_window_at_pointer (gint *win_x,
  347. -- gint *win_y);
  348. -- Obtains the window underneath the mouse pointer, returning the location of that window in win_x, win_y. Returns NULL if the window under the mouse pointer is not known to GDK (if the window belongs to another application and a GdkWindow hasn't been created for it with gdk_window_foreign_new())
  349. -- NOTE: For multihead-aware widgets or applications use gdk_display_get_window_at_pointer() instead.
  350. -- win_x : return location for origin of the window under the pointer
  351. -- win_y : return location for origin of the window under the pointer
  352. -- Returns : window under the mouse pointer
  353. -- gdk_window_show ()
  354. -- void gdk_window_show (GdkWindow *window);
  355. -- Like gdk_window_show_unraised(), but also raises the window to the top of the window stack (moves the window to the front of the Z-order).
  356. -- This function maps a window so it's visible onscreen. Its opposite is gdk_window_hide().
  357. -- When implementing a GtkWidget, you should call this function on the widget's GdkWindow as part of the "map" method.
  358. -- window : a GdkWindow
  359. -- gdk_window_show_unraised ()
  360. -- void gdk_window_show_unraised (GdkWindow *window);
  361. -- Shows a GdkWindow onscreen, but does not modify its stacking order. In contrast, gdk_window_show() will raise the window to the top of the window stack.
  362. -- On the X11 platform, in Xlib terms, this function calls XMapWindow() (it also updates some internal GDK state, which means that you can't really use XMapWindow() directly on a GDK window).
  363. -- window : a GdkWindow
  364. -- gdk_window_hide ()
  365. -- void gdk_window_hide (GdkWindow *window);
  366. -- For toplevel windows, withdraws them, so they will no longer be known to the window manager; for all windows, unmaps them, so they won't be displayed. Normally done automatically as part of gtk_widget_hide().
  367. -- window : a GdkWindow
  368. -- gdk_window_is_visible ()
  369. -- gboolean gdk_window_is_visible (GdkWindow *window);
  370. -- Checks whether the window has been mapped (with gdk_window_show() or gdk_window_show_unraised()).
  371. -- window : a GdkWindow
  372. -- Returns : TRUE if the window is mapped
  373. -- gdk_window_is_viewable ()
  374. -- gboolean gdk_window_is_viewable (GdkWindow *window);
  375. -- Check if the window and all ancestors of the window are mapped. (This is not necessarily "viewable" in the X sense, since we only check as far as we have GDK window parents, not to the root window.)
  376. -- window : a GdkWindow
  377. -- Returns : TRUE if the window is viewable
  378. -- gdk_window_get_state ()
  379. -- GdkWindowState gdk_window_get_state (GdkWindow *window);
  380. -- Gets the bitwise OR of the currently active window state flags, from the GdkWindowState enumeration.
  381. -- window : a GdkWindow
  382. -- Returns : window state bitfield
  383. -- gdk_window_withdraw ()
  384. -- void gdk_window_withdraw (GdkWindow *window);
  385. -- Withdraws a window (unmaps it and asks the window manager to forget about it). This function is not really useful as gdk_window_hide() automatically withdraws toplevel windows before hiding them.
  386. -- window : a toplevel GdkWindow
  387. -- gdk_window_iconify ()
  388. -- void gdk_window_iconify (GdkWindow *window);
  389. -- Asks to iconify (minimize) window. The window manager may choose to ignore the request, but normally will honor it. Using gtk_window_iconify() is preferred, if you have a GtkWindow widget.
  390. -- This function only makes sense when window is a toplevel window.
  391. -- window : a toplevel GdkWindow
  392. -- gdk_window_deiconify ()
  393. -- void gdk_window_deiconify (GdkWindow *window);
  394. -- Attempt to deiconify (unminimize) window. On X11 the window manager may choose to ignore the request to deiconify. When using GTK+, use gtk_window_deiconify() instead of the GdkWindow variant. Or better yet, you probably want to use gtk_window_present(), which raises the window, focuses it, unminimizes it, and puts it on the current desktop.
  395. -- window : a toplevel GdkWindow
  396. -- gdk_window_stick ()
  397. -- void gdk_window_stick (GdkWindow *window);
  398. -- "Pins" a window such that it's on all workspaces and does not scroll with viewports, for window managers that have scrollable viewports. (When using GtkWindow, gtk_window_stick() may be more useful.)
  399. -- On the X11 platform, this function depends on window manager support, so may have no effect with many window managers. However, GDK will do the best it can to convince the window manager to stick the window. For window managers that don't support this operation, there's nothing you can do to force it to happen.
  400. -- window : a toplevel GdkWindow
  401. -- gdk_window_unstick ()
  402. -- void gdk_window_unstick (GdkWindow *window);
  403. -- Reverse operation for gdk_window_stick(); see gdk_window_stick(), and gtk_window_unstick().
  404. -- window : a toplevel GdkWindow
  405. -- gdk_window_maximize ()
  406. -- void gdk_window_maximize (GdkWindow *window);
  407. -- Maximizes the window. If the window was already maximized, then this function does nothing.
  408. -- On X11, asks the window manager to maximize window, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "maximized"; so you can't rely on the maximization actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.
  409. -- On Windows, reliably maximizes the window.
  410. -- window : a toplevel GdkWindow
  411. -- gdk_window_unmaximize ()
  412. -- void gdk_window_unmaximize (GdkWindow *window);
  413. -- Unmaximizes the window. If the window wasn't maximized, then this function does nothing.
  414. -- On X11, asks the window manager to unmaximize window, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "maximized"; so you can't rely on the unmaximization actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.
  415. -- On Windows, reliably unmaximizes the window.
  416. -- window : a toplevel GdkWindow
  417. -- gdk_window_fullscreen ()
  418. -- void gdk_window_fullscreen (GdkWindow *window);
  419. -- Moves the window into fullscreen mode. This means the window covers the entire screen and is above any panels or task bars.
  420. -- If the window was already fullscreen, then this function does nothing.
  421. -- On X11, asks the window manager to put window in a fullscreen state, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "fullscreen"; so you can't rely on the fullscreenification actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.
  422. -- window : a toplevel GdkWindow
  423. -- Since 2.2
  424. -- gdk_window_unfullscreen ()
  425. -- void gdk_window_unfullscreen (GdkWindow *window);
  426. -- Moves the window out of fullscreen mode. If the window was not fullscreen, does nothing.
  427. -- On X11, asks the window manager to move window out of the fullscreen state, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "fullscreen"; so you can't rely on the unfullscreenification actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.
  428. -- window : a toplevel GdkWindow
  429. -- Since 2.2
  430. -- gdk_window_set_keep_above ()
  431. -- void gdk_window_set_keep_above (GdkWindow *window,
  432. -- gboolean setting);
  433. -- Set if window must be kept above other windows. If the window was already above, then this function does nothing.
  434. -- On X11, asks the window manager to keep window above, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "keep above"; so you can't rely on the window being kept above. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.
  435. -- window : a toplevel GdkWindow
  436. -- setting : whether to keep window above other windows
  437. -- Since 2.4
  438. -- gdk_window_set_keep_below ()
  439. -- void gdk_window_set_keep_below (GdkWindow *window,
  440. -- gboolean setting);
  441. -- Set if window must be kept below other windows. If the window was already below, then this function does nothing.
  442. -- On X11, asks the window manager to keep window below, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "keep below"; so you can't rely on the window being kept below. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.
  443. -- window : a toplevel GdkWindow
  444. -- setting : whether to keep window below other windows
  445. -- Since 2.4
  446. -- gdk_window_move ()
  447. -- void gdk_window_move (GdkWindow *window,
  448. -- gint x,
  449. -- gint y);
  450. -- Repositions a window relative to its parent window. For toplevel windows, window managers may ignore or modify the move; you should probably use gtk_window_move() on a GtkWindow widget anyway, instead of using GDK functions. For child windows, the move will reliably succeed.
  451. -- If you're also planning to resize the window, use gdk_window_move_resize() to both move and resize simultaneously, for a nicer visual effect.
  452. -- window : a GdkWindow
  453. -- x : X coordinate relative to window's parent
  454. -- y : Y coordinate relative to window's parent
  455. -- gdk_window_resize ()
  456. -- void gdk_window_resize (GdkWindow *window,
  457. -- gint width,
  458. -- gint height);
  459. -- Resizes window; for toplevel windows, asks the window manager to resize the window. The window manager may not allow the resize. When using GTK+, use gtk_window_resize() instead of this low-level GDK function.
  460. -- Windows may not be resized below 1x1.
  461. -- If you're also planning to move the window, use gdk_window_move_resize() to both move and resize simultaneously, for a nicer visual effect.
  462. -- window : a GdkWindow
  463. -- width : new width of the window
  464. -- height : new height of the window
  465. -- gdk_window_move_resize ()
  466. -- void gdk_window_move_resize (GdkWindow *window,
  467. -- gint x,
  468. -- gint y,
  469. -- gint width,
  470. -- gint height);
  471. -- Equivalent to calling gdk_window_move() and gdk_window_resize(), except that both operations are performed at once, avoiding strange visual effects. (i.e. the user may be able to see the window first move, then resize, if you don't use gdk_window_move_resize().)
  472. -- window : a GdkWindow
  473. -- x : new X position relative to window's parent
  474. -- y : new Y position relative to window's parent
  475. -- width : new width
  476. -- height : new height
  477. -- gdk_window_scroll ()
  478. -- void gdk_window_scroll (GdkWindow *window,
  479. -- gint dx,
  480. -- gint dy);
  481. -- Scroll the contents of window, both pixels and children, by the given amount. window itself does not move. Portions of the window that the scroll operation brings in from offscreen areas are invalidated. The invalidated region may be bigger than what would strictly be necessary. (For X11, a minimum area will be invalidated if the window has no subwindows, or if the edges of the window's parent do not extend beyond the edges of the window. In other cases, a multi-step process is used to scroll the window which may produce temporary visual artifacts and unnecessary invalidations.)
  482. -- window : a GdkWindow
  483. -- dx : Amount to scroll in the X direction
  484. -- dy : Amount to scroll in the Y direction
  485. -- gdk_window_move_region ()
  486. -- void gdk_window_move_region (GdkWindow *window,
  487. -- GdkRegion *region,
  488. -- gint dx,
  489. -- gint dy);
  490. -- Move the part of window indicated by region by dy pixels in the Y direction and dx pixels in the X direction. The portions of region that not covered by the new position of region are invalidated.
  491. -- Child windows are not moved.
  492. -- window : a GdkWindow
  493. -- region : The GdkRegion to move
  494. -- dx : Amount to move in the X direction
  495. -- dy : Amount to move in the Y direction
  496. -- Since 2.8
  497. -- gdk_window_reparent ()
  498. -- void gdk_window_reparent (GdkWindow *window,
  499. -- GdkWindow *new_parent,
  500. -- gint x,
  501. -- gint y);
  502. -- Reparents window into the given new_parent. The window being reparented will be unmapped as a side effect.
  503. -- window : a GdkWindow
  504. -- new_parent : new parent to move window into
  505. -- x : X location inside the new parent
  506. -- y : Y location inside the new parent
  507. -- gdk_window_clear ()
  508. -- void gdk_window_clear (GdkWindow *window);
  509. -- Clears an entire window to the background color or background pixmap.
  510. -- window : a GdkWindow
  511. -- gdk_window_clear_area ()
  512. -- void gdk_window_clear_area (GdkWindow *window,
  513. -- gint x,
  514. -- gint y,
  515. -- gint width,
  516. -- gint height);
  517. -- Clears an area of window to the background color or background pixmap.
  518. -- window : a GdkWindow
  519. -- x : x coordinate of rectangle to clear
  520. -- y : y coordinate of rectangle to clear
  521. -- width : width of rectangle to clear
  522. -- height : height of rectangle to clear
  523. -- gdk_window_clear_area_e ()
  524. -- void gdk_window_clear_area_e (GdkWindow *window,
  525. -- gint x,
  526. -- gint y,
  527. -- gint width,
  528. -- gint height);
  529. -- Like gdk_window_clear_area(), but also generates an expose event for the cleared area.
  530. -- This function has a stupid name because it dates back to the mists time, pre-GDK-1.0.
  531. -- window : a GdkWindow
  532. -- x : x coordinate of rectangle to clear
  533. -- y : y coordinate of rectangle to clear
  534. -- width : width of rectangle to clear
  535. -- height : height of rectangle to clear
  536. -- gdk_window_copy_area()
  537. -- #define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height)
  538. -- Warning
  539. -- gdk_window_copy_area is deprecated and should not be used in newly-written code.
  540. -- Deprecated equivalent to gdk_draw_drawable(), see that function for docs
  541. -- drawable : a GdkDrawable
  542. -- gc : a GdkGC sharing the drawable's visual and colormap
  543. -- x : X position in drawable where the rectangle should be drawn
  544. -- y : Y position in drawable where the rectangle should be drawn
  545. -- source_drawable : the source GdkDrawable, which may be the same as drawable
  546. -- source_x : X position in src of rectangle to draw
  547. -- source_y : Y position in src of rectangle to draw
  548. -- width : width of rectangle to draw, or -1 for entire src width
  549. -- height : height of rectangle to draw, or -1 for entire src height
  550. -- gdk_window_raise ()
  551. -- void gdk_window_raise (GdkWindow *window);
  552. -- Raises window to the top of the Z-order (stacking order), so that other windows with the same parent window appear below window. This is true whether or not the windows are visible.
  553. -- If window is a toplevel, the window manager may choose to deny the request to move the window in the Z-order, gdk_window_raise() only requests the restack, does not guarantee it.
  554. -- window : a GdkWindow
  555. -- gdk_window_lower ()
  556. -- void gdk_window_lower (GdkWindow *window);
  557. -- Lowers window to the bottom of the Z-order (stacking order), so that other windows with the same parent window appear above window. This is true whether or not the other windows are visible.
  558. -- If window is a toplevel, the window manager may choose to deny the request to move the window in the Z-order, gdk_window_lower() only requests the restack, does not guarantee it.
  559. -- Note that gdk_window_show() raises the window again, so don't call this function before gdk_window_show(). (Try gdk_window_show_unraised().)
  560. -- window : a GdkWindow
  561. -- gdk_window_focus ()
  562. -- void gdk_window_focus (GdkWindow *window,
  563. -- guint32 timestamp);
  564. -- Sets keyboard focus to window. In most cases, gtk_window_present() should be used on a GtkWindow, rather than calling this function.
  565. -- window : a GdkWindow
  566. -- timestamp : timestamp of the event triggering the window focus
  567. -- gdk_window_register_dnd ()
  568. -- void gdk_window_register_dnd (GdkWindow *window);
  569. -- Registers a window as a potential drop destination.
  570. -- window : a GdkWindow.
  571. -- gdk_window_begin_resize_drag ()
  572. -- void gdk_window_begin_resize_drag (GdkWindow *window,
  573. -- GdkWindowEdge edge,
  574. -- gint button,
  575. -- gint root_x,
  576. -- gint root_y,
  577. -- guint32 timestamp);
  578. -- Begins a window resize operation (for a toplevel window). You might use this function to implement a "window resize grip," for example; in fact GtkStatusbar uses it. The function works best with window managers that support the Extended Window Manager Hints, but has a fallback implementation for other window managers.
  579. -- window : a toplevel GdkWindow
  580. -- edge : the edge or corner from which the drag is started
  581. -- button : the button being used to drag
  582. -- root_x : root window X coordinate of mouse click that began the drag
  583. -- root_y : root window Y coordinate of mouse click that began the drag
  584. -- timestamp : timestamp of mouse click that began the drag (use gdk_event_get_time())
  585. -- gdk_window_begin_move_drag ()
  586. -- void gdk_window_begin_move_drag (GdkWindow *window,
  587. -- gint button,
  588. -- gint root_x,
  589. -- gint root_y,
  590. -- guint32 timestamp);
  591. -- Begins a window move operation (for a toplevel window). You might use this function to implement a "window move grip," for example. The function works best with window managers that support the Extended Window Manager Hints, but has a fallback implementation for other window managers.
  592. -- window : a toplevel GdkWindow
  593. -- button : the button being used to drag
  594. -- root_x : root window X coordinate of mouse click that began the drag
  595. -- root_y : root window Y coordinate of mouse click that began the drag
  596. -- timestamp : timestamp of mouse click that began the drag
  597. -- gdk_window_constrain_size ()
  598. -- void gdk_window_constrain_size (GdkGeometry *geometry,
  599. -- guint flags,
  600. -- gint width,
  601. -- gint height,
  602. -- gint *new_width,
  603. -- gint *new_height);
  604. -- Constrains a desired width and height according to a set of geometry hints (such as minimum and maximum size).
  605. -- geometry : a GdkGeometry structure
  606. -- flags : a mask indicating what portions of geometry are set
  607. -- width : desired width of window
  608. -- height : desired height of the window
  609. -- new_width : location to store resulting width
  610. -- new_height : location to store resulting height
  611. -- gdk_window_begin_paint_rect ()
  612. -- void gdk_window_begin_paint_rect (GdkWindow *window,
  613. -- GdkRectangle *rectangle);
  614. -- A convenience wrapper around gdk_window_begin_paint_region() which creates a rectangular region for you. See gdk_window_begin_paint_region() for details.
  615. -- window : a GdkWindow
  616. -- rectangle : rectangle you intend to draw to
  617. -- gdk_window_begin_paint_region ()
  618. -- void gdk_window_begin_paint_region (GdkWindow *window,
  619. -- GdkRegion *region);
  620. -- Indicates that you are beginning the process of redrawing region. A backing store (offscreen buffer) large enough to contain region will be created. The backing store will be initialized with the background color or background pixmap for window. Then, all drawing operations performed on window will be diverted to the backing store. When you call gdk_window_end_paint(), the backing store will be copied to window, making it visible onscreen. Only the part of window contained in region will be modified; that is, drawing operations are clipped to region.
  621. -- The net result of all this is to remove flicker, because the user sees the finished product appear all at once when you call gdk_window_end_paint(). If you draw to window directly without calling gdk_window_begin_paint_region(), the user may see flicker as individual drawing operations are performed in sequence. The clipping and background-initializing features of gdk_window_begin_paint_region() are conveniences for the programmer, so you can avoid doing that work yourself.
  622. -- When using GTK+, the widget system automatically places calls to gdk_window_begin_paint_region() and gdk_window_end_paint() around emissions of the expose_event signal. That is, if you're writing an expose event handler, you can assume that the exposed area in GdkEventExpose has already been cleared to the window background, is already set as the clip region, and already has a backing store. Therefore in most cases, application code need not call gdk_window_begin_paint_region(). (You can disable the automatic calls around expose events on a widget-by-widget basis by calling gtk_widget_set_double_buffered().)
  623. -- If you call this function multiple times before calling the matching gdk_window_end_paint(), the backing stores are pushed onto a stack. gdk_window_end_paint() copies the topmost backing store onscreen, subtracts the topmost region from all other regions in the stack, and pops the stack. All drawing operations affect only the topmost backing store in the stack. One matching call to gdk_window_end_paint() is required for each call to gdk_window_begin_paint_region().
  624. -- window : a GdkWindow
  625. -- region : region you intend to draw to
  626. -- gdk_window_end_paint ()
  627. -- void gdk_window_end_paint (GdkWindow *window);
  628. -- Indicates that the backing store created by the most recent call to gdk_window_begin_paint_region() should be copied onscreen and deleted, leaving the next-most-recent backing store or no backing store at all as the active paint region. See gdk_window_begin_paint_region() for full details. It is an error to call this function without a matching gdk_window_begin_paint_region() first.
  629. -- window : a GdkWindow
  630. -- gdk_window_invalidate_rect ()
  631. -- void gdk_window_invalidate_rect (GdkWindow *window,
  632. -- GdkRectangle *rect,
  633. -- gboolean invalidate_children);
  634. -- A convenience wrapper around gdk_window_invalidate_region() which invalidates a rectangular region. See gdk_window_invalidate_region() for details.
  635. -- window : a GdkWindow
  636. -- rect : rectangle to invalidate
  637. -- invalidate_children : whether to also invalidate child windows
  638. -- gdk_window_invalidate_region ()
  639. -- void gdk_window_invalidate_region (GdkWindow *window,
  640. -- GdkRegion *region,
  641. -- gboolean invalidate_children);
  642. -- Adds region to the update area for window. The update area is the region that needs to be redrawn, or "dirty region." The call gdk_window_process_updates() sends one or more expose events to the window, which together cover the entire update area. An application would normally redraw the contents of window in response to those expose events.
  643. -- GDK will call gdk_window_process_all_updates() on your behalf whenever your program returns to the main loop and becomes idle, so normally there's no need to do that manually, you just need to invalidate regions that you know should be redrawn.
  644. -- The invalidate_children parameter controls whether the region of each child window that intersects region will also be invalidated. If FALSE, then the update area for child windows will remain unaffected. See gdk_window_invalidate_maybe_recurse if you need fine grained control over which children are invalidated.
  645. -- window : a GdkWindow
  646. -- region : a GdkRegion
  647. -- invalidate_children : TRUE to also invalidate child windows
  648. -- gdk_window_invalidate_maybe_recurse ()
  649. -- void gdk_window_invalidate_maybe_recurse
  650. -- (GdkWindow *window,
  651. -- GdkRegion *region,
  652. -- gboolean (*child_func) (GdkWindow *, gpointer),
  653. -- gpointer user_data);
  654. -- Adds region to the update area for window. The update area is the region that needs to be redrawn, or "dirty region." The call gdk_window_process_updates() sends one or more expose events to the window, which together cover the entire update area. An application would normally redraw the contents of window in response to those expose events.
  655. -- GDK will call gdk_window_process_all_updates() on your behalf whenever your program returns to the main loop and becomes idle, so normally there's no need to do that manually, you just need to invalidate regions that you know should be redrawn.
  656. -- The child_func parameter controls whether the region of each child window that intersects region will also be invalidated. Only children for which child_func returns TRUE will have the area invalidated.
  657. -- window : a GdkWindow
  658. -- region : a GdkRegion
  659. -- child_func : function to use to decide if to recurse to a child, NULL means never recurse.
  660. -- user_data : data passed to child_func
  661. -- gdk_window_get_update_area ()
  662. -- GdkRegion* gdk_window_get_update_area (GdkWindow *window);
  663. -- Transfers ownership of the update area from window to the caller of the function. That is, after calling this function, window will no longer have an invalid/dirty region; the update area is removed from window and handed to you. If a window has no update area, gdk_window_get_update_area() returns NULL. You are responsible for calling gdk_region_destroy() on the returned region if it's non-NULL.
  664. -- window : a GdkWindow
  665. -- Returns : the update area for window
  666. -- gdk_window_freeze_updates ()
  667. -- void gdk_window_freeze_updates (GdkWindow *window);
  668. -- Temporarily freezes a window such that it won't receive expose events. The window will begin receiving expose events again when gdk_window_thaw_updates() is called. If gdk_window_freeze_updates() has been called more than once, gdk_window_thaw_updates() must be called an equal number of times to begin processing exposes.
  669. -- window : a GdkWindow
  670. -- gdk_window_thaw_updates ()
  671. -- void gdk_window_thaw_updates (GdkWindow *window);
  672. -- Thaws a window frozen with gdk_window_freeze_updates().
  673. -- window : a GdkWindow
  674. -- gdk_window_process_all_updates ()
  675. -- void gdk_window_process_all_updates (void);
  676. -- Calls gdk_window_process_updates() for all windows (see GdkWindow) in the application.
  677. -- gdk_window_process_updates ()
  678. -- void gdk_window_process_updates (GdkWindow *window,
  679. -- gboolean update_children);
  680. -- Sends one or more expose events to window. The areas in each expose event will cover the entire update area for the window (see gdk_window_invalidate_region() for details). Normally GDK calls gdk_window_process_all_updates() on your behalf, so there's no need to call this function unless you want to force expose events to be delivered immediately and synchronously (vs. the usual case, where GDK delivers them in an idle handler). Occasionally this is useful to produce nicer scrolling behavior, for example.
  681. -- window : a GdkWindow
  682. -- update_children : whether to also process updates for child windows
  683. -- gdk_window_set_debug_updates ()
  684. -- void gdk_window_set_debug_updates (gboolean setting);
  685. -- With update debugging enabled, calls to gdk_window_invalidate_region() clear the invalidated region of the screen to a noticeable color, and GDK pauses for a short time before sending exposes to windows during gdk_window_process_updates(). The net effect is that you can see the invalid region for each window and watch redraws as they occur. This allows you to diagnose inefficiencies in your application.
  686. -- In essence, because the GDK rendering model prevents all flicker, if you are redrawing the same region 400 times you may never notice, aside from noticing a speed problem. Enabling update debugging causes GTK to flicker slowly and noticeably, so you can see exactly what's being redrawn when, in what order.
  687. -- The --gtk-debug=updates command line option passed to GTK+ programs enables this debug option at application startup time. That's usually more useful than calling gdk_window_set_debug_updates() yourself, though you might want to use this function to enable updates sometime after application startup time.
  688. -- setting : TRUE to turn on update debugging
  689. -- gdk_window_get_internal_paint_info ()
  690. -- void gdk_window_get_internal_paint_info
  691. -- (GdkWindow *window,
  692. -- GdkDrawable **real_drawable,
  693. -- gint *x_offset,
  694. -- gint *y_offset);
  695. -- If you bypass the GDK layer and use windowing system primitives to draw directly onto a GdkWindow, then you need to deal with two details: there may be an offset between GDK coordinates and windowing system coordinates, and GDK may have redirected drawing to a offscreen pixmap as the result of a gdk_window_begin_paint_region() calls. This function allows retrieving the information you need to compensate for these effects.
  696. -- This function exposes details of the GDK implementation, and is thus likely to change in future releases of GDK.
  697. -- window : a GdkWindow
  698. -- real_drawable : location to store the drawable to which drawing should be done.
  699. -- x_offset : location to store the X offset between coordinates in window, and the underlying window system primitive coordinates for *real_drawable.
  700. -- y_offset : location to store the Y offset between coordinates in window, and the underlying window system primitive coordinates for *real_drawable.
  701. -- gdk_window_enable_synchronized_configure ()
  702. -- void gdk_window_enable_synchronized_configure
  703. -- (GdkWindow *window);
  704. -- Indicates that the application will cooperate with the window system in synchronizing the window repaint with the window manager during resizing operations. After an application calls this function, it must call gdk_window_configure_finished() every time it has finished all processing associated with a set of Configure events. Toplevel GTK+ windows automatically use this protocol.
  705. -- On X, calling this function makes window participate in the _NET_WM_SYNC_REQUEST window manager protocol.
  706. -- window : a toplevel GdkWindow
  707. -- Since 2.6
  708. -- gdk_window_configure_finished ()
  709. -- void gdk_window_configure_finished (GdkWindow *window);
  710. -- Signal to the window system that the application has finished handling Configure events it has received. Window Managers can use this to better synchronize the frame repaint with the application. GTK+ applications will automatically call this function when appropriate.
  711. -- This function can only be called if gdk_window_enable_synchronized_configure() was called previously.
  712. -- window : a toplevel GdkWindow
  713. -- Since 2.6
  714. -- gdk_window_set_user_data ()
  715. -- void gdk_window_set_user_data (GdkWindow *window,
  716. -- gpointer user_data);
  717. -- For most purposes this function is deprecated in favor of g_object_set_data(). However, for historical reasons GTK+ stores the GtkWidget that owns a GdkWindow as user data on the GdkWindow. So, custom widget implementations should use this function for that. If GTK+ receives an event for a GdkWindow, and the user data for the window is non-NULL, GTK+ will assume the user data is a GtkWidget, and forward the event to that widget.
  718. -- window : a GdkWindow
  719. -- user_data : user data
  720. -- gdk_window_set_override_redirect ()
  721. -- void gdk_window_set_override_redirect
  722. -- (GdkWindow *window,
  723. -- gboolean override_redirect);
  724. -- An override redirect window is not under the control of the window manager. This means it won't have a titlebar, won't be minimizable, etc. - it will be entirely under the control of the application. The window manager can't see the override redirect window at all.
  725. -- Override redirect should only be used for short-lived temporary windows, such as popup menus. GtkMenu uses an override redirect window in its implementation, for example.
  726. -- window : a toplevel GdkWindow
  727. -- override_redirect : TRUE if window should be override redirect
  728. -- gdk_window_set_accept_focus ()
  729. -- void gdk_window_set_accept_focus (GdkWindow *window,
  730. -- gboolean accept_focus);
  731. -- Setting accept_focus to FALSE hints the desktop environment that the window doesn't want to receive input focus.
  732. -- On X, it is the responsibility of the window manager to interpret this hint. ICCCM-compliant window manager usually respect it.
  733. -- window : a toplevel GdkWindow
  734. -- accept_focus : TRUE if the window should receive input focus
  735. -- Since 2.4
  736. -- gdk_window_set_focus_on_map ()
  737. -- void gdk_window_set_focus_on_map (GdkWindow *window,
  738. -- gboolean focus_on_map);
  739. -- Setting focus_on_map to FALSE hints the desktop environment that the window doesn't want to receive input focus when it is mapped. focus_on_map should be turned off for windows that aren't triggered interactively (such as popups from network activity).
  740. -- On X, it is the responsibility of the window manager to interpret this hint. Window managers following the freedesktop.org window manager extension specification should respect it.
  741. -- window : a toplevel GdkWindow
  742. -- focus_on_map : TRUE if the window should receive input focus when mapped
  743. -- Since 2.6
  744. -- gdk_window_add_filter ()
  745. -- void gdk_window_add_filter (GdkWindow *window,
  746. -- GdkFilterFunc function,
  747. -- gpointer data);
  748. -- Adds an event filter to window, allowing you to intercept events before they reach GDK. This is a low-level operation and makes it easy to break GDK and/or GTK+, so you have to know what you're doing. Pass NULL for window to get all events for all windows, instead of events for a specific window.
  749. -- window : a GdkWindow
  750. -- function : filter callback
  751. -- data : data to pass to filter callback
  752. -- gdk_window_remove_filter ()
  753. -- void gdk_window_remove_filter (GdkWindow *window,
  754. -- GdkFilterFunc function,
  755. -- gpointer data);
  756. -- Remove a filter previously added with gdk_window_add_filter().
  757. -- window : a GdkWindow
  758. -- function : previously-added filter function
  759. -- data : user data for previously-added filter function
  760. -- GdkFilterFunc ()
  761. -- GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
  762. -- GdkEvent *event,
  763. -- gpointer data);
  764. -- Specifies the type of function used to filter native events before they are converted to GDK events.
  765. -- When a filter is called, event is unpopulated, except for event->window. The filter may translate the native event to a GDK event and store the result in event, or handle it without translation. If the filter translates the event and processing should continue, it should return GDK_FILTER_TRANSLATE.
  766. -- xevent : the native event to filter.
  767. -- event : the GDK event to which the X event will be translated.
  768. -- data : user data set when the filter was installed.
  769. -- Returns : a GdkFilterReturn value.
  770. -- enum GdkFilterReturn
  771. -- typedef enum {
  772. -- GDK_FILTER_CONTINUE, /* Event not handled, continue processesing */
  773. -- GDK_FILTER_TRANSLATE, /* Native event translated into a GDK event and
  774. -- stored in the "event" structure that was
  775. -- passed in */
  776. -- GDK_FILTER_REMOVE /* Terminate processing, removing event */
  777. -- } GdkFilterReturn;
  778. -- Specifies the result of applying a GdkFilterFunc to a native event.
  779. -- GDK_FILTER_CONTINUE event not handled, continue processing.
  780. -- GDK_FILTER_TRANSLATE native event translated into a GDK event and stored in the event structure that was passed in.
  781. -- GDK_FILTER_REMOVE event handled, terminate processing.
  782. -- GdkXEvent
  783. -- typedef void GdkXEvent; /* Can be cast to window system specific
  784. -- Used to represent native events (XEvents for the X11 backend, MSGs for Win32).
  785. -- gdk_window_shape_combine_mask ()
  786. -- void gdk_window_shape_combine_mask (GdkWindow *window,
  787. -- GdkBitmap *mask,
  788. -- gint x,
  789. -- gint y);
  790. -- Applies a shape mask to window. Pixels in window corresponding to set bits in the mask will be visible; pixels in window corresponding to unset bits in the mask will be transparent. This gives a non-rectangular window.
  791. -- If mask is NULL, the shape mask will be unset, and the x/y parameters are not used.
  792. -- On the X11 platform, this uses an X server extension which is widely available on most common platforms, but not available on very old X servers, and occasionally the implementation will be buggy. On servers without the shape extension, this function will do nothing.
  793. -- This function works on both toplevel and child windows.
  794. -- window : a GdkWindow
  795. -- mask : shape mask
  796. -- x : X position of shape mask with respect to window
  797. -- y : Y position of shape mask with respect to window
  798. -- gdk_window_shape_combine_region ()
  799. -- void gdk_window_shape_combine_region (GdkWindow *window,
  800. -- GdkRegion *shape_region,
  801. -- gint offset_x,
  802. -- gint offset_y);
  803. -- Makes pixels in window outside shape_region be transparent, so that the window may be nonrectangular. See also gdk_window_shape_combine_mask() to use a bitmap as the mask.
  804. -- If shape_region is NULL, the shape will be unset, so the whole window will be opaque again. offset_x and offset_y are ignored if shape_region is NULL.
  805. -- On the X11 platform, this uses an X server extension which is widely available on most common platforms, but not available on very old X servers, and occasionally the implementation will be buggy. On servers without the shape extension, this function will do nothing.
  806. -- This function works on both toplevel and child windows.
  807. -- window : a GdkWindow
  808. -- shape_region : region of window to be non-transparent
  809. -- offset_x : X position of shape_region in window coordinates
  810. -- offset_y : Y position of shape_region in window coordinates
  811. -- gdk_window_set_child_shapes ()
  812. -- void gdk_window_set_child_shapes (GdkWindow *window);
  813. -- Sets the shape mask of window to the union of shape masks for all children of window, ignoring the shape mask of window itself. Contrast with gdk_window_merge_child_shapes() which includes the shape mask of window in the masks to be merged.
  814. -- window : a GdkWindow
  815. -- gdk_window_merge_child_shapes ()
  816. -- void gdk_window_merge_child_shapes (GdkWindow *window);
  817. -- Merges the shape masks for any child windows into the shape mask for window. i.e. the union of all masks for window and its children will become the new mask for window. See gdk_window_shape_combine_mask().
  818. -- This function is distinct from gdk_window_set_child_shapes() because it includes window's shape mask in the set of shapes to be merged.
  819. -- window : a GdkWindow
  820. -- gdk_window_set_static_gravities ()
  821. -- gboolean gdk_window_set_static_gravities (GdkWindow *window,
  822. -- gboolean use_static);
  823. -- Set the bit gravity of the given window to static, and flag it so all children get static subwindow gravity. This is used if you are implementing scary features that involve deep knowledge of the windowing system. Don't worry about it unless you have to.
  824. -- window : a GdkWindow
  825. -- use_static : TRUE to turn on static gravity
  826. -- Returns : TRUE if the server supports static gravity
  827. -- gdk_window_set_hints ()
  828. -- void gdk_window_set_hints (GdkWindow *window,
  829. -- gint x,
  830. -- gint y,
  831. -- gint min_width,
  832. -- gint min_height,
  833. -- gint max_width,
  834. -- gint max_height,
  835. -- gint flags);
  836. -- Warning
  837. -- gdk_window_set_hints is deprecated and should not be used in newly-written code.
  838. -- This function is broken and useless and you should ignore it. If using GTK+, use functions such as gtk_window_resize(), gtk_window_set_size_request(), gtk_window_move(), gtk_window_parse_geometry(), and gtk_window_set_geometry_hints(), depending on what you're trying to do.
  839. -- If using GDK directly, use gdk_window_set_geometry_hints().
  840. -- window : a GdkWindow
  841. -- x : ignored field, does not matter
  842. -- y : ignored field, does not matter
  843. -- min_width : minimum width hint
  844. -- min_height : minimum height hint
  845. -- max_width : max width hint
  846. -- max_height : max height hint
  847. -- flags : logical OR of GDK_HINT_POS, GDK_HINT_MIN_SIZE, and/or GDK_HINT_MAX_SIZE
  848. -- gdk_window_set_title ()
  849. -- void gdk_window_set_title (GdkWindow *window,
  850. -- const gchar *title);
  851. -- Sets the title of a toplevel window, to be displayed in the titlebar. If you haven't explicitly set the icon name for the window (using gdk_window_set_icon_name()), the icon name will be set to title as well. title must be in UTF-8 encoding (as with all user-readable strings in GDK/GTK+). title may not be NULL.
  852. -- window : a toplevel GdkWindow
  853. -- title : title of window
  854. -- gdk_window_set_background ()
  855. -- void gdk_window_set_background (GdkWindow *window,
  856. -- const GdkColor *color);
  857. -- Sets the background color of window. (However, when using GTK+, set the background of a widget with gtk_widget_modify_bg() - if you're an application - or gtk_style_set_background() - if you're implementing a custom widget.)
  858. -- The color must be allocated; gdk_rgb_find_color() is the best way to allocate a color.
  859. -- See also gdk_window_set_back_pixmap().
  860. -- window : a GdkWindow
  861. -- color : an allocated GdkColor
  862. -- gdk_window_set_back_pixmap ()
  863. -- void gdk_window_set_back_pixmap (GdkWindow *window,
  864. -- GdkPixmap *pixmap,
  865. -- gboolean parent_relative);
  866. -- Sets the background pixmap of window. May also be used to set a background of "None" on window, by setting a background pixmap of NULL. A background pixmap will be tiled, positioning the first tile at the origin of window, or if parent_relative is TRUE, the tiling will be done based on the origin of the parent window (useful to align tiles in a parent with tiles in a child).
  867. -- A background pixmap of NULL means that the window will have no background. A window with no background will never have its background filled by the windowing system, instead the window will contain whatever pixels were already in the corresponding area of the display.
  868. -- The windowing system will normally fill a window with its background when the window is obscu