Trusted Solaris Developer's Guide

Programming Interface Declarations

This section provides declarations for the Trusted X11 interfaces and the X11 Windows label clipping interfaces.

Window Attributes

This routine returns the resource attributes for a window ID in *resattrp. Refer to the XTSOLgetResAttributes(3) man page.

Status XTSOLgetResAttributes(Display *display,
	XID object,
	ResourceType resourceFlag,
	XTsolResAttributes *resattrp);

Property Attributes

This routine returns the property attributes for a property hanging on a window ID in *propattrp. Refer to the XTSOLgetPropAttributes(3) man page.

Status XTSOLgetPropAttributes(Display *display,
	Window win,
	Atom property,
	XTsolPropAttributes *propattrp);

Client Connection Attributes

This routine returns the client attributes in *clientattrp. Refer to the XTSOLgetClientAttributes(3) man page.

Status XTSOLgetClientAttributes(Display *display,
	XID win,
	XTsolClientAttributes *clientattrp);

Window CMW Label

These routines get and set the CMW label of a window. Refer to the XTSOLgetResLabel(3) and XTSOLsetResLabel(3) man pages.

Status XTSOLgetResLabel(Display *display,
	XID object,
	ResourceType resourceFlag,
	bclabel_t *cmwlabel);

void XTSOLsetResLabel(Display *display,
	XID object,
	ResourceType resourceFlag,
	bclabel_t *cmwLabel,
	enum setting_flag labelFlag);

Window User ID

These interfaces get and set the user ID of a window. Refer to the XTSOLgetResUID(3) and XTSOLsetResUID(3) man pages.

Status XTSOLgetResUID(Display *display,
	XID object,
	ResourceType resourceFlag,
	uid_t *uidp);

void XTSOLsetResUID(Display *display,
	XID object,
	ResourceType resourceFlag,
	uid_t *uidp);

Property CMW Label

These routines get and set the CMW label of a property hanging on a window. Refer to the XTSOLgetPropLabel(3) and XTSOLsetPropLabel(3) man page.

Status XTSOLgetPropLabel(Display *display,
	Window win,
	Atom property,
	bclabel_t *cmwlabel);

void XTSOLsetPropLabel(Display *display,
	Window win,
	Atom property,
	bclabel_t *cmwLabel,
	enum setting_flag labelFlag);

Property User ID

These interfaces get and set the user ID of a property hanging on a window. Refer to the XTSOLgetPropUID(3) and XTSOLsetPropUID(3) man pages.

Status XTSOLgetPropUID(Display *display,
	Window winID,
	Atom property,
	uid_t *uidp);

void XTSOLsetPropUID(Display *display,
	Window win,
	Atom property,
	uid_t *uidp);

Workstation Owner ID

These routines get and set the user ID for the owner of the workstation server. Refer to the XTSOLgetWorkstationOwner(3) and XTSOLsetWorkstationOwner(3) man pages.


Note -

XTSOLsetWorkstationOwner(3) is reserved for the Window Manager.


Status XTSOLgetWorkstationOwner(Display *display, uid_t *uidp);
void XTSOLsetWorkstationOwner(Display *display, uid_t *uidp);

X Window Server Clearance and Minimum Label

These routines set the session high clearance and the session low minimum label for the X Window Server. Refer to the XTSOLsetSessionHI(3) and XTSOLsetSessionLO(3) man pages.


Note -

These interfaces are reserved for the Window Manager.


void XTSOLsetSessionHI(Display *display, bclear_t *clearance);
void XTSOLsetSessionLO(Display *display, bslabel_t *sl);

Trusted Path Window

These routines makes the specified window the trusted path window and test whether the specified window is the trusted path window. Refer to the XTSOLMakeTPWindow(3) man page.

void XTSOLMakeTPWindow(Display *dpy, Window win);
Bool XTSOLIsWindowTrusted(Display *display, Window win);

Screen Stripe Height

These interfaces get and set the screen stripe height - an additive and subtractive operation. Be careful you do not end up with no screen stripe or a very large screen stripe. Refer to the XTSOLsetSSHeight(3) and XTSOLgetSSHeight(3) man pages.


Note -

These interfaces are reserved for the Window Manager.


Status XTSOLgetSSHeight(Display *display,
	int screen_num,
	int *newHeight);

void XTSOLsetSSHeight(Display *display,
	int screen_num,
	int newHeight);

Polyinstantiation Information

This routine lets a client get property information from a property at a different sensitivity label from the client. In the first call, specify the desired sensitivity label and user ID, and set enabled to True. Then call XTSOLgetPropAttributes(3), XTSOLgetPropLabel(3), or XTSOLgetPropUID(3), and finish up by calling this routine again with enabled set to False. Refer to the XTSOLsetPolyInstInfo(3) man page.

void XTSOLsetPolyInstInfo(Display *dpy,
	bslabel_t *senslabel,
	uid_t *userID, int enabled);

X11 Windows Label Clipping Interfaces

These routines translate a binary CMW label, sensitivity label, or clearance to a compound string using a font list. The returned string is clipped to the specified pixel width, or if width equals the display width (display), the label is word wrapped using a width of half the display width. See "Binary and Text Label Translation" for a description of the flags parameter. Refer to the labelclipping(3TSOL) man page.

/* CMW label */
	XmString Xbcltos(Display *display,
		const bclabel_t *cmwlabel,
		const Dimension width,
		const XmFontList fontlist,
		const int flags);

/* Sensitivity label */
	XmString Xbsltos(Display *display,
		const bslabel_t *senslabel,
		const Dimension width,
		const XmFontList fontlist,
		const int flags);

/* Clearance */
	XmString Xbcleartos(Display *display,
		const bclear_t *clearance,
		const Dimension width,
		const XmFontList fontlist,
		const int flags);