man page(1) manual page
Table of Contents

_________________________________________________________________

NAME

Tk_OwnSelection - make a window the owner of the primary selection

SYNOPSIS

#include <tk.h>

Tk_OwnSelection(tkwin, proc, clientData)

ARGUMENTS

Tk_Window
tkwin (in) Window that is to become new selection owner.

Tk_LostSelProc *proc (in) Procedure to invoke when tkwin
loses
selection ownership later.

ClientData
clientData (in) Arbitrary one-word value to pass to proc. _________________________________________________________________

DESCRIPTION

Tk_OwnSelection arranges for tkwin to become the new owner of the primary selection. After this call completes, future requests for the selection will be directed to handlers created for tkwin using Tk_CreateSelHandler. When tkwin eventually loses the selection ownership, proc will be invoked so that the window can clean itself up (e.g. by unhighlighting the selection). Proc should have arguments and result that match the type Tk_LostSelProc: typedef void Tk_LostSelProc(ClientData clientData); The clientData parameter to proc is a copy of the clientData argument given to Tk_OwnSelection, and is usually a pointer to a data structure containing applicationspecific information about tkwin.

Once a window has become selection owner, it will remain owner until either the window is deleted or until some other window claims ownership. There is no way for a window to disavow ownership of the selection once it has received it.

KEYWORDS

own, selection owner


Table of Contents