12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFTthe keyboard, pointer, orselection. By providing the timestamp from the event in the request, youcan arrange that the operation not take effect if someone else has performed an operation in themeanwhile.Atimestamp is a time value, expressed in milliseconds. It typically is the time since the lastserver reset. Timestamp values wrap around (after about 49.7 days). The server, given its currenttime is represented by timestamp T, always interprets timestamps from clients by treating half ofthe timestamp space as being later in time than T. One timestamp value, named CurrentTime, isnever generated by the server. This value is reserved for use in requests to represent the currentserver time.For many functions in this section, you pass pointer event mask bits. The valid pointer eventmask bits are: ButtonPressMask, ButtonReleaseMask, EnterWindowMask, LeaveWindow-Mask, PointerMotionMask, PointerMotionHintMask, Button1MotionMask, Button2MotionMask,Button3MotionMask, Button4MotionMask, Button5MotionMask, ButtonMotionMask,and KeyMapStateMask. For other functions in this section, you passkeymask bits. The valid keymask bits are: ShiftMask, LockMask, ControlMask, Mod1Mask,Mod2Mask, Mod3Mask, Mod4Mask, and Mod5Mask.To grab the pointer, use XGrabPointer.int XGrabPointer(display, grab_window, owner_events, event_mask, pointer_mode,keyboard_mode, confine_to, cursor, time)Display *display;Window grab_window;Bool owner_events;unsigned int event_mask;int pointer_mode, keyboard_mode;Window confine_to;Cursor cursor;Time time;displaygrab_windowowner_eventsevent_maskpointer_modekeyboard_modeconfine_tocursortimeSpecifies the connection to the X server.Specifies the grab window.Specifies a Boolean value that indicates whether the pointer events are to bereported as usual or reported with respect to the grab window ifselected by theevent mask.Specifies which pointer events are reported to the client. The mask is the bitwiseinclusive OR ofthe valid pointer event mask bits.Specifies further processing of pointer events. You can pass GrabModeSync orGrabModeAsync.Specifies further processing of keyboard events. You can pass GrabModeSyncor GrabModeAsync.Specifies the window toconfine the pointer in or None.Specifies the cursor that is to be displayed during the grab or None.Specifies the time. Youcan pass either a timestamp or CurrentTime.The XGrabPointer function actively grabs control of the pointer and returns GrabSuccess if the249

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!