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