Manual Pages for Linux CentOS command on man XGetGeometry
MyWebUniversity

Manual Pages for Linux CentOS command on man XGetGeometry

XGetWindowAttributes(3) XLIB FUNCTIONS XGetWindowAttributes(3)

NAME

XGetWindowAttributes, XGetGeometry, XWindowAttributes - get current window attribute or geometry and current window attributes structure SYNTAX Status XGetWindowAttributes(Display *display, Window w, XWindowAt‐ tributes *windowattributesreturn); Status XGetGeometry(Display *display, Drawable d, Window *rootreturn, int *xreturn, int *yreturn, unsigned int *widthreturn, unsigned int *heightreturn, unsigned int *borderwidthreturn, unsigned int *depthreturn); ARGUMENTS borderwidthreturn Returns the border width in pixels. d Specifies the drawable, which can be a window or a pixmap. depthreturn Returns the depth of the drawable (bits per pixel for the object). display Specifies the connection to the X server. rootreturn Returns the root window. w Specifies the window whose current attributes you want to obtain. widthreturn heightreturn Return the drawable's dimensions (width and height). windowattributesreturn Returns the specified window's attributes in the XWindowAt‐ tributes structure. xreturn yreturn Return the x and y coordinates that define the location of the drawable. For a window, these coordinates specify the

upper-left outer corner relative to its parent's origin. For pixmaps, these coordinates are always zero. DESCRIPTION The XGetWindowAttributes function returns the current attributes for the specified window to an XWindowAttributes structure. It returns a nonzero status on success; otherwise, it returns a zero status. XGetWindowAttributes can generate BadDrawable and BadWindow errors. The XGetGeometry function returns the root window and the current geom‐ etry of the drawable. The geometry of the drawable includes the x and y coordinates, width and height, border width, and depth. These are described in the argument list. It is legal to pass to this function a window whose class is InputOnly. It returns a nonzero status on suc‐ cess; otherwise, it returns a zero status. STRUCTURES The XWindowAttributes structure contains: typedef struct { int x, y; /* location of window */ int width, height; /* width and height of window */ int borderwidth; /* border width of window */ int depth; /* depth of window */ Visual *visual; /* the associated visual structure */ Window root; /* root of screen containing window */ int class; /* InputOutput, InputOnly*/ int bitgravity; /* one of the bit gravity values */ int wingravity; /* one of the window gravity values */ int backingstore; /* NotUseful, WhenMapped, Always */ unsigned long backingplanes; /* planes to be preserved if possible */ unsigned long backingpixel; /* value to be used when restoring planes */ Bool saveunder; /* boolean, should bits under be saved? */ Colormap colormap; /* color map to be associated with window */ Bool mapinstalled; /* boolean, is color map currently installed*/ int mapstate; /* IsUnmapped, IsUnviewable, IsViewable */ long alleventmasks; /* set of events all people have interest in*/ long youreventmask; /* my event mask */ long donotpropagatemask; /* set of events that should not propagate */

Bool overrideredirect; /* boolean value for override-redirect */ Screen *screen; /* back pointer to correct screen */ } XWindowAttributes;

The x and y members are set to the upper-left outer corner relative to the parent window's origin. The width and height members are set to the inside size of the window, not including the border. The bor‐ derwidth member is set to the window's border width in pixels. The depth member is set to the depth of the window (that is, bits per pixel for the object). The visual member is a pointer to the screen's asso‐ ciated Visual structure. The root member is set to the root window of the screen containing the window. The class member is set to the win‐ dow's class and can be either InputOutput or InputOnly. The bitgravity member is set to the window's bit gravity and can be one of the following: ForgetGravity EastGravity NorthWestGrav‐ SouthWestGrav‐ ity ity NorthGravity SouthGravity NorthEastGrav‐ SouthEastGrav‐ ity ity WestGravity StaticGravity CenterGravity The wingravity member is set to the window's window gravity and can be one of the following: UnmapGravity EastGravity NorthWestGrav‐ SouthWestGrav‐ ity ity NorthGravity SouthGravity NorthEastGrav‐ SouthEastGrav‐ ity ity WestGravity StaticGravity CenterGravity For additional information on gravity, see section 3.3. The backingstore member is set to indicate how the X server should maintain the contents of a window and can be WhenMapped, Always, or NotUseful. The backingplanes member is set to indicate (with bits set to 1) which bit planes of the window hold dynamic data that must be preserved in backingstores and during saveunders. The backingpixel member is set to indicate what values to use for planes not set in backingplanes. The saveunder member is set to True or False. The colormap member is set to the colormap for the specified window and can be a colormap ID or None. The mapinstalled member is set to indicate whether the col‐ ormap is currently installed and can be True or False. The mapstate member is set to indicate the state of the window and can be IsUn‐ mapped, IsUnviewable, or IsViewable. IsUnviewable is used if the win‐ dow is mapped but some ancestor is unmapped. The alleventmasks member is set to the bitwise inclusive OR of all event masks selected on the window by all clients. The youreventmask member is set to the bitwise inclusive OR of all event masks selected by the querying client. The donotpropagatemask member is set to the bitwise inclusive OR of the set of events that should not propagate. The overrideredirect member is set to indicate whether this window overrides structure control facilities and can be True or False. Win‐ dow manager clients should ignore the window if this member is True. The screen member is set to a screen pointer that gives you a back pointer to the correct screen. This makes it easier to obtain the screen information without having to loop over the root window fields to see which field matches. DIAGNOSTICS BadDrawable A value for a Drawable argument does not name a defined Win‐ dow or Pixmap. BadWindow A value for a Window argument does not name a defined Window. SEE ALSO XQueryPointer(3), XQueryTree(3)

Xlib - C Language X Interface X Version 11 libX11 1.6.5 XGetWindowAttributes(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™