Linux Manuals session 3

Section 3: library functions

  • |

    XtFree (3) Linux Manual Page

    XtMalloc, XtCalloc, XtRealloc, XtFree, XtNew, XtNewString – memory management functions Syntax#include <X11/Intrinsic.h> char *XtMalloc(Cardinal size); char *XtCalloc(Cardinal num, Cardinal size); char *XtRealloc(char *ptr, Cardinal num); void XtFree(char *ptr); type *XtNew(type); String XtNewString(String string); Cardinal XtAsprintf(char **new_string, const char *format, …);Argumentsnum Specifies the number of bytes or array elements. ptr Specifies a pointer to the old…

  • |

    XtFindFile (3) Linux Manual Page

    XtFindFile – search for a file using substitutions in the path list Syntax#include <X11/Intrinsic.h> char * XtFindFile(const char *path, Substitution substitutions, Cardinal num_substitutions, XtFilePredicate predicate);Argumentspath Specifies a path of file names, including substitution characters. substitutions Specifies a list of substitutions to make into a path. num_substitutions Specifies the number of substitutions passed in. predicate Specifies…

  • |

    XtErrorMsg (3) Linux Manual Page

    XtErrorMsg, XtSetErrorMsgHandler, XtWarningMsg, XtSetWarningMsgHandler – high-level error handlers Syntax#include <X11/Intrinsic.h> void XtErrorMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params); void XtSetErrorMsgHandler(XtErrorMsgHandler msg_handler); void XtSetWarningMsgHandler(XtErrorMsgHandler msg_handler); void XtWarningMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);Argumentsclass Specifies the resource class of…

  • |

    XtError (3) Linux Manual Page

    XtError, XtSetErrorHandler, XtSetWarningHandler, XtWarning – low-level error handlers Syntax#include <X11/Intrinsic.h> void XtError(const char *message); void XtSetErrorHandler(XtErrorHandler handler); void XtSetWarningHandler(XtErrorHandler handler); void XtWarning(const char *message);Argumentsmessage Specifies the nonfatal error message that is to be reported. handler Specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns. message Specifies…

  • |

    XtDisplayToApplicationContext (3) Linux Manual Page

    XtDisplayToApplicationContext – obtain an application context Syntax#include <X11/Intrinsic.h> XtAppContext XtDisplayToApplicationContext(Display* dpy);Argumentsdpy Specifies the display that you want the application context for.DescriptionThe XtDisplayToApplicationContext function returns the application context for the specified display. See AlsoX Toolkit Intrinsics – C Language Interface Xlib – C Language X Interface

  • |

    XtDisplayStringConversionWarning (3) Linux Manual Page

    XtDisplayStringConversionWarning – issue a conversion warning message Syntax#include <X11/Intrinsic.h> void XtDisplayStringConversionWarning(Display* display, const char *from_value, const char *to_type);Argumentsdisplay Specifies the display connection with which the conversion is associated. from_value Specifies the string that could not be converted. to_type Specifies the target representation type requested.DescriptionThe XtDisplayStringConversionWarning function issues a warning message using XtAppWarningMsg with name “conversionError”,…

  • |

    XtDisplayOfObject (3) Linux Manual Page

    XtDisplay, XtDisplayOfObject, XtScreen, XtScreenOfObject, XtWindow, XtWindowOfObject – obtain window information about a widget Syntax#include <X11/Intrinsic.h> Display *XtDisplay(Widget w); Display *XtDisplayOfObject(Widget object); Screen *XtScreen(Widget w); Screen *XtScreenOfObject(Widget object); Window XtWindow(Widget w); Window XtWindowOfObject(Widget object);Argumentsw Specifies the widget.object Specifies the widget.DescriptionXtDisplay returns the display pointer for the specified widget. XtDisplayOfObject returns the display pointer for the specified…

  • |

    XtDisplayInitialize (3) Linux Manual Page

    XtDisplayInitialize, XtOpenDisplay, XtDatabase, XtScreenDatabase, XtCloseDisplay – initialize, open, or close a display Syntax#include <X11/Intrinsic.h> void XtDisplayInitialize(XtAppContext app_context, Display *display, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv); Display *XtOpenDisplay(XtAppContext app_context, const char *display_string, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv); void XtCloseDisplay(Display…

  • |

    XtDisplay (3) Linux Manual Page

    XtDisplay, XtDisplayOfObject, XtScreen, XtScreenOfObject, XtWindow, XtWindowOfObject – obtain window information about a widget Syntax#include <X11/Intrinsic.h> Display *XtDisplay(Widget w); Display *XtDisplayOfObject(Widget object); Screen *XtScreen(Widget w); Screen *XtScreenOfObject(Widget object); Window XtWindow(Widget w); Window XtWindowOfObject(Widget object);Argumentsw Specifies the widget.object Specifies the widget.DescriptionXtDisplay returns the display pointer for the specified widget. XtDisplayOfObject returns the display pointer for the specified…

  • |

    XtDispatchEventToWidget (3) Linux Manual Page

    XtInsertEventTypeHandler, XtRemoveEventTypeHandler, XtRegisterExtensionSelector, XtSetEventDispatcher, XtDispatchEventToWidget – extension event handling Syntax#include <X11/Intrinsic.h> void XtInsertEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data, XtListPosition position); void XtRemoveEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data); void XtRegisterExtensionSelector(Display* display, int min_event_type, int max_event_type, XtExtensionSelectProc proc, XtPointer client_data); XtEventDispatchProc XtSetEventDispatcher(Display* display, int event_type, XtEventDispatchProc proc); Boolean XtDispatchEventToWidget(Widget…

  • |

    XtDispatchEvent (3) Linux Manual Page

    XtAppNextEvent, XtAppPending, XtAppPeekEvent, XtAppProcessEvent, XtDispatchEvent, XtAppMainLoop – query and process events and input Syntax#include <X11/Intrinsic.h> void XtAppNextEvent(XtAppContext app_context, XEvent *event_return); Boolean XtAppPeekEvent(XtAppContext app_context, XEvent *event_return); XtInputMask XtAppPending(XtAppContext app_context); void XtAppProcessEvent(XtAppContext app_context, XtInputMask mask); Boolean XtDispatchEvent(XEvent *event); void XtAppMainLoop(XtAppContext app_context);Argumentsapp_context Specifies the application context that identifies the application. event Specifies a pointer to the event structure…

  • |

    XtDisownSelection (3) Linux Manual Page

    XtOwnSelection, XtOwnSelectionIncremental, XtDisownSelection – set selection owner Syntax#include <X11/Intrinsic.h> Boolean XtOwnSelection(Widget w, Atom selection, Time time, XtConvertSelectionProc convert_proc, XtLoseSelectionProc lose_selection, XtSelectionDoneProc done_proc); Boolean XtOwnSelectionIncremental(Widget w, Atom selection, Time time, XtConvertSelectionIncrProc convert_callback, XtLoseSelectionIncrProc lose_callback, XtSelectionDoneIncrProc done_callback, XtCancelConvertSelectionProc cancel_callback, XtPointer client_data); void XtDisownSelection(Widget w, Atom selection, Time time);Argumentsconvert_proc Specifies the procedure that is to be called whenever…

  • |

    XtDirectConvert (3) Linux Manual Page

    XtConvert, XtDirectConvert – invoke resource converters Syntax#include <X11/Intrinsic.h> void XtConvert(Widget w, const char *from_type, XrmValuePtr from, const char *to_type, XrmValuePtr to_return); void XtDirectConvert(XtConverter converter, XrmValuePtr args, Cardinal num_args, XrmValuePtr from, XrmValuePtr to_return);Argumentsargs Specifies the argument list that contains the additional arguments needed to perform the conversion (often NULL). converter Specifies the conversion procedure that is…

  • |

    XtDestroyWidget (3) Linux Manual Page

    XtCreateWidget, XtVaCreateWidget, XtCreateManagedWidget, XtVaCreateManagedWidget, XtDestroyWidget – create and destroy widgets Syntax#include <X11/Intrinsic.h> Widget XtCreateWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args); Widget XtVaCreateWidget(const char *name, WidgetClass widget_class, Widget parent, …); Widget XtCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args); Widget XtVaCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, …); void…

  • |

    XtDestroyApplicationContext (3) Linux Manual Page

    XtCreateApplicationContext, XtDestroyApplicationContext, XtWidgetToApplicationContext, XtToolkitInitialize – create, destroy, and obtain an application context Syntax#include <X11/Intrinsic.h> XtAppContext XtCreateApplicationContext(void); void XtDestroyApplicationContext(XtAppContext app_context); XtAppContext XtWidgetToApplicationContext(Widget w); void XtToolkitInitialize(void);Argumentsapp_context Specifies the application context. w Specifies the widget that you want the application context for.DescriptionThe XtCreateApplicationContext function returns an application context, which is an opaque type. Every application must have at…

  • |

    XtDatabase (3) Linux Manual Page

    XtDisplayInitialize, XtOpenDisplay, XtDatabase, XtScreenDatabase, XtCloseDisplay – initialize, open, or close a display Syntax#include <X11/Intrinsic.h> void XtDisplayInitialize(XtAppContext app_context, Display *display, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv); Display *XtOpenDisplay(XtAppContext app_context, const char *display_string, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv); void XtCloseDisplay(Display…

  • |

    XtCreateWindow (3) Linux Manual Page

    XtCreateWindow – window creation convenience function Syntax#include <X11/Intrinsic.h> void XtCreateWindow(Widget w, unsigned int window_class, Visual *visual, XtValueMask value_mask, XSetWindowAttributes *attributes);Argumentsattributes Specifies the window attributes to use in the XCreateWindow call. value_mask Specifies which attribute fields to use. visual Specifies the visual type (usually CopyFromParent). w Specifies the widget that is used to set the x,y…

  • |

    XtCreateWidget (3) Linux Manual Page

    XtCreateWidget, XtVaCreateWidget, XtCreateManagedWidget, XtVaCreateManagedWidget, XtDestroyWidget – create and destroy widgets Syntax#include <X11/Intrinsic.h> Widget XtCreateWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args); Widget XtVaCreateWidget(const char *name, WidgetClass widget_class, Widget parent, …); Widget XtCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args); Widget XtVaCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, …); void…

  • |

    XtCreateSelectionRequest (3) Linux Manual Page

    XtCreateSelectionRequest, XtSendSelectionRequest, XtCancelSelectionRequest – bundle multiple selection conversion requests into a single request using MULTIPLE target Syntax#include <X11/Intrinsic.h> void XtCreateSelectionRequest(Widget requestor, Atom selection); void XtSendSelectionRequest(Widget requestor, Atom selection, Time time); void XtCancelSelectionRequest(Widget requestor, Atom selection);Argumentsrequestor Specifies the widget making the request. Must be of class Core or a subclass thereof. selection Specifies the particular selection…

  • |

    XtCreatePopupShell (3) Linux Manual Page

    XtCreatePopupShell, XtVaCreatePopupShell – create a popup shell Syntax#include <X11/Intrinsic.h> Widget XtCreatePopupShell(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args); Widget XtVaCreatePopupShell(const char *name, WidgetClass widget_class, Widget parent, …);Argumentsargs Specifies the argument list to override the resource defaults. name Specifies the text name for the created shell widget. num_args Specifies the number of arguments…