1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
7 <!-- ##### SECTION Long_Description ##### -->
12 <!-- ##### SECTION See_Also ##### -->
17 <!-- ##### STRUCT GdkWindowAttr ##### -->
37 <!-- ##### STRUCT GdkWindow ##### -->
44 <!-- ##### ENUM GdkWindowType ##### -->
56 <!-- ##### ENUM GdkWindowClass ##### -->
64 <!-- ##### ENUM GdkWindowAttributesType ##### -->
78 <!-- ##### ENUM GdkWindowHints ##### -->
80 Used to indicate which fields of a #GdkGeometry struct should be paid attention
81 to. Also, the presence/absence of @GDK_HINT_POS, @GDK_HINT_USER_POS, and
82 @GDK_HINT_USER_SIZE is significant, though they don't directly refer to
83 #GdkGeometry fields. @GDK_HINT_USER_POS will be set automatically by #GtkWindow
84 if you call gtk_window_move(). @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE
85 should be set if the user specified a size/position using a --geometry
86 command-line argument; gtk_window_parse_geometry() automatically sets these
90 @GDK_HINT_POS: indicates that the program has positioned the window
91 @GDK_HINT_MIN_SIZE: min size fields are set
92 @GDK_HINT_MAX_SIZE: max size fields are set
93 @GDK_HINT_BASE_SIZE: base size fields are set
94 @GDK_HINT_ASPECT: aspect ratio fields are set
95 @GDK_HINT_RESIZE_INC: resize increment fields are set
96 @GDK_HINT_WIN_GRAVITY: window gravity field is set
97 @GDK_HINT_USER_POS: indicates that the window's position was explicitly set by the user
98 @GDK_HINT_USER_SIZE: indicates that the window's size was explicitly set by the user
100 <!-- ##### STRUCT GdkGeometry ##### -->
102 The #GdkGeometry struct gives the window manager information about
103 a window's geometry constraints. Normally you would set these on
104 the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow
105 then sets the hints on the #GdkWindow it creates.
109 gdk_window_set_geometry_hints() expects the hints to be fully valid already and
110 simply passes them to the window manager; in contrast,
111 gtk_window_set_geometry_hints() performs some interpretation. For example,
112 #GtkWindow will apply the hints to the geometry widget instead of the toplevel
113 window, if you set a geometry widget. Also, the
114 min_width/min_height/max_width/max_height fields may be set to -1, and
115 #GtkWindow will substitute the size request of the window or geometry widget. If
116 the minimum size hint is not provided, #GtkWindow will use its requisition as
117 the minimum size. If the minimum size is provided and a geometry widget is set,
118 #GtkWindow will take the minimum size as the minimum size of the geometry widget
119 rather than the entire window. The base size is treated similarly.
123 The canonical use-case for gtk_window_set_geometry_hints() is to get a terminal
124 widget to resize properly. Here, the terminal text area should be the geometry
125 widget; #GtkWindow will then automatically set the base size to the size of
126 other widgets in the terminal window, such as the menubar and scrollbar. Then,
127 the width_inc and height_inc fields should be set to the size of one character
128 in the terminal. Finally, the base size should be set to the size of one
129 character. The net effect is that the minimum size of the terminal
130 will have a 1x1 character terminal area, and only terminal sizes on
131 the "character grid" will be allowed.
135 Here's an example of how the terminal example would be implemented, assuming
136 a terminal area widget called "terminal" and a toplevel window "toplevel":
140 hints.base_width = terminal->char_width;
141 hints.base_height = terminal->char_height;
142 hints.min_width = terminal->char_width;
143 hints.min_height = terminal->char_height;
144 hints.width_inc = terminal->char_width;
145 hints.height_inc = terminal->char_height;
147 gtk_window_set_geometry_hints (GTK_WINDOW (toplevel),
148 GTK_WIDGET (terminal),
150 GDK_HINT_RESIZE_INC |
157 The other useful fields are the @min_aspect and @max_aspect fields; these
158 contain a width/height ratio as a floating point number. If a geometry widget is
159 set, the aspect applies to the geometry widget rather than the entire window.
160 The most common use of these hints is probably to set @min_aspect and
161 @max_aspect to the same value, thus forcing the window to keep a constant aspect
165 @min_width: minimum width of window (or -1 to use requisition, with #GtkWindow only)
166 @min_height minimum height of window (or -1 to use requisition, with #GtkWindow only)
167 @max_width: maximum width of window (or -1 to use requisition, with #GtkWindow only)
168 @max_height: maximum height of window (or -1 to use requisition, with #GtkWindow only)
169 @base_width: allowed window widths are base_width + width_inc * N where N is any integer (-1 allowed with #GtkWindow)
170 @base_height: allowed window widths are base_height + height_inc * N where N is any integer (-1 allowed with #GtkWindow)
171 @width_inc: width resize increment
172 @height_inc: height resize increment
173 @min_aspect: minimum width/height ratio
174 @max_aspect: maximum width/height ratio
175 @win_gravity: window gravity, see gtk_window_set_gravity()
177 <!-- ##### ENUM GdkGravity ##### -->
182 @GDK_GRAVITY_NORTH_WEST:
184 @GDK_GRAVITY_NORTH_EAST:
188 @GDK_GRAVITY_SOUTH_WEST:
190 @GDK_GRAVITY_SOUTH_EAST:
193 <!-- ##### ENUM GdkWindowEdge ##### -->
198 @GDK_WINDOW_EDGE_NORTH_WEST:
199 @GDK_WINDOW_EDGE_NORTH:
200 @GDK_WINDOW_EDGE_NORTH_EAST:
201 @GDK_WINDOW_EDGE_WEST:
202 @GDK_WINDOW_EDGE_EAST:
203 @GDK_WINDOW_EDGE_SOUTH_WEST:
204 @GDK_WINDOW_EDGE_SOUTH:
205 @GDK_WINDOW_EDGE_SOUTH_EAST:
207 <!-- ##### ENUM GdkWindowTypeHint ##### -->
212 @GDK_WINDOW_TYPE_HINT_NORMAL:
213 @GDK_WINDOW_TYPE_HINT_DIALOG:
214 @GDK_WINDOW_TYPE_HINT_MENU:
215 @GDK_WINDOW_TYPE_HINT_TOOLBAR:
217 <!-- ##### FUNCTION gdk_window_new ##### -->
228 <!-- ##### FUNCTION gdk_window_destroy ##### -->
236 <!-- ##### MACRO gdk_window_ref ##### -->
242 <!-- # Unused Parameters # -->
246 <!-- ##### MACRO gdk_window_unref ##### -->
251 <!-- # Unused Parameters # -->
255 <!-- ##### FUNCTION gdk_window_get_window_type ##### -->
264 <!-- ##### FUNCTION gdk_window_at_pointer ##### -->
274 <!-- ##### FUNCTION gdk_window_show ##### -->
282 <!-- ##### FUNCTION gdk_window_hide ##### -->
290 <!-- ##### FUNCTION gdk_window_is_visible ##### -->
299 <!-- ##### FUNCTION gdk_window_is_viewable ##### -->
308 <!-- ##### FUNCTION gdk_window_get_state ##### -->
317 <!-- ##### FUNCTION gdk_window_withdraw ##### -->
325 <!-- ##### FUNCTION gdk_window_iconify ##### -->
333 <!-- ##### FUNCTION gdk_window_deiconify ##### -->
341 <!-- ##### FUNCTION gdk_window_stick ##### -->
349 <!-- ##### FUNCTION gdk_window_unstick ##### -->
357 <!-- ##### FUNCTION gdk_window_maximize ##### -->
365 <!-- ##### FUNCTION gdk_window_unmaximize ##### -->
373 <!-- ##### FUNCTION gdk_window_move ##### -->
383 <!-- ##### FUNCTION gdk_window_resize ##### -->
393 <!-- ##### FUNCTION gdk_window_move_resize ##### -->
405 <!-- ##### FUNCTION gdk_window_scroll ##### -->
415 <!-- ##### FUNCTION gdk_window_reparent ##### -->
426 <!-- ##### FUNCTION gdk_window_clear ##### -->
434 <!-- ##### FUNCTION gdk_window_clear_area ##### -->
446 <!-- ##### FUNCTION gdk_window_clear_area_e ##### -->
458 <!-- ##### MACRO gdk_window_copy_area ##### -->
472 <!-- # Unused Parameters # -->
477 <!-- ##### FUNCTION gdk_window_raise ##### -->
485 <!-- ##### FUNCTION gdk_window_lower ##### -->
493 <!-- ##### FUNCTION gdk_window_focus ##### -->
502 <!-- ##### FUNCTION gdk_window_register_dnd ##### -->
510 <!-- ##### FUNCTION gdk_window_begin_resize_drag ##### -->
523 <!-- ##### FUNCTION gdk_window_begin_move_drag ##### -->
535 <!-- ##### FUNCTION gdk_window_constrain_size ##### -->
548 <!-- ##### FUNCTION gdk_window_begin_paint_rect ##### -->
557 <!-- ##### FUNCTION gdk_window_begin_paint_region ##### -->
566 <!-- ##### FUNCTION gdk_window_end_paint ##### -->
574 <!-- ##### FUNCTION gdk_window_invalidate_rect ##### -->
581 @invalidate_children:
584 <!-- ##### FUNCTION gdk_window_invalidate_region ##### -->
591 @invalidate_children:
594 <!-- ##### FUNCTION gdk_window_get_update_area ##### -->
603 <!-- ##### FUNCTION gdk_window_freeze_updates ##### -->
611 <!-- ##### FUNCTION gdk_window_thaw_updates ##### -->
619 <!-- ##### FUNCTION gdk_window_process_all_updates ##### -->
626 <!-- ##### FUNCTION gdk_window_process_updates ##### -->
635 <!-- ##### FUNCTION gdk_window_set_debug_updates ##### -->
643 <!-- ##### FUNCTION gdk_window_set_user_data ##### -->
652 <!-- ##### FUNCTION gdk_window_set_override_redirect ##### -->
661 <!-- ##### FUNCTION gdk_window_add_filter ##### -->
671 <!-- ##### FUNCTION gdk_window_remove_filter ##### -->
681 <!-- ##### USER_FUNCTION GdkFilterFunc ##### -->
692 <!-- ##### ENUM GdkFilterReturn ##### -->
697 @GDK_FILTER_CONTINUE:
698 @GDK_FILTER_TRANSLATE:
701 <!-- ##### TYPEDEF GdkXEvent ##### -->
707 <!-- ##### FUNCTION gdk_window_shape_combine_mask ##### -->
718 <!-- ##### FUNCTION gdk_window_shape_combine_region ##### -->
729 <!-- ##### FUNCTION gdk_window_set_child_shapes ##### -->
737 <!-- ##### FUNCTION gdk_window_merge_child_shapes ##### -->
745 <!-- ##### FUNCTION gdk_window_set_static_gravities ##### -->
755 <!-- ##### FUNCTION gdk_window_set_hints ##### -->
770 <!-- ##### FUNCTION gdk_window_set_title ##### -->
779 <!-- ##### FUNCTION gdk_window_set_background ##### -->
788 <!-- ##### FUNCTION gdk_window_set_back_pixmap ##### -->
798 <!-- ##### MACRO GDK_PARENT_RELATIVE ##### -->
805 <!-- ##### FUNCTION gdk_window_set_cursor ##### -->
814 <!-- ##### MACRO gdk_window_set_colormap ##### -->
819 <!-- # Unused Parameters # -->
824 <!-- ##### FUNCTION gdk_window_get_user_data ##### -->
833 <!-- ##### FUNCTION gdk_window_get_geometry ##### -->
846 <!-- ##### FUNCTION gdk_window_set_geometry_hints ##### -->
856 <!-- ##### FUNCTION gdk_window_set_icon_list ##### -->
863 <!-- # Unused Parameters # -->
867 <!-- ##### FUNCTION gdk_window_set_modal_hint ##### -->
876 <!-- ##### FUNCTION gdk_window_set_type_hint ##### -->
885 <!-- ##### FUNCTION gdk_window_get_position ##### -->
895 <!-- ##### FUNCTION gdk_window_get_root_origin ##### -->
905 <!-- ##### FUNCTION gdk_window_get_frame_extents ##### -->
914 <!-- ##### MACRO gdk_window_get_size ##### -->
919 <!-- # Unused Parameters # -->
925 <!-- ##### MACRO gdk_window_get_visual ##### -->
931 <!-- # Unused Parameters # -->
935 <!-- ##### MACRO gdk_window_get_colormap ##### -->
941 <!-- # Unused Parameters # -->
945 <!-- ##### MACRO gdk_window_get_type ##### -->
951 <!-- # Unused Parameters # -->
955 <!-- ##### FUNCTION gdk_window_get_origin ##### -->
966 <!-- ##### FUNCTION gdk_window_get_deskrelative_origin ##### -->
977 <!-- ##### FUNCTION gdk_window_get_pointer ##### -->
989 <!-- ##### ENUM GdkModifierType ##### -->
1010 <!-- ##### FUNCTION gdk_window_get_parent ##### -->
1019 <!-- ##### FUNCTION gdk_window_get_toplevel ##### -->
1028 <!-- ##### FUNCTION gdk_window_get_children ##### -->
1037 <!-- ##### FUNCTION gdk_window_peek_children ##### -->
1046 <!-- ##### FUNCTION gdk_window_get_events ##### -->
1055 <!-- ##### FUNCTION gdk_window_set_events ##### -->
1064 <!-- ##### FUNCTION gdk_window_set_icon ##### -->
1075 <!-- ##### FUNCTION gdk_window_set_icon_name ##### -->
1084 <!-- ##### FUNCTION gdk_window_set_transient_for ##### -->
1093 <!-- ##### FUNCTION gdk_window_set_role ##### -->
1102 <!-- ##### FUNCTION gdk_window_set_group ##### -->
1111 <!-- ##### FUNCTION gdk_window_set_decorations ##### -->
1120 <!-- ##### FUNCTION gdk_window_get_decorations ##### -->
1125 @window: The window to get the decorations from
1126 @decorations: The window decorations will be written here
1127 @Returns: TRUE if the window has decorations set, FALSE otherwise.
1130 <!-- ##### ENUM GdkWMDecoration ##### -->
1140 @GDK_DECOR_MINIMIZE:
1141 @GDK_DECOR_MAXIMIZE:
1143 <!-- ##### FUNCTION gdk_window_set_functions ##### -->
1152 <!-- ##### ENUM GdkWMFunction ##### -->
1164 <!-- ##### FUNCTION gdk_window_get_toplevels ##### -->