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

« back to all changes in this revision

Viewing changes to source/blender/windowmanager/WM_api.h

  • 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:
40
40
/* dna-savable wmStructs here */
41
41
#include "DNA_windowmanager_types.h"
42
42
#include "WM_keymap.h"
 
43
#include "BLI_compiler_attrs.h"
43
44
 
44
45
#ifdef __cplusplus
45
46
extern "C" {
76
77
void            WM_init                         (struct bContext *C, int argc, const char **argv);
77
78
void            WM_exit_ext                     (struct bContext *C, const short do_python);
78
79
 
79
 
void            WM_exit                         (struct bContext *C)
80
 
#if defined(__GNUC__) || defined(__clang__)
81
 
__attribute__((noreturn))
82
 
#endif
83
 
;
 
80
void            WM_exit                         (struct bContext *C) ATTR_NORETURN;
84
81
 
85
 
void            WM_main                         (struct bContext *C)
86
 
#if defined(__GNUC__) || defined(__clang__)
87
 
__attribute__((noreturn))
88
 
#endif
89
 
;
 
82
void            WM_main                         (struct bContext *C) ATTR_NORETURN;
90
83
 
91
84
bool            WM_init_game            (struct bContext *C);
92
85
void            WM_init_splash          (struct bContext *C);
118
111
void            WM_recover_last_session(struct bContext *C, struct ReportList *reports);
119
112
 
120
113
                        /* mouse cursors */
121
 
void            WM_cursor_set           (struct wmWindow *win, int curs);
122
 
void            WM_cursor_modal         (struct wmWindow *win, int curs);
123
 
void            WM_cursor_restore       (struct wmWindow *win);
 
114
void            WM_cursor_set(struct wmWindow *win, int curs);
 
115
void            WM_cursor_modal_set(struct wmWindow *win, int curs);
 
116
void            WM_cursor_modal_restore(struct wmWindow *win);
124
117
void            WM_cursor_wait          (bool val);
125
118
void            WM_cursor_grab_enable(struct wmWindow *win, bool wrap, bool hide, int bounds[4]);
126
119
void            WM_cursor_grab_disable(struct wmWindow *win, int mouse_ungrab_xy[2]);
151
144
void            WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap);
152
145
 
153
146
struct wmEventHandler *WM_event_add_ui_handler(
154
 
                const struct bContext *C, ListBase *handlers,
155
 
                int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
156
 
                void (*remove)(struct bContext *C, void *userdata), void *userdata);
 
147
        const struct bContext *C, ListBase *handlers,
 
148
        int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
 
149
        void (*remove)(struct bContext *C, void *userdata), void *userdata);
157
150
 
158
151
void            WM_event_remove_ui_handler(ListBase *handlers,
159
152
                                       int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
180
173
 
181
174
                        /* reports */
182
175
void        WM_report(const struct bContext *C, ReportType type, const char *message);
183
 
void        WM_reportf(const struct bContext *C, ReportType type, const char *format, ...)
184
 
#ifdef __GNUC__
185
 
__attribute__ ((format(printf, 3, 4)))
186
 
#endif
187
 
;
 
176
void        WM_reportf(const struct bContext *C, ReportType type, const char *format, ...) ATTR_PRINTF_FORMAT(3, 4);
188
177
 
189
178
void            wm_event_add(struct wmWindow *win, const struct wmEvent *event_to_add);
 
179
void            wm_event_init_from_window(struct wmWindow *win, struct wmEvent *event);
 
180
 
190
181
 
191
182
                        /* at maximum, every timestep seconds it triggers event_type events */
192
183
struct wmTimer *WM_event_add_timer(struct wmWindowManager *wm, struct wmWindow *win, int event_type, double timestep);
195
186
 
196
187
                /* operator api, default callbacks */
197
188
                        /* invoke callback, uses enum property named "type" */
198
 
int                     WM_operator_view3d_distance_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
 
189
void            WM_operator_view3d_unit_defaults(struct bContext *C, struct wmOperator *op);
 
190
int                     WM_operator_smooth_viewtx_get(const struct wmOperator *op);
199
191
int                     WM_menu_invoke                  (struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
200
192
int                     WM_enum_search_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
201
193
                        /* invoke callback, confirm menu + exec */
206
198
                        /* poll callback, context checks */
207
199
int                     WM_operator_winactive   (struct bContext *C);
208
200
                        /* invoke callback, exec + redo popup */
 
201
int                     WM_operator_props_popup_confirm(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
209
202
int                     WM_operator_props_popup_call(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
210
203
int                     WM_operator_props_popup (struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
211
204
int             WM_operator_props_dialog_popup(struct bContext *C, struct wmOperator *op, int width, int height);
340
333
 
341
334
                        /* Set a subwindow active in pixelspace view, with optional scissor subset */
342
335
void            wmSubWindowSet                  (struct wmWindow *win, int swinid);
343
 
void            wmSubWindowScissorSet   (struct wmWindow *win, int swinid, struct rcti *srct);
 
336
void            wmSubWindowScissorSet   (struct wmWindow *win, int swinid, const struct rcti *srct, bool srct_pad);
344
337
 
345
338
                        /* OpenGL utilities with safety check + working in modelview matrix mode */
346
339
void            wmFrustum                       (float x1, float x2, float y1, float y2, float n, float f);
384
377
int                     WM_jobs_test(struct wmWindowManager *wm, void *owner, int job_type);
385
378
float           WM_jobs_progress(struct wmWindowManager *wm, void *owner);
386
379
char       *WM_jobs_name(struct wmWindowManager *wm, void *owner);
 
380
void       *WM_jobs_customdata(struct wmWindowManager *wm, void *owner);
387
381
 
388
382
int         WM_jobs_is_running(struct wmJob *);
389
383
void       *WM_jobs_customdata_get(struct wmJob *);
400
394
void            WM_jobs_kill(struct wmWindowManager *wm, void *owner, void (*)(void *, short int *, short int *, float *));
401
395
void            WM_jobs_kill_all(struct wmWindowManager *wm);
402
396
void            WM_jobs_kill_all_except(struct wmWindowManager *wm, void *owner);
403
 
void            WM_jobs_kill_type(struct wmWindowManager *wm, int job_type);
 
397
void            WM_jobs_kill_type(struct wmWindowManager *wm, void *owner, int job_type);
404
398
 
405
399
int                     WM_jobs_has_running(struct wmWindowManager *wm);
406
400