>gnome-geometry

gnome-geometry

Name

gnome-geometry -- Window geometry utility functions.

Synopsis


#include <gnome.h>


gboolean    gnome_parse_geometry            (const gchar *geometry,
                                             gint *xpos,
                                             gint *ypos,
                                             gint *width,
                                             gint *height);
gchar*      gnome_geometry_string           (GdkWindow *window);

Description

This module provides functions to parse a string that specifies a window geometry (window position on the screen and dimenssions) as well as a routine to fetch the geometry of a GtkWindow (for example, a GnomeApp top level window).

Details

gnome_parse_geometry ()

gboolean    gnome_parse_geometry            (const gchar *geometry,
                                             gint *xpos,
                                             gint *ypos,
                                             gint *width,
                                             gint *height);

Parses the geometry string passed in geometry, and fills xpos, ypos, width, and height with the corresponding values upon completion of the parse. If the parse fails, it should be assumed that xpos, ypos, width, and height contain undefined values.

geometry : geometry string to be parsed
xpos : X position geometry component
ypos : Y position geometry component
width : pixel width geometry component
height : pixel height geometry component
Returns :TRUE if the geometry was successfully parsed, FALSE otherwise.


gnome_geometry_string ()

gchar*      gnome_geometry_string           (GdkWindow *window);

Determines the size and position of window (must be a window or dialog), and returns that information as an X geometry string. Geometry strings are in the form of WIDTHxHEIGHT+X+Y.

window : Pointer to window or dialog object
Returns : Newly-allocated string containing geometry string for given window. Contents must be g_free'd.