home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / togl15.zip / tkOS2Int.h < prev    next >
C/C++ Source or Header  |  2000-02-09  |  22KB  |  512 lines

  1. /*
  2.  * tkOS2Int.h --
  3.  *
  4.  *    Declarations of OS/2 PM specific shared variables and procedures.
  5.  *
  6.  * Copyright (c) 1996-2000 Illya Vaes
  7.  * Copyright (c) 1995 Sun Microsystems, Inc.
  8.  *
  9.  * See the file "license.terms" for information on usage and redistribution
  10.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  11.  *
  12.  */
  13.  
  14. #ifndef _OS2INT
  15. #define _OS2INT
  16.  
  17. #ifndef _TKINT
  18. #include "tkInt.h"
  19. #endif
  20.  
  21. #ifndef _TCLOS2INT
  22. #include "tclOS2Int.h"
  23. #endif
  24.  
  25. /*
  26.  * Include platform specific public interfaces.
  27.  */
  28. #ifndef _TKOS2
  29. #include "tkOS2.h"
  30. #endif
  31.  
  32. /*
  33.  * A data structure of the following type holds information for
  34.  * each window manager protocol (such as WM_DELETE_WINDOW) for
  35.  * which a handler (i.e. a Tcl command) has been defined for a
  36.  * particular top-level window.
  37.  */
  38.  
  39. typedef struct ProtocolHandler {
  40.     Atom protocol;              /* Identifies the protocol. */
  41.     struct ProtocolHandler *nextPtr;
  42.                                 /* Next in list of protocol handlers for
  43.                                  * the same top-level window, or NULL for
  44.                                  * end of list. */
  45.     Tcl_Interp *interp;         /* Interpreter in which to invoke command. */
  46.     char command[4];            /* Tcl command to invoke when a client
  47.                                  * message for this protocol arrives.
  48.                                  * The actual size of the structure varies
  49.                                  * to accommodate the needs of the actual
  50.                                  * command. THIS MUST BE THE LAST FIELD OF
  51.                                  * THE STRUCTURE. */
  52. } ProtocolHandler;
  53.  
  54. #define HANDLER_SIZE(cmdLength) \
  55.     ((unsigned) (sizeof(ProtocolHandler) - 3 + cmdLength))
  56.  
  57. /*
  58.  * A data structure of the following type holds window-manager-related
  59.  * information for each top-level window in an application.
  60.  */
  61.  
  62. typedef struct TkWmInfo {
  63.     TkWindow *winPtr;           /* Pointer to main Tk information for
  64.                                  * this window. */
  65.     HWND wrapper;               /* This is the decorative frame window
  66.                                  * created by the window manager to wrap
  67.                                  * a toplevel window.  This window is
  68.                                  * a direct child of the root window. */
  69.     Tk_Uid titleUid;            /* Title to display in window caption.  If
  70.                                  * NULL, use name of widget. */
  71.     Tk_Uid iconName;            /* Name to display in icon. */
  72.     TkWindow *masterPtr;        /* Master window for TRANSIENT_FOR property,
  73.                                  * or NULL. */
  74.     XWMHints hints;             /* Various pieces of information for
  75.                                  * window manager. */
  76.     char *leaderName;           /* Path name of leader of window group
  77.                                  * (corresponds to hints.window_group).
  78.                                  * Malloc-ed. Note:  this field doesn't
  79.                                  * get updated if leader is destroyed. */
  80.     Tk_Window icon;             /* Window to use as icon for this window,
  81.                                  * or NULL. */
  82.     Tk_Window iconFor;          /* Window for which this window is icon, or
  83.                                  * NULL if this isn't an icon for anyone. */
  84.  
  85.     /*
  86.      * Information used to construct an XSizeHints structure for
  87.      * the window manager:
  88.      */
  89.  
  90.     int defMinWidth, defMinHeight, defMaxWidth, defMaxHeight;
  91.                                 /* Default resize limits given by system. */
  92.     int sizeHintsFlags;         /* Flags word for XSizeHints structure.
  93.                                  * If the PBaseSize flag is set then the
  94.                                  * window is gridded;  otherwise it isn't
  95.                                  * gridded. */
  96.     int minWidth, minHeight;    /* Minimum dimensions of window, in
  97.                                  * grid units, not pixels. */
  98.     int maxWidth, maxHeight;    /* Maximum dimensions of window, in
  99.                                  * grid units, not pixels, or 0 to default. */
  100.     Tk_Window gridWin;          /* Identifies the window that controls
  101.                                  * gridding for this top-level, or NULL if
  102.                                  * the top-level isn't currently gridded. */
  103.     int widthInc, heightInc;    /* Increments for size changes (# pixels
  104.                                  * per step). */
  105.     struct {
  106.         int x;  /* numerator */
  107.         int y;  /* denominator */
  108.     } minAspect, maxAspect;     /* Min/max aspect ratios for window. */
  109.     int reqGridWidth, reqGridHeight;
  110.                                 /* The dimensions of the window (in
  111.                                  * grid units) requested through
  112.                                  * the geometry manager. */
  113.     int gravity;                /* Desired window gravity. */
  114.  
  115.     /*
  116.      * Information used to manage the size and location of a window.
  117.      */
  118.  
  119.     int width, height;          /* Desired dimensions of window, specified
  120.                                  * in grid units.  These values are
  121.                                  * set by the "wm geometry" command and by
  122.                                  * ConfigureNotify events (for when wm
  123.                                  * resizes window).  -1 means user hasn't
  124.                                  * requested dimensions. */
  125.     int x, y;                   /* Desired X and Y coordinates for window.
  126.                                  * These values are set by "wm geometry",
  127.                                  * plus by ConfigureNotify events (when wm
  128.                                  * moves window).  These numbers are
  129.                                  * different than the numbers stored in
  130.                                  * winPtr->changes because (a) they could be
  131.                                  * measured from the right or bottom edge
  132.                                  * of the screen (see WM_NEGATIVE_X and
  133.                                  * WM_NEGATIVE_Y flags) and (b) if the window
  134.                                  * has been reparented then they refer to the
  135.                                  * parent rather than the window itself. */
  136.     int borderWidth, borderHeight;
  137.                                 /* Width and height of window dressing, in
  138.                                  * pixels for the current style/exStyle.  This
  139.                                  * includes the border on both sides of the
  140.                                  * window. */
  141.     int configWidth, configHeight;
  142.                                 /* Dimensions passed to last request that we
  143.                                  * issued to change geometry of window.  Used
  144.                                  * to eliminate redundant resize operations. */
  145.     HWND hMenu;                 /* the hMenu associated with this menu */
  146.     ULONG style, exStyle;       /* Style flags for the wrapper window. */
  147.  
  148.     /*
  149.      * List of children of the toplevel which have private colormaps.
  150.      */
  151.  
  152.     TkWindow **cmapList;        /* Array of window with private colormaps. */
  153.     int cmapCount;              /* Number of windows in array. */
  154.  
  155.     /*
  156.      * Miscellaneous information.
  157.      */
  158.  
  159.     ProtocolHandler *protPtr;   /* First in list of protocol handlers for
  160.                                  * this window (NULL means none). */
  161.     int cmdArgc;                /* Number of elements in cmdArgv below. */
  162.     char **cmdArgv;             /* Array of strings to store in the
  163.                                  * WM_COMMAND property.  NULL means nothing
  164.                                  * available. */
  165.     char *clientMachine;        /* String to store in WM_CLIENT_MACHINE
  166.                                  * property, or NULL. */
  167.     int flags;                  /* Miscellaneous flags, defined below. */
  168.     struct TkWmInfo *nextPtr;   /* Next in list of all top-level windows. */
  169. } WmInfo;
  170.  
  171. /*
  172.  * Flag values for WmInfo structures:
  173.  *
  174.  * WM_NEVER_MAPPED -            non-zero means window has never been
  175.  *                              mapped;  need to update all info when
  176.  *                              window is first mapped.
  177.  * WM_UPDATE_PENDING -          non-zero means a call to UpdateGeometryInfo
  178.  *                              has already been scheduled for this
  179.  *                              window;  no need to schedule another one.
  180.  * WM_NEGATIVE_X -              non-zero means x-coordinate is measured in
  181.  *                              pixels from right edge of screen, rather
  182.  *                              than from left edge.
  183.  * WM_NEGATIVE_Y -              non-zero means y-coordinate is measured in
  184.  *                              pixels up from bottom of screen, rather than
  185.  *                              down from top.
  186.  * WM_UPDATE_SIZE_HINTS -       non-zero means that new size hints need to be
  187.  *                              propagated to window manager.
  188.  * WM_SYNC_PENDING -            set to non-zero while waiting for the window
  189.  *                              manager to respond to some state change.
  190.  * WM_MOVE_PENDING -            non-zero means the application has requested
  191.  *                              a new position for the window, but it hasn't
  192.  *                              been reflected through the window manager
  193.  *                              yet.
  194.  * WM_COLORAMPS_EXPLICIT -      non-zero means the colormap windows were
  195.  *                              set explicitly via "wm colormapwindows".
  196.  * WM_ADDED_TOPLEVEL_COLORMAP - non-zero means that when "wm colormapwindows"
  197.  *                              was called the top-level itself wasn't
  198.  *                              specified, so we added it implicitly at
  199.  *                              the end of the list.
  200.  */
  201.  
  202. #define WM_NEVER_MAPPED                 (1<<0)
  203. #define WM_UPDATE_PENDING               (1<<1)
  204. #define WM_NEGATIVE_X                   (1<<2)
  205. #define WM_NEGATIVE_Y                   (1<<3)
  206. #define WM_UPDATE_SIZE_HINTS            (1<<4)
  207. #define WM_SYNC_PENDING                 (1<<5)
  208. #define WM_CREATE_PENDING               (1<<6)
  209. #define WM_MOVE_PENDING                 (1<<7)
  210. #define WM_COLORMAPS_EXPLICIT           (1<<8)
  211. #define WM_ADDED_TOPLEVEL_COLORMAP      (1<<9)
  212. #define WM_WIDTH_NOT_RESIZABLE          (1<<10)
  213. #define WM_HEIGHT_NOT_RESIZABLE         (1<<11)
  214.  
  215. /*
  216.  * Window styles for various types of toplevel windows.
  217.  * Placing should be on the pixels specified by Tk, not byte-aligned
  218.  *  ==> FCF_NOBYTEALIGN
  219.  * Override redirect windows get created as undecorated popups.
  220.  *  ==> no FCF_*BORDER, no FCF_TITLEBAR, no FCF_MINMAX, FCF_SYSMENU
  221.  * Transient windows get a modal dialog frame.
  222.  *  ==> FCF_DLGBORDER, FCF_TITLEBAR
  223.  * Neither override, nor transient windows appear in the tasklist.
  224.  *  ==> no FCF_TASKLIST
  225.  */
  226.  
  227. #define WM_TOPLEVEL_STYLE (WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
  228. #define EX_TOPLEVEL_STYLE (FCF_NOBYTEALIGN | FCF_TITLEBAR | FCF_SIZEBORDER |\
  229.                            FCF_MINMAX | FCF_SYSMENU | FCF_TASKLIST)
  230. #define BORDERWIDTH_TOPLEVEL    (2*xSizeBorder)
  231. #define BORDERHEIGHT_TOPLEVEL    (titleBar + 2*ySizeBorder)
  232.  
  233. #define WM_OVERRIDE_STYLE (WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
  234. #define EX_OVERRIDE_STYLE (FCF_NOBYTEALIGN | FCF_NOMOVEWITHOWNER)
  235. #define BORDERWIDTH_OVERRIDE    (0)
  236. #define BORDERHEIGHT_OVERRIDE    (0)
  237.  
  238. #define WM_TRANSIENT_STYLE (WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
  239. #define EX_TRANSIENT_STYLE (FCF_NOBYTEALIGN | FCF_DLGBORDER | FCF_TITLEBAR |\
  240.                             FCF_NOMOVEWITHOWNER)
  241. #define BORDERWIDTH_TRANSIENT    (2*xDlgBorder)
  242. #define BORDERHEIGHT_TRANSIENT    (titleBar + 2*yDlgBorder)
  243.  
  244. /*
  245.  * The TkOS2PSState is used to save the state of a presentation space
  246.  * so that it can be restored later.
  247.  */
  248.  
  249. typedef struct TkOS2PSState {
  250.     HPAL palette;
  251.     HBITMAP bitmap;
  252. } TkOS2PSState;
  253.  
  254.  
  255. /*
  256.  * The TkOS2Drawable is the internal implementation of an X Drawable (either
  257.  * a Window or a Pixmap).  The following constants define the valid Drawable
  258.  * types.
  259.  */
  260.  
  261. #define TOD_BITMAP    1
  262. #define TOD_WINDOW    2
  263. #define TOD_OS2PS    3
  264.  
  265. /* Tk OS2 Window Classes */
  266. #define TOC_TOPLEVEL    "TkTopLevel"
  267. #define TOC_CHILD    "TkChild"
  268.  
  269. #define CW_USEDEFAULT    0
  270.  
  271. /* Defines for which poly... function */
  272. #define TOP_POLYGONS    1
  273. #define TOP_POLYLINE    2
  274.  
  275. /* OS/2 system constants */
  276. #define MAX_LID    254    /* Max nr. of logical font IDs */
  277. #define MAX_FLEN 256    /* Maximum length of font atom */
  278.  
  279. /*
  280.  * Override PM resolution for 120dpi displays with the following value if
  281.  * IGNOREPMRES is defined. Requested by Ilya Zakharevich
  282.  */
  283. #ifdef IGNOREPMRES
  284.     extern LONG overrideResolution;
  285. #endif
  286.  
  287. #define MAX(a,b)    ( (a) > (b) ? (a) : (b) )
  288. #define MIN(a,b)    ( (a) < (b) ? (a) : (b) )
  289.  
  290. typedef struct {
  291.     int type;
  292.     HWND handle;
  293.     TkWindow *winPtr;
  294. } TkOS2Window;
  295.  
  296. typedef struct {
  297.     int type;
  298.     HBITMAP handle;
  299.     Colormap colormap;
  300.     int depth;
  301.     HWND parent;
  302.     HDC dc;
  303.     HPS hps;
  304. } TkOS2Bitmap;
  305.  
  306. typedef struct {
  307.     int type;
  308.     HPS hps;
  309.     HWND hwnd;
  310. } TkOS2PS;
  311.     
  312. typedef union {
  313.     int type;
  314.     TkOS2Window window;
  315.     TkOS2Bitmap bitmap;
  316.     TkOS2PS os2PS;
  317. } TkOS2Drawable;
  318.  
  319. /*
  320.  * The following macros are used to retrieve internal values from a Drawable.
  321.  */
  322. #define TkOS2GetHWND(w) (((TkOS2Drawable *)w)->window.handle)
  323. #define TkOS2GetWinPtr(w) (((TkOS2Drawable*)w)->window.winPtr)
  324. #define TkOS2GetHBITMAP(w) (((TkOS2Drawable*)w)->bitmap.handle)
  325. #define TkOS2GetColormap(w) (((TkOS2Drawable*)w)->bitmap.colormap)
  326. #define TkOS2GetHPS(w) (((TkOS2Drawable*)w)->os2PS.hps)
  327.  
  328. /*
  329.  * The following variable is a translation table between X gc functions and
  330.  * OS/2 PM raster op modes.
  331.  */
  332.  
  333. extern int tkpOS2MixModes[];
  334.  
  335. /*
  336.  * The following macros are used to replace the Windows equivalents.
  337.  */
  338. #define RGB(R,G,B)       ((((ULONG)R)<<16) + (((ULONG)G)<<8) + (ULONG)B)
  339. #define RGBFlag(F,R,G,B) ((((ULONG)F)<<24) + (((ULONG)R)<<16) + (((ULONG)G)<<8) + (ULONG)B)
  340. #define GetFlag(RGB)     ((BYTE)(RGB>>24))
  341. /*
  342. #define GetRValue(RGB)   ((BYTE)((RGB & 0xFF0000)>>16))
  343. #define GetGValue(RGB)   ((BYTE)((RGB & 0x00FF00)>>8))
  344. */
  345. #define GetRValue(RGB)   ((BYTE)((RGB>>16) & 0x0000FF))
  346. #define GetGValue(RGB)   ((BYTE)((RGB>>8) & 0x0000FF))
  347. #define GetBValue(RGB)   ((BYTE)(RGB & 0x0000FF))
  348.  
  349. #define COLOR_3DFACE    SYSCLR_TITLETEXT
  350. #define COLOR_WINDOW    SYSCLR_WINDOW
  351.  
  352. /*
  353.  * The following defines are used with TkOS2GetBorderPixels to get the
  354.  * extra 2 border colors from a Tk_3DBorder.
  355.  */
  356.  
  357. #define TK_3D_LIGHT2 TK_3D_DARK_GC+1
  358. #define TK_3D_DARK2 TK_3D_DARK_GC+2
  359.  
  360. /*
  361.  * Button state information.
  362.  */
  363. #define BST_UNCHECKED     0
  364. #define BST_CHECKED       1
  365. #define BST_INDETERMINATE 2
  366. #define BST_FOCUS         TRUE
  367.  
  368. /*
  369.  * The following structure is used to encapsulate palette information.
  370.  */
  371.  
  372. typedef struct {
  373.     HPAL palette;        /* Palette handle used when drawing. */
  374.     ULONG size;            /* Number of entries in the palette. */
  375.     int stale;            /* 1 if palette needs to be realized,
  376.                  * otherwise 0.  If the palette is stale,
  377.                  * then an idle handler is scheduled to
  378.                  * realize the palette. */
  379.     Tcl_HashTable refCounts;    /* Hash table of palette entry reference counts
  380.                  * indexed by pixel value. */
  381. } TkOS2Colormap;
  382.  
  383. /*
  384.  * The following macro retrieves the PM palette from a colormap.
  385.  */
  386.  
  387. #define TkOS2GetPalette(colormap) (((TkOS2Colormap *) colormap)->palette)
  388.  
  389. /*
  390.  * The following structure is used to remember font attributes that cannot be
  391.  * given to GpiCreateLogFont via FATTRS.
  392.  */
  393.  
  394. typedef struct {
  395.     FATTRS fattrs;    /* FATTRS structure */
  396.     POINTL shear;    /* Shear (angle) of characters, GpiSetCharShear */
  397.     BOOL setShear;    /* Should shear be changed after GpiCreateLogFont? */
  398.     BOOL outline;    /* Is this an outline font */
  399.     ULONG deciPoints;    /* Pointsize for outline font, in decipoints */
  400.     FONTMETRICS fm;    /* Fontmetrics, for concentrating outline font stuff */
  401. } TkOS2Font;
  402.  
  403. /*
  404.  * The following structures are used to mimic the WINDOWPOS structure that has
  405.  * fields for minimum and maximum width/height.
  406.  */
  407.  
  408. typedef struct {
  409.     LONG x;
  410.     LONG y;
  411. } TkOS2TrackSize;
  412.  
  413. typedef struct {
  414.     TkOS2TrackSize ptMinTrackSize;
  415.     TkOS2TrackSize ptMaxTrackSize;
  416.     SWP swp;
  417. } TkOS2WINDOWPOS;
  418.  
  419. /*
  420.  * Internal procedures used by more than one source file.
  421.  */
  422.  
  423. extern MRESULT EXPENTRY TkOS2ChildProc _ANSI_ARGS_((HWND hwnd, ULONG message,
  424.                             MPARAM param1, MPARAM param2));
  425. extern void             TkOS2ClipboardRender _ANSI_ARGS_((TkDisplay *dispPtr,
  426.                             ULONG format));
  427. extern MRESULT EXPENTRY TkOS2EmbeddedEventProc _ANSI_ARGS_((HWND hwnd,
  428.                             ULONG message, MPARAM param1, MPARAM param2));
  429. extern void             TkOS2FillRect _ANSI_ARGS_((HPS hps, LONG x, LONG y,
  430.                             LONG width, LONG height, LONG pixel));
  431. extern LONG             TkOS2GetBorderPixels _ANSI_ARGS_((Tk_Window tkwin,
  432.                             Tk_3DBorder border, int which));
  433. extern HPS              TkOS2GetDrawablePS _ANSI_ARGS_((Display *display,
  434.                             Drawable d, TkOS2PSState* state));
  435. extern int              TkOS2GetModifierState _ANSI_ARGS_((void));
  436. extern HPAL             TkOS2GetSystemPalette _ANSI_ARGS_((void));
  437. extern HWND             TkOS2GetWrapperWindow _ANSI_ARGS_((Tk_Window tkwin));
  438. extern int              TkOS2HandleMenuEvent _ANSI_ARGS_((HWND *phwnd,
  439.                             ULONG *pMessage, MPARAM *pParam1, MPARAM *pParam2,
  440.                             MRESULT *pResult));
  441. extern int              TkOS2IndexOfColor _ANSI_ARGS_((XColor *colorPtr));
  442. extern void             TkOS2PointerDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
  443. extern void             TkOS2PointerEvent _ANSI_ARGS_((HWND hwnd, int x,
  444.                             int y));
  445. extern void             TkOS2PointerInit _ANSI_ARGS_((void));
  446. extern MRESULT          TkOS2ReflectMessage _ANSI_ARGS_((HWND hwnd,
  447.                             ULONG message, MPARAM param1, MPARAM param2));
  448. extern void             TkOS2ReleaseDrawablePS _ANSI_ARGS_((Drawable d,
  449.                             HPS hps, TkOS2PSState* state));
  450. extern MRESULT          TkOS2ResendEvent _ANSI_ARGS_((PFNWP wndproc,
  451.                             HWND hwnd, XEvent *eventPtr));
  452. extern HPAL             TkOS2SelectPalette _ANSI_ARGS_((HPS hps, HWND hwnd,
  453.                             Colormap colormap));
  454. extern void             TkOS2SetMenu _ANSI_ARGS_((Tk_Window tkwin,
  455.                             ULONG hMenu));
  456. extern void             TkOS2SetStipple(HPS destPS, HPS bmpPS, HBITMAP stipple,
  457.                             LONG x, LONG y, LONG *oldPatternSet,
  458.                             PPOINTL oldRefPoint);
  459. extern void             TkOS2SetWindowPos _ANSI_ARGS_((HWND hwnd,
  460.                             HWND siblingHwnd, int pos));
  461. extern void             TkOS2UnsetStipple(HPS destPS, HPS bmpPS,
  462.                             HBITMAP stipple, LONG oldPatternSet,
  463.                             PPOINTL oldRefPoint);
  464. extern void             TkOS2UpdateCursor _ANSI_ARGS_((TkpCursor cursor));
  465. extern void             TkOS2WmCleanup _ANSI_ARGS_((HMODULE hModule));
  466. extern HWND             TkOS2WmFindEmbedAssociation _ANSI_ARGS_((
  467.                             TkWindow *winPtr));
  468. extern void             TkOS2WmStoreEmbedAssociation _ANSI_ARGS_((
  469.                             TkWindow *winPtr, HWND hwnd));
  470. extern void             TkOS2XCleanup _ANSI_ARGS_((HMODULE hModule));
  471. extern void             TkOS2XInit _ANSI_ARGS_((HAB hInstance));
  472.  
  473. extern MRESULT EXPENTRY TkOS2FrameProc _ANSI_ARGS_((HWND hwnd, ULONG message,
  474.                             MPARAM param1, MPARAM param2));
  475. extern HAB              TkOS2InitPM _ANSI_ARGS_((void));
  476. extern void             TkOS2ExitPM _ANSI_ARGS_((HAB hab));
  477. extern HAB              TkOS2GetHAB _ANSI_ARGS_((void));
  478. extern LONG             TkOS2WindowHeight _ANSI_ARGS_ ((TkOS2Drawable *todPtr));
  479. extern LONG             TkOS2HwndHeight _ANSI_ARGS_ ((HWND hwnd));
  480. extern int              TkOS2TranslateY _ANSI_ARGS_ ((HWND hwnd, int y,
  481.                             int height));
  482. extern char             *TkOS2ReverseImageLines _ANSI_ARGS_ ((XImage *image,
  483.                             int height));
  484. extern BOOL             TkOS2ScaleFont _ANSI_ARGS_ ((HPS hps, ULONG pointSize,
  485.                             ULONG pointWidth));
  486.  
  487. /* Global variables */
  488. extern HAB tkHab;    /* Anchor block */
  489. extern HMQ hmq;    /* message queue */
  490. extern LONG aDevCaps[];    /* Device caps */
  491. extern LONG nextLogicalFont;    /* First free logical font ID */
  492. extern PFNWP oldFrameProc;    /* subclassed frame procedure */
  493. extern LONG xScreen;        /* System Value Screen width */
  494. extern LONG yScreen;        /* System Value Screen height */
  495. extern LONG titleBar;        /* System Value Title Bar */
  496. extern LONG xBorder;        /* System Value X nominal border */
  497. extern LONG yBorder;        /* System Value Y nominal border */
  498. extern LONG xSizeBorder;    /* System Value X Sizing border */
  499. extern LONG ySizeBorder;    /* System Value Y Sizing border */
  500. extern LONG xDlgBorder;        /* System Value X dialog-frame border */
  501. extern LONG yDlgBorder;        /* System Value Y dialog-frame border */
  502. extern HDC hScreenDC;        /* Device Context for screen */
  503. extern HPS globalPS;        /* Global PS */
  504. extern HBITMAP globalBitmap;    /* Bitmap for global PS */
  505. extern TkOS2Font logfonts[];    /* List of logical fonts */
  506. extern LONG nextColor;        /* Next free index in color table */
  507. extern LONG *logColorTable;
  508. extern LONG rc;            /* For checking return values */
  509. extern unsigned long dllHandle;    /* Handle of the Tk DLL */
  510.  
  511. #endif /* _OS2INT */
  512.