## Tcl8.6.17/Tk8.6.17 Documentation > Tk C API > OwnSelect

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

  NAME
    Tk_OwnSelection — 窓を優先選択の所有者にする make a window the owner of the primary selection
  SYNOPSIS
    #include <tk.h>
    Tk_OwnSelection(tkwin, selection, proc, clientData)
  引数 ARGUMENTS
    Tk_Window tkwin (入力in)
    Atom selection (入力in)
    Tk_LostSelProc *proc (入力in)
    ClientData clientData (入力in)
  説明 DESCRIPTION
  KEYWORDS

### NAME

Tk_OwnSelection — 窓を優先選択の所有者にする make a window the owner of the primary selection

### SYNOPSIS

#include <tk.h>
Tk_OwnSelection(tkwin, selection, proc, clientData)

### 引数 ARGUMENTS

Tk_Window tkwin (入力in)
  新しく選択の所有者になる窓 Window that is to become new selection owner.

Atom selection (入力in)
  所有されるべき選択の名前､譬ば､ XA_PRIMARY の如く｡ The name of the selection to be owned, such as XA_PRIMARY.

Tk_LostSelProc *proc (入力in)
  tkwin が後に選択の所有権を失う時に起動される手続函数｡ Procedure to invoke when tkwin loses selection ownership later.

ClientData clientData (入力in)
  procに手渡される任意の一語値｡ Arbitrary one-word value to pass to proc.

### 説明 DESCRIPTION

Tk_OwnSelection は tkwin の為に､基本子 selection により指定された選択の新しい所有者になることを手配する｡この呼出が完了した後､選択の為の将来の要求は､ Tk_CreateSelHandler を使用して tkwin の為に作成された処理機能に指定される｡ tkwin が最終的に選択の所有権を失う時､ proc が起動され､窓が自身を浄化できる(譬えば､選択の輝度強調中止)｡ proc は型 Tk_LostSelProc と合致する引数と結果を有するべきである: Tk_OwnSelection arranges for tkwin to become the new owner of the selection specified by the atom 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);

proc への clientData 引数は､ Tk_OwnSelection に与えられる clientData 引数の複写であり､普通は tkwin に関する応用譜固有の情報を含むデータ構造へのポインターである｡ 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 application-specific information about tkwin.

### KEYWORDS

own, selection owner
Copyright © 1990-1994 The Regents of the University of California.
Copyright © 1994-1996 Sun Microsystems, Inc.