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