Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtLoseSeleB(3x) — HP-UX ANSI C A.09.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtDisownSelection(1)

XtGetSelectionValue(1)

XtGetSelectionValueIncremental(1)

XtOwnSelection(1)

XtLoseSelectionIncrProc(2)

 

NAME

XtLoseSelectionProc − interface definition for procedure to notify the selection owner it has lost selection ownership. 

Synopsis

typedef void (*XtLoseSelectionProc)(Widget, Atom *);

    Widget w;
    Atom *selection;

Inputs

wSpecifies the widget that has lost selection ownership. 

selectionSpecifies the atom that names the selection. 

Description

An XtLoseSelectionProc is optionally registered in a call to XtOwnSelection() and is called by the Intrinsics when the widget it was registered with loses the selection because another widget or client has claimed the selection.  It is not called when the selection owner relinquishes selection ownership with XtDisownSelection().  This procedure should take whatever action is appropriate for the widget or application when it loses selection ownership.  Note that this procedure is not a request to the widget to relinquish selection ownership; it is called after the widget has already lost the selection. 

Usage

Most selection owners (widgets or applications) will want to display selected data highlighted in some way, and so will need to be informed when they lose the selection so that they can unhighlight that data.  An XtLoseSelectionIncrProc is a similar procedure type used by the Intrinsics incremental selection transfer mechanism.  It takes an additional client_data argument. 

Example

The XtLoseSelectionProc below is from the xcalc client.  It simply unhighlights the value currently shown in the calculator display. 

/*
 * called when xcalc loses ownership of the selection.
 */
/*ARGSUSED*/
void lose(w, selection)
    Widget      w;
    Atom        *selection;
{
    XawToggleUnsetCurrent(LCD);
}

See Also

XtDisownSelection(1), XtGetSelectionValue(1), XtGetSelectionValueIncremental(1), XtOwnSelection(1),
XtLoseSelectionIncrProc(2). 

Copyright O’Reilly & Assoc.  —  X Toolkit Intrinsics Reference Manual © O’Reilly & Associates

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026