1mNAME0m
       winfo - Return window-related information

1mSYNOPSIS0m
       1mwinfo 4m22moption24m ?4marg24m 4marg24m 4m...24m?


1mDESCRIPTION0m
       The 1mwinfo 22mcommand is used to retrieve information about windows managed
       by Tk.  It can take any of a number of different  forms,  depending  on
       the 4moption24m argument.  The legal forms are:

       1mwinfo atom 22m?1m-displayof 4m22mwindow24m? 4mname0m
              Returns  a  decimal string giving the integer identifier for the
              atom whose name is 4mname24m.  If no atom exists with the  name  4mname0m
              then  a  new  one is created.  If the 1m-displayof 22moption is given
              then the atom is looked up on the display of 4mwindow24m;   otherwise
              it is looked up on the display of the application's main window.

       1mwinfo atomname 22m?1m-displayof 4m22mwindow24m? 4mid0m
              Returns the textual name for the atom whose  integer  identifier
              is 4mid24m.  If the 1m-displayof 22moption is given then the identifier is
              looked up on the display of 4mwindow24m;  otherwise it is  looked  up
              on  the  display of the application's main window.  This command
              is the inverse of the 1mwinfo atom 22mcommand.  It generates an error
              if no such atom exists.

       1mwinfo cells 4m22mwindow0m
              Returns a decimal string giving the number of cells in the color
              map for 4mwindow24m.

       1mwinfo children 4m22mwindow0m
              Returns a list containing the path names of all the children  of
              4mwindow24m.   The  list is in stacking order, with the lowest window
              first.  Top-level windows are returned as children of their log-
              ical parents.

       1mwinfo class 4m22mwindow0m
              Returns the class name for 4mwindow24m.

       1mwinfo colormapfull 4m22mwindow0m
              Returns 1 if the colormap for 4mwindow24m is known to be full, 0 oth-
              erwise.  The colormap for a window is ``known'' to  be  full  if
              the  last  attempt to allocate a new color on that window failed
              and this application hasn't freed any  colors  in  the  colormap
              since the failed allocation.

       1mwinfo containing 22m?1m-displayof 4m22mwindow24m? 4mrootX24m 4mrootY0m
              Returns  the path name for the window containing the point given
              by 4mrootX24m and 4mrootY24m.  4mRootX24m and 4mrootY24m  are  specified  in  screen
              units (i.e.  any form acceptable to 1mTk_GetPixels22m) in the coordi-
              nate system of the root window (if a virtual-root window manager
              is  in use then the coordinate system of the virtual root window
              is used).  If the 1m-displayof 22moption is given  then  the  coordi-
              nates  refer  to  the  screen containing 4mwindow24m;  otherwise they
              refer to the screen of the application's  main  window.   If  no
              window  in  this  application  contains  the point then an empty
              string is returned.  In selecting the containing  window,  chil-
              dren  are  given higher priority than parents and among siblings
              the highest one in the stacking order is chosen.

       1mwinfo depth 4m22mwindow0m
              Returns a decimal string giving the depth of 4mwindow24m  (number  of
              bits per pixel).

       1mwinfo exists 4m22mwindow0m
              Returns  1  if  there exists a window named 4mwindow24m, 0 if no such
              window exists.

       1mwinfo fpixels 4m22mwindow24m 4mnumber0m
              Returns a floating-point value giving the number  of  pixels  in
              4mwindow24m  corresponding  to  the distance given by 4mnumber24m.  4mNumber0m
              may  be  specified  in  any   of   the   forms   acceptable   to
              1mTk_GetScreenMM22m,  such  as  ``2.0c'' or ``1i''.  The return value
              may be fractional;  for an integer value, use 1mwinfo pixels22m.

       1mwinfo geometry 4m22mwindow0m
              Returns the geometry for 4mwindow24m, in the  form  4mwidth24m1mx4m22mheight24m1m+4m22mx24m1m+4m22my24m.
              All dimensions are in pixels.

       1mwinfo height 4m22mwindow0m
              Returns a decimal string giving 4mwindow24m's height in pixels.  When
              a window is first created its  height  will  be  1  pixel;   the
              height  will eventually be changed by a geometry manager to ful-
              fill the window's needs.  If you need the  true  height  immedi-
              ately after creating a widget, invoke 1mupdate 22mto force the geome-
              try manager to arrange it, or use 1mwinfo  reqheight  22mto  get  the
              window's requested height instead of its actual height.

       1mwinfo id 4m22mwindow0m
              Returns  a  hexadecimal  string giving a low-level platform-spe-
              cific identifier for 4mwindow24m.  On Unix platforms, this is  the  X
              window identifier.  Under Windows, this is the Windows HWND.  On
              the Macintosh the value has no meaning outside Tk.

       1mwinfo interps 22m?1m-displayof 4m22mwindow24m?
              Returns a list whose members are the names  of  all  Tcl  inter-
              preters  (e.g.  all  Tk-based applications) currently registered
              for a particular display.  If the  1m-displayof  22moption  is  given
              then  the  return value refers to the display of 4mwindow24m;  other-
              wise it refers to the display of the application's main  window.

       1mwinfo ismapped 4m22mwindow0m
              Returns 1m1 22mif 4mwindow24m is currently mapped, 1m0 22motherwise.

       1mwinfo manager 4m22mwindow0m
              Returns  the  name of the geometry manager currently responsible
              for 4mwindow24m, or an empty string if 4mwindow24m isn't  managed  by  any
              geometry  manager.  The name is usually the name of the Tcl com-
              mand for the geometry manager, such as 1mpack 22mor  1mplace22m.   If  the
              geometry manager is a widget, such as canvases or text, the name
              is the widget's class command, such as 1mcanvas22m.

       1mwinfo name 4m22mwindow0m
              Returns 4mwindow24m's name (i.e.  its  name  within  its  parent,  as
              opposed  to  its full path name).  The command 1mwinfo name . 22mwill
              return the name of the application.

       1mwinfo parent 4m22mwindow0m
              Returns the path name of 4mwindow24m's parent, or an empty string  if
              4mwindow24m is the main window of the application.

       1mwinfo pathname 22m?1m-displayof 4m22mwindow24m? 4mid0m
              Returns  the  path  name of the window whose X identifier is 4mid24m.
              4mId24m must be a decimal, hexadecimal, or  octal  integer  and  must
              correspond  to  a  window  in  the invoking application.  If the
              1m-displayof 22moption is given then the identifier is looked  up  on
              the display of 4mwindow24m;  otherwise it is looked up on the display
              of the application's main window.

       1mwinfo pixels 4m22mwindow24m 4mnumber0m
              Returns the number of pixels in 4mwindow24m corresponding to the dis-
              tance  given  by  4mnumber24m.  4mNumber24m may be specified in any of the
              forms acceptable to 1mTk_GetPixels22m, such as  ``2.0c''  or  ``1i''.
              The result is rounded to the nearest integer value;  for a frac-
              tional result, use 1mwinfo fpixels22m.

       1mwinfo pointerx 4m22mwindow0m
              If the mouse pointer is on the same screen  as  4mwindow24m,  returns
              the  pointer's  x coordinate, measured in pixels in the screen's
              root window.  If a virtual root window is in use on the  screen,
              the  position  is  measured  in  the virtual root.  If the mouse
              pointer isn't on the same screen as 4mwindow24m then -1 is  returned.

       1mwinfo pointerxy 4m22mwindow0m
              If  the mouse pointer is on the same screen as 4mwindow24m, returns a
              list with two elements, which are the pointer's x and y  coordi-
              nates measured in pixels in the screen's root window.  If a vir-
              tual root window is in use on the screen, the position  is  com-
              puted  in  the  virtual root.  If the mouse pointer isn't on the
              same screen as 4mwindow24m then both of the returned coordinates  are
              -1.

       1mwinfo pointery 4m22mwindow0m
              If  the  mouse  pointer is on the same screen as 4mwindow24m, returns
              the pointer's y coordinate, measured in pixels in  the  screen's
              root  window.  If a virtual root window is in use on the screen,
              the position is computed in the  virtual  root.   If  the  mouse
              pointer  isn't on the same screen as 4mwindow24m then -1 is returned.

       1mwinfo reqheight 4m22mwindow0m
              Returns a decimal string giving 4mwindow24m's  requested  height,  in
              pixels.   This is the value used by 4mwindow24m's geometry manager to
              compute its geometry.

       1mwinfo reqwidth 4m22mwindow0m
              Returns a decimal string giving  4mwindow24m's  requested  width,  in
              pixels.   This is the value used by 4mwindow24m's geometry manager to
              compute its geometry.

       1mwinfo rgb 4m22mwindow24m 4mcolor0m
              Returns a list containing three decimal values,  which  are  the
              red, green, and blue intensities that correspond to 4mcolor24m in the
              window given by 4mwindow24m.  4mColor24m may be specified in  any  of  the
              forms acceptable for a color option.

       1mwinfo rootx 4m22mwindow0m
              Returns  a  decimal  string giving the x-coordinate, in the root
              window of the screen, of the upper-left corner of 4mwindow24m's  bor-
              der (or 4mwindow24m if it has no border).

       1mwinfo rooty 4m22mwindow0m
              Returns  a  decimal  string giving the y-coordinate, in the root
              window of the screen, of the upper-left corner of 4mwindow24m's  bor-
              der (or 4mwindow24m if it has no border).

       1mwinfo screen 4m22mwindow0m
              Returns  the  name  of the screen associated with 4mwindow24m, in the
              form 4mdisplayName24m.4mscreenIndex24m.

       1mwinfo screencells 4m22mwindow0m
              Returns a decimal string giving  the  number  of  cells  in  the
              default color map for 4mwindow24m's screen.

       1mwinfo screendepth 4m22mwindow0m
              Returns  a decimal string giving the depth of the root window of
              4mwindow24m's screen (number of bits per pixel).

       1mwinfo screenheight 4m22mwindow0m
              Returns a decimal string giving the height of  4mwindow24m's  screen,
              in pixels.

       1mwinfo screenmmheight 4m22mwindow0m
              Returns  a  decimal string giving the height of 4mwindow24m's screen,
              in millimeters.

       1mwinfo screenmmwidth 4m22mwindow0m
              Returns a decimal string giving the width of 4mwindow24m's screen, in
              millimeters.

       1mwinfo screenvisual 4m22mwindow0m
              Returns  one  of  the  following strings to indicate the default
              visual class for 4mwindow24m's screen: 1mdirectcolor22m, 1mgrayscale22m,  1mpseu-0m
              1mdocolor22m, 1mstaticcolor22m, 1mstaticgray22m, or 1mtruecolor22m.

       1mwinfo screenwidth 4m22mwindow0m
              Returns a decimal string giving the width of 4mwindow24m's screen, in
              pixels.

       1mwinfo server 4m22mwindow0m
              Returns a string containing information  about  the  server  for
              4mwindow24m's display.  The exact format of this string may vary from
              platform to platform.  For X servers the  string  has  the  form
              ``1mX4m22mmajor24m1mR4m22mminor24m  4mvendor24m 4mvendorVersion24m'' where 4mmajor24m and 4mminor24m are
              the version and revision numbers provided by the  server  (e.g.,
              1mX11R522m),  4mvendor24m  is  the  name of the vendor for the server, and
              4mvendorRelease24m is an  integer  release  number  provided  by  the
              server.

       1mwinfo toplevel 4m22mwindow0m
              Returns the path name of the top-level window containing 4mwindow24m.

       1mwinfo viewable 4m22mwindow0m
              Returns 1 if 4mwindow24m and all of  its  ancestors  up  through  the
              nearest  toplevel  window are mapped.  Returns 0 if any of these
              windows are not mapped.

       1mwinfo visual 4m22mwindow0m
              Returns one of the following  strings  to  indicate  the  visual
              class  for  4mwindow24m: 1mdirectcolor22m, 1mgrayscale22m, 1mpseudocolor22m, 1mstatic-0m
              1mcolor22m, 1mstaticgray22m, or 1mtruecolor22m.

       1mwinfo visualid 4m22mwindow0m
              Returns the X identifier for the visual for 4mwindow24m.

       1mwinfo visualsavailable 4m22mwindow24m ?1mincludeids22m?
              Returns a list whose elements describe the visuals available for
              4mwindow24m's  screen.   Each element consists of a visual class fol-
              lowed by an integer depth.  The  class  has  the  same  form  as
              returned  by  1mwinfo  visual22m.  The depth gives the number of bits
              per pixel in the visual.  In addition, if the  1mincludeids  22margu-
              ment is provided, then the depth is followed by the X identifier
              for the visual.

       1mwinfo vrootheight 4m22mwindow0m
              Returns the height of the virtual root  window  associated  with
              4mwindow24m  if  there  is one;  otherwise returns the height of 4mwin-0m
              4mdow24m's screen.

       1mwinfo vrootwidth 4m22mwindow0m
              Returns the width of the virtual  root  window  associated  with
              4mwindow24m if there is one;  otherwise returns the width of 4mwindow24m's
              screen.

       1mwinfo vrootx 4m22mwindow0m
              Returns the x-offset of the virtual root window associated  with
              4mwindow24m, relative to the root window of its screen.  This is nor-
              mally either zero or negative.  Returns 0 if there is no virtual
              root window for 4mwindow24m.

       1mwinfo vrooty 4m22mwindow0m
              Returns  the y-offset of the virtual root window associated with
              4mwindow24m, relative to the root window  of  its  screen.   This  is
              normally either zero or negative.  Returns 0 if there is no vir-
              tual root window for 4mwindow24m.

       1mwinfo width 4m22mwindow0m
              Returns a decimal string giving 4mwindow24m's width in pixels.   When
              a  window is first created its width will be 1 pixel;  the width
              will eventually be changed by a geometry manager to fulfill  the
              window's  needs.   If  you need the true width immediately after
              creating a widget, invoke 1mupdate 22mto force the  geometry  manager
              to  arrange  it,  or  use  1mwinfo  reqwidth  22mto  get the window's
              requested width instead of its actual width.

       1mwinfo x 4m22mwindow0m
              Returns a decimal string giving the  x-coordinate,  in  4mwindow24m's
              parent,  of  the upper-left corner of 4mwindow24m's border (or 4mwindow0m
              if it has no border).

       1mwinfo y 4m22mwindow0m
              Returns a decimal string giving the  y-coordinate,  in  4mwindow24m's
              parent,  of  the upper-left corner of 4mwindow24m's border (or 4mwindow0m
              if it has no border).


1mKEYWORDS0m
       atom,  children,  class,  geometry,  height,  identifier,  information,
       interpreters,  mapped,  parent, path name, screen, virtual root, width,
