Tk_GetSelection(3) | Tk Library Procedures | Tk_GetSelection(3) |
Tk_GetSelection - retrieve the contents of a selection
#include <tk.h> int Tk_GetSelection(interp, tkwin, selection, target, proc, clientData)
Tk_GetSelection retrieves the selection specified by the atom selection in the format specified by target. The selection may actually be retrieved in several pieces; as each piece is retrieved, proc is called to process the piece. Proc should have arguments and result that match the type Tk_GetSelProc:
typedef int Tk_GetSelProc(
ClientData clientData,
Tcl_Interp *interp,
char *portion);
Tk_GetSelection returns to its caller when the selection has been completely retrieved and processed by proc, or when a fatal error has occurred (e.g. the selection owner did not respond promptly). Tk_GetSelection normally returns TCL_OK; if an error occurs, it returns TCL_ERROR and leaves an error message in interp->result. Proc should also return either TCL_OK or TCL_ERROR. If proc encounters an error in dealing with the selection, it should leave an error message in interp->result and return TCL_ERROR; this will abort the selection retrieval.
format, get, selection retrieval
4.0 | Tk |