Tk_GetSelection(3)
πΈ NAME πΈ
okay so this page is from the Tk Library Procedures, and the main character is Tk_GetSelection - retrieve the contents of a selection. that's the whole NAME vibe, bestie π
β¨ SYNOPSIS β¨
#include <tk.h>
int
Tk_GetSelection(interp, tkwin, selection, target, proc, clientData)
π ARGUMENTS π
Tcl_Interp *interp (in)β the interpreter used for reporting errors, bestie.Tk_Window tkwin (in)β the window on whose behalf to retrieve the selection; it determines the display from which to retrieve. πͺAtom selection (in)β the name of the selection to be retrieved.Atom target (in)β the form in which to retrieve the selection.Tk_GetSelProc *proc (in)β the procedure to invoke to process pieces of the selection as they are retrieved. πvoid *clientData (in)β an arbitrary one-word value to pass toproc.
π¦ DESCRIPTION π¦
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(
void *clientData,
Tcl_Interp *interp,
char *portion);
the clientData and interp parameters to proc will be copies of the corresponding arguments to Tk_GetSelection. portion will be a pointer to a string containing part or all of the selection. for large selections, proc will be called several times with successive portions of the selection. π«Ά
the X Inter-Client Communication Conventions Manual allows a selection to be returned in formats other than strings, e.g. as an array of atoms or integers. if this happens, Tk converts the selection back into a string before calling proc. if a selection is returned as an array of atoms, Tk converts it to a string containing the atom names separated by white space. for any other format besides string, Tk converts a selection to a string containing hexadecimal values separated by white space. β¨
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 interpreter interp's 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 the interpreter result and return TCL_ERROR; this will abort the selection retrieval. π
π KEYWORDS π
format, get, selection retrieval
and that's the whole page, bestie π
footer vibe check: this is Tk version 4.0, page Tk_GetSelection(3) β no separate date printed on this footer, just those two cuties. πβ¨
π¦ where this page comes from
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 1990-1994 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms