Linux Manuals session 3

Section 3: library functions

  • |

    XPeekEvent (3) Linux Manual Page

    XNextEvent, XPeekEvent, XWindowEvent, XCheckWindowEvent, XMaskEvent, XCheckMaskEvent, XCheckTypedEvent, XCheckTypedWindowEvent – select events by type Syntaxint XNextEvent(Display *display, XEvent *event_return); int XPeekEvent(Display *display, XEvent *event_return); int XWindowEvent(Display *display, Window w, long event_mask, XEvent *event_return); Bool XCheckWindowEvent(Display *display, Window w, long event_mask, XEvent *event_return); int XMaskEvent(Display *display, long event_mask, XEvent *event_return); Bool XCheckMaskEvent(Display *display, long event_mask, XEvent *event_return);…

  • |

    XParseGeometry (3) Linux Manual Page

    XParseGeometry, XWMGeometry – parse window geometry Syntaxint XParseGeometry(char *parsestring, int *x_return, int *y_return, unsigned int *width_return, unsigned int *height_return); int XWMGeometry(Display *display, int screen, char *user_geom, char *def_geom, unsigned int bwidth, XSizeHints *hints, int *x_return, int *y_return, int *width_return, int *height_return, int *gravity_return);Argumentsposition default_position Specify the geometry specifications. display Specifies the connection to the X…

  • |

    XParseColor (3) Linux Manual Page

    XQueryColor, XQueryColors, XLookupColor, XParseColor – obtain color values Syntaxint XQueryColor(Display *display, Colormap colormap, XColor *def_in_out); int XQueryColors(Display *display, Colormap colormap, XColor defs_in_out[], int ncolors); Status XLookupColor(Display *display, Colormap colormap, char *color_name, XColor *exact_def_return, XColor *screen_def_return); Status XParseColor(Display *display, Colormap colormap, char *spec, XColor *exact_def_return);Argumentscolormap Specifies the colormap. color_name Specifies the color name string (for example,…

  • |

    XOpenOM (3) Linux Manual Page

    XOpenOM, XCloseOM, XSetOMValues, XGetOMValues, XDisplayOfOM, XLocaleOfOM – open output methods SyntaxXOM XOpenOM(Display *display, XrmDatabase db, char *res_name, char *res_class); Status XCloseOM(XOM om); char *XSetOMValues(XOM om); char *XGetOMValues(XOM om); Display *XDisplayOfOM(XOM om); char *XLocaleOfOM(XOM om);Argumentsdisplay Specifies the connection to the X server. db Specifies a pointer to the resource database. res_name Specifies the full resource name…

  • |

    XOpenIM (3) Linux Manual Page

    XOpenIM, XCloseIM, XSetIMValues, XGetIMValues, XDisplayOfIM, XLocaleOfIM, XRegisterIMInstantiateCallback, XUnregisterIMInstantiateCallback – open, close, and obtain input method information SyntaxXIM XOpenIM(Display *display, XrmDatabase db, char *res_name, char *res_class); Status XCloseIM(XIM im); char *XSetIMValues(XIM im, …); char *XGetIMValues(XIM im, …); Display *XDisplayOfIM(XIM im); char *XLocaleOfIM(XIM im); Bool XRegisterIMInstantiateCallback(Display *display, XrmDatabase db, char *res_name, char *res_class, XIDProc callback, XPointer client_data);…

  • |

    XOpenDisplay (3) Linux Manual Page

    XOpenDisplay, XCloseDisplay – connect or disconnect to X server SyntaxDisplay *XOpenDisplay(char *display_name); int XCloseDisplay(Display *display);Argumentsdisplay Specifies the connection to the X server. display_name Specifies the hardware display name, which determines the display and communications domain to be used. On a POSIX-conformant system, if the display_name is NULL, it defaults to the value of the DISPLAY…

  • |

    XOpenDevice (3) Linux Manual Page

    XOpenDevice, XCloseDevice – open or close an extension input device Synopsis#include <X11/extensions/XInput.h>XDevice *XOpenDevice( Display *display, XID device_id);XCloseDevice( Display *display, XDevice *device);display Specifies the connection to the X server.device_id Specifies the id of the device to be openeddevice Specifies the device to be closedDescriptionThe XOpenDevice request makes an input device accessible to a client through input…

  • |

    XOffsetRegion (3) Linux Manual Page

    XIntersectRegion, XUnionRegion, XUnionRectWithRegion, XSubtractRegion, XXorRegion, XOffsetRegion, XShrinkRegion – region arithmetic Syntaxint XIntersectRegion(Region sra, Region srb, Region dr_return); int XUnionRegion(Region sra, Region srb, Region dr_return); int XUnionRectWithRegion(XRectangle *rectangle, Region src_region, Region dest_region_return); int XSubtractRegion(Region sra, Region srb, Region dr_return); int XXorRegion(Region sra, Region srb, Region dr_return); int XOffsetRegion(Region r, int dx, int dy); int XShrinkRegion(Region r,…

  • |

    XOMOfOC (3) Linux Manual Page

    XCreateOC, XDestroyOC, XSetOCValues, XGetOCValues, XOMOfOC – create output contexts SyntaxXOC XCreateOC(XOM om); void XDestroyOC(XOC oc); char * XSetOCValues(XOC oc, …); char * XGetOCValues(XOC oc, …); XOM XOMOfOC(XOC oc);Argumentsoc Specifies the output context. om Specifies the output method. … Specifies the variable length argument list to set or get XOC values.DescriptionThe XCreateOC function creates an output…

  • |

    XNoExposeEvent (3) Linux Manual Page

    XGraphicsExposeEvent, XNoExposeEvent – GraphicsExpose and NoExpose event structures StructuresThe structures for GraphicsExpose and NoExpose events contain: typedef struct {         int type;       /* GraphicsExpose */         unsigned long serial;   /* # of last request processed by server */         Bool send_event;        /* true if this came from a SendEvent request */         Display *display;       /* Display the event was read from */         Drawable drawable;         int x, y;         int width, height;         int count;      /* if nonzero,…

  • |

    XNextEvent (3) Linux Manual Page

    XNextEvent, XPeekEvent, XWindowEvent, XCheckWindowEvent, XMaskEvent, XCheckMaskEvent, XCheckTypedEvent, XCheckTypedWindowEvent – select events by type Syntaxint XNextEvent(Display *display, XEvent *event_return); int XPeekEvent(Display *display, XEvent *event_return); int XWindowEvent(Display *display, Window w, long event_mask, XEvent *event_return); Bool XCheckWindowEvent(Display *display, Window w, long event_mask, XEvent *event_return); int XMaskEvent(Display *display, long event_mask, XEvent *event_return); Bool XCheckMaskEvent(Display *display, long event_mask, XEvent *event_return);…

  • |

    XNewModifiermap (3) Linux Manual Page

    XChangeKeyboardMapping, XGetKeyboardMapping, XDisplayKeycodes, XSetModifierMapping, XGetModifierMapping, XNewModifiermap, XInsertModifiermapEntry, XDeleteModifiermapEntry, XFreeModifiermap, XModifierKeymap – manipulate keyboard encoding and keyboard encoding structure Syntaxint XChangeKeyboardMapping(Display *display, int first_keycode, int keysyms_per_keycode, KeySym *keysyms, int num_codes); KeySym *XGetKeyboardMapping(Display *display, KeyCode first_keycode, int keycode_count, int *keysyms_per_keycode_return); int XDisplayKeycodes(Display *display, int *min_keycodes_return, int *max_keycodes_return); int XSetModifierMapping(Display *display, XModifierKeymap *modmap); XModifierKeymap *XGetModifierMapping(Display *display); XModifierKeymap *XNewModifiermap(int…

  • |

    XMoveWindow (3) Linux Manual Page

    XConfigureWindow, XMoveWindow, XResizeWindow, XMoveResizeWindow, XSetWindowBorderWidth, XWindowChanges – configure windows and window changes structure Syntaxint XConfigureWindow(Display *display, Window w, unsigned value_mask, XWindowChanges *changes); int XMoveWindow(Display *display, Window w, int x, y); int XResizeWindow(Display *display, Window w, unsigned width, unsigned height); int XMoveResizeWindow(Display *display, Window w, int x, int y, unsigned width, unsigned height); int XSetWindowBorderWidth(Display *display,…

  • |

    XMoveResizeWindow (3) Linux Manual Page

    XConfigureWindow, XMoveWindow, XResizeWindow, XMoveResizeWindow, XSetWindowBorderWidth, XWindowChanges – configure windows and window changes structure Syntaxint XConfigureWindow(Display *display, Window w, unsigned value_mask, XWindowChanges *changes); int XMoveWindow(Display *display, Window w, int x, y); int XResizeWindow(Display *display, Window w, unsigned width, unsigned height); int XMoveResizeWindow(Display *display, Window w, int x, int y, unsigned width, unsigned height); int XSetWindowBorderWidth(Display *display,…

  • |

    XMotionEvent (3) Linux Manual Page

    XButtonEvent, XKeyEvent, XMotionEvent – KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify event structures StructuresThe structures for KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify events contain: typedef struct {         int type;       /* ButtonPress or ButtonRelease */         unsigned long serial;   /* # of last request processed by server */         Bool send_event;        /* true if this came from a SendEvent request */         Display *display;       /* Display the event was read from */         Window window;  /* “event” window…

  • |

    XModifierKeymap (3) Linux Manual Page

    XChangeKeyboardMapping, XGetKeyboardMapping, XDisplayKeycodes, XSetModifierMapping, XGetModifierMapping, XNewModifiermap, XInsertModifiermapEntry, XDeleteModifiermapEntry, XFreeModifiermap, XModifierKeymap – manipulate keyboard encoding and keyboard encoding structure Syntaxint XChangeKeyboardMapping(Display *display, int first_keycode, int keysyms_per_keycode, KeySym *keysyms, int num_codes); KeySym *XGetKeyboardMapping(Display *display, KeyCode first_keycode, int keycode_count, int *keysyms_per_keycode_return); int XDisplayKeycodes(Display *display, int *min_keycodes_return, int *max_keycodes_return); int XSetModifierMapping(Display *display, XModifierKeymap *modmap); XModifierKeymap *XGetModifierMapping(Display *display); XModifierKeymap *XNewModifiermap(int…

  • |

    XMaxRequestSize (3) Linux Manual Page

    AllPlanes, BlackPixel, WhitePixel, ConnectionNumber, DefaultColormap, DefaultDepth, XListDepths, DefaultGC, DefaultRootWindow, DefaultScreenOfDisplay, DefaultScreen, DefaultVisual, DisplayCells, DisplayPlanes, DisplayString, XMaxRequestSize, XExtendedMaxRequestSize, LastKnownRequestProcessed, NextRequest, ProtocolVersion, ProtocolRevision, QLength, RootWindow, ScreenCount, ScreenOfDisplay, ServerVendor, VendorRelease – Display macros and functions Syntaxunsigned long AllPlanes; unsigned long BlackPixel(Display *display, int screen_number); unsigned long WhitePixel(Display *display, int screen_number); int ConnectionNumber(Display *display); Colormap DefaultColormap(Display *display, int screen_number);…

  • |

    XMatchVisualInfo (3) Linux Manual Page

    XGetVisualInfo, XMatchVisualInfo, XVisualIDFromVisual, XVisualInfo – obtain visual information and visual structure SyntaxXVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return); Status XMatchVisualInfo(Display *display, int screen, int depth, int class, XVisualInfo *vinfo_return); VisualID XVisualIDFromVisual(Visual *visual);Argumentsclass Specifies the class of the screen. depth Specifies the depth of the screen. display Specifies the connection to the X server….

  • |

    XMaskEvent (3) Linux Manual Page

    XNextEvent, XPeekEvent, XWindowEvent, XCheckWindowEvent, XMaskEvent, XCheckMaskEvent, XCheckTypedEvent, XCheckTypedWindowEvent – select events by type Syntaxint XNextEvent(Display *display, XEvent *event_return); int XPeekEvent(Display *display, XEvent *event_return); int XWindowEvent(Display *display, Window w, long event_mask, XEvent *event_return); Bool XCheckWindowEvent(Display *display, Window w, long event_mask, XEvent *event_return); int XMaskEvent(Display *display, long event_mask, XEvent *event_return); Bool XCheckMaskEvent(Display *display, long event_mask, XEvent *event_return);…