WindowId.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:6k
- '"
- '" Copyright (c) 1990-1993 The Regents of the University of California.
- '" Copyright (c) 1994-1997 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: WindowId.3,v 1.7 2002/08/05 04:30:38 dgp Exp $
- '"
- .so man.macros
- .TH Tk_WindowId 3 "8.4" Tk "Tk Library Procedures"
- .BS
- .SH NAME
- Tk_WindowId, Tk_Parent, Tk_Display, Tk_DisplayName, Tk_ScreenNumber, Tk_Screen, Tk_X, Tk_Y, Tk_Width, Tk_Height, Tk_Changes, Tk_Attributes, Tk_IsContainer, Tk_IsEmbedded, Tk_IsMapped, Tk_IsTopLevel, Tk_ReqWidth, Tk_ReqHeight, Tk_MinReqWidth, Tk_MinReqHeight, Tk_InternalBorderLeft, Tk_InternalBorderRight, Tk_InternalBorderTop, Tk_InternalBorderBottom, Tk_Visual, Tk_Depth, Tk_Colormap - retrieve information from Tk's local data structure
- .SH SYNOPSIS
- .nf
- fB#include <tk.h>fR
- .sp
- Window
- fBTk_WindowIdfR(fItkwinfR)
- .sp
- Tk_Window
- fBTk_ParentfR(fItkwinfR)
- .sp
- Display *
- fBTk_DisplayfR(fItkwinfR)
- .sp
- CONST char *
- fBTk_DisplayNamefR(fItkwinfR)
- .sp
- int
- fBTk_ScreenNumberfR(fItkwinfR)
- .sp
- Screen *
- fBTk_ScreenfR(fItkwinfR)
- .sp
- int
- fBTk_XfR(fItkwinfR)
- .sp
- int
- fBTk_YfR(fItkwinfR)
- .sp
- int
- fBTk_WidthfR(fItkwinfR)
- .sp
- int
- fBTk_HeightfR(fItkwinfR)
- .sp
- XWindowChanges *
- fBTk_ChangesfR(fItkwinfR)
- .sp
- XSetWindowAttributes *
- fBTk_AttributesfR(fItkwinfR)
- .sp
- int
- fBTk_IsContainerfR(fItkwinfR)
- .sp
- int
- fBTk_IsEmbeddedfR(fItkwinfR)
- .sp
- int
- fBTk_IsMappedfR(fItkwinfR)
- .sp
- int
- fBTk_IsTopLevelfR(fItkwinfR)
- .sp
- int
- fBTk_ReqWidthfR(fItkwinfR)
- .sp
- int
- fBTk_ReqHeightfR(fItkwinfR)
- .sp
- int
- fBTk_MinReqWidthfR(fItkwinfR)
- .sp
- int
- fBTk_MinReqHeightfR(fItkwinfR)
- .sp
- int
- fBTk_InternalBorderLeftfR(fItkwinfR)
- .sp
- int
- fBTk_InternalBorderRightfR(fItkwinfR)
- .sp
- int
- fBTk_InternalBorderTopfR(fItkwinfR)
- .sp
- int
- fBTk_InternalBorderBottomfR(fItkwinfR)
- .sp
- Visual *
- fBTk_VisualfR(fItkwinfR)
- .sp
- int
- fBTk_DepthfR(fItkwinfR)
- .sp
- Colormap
- fBTk_ColormapfR(fItkwinfR)
- .SH ARGUMENTS
- .AS Tk_Window tkwin
- .AP Tk_Window tkwin in
- Token for window.
- .BE
- .SH DESCRIPTION
- .PP
- fBTk_WindowIdfR and the other names listed above are
- all macros that return fields from Tk's local data structure
- for fItkwinfR. None of these macros requires any
- interaction with the server; it is safe to assume that
- all are fast.
- .PP
- fBTk_WindowIdfR returns the X identifier for fItkwinfR,
- or fBNULLfR if no X window has been created for fItkwinfR
- yet.
- .PP
- fBTk_ParentfR returns Tk's token for the logical parent of
- fItkwinfR. The parent is the token that was specified when
- fItkwinfR was created, or NULL for main windows.
- .PP
- fBTk_DisplayfR returns a pointer to the Xlib display structure
- corresponding to fItkwinfR. fBTk_DisplayNamefR returns an
- ASCII string identifying fItkwinfR's display. fBTk_ScreenNumberfR
- returns the index of fItkwinfR's screen among all the screens
- of fItkwinfR's display. fBTk_ScreenfR returns a pointer to
- the Xlib structure corresponding to fItkwinfR's screen.
- .PP
- fBTk_XfR, fBTk_YfR, fBTk_WidthfR, and fBTk_HeightfR
- return information about fItkwin'sfR location within its
- parent and its size. The location information refers to the
- upper-left pixel in the window, or its border if there is one.
- The width and height information refers to the interior size
- of the window, not including any border. fBTk_ChangesfR
- returns a pointer to a structure containing all of the above
- information plus a few other fields. fBTk_AttributesfR
- returns a pointer to an XSetWindowAttributes structure describing
- all of the attributes of the fItkwinfR's window, such as background
- pixmap, event mask, and so on (Tk keeps track of all this information
- as it is changed by the application). Note: it is essential that
- applications use Tk procedures like fBTk_ResizeWindowfR instead
- of X procedures like fBXResizeWindowfR, so that Tk can keep its
- data structures up-to-date.
- .PP
- fBTk_IsContainerfR returns a non-zero value if fItkwinfR
- is a container, and that some other application may be embedding
- itself inside fItkwinfR.
- .PP
- fBTk_IsEmbeddedfR returns a non-zero value if fItkwinfR
- is is not a free-standing window, but rather is embedded in some
- other application.
- .PP
- fBTk_IsMappedfR returns a non-zero value if fItkwinfR
- is mapped and zero if fItkwinfR isn't mapped.
- .PP
- fBTk_IsTopLevelfR returns a non-zero value if fItkwinfR
- is a top-level window (its X parent is the root window of the
- screen) and zero if fItkwinfR isn't a top-level window.
- .PP
- fBTk_ReqWidthfR and fBTk_ReqHeightfR return information about
- the window's requested size. These values correspond to the last
- call to fBTk_GeometryRequestfR for fItkwinfR.
- .PP
- fBTk_MinReqWidthfR and fBTk_MinReqHeightfR return information about
- the window's minimum requested size. These values correspond to the last
- call to fBTk_SetMinimumRequestSizefR for fItkwinfR.
- .PP
- fBTk_InternalBorderLeftfR, fBTk_InternalBorderRightfR,
- fBTk_InternalBorderTopfR and fBTk_InternalBorderBottomfR
- return the width of one side of the internal border
- that has been requested for fItkwinfR, or 0 if no internal border was
- requested. The return value is simply the last value passed to
- fBTk_SetInternalBorderfR or fBTk_SetInternalBorderExfR for fItkwinfR.
- .PP
- fBTk_VisualfR, fBTk_DepthfR, and fBTk_ColormapfR return
- information about the visual characteristics of a window.
- fBTk_VisualfR returns the visual type for
- the window, fBTk_DepthfR returns the number of bits per pixel,
- and fBTk_ColormapfR returns the current
- colormap for the window. The visual characteristics are
- normally set from the defaults for the window's screen, but
- they may be overridden by calling fBTk_SetWindowVisualfR.
- .SH KEYWORDS
- attributes, colormap, depth, display, height, geometry manager,
- identifier, mapped, requested size, screen, top-level,
- visual, width, window, x, y