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 DRAFTint XSaveContext(display, rid, context, data)Display *display;XID rid;XContext context;XPointer data;displayridcontextdataSpecifies the connection to the X server.Specifies the resource ID with which the data is associated.Specifies the context type to which the data belongs.Specifies the data to be associated with the window and type.If an entry with the specified resource ID and type already exists, XSaveContext overrides itwith the specified context. The XSaveContext function returns a nonzero error code if an errorhas occurred and zero otherwise. Possible errors are XCNOMEM (out of memory).To get the data associated with a resource ID and type, use XFindContext.int XFindContext(display, rid, context, data_return)Display *display;XID rid;XContext context;XPointer *data_return;displayridcontextdata_returnSpecifies the connection to the X server.Specifies the resource ID with which the data is associated.Specifies the context type to which the data belongs.Returns the data.Because it is a return value, the data is a pointer. The XFindContext function returns a nonzeroerror code if an error has occurred and zero otherwise. Possible errors are XCNOENT (contextnot-found).To delete an entry for a given resource ID and type, use XDeleteContext.int XDeleteContext(display, rid, context)Display *display;XID rid;XContext context;displayridcontextSpecifies the connection to the X server.Specifies the resource ID with which the data is associated.Specifies the context type to which the data belongs.The XDeleteContext function deletes the entry for the given resource ID and type from the datastructure. This function returns the same error codes that XFindContext returns if called withthe same arguments. XDeleteContext does not free the data whose address was saved.423

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

Saved successfully!

Ooh no, something went wrong!