## Tcl9.0.3/Tk9.0.3 Documentation > Tk C API > WinUtil

### 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_GetOtherWindow, Tk_MakeContainer, Tk_MakeWindow, Tk_UseWindow — 窓用利便函数 window utility functions
  SYNOPSIS
    #include <tk.h>
    Tk_Window
    Tk_GetOtherWindow(tkwin)
    Tk_MakeContainer(tkwin)
    Tk_MakeWindow(tkwin, parent)
    int
    Tk_UseWindow(interp, tkwin, string)
  引数 ARGUMENTS
    Tcl_Interp * (interp)
    Tk_Window tkwin (入力in)
    Window parent (入力in)
    const char *string (入力in)
  説明 DESCRIPTION
  KEYWORDS

### NAME

Tk_GetOtherWindow, Tk_MakeContainer, Tk_MakeWindow, Tk_UseWindow — 窓用利便函数 window utility functions

### SYNOPSIS

#include <tk.h>
Tk_Window
Tk_GetOtherWindow(tkwin)
Tk_MakeContainer(tkwin)
Tk_MakeWindow(tkwin, parent)
int
Tk_UseWindow(interp, tkwin, string)

### 引数 ARGUMENTS

Tcl_Interp * (interp)
  応用譜にに関連する解釈実行機能｡ Interpreter associated with the application.

Tk_Window tkwin (入力in)
  窓に関する解析字句｡ Token for window.

Window parent (入力in)
  親の窓｡ Parent window.

const char *string (入力in)
  tkwinの為に使う X 窓を識別する文字列; 整数でなければならない｡ String identifying an X window to use for tkwin; must be an integer value.

### 説明 DESCRIPTION

親の窓と､埋込窓の両方が同じ手続きにあると､Tk_GetOtherWindowは､ どちらか片方を与えられ､他方を返す｡ もし､winPtrが親の場合､返される値は､埋込窓の為の解析字句であり､ そしてその逆もまた然り｡ もし､"他方の"窓がこの処理にない場合､NULLが返される｡ If both the container and embedded window are in the same process, Tk_GetOtherWindow will return either one, given the other. If winPtr is a container, the return value is the token for the embedded window, and vice versa. If the "other" window isn't in this process, NULL is returned.

Tk_MakeContainerは 特定の窓が埋込窓の親になることを示す､為に呼ばれる｡ これは､ 行事をこれ以上受容れるか否かの様な､ 窓の振舞の特定の側面､ を変える｡ Tk_MakeContainer is called to indicate that a particular window will be a container for an embedded application. This changes certain aspects of the window's behavior, such as whether it will receive events anymore.

Tk_MakeWindowは､指定されたTkWindowの現在の属性に基いて､ 実際の窓系窓対象を生成する｡ 新しい窓への取扱い子を返すか､失敗すると何も返さない｡ Tk_MakeWindow creates an actual window system window object based on the current attributes of the specified TkWindow. It returns the handle to the new window, or None on failure.

Tk_UseWindowは Tk に対して 与えられた X 窓を､画面の為の根本窓ではなく 親の窓として使うようにさせる｡ それは､それが埋め込まれた窓を指し示す為に 埋め込まれた応用譜によって起動される｡[訳註:解らん??] Tk_UseWindow causes a Tk window to use a given X window as its parent window, rather than the root window for the screen. It is invoked by an embedded application to specify the window in which it is embedded.

帰り値は通常はTCL_OKである｡ もし､不都合が生じると､ 返り値はTCL_ERROR であり､且つ､ 解釈実行機能が非ヌルであれば､ 不都合伝言文が解釈実行機能の結果内に 残される｡ The return value is normally TCL_OK. If an error occurs (such as string not being a valid window spec), then the return value is TCL_ERROR and an error message is left in the interp's result if interp is non-NULL.

### KEYWORDS

parent, window
Copyright © 1990-1993 The Regents of the University of California.
Copyright © 1994-1996 Sun Microsystems, Inc.