Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tk::winphoto(3) [centos man page]

WinPhoto(3)						       perl/Tk Documentation						       WinPhoto(3)

NAME
Tk::WinPhoto - Load a Photo image from a window SYNOPSIS
use Tk; use Tk::WinPhoto; my $image = $mw->Photo(-format => 'Window', -data => oct($mw->id)); $image->write($path_name, -format => 'BMP|PPM|XPM'); DESCRIPTION
This is an extension for Tk800.* which will load a Photo image from a snapshot of an X window specified by the -data option. The window must exist and be visible. Because the code allows you to capture windows not owned by Tk it does not attempt to enforce this. If you are capturing one of Tk's windows then use "$w->update". If window is mapped, but obscured by other windows then what is captured is the rectangle the window would occupy. This can be considered a feature. For Tk-owned windows "$w->raise" can used to bring window forward. Once the Photo is loaded it can be saved using "$image->write(-format => ...)" using any of formats which support writing. AUTHOR
Nick Ing-Simmons <nick@ni-s.u-net.com> Tk804.03 2014-06-10 WinPhoto(3)

Check Out this Related Man Page

winop(n)						       BLT Built-In Commands							  winop(n)

__________________________________________________________________________________________________________________________________________________

NAME
winop - Perform assorted window operations SYNOPSIS
winop lower ?window?... winop map ?window?... winop move window x y winop raise ?window?... winop snap window photoName winop unmap ?window?... winop warpto ?window? _________________________________________________________________ DESCRIPTION
The winop command performs various window operations on Tk windows using low-level Xlib function calls to work around window manager pecu- liarities. INTRODUCTION
Tk has several commands for manipulating its windows: raise, lower, wm, etc. These commands ask the window manager to perform operations on Tk windows. In some cases, a particular window manager won't perform the operation as expected. For example, if you positioned a toplevel window using wm geometry, the window may not actually be at those particular coordinates. The position of the window may be offset by dimensions of the title bar added by the window manager. In situations like these, the winop command can be used to workaround these difficulties. Instead, it makes low-level Xlib (such XRaiseWindow and XMapWindow) calls to perform these operations. toplevel .top wm withdraw .top # Set the geometry to make the window manager # place the window. wm geometry .top +100+100 # Move the window to the desired location # and "update" to force the window manager # to recognize it. winop move .top 100 100 update wm deiconify .top winop move .top 100 100 OPERATIONS
The following operations are available for the winop command: winop lower ?window?... Lowers window to the bottom of the X window stack. Window is the path name of a Tk window. winop map ?window?... Maps window on the screen. Window is the path name of a Tk window. If window is already mapped, this command has no effect. winop move window x y Move window to the screen location specified by x and y. Window is the path name of a Tk window, while x and y are screen coordi- nates. This command returns the empty string. winop raise ?window?... Raises window to the top of the X window stack. Window must be a valid path name of a Tk window. This command returns the empty string. winop snap window photoName Takes a snapshot of the window and stores the contents in the photo image photoName. Window is the valid path name of a Tk window which must be totally visible (unobscured). PhotoName is the name of a Tk photo image which must already exist. This command can fail if the window is obscured in any fashion, such as covered by another window or partially offscreen. In that case, an error message is returned. winop unmap ?window?... Unmaps window from the screen. Window is the path name of a Tk window. winop warpto ?window? Warps the pointer to window. Window is the path name of a Tk window which must be mapped. If window is in the form @x,y, where x and y are root screen coordinates, the pointer is warped to that location on the screen. [I've never heard a good case for warping the pointer in an application. It can be useful for testing, but in applications, it's always a bad idea. Simply stated, the user owns the pointer, not the application. If you have an application that needs it, I'd like to hear about it.] If no window argument is present the current location of the pointer is returned. The location is returned as a list in the form "x y", where x and y are the current coordinates of the pointer. KEYWORDS
window, map, raise, lower, pointer, warp BLT
2.4 winop(n)
Man Page