head 1.1;
branch 1.1.1;
access ;
symbols MW_0_8_9PRE7:1.1.1.1 MM:1.1.1;
locks ; strict;
comment @# @;
1.1
date 2002.02.15.09.17.30; author markom; state Exp;
branches 1.1.1.1;
next ;
1.1.1.1
date 2002.02.15.09.17.30; author markom; state Exp;
branches ;
next ;
desc
@@
1.1
log
@Initial revision
@
text
@
Details
GrSetSelectionOwner ()
void GrSetSelectionOwner (GR_WINDOW_ID wid,
GR_CHAR *typelist); |
Sets the current selection (otherwise known as the clipboard) ownership
to the specified window. Specifying an owner of 0 disowns the selection.
The typelist argument is a list of mime types (seperated by space
characters) which the window is able to supply the data as. At least one
type must be specified unless you are disowning the selection (typically
text/plain for plain ASCII text or text/uri-list for a filename).
The window which owns the current selection must be prepared to handle
SELECTION_LOST events (received when another window takes ownership of the
selection) and CLIENT_DATA_REQ events (received when a client wishes to
retreive the selection data).
GrGetSelectionOwner ()
GR_WINDOW_ID GrGetSelectionOwner (GR_CHAR **typelist); |
Finds the window which currently owns the selection and returns its ID,
or 0 if no window currently owns the selection. A pointer to the list of
mime types the selection owner is capable of supplying is placed in the
pointer specified by the typelist argument. The typelist is null terminated,
and the fields are seperated by space characters. It is the callers
responsibility to free the typelist string, as it is allocated dynamically.
If the allocation fails, it will be set to a NULL pointer, so remember to
check the value of it before using it.
GrRequestClientData ()
void GrRequestClientData (GR_WINDOW_ID wid,
GR_WINDOW_ID rid,
GR_SERIALNO serial,
GR_MIMETYPE mimetype); |
Sends a CLIENT_DATA_REQ event to the specified window. Used for requesting
both selection and "drag and drop" data. The mimetype argument specifies
the format of the data you would like to receive, as an index into the list
returned by GrGetSelectionOwner (the first type in the list is index 0).
The server makes no guarantees as to when, or even if, the client will
reply to the request. If the client does reply, the reply will take the
form of one or more CLIENT_DATA events. The request serial number is
typically a unique ID which the client can assign to a request in order for
it to be able to keep track of transfers (CLIENT_DATA events contain the
same number in the sid field). Remember to free the data field of the
CLIENT_DATA events as they are dynamically allocated. Also note that if
the allocation fails the data field will be set to NULL, so you should
check the value before using it.
GrSendClientData ()
void GrSendClientData (GR_WINDOW_ID wid,
GR_WINDOW_ID did,
GR_SERIALNO serial,
GR_LENGTH len,
GR_LENGTH thislen,
void *data); |
Used as the response to a CLIENT_DATA_REQ event. Sends the specified data
of the specified length to the specified window using the specified source
window ID and transfer serial number. Any fragmentation of the data into
multiple CLIENT_DATA events which is required is handled automatically.
The serial number should always be set to the value supplied by the
CLIENT_DATA_REQ event. The thislen parameter is used internally to split
the data up into packets. It should be set to the same value as the len
parameter.
@
1.1.1.1
log
@modified offitial version of microwindows 0.89-pre7
@
text
@@