| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef _TKWININT |
| 18 |
#define _TKWININT |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
#ifndef _TKINT |
| 25 |
#include "tkInt.h" |
| 26 |
#endif |
| 27 |
|
| 28 |
#ifndef _TKWIN |
| 29 |
#include "tkWin.h" |
| 30 |
#endif |
| 31 |
|
| 32 |
#ifndef _TKPORT |
| 33 |
#include "tkPort.h" |
| 34 |
#endif |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
#ifndef WS_EX_TOOLWINDOW |
| 42 |
#define WS_EX_TOOLWINDOW 0x00000080L |
| 43 |
#endif |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
typedef struct TkWinDCState { |
| 51 |
HPALETTE palette; |
| 52 |
int bkmode; |
| 53 |
} TkWinDCState; |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
#define TWD_BITMAP 1 |
| 62 |
#define TWD_WINDOW 2 |
| 63 |
#define TWD_WINDC 3 |
| 64 |
|
| 65 |
typedef struct { |
| 66 |
int type; |
| 67 |
HWND handle; |
| 68 |
TkWindow *winPtr; |
| 69 |
} TkWinWindow; |
| 70 |
|
| 71 |
typedef struct { |
| 72 |
int type; |
| 73 |
HBITMAP handle; |
| 74 |
Colormap colormap; |
| 75 |
int depth; |
| 76 |
} TkWinBitmap; |
| 77 |
|
| 78 |
typedef struct { |
| 79 |
int type; |
| 80 |
HDC hdc; |
| 81 |
}TkWinDC; |
| 82 |
|
| 83 |
typedef union { |
| 84 |
int type; |
| 85 |
TkWinWindow window; |
| 86 |
TkWinBitmap bitmap; |
| 87 |
TkWinDC winDC; |
| 88 |
} TkWinDrawable; |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
#define TkWinGetHWND(w) (((TkWinDrawable *) w)->window.handle) |
| 95 |
#define TkWinGetWinPtr(w) (((TkWinDrawable *) w)->window.winPtr) |
| 96 |
#define TkWinGetHBITMAP(w) (((TkWinDrawable *) w)->bitmap.handle) |
| 97 |
#define TkWinGetColormap(w) (((TkWinDrawable *) w)->bitmap.colormap) |
| 98 |
#define TkWinGetHDC(w) (((TkWinDrawable *) w)->winDC.hdc) |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
typedef struct { |
| 105 |
HPALETTE palette; |
| 106 |
UINT size; |
| 107 |
int stale; |
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
Tcl_HashTable refCounts; |
| 112 |
|
| 113 |
} TkWinColormap; |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
#define TkWinGetPalette(colormap) (((TkWinColormap *) colormap)->palette) |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
#define TK_WIN_TOPLEVEL_CLASS_NAME "TkTopLevel" |
| 126 |
#define TK_WIN_CHILD_CLASS_NAME "TkChild" |
| 127 |
#define TK_WIN_OWNDC_CLASS_NAME "TkOwnDC" |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
extern int tkpWinRopModes[]; |
| 135 |
extern int tkpWinBltModes[]; |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 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 |
|
| 147 |
|
| 148 |
|
| 149 |
#include "tkIntPlatDecls.h" |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 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 |
|
| 165 |
|
| 166 |
|
| 167 |
EXTERN void TkWinUpdatingClipboard(int mode); |
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
typedef struct TkWinProcs { |
| 180 |
int useWide; |
| 181 |
LRESULT (WINAPI *callWindowProc)(WNDPROC lpPrevWndFunc, HWND hWnd, |
| 182 |
UINT Msg, WPARAM wParam, LPARAM lParam); |
| 183 |
LRESULT (WINAPI *defWindowProc)(HWND hWnd, UINT Msg, WPARAM wParam, |
| 184 |
LPARAM lParam); |
| 185 |
ATOM (WINAPI *registerClass)(CONST WNDCLASS *lpWndClass); |
| 186 |
BOOL (WINAPI *setWindowText)(HWND hWnd, LPCTSTR lpString); |
| 187 |
HWND (WINAPI *createWindowEx)(DWORD dwExStyle, LPCTSTR lpClassName, |
| 188 |
LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, |
| 189 |
int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, |
| 190 |
HINSTANCE hInstance, LPVOID lpParam); |
| 191 |
BOOL (WINAPI *insertMenu)(HMENU hMenu, UINT uPosition, UINT uFlags, |
| 192 |
UINT uIDNewItem, LPCTSTR lpNewItem); |
| 193 |
} TkWinProcs; |
| 194 |
|
| 195 |
EXTERN TkWinProcs *tkWinProcs; |
| 196 |
|
| 197 |
#undef TCL_STORAGE_CLASS |
| 198 |
#define TCL_STORAGE_CLASS DLLIMPORT |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
extern Tcl_Encoding TkWinGetKeyInputEncoding _ANSI_ARGS_((void)); |
| 206 |
extern Tcl_Encoding TkWinGetUnicodeEncoding _ANSI_ARGS_((void)); |
| 207 |
|
| 208 |
extern void LangNoteDC _ANSI_ARGS_((HDC dc,int inc)); |
| 209 |
|
| 210 |
#endif |
| 211 |
|