]> git.saurik.com Git - wxWidgets.git/blame - contrib/src/stc/scintilla/include/WinDefs.h
Reformatting.
[wxWidgets.git] / contrib / src / stc / scintilla / include / WinDefs.h
CommitLineData
9ce192d4
RD
1// Scintilla source code edit control
2// WinDefs.h - the subset of definitions from Windows needed by Scintilla for GTK+
3// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
4// The License.txt file describes the conditions under which this software may be distributed.
5
6#ifndef WINDEFS_H
7#define WINDEFS_H
8
9#define WORD short
10#define WPARAM unsigned long
11#define LPARAM long
12#define LRESULT long
13#define DWORD long
14
15#define UINT unsigned int
16#define LPSTR char *
17#define LONG long
18
19/* RTF control */
20#define EM_CANPASTE (1074)
21#define EM_CANUNDO (198)
22#define EM_CHARFROMPOS (215)
9ce192d4
RD
23#define EM_EMPTYUNDOBUFFER (205)
24#define EM_EXGETSEL (1076)
9ce192d4
RD
25#define EM_EXLINEFROMCHAR (1078)
26#define EM_EXSETSEL (1079)
27#define EM_FINDTEXT (1080)
28#define EM_FINDTEXTEX (1103)
9ce192d4 29#define EM_FORMATRANGE (1081)
9ce192d4 30#define EM_GETFIRSTVISIBLELINE (206)
9ce192d4
RD
31#define EM_GETLINE (196)
32#define EM_GETLINECOUNT (186)
33#define EM_GETMARGINS (212)
34#define EM_GETMODIFY (184)
9ce192d4
RD
35#define EM_GETRECT (178)
36#define EM_GETSEL (176)
37#define EM_GETSELTEXT (1086)
38#define EM_GETTEXTRANGE (1099)
9ce192d4 39#define EM_HIDESELECTION (1087)
9ce192d4
RD
40#define EM_LINEFROMCHAR (201)
41#define EM_LINEINDEX (187)
42#define EM_LINELENGTH (193)
43#define EM_LINESCROLL (182)
9ce192d4
RD
44#define EM_POSFROMCHAR (214)
45#define EM_REPLACESEL (194)
9ce192d4
RD
46#define EM_SCROLLCARET (183)
47#define EM_SELECTIONTYPE (1090)
9ce192d4 48#define EM_SETMARGINS (211)
9ce192d4 49#define EM_SETREADONLY (207)
9ce192d4 50#define EM_SETSEL (177)
9ce192d4
RD
51#define EM_UNDO (199)
52
53#define WM_NULL (0)
54#define WM_CLEAR (771)
55#define WM_COMMAND (273)
56#define WM_COPY (769)
57#define WM_CUT (768)
58#define WM_GETTEXT (13)
59#define WM_GETTEXTLENGTH (14)
60#define WM_NOTIFY (78)
61#define WM_PASTE (770)
62#define WM_SETTEXT (12)
63#define WM_UNDO (772)
64
65#define EN_CHANGE (768)
66#define EN_KILLFOCUS (512)
67#define EN_SETFOCUS (256)
68
69#define EC_LEFTMARGIN 1
70#define EC_RIGHTMARGIN 2
71#define EC_USEFONTINFO 0xffff
72
73#if PLAT_GTK
74#define VK_DOWN GDK_Down
75#define VK_UP GDK_Up
76#define VK_LEFT GDK_Left
77#define VK_RIGHT GDK_Right
78#define VK_HOME GDK_Home
79#define VK_END GDK_End
80#define VK_PRIOR GDK_Page_Up
81#define VK_NEXT GDK_Page_Down
82#define VK_DELETE GDK_Delete
83#define VK_INSERT GDK_Insert
84#define VK_ESCAPE GDK_Escape
85#define VK_BACK GDK_BackSpace
86#define VK_TAB GDK_Tab
87#define VK_RETURN GDK_Return
88#define VK_ADD GDK_KP_Add
89#define VK_SUBTRACT GDK_KP_Subtract
f6bcfd97 90#define VK_DIVIDE GDK_KP_Divide
9ce192d4
RD
91#endif
92
93#if PLAT_WX
94#define VK_DOWN WXK_DOWN
95#define VK_UP WXK_UP
96#define VK_LEFT WXK_LEFT
97#define VK_RIGHT WXK_RIGHT
98#define VK_HOME WXK_HOME
99#define VK_END WXK_END
100#define VK_PRIOR WXK_PRIOR
101#define VK_NEXT WXK_NEXT
102#define VK_DELETE WXK_DELETE
103#define VK_INSERT WXK_INSERT
104#define VK_ESCAPE WXK_ESCAPE
105#define VK_BACK WXK_BACK
106#define VK_TAB WXK_TAB
107#define VK_RETURN WXK_RETURN
108#define VK_ADD WXK_ADD
109#define VK_SUBTRACT WXK_SUBTRACT
f6bcfd97
BP
110//TODO:
111#define VK_DIVIDE WXK_DIVIDE
9ce192d4
RD
112
113// Are these needed any more
114#define LPSTR char *
115#define LONG long
116#define LPDWORD (long *)
117#endif
118
119/* SELCHANGE structure */
120#define SEL_EMPTY (0)
121#define SEL_TEXT (1)
122#define SEL_OBJECT (2)
123#define SEL_MULTICHAR (4)
124#define SEL_MULTIOBJECT (8)
125
126/* FINDREPLACE structure */
127#define FR_MATCHCASE (0x4)
128#define FR_WHOLEWORD (0x2)
129#define FR_DOWN (0x1)
130
131#define SHIFT_PRESSED 1
132#define LEFT_CTRL_PRESSED 2
133#define LEFT_ALT_PRESSED 4
134
135struct RECT {
136 LONG left;
137 LONG top;
138 LONG right;
139 LONG bottom;
140};
141
142struct CHARRANGE {
143 LONG cpMin;
144 LONG cpMax;
145};
146
147struct TEXTRANGE {
148 CHARRANGE chrg;
149 LPSTR lpstrText;
150};
151
152struct FINDTEXTEX {
153 CHARRANGE chrg;
154 LPSTR lpstrText;
155 CHARRANGE chrgText;
156};
157
158struct NMHDR {
159 WindowID hwndFrom;
160 UINT idFrom;
161 UINT code;
162};
163
164struct FORMATRANGE {
165 SurfaceID hdc;
166 SurfaceID hdcTarget;
167 RECT rc;
168 RECT rcPage;
169 CHARRANGE chrg;
170};
171
172#define MAKELONG(a, b) ((a) | ((b) << 16))
173#define LOWORD(x) (x & 0xffff)
174#define HIWORD(x) (x >> 16)
175
176#endif