SEL_DATA
Used to initiate a blocking selection request. The arguments to this attribute are a pointer to a long
which will be set to the number of elements in the returned buffer and a pointer to an integer which
will be set to the data format. xv_get() returns a pointer to the selection data. Clients should free
the returned buffer. If the requestor client has not registered a reply_proc() with the selection
package and is requesting for MULTIPLE or INCR, the call will return with length set to SEL_ERROR
and format set to zero. If the requestor client has registered a reply_proc() with the selection
package and requesting for MULTIPLE or
INCR, the package will call the client’s
reply_proc() with the converted data. xv_get() returns after the transaction has completed
with length set to
XV_OK and format set to the returned data format. If the request fails the xv_get()
will return with length set to SEL_ERROR and format set to zero. For a
Selection_item object, this attribute specifies a pointer to the selection data.
Argument: Xv_opaque
Default: N/A
Procs: get for Selection_requestor objects
get and set for Selection_item objects
Objects: Selection_requestor, Selection_item
Usage:
data = (char *) xv_get(sel_requestor, SEL_DATA,
&length, &format);
See Also: 18.3.1, 18.2.3.4
SEL_DONE_PROC
Specifies the procedure that is called after the requestor has received the selection or
NULL if the own-
er is not interested in being called back.
Argument: void (*done_proc) ()
Default:
NULL
Procs: create,get,set
Objects: Selection_owner
Callback:
void
done_proc( sel, replyBuff, target )
Selection_owner sel;
Xv_opaque replyBuff;
Atom target;
sel specifies the selection owner.
replyBuff specifies the address which contains the converted data.
target specifies the target type returned by the convert procedure.
See Also: 18.2.7
SEL_FIRST_ITEM
Returns a selection item.
Argument: Selection_item
Default: N/A
Procs: get
Objects: Selection_owner
See Also: 18.3.1,
SEL_NEXT_ITEM
XView Attributes
XView Attributes 131
SEL_FORMAT
Specifies the data format.
Argument: Xv_opaque
Default: 8
Procs: create,get,set
Objects: Selection_item
See Also: 18.3.1
SEL_LENGTH
Specifies the number of 8, 16, 32-bit elements contained in the reply.
Argument: unsigned long
Default: Type-dependent
Procs: create,get,set
Objects: Selection_item
See Also: 18.3.1
SEL_LOSE_PROC
Used to register a procedure that is called back whenever the selection owner loses the selection that it
holds.
Argument: void (*lose_proc) ()
Default:
NULL
Procs: create,get,set
Objects: Selection_owner
Callback:
void
lose_proc( sel )
Selection_owner sel;
sel specifies the selection owner.
See Also: 18.2.6
SEL_NEXT_ITEM
Returns a selection item.
Argument: Selection_item
Default: N/A
Procs: get
Objects: Selection_owner
See Also: 18.3.1,
SEL_FIRST_ITEM
SEL_OWN
Setting SEL_OWN causes the selection to be acquired (TRUE) or lost (FALSE). Owning a selection with-
out an external conversion procedure or any selection items will generate a NULL-data reply to any
incoming requests.
Argument: Bool
Default:
FALSE
Procs: create,get,set
Objects: Selection_owner
See Also: 18.2.4.2
132 XView Reference Manual
SEL_PROP_DATA
Specifies the data associated with a property. Should be used in conjunction with SEL_TYPE_INDEX.
Argument: Xv_opaque
Default:
NULL
Procs: create,set
Objects: Selection_requestor
See Also: 18.6, SEL_TYPE_INDEX
SEL_PROP_FORMAT
Specifies the format of the data associated with a property. Should be used in conjunction with
SEL_TYPE_INDEX.
Argument: int
Default: N/A
Procs: create,set
Objects: Selection_requestor
See Also: 18.6,
SEL_TYPE_INDEX
SEL_PROP_INFO
Returns the property data. This attribute should be used from a conversion procedure. It returns the
data that has been set on the selection notifier’s property by the requestor client.
Argument: Sel_prop_info *
Default: N/A
Procs: get
Objects: Selection_owner
See Also: 18.7,
SEL_TYPE_INDEX
SEL_PROP_LENGTH
Specifies the length of the data associated with a property. Should be used in conjunction with
SEL_TYPE_INDEX
.
Argument: unsigned long
Default: N/A
Procs: create,set
Objects: Selection_requestor
See Also: 18.6,
SEL_TYPE_INDEX
SEL_PROP_TYPE
Specifies the type of the data associated with a property.
Argument: Atom
Default: N/A
Procs: create,set
Objects: Selection_requestor
See Also: 18.6,
SEL_PROP_INFO, SEL_TYPE_INDEX
SEL_PROP_TYPE_NAME
Specifies the type of the data associated with a property. It takes a string argument which is interned
into an atom. Should be used in conjunction with
SEL_TYPE_INDEX.
Argument: Atom
Default: N/A
Procs: create,set
Objects: Selection_requestor
See Also: 18.6,
SEL_PROP_INFO, SEL_TYPE_INDEX
XView Attributes
XView Attributes 133
SEL_RANK
Used to set the rank of the selection. Pre-defined atoms are XA_PRIMARY and XA_SECONDARY. The
client should set the rank to the atom representing the selection.
Argument: Atom
Default:
XA_PRIMARY
Procs: create,get,set
Objects: Selection
See Also: SEL_RANK and Chapter 12, Interclient Communication, in Xlib Programming Manual.
SEL_RANK_NAME
Used to set the rank of the selection. The package will intern the selection atom using this atom name
(a string).
Argument: *char
Default:
XA_PRIMARY
Procs: create,get,set
Objects: Selection
See Also: 18.2.2
SEL_REPLY_PROC
A procedure that is called when a response to a request comes in.
Argument: void (*reply_proc) ()
Default:
NULL
Procs: create,get,set
Objects: Selection_requestor
Callback:
void
reply_proc( sel_req, target, type, replyValue, length, format )
Selection_requestor sel_req;
Atom target;
Atom type;
Xv_opaque replyValue;
unsigned long length;
int format;
If the selection conversion fails, this routine is called with replyValue set to
an error code and length set to
SEL_ERROR.
sel_req specifies the selection requestor.
target specifies the target type set by the convert procedure.
type specifies the specifies the type returned by the convert procedure.
replyValue specifies the data content returned.
length specifies the length of the data returned by the convert procedure.
format specifies the format of the data returned by the convert procedure.
If the selection content is larger than the server’s maximum request size or if the selec-
tion owner has decided to transfer the selection data in increments, the selection package
will send the data to the requestor in chunks.
See Also: 18.2.5
134 XView Reference Manual
SEL_TIME
Specifies the time of the acquisition or the request attempt.
Argument: struct timeval *
Default: Last event time
Procs: create, get, set
Objects: Selection
See Also: 18.2.3
SEL_TIMEOUT_VALUE
Selection timeout value. This value indicates the number of seconds that a requestor or a selection
owner waits for a response during the selection transfer.
Argument: unsigned int
Default: From the value of the resource Selection.Timeout
Procs: create,get,set
Objects: Selection
See Also: 18.2.3.3, 18.2.2
SEL_TYPE
Specifies an atom type that the client is requesting. For a selection item, specifies the type that the
package will convert to.
Argument: Atom
Default:
XA_STRING
Procs: create,get,set
Objects: Selection_item, Selection_requestor
See Also: 18.2.3.1,
SEL_TYPES, SEL_TYPE_NAME, and Chapter 12, Interclient Communication, in
Xlib Programming Manual.
SEL_TYPE_INDEX
Specifies an index to the
SEL_TYPES or SEL_TYPE list. This attribute is also used to specify an index
to the SEL_TYPE_NAME and SEL_TYPE_NAMES lists. This attribute is used in conjunction with
SEL_PROP_DATA
, SEL_PROP_LENGTH, SEL_PROP_FORMAT, SEL_PROP_TYPE, and SEL_
PROP_TYPE_NAME to associate data with a property used by the requestor.
Argument: int
Default: N/A
Procs: create,set
Objects: Selection_requestor
Usage: (Multiple Request)
xv_set( sel_req,
SEL_TYPES, XA_STRING, INSERT_SELECTION, NULL,
SEL_TYPE_INDEX, 1,
SEL_PROP_DATA, dataPointer,
SEL_PROP_LENGTH, 20,
NULL );
Usage: (Single Request)
xv_set( sel_req, SEL_TYPE, XA_STRING,
SEL_TYPE_INDEX, 0,
SEL_PROP_DATA, dataPointer,
SEL_PROP_LENGTH, 20,
NULL );
See Also: 18.6
XView Attributes
XView Attributes 135
Get Volume 7B: XView Reference Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.