logo top
Main Page   Widgets   Namespaces   Book  

Gdk::Window Class Reference

Inheritance diagram for Gdk::Window:

List of all members.


Detailed Description

A Gdk::Window is a rectangular region on the screen.

It's a low-level object, used to implement high-level objects such as Gtk::Widget and Gtk::Window on the GTK+ level. A Gtk::Window is a toplevel window, the thing a user might think of as a "window" with a titlebar and so on; a Gtk::Window may contain many Gdk::Windows. For example, each Gtk::Button has a Gdk::Window associated with it.

Public Member Functions

void add_filter (GdkFilterFunc function, gpointer data)
 Adds an event filter to window, allowing you to intercept events before they reach GDK.
void beep ()
 Emits a short beep associated to window in the appropriate display, if supported.
void begin_move_drag (int button, int root_x, int root_y, guint32 timestamp)
 Begins a window move operation (for a toplevel window).
void begin_paint_rect (Rectangle& rectangle)
 A convenience wrapper around gdk_window_begin_paint_region() which creates a rectangular region for you.
void begin_paint_region (const Region& region)
 Indicates that you are beginning the process of redrawing region.
void begin_resize_drag (WindowEdge edge, int button, int root_x, int root_y, guint32 timestamp)
 Begins a window resize operation (for a toplevel window).
void clear ()
 Clears an entire window to the background color or background pixmap.
void clear_area (int x, int y, int width, int height)
 Clears an area of window to the background color or background pixmap.
void clear_area_e (int x, int y, int width, int height)
 Like gdk_window_clear_area(), but also generates an expose event for the cleared area.
void configure_finished ()
 Signal to the window system that the application has finished handling Configure events it has received.
void deiconify ()
 Attempt to deiconify (unminimize) window.
void enable_synchronized_configure ()
 Indicates that the application will cooperate with the window system in synchronizing the window repaint with the window manager during resizing operations.
void end_paint ()
 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.
void focus (guint32 timestamp)
 Sets keyboard focus to window.
void freeze_updates ()
 Temporarily freezes a window such that it won't receive expose events.
void fullscreen ()
 Moves the window into fullscreen mode.
Glib::ListHandle< Glib::RefPtr
<const Window >> 
get_children () const
 Gets the list of children of window known to GDK.
Glib::ListHandle< Glib::RefPtr
<Window >> 
get_children ()
 Gets the list of children of window known to GDK.
bool get_decorations (WMDecoration& decorations) const
 Returns: true if the window has decorations set, false otherwise.
EventMask get_events () const
 Gets the event mask for window.
void get_frame_extents (Rectangle& rect)
 Obtains the bounding box of the window, including window manager titlebar/borders if any.
void get_geometry (int& x, int& y, int& width, int& height, int& depth) const
 Any of the return location arguments to this function may be 0, if you aren't interested in getting the value of that field.
Glib::RefPtr<const Windowget_group () const
 Return value: the group leader window for window.
Glib::RefPtr<Windowget_group ()
 Return value: the group leader window for window.
void get_internal_paint_info (Glib::RefPtr<Drawable>& real_drawable, int& x_offset, int& y_offset) const
int get_origin (int& x, int& y) const
 Obtains the position of a window in root window coordinates.
Glib::RefPtr<const Windowget_parent () const
 Obtains the parent of window, as known to GDK.
Glib::RefPtr<Windowget_parent ()
 Obtains the parent of window, as known to GDK.
Glib::RefPtr<Windowget_pointer (int& x, int& y, ModifierType& mask)
 Obtains the current pointer position and modifier state.
void get_position (int& x, int& y) const
 Obtains the position of the window as reported in the most-recently-processed Gdk::EventConfigure.
void get_root_origin (int& x, int& y) const
 Obtains the top-left corner of the window manager frame in root window coordinates.
WindowState get_state () const
 Gets the bitwise OR of the currently active window state flags, from the Gdk::WindowState enumeration.
Glib::RefPtr<const Windowget_toplevel () const
 Gets the toplevel window that's an ancestor of window.
Glib::RefPtr<Windowget_toplevel ()
 Gets the toplevel window that's an ancestor of window.
