diff options
Diffstat (limited to 'macosx/tkMacOSXWm.h')
-rw-r--r-- | macosx/tkMacOSXWm.h | 170 |
1 files changed, 89 insertions, 81 deletions
diff --git a/macosx/tkMacOSXWm.h b/macosx/tkMacOSXWm.h index 037ccdc..4b18477 100644 --- a/macosx/tkMacOSXWm.h +++ b/macosx/tkMacOSXWm.h @@ -1,58 +1,61 @@ /* * tkMacOSXWm.h -- * - * Declarations of Macintosh specific functions for implementing the - * Mac OS X Notifier. + * Declarations of Macintosh specific window manager structures. * - * Copyright 2001, Apple Computer, Inc. + * Copyright 2001, Apple Computer, Inc. + * Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net> * - * The following terms apply to all files originating from Apple - * Computer, Inc. ("Apple") and associated with the software - * unless explicitly disclaimed in individual files. + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. * + * The following terms apply to all files originating from Apple + * Computer, Inc. ("Apple") and associated with the software + * unless explicitly disclaimed in individual files. * - * Apple hereby grants permission to use, copy, modify, - * distribute, and license this software and its documentation - * for any purpose, provided that existing copyright notices are - * retained in all copies and that this notice is included - * verbatim in any distributions. No written agreement, license, - * or royalty fee is required for any of the authorized - * uses. Modifications to this software may be copyrighted by - * their authors and need not follow the licensing terms - * described here, provided that the new terms are clearly - * indicated on the first page of each file where they apply. * + * Apple hereby grants permission to use, copy, modify, + * distribute, and license this software and its documentation + * for any purpose, provided that existing copyright notices are + * retained in all copies and that this notice is included + * verbatim in any distributions. No written agreement, license, + * or royalty fee is required for any of the authorized + * uses. Modifications to this software may be copyrighted by + * their authors and need not follow the licensing terms + * described here, provided that the new terms are clearly + * indicated on the first page of each file where they apply. * - * IN NO EVENT SHALL APPLE, THE AUTHORS OR DISTRIBUTORS OF THE - * SOFTWARE BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, - * INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF - * THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, - * EVEN IF APPLE OR THE AUTHORS HAVE BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. APPLE, THE AUTHORS AND - * DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, - * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS - * SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND APPLE,THE - * AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE - * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * - * GOVERNMENT USE: If you are acquiring this software on behalf - * of the U.S. government, the Government shall have only - * "Restricted Rights" in the software and related documentation - * as defined in the Federal Acquisition Regulations (FARs) in - * Clause 52.227.19 (c) (2). If you are acquiring the software - * on behalf of the Department of Defense, the software shall be - * classified as "Commercial Computer Software" and the - * Government shall have only "Restricted Rights" as defined in - * Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the - * foregoing, the authors grant the U.S. Government and others - * acting in its behalf permission to use and distribute the - * software in accordance with the terms specified in this - * license. + * IN NO EVENT SHALL APPLE, THE AUTHORS OR DISTRIBUTORS OF THE + * SOFTWARE BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, + * INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF + * THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, + * EVEN IF APPLE OR THE AUTHORS HAVE BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. APPLE, THE AUTHORS AND + * DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS + * SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND APPLE,THE + * AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE + * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * - * RCS: @(#) $Id: tkMacOSXWm.h,v 1.2.2.4 2006/03/28 02:44:14 das Exp $ + * GOVERNMENT USE: If you are acquiring this software on behalf + * of the U.S. government, the Government shall have only + * "Restricted Rights" in the software and related documentation + * as defined in the Federal Acquisition Regulations (FARs) in + * Clause 52.227.19 (c) (2). If you are acquiring the software + * on behalf of the Department of Defense, the software shall be + * classified as "Commercial Computer Software" and the + * Government shall have only "Restricted Rights" as defined in + * Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the + * foregoing, the authors grant the U.S. Government and others + * acting in its behalf permission to use and distribute the + * software in accordance with the terms specified in this + * license. + * + * RCS: @(#) $Id: tkMacOSXWm.h,v 1.2.2.5 2007/04/29 02:26:51 das Exp $ */ - + #ifndef _TKMACWM #define _TKMACWM @@ -73,7 +76,7 @@ typedef struct ProtocolHandler { * end of list. */ Tcl_Interp *interp; /* Interpreter in which to invoke command. */ char command[4]; /* Tcl command to invoke when a client - * message for this protocol arrives. + * message for this protocol arrives. * The actual size of the structure varies * to accommodate the needs of the actual * command. THIS MUST BE THE LAST FIELD OF @@ -94,10 +97,10 @@ typedef struct TkWmInfo { Window reparent; /* If the window has been reparented, this * gives the ID of the ancestor of the window * that is a child of the root window (may - * not be window's immediate parent). If + * not be window's immediate parent). If * the window isn't reparented, this has the * value None. */ - Tk_Uid titleUid; /* Title to display in window caption. If + Tk_Uid titleUid; /* Title to display in window caption. If * NULL, use name of widget. */ char *iconName; /* Name to display in icon. */ Window master; /* Master window for TRANSIENT_FOR property, @@ -106,7 +109,7 @@ typedef struct TkWmInfo { * window manager. */ char *leaderName; /* Path name of leader of window group * (corresponds to hints.window_group). - * Malloc-ed. Note: this field doesn't + * Malloc-ed. Note: this field doesn't * get updated if leader is destroyed. */ char *masterWindowName; /* Path name of window specified as master * in "wm transient" command, or NULL. @@ -125,7 +128,7 @@ typedef struct TkWmInfo { int sizeHintsFlags; /* Flags word for XSizeHints structure. * If the PBaseSize flag is set then the - * window is gridded; otherwise it isn't + * window is gridded; otherwise it isn't * gridded. */ int minWidth, minHeight; /* Minimum dimensions of window, in * grid units, not pixels. */ @@ -137,8 +140,8 @@ typedef struct TkWmInfo { int widthInc, heightInc; /* Increments for size changes (# pixels * per step). */ struct { - int x; /* numerator */ - int y; /* denominator */ + int x; /* numerator */ + int y; /* denominator */ } minAspect, maxAspect; /* Min/max aspect ratios for window. */ int reqGridWidth, reqGridHeight; /* The dimensions of the window (in @@ -151,15 +154,15 @@ typedef struct TkWmInfo { */ int width, height; /* Desired dimensions of window, specified - * in grid units. These values are + * in grid units. These values are * set by the "wm geometry" command and by * ConfigureNotify events (for when wm - * resizes window). -1 means user hasn't + * resizes window). -1 means user hasn't * requested dimensions. */ int x, y; /* Desired X and Y coordinates for window. * These values are set by "wm geometry", * plus by ConfigureNotify events (when wm - * moves window). These numbers are + * moves window). These numbers are * different than the numbers stored in * winPtr->changes because (a) they could be * measured from the right or bottom edge @@ -169,18 +172,20 @@ typedef struct TkWmInfo { * parent rather than the window itself. */ int parentWidth, parentHeight; /* Width and height of reparent, in pixels - * *including border*. If window hasn't been + * *including border*. If window hasn't been * reparented then these will be the outer * dimensions of the window, including * border. */ - int xInParent, yInParent; /* Offset of window within reparent, measured + int xInParent, yInParent; /* Offset of window within reparent, measured * from upper-left outer corner of parent's * border to upper-left outer corner of child's - * border. If not reparented then these are + * border. If not reparented then these are * zero. */ + int configX, configY; /* x,y position of toplevel when window is + * switched into fullscreen state, */ int configWidth, configHeight; /* Dimensions passed to last request that we - * issued to change geometry of window. Used + * issued to change geometry of window. Used * to eliminate redundant resize operations. */ /* @@ -192,15 +197,15 @@ typedef struct TkWmInfo { * or None if there is no virtual root * window (i.e. just use the screen's root). */ int vRootX, vRootY; /* Position of the virtual root inside the - * root window. If the WM_VROOT_OFFSET_STALE + * root window. If the WM_VROOT_OFFSET_STALE * flag is set then this information may be * incorrect and needs to be refreshed from - * the X server. If vRoot is None then these + * the X server. If vRoot is None then these * values are both 0. */ unsigned int vRootWidth, vRootHeight; /* Dimensions of the virtual root window. * If vRoot is None, gives the dimensions - * of the containing screen. This information + * of the containing screen. This information * is never stale, even though vRootX and * vRootY can be. */ @@ -218,8 +223,8 @@ typedef struct TkWmInfo { ProtocolHandler *protPtr; /* First in list of protocol handlers for * this window (NULL means none). */ int cmdArgc; /* Number of elements in cmdArgv below. */ - CONST char **cmdArgv; /* Array of strings to store in the - * WM_COMMAND property. NULL means nothing + const char **cmdArgv; /* Array of strings to store in the + * WM_COMMAND property. NULL means nothing * available. */ char *clientMachine; /* String to store in WM_CLIENT_MACHINE * property, or NULL. */ @@ -228,10 +233,10 @@ typedef struct TkWmInfo { /* * Macintosh information. */ - int style; /* Native window style. */ - int macClass; - int attributes; + WindowClass macClass; + WindowAttributes attributes, configAttributes; TkWindow *scrollWinPtr; /* Ptr to scrollbar handling grow widget. */ + short style; /* Legacy window style. */ } WmInfo; @@ -239,11 +244,11 @@ typedef struct TkWmInfo { * Flag values for WmInfo structures: * * WM_NEVER_MAPPED - non-zero means window has never been - * mapped; need to update all info when + * mapped; need to update all info when * window is first mapped. * WM_UPDATE_PENDING - non-zero means a call to UpdateGeometryInfo * has already been scheduled for this - * window; no need to schedule another one. + * window; no need to schedule another one. * WM_NEGATIVE_X - non-zero means x-coordinate is measured in * pixels from right edge of screen, rather * than from left edge. @@ -258,7 +263,7 @@ typedef struct TkWmInfo { * about the virtual root window is stale and * needs to be fetched fresh from the X server. * WM_ABOUT_TO_MAP - non-zero means that the window is about to - * be mapped by TkWmMapWindow. This is used + * be mapped by TkWmMapWindow. This is used * by UpdateGeometryInfo to modify its behavior. * WM_MOVE_PENDING - non-zero means the application has requested * a new position for the window, but it hasn't @@ -280,19 +285,22 @@ typedef struct TkWmInfo { * command). */ -#define WM_NEVER_MAPPED 1 -#define WM_UPDATE_PENDING 2 -#define WM_NEGATIVE_X 4 -#define WM_NEGATIVE_Y 8 -#define WM_UPDATE_SIZE_HINTS 0x10 -#define WM_SYNC_PENDING 0x20 -#define WM_VROOT_OFFSET_STALE 0x40 -#define WM_ABOUT_TO_MAP 0x100 -#define WM_MOVE_PENDING 0x200 -#define WM_COLORMAPS_EXPLICIT 0x400 -#define WM_ADDED_TOPLEVEL_COLORMAP 0x800 -#define WM_WIDTH_NOT_RESIZABLE 0x1000 -#define WM_HEIGHT_NOT_RESIZABLE 0x2000 +#define WM_NEVER_MAPPED 0x0001 +#define WM_UPDATE_PENDING 0x0002 +#define WM_NEGATIVE_X 0x0004 +#define WM_NEGATIVE_Y 0x0008 +#define WM_UPDATE_SIZE_HINTS 0x0010 +#define WM_SYNC_PENDING 0x0020 +#define WM_VROOT_OFFSET_STALE 0x0040 +#define WM_ABOUT_TO_MAP 0x0080 +#define WM_MOVE_PENDING 0x0100 +#define WM_COLORMAPS_EXPLICIT 0x0200 +#define WM_ADDED_TOPLEVEL_COLORMAP 0x0400 +#define WM_WIDTH_NOT_RESIZABLE 0x0800 +#define WM_HEIGHT_NOT_RESIZABLE 0x1000 +#define WM_TOPMOST 0x2000 +#define WM_FULLSCREEN 0x4000 +#define WM_TRANSPARENT 0x8000 #endif |