Linux Manuals session 3

Section 3: library functions

  • |

    XPoint (3) Linux Manual Page

    XDrawPoint, XDrawPoints, XPoint – draw points and points structure Syntaxint XDrawPoint(Display *display, Drawable d, GC gc, int x, int y); int XDrawPoints(Display *display, Drawable d, GC gc, XPoint *points, int npoints, int mode);Argumentsd Specifies the drawable. display Specifies the connection to the X server. gc Specifies the GC. mode Specifies the coordinate mode. You can…

  • |

    XPixmapFormatValues (3) Linux Manual Page

    ImageByteOrder, BitmapBitOrder, BitmapPad, BitmapUnit, DisplayHeight, DisplayHeightMM, DisplayWidth, DisplayWidthMM, XListPixmapFormats, XPixmapFormatValues – image format functions and macros SyntaxXPixmapFormatValues *XListPixmapFormats(Display *display, int *count_return); int ImageByteOrder(Display *display); int BitmapBitOrder(Display *display); int BitmapPad(Display *display); int BitmapUnit(Display *display); int DisplayHeight(Display *display, int screen_number); int DisplayHeightMM(Display *display, int screen_number); int DisplayWidth(Display *display, int screen_number); int DisplayWidthMM(Display *display, int screen_number);Argumentsdisplay Specifies the…

  • |

    XPending (3) Linux Manual Page

    XFlush, XSync, XEventsQueued, XPending – handle output buffer or event queue Syntaxint XFlush(Display *display); int XSync(Display *display, Bool discard); int XEventsQueued(Display *display, int mode); int XPending(Display *display);Argumentsdiscard Specifies a Boolean value that indicates whether XSync discards all events on the event queue. display Specifies the connection to the X server. mode Specifies the mode. You…

  • |

    XPeekIfEvent (3) Linux Manual Page

    XIfEvent, XCheckIfEvent, XPeekIfEvent – check the event queue with a predicate procedure Syntaxint XIfEvent(Display *display, XEvent *event_return, Bool (*predicate)(), XPointer arg); Bool XCheckIfEvent(Display *display, XEvent *event_return, Bool (*predicate)(), XPointer arg); int XPeekIfEvent(Display *display, XEvent *event_return, Bool (*predicate)(), XPointer arg);Argumentsarg Specifies the user-supplied argument that will be passed to the predicate procedure. display Specifies the connection…

  • |

    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…