Linux Manuals session 3

Section 3: library functions

  • |

    XKeysymToString (3) Linux Manual Page

    XStringToKeysym, XKeysymToString, XKeycodeToKeysym, XKeysymToKeycode, XConvertCase – convert keysyms Syntax KeySym XStringToKeysym(char *string); char *XKeysymToString(KeySym keysym); KeySym XKeycodeToKeysym(Display *display, KeyCode keycode, int index); KeyCode XKeysymToKeycode(Display *display, KeySym keysym); void XConvertCase(KeySym keysym, KeySym *lower_return, KeySym *upper_return); Arguments display Specifies the connection to the X server. index Specifies the element of KeyCode vector. keycode Specifies the KeyCode. keysym…

  • |

    XKeysymToKeycode (3) Linux Manual Page

    XStringToKeysym, XKeysymToString, XKeycodeToKeysym, XKeysymToKeycode, XConvertCase – convert keysyms Syntax KeySym XStringToKeysym(char *string); char *XKeysymToString(KeySym keysym); KeySym XKeycodeToKeysym(Display *display, KeyCode keycode, int index); KeyCode XKeysymToKeycode(Display *display, KeySym keysym); void XConvertCase(KeySym keysym, KeySym *lower_return, KeySym *upper_return); Arguments display Specifies the connection to the X server. index Specifies the element of KeyCode vector. keycode Specifies the KeyCode. keysym…

  • |

    XKeymapEvent (3) Linux Manual Page

    XKeymapEvent – KeymapNotify event structure Structures The structure for KeymapNotify events contains: /* generated on EnterWindow and FocusIn when KeymapState selected */ typedef struct {         int type;       /* KeymapNotify */         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;         char key_vector[32]; }…

  • |

    XKeycodeToKeysym (3) Linux Manual Page

    XStringToKeysym, XKeysymToString, XKeycodeToKeysym, XKeysymToKeycode, XConvertCase – convert keysyms Syntax KeySym XStringToKeysym(char *string); char *XKeysymToString(KeySym keysym); KeySym XKeycodeToKeysym(Display *display, KeyCode keycode, int index); KeyCode XKeysymToKeycode(Display *display, KeySym keysym); void XConvertCase(KeySym keysym, KeySym *lower_return, KeySym *upper_return); Arguments display Specifies the connection to the X server. index Specifies the element of KeyCode vector. keycode Specifies the KeyCode. keysym…

  • |

    XKeyboardControl (3) Linux Manual Page

    XChangeKeyboardControl, XGetKeyboardControl, XAutoRepeatOn, XAutoRepeatOff, XBell, XQueryKeymap, XKeyboardControl – manipulate keyboard settings and keyboard control structure Syntax int XChangeKeyboardControl(Display *display, unsigned long value_mask, XKeyboardControl *values); int XGetKeyboardControl(Display *display, XKeyboardState *values_return); int XAutoRepeatOn(Display *display); int XAutoRepeatOff(Display *display); int XBell(Display *display, int percent); int XQueryKeymap(Display *display, char keys_return[32]); Arguments display Specifies the connection to the X server. keys_return…

  • |

    XKeyEvent (3) Linux Manual Page

    XButtonEvent, XKeyEvent, XMotionEvent – KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify event structures Structures The 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…

  • |

    XIntersectRegion (3) Linux Manual Page

    XIntersectRegion, XUnionRegion, XUnionRectWithRegion, XSubtractRegion, XXorRegion, XOffsetRegion, XShrinkRegion – region arithmetic Syntax int 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…

  • |

    XInternalConnectionNumbers (3) Linux Manual Page

    XAddConnectionWatch, XRemoveConnectionWatch, XProcessInternalConnection, XInternalConnectionNumbers – handle Xlib internal connections Syntax typedef void (*XConnectionWatchProc)(Display *display, XPointer client_data, int fd, Bool opening, XPointer *watch_data); Status XAddConnectionWatch(Display *display, XWatchProc procedure, XPointer client_data); Status XRemoveConnectionWatch(Display *display, XWatchProc procedure, XPointer client_data); void XProcessInternalConnection(Display *display, int fd); Status XInternalConnectionNumbers(Display *display, int **fd_return, int *count_return); Arguments client_data Specifies the additional client data….

  • |

    XInternAtoms (3) Linux Manual Page

    XInternAtom, XInternAtoms, XGetAtomName, XGetAtomNames – create or return atom names Syntax Atom XInternAtom(Display *display, char *atom_name, Bool only_if_exists); Status XInternAtoms(Display *display, char **names, int count, Bool only_if_exists, Atom *atoms_return); char *XGetAtomName(Display *display, Atom atom); Status XGetAtomNames(Display *display, Atom *atoms, int count, char **names_return); Arguments atom Specifies the atom for the property name you want returned….

  • |

    XInternAtom (3) Linux Manual Page

    XInternAtom, XInternAtoms, XGetAtomName, XGetAtomNames – create or return atom names Syntax Atom XInternAtom(Display *display, char *atom_name, Bool only_if_exists); Status XInternAtoms(Display *display, char **names, int count, Bool only_if_exists, Atom *atoms_return); char *XGetAtomName(Display *display, Atom atom); Status XGetAtomNames(Display *display, Atom *atoms, int count, char **names_return); Arguments atom Specifies the atom for the property name you want returned….

  • |

    XInstallColormap (3) Linux Manual Page

    XInstallColormap, XUninstallColormap, XListInstalledColormaps – control colormaps Syntax int XInstallColormap(Display *display, Colormap colormap); int XUninstallColormap(Display *display, Colormap colormap); Colormap *XListInstalledColormaps(Display *display, Window w, int *num_return); Arguments colormap Specifies the colormap. display Specifies the connection to the X server. num_return Returns the number of currently installed colormaps. w Specifies the window that determines the screen. Description The…

  • |

    XInsertModifiermapEntry (3) Linux Manual Page

    XChangeKeyboardMapping, XGetKeyboardMapping, XDisplayKeycodes, XSetModifierMapping, XGetModifierMapping, XNewModifiermap, XInsertModifiermapEntry, XDeleteModifiermapEntry, XFreeModifiermap, XModifierKeymap – manipulate keyboard encoding and keyboard encoding structure Syntax int 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…

  • |

    XInitThreads (3) Linux Manual Page

    XInitThreads, XLockDisplay, XUnlockDisplay – multi-threading support Syntax Status XInitThreads(void); void XLockDisplay(Display *display); void XUnlockDisplay(Display *display); Arguments display Specifies the connection to the X server. Description The XInitThreads function initializes Xlib support for concurrent threads. This function must be the first Xlib function a multi-threaded program calls, and it must complete before any other Xlib call…

  • |

    XInitImage (3) Linux Manual Page

    XInitImage, XCreateImage, XGetPixel, XPutPixel, XSubImage, XAddPixel, XDestroyImage – image utilities Syntax Status XInitImage(XImage *image); XImage *XCreateImage(Display *display, Visual *visual, unsigned int depth, int format, int offset, char *data, unsigned int width, unsigned int height, int bitmap_pad, int bytes_per_line); unsigned long XGetPixel(XImage *ximage, int x, int y); int XPutPixel(XImage *ximage, int x, int y, unsigned long…

  • |

    XIfEvent (3) Linux Manual Page

    XIfEvent, XCheckIfEvent, XPeekIfEvent – check the event queue with a predicate procedure Syntax int 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); Arguments arg Specifies the user-supplied argument that will be passed to the predicate procedure. display…

  • |

    XIconifyWindow (3) Linux Manual Page

    XIconifyWindow, XWithdrawWindow, XReconfigureWMWindow – manipulate top-level windows Syntax Status XIconifyWindow(Display *display, Window w, int screen_number); Status XWithdrawWindow(Display *display, Window w, int screen_number); Status XReconfigureWMWindow(Display *display, Window w, int screen_number, unsigned int value_mask, XWindowChanges *values); Arguments display Specifies the connection to the X server. screen_number Specifies the appropriate screen number on the host server. value_mask Specifies…

  • |

    XIconSize (3) Linux Manual Page

    XAllocIconSize, XSetIconSizes, XGetIconSizes, XIconSize – allocate icon size structure and set or read a window’s WM_ICON_SIZES property Syntax XIconSize *XAllocIconSize(void); int XSetIconSizes(Display *display, Window w, XIconSize *size_list, int count); Status XGetIconSizes(Display *display, Window w, XIconSize **size_list_return, int count_return); Arguments display Specifies the connection to the X server. count Specifies the number of items in the…

  • |

    XIWarpPointer (3) Linux Manual Page

    XIWarpPointer – move a device’s pointer. Synopsis #include <X11/extensions/XInput2.h> Bool XIWarpPointer( Display *display, int deviceid, Window src_w, Window dest_w, double src_x, double src_y, int src_width, int src_height, double dest_x, double dest_y); dest_w Specifies the destination window or None. dest_x, dest_y Specify the x and y coordinates within the destination window. deviceid Specifies the master pointer…

  • |

    XIUngrabTouchBegin (3) Linux Manual Page

    XIGrabButton, XIUngrabButton, XIGrabKeycode, XIUngrabKeycode, XIGrabTouchBegin, XIUngrabTouchBegin – grab/ungrab buttons or keys Synopsis #include <X11/extensions/XInput2.h> int XIGrabButton( Display *display, int deviceid, int button, Window grab_window, Cursor cursor, int grab_mode, int paired_device_mode, Bool owner_events, XIEventMask *mask, int num_modifiers, XIGrabModifiers *modifiers_inout); int XIUngrabButton( Display *display, int deviceid, int button, Window grab_window, int num_modifiers, XIGrabModifiers *modifiers); int XIGrabKeycode( Display…

  • |

    XIUngrabKeycode (3) Linux Manual Page

    XIGrabButton, XIUngrabButton, XIGrabKeycode, XIUngrabKeycode, XIGrabTouchBegin, XIUngrabTouchBegin – grab/ungrab buttons or keys Synopsis #include <X11/extensions/XInput2.h> int XIGrabButton( Display *display, int deviceid, int button, Window grab_window, Cursor cursor, int grab_mode, int paired_device_mode, Bool owner_events, XIEventMask *mask, int num_modifiers, XIGrabModifiers *modifiers_inout); int XIUngrabButton( Display *display, int deviceid, int button, Window grab_window, int num_modifiers, XIGrabModifiers *modifiers); int XIGrabKeycode( Display…