~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to source/blender/makesrna/intern/rna_wm.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
#include "WM_types.h"
45
45
 
46
 
EnumPropertyItem event_keymouse_value_items[] = {
47
 
        {KM_ANY, "ANY", 0, "Any", ""},
48
 
        {KM_PRESS, "PRESS", 0, "Press", ""},
49
 
        {KM_RELEASE, "RELEASE", 0, "Release", ""},
50
 
        {KM_CLICK, "CLICK", 0, "Click", ""},
51
 
        {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
52
 
        {0, NULL, 0, NULL, NULL}
53
 
};
54
 
 
55
 
EnumPropertyItem event_tweak_value_items[] = {
56
 
        {KM_ANY, "ANY", 0, "Any", ""},
57
 
        {EVT_GESTURE_N, "NORTH", 0, "North", ""},
58
 
        {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
59
 
        {EVT_GESTURE_E, "EAST", 0, "East", ""},
60
 
        {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
61
 
        {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
62
 
        {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
63
 
        {EVT_GESTURE_W, "WEST", 0, "West", ""},
64
 
        {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
65
 
        {0, NULL, 0, NULL, NULL}
66
 
};
67
 
 
68
 
EnumPropertyItem event_value_items[] = {
69
 
        {KM_ANY, "ANY", 0, "Any", ""},
70
 
        {KM_NOTHING, "NOTHING", 0, "Nothing", ""},
71
 
        {KM_PRESS, "PRESS", 0, "Press", ""},
72
 
        {KM_RELEASE, "RELEASE", 0, "Release", ""},
73
 
        {KM_CLICK, "CLICK", 0, "Click", ""},
74
 
        {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
75
 
        {EVT_GESTURE_N, "NORTH", 0, "North", ""},
76
 
        {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
77
 
        {EVT_GESTURE_E, "EAST", 0, "East", ""},
78
 
        {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
79
 
        {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
80
 
        {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
81
 
        {EVT_GESTURE_W, "WEST", 0, "West", ""},
82
 
        {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
83
 
        {0, NULL, 0, NULL, NULL}
84
 
};
85
 
 
86
 
EnumPropertyItem event_tweak_type_items[] = {
 
46
#ifdef RNA_RUNTIME
 
47
static EnumPropertyItem event_keymouse_value_items[] = {
 
48
        {KM_ANY, "ANY", 0, "Any", ""},
 
49
        {KM_PRESS, "PRESS", 0, "Press", ""},
 
50
        {KM_RELEASE, "RELEASE", 0, "Release", ""},
 
51
        {KM_CLICK, "CLICK", 0, "Click", ""},
 
52
        {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
 
53
        {0, NULL, 0, NULL, NULL}
 
54
};
 
55
 
 
56
static EnumPropertyItem event_tweak_value_items[] = {
 
57
        {KM_ANY, "ANY", 0, "Any", ""},
 
58
        {EVT_GESTURE_N, "NORTH", 0, "North", ""},
 
59
        {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
 
60
        {EVT_GESTURE_E, "EAST", 0, "East", ""},
 
61
        {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
 
62
        {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
 
63
        {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
 
64
        {EVT_GESTURE_W, "WEST", 0, "West", ""},
 
65
        {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
 
66
        {0, NULL, 0, NULL, NULL}
 
67
};
 
68
 
 
69
static EnumPropertyItem event_tweak_type_items[] = {
87
70
        {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Left", ""},
88
71
        {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Middle", ""},
89
72
        {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Right", ""},
92
75
        {0, NULL, 0, NULL, NULL}
93
76
};
94
77
 
95
 
EnumPropertyItem event_mouse_type_items[] = {
 
78
static EnumPropertyItem event_mouse_type_items[] = {
96
79
        {LEFTMOUSE, "LEFTMOUSE", 0, "Left", ""},
97
80
        {MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle", ""},
98
81
        {RIGHTMOUSE, "RIGHTMOUSE", 0, "Right", ""},
113
96
        {0, NULL, 0, NULL, NULL}
114
97
};
115
98
 
116
 
EnumPropertyItem event_timer_type_items[] = {
 
99
static EnumPropertyItem event_timer_type_items[] = {
117
100
        {TIMER, "TIMER", 0, "Timer", ""},
118
101
        {TIMER0, "TIMER0", 0, "Timer 0", ""},
119
102
        {TIMER1, "TIMER1", 0, "Timer 1", ""},
125
108
        {0, NULL, 0, NULL, NULL}
126
109
};
127
110
 
128
 
EnumPropertyItem event_textinput_type_items[] = {
 
111
static EnumPropertyItem event_textinput_type_items[] = {
129
112
        {KM_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""},
130
113
        {0, NULL, 0, NULL, NULL}
131
114
};
132
115
 
133
 
EnumPropertyItem event_ndof_type_items[] = {
 
116
static EnumPropertyItem event_ndof_type_items[] = {
134
117
        {NDOF_MOTION, "NDOF_MOTION", 0, "Motion", ""},
135
118
        /* buttons on all 3dconnexion devices */
136
119
        {NDOF_BUTTON_MENU, "NDOF_BUTTON_MENU", 0, "Menu", ""},
179
162
        {NDOF_BUTTON_C, "NDOF_BUTTON_C", 0, "Button C", ""},
180
163
        {0, NULL, 0, NULL, NULL}
181
164
};
 
165
#endif
182
166
 
183
167
/* not returned: CAPSLOCKKEY, UNKNOWNKEY */
184
168
EnumPropertyItem event_type_items[] = {
386
370
        {0, NULL, 0, NULL, NULL}
387
371
};
388
372
 
 
373
EnumPropertyItem event_value_items[] = {
 
374
        {KM_ANY, "ANY", 0, "Any", ""},
 
375
        {KM_NOTHING, "NOTHING", 0, "Nothing", ""},
 
376
        {KM_PRESS, "PRESS", 0, "Press", ""},
 
377
        {KM_RELEASE, "RELEASE", 0, "Release", ""},
 
378
        {KM_CLICK, "CLICK", 0, "Click", ""},
 
379
        {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
 
380
        {EVT_GESTURE_N, "NORTH", 0, "North", ""},
 
381
        {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
 
382
        {EVT_GESTURE_E, "EAST", 0, "East", ""},
 
383
        {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
 
384
        {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
 
385
        {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
 
386
        {EVT_GESTURE_W, "WEST", 0, "West", ""},
 
387
        {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
 
388
        {0, NULL, 0, NULL, NULL}
 
389
};
 
390
 
389
391
EnumPropertyItem keymap_propvalue_items[] = {
390
392
        {0, "NONE", 0, "", ""},
391
393
        {0, NULL, 0, NULL, NULL}
401
403
};
402
404
#endif
403
405
 
404
 
EnumPropertyItem operator_flag_items[] = {
 
406
 
 
407
#ifndef RNA_RUNTIME
 
408
static EnumPropertyItem operator_flag_items[] = {
405
409
        {OPTYPE_REGISTER, "REGISTER", 0, "Register", "Display in the info window and support the redo toolbar panel"},
406
410
        {OPTYPE_UNDO, "UNDO", 0, "Undo", "Push an undo event (needed for operator redo)"},
407
411
        {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", "Block anything else from using the cursor"},
413
417
        {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", "Removes the operator from search results"},
414
418
        {0, NULL, 0, NULL, NULL}
415
419
};
 
420
#endif
416
421
 
417
422
EnumPropertyItem operator_return_items[] = {
418
423
        {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"},
585
590
        win->newscreen = value.data;
586
591
}
587
592
 
588
 
int rna_Window_screen_assign_poll(PointerRNA *ptr, PointerRNA value)
 
593
int rna_Window_screen_assign_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
589
594
{
590
595
        bScreen *screen = (bScreen *)value.id.data;
591
596
 
770
775
        wmWindowManager *wm = ptr->data;
771
776
        wmKeyConfig *kc;
772
777
 
773
 
        for (kc = wm->keyconfigs.first; kc; kc = kc->next)
774
 
                if (strcmp(kc->idname, U.keyconfigstr) == 0)
775
 
                        break;
776
 
        
 
778
        kc = BLI_findstring(&wm->keyconfigs, U.keyconfigstr, offsetof(wmKeyConfig, idname));
 
779
 
777
780
        if (!kc)
778
781
                kc = wm->defaultconf;
779
782
        
1737
1740
        RNA_def_property_int_sdna(prop, NULL, "sizey");
1738
1741
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1739
1742
        RNA_def_property_ui_text(prop, "Height", "Window height");
 
1743
 
 
1744
        RNA_api_window(srna);
1740
1745
}
1741
1746
 
1742
1747
/* curve.splines */