4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * Contributor(s): Blender Foundation (2008).
22 * ***** END GPL LICENSE BLOCK *****
27 #include "RNA_access.h"
28 #include "RNA_define.h"
29 #include "RNA_enum_types.h"
30 #include "RNA_types.h"
32 #include "rna_internal.h"
34 #include "DNA_screen_types.h"
35 #include "DNA_space_types.h"
36 #include "DNA_userdef_types.h"
37 #include "DNA_windowmanager_types.h"
41 EnumPropertyItem event_keymouse_value_items[] = {
42 {KM_ANY, "ANY", 0, "Any", ""},
43 {KM_PRESS, "PRESS", 0, "Press", ""},
44 {KM_RELEASE, "RELEASE", 0, "Release", ""},
45 {KM_CLICK, "CLICK", 0, "Click", ""},
46 {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
47 {0, NULL, 0, NULL, NULL}};
49 EnumPropertyItem event_tweak_value_items[]= {
50 {KM_ANY, "ANY", 0, "Any", ""},
51 {EVT_GESTURE_N, "NORTH", 0, "North", ""},
52 {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
53 {EVT_GESTURE_E, "EAST", 0, "East", ""},
54 {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
55 {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
56 {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
57 {EVT_GESTURE_W, "WEST", 0, "West", ""},
58 {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
59 {0, NULL, 0, NULL, NULL}};
61 EnumPropertyItem event_value_items[] = {
62 {KM_ANY, "ANY", 0, "Any", ""},
63 {KM_NOTHING, "NOTHING", 0, "Nothing", ""},
64 {KM_PRESS, "PRESS", 0, "Press", ""},
65 {KM_RELEASE, "RELEASE", 0, "Release", ""},
66 {KM_CLICK, "CLICK", 0, "Click", ""},
67 {0, NULL, 0, NULL, NULL}};
69 EnumPropertyItem event_tweak_type_items[]= {
70 {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Left", ""},
71 {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Middle", ""},
72 {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Right", ""},
73 {EVT_TWEAK_A, "EVT_TWEAK_A", 0, "Action", ""},
74 {EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Select", ""},
75 {0, NULL, 0, NULL, NULL}};
77 EnumPropertyItem event_mouse_type_items[]= {
78 {LEFTMOUSE, "LEFTMOUSE", 0, "Left", ""},
79 {MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle", ""},
80 {RIGHTMOUSE, "RIGHTMOUSE", 0, "Right", ""},
81 {BUTTON4MOUSE, "BUTTON4MOUSE", 0, "Button4", ""},
82 {BUTTON5MOUSE, "BUTTON5MOUSE", 0, "Button5", ""},
83 {ACTIONMOUSE, "ACTIONMOUSE", 0, "Action", ""},
84 {SELECTMOUSE, "SELECTMOUSE", 0, "Select", ""},
85 {0, "", 0, NULL, NULL},
86 {MOUSEMOVE, "MOUSEMOVE", 0, "Move", ""},
87 {0, "", 0, NULL, NULL},
88 {WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", ""},
89 {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", ""},
90 {WHEELINMOUSE, "WHEELINMOUSE", 0, "Wheel In", ""},
91 {WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, "Wheel Out", ""},
92 {0, NULL, 0, NULL, NULL}};
94 EnumPropertyItem event_timer_type_items[]= {
95 {TIMER, "TIMER", 0, "Timer", ""},
96 {TIMER0, "TIMER0", 0, "Timer 0", ""},
97 {TIMER1, "TIMER1", 0, "Timer 1", ""},
98 {TIMER2, "TIMER2", 0, "Timer 2", ""},
99 {0, NULL, 0, NULL, NULL}};
101 /* not returned: CAPSLOCKKEY, UNKNOWNKEY, GRLESSKEY */
102 EnumPropertyItem event_type_items[] = {
104 {0, "NONE", 0, "", ""},
105 {LEFTMOUSE, "LEFTMOUSE", 0, "Left Mouse", ""},
106 {MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle Mouse", ""},
107 {RIGHTMOUSE, "RIGHTMOUSE", 0, "Right Mouse", ""},
108 {BUTTON4MOUSE, "BUTTON4MOUSE", 0, "Button4 Mouse", ""},
109 {BUTTON5MOUSE, "BUTTON5MOUSE", 0, "Button5 Mouse", ""},
110 {ACTIONMOUSE, "ACTIONMOUSE", 0, "Action Mouse", ""},
111 {SELECTMOUSE, "SELECTMOUSE", 0, "Select Mouse", ""},
112 {0, "", 0, NULL, NULL},
113 {MOUSEMOVE, "MOUSEMOVE", 0, "Mouse Move", ""},
114 {0, "", 0, NULL, NULL},
115 {WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", ""},
116 {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", ""},
117 {WHEELINMOUSE, "WHEELINMOUSE", 0, "Wheel In", ""},
118 {WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, "Wheel Out", ""},
119 {0, "", 0, NULL, NULL},
120 {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Tweak Left", ""},
121 {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Tweak Middle", ""},
122 {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Tweak Right", ""},
123 {EVT_TWEAK_A, "EVT_TWEAK_A", 0, "Tweak Action", ""},
124 {EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Tweak Select", ""},
125 {0, "", 0, NULL, NULL},
126 {AKEY, "A", 0, "A", ""},
127 {BKEY, "B", 0, "B", ""},
128 {CKEY, "C", 0, "C", ""},
129 {DKEY, "D", 0, "D", ""},
130 {EKEY, "E", 0, "E", ""},
131 {FKEY, "F", 0, "F", ""},
132 {GKEY, "G", 0, "G", ""},
133 {HKEY, "H", 0, "H", ""},
134 {IKEY, "I", 0, "I", ""},
135 {JKEY, "J", 0, "J", ""},
136 {KKEY, "K", 0, "K", ""},
137 {LKEY, "L", 0, "L", ""},
138 {MKEY, "M", 0, "M", ""},
139 {NKEY, "N", 0, "N", ""},
140 {OKEY, "O", 0, "O", ""},
141 {PKEY, "P", 0, "P", ""},
142 {QKEY, "Q", 0, "Q", ""},
143 {RKEY, "R", 0, "R", ""},
144 {SKEY, "S", 0, "S", ""},
145 {TKEY, "T", 0, "T", ""},
146 {UKEY, "U", 0, "U", ""},
147 {VKEY, "V", 0, "V", ""},
148 {WKEY, "W", 0, "W", ""},
149 {XKEY, "X", 0, "X", ""},
150 {YKEY, "Y", 0, "Y", ""},
151 {ZKEY, "Z", 0, "Z", ""},
152 {0, "", 0, NULL, NULL},
153 {ZEROKEY, "ZERO", 0, "0", ""},
154 {ONEKEY, "ONE", 0, "1", ""},
155 {TWOKEY, "TWO", 0, "2", ""},
156 {THREEKEY, "THREE", 0, "3", ""},
157 {FOURKEY, "FOUR", 0, "4", ""},
158 {FIVEKEY, "FIVE", 0, "5", ""},
159 {SIXKEY, "SIX", 0, "6", ""},
160 {SEVENKEY, "SEVEN", 0, "7", ""},
161 {EIGHTKEY, "EIGHT", 0, "8", ""},
162 {NINEKEY, "NINE", 0, "9", ""},
163 {0, "", 0, NULL, NULL},
164 {LEFTCTRLKEY, "LEFT_CTRL", 0, "Left Ctrl", ""},
165 {LEFTALTKEY, "LEFT_ALT", 0, "Left Alt", ""},
166 {LEFTSHIFTKEY, "LEFT_SHIFT", 0, "Left Shift", ""},
167 {RIGHTALTKEY, "RIGHT_ALT", 0, "Right Alt", ""},
168 {RIGHTCTRLKEY, "RIGHT_CTRL", 0, "Right Ctrl", ""},
169 {RIGHTSHIFTKEY, "RIGHT_SHIFT", 0, "Right Shift", ""},
170 {0, "", 0, NULL, NULL},
171 {COMMANDKEY, "COMMAND", 0, "Command", ""},
172 {0, "", 0, NULL, NULL},
173 {ESCKEY, "ESC", 0, "Esc", ""},
174 {TABKEY, "TAB", 0, "Tab", ""},
175 {RETKEY, "RET", 0, "Return", ""},
176 {SPACEKEY, "SPACE", 0, "Spacebar", ""},
177 {LINEFEEDKEY, "LINE_FEED", 0, "Line Feed", ""},
178 {BACKSPACEKEY, "BACK_SPACE", 0, "Back Space", ""},
179 {DELKEY, "DEL", 0, "Delete", ""},
180 {SEMICOLONKEY, "SEMI_COLON", 0, ";", ""},
181 {PERIODKEY, "PERIOD", 0, ".", ""},
182 {COMMAKEY, "COMMA", 0, ",", ""},
183 {QUOTEKEY, "QUOTE", 0, "\"", ""},
184 {ACCENTGRAVEKEY, "ACCENT_GRAVE", 0, "`", ""},
185 {MINUSKEY, "MINUS", 0, "-", ""},
186 {SLASHKEY, "SLASH", 0, "/", ""},
187 {BACKSLASHKEY, "BACK_SLASH", 0, "\\", ""},
188 {EQUALKEY, "EQUAL", 0, "=", ""},
189 {LEFTBRACKETKEY, "LEFT_BRACKET", 0, "[", ""},
190 {RIGHTBRACKETKEY, "RIGHT_BRACKET", 0, "]", ""},
191 {LEFTARROWKEY, "LEFT_ARROW", 0, "Left Arrow", ""},
192 {DOWNARROWKEY, "DOWN_ARROW", 0, "Down Arrow", ""},
193 {RIGHTARROWKEY, "RIGHT_ARROW", 0, "Right Arrow", ""},
194 {UPARROWKEY, "UP_ARROW", 0, "Up Arrow", ""},
195 {PAD2, "NUMPAD_2", 0, "Numpad 2", ""},
196 {PAD4, "NUMPAD_4", 0, "Numpad 4", ""},
197 {PAD6, "NUMPAD_6", 0, "Numpad 6", ""},
198 {PAD8, "NUMPAD_8", 0, "Numpad 8", ""},
199 {PAD1, "NUMPAD_1", 0, "Numpad 1", ""},
200 {PAD3, "NUMPAD_3", 0, "Numpad 3", ""},
201 {PAD5, "NUMPAD_5", 0, "Numpad 5", ""},
202 {PAD7, "NUMPAD_7", 0, "Numpad 7", ""},
203 {PAD9, "NUMPAD_9", 0, "Numpad 9", ""},
204 {PADPERIOD, "NUMPAD_PERIOD", 0, "Numpad .", ""},
205 {PADSLASHKEY, "NUMPAD_SLASH", 0, "Numpad /", ""},
206 {PADASTERKEY, "NUMPAD_ASTERIX", 0, "Numpad *", ""},
207 {PAD0, "NUMPAD_0", 0, "Numpad 0", ""},
208 {PADMINUS, "NUMPAD_MINUS", 0, "Numpad -", ""},
209 {PADENTER, "NUMPAD_ENTER", 0, "Numpad Enter", ""},
210 {PADPLUSKEY, "NUMPAD_PLUS", 0, "Numpad +", ""},
211 {F1KEY, "F1", 0, "F1", ""},
212 {F2KEY, "F2", 0, "F2", ""},
213 {F3KEY, "F3", 0, "F3", ""},
214 {F4KEY, "F4", 0, "F4", ""},
215 {F5KEY, "F5", 0, "F5", ""},
216 {F6KEY, "F6", 0, "F6", ""},
217 {F7KEY, "F7", 0, "F7", ""},
218 {F8KEY, "F8", 0, "F8", ""},
219 {F9KEY, "F9", 0, "F9", ""},
220 {F10KEY, "F10", 0, "F10", ""},
221 {F11KEY, "F11", 0, "F11", ""},
222 {F12KEY, "F12", 0, "F12", ""},
223 {PAUSEKEY, "PAUSE", 0, "Pause", ""},
224 {INSERTKEY, "INSERT", 0, "Insert", ""},
225 {HOMEKEY, "HOME", 0, "Home", ""},
226 {PAGEUPKEY, "PAGE_UP", 0, "Page Up", ""},
227 {PAGEDOWNKEY, "PAGE_DOWN", 0, "Page Down", ""},
228 {ENDKEY, "END", 0, "End", ""},
229 {0, "", 0, NULL, NULL},
230 {WINDEACTIVATE, "WINDOW_DEACTIVATE", 0, "Window Deactivate", ""},
231 {TIMER, "TIMER", 0, "Timer", ""},
232 {TIMER0, "TIMER0", 0, "Timer 0", ""},
233 {TIMER1, "TIMER1", 0, "Timer 1", ""},
234 {TIMER2, "TIMER2", 0, "Timer 2", ""},
235 {0, NULL, 0, NULL, NULL}};
237 EnumPropertyItem keymap_propvalue_items[] = {
238 {0, "NONE", 0, "", ""},
239 {0, NULL, 0, NULL, NULL}};
241 EnumPropertyItem keymap_modifiers_items[] = {
242 {KM_ANY, "ANY", 0, "Any", ""},
243 {0, "NONE", 0, "None", ""},
244 {1, "FIRST", 0, "First", ""},
245 {2, "SECOND", 0, "Second", ""},
246 {0, NULL, 0, NULL, NULL}};
248 EnumPropertyItem operator_return_items[] = {
249 {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", ""},
250 {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", ""},
251 {OPERATOR_FINISHED, "FINISHED", 0, "Finished", ""},
252 {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", ""}, // used as a flag
253 {0, NULL, 0, NULL, NULL}};
256 EnumPropertyItem wm_report_items[] = {
257 {RPT_DEBUG, "DEBUG", 0, "Debug", ""},
258 {RPT_INFO, "INFO", 0, "Info", ""},
259 {RPT_OPERATOR, "OPERATOR", 0, "Operator", ""},
260 {RPT_WARNING, "WARNING", 0, "Warning", ""},
261 {RPT_ERROR, "ERROR", 0, "Error", ""},
262 {RPT_ERROR_INVALID_INPUT, "ERROR_INVALID_INPUT", 0, "Invalid Input", ""},\
263 {RPT_ERROR_INVALID_CONTEXT, "ERROR_INVALID_CONTEXT", 0, "Invalid Context", ""},
264 {RPT_ERROR_OUT_OF_MEMORY, "ERROR_OUT_OF_MEMORY", 0, "Out of Memory", ""},
265 {0, NULL, 0, NULL, NULL}};
267 #define KMI_TYPE_KEYBOARD 0
268 #define KMI_TYPE_MOUSE 1
269 #define KMI_TYPE_TWEAK 2
270 #define KMI_TYPE_TEXTINPUT 3
271 #define KMI_TYPE_TIMER 4
277 #include "BKE_idprop.h"
279 #include "MEM_guardedalloc.h"
281 static wmOperator *rna_OperatorProperties_find_operator(PointerRNA *ptr)
283 wmWindowManager *wm= ptr->id.data;
284 IDProperty *properties= (IDProperty*)ptr->data;
288 for(op=wm->operators.first; op; op=op->next)
289 if(op->properties == properties)
295 static StructRNA *rna_OperatorProperties_refine(PointerRNA *ptr)
297 wmOperator *op= rna_OperatorProperties_find_operator(ptr);
300 return op->type->srna;
305 static IDProperty *rna_OperatorProperties_idproperties(PointerRNA *ptr, int create)
307 if(create && !ptr->data) {
308 IDPropertyTemplate val = {0};
309 ptr->data= IDP_New(IDP_GROUP, val, "RNA_OperatorProperties group");
315 static void rna_Operator_name_get(PointerRNA *ptr, char *value)
317 wmOperator *op= (wmOperator*)ptr->data;
318 strcpy(value, op->type->name);
321 static int rna_Operator_name_length(PointerRNA *ptr)
323 wmOperator *op= (wmOperator*)ptr->data;
324 return strlen(op->type->name);
327 static PointerRNA rna_Operator_properties_get(PointerRNA *ptr)
329 wmOperator *op= (wmOperator*)ptr->data;
330 return rna_pointer_inherit_refine(ptr, op->type->srna, op->properties);
333 static PointerRNA rna_OperatorTypeMacro_properties_get(PointerRNA *ptr)
335 wmOperatorTypeMacro *otmacro= (wmOperatorTypeMacro*)ptr->data;
336 wmOperatorType *ot = WM_operatortype_exists(otmacro->idname);
337 return rna_pointer_inherit_refine(ptr, ot->srna, otmacro->properties);
340 static void rna_Event_ascii_get(PointerRNA *ptr, char *value)
342 wmEvent *event= (wmEvent*)ptr->id.data;
343 value[0]= event->ascii;
347 static int rna_Event_ascii_length(PointerRNA *ptr)
349 wmEvent *event= (wmEvent*)ptr->id.data;
350 return (event->ascii)? 1 : 0;
353 static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value)
355 wmWindow *win= (wmWindow*)ptr->data;
357 if(value.data == NULL)
360 /* exception: can't set screens inside of area/region handers */
361 win->newscreen= value.data;
364 static void rna_Window_screen_update(bContext *C, PointerRNA *ptr)
366 wmWindow *win= (wmWindow*)ptr->data;
368 /* exception: can't set screens inside of area/region handers */
370 WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, win->newscreen);
371 win->newscreen= NULL;
375 static PointerRNA rna_KeyMapItem_properties_get(PointerRNA *ptr)
377 wmKeyMapItem *kmi= ptr->data;
382 //return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties);
383 return PointerRNA_NULL;
386 static int rna_wmKeyMapItem_map_type_get(PointerRNA *ptr)
388 wmKeyMapItem *kmi= ptr->data;
390 if(ISTIMER(kmi->type)) return KMI_TYPE_TIMER;
391 if(ISKEYBOARD(kmi->type)) return KMI_TYPE_KEYBOARD;
392 if(ISTWEAK(kmi->type)) return KMI_TYPE_TWEAK;
393 if(ISMOUSE(kmi->type)) return KMI_TYPE_MOUSE;
394 if(kmi->type == KM_TEXTINPUT) return KMI_TYPE_TEXTINPUT;
395 return KMI_TYPE_KEYBOARD;
398 static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value)
400 wmKeyMapItem *kmi= ptr->data;
401 int map_type= rna_wmKeyMapItem_map_type_get(ptr);
403 if(value != map_type) {
405 case KMI_TYPE_KEYBOARD:
410 kmi->type= EVT_TWEAK_L;
414 kmi->type= LEFTMOUSE;
417 case KMI_TYPE_TEXTINPUT:
418 kmi->type= KM_TEXTINPUT;
419 kmi->val= KM_NOTHING;
423 kmi->val= KM_NOTHING;
429 static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *C, PointerRNA *ptr, int *free)
431 int map_type= rna_wmKeyMapItem_map_type_get(ptr);
433 if(map_type == KMI_TYPE_MOUSE) return event_mouse_type_items;
434 if(map_type == KMI_TYPE_TWEAK) return event_tweak_type_items;
435 if(map_type == KMI_TYPE_TIMER) return event_timer_type_items;
436 else return event_type_items;
439 static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *C, PointerRNA *ptr, int *free)
441 int map_type= rna_wmKeyMapItem_map_type_get(ptr);
443 if(map_type == KMI_TYPE_MOUSE || map_type == KMI_TYPE_KEYBOARD) return event_keymouse_value_items;
444 if(map_type == KMI_TYPE_TWEAK) return event_tweak_value_items;
445 else return event_value_items;
448 static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA *ptr, int *free)
450 wmWindowManager *wm = CTX_wm_manager(C);
454 /* check user keymaps */
455 for(km=U.keymaps.first; km; km=km->next) {
457 for (ki=km->items.first; ki; ki=ki->next) {
458 if (ki == ptr->data) {
459 if (!km->modal_items) {
460 if (!WM_keymap_user_init(wm, km)) {
461 return keymap_propvalue_items; /* ERROR */
465 return km->modal_items;
470 for(kc=wm->keyconfigs.first; kc; kc=kc->next) {
471 for(km=kc->keymaps.first; km; km=km->next) {
472 /* only check if it's a modal keymap */
473 if (km->modal_items) {
475 for (ki=km->items.first; ki; ki=ki->next) {
476 if (ki == ptr->data) {
477 return km->modal_items;
485 return keymap_propvalue_items; /* ERROR */
488 static int rna_KeyMapItem_any_getf(PointerRNA *ptr)
490 wmKeyMapItem *kmi = (wmKeyMapItem*)ptr->data;
492 if (kmi->shift == KM_ANY &&
493 kmi->ctrl == KM_ANY &&
494 kmi->alt == KM_ANY &&
495 kmi->oskey == KM_ANY)
502 static void rna_KeyMapItem_any_setf(PointerRNA *ptr, int value)
504 wmKeyMapItem *kmi = (wmKeyMapItem*)ptr->data;
507 kmi->shift= kmi->ctrl= kmi->alt= kmi->oskey= KM_ANY;
510 kmi->shift= kmi->ctrl= kmi->alt= kmi->oskey= 0;
515 static PointerRNA rna_WindowManager_active_keyconfig_get(PointerRNA *ptr)
517 wmWindowManager *wm= ptr->data;
520 for(kc=wm->keyconfigs.first; kc; kc=kc->next)
521 if(strcmp(kc->idname, U.keyconfigstr) == 0)
527 return rna_pointer_inherit_refine(ptr, &RNA_KeyConfig, kc);
530 static void rna_WindowManager_active_keyconfig_set(PointerRNA *ptr, PointerRNA value)
532 wmKeyConfig *kc= value.data;
535 BLI_strncpy(U.keyconfigstr, kc->idname, sizeof(U.keyconfigstr));
538 static void rna_wmKeyMapItem_idname_get(PointerRNA *ptr, char *value)
540 wmKeyMapItem *kmi= ptr->data;
541 WM_operator_py_idname(value, kmi->idname);
544 static int rna_wmKeyMapItem_idname_length(PointerRNA *ptr)
546 wmKeyMapItem *kmi= ptr->data;
547 char pyname[OP_MAX_TYPENAME];
549 WM_operator_py_idname(pyname, kmi->idname);
550 return strlen(pyname);
553 static void rna_wmKeyMapItem_idname_set(PointerRNA *ptr, const char *value)
555 wmKeyMapItem *kmi= ptr->data;
556 char idname[OP_MAX_TYPENAME];
558 WM_operator_bl_idname(idname, value);
560 if(strcmp(idname, kmi->idname) != 0) {
561 BLI_strncpy(kmi->idname, idname, sizeof(kmi->idname));
563 WM_keymap_properties_reset(kmi);
567 static void rna_wmKeyMapItem_name_get(PointerRNA *ptr, char *value)
569 wmKeyMapItem *kmi= ptr->data;
570 wmOperatorType *ot= WM_operatortype_find(kmi->idname, 1);
573 strcpy(value, ot->name);
576 static int rna_wmKeyMapItem_name_length(PointerRNA *ptr)
578 wmKeyMapItem *kmi= ptr->data;
579 wmOperatorType *ot= WM_operatortype_find(kmi->idname, 1);
582 return strlen(ot->name);
589 static void rna_def_operator(BlenderRNA *brna)
594 srna= RNA_def_struct(brna, "Operator", NULL);
595 RNA_def_struct_ui_text(srna, "Operator", "Storage of an operator being executed, or registered after execution.");
596 RNA_def_struct_sdna(srna, "wmOperator");
598 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
599 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
600 RNA_def_property_string_funcs(prop, "rna_Operator_name_get", "rna_Operator_name_length", NULL);
601 RNA_def_property_ui_text(prop, "Name", "");
602 RNA_def_struct_name_property(srna, prop);
604 prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
605 RNA_def_property_flag(prop, PROP_NEVER_NULL);
606 RNA_def_property_struct_type(prop, "OperatorProperties");
607 RNA_def_property_ui_text(prop, "Properties", "");
608 RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL, NULL);
610 RNA_api_operator(srna);
612 srna= RNA_def_struct(brna, "OperatorProperties", NULL);
613 RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator.");
614 RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine");
615 RNA_def_struct_idproperties_func(srna, "rna_OperatorProperties_idproperties");
619 static void rna_def_macro_operator(BlenderRNA *brna)
624 srna= RNA_def_struct(brna, "Macro", NULL);
625 RNA_def_struct_ui_text(srna, "Macro Operator", "Storage of a macro operator being executed, or registered after execution.");
626 RNA_def_struct_sdna(srna, "wmOperator");
628 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
629 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
630 RNA_def_property_string_funcs(prop, "rna_Operator_name_get", "rna_Operator_name_length", NULL);
631 RNA_def_property_ui_text(prop, "Name", "");
632 RNA_def_struct_name_property(srna, prop);
634 prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
635 RNA_def_property_flag(prop, PROP_NEVER_NULL);
636 RNA_def_property_struct_type(prop, "OperatorProperties");
637 RNA_def_property_ui_text(prop, "Properties", "");
638 RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL, NULL);
641 static void rna_def_operator_type_macro(BlenderRNA *brna)
646 srna= RNA_def_struct(brna, "OperatorTypeMacro", NULL);
647 RNA_def_struct_ui_text(srna, "OperatorTypeMacro", "Storage of a sub operator in a macro after it has been added.");
648 RNA_def_struct_sdna(srna, "wmOperatorTypeMacro");
650 // prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
651 // RNA_def_property_clear_flag(prop, PROP_EDITABLE);
652 // RNA_def_property_string_sdna(prop, NULL, "idname");
653 // RNA_def_property_ui_text(prop, "Name", "Name of the sub operator.");
654 // RNA_def_struct_name_property(srna, prop);
656 prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
657 RNA_def_property_flag(prop, PROP_NEVER_NULL);
658 RNA_def_property_struct_type(prop, "OperatorProperties");
659 RNA_def_property_ui_text(prop, "Properties", "");
660 RNA_def_property_pointer_funcs(prop, "rna_OperatorTypeMacro_properties_get", NULL, NULL);
663 static void rna_def_operator_utils(BlenderRNA *brna)
668 srna= RNA_def_struct(brna, "OperatorMousePath", "IDPropertyGroup");
669 RNA_def_struct_ui_text(srna, "Operator Mouse Path", "Mouse path values for operators that record such paths.");
671 prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_XYZ);
672 RNA_def_property_flag(prop, PROP_IDPROPERTY);
673 RNA_def_property_array(prop, 2);
674 RNA_def_property_ui_text(prop, "Location", "Mouse location.");
676 prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_NONE);
677 RNA_def_property_flag(prop, PROP_IDPROPERTY);
678 RNA_def_property_ui_text(prop, "Time", "Time of mouse location.");
681 static void rna_def_operator_filelist_element(BlenderRNA *brna)
686 srna= RNA_def_struct(brna, "OperatorFileListElement", "IDPropertyGroup");
687 RNA_def_struct_ui_text(srna, "Operator File List Element", "");
690 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
691 RNA_def_property_flag(prop, PROP_IDPROPERTY);
692 RNA_def_property_ui_text(prop, "Name", "the name of a file or directory within a file list");
695 static void rna_def_event(BlenderRNA *brna)
700 srna= RNA_def_struct(brna, "Event", NULL);
701 RNA_def_struct_ui_text(srna, "Event", "Window Manager Event");
702 RNA_def_struct_sdna(srna, "wmEvent");
705 prop= RNA_def_property(srna, "ascii", PROP_STRING, PROP_NONE);
706 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
707 RNA_def_property_string_funcs(prop, "rna_Event_ascii_get", "rna_Event_ascii_length", NULL);
708 RNA_def_property_ui_text(prop, "ASCII", "Single ASCII character for this event.");
712 prop= RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
713 RNA_def_property_enum_sdna(prop, NULL, "val");
714 RNA_def_property_enum_items(prop, event_value_items);
715 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
716 RNA_def_property_ui_text(prop, "Value", "The type of event, only applies to some.");
718 prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
719 RNA_def_property_enum_sdna(prop, NULL, "type");
720 RNA_def_property_enum_items(prop, event_type_items);
721 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
722 RNA_def_property_ui_text(prop, "Type", "");
726 prop= RNA_def_property(srna, "mouse_x", PROP_INT, PROP_NONE);
727 RNA_def_property_int_sdna(prop, NULL, "x");
728 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
729 RNA_def_property_ui_text(prop, "Mouse X Position", "The window relative vertical location of the mouse.");
731 prop= RNA_def_property(srna, "mouse_y", PROP_INT, PROP_NONE);
732 RNA_def_property_int_sdna(prop, NULL, "y");
733 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
734 RNA_def_property_ui_text(prop, "Mouse Y Position", "The window relative horizontal location of the mouse.");
736 prop= RNA_def_property(srna, "mouse_prev_x", PROP_INT, PROP_NONE);
737 RNA_def_property_int_sdna(prop, NULL, "prevx");
738 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
739 RNA_def_property_ui_text(prop, "Mouse Previous X Position", "The window relative vertical location of the mouse.");
741 prop= RNA_def_property(srna, "mouse_prev_y", PROP_INT, PROP_NONE);
742 RNA_def_property_int_sdna(prop, NULL, "prevy");
743 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
744 RNA_def_property_ui_text(prop, "Mouse Previous Y Position", "The window relative horizontal location of the mouse.");
748 prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
749 RNA_def_property_boolean_sdna(prop, NULL, "shift", 1);
750 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
751 RNA_def_property_ui_text(prop, "Shift", "True when the Shift key is held.");
753 prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
754 RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 1);
755 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
756 RNA_def_property_ui_text(prop, "Ctrl", "True when the Ctrl key is held.");
758 prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
759 RNA_def_property_boolean_sdna(prop, NULL, "alt", 1);
760 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
761 RNA_def_property_ui_text(prop, "Alt", "True when the Alt/Option key is held.");
763 prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
764 RNA_def_property_boolean_sdna(prop, NULL, "oskey", 1);
765 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
766 RNA_def_property_ui_text(prop, "OS Key", "True when the Cmd key is held.");
769 static void rna_def_window(BlenderRNA *brna)
774 srna= RNA_def_struct(brna, "Window", NULL);
775 RNA_def_struct_ui_text(srna, "Window", "Open window.");
776 RNA_def_struct_sdna(srna, "wmWindow");
778 prop= RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE);
779 RNA_def_property_flag(prop, PROP_NEVER_NULL);
780 RNA_def_property_struct_type(prop, "Screen");
781 RNA_def_property_ui_text(prop, "Screen", "Active screen showing in the window.");
782 RNA_def_property_flag(prop, PROP_EDITABLE);
783 RNA_def_property_pointer_funcs(prop, NULL, "rna_Window_screen_set", NULL);
784 RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
785 RNA_def_property_update(prop, 0, "rna_Window_screen_update");
788 static void rna_def_windowmanager(BlenderRNA *brna)
793 srna= RNA_def_struct(brna, "WindowManager", "ID");
794 RNA_def_struct_ui_text(srna, "Window Manager", "Window manager datablock defining open windows and other user interface data.");
795 RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
796 RNA_def_struct_sdna(srna, "wmWindowManager");
798 prop= RNA_def_property(srna, "operators", PROP_COLLECTION, PROP_NONE);
799 RNA_def_property_struct_type(prop, "Operator");
800 RNA_def_property_ui_text(prop, "Operators", "Operator registry.");
802 prop= RNA_def_property(srna, "windows", PROP_COLLECTION, PROP_NONE);
803 RNA_def_property_struct_type(prop, "Window");
804 RNA_def_property_ui_text(prop, "Windows", "Open windows.");
806 prop= RNA_def_property(srna, "keyconfigs", PROP_COLLECTION, PROP_NONE);
807 RNA_def_property_struct_type(prop, "KeyConfig");
808 RNA_def_property_ui_text(prop, "Key Configurations", "Registered key configurations.");
810 prop= RNA_def_property(srna, "active_keyconfig", PROP_POINTER, PROP_NEVER_NULL);
811 RNA_def_property_struct_type(prop, "KeyConfig");
812 RNA_def_property_flag(prop, PROP_EDITABLE);
813 RNA_def_property_pointer_funcs(prop, "rna_WindowManager_active_keyconfig_get", "rna_WindowManager_active_keyconfig_set", 0);
814 RNA_def_property_ui_text(prop, "Active Key Configuration", "");
816 prop= RNA_def_property(srna, "default_keyconfig", PROP_POINTER, PROP_NEVER_NULL);
817 RNA_def_property_pointer_sdna(prop, NULL, "defaultconf");
818 RNA_def_property_struct_type(prop, "KeyConfig");
819 RNA_def_property_ui_text(prop, "Default Key Configuration", "");
824 static void rna_def_keyconfig(BlenderRNA *brna)
827 // FunctionRNA *func;
828 // PropertyRNA *parm;
831 static EnumPropertyItem map_type_items[] = {
832 {KMI_TYPE_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""},
833 {KMI_TYPE_TWEAK, "TWEAK", 0, "Tweak", ""},
834 {KMI_TYPE_MOUSE, "MOUSE", 0, "Mouse", ""},
835 {KMI_TYPE_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""},
836 {KMI_TYPE_TIMER, "TIMER", 0, "Timer", ""},
837 {0, NULL, 0, NULL, NULL}};
840 srna= RNA_def_struct(brna, "KeyConfig", NULL);
841 RNA_def_struct_sdna(srna, "wmKeyConfig");
842 RNA_def_struct_ui_text(srna, "Key Configuration", "Input configuration, including keymaps.");
844 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
845 RNA_def_property_string_sdna(prop, NULL, "idname");
846 RNA_def_property_ui_text(prop, "Name", "Name of the key configuration.");
847 RNA_def_struct_name_property(srna, prop);
849 prop= RNA_def_property(srna, "filter", PROP_STRING, PROP_NONE);
850 RNA_def_property_string_sdna(prop, NULL, "filter");
851 RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI.");
853 prop= RNA_def_property(srna, "keymaps", PROP_COLLECTION, PROP_NONE);
854 RNA_def_property_struct_type(prop, "KeyMap");
855 RNA_def_property_ui_text(prop, "Key Maps", "Key maps configured as part of this configuration.");
857 RNA_api_keyconfig(srna);
860 srna= RNA_def_struct(brna, "KeyMap", NULL);
861 RNA_def_struct_sdna(srna, "wmKeyMap");
862 RNA_def_struct_ui_text(srna, "Key Map", "Input configuration, including keymaps.");
864 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
865 RNA_def_property_string_sdna(prop, NULL, "idname");
866 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
867 RNA_def_property_ui_text(prop, "Name", "Name of the key map.");
868 RNA_def_struct_name_property(srna, prop);
870 prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
871 RNA_def_property_enum_sdna(prop, NULL, "spaceid");
872 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
873 RNA_def_property_enum_items(prop, space_type_items);
874 RNA_def_property_ui_text(prop, "Space Type", "Optional space type keymap is associated with.");
876 prop= RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE);
877 RNA_def_property_enum_sdna(prop, NULL, "regionid");
878 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
879 RNA_def_property_enum_items(prop, region_type_items);
880 RNA_def_property_ui_text(prop, "Region Type", "Optional region type keymap is associated with.");
882 prop= RNA_def_property(srna, "items", PROP_COLLECTION, PROP_NONE);
883 RNA_def_property_struct_type(prop, "KeyMapItem");
884 RNA_def_property_ui_text(prop, "Items", "Items in the keymap, linking an operator to an input event.");
886 prop= RNA_def_property(srna, "user_defined", PROP_BOOLEAN, PROP_NEVER_NULL);
887 RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_USER);
888 RNA_def_property_ui_text(prop, "User Defined", "Keymap is defined by the user.");
890 prop= RNA_def_property(srna, "modal", PROP_BOOLEAN, PROP_NONE);
891 RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_MODAL);
892 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
893 RNA_def_property_ui_text(prop, "Modal Keymap", "Indicates that a keymap is used for translate modal events for an operator.");
895 prop= RNA_def_property(srna, "items_expanded", PROP_BOOLEAN, PROP_NONE);
896 RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_EXPANDED);
897 RNA_def_property_ui_text(prop, "Items Expanded", "Expanded in the user interface.");
898 RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
900 prop= RNA_def_property(srna, "children_expanded", PROP_BOOLEAN, PROP_NONE);
901 RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_CHILDREN_EXPANDED);
902 RNA_def_property_ui_text(prop, "Children Expanded", "Children expanded in the user interface.");
903 RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
906 RNA_api_keymap(srna);
909 srna= RNA_def_struct(brna, "KeyMapItem", NULL);
910 RNA_def_struct_sdna(srna, "wmKeyMapItem");
911 RNA_def_struct_ui_text(srna, "Key Map Item", "Item in a Key Map.");
913 prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE);
914 RNA_def_property_string_sdna(prop, NULL, "idname");
915 RNA_def_property_ui_text(prop, "Identifier", "Identifier of operator to call on input event.");
916 RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_idname_get", "rna_wmKeyMapItem_idname_length", "rna_wmKeyMapItem_idname_set");
917 RNA_def_struct_name_property(srna, prop);
919 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
920 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
921 RNA_def_property_ui_text(prop, "Name", "Name of operator to call on input event.");
922 RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_name_get", "rna_wmKeyMapItem_name_length", NULL);
924 prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
925 RNA_def_property_struct_type(prop, "OperatorProperties");
926 RNA_def_property_pointer_funcs(prop, "rna_KeyMapItem_properties_get", NULL, NULL);
927 RNA_def_property_ui_text(prop, "Properties", "Properties to set when the operator is called.");
929 prop= RNA_def_property(srna, "map_type", PROP_ENUM, PROP_NONE);
930 RNA_def_property_enum_sdna(prop, NULL, "maptype");
931 RNA_def_property_enum_items(prop, map_type_items);
932 RNA_def_property_enum_funcs(prop, "rna_wmKeyMapItem_map_type_get", "rna_wmKeyMapItem_map_type_set", NULL);
933 RNA_def_property_ui_text(prop, "Map Type", "Type of event mapping.");
935 prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
936 RNA_def_property_enum_sdna(prop, NULL, "type");
937 RNA_def_property_enum_items(prop, event_type_items);
938 RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_type_itemf");
939 RNA_def_property_ui_text(prop, "Type", "Type of event.");
941 prop= RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
942 RNA_def_property_enum_sdna(prop, NULL, "val");
943 RNA_def_property_enum_items(prop, event_value_items);
944 RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_value_itemf");
945 RNA_def_property_ui_text(prop, "Value", "");
947 prop= RNA_def_property(srna, "any", PROP_BOOLEAN, PROP_NONE);
948 RNA_def_property_boolean_funcs(prop, "rna_KeyMapItem_any_getf", "rna_KeyMapItem_any_setf");
949 RNA_def_property_ui_text(prop, "Any", "Any modifier keys pressed.");
951 prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
952 RNA_def_property_boolean_sdna(prop, NULL, "shift", 0);
953 // RNA_def_property_enum_sdna(prop, NULL, "shift");
954 // RNA_def_property_enum_items(prop, keymap_modifiers_items);
955 RNA_def_property_ui_text(prop, "Shift", "Shift key pressed.");
957 prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
958 RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 0);
959 // RNA_def_property_enum_sdna(prop, NULL, "ctrl");
960 // RNA_def_property_enum_items(prop, keymap_modifiers_items);
961 RNA_def_property_ui_text(prop, "Ctrl", "Control key pressed.");
963 prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
964 RNA_def_property_boolean_sdna(prop, NULL, "alt", 0);
965 // RNA_def_property_enum_sdna(prop, NULL, "alt");
966 // RNA_def_property_enum_items(prop, keymap_modifiers_items);
967 RNA_def_property_ui_text(prop, "Alt", "Alt key pressed.");
969 prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
970 RNA_def_property_boolean_sdna(prop, NULL, "oskey", 0);
971 // RNA_def_property_enum_sdna(prop, NULL, "oskey");
972 // RNA_def_property_enum_items(prop, keymap_modifiers_items);
973 RNA_def_property_ui_text(prop, "OS Key", "Operating system key pressed.");
975 prop= RNA_def_property(srna, "key_modifier", PROP_ENUM, PROP_NONE);
976 RNA_def_property_enum_sdna(prop, NULL, "keymodifier");
977 RNA_def_property_enum_items(prop, event_type_items);
978 RNA_def_property_ui_text(prop, "Key Modifier", "Regular key pressed as a modifier.");
980 prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
981 RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_EXPANDED);
982 RNA_def_property_ui_text(prop, "Expanded", "Show key map event and property details in the user interface.");
983 RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
985 prop= RNA_def_property(srna, "propvalue", PROP_ENUM, PROP_NONE);
986 RNA_def_property_enum_sdna(prop, NULL, "propvalue");
987 RNA_def_property_enum_items(prop, keymap_propvalue_items);
988 RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_propvalue_itemf");
989 RNA_def_property_ui_text(prop, "Property Value", "The value this event translates to in a modal keymap.");
991 prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
992 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", KMI_INACTIVE);
993 RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item.");
994 RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1);
997 void RNA_def_wm(BlenderRNA *brna)
999 rna_def_operator(brna);
1000 rna_def_operator_utils(brna);
1001 rna_def_operator_filelist_element(brna);
1002 rna_def_macro_operator(brna);
1003 rna_def_operator_type_macro(brna);
1004 rna_def_event(brna);
1005 rna_def_window(brna);
1006 rna_def_windowmanager(brna);
1007 rna_def_keyconfig(brna);