This repository has been archived by the owner on Oct 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfunction.h
261 lines (202 loc) · 6.55 KB
/
function.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// keymap.h
// _FUNCTION_H ‚ª /usr/include/c++/4.1.3/bits/stl_function.h ‚Æ
// /usr/include/c++/4.1.3/backward/function.h ‚ÅÕ“Ë‚µ‚Ä‚éII
#ifndef _FUNCTION_H_
# define _FUNCTION_H_
// #ifndef _FUNCTION_H
// # define _FUNCTION_H
class SettingLoader;
class Engine;
class FunctionParam;
///
class FunctionData
{
public:
/// virtual destructor
virtual ~FunctionData() = 0;
///
virtual void load(SettingLoader *i_sl) = 0;
///
virtual void exec(Engine *i_engine, FunctionParam *i_param) const = 0;
///
virtual const _TCHAR *getName() const = 0;
///
virtual tostream &output(tostream &i_ost) const = 0;
///
virtual FunctionData *clone() const = 0;
};
/// stream output
extern tostream &operator<<(tostream &i_ost, const FunctionData *i_data);
// create function
extern FunctionData *createFunctionData(const tstring &i_name);
///
enum VKey
{
VKey_extended = 0x100, ///
VKey_released = 0x200, ///
VKey_pressed = 0x400, ///
};
/// stream output
extern tostream &operator<<(tostream &i_ost, VKey i_data);
///
enum ToWindowType
{
ToWindowType_toBegin = -2, ///
ToWindowType_toMainWindow = -2, ///
ToWindowType_toOverlappedWindow = -1, ///
ToWindowType_toItself = 0, ///
ToWindowType_toParentWindow = 1, ///
};
/// stream output
extern tostream &operator<<(tostream &i_ost, ToWindowType i_data);
// get value of ToWindowType
extern bool getTypeValue(ToWindowType *o_type, const tstring &i_name);
///
enum GravityType
{
GravityType_C = 0, /// center
GravityType_N = 1 << 0, /// north
GravityType_E = 1 << 1, /// east
GravityType_W = 1 << 2, /// west
GravityType_S = 1 << 3, /// south
GravityType_NW = GravityType_N | GravityType_W, /// north west
GravityType_NE = GravityType_N | GravityType_E, /// north east
GravityType_SW = GravityType_S | GravityType_W, /// south west
GravityType_SE = GravityType_S | GravityType_E, /// south east
};
/// stream output
extern tostream &operator<<(tostream &i_ost, GravityType i_data);
/// get value of GravityType
extern bool getTypeValue(GravityType *o_type, const tstring &i_name);
///
enum MayuDialogType
{
MayuDialogType_investigate = 0x10000, ///
MayuDialogType_log = 0x20000, ///
MayuDialogType_mask = 0xffff0000, ///
};
/// stream output
extern tostream &operator<<(tostream &i_ost, MayuDialogType i_data);
// get value of MayuDialogType
bool getTypeValue(MayuDialogType *o_type, const tstring &i_name);
///
enum ModifierLockType
{
ModifierLockType_Lock0 = Modifier::Type_Lock0, ///
ModifierLockType_Lock1 = Modifier::Type_Lock1, ///
ModifierLockType_Lock2 = Modifier::Type_Lock2, ///
ModifierLockType_Lock3 = Modifier::Type_Lock3, ///
ModifierLockType_Lock4 = Modifier::Type_Lock4, ///
ModifierLockType_Lock5 = Modifier::Type_Lock5, ///
ModifierLockType_Lock6 = Modifier::Type_Lock6, ///
ModifierLockType_Lock7 = Modifier::Type_Lock7, ///
ModifierLockType_Lock8 = Modifier::Type_Lock8, ///
ModifierLockType_Lock9 = Modifier::Type_Lock9, ///
};
///
enum ToggleType
{
ToggleType_toggle = -1, ///
ToggleType_off = 0, ///
ToggleType_on = 1, ///
};
/// stream output
extern tostream &operator<<(tostream &i_ost, ToggleType i_data);
// get value of ShowCommandType
extern bool getTypeValue(ToggleType *o_type, const tstring &i_name);
/// stream output
extern tostream &operator<<(tostream &i_ost, ModifierLockType i_data);
// get value of ModifierLockType
extern bool getTypeValue(ModifierLockType *o_type, const tstring &i_name);
///
enum ShowCommandType
{
#if defined(WIN32)
ShowCommandType_hide = SW_HIDE, ///
ShowCommandType_maximize = SW_MAXIMIZE, ///
ShowCommandType_minimize = SW_MINIMIZE, ///
ShowCommandType_restore = SW_RESTORE, ///
ShowCommandType_show = SW_SHOW, ///
ShowCommandType_showDefault = SW_SHOWDEFAULT, ///
ShowCommandType_showMaximized = SW_SHOWMAXIMIZED, ///
ShowCommandType_showMinimized = SW_SHOWMINIMIZED, ///
ShowCommandType_showMinNoActive = SW_SHOWMINNOACTIVE, ///
ShowCommandType_showNA = SW_SHOWNA, ///
ShowCommandType_showNoActivate = SW_SHOWNOACTIVATE, ///
ShowCommandType_showNormal = SW_SHOWNORMAL, ///
#endif
};
#if defined(WIN32)
/// stream output
extern tostream &operator<<(tostream &i_ost, ShowCommandType i_data);
// get value of ShowCommandType
extern bool getTypeValue(ShowCommandType *o_type, const tstring &i_name);
#endif
///
enum TargetWindowType
{
TargetWindowType_overlapped = 0, ///
TargetWindowType_mdi = 1, ///
};
/// stream output
extern tostream &operator<<(tostream &i_ost, TargetWindowType i_data);
// get value of ShowCommandType
extern bool getTypeValue(TargetWindowType *o_type, const tstring &i_name);
///
enum BooleanType
{
BooleanType_false = 0, ///
BooleanType_true = 1, ///
};
/// stream output
extern tostream &operator<<(tostream &i_ost, BooleanType i_data);
// get value of ShowCommandType
extern bool getTypeValue(BooleanType *o_type, const tstring &i_name);
///
enum LogicalOperatorType
{
LogicalOperatorType_or = 0, ///
LogicalOperatorType_and = 1, ///
};
/// stream output
extern tostream &operator<<(tostream &i_ost, LogicalOperatorType i_data);
// get value of LogicalOperatorType
extern bool getTypeValue(LogicalOperatorType *o_type, const tstring &i_name);
///
enum WindowMonitorFromType
{
WindowMonitorFromType_primary = 0, ///
WindowMonitorFromType_current = 1, ///
};
// stream output
extern tostream &operator<<(tostream &i_ost, WindowMonitorFromType i_data);
// get value of WindowMonitorFromType
extern bool getTypeValue(WindowMonitorFromType *o_type, const tstring &i_name);
/// stream output
extern tostream &operator<<(tostream &i_ost,
const std::list<tstringq> &i_data);
/// string type expression
class StrExpr;
/// string type expression for function arguments
class StrExprArg
{
private:
StrExpr *m_expr;
public:
enum Type
{
Literal,
Builtin,
};
StrExprArg();
StrExprArg(const StrExprArg &i_data);
StrExprArg(const tstringq &i_symbol, Type i_type);
~StrExprArg();
StrExprArg &operator=(const StrExprArg &i_data);
tstringq eval() const;
static void setEngine(const Engine *i_engine);
};
/// stream output
tostream &operator<<(tostream &i_ost, const StrExprArg &i_data);
#endif // !_FUNCTION_H_