]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/microwin.h
Add wxDEPRECATED_MSG() and use it in a couple of places.
[wxWidgets.git] / include / wx / msw / microwin.h
1 /*
2 /////////////////////////////////////////////////////////////////////////////
3 // Name: wx/msw/microwin.h
4 // Purpose: Extra implementation for MicroWindows
5 // Author: Julian Smart
6 // Created: 2001-05-31
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10 */
11
12 #ifndef _WX_MICROWIN_H_
13 #define _WX_MICROWIN_H_
14
15 /* Implemented by microwin.cpp */
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 BOOL SetCursorPos(int x, int y);
22
23 HCURSOR SetCursor(HCURSOR hCursor);
24
25 /* Implemented with wrong number of args by MicroWindows */
26 /* so we need to use a different name */
27 int GetScrollPosWX (HWND hWnd, int iSBar);
28
29 BOOL ScrollWindow(HWND, int xAmount, int yAmount,
30 CONST RECT* lpRect, CONST RECT* lpClipRect);
31
32 HWND WindowFromPoint(POINT pt);
33 SHORT GetKeyState(int nVirtKey);
34 HWND SetParent(HWND hWndChild, HWND hWndNewParent);
35 VOID DragAcceptFiles(HWND, BOOL);
36 BOOL IsDialogMessage(HWND hWnd, MSG* msg);
37 DWORD GetMessagePos(VOID);
38 BOOL IsIconic(HWND hWnd);
39 int SetMapMode(HDC hDC, int mode);
40 int GetMapMode(HDC hDC);
41 HCURSOR LoadCursor(HINSTANCE hInst, int cursor);
42 DWORD GetModuleFileName(HINSTANCE hInst, LPSTR name, DWORD sz);
43 VOID DestroyIcon(HICON hIcon);
44 COLORREF GetTextColor(HDC hdc);
45 COLORREF GetBkColor(HDC hdc);
46 HPALETTE SelectPalette(HDC hdc, HPALETTE hPalette, BOOL b);
47 BOOL IntersectClipRect(HDC hdc, int x, int y,
48 int w, int h);
49 BOOL GetClipBox(HDC hdc, RECT* rect);
50 BOOL DrawIconEx(HDC hdc, int x, int y, HICON hIcon, int w, int h, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags);
51 BOOL SetViewportExtEx(HDC hdc, int x, int y, LPSIZE lpSize);
52 BOOL SetViewportOrgEx(HDC hdc, int x, int y, LPPOINT lpPoint);
53 BOOL SetWindowExtEx(HDC hdc, int x, int y, LPSIZE lpSize);
54 BOOL SetWindowOrgEx(HDC hdc, int x, int y, LPPOINT lpSize);
55 BOOL ExtFloodFill(HDC hdc, int x, int y, COLORREF col, UINT flags);
56 int SetPolyFillMode(HDC hdc, int mode);
57 BOOL RoundRect(HDC hdc, int left, int top, int right, int bottom, int r1, int r2);
58 BOOL MaskBlt(HDC hdc, int x, int y, int w, int h,
59 HDC hDCSource, int xSrc, int ySrc, HBITMAP hBitmapMask, int xMask, int yMask, DWORD rop);
60 UINT RealizePalette(HDC hDC);
61 BOOL SetBrushOrgEx(HDC hdc, int xOrigin, int yOrigin, LPPOINT lpPoint);
62 int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj);
63
64 /* For some reason these aren't defined in the headers */
65 BOOL EnableScrollBar (HWND hWnd, int iSBar, BOOL bEnable) ;
66 BOOL GetScrollPos (HWND hWnd, int iSBar, int* pPos);
67 BOOL GetScrollRange (HWND hWnd, int iSBar, int* pMinPos, int* pMaxPos);
68 BOOL SetScrollPos (HWND hWnd, int iSBar, int iNewPos);
69 BOOL SetScrollRange (HWND hWnd, int iSBar, int iMinPos, int iMaxPos);
70 BOOL SetScrollInfo (HWND hWnd, int iSBar,
71 LPCSCROLLINFO lpsi, BOOL fRedraw);
72 BOOL GetScrollInfo(HWND hWnd, int iSBar, LPSCROLLINFO lpsi);
73 BOOL ShowScrollBar (HWND hWnd, int iSBar, BOOL bShow);
74 HBITMAP WINAPI
75 CreateBitmap( int width, int height, int nPlanes, int bPP, LPCVOID lpData);
76
77 #ifdef __cplusplus
78 }
79 #endif
80
81 /*
82 * Key State Masks for Mouse Messages
83 */
84 #ifndef MK_LBUTTON
85 #define MK_LBUTTON 0x0001
86 #define MK_RBUTTON 0x0002
87 #define MK_SHIFT 0x0004
88 #define MK_CONTROL 0x0008
89 #define MK_MBUTTON 0x0010
90 #endif
91
92 /*
93 * DrawIcon flags
94 */
95
96 #ifndef DI_MASK
97 #define DI_MASK 0x0001
98 #define DI_IMAGE 0x0002
99 #define DI_NORMAL 0x0003
100 #define DI_COMPAT 0x0004
101 #define DI_DEFAULTSIZE 0x0008
102 #endif
103
104 /* TODO: May have to fake these message */
105 #ifndef WM_INITDIALOG
106 #define WM_INITDIALOG 0x0110
107 #endif
108 #ifndef WM_QUERYENDSESSION
109 #define WM_QUERYENDSESSION 0x0011
110 #endif
111 #ifndef WM_ENDSESSION
112 #define WM_ENDSESSION 0x0016
113 #endif
114 #ifndef WM_SETCURSOR
115 #define WM_SETCURSOR 0x0020
116 #endif
117 #ifndef WM_GETMINMAXINFO
118 #define WM_GETMINMAXINFO 0x0024
119 typedef struct tagMINMAXINFO {
120 POINT ptReserved;
121 POINT ptMaxSize;
122 POINT ptMaxPosition;
123 POINT ptMinTrackSize;
124 POINT ptMaxTrackSize;
125 } MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
126
127 #endif
128 #ifndef WM_SYSCOMMAND
129 #define WM_SYSCOMMAND 0x0112
130 #endif
131 #ifndef WM_SYSCOLORCHANGE
132 #define WM_SYSCOLORCHANGE 0x0015
133 #endif
134 #ifndef WM_QUERYNEWPALETTE
135 #define WM_QUERYNEWPALETTE 0x030F
136 #endif
137 #ifndef WM_PALETTEISCHANGING
138 #define WM_PALETTEISCHANGING 0x0310
139 #endif
140 #ifndef WM_PALETTECHANGED
141 #define WM_PALETTECHANGED 0x0311
142 #endif
143 #ifndef WM_NOTIFY
144 #define WM_NOTIFY 0x004E
145 #endif
146 #ifndef WM_DROPFILES
147 #define WM_DROPFILES 0x0233
148 #endif
149
150 #ifndef PALETTERGB
151 #define PALETTERGB RGB
152 #endif
153
154 #ifndef MM_TEXT
155 #define MM_TEXT 1
156 #define MM_LOMETRIC 2
157 #define MM_HIMETRIC 3
158 #define MM_LOENGLISH 4
159 #define MM_HIENGLISH 5
160 #define MM_TWIPS 6
161 #define MM_ISOTROPIC 7
162 #define MM_ANISOTROPIC 8
163 #endif
164
165 #ifndef SC_MAXIMIZE
166 #define SC_MINIMIZE 0xF020
167 #define SC_MAXIMIZE 0xF030
168 #endif
169
170 // TODO: all of them
171 #ifndef IDC_ARROW
172 #define IDC_ARROW 1
173 #endif
174
175 /*
176 * Standard Cursor IDs
177 */
178 #ifndef MAKEINTRESOURCE
179 #define MAKEINTRESOURCE(r) r
180 #endif
181
182 #ifndef IDC_ARROW
183 #define IDC_ARROW MAKEINTRESOURCE(32512)
184 #define IDC_IBEAM MAKEINTRESOURCE(32513)
185 #define IDC_WAIT MAKEINTRESOURCE(32514)
186 #define IDC_CROSS MAKEINTRESOURCE(32515)
187 #define IDC_UPARROW MAKEINTRESOURCE(32516)
188 #define IDC_SIZE MAKEINTRESOURCE(32640) /* OBSOLETE: use IDC_SIZEALL */
189 #define IDC_ICON MAKEINTRESOURCE(32641) /* OBSOLETE: use IDC_ARROW */
190 #define IDC_SIZENWSE MAKEINTRESOURCE(32642)
191 #define IDC_SIZENESW MAKEINTRESOURCE(32643)
192 #define IDC_SIZEWE MAKEINTRESOURCE(32644)
193 #define IDC_SIZENS MAKEINTRESOURCE(32645)
194 #define IDC_SIZEALL MAKEINTRESOURCE(32646)
195 #define IDC_NO MAKEINTRESOURCE(32648) /* not in win3.1 */
196 #if(WINVER >= 0x0500)
197 #define IDC_HAND MAKEINTRESOURCE(32649)
198 #endif /* WINVER >= 0x0500 */
199 #define IDC_APPSTARTING MAKEINTRESOURCE(32650) /* not in win3.1 */
200 #if(WINVER >= 0x0400)
201 #define IDC_HELP MAKEINTRESOURCE(32651)
202 #endif /* WINVER >= 0x0400 */
203 #endif
204
205 /* ExtFloodFill style flags */
206 #define FLOODFILLBORDER 0
207 #define FLOODFILLSURFACE 1
208
209 /* PolyFill() Modes */
210 #define ALTERNATE 1
211 #define WINDING 2
212 #define POLYFILL_LAST 2
213
214 /* Quaternary raster codes */
215 #define MAKEROP4(fore,back) (DWORD)((((back) << 8) & 0xFF000000) | (fore))
216
217 /* Device Parameters for GetDeviceCaps() */
218 #define DRIVERVERSION 0 /* Device driver version */
219 #define TECHNOLOGY 2 /* Device classification */
220 #define HORZSIZE 4 /* Horizontal size in millimeters */
221 #define VERTSIZE 6 /* Vertical size in millimeters */
222
223 /* Ternary raster operations */
224 /* Now defined by MicroWindows */
225 #if 0
226 #define DSTINVERT (DWORD)0x00550009 /* dest = (NOT dest) */
227 #define WHITENESS (DWORD)0x00FF0062 /* dest = WHITE */
228 #define SRCERASE (DWORD)0x00440328 /* dest = source AND (NOT dest ) */
229 #define MERGEPAINT (DWORD)0x00BB0226 /* dest = (NOT source) OR dest */
230 #define SRCPAINT (DWORD)0x00EE0086 /* dest = source OR dest */
231 #define NOTSRCCOPY (DWORD)0x00330008 /* dest = (NOT source) */
232 #endif
233
234 #endif /* _WX_MICROWIN_H_ */