/*
* tkSelect.h --
*
* Declarations of types shared among the files that implement
* selection support.
*
* Copyright (c) 1995 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) tkSelect.h 1.4 95/11/03 13:22:41
*/
#ifndef _TKSELECT
#define _TKSELECT
/*
* When a selection is owned by a window on a given display, one of the
* following structures is present on a list of current selections in the
* display structure. The structure is used to record the current owner of
* a selection for use in later retrieval requests. There is a list of
* such structures because a display can have multiple different selections
* active at the same time.
*/
typedef struct TkSelectionInfo {
* request made to server for this
* selection (used to filter out redundant
* SelectionClear events). */
* selection. */
/* Next in list of current selections on
* this display. NULL means end of list */
/*
* One of the following structures exists for each selection handler
* created for a window by calling Tk_CreateSelHandler. The handlers
* are linked in a list rooted in the TkWindow structure.
*/
typedef struct TkSelHandler {
* conversion, such as TARGETS or
* STRING. */
* info will be returned, such
* as STRING or ATOM. */
* in this format. */
* (8 for STRING, 32 for almost
* anything else). */
/* Next selection handler associated
* with same window (NULL for end of
* list). */
} TkSelHandler;
/*
* When the selection is being retrieved, one of the following
* structures is present on a list of pending selection retrievals.
* The structure is used to communicate between the background
* procedure that requests the selection and the foreground
* event handler that processes the events in which the selection
* is returned. There is a list of such structures so that there
* can be multiple simultaneous selection retrievals (e.g. on
* different displays).
*/
typedef struct TkSelRetrievalInfo {
* selection. */
char *portion)); /* Procedure to call to handle pieces
* of selection. */
* return value once the selection
* has been retrieved. */
* without hearing anything from the
* selection owner. */
/* Next in list of all pending
* selection retrievals. NULL means
* end of list. */
/*
* The clipboard contains a list of buffers of various types and formats.
* All of the buffers of a given type will be returned in sequence when the
* CLIPBOARD selection is retrieved. All buffers of a given type on the
* same clipboard must have the same format. The TkClipboardTarget structure
* is used to record the information about a chain of buffers of the same
* type.
*/
typedef struct TkClipboardBuffer {
* means end of list . */
typedef struct TkClipboardTarget {
* Used to speed up appends. */
* clipboard. NULL means end of
* list. */
/*
* It is possible for a Tk_SelectionProc to delete the handler that it
* represents. If this happens, the code that is retrieving the selection
* needs to know about it so it doesn't use the now-defunct handler
* structure. One structure of the following form is created for each
* retrieval in progress, so that the retriever can find out if its
* handler is deleted. All of the pending retrievals (if there are more
* than one) are linked into a list.
*/
typedef struct TkSelInProgress {
* is deleted, the field is set to NULL. */
/* Next higher nested search. */
/*
* Declarations for variables shared among the selection-related files:
*/
extern TkSelInProgress *pendingPtr;
/* Topmost search in progress, or
* NULL if none. */
/*
* Chunk size for retrieving selection. It's defined both in
* words and in bytes; the word size is used to allocate
* buffer space that's guaranteed to be word-aligned and that
* has an extra character for the terminating NULL.
*/
/*
* Declarations for procedures that are used by the selection-related files
* but shouldn't be used anywhere else in Tk (or by Tk clients):
*/
extern int TkSelDefaultSelection _ANSI_ARGS_((
#ifndef TkSelUpdateClipboard
#endif
#endif /* _TKSELECT */