/[dtapublic]/projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkwinint.h
ViewVC logotype

Diff of /projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkwinint.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

sf_code/esrgpcpj/shared/tk_base/tkwinint.h revision 25 by dashley, Sat Oct 8 06:43:03 2016 UTC projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkwinint.h revision 220 by dashley, Sun Jul 22 15:58:07 2018 UTC
# Line 1  Line 1 
 /* $Header: /cvsroot/esrg/sfesrg/esrgpcpj/shared/tk_base/tkwinint.h,v 1.1.1.1 2001/06/13 05:13:35 dtashley Exp $ */  
   
 /*  
  * tkWinInt.h --  
  *  
  *      This file contains declarations that are shared among the  
  *      Windows-specific parts of Tk, but aren't used by the rest of  
  *      Tk.  
  *  
  * Copyright (c) 1995-1997 Sun Microsystems, Inc.  
  * Copyright (c) 1998-2000 by Scriptics Corporation.  
  *  
  * See the file "license.terms" for information on usage and redistribution  
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.  
  *  
  * RCS: @(#) $Id: tkwinint.h,v 1.1.1.1 2001/06/13 05:13:35 dtashley Exp $  
  */  
   
 #ifndef _TKWININT  
 #define _TKWININT  
   
 #ifndef _TKINT  
 #include "tkInt.h"  
 #endif  
   
 /*  
  * Include platform specific public interfaces.  
  */  
   
 #ifndef _TKWIN  
 #include "tkWin.h"  
 #endif  
   
 #ifndef _TKPORT  
 #include "tkPort.h"  
 #endif  
   
   
 /*  
  * Define constants missing from older Win32 SDK header files.  
  */  
   
 #ifndef WS_EX_TOOLWINDOW  
 #define WS_EX_TOOLWINDOW        0x00000080L  
 #endif  
   
 /*  
  * The TkWinDCState is used to save the state of a device context  
  * so that it can be restored later.  
  */  
   
 typedef struct TkWinDCState {  
     HPALETTE palette;  
     int bkmode;  
 } TkWinDCState;  
   
 /*  
  * The TkWinDrawable is the internal implementation of an X Drawable (either  
  * a Window or a Pixmap).  The following constants define the valid Drawable  
  * types.  
  */  
   
 #define TWD_BITMAP      1  
 #define TWD_WINDOW      2  
 #define TWD_WINDC       3  
   
 typedef struct {  
     int type;  
     HWND handle;  
     TkWindow *winPtr;  
 } TkWinWindow;  
   
 typedef struct {  
     int type;  
     HBITMAP handle;  
     Colormap colormap;  
     int depth;  
 } TkWinBitmap;  
   
 typedef struct {  
     int type;  
     HDC hdc;  
 }TkWinDC;  
   
 typedef union {  
     int type;  
     TkWinWindow window;  
     TkWinBitmap bitmap;  
     TkWinDC winDC;  
 } TkWinDrawable;  
   
 /*  
  * The following macros are used to retrieve internal values from a Drawable.  
  */  
   
 #define TkWinGetHWND(w)         (((TkWinDrawable *) w)->window.handle)  
 #define TkWinGetWinPtr(w)       (((TkWinDrawable *) w)->window.winPtr)  
 #define TkWinGetHBITMAP(w)      (((TkWinDrawable *) w)->bitmap.handle)  
 #define TkWinGetColormap(w)     (((TkWinDrawable *) w)->bitmap.colormap)  
 #define TkWinGetHDC(w)          (((TkWinDrawable *) w)->winDC.hdc)  
   
 /*  
  * The following structure is used to encapsulate palette information.  
  */  
   
 typedef struct {  
     HPALETTE palette;           /* Palette handle used when drawing. */  
     UINT size;                  /* Number of entries in the palette. */  
     int stale;                  /* 1 if palette needs to be realized,  
                                  * otherwise 0.  If the palette is stale,  
                                  * then an idle handler is scheduled to  
                                  * realize the palette. */  
     Tcl_HashTable refCounts;    /* Hash table of palette entry reference counts  
                                  * indexed by pixel value. */  
 } TkWinColormap;  
   
 /*  
  * The following macro retrieves the Win32 palette from a colormap.  
  */  
   
 #define TkWinGetPalette(colormap) (((TkWinColormap *) colormap)->palette)  
   
 /*  
  * The following macros define the class names for Tk Window types.  
  */  
   
 #define TK_WIN_TOPLEVEL_CLASS_NAME "TkTopLevel"  
 #define TK_WIN_CHILD_CLASS_NAME "TkChild"  
   
 /*  
  * The following variable is a translation table between X gc functions and  
  * Win32 raster op modes.  
  */  
   
 extern int tkpWinRopModes[];  
   
 /*  
  * The following defines are used with TkWinGetBorderPixels to get the  
  * extra 2 border colors from a Tk_3DBorder.  
  */  
   
 #define TK_3D_LIGHT2 TK_3D_DARK_GC+1  
 #define TK_3D_DARK2 TK_3D_DARK_GC+2  
   
 /*  
  * Internal procedures used by more than one source file.  
  */  
   
 #include "tkIntPlatDecls.h"  
   
 /*  
  * We need to specially add the TkWinChildProc because of the special  
  * prototype it has (doesn't fit into stubs schema)  
  */  
 #ifdef BUILD_tk  
 #undef TCL_STORAGE_CLASS  
 #define TCL_STORAGE_CLASS DLLEXPORT  
 #endif  
   
 extern LRESULT CALLBACK TkWinChildProc _ANSI_ARGS_((HWND hwnd, UINT message,  
                             WPARAM wParam, LPARAM lParam));  
   
 /*  
  * Special proc needed as tsd accessor function between  
  * tkWinX.c:GenerateXEvent and tkWinClipboard.c:UpdateClipboard  
  */  
 extern void     TkWinUpdatingClipboard(int mode);  
   
 #undef TCL_STORAGE_CLASS  
 #define TCL_STORAGE_CLASS DLLIMPORT  
   
 #endif /* _TKWININT */  
   
   
 /* $History: tkWinInt.h $  
  *  
  * *****************  Version 1  *****************  
  * User: Dtashley     Date: 1/02/01    Time: 3:14a  
  * Created in $/IjuScripter, IjuConsole/Source/Tk Base  
  * Initial check-in.  
  */  
   
 /* End of TKWININT.H */  