WindowTypeHint get_type_hint ()
 This function returns the type hint set for a window.
Region get_update_area ()
 Transfers ownership of the update area from window to the caller of the function.
void get_user_data (gpointer* data)
 Retrieves the user data for window, which is normally the widget that window belongs to.
WindowType get_window_type () const
 Gets the type of the window.
const GdkWindow* gobj () const
 Provides access to the underlying C GObject.
GdkWindow* gobj ()
 Provides access to the underlying C GObject.
GdkWindow* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void hide ()
 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.
void iconify ()
 Asks to iconify (minimize) window.
void input_shape_combine_mask (const Glib::RefPtr<Bitmap>& mask, int x, int y)
 Like gdk_window_shape_combine_mask(), but the shape applies only to event handling.
void input_shape_combine_region (const Region& shape_region, int offset_x, int offset_y)
 Like gdk_window_shape_combine_region(), but the shape applies only to event handling.
void invalidate_rect (const Rectangle& rect, bool invalidate_children)
 A convenience wrapper around gdk_window_invalidate_region() which invalidates a rectangular region.
void invalidate_region (const Region& region, bool invalidate_children=true)
 Adds region to the update area for window.
bool is_viewable () const
 Check if the window and all ancestors of the window are mapped.
bool is_visible () const
 Checks whether the window has been mapped (with gdk_window_show() or gdk_window_show_unraised()).
GrabStatus keyboard_grab (bool owner_events, guint32 timestamp)
void lower ()
 Lowers window to the bottom of the Z-order (stacking order), so that other windows with the same parent window appear above window.
void maximize ()
 Maximizes the window.
void merge_child_input_shapes ()
 Merges the input shape masks for any child windows into the input shape mask for window.
void merge_child_shapes ()
 Merges the shape masks for any child windows into the shape mask for window.
void move (int x, int y)
 Repositions a window relative to its parent window.
void move_region (const Region& region, int dx, int dy)
 Move the part of window indicated by region by dy pixels in the Y direction and dx pixels in the X direction.
void move_resize (int x, int y, int width, int height)
 Equivalent to calling gdk_window_move() and gdk_window_resize(), except that both operations are performed at once, avoiding strange visual effects.
GrabStatus pointer_grab (bool owner_events, EventMask event_mask, guint32 timestamp)
 Grabs the pointer to a specific window.
GrabStatus pointer_grab (bool owner_events, EventMask event_mask, const Cursor& cursor, guint32 timestamp)
 Grabs the pointer to a specific window.
GrabStatus pointer_grab (bool owner_events, EventMask event_mask, const Glib::RefPtr<const Window>& confine_to, const Cursor& cursor, guint32 time_)
void process_updates (bool update_children)
 Sends one or more expose events to window.
void raise ()
 Raises window to the top of the Z-order (stacking order), so that other windows with the same parent window appear below window.
void register_dnd ()
void remove_filter (GdkFilterFunc function, gpointer data)
 Remove a filter previously added with gdk_window_add_filter().
void reparent (const Glib::RefPtr<Window>& new_parent, int x, int y)
 Reparents window into the given new_parent.
void resize (int width, int height)
 Resizes window; for toplevel windows, asks the window manager to resize the window.
void scroll (int dx, int dy)
 Scroll the contents of window, both pixels and children, by the given amount.
void set_accept_focus (bool accept_focus=true)
 Setting accept_focus to false hints the desktop environment that the window doesn't want to receive input focus.
void set_back_pixmap (const Glib::RefPtr<Pixmap>& pixmap, bool parent_relative=true)
 Sets the background pixmap of window.
void set_background (const Color& color)
 Sets the background color of window.
void set_child_input_shapes ()
 Sets the input shape mask of window to the union of input shape masks for all children of window, ignoring the input shape mask of window itself.
void set_child_shapes ()
 Sets the shape mask of window to the union of shape masks for all children of window, ignoring the shape mask of window itself.
void set_composited (bool composited=TRUE)
 Sets a Gdk::Window as composited, or unsets it.
void set_cursor ()
 Use the parent window's cursor.
void set_cursor (const Cursor& cursor)
 Sets the mouse pointer for a Gdk::Window.
void set_decorations (WMDecoration decorations)
 "Decorations" are the features the window manager adds to a toplevel Gdk::Window.
void set_events (EventMask event_mask)
 The event mask for a window determines which events will be reported for that window.
void set_focus_on_map (bool focus_on_map)
 Setting focus_on_map to false hints the desktop environment that the window doesn't want to receive input focus when it is mapped.
void set_functions (WMFunction functions)
 Sets hints about the window management functions to make available via buttons on the window frame.
void set_geometry_hints (const Geometry& geometry, WindowHints geom_mask)
 Sets the geometry hints for window.
void set_group (const Glib::RefPtr<Window>& leader)
 Sets the group leader window for window.
void set_icon (const Glib::RefPtr<Window>& icon_window, const Glib::RefPtr<Pixmap>& pixmap)
void set_icon (const Glib::RefPtr<Window>& icon_window, const Glib::RefPtr<Pixmap>& pixmap, const Glib::RefPtr<Bitmap>& mask)
 Sets the icon of window as a pixmap or window.
void set_icon_list (const Glib::ListHandle<Glib::RefPtr<Gdk::Pixbuf>>& pixbufs)
 Sets a list of icons for the window.
void set_icon_name (const Glib::ustring& name)
 Windows may have a name used while minimized, distinct from the name they display in their titlebar.
void set_keep_above (bool setting=true)
 Set if window must be kept above other windows.
void set_keep_below (bool setting=true)
 Set if window must be kept below other windows.
void set_modal_hint (bool modal=true)
 The application can use this hint to tell the window manager that a certain window has modal behaviour.
void set_opacity (double opacity)
 Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque.
void set_override_redirect (bool override_redirect=true)
 An override redirect window is not under the control of the window manager.
void set_role (const Glib::ustring& role)
 When using GTK+, typically you should use gtk_window_set_role() instead of this low-level function.
void set_skip_pager_hint (bool skips_pager=true)
 Toggles whether a window should appear in a pager (workspace switcher, or other desktop utility program that displays a small thumbnail representation of the windows on the desktop).
void set_skip_taskbar_hint (bool skips_taskbar=true)
 Toggles whether a window should appear in a task list or window list.
void set_startup_id (const Glib::ustring& startup_id)
 When using GTK+, typically you should use gtk_window_set_startup_id() instead of this low-level function.
bool set_static_gravities (bool use_static=true)
 Set the bit gravity of the given window to static, and flag it so all children get static subwindow gravity.
void set_title (const Glib::ustring& title)
 Sets the title of a toplevel window, to be displayed in the titlebar.
void set_transient_for (const Glib::RefPtr<Window>& parent)
 Indicates to the window manager that window is a transient dialog associated with the application window parent.
void set_type_hint (WindowTypeHint hint)
 The application can use this call to provide a hint to the window manager about the functionality of a window.
void set_urgency_hint (bool urgent=true)
 Toggles whether a window needs the user's urgent attention.
void set_user_data (gpointer user_data)
 For most purposes this function is deprecated in favor of Glib::object_set_data().
void shape_combine_mask (const Glib::RefPtr<Bitmap>& mask, int x, int y)
 Applies a shape mask to window.
void shape_combine_region (const Region& shape_region, int offset_x, int offset_y)
 Makes pixels in window outside shape_region be transparent, so that the window may be nonrectangular.
void show ()
 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).
void show_unraised ()
 Shows a Gdk::Window onscreen, but does not modify its stacking order.
void stick ()
 "Pins" a window such that it's on all workspaces and does not scroll with viewports, for window managers that have scrollable viewports.
void thaw_updates ()
 Thaws a window frozen with Gdk::Window::freeze_updates().
void unfullscreen ()
 Moves the window out of fullscreen mode.
void unmaximize ()
 Unmaximizes the window.
void unset_back_pixmap ()
 Unsets the background pixmap of window so that the window will have no background.
void unset_icon ()
void unset_shape_combine_mask ()
void unstick ()
 Reverse operation for gdk_window_stick(); see gdk_window_stick(), and gtk_window_unstick().
void withdraw ()
 Withdraws a window (unmaps it and asks the window manager to forget about it).
virtual ~Window ()

Static Public Member Functions

static void constrain_size (const Geometry& geometry, guint flags, int width, int height, int& new_width, int& new_height)
 Constrains a desired width and height according to a set of geometry hints (such as minimum and maximum size).
static Glib::RefPtr<Windowcreate (const Glib::RefPtr<Window>& parent, GdkWindowAttr* attributes, int attributes_mask)
static Glib::ListHandle
<Glib::RefPtr<Window>> 
get_toplevels ()
 Obtains a list of all toplevel windows known to GDK on the default screen (see gdk_window_get_toplevels_for_screen()).
static void keyboard_ungrab (guint32 timestamp)
 Ungrabs the keyboard on the default display, if it is grabbed by this application.
static void pointer_ungrab (guint32 timestamp)
 Ungrabs the pointer on the default display, if it is grabbed by this application.
static void process_all_updates ()
 Calls gdk_window_process_updates() for all windows (see Gdk::Window) in the application.
static void set_debug_updates (bool setting=true)
 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().
static void set_sm_client_id (const Glib::ustring& sm_client_id)
 Sets the SM_CLIENT_ID property on the application's leader window so that the window manager can save the application's state using the X11R6 ICCCM session management protocol.
static void unset_sm_client_id ()

Protected Member Functions

 Window (const Glib::RefPtr<Window>& parent, GdkWindowAttr* attributes, int attributes_mask)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gdk::Windowwrap (GdkWindowObject* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Constructor & Destructor Documentation

virtual Gdk::Window::~Window (  )  [virtual]

Gdk::Window::Window ( const Glib::RefPtr<Window>&  parent,
GdkWindowAttr *  attributes,
int  attributes_mask 
) [protected]


Member Function Documentation

void Gdk::Window::add_filter ( GdkFilterFunc  function,
gpointer  data 
)

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 0 for window to get all events for all windows, instead of events for a specific window.

See Gdk::Display::add_client_message_filter() if you are interested in X ClientMessage events.

Parameters:
function Filter callback.
data Data to pass to filter callback.

void Gdk::Window::beep (  ) 

Emits a short beep associated to window in the appropriate display, if supported.

Otherwise, emits a short beep on the display just as Gdk::Display::beep().

Since gtkmm 2.12:

void Gdk::Window::begin_move_drag ( int  button,
int  root_x,
int  root_y,
guint32  timestamp 
)

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.

Parameters:
button The button being used to drag.
root_x Root window X coordinate of mouse click that began the drag.
root_y Root window Y coordinate of mouse click that began the drag.
timestamp Timestamp of mouse click that began the drag.

void Gdk::Window::begin_paint_rect ( Rectangle rectangle  ) 

A convenience wrapper around gdk_window_begin_paint_region() which creates a rectangular region for you.

See gdk_window_begin_paint_region() for details.

Parameters:
rectangle Rectangle you intend to draw to.

void Gdk::Window::begin_paint_region ( const Region region  ) 

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.

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.

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 Gdk::EventExpose 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().)

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().

Parameters:
region Region you intend to draw to.

void Gdk::Window::begin_resize_drag ( WindowEdge  edge,
int  button,
int  root_x,
int  root_y,
guint32  timestamp 
)

Begins a window resize operation (for a toplevel window).

You might use this function to implement a "window resize grip," for example; in fact Gtk::Statusbar 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.

Parameters:
edge The edge or corner from which the drag is started.
button The button being used to drag.
root_x Root window X coordinate of mouse click that began the drag.
root_y Root window Y coordinate of mouse click that began the drag.
timestamp Timestamp of mouse click that began the drag (use gdk_event_get_time()).

void Gdk::Window::clear (  ) 

Clears an entire window to the background color or background pixmap.

void Gdk::Window::clear_area ( int  x,
int  y,
int  width,
int  height 
)

Clears an area of window to the background color or background pixmap.

Parameters:
x X coordinate of rectangle to clear.
y Y coordinate of rectangle to clear.
width Width of rectangle to clear.
height Height of rectangle to clear.

void Gdk::Window::clear_area_e ( int  x,
int  y,
int  width,
int  height 
)

Like gdk_window_clear_area(), but also generates an expose event for the cleared area.

This function has a stupid name because it dates back to the mists time, pre-GDK-1.0.

Parameters:
x X coordinate of rectangle to clear.
y Y coordinate of rectangle to clear.
width Width of rectangle to clear.
height Height of rectangle to clear.

void Gdk::Window::configure_finished (  ) 

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.

This function can only be called if gdk_window_enable_synchronized_configure() was called previously.

Since gtkmm 2.6:

static void Gdk::Window::constrain_size ( const Geometry geometry,
guint  flags,
int  width,
int  height,
int &  new_width,
int &  new_height 
) [static]

Constrains a desired width and height according to a set of geometry hints (such as minimum and maximum size).

Parameters:
geometry A Gdk::Geometry structure.
flags A mask indicating what portions of geometry are set.
width Desired width of window.
height Desired height of the window.
new_width Location to store resulting width.
new_height Location to store resulting height.

static Glib::RefPtr<Window> Gdk::Window::create ( const Glib::RefPtr<Window>&  parent,
GdkWindowAttr *  attributes,
int  attributes_mask 
) [static]

void Gdk::Window::deiconify (  ) 

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 Gdk::Window 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.

void Gdk::Window::enable_synchronized_configure (  ) 

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.

On X, calling this function makes window participate in the _NET_WM_SYNC_REQUEST window manager protocol.

Since gtkmm 2.6:

void Gdk::Window::end_paint (  ) 

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.

void Gdk::Window::focus ( guint32  timestamp  ) 

Sets keyboard focus to window.

In most cases, gtk_window_present() should be used on a Gtk::Window, rather than calling this function.

Parameters:
timestamp Timestamp of the event triggering the window focus.

void Gdk::Window::freeze_updates (  ) 

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.

void Gdk::Window::fullscreen (  ) 

Moves the window into fullscreen mode.

This means the window covers the entire screen and is above any panels or task bars.

If the window was already fullscreen, then this function does nothing.

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.

Since gtkmm 2.2:

Glib::ListHandle<Glib::RefPtr<const Window>> Gdk::Window::get_children (  )  const

Gets the list of children of window known to GDK.

This function only returns children created via GDK, so for example it's useless when used with the root window; it only returns windows an application created itself.

The returned list must be freed, but the elements in the list need not be.

Returns:
List of child windows inside window.

Glib::ListHandle<Glib::RefPtr<Window>> Gdk::Window::get_children (  ) 

Gets the list of children of window known to GDK.

This function only returns children created via GDK, so for example it's useless when used with the root window; it only returns windows an application created itself.

The returned list must be freed, but the elements in the list need not be.

Returns:
List of child windows inside window.

bool Gdk::Window::get_decorations ( WMDecoration decorations  )  const

Returns: true if the window has decorations set, false otherwise.

Parameters:
decorations The window decorations will be written here.
Returns:
true if the window has decorations set, false otherwise.

EventMask Gdk::Window::get_events (  )  const

Gets the event mask for window.

See gdk_window_set_events().

Returns:
Event mask for window.

void Gdk::Window::get_frame_extents ( Rectangle rect  ) 

Obtains the bounding box of the window, including window manager titlebar/borders if any.

The frame position is given in root window coordinates. To get the position of the window itself (rather than the frame) in root window coordinates, use gdk_window_get_origin().

Parameters:
rect Rectangle to fill with bounding box of the window frame.

void Gdk::Window::get_geometry ( int &  x,
int &  y,
int &  width,
int &  height,
int &  depth 
) const

Any of the return location arguments to this function may be 0, if you aren't interested in getting the value of that field.

The X and Y coordinates returned are relative to the parent window of window, which for toplevels usually means relative to the window decorations (titlebar, etc.) rather than relative to the root window (screen-size background window).

On the X11 platform, the geometry is obtained from the X server, so reflects the latest position of window; this may be out-of-sync with the position of window delivered in the most-recently-processed Gdk::EventConfigure. gdk_window_get_position() in contrast gets the position from the most recent configure event.

<note> If window is not a toplevel, it is much better to call gdk_window_get_position() and Gdk::Drawable::get_size() instead, because it avoids the roundtrip to the X server and because Gdk::Drawable::get_size() supports the full 32-bit coordinate space, whereas gdk_window_get_geometry() is restricted to the 16-bit coordinates of X11. </note>

Parameters:
x Return location for X coordinate of window (relative to its parent).
y Return location for Y coordinate of window (relative to its parent).
width Return location for width of window.
height Return location for height of window.
depth Return location for bit depth of window.

Glib::RefPtr<const Window> Gdk::Window::get_group (  )  const

Return value: the group leader window for window.

Returns:
The group leader window for window
Since gtkmm 2.4:

Glib::RefPtr<Window> Gdk::Window::get_group (  ) 

Return value: the group leader window for window.

Returns:
The group leader window for window
Since gtkmm 2.4:

void Gdk::Window::get_internal_paint_info ( Glib::RefPtr<Drawable>&  real_drawable,
int &  x_offset,
int &  y_offset 
) const

int Gdk::Window::get_origin ( int &  x,
int &  y 
) const

Obtains the position of a window in root window coordinates.

(Compare with gdk_window_get_position() and gdk_window_get_geometry() which return the position of a window relative to its parent window.)

Parameters:
x Return location for X coordinate.
y Return location for Y coordinate.
Returns:
Not meaningful, ignore.

Glib::RefPtr<const Window> Gdk::Window::get_parent (  )  const

Obtains the parent of window, as known to GDK.

Does not query the X server; thus this returns the parent as passed to gdk_window_new(), not the actual parent. This should never matter unless you're using Xlib calls mixed with GDK calls on the X11 platform. It may also matter for toplevel windows, because the window manager may choose to reparent them.

Returns:
Parent of window.

Glib::RefPtr<Window> Gdk::Window::get_parent (  ) 

Obtains the parent of window, as known to GDK.

Does not query the X server; thus this returns the parent as passed to gdk_window_new(), not the actual parent. This should never matter unless you're using Xlib calls mixed with GDK calls on the X11 platform. It may also matter for toplevel windows, because the window manager may choose to reparent them.

Returns:
Parent of window.

Glib::RefPtr<Window> Gdk::Window::get_pointer ( int &  x,
int &  y,
ModifierType mask 
)

Obtains the current pointer position and modifier state.

The position is given in coordinates relative to the upper left corner of window.

Parameters:
x Return location for X coordinate of pointer or 0 to not return the X coordinate.
y Return location for Y coordinate of pointer or 0 to not return the Y coordinate.
mask Return location for modifier mask or 0 to not return the modifier mask.
Returns:
The window containing the pointer (as with gdk_window_at_pointer()), or 0 if the window containing the pointer isn't known to GDK.

void Gdk::Window::get_position ( int &  x,
int &  y 
) const

Obtains the position of the window as reported in the most-recently-processed Gdk::EventConfigure.

Contrast with gdk_window_get_geometry() which queries the X server for the current window position, regardless of which events have been received or processed.

The position coordinates are relative to the window's parent window.

Parameters:
x X coordinate of window.
y Y coordinate of window.

void Gdk::Window::get_root_origin ( int &  x,
int &  y 
) const

Obtains the top-left corner of the window manager frame in root window coordinates.

Parameters:
x Return location for X position of window frame.
y Return location for Y position of window frame.

WindowState Gdk::Window::get_state (  )  const

Gets the bitwise OR of the currently active window state flags, from the Gdk::WindowState enumeration.

Returns:
Window state bitfield.

Glib::RefPtr<const Window> Gdk::Window::get_toplevel (  )  const

Gets the toplevel window that's an ancestor of window.

Returns:
The toplevel window containing window.

Glib::RefPtr<Window> Gdk::Window::get_toplevel (  ) 

Gets the toplevel window that's an ancestor of window.

Returns:
The toplevel window containing window.

static Glib::ListHandle<Glib::RefPtr<Window>> Gdk::Window::get_toplevels (  )  [static]

Obtains a list of all toplevel windows known to GDK on the default screen (see gdk_window_get_toplevels_for_screen()).

A toplevel window is a child of the root window (see gdk_get_default_root_window()).

Returns:
List of toplevel windows.

WindowTypeHint Gdk::Window::get_type_hint (  )