1    /* $Header$ */
2    
3    /*
4     * tkWinInt.h --
5     *
6     *      This file contains declarations that are shared among the
7     *      Windows-specific parts of Tk, but aren't used by the rest of
8     *      Tk.
9     *
10     * Copyright (c) 1995-1997 Sun Microsystems, Inc.
11     * Copyright (c) 1998-2000 by Scriptics Corporation.
12     *
13     * See the file "license.terms" for information on usage and redistribution
14     * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
15     *
16     * RCS: @(#) $Id: tkwinint.h,v 1.1.1.1 2001/06/13 05:13:35 dtashley Exp $
17     */
18    
19    #ifndef _TKWININT
20    #define _TKWININT
21    
22    #ifndef _TKINT
23    #include "tkInt.h"
24    #endif
25    
26    /*
27     * Include platform specific public interfaces.
28     */
29    
30    #ifndef _TKWIN
31    #include "tkWin.h"
32    #endif
33    
34    #ifndef _TKPORT
35    #include "tkPort.h"
36    #endif
37    
38    
39    /*
40     * Define constants missing from older Win32 SDK header files.
41     */
42    
43    #ifndef WS_EX_TOOLWINDOW
44    #define WS_EX_TOOLWINDOW        0x00000080L
45    #endif
46    
47    /*
48     * The TkWinDCState is used to save the state of a device context
49     * so that it can be restored later.
50     */
51    
52    typedef struct TkWinDCState {
53        HPALETTE palette;
54        int bkmode;
55    } TkWinDCState;
56    
57    /*
58     * The TkWinDrawable is the internal implementation of an X Drawable (either
59     * a Window or a Pixmap).  The following constants define the valid Drawable
60     * types.
61     */
62    
63    #define TWD_BITMAP      1
64    #define TWD_WINDOW      2
65    #define TWD_WINDC       3
66    
67    typedef struct {
68        int type;
69        HWND handle;
70        TkWindow *winPtr;
71    } TkWinWindow;
72    
73    typedef struct {
74        int type;
75        HBITMAP handle;
76        Colormap colormap;
77        int depth;
78    } TkWinBitmap;
79    
80    typedef struct {
81        int type;
82        HDC hdc;
83    }TkWinDC;
84    
85    typedef union {
86        int type;
87        TkWinWindow window;
88        TkWinBitmap bitmap;
89        TkWinDC winDC;
90    } TkWinDrawable;
91    
92    /*
93     * The following macros are used to retrieve internal values from a Drawable.
94     */
95    
96    #define TkWinGetHWND(w)         (((TkWinDrawable *) w)->window.handle)
97    #define TkWinGetWinPtr(w)       (((TkWinDrawable *) w)->window.winPtr)
98    #define TkWinGetHBITMAP(w)      (((TkWinDrawable *) w)->bitmap.handle)
99    #define TkWinGetColormap(w)     (((TkWinDrawable *) w)->bitmap.colormap)
100    #define TkWinGetHDC(w)          (((TkWinDrawable *) w)->winDC.hdc)
101    
102    /*
103     * The following structure is used to encapsulate palette information.
104     */
105    
106    typedef struct {
107        HPALETTE palette;           /* Palette handle used when drawing. */
108        UINT size;                  /* Number of entries in the palette. */
109        int stale;                  /* 1 if palette needs to be realized,
110                                     * otherwise 0.  If the palette is stale,
111                                     * then an idle handler is scheduled to
112                                     * realize the palette. */
113        Tcl_HashTable refCounts;    /* Hash table of palette entry reference counts
114                                     * indexed by pixel value. */
115    } TkWinColormap;
116    
117    /*
118     * The following macro retrieves the Win32 palette from a colormap.
119     */
120    
121    #define TkWinGetPalette(colormap) (((TkWinColormap *) colormap)->palette)
122    
123    /*
124     * The following macros define the class names for Tk Window types.
125     */
126    
127    #define TK_WIN_TOPLEVEL_CLASS_NAME "TkTopLevel"
128    #define TK_WIN_CHILD_CLASS_NAME "TkChild"
129    
130    /*
131     * The following variable is a translation table between X gc functions and
132     * Win32 raster op modes.
133     */
134    
135    extern int tkpWinRopModes[];
136    
137    /*
138     * The following defines are used with TkWinGetBorderPixels to get the
139     * extra 2 border colors from a Tk_3DBorder.
140     */
141    
142    #define TK_3D_LIGHT2 TK_3D_DARK_GC+1
143    #define TK_3D_DARK2 TK_3D_DARK_GC+2
144    
145    /*
146     * Internal procedures used by more than one source file.
147     */
148    
149    #include "tkIntPlatDecls.h"
150    
151    /*
152     * We need to specially add the TkWinChildProc because of the special
153     * prototype it has (doesn't fit into stubs schema)
154     */
155    #ifdef BUILD_tk
156    #undef TCL_STORAGE_CLASS
157    #define TCL_STORAGE_CLASS DLLEXPORT
158    #endif
159    
160    extern LRESULT CALLBACK TkWinChildProc _ANSI_ARGS_((HWND hwnd, UINT message,
161                                WPARAM wParam, LPARAM lParam));
162    
163    /*
164     * Special proc needed as tsd accessor function between
165     * tkWinX.c:GenerateXEvent and tkWinClipboard.c:UpdateClipboard
166     */
167    extern void     TkWinUpdatingClipboard(int mode);
168    
169    #undef TCL_STORAGE_CLASS
170    #define TCL_STORAGE_CLASS DLLIMPORT
171    
172    #endif /* _TKWININT */
173    
174    /* End of tkwinint.h */

Legend:
Removed from v.25  
changed lines
  Added in v.220

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25