code cleanup: WM naming conventions
authorCampbell Barton <ideasman42@gmail.com>
Sat, 11 Aug 2012 21:35:24 +0000 (21:35 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 11 Aug 2012 21:35:24 +0000 (21:35 +0000)
30 files changed:
intern/ghost/intern/GHOST_WindowWin32.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/mesh/editface.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_modifier.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/physics/physics_pointcache.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_preview.c
source/blender/editors/screen/screendump.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_view3d/drawobject.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_apple.c
source/blender/windowmanager/intern/wm_cursors.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_jobs.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_subwindow.c
source/blender/windowmanager/intern/wm_window.c
source/creator/creator.c

index 28ba470f75a30f5f8c31812546e81f48b10634ae..cf5a7fe808d4742f87adbb52534cd00950d3acbd 100644 (file)
@@ -344,7 +344,7 @@ protected:
        static HDC s_firstHDC;
        /** Flag for if window has captured the mouse */
        bool m_hasMouseCaptured;
-       /** Flag if an operator grabs the mouse with WM_cursor_grab/ungrab() 
+       /** Flag if an operator grabs the mouse with WM_cursor_grab_enable/ungrab() 
         * Multiple grabs must be realesed with a single ungrab*/
        bool m_hasGrabMouse;
        /** Count of number of pressed buttons */
index ce9e63076fb0d69ea1b153b5fc7e264c056db014..76445bc50851ca16b87317d3458164f48187db9b 100644 (file)
@@ -5222,13 +5222,13 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
        /* number editing */
        if (state == BUTTON_STATE_NUM_EDITING) {
                if (ui_is_a_warp_but(but))
-                       WM_cursor_grab(CTX_wm_window(C), TRUE, TRUE, NULL);
+                       WM_cursor_grab_enable(CTX_wm_window(C), TRUE, TRUE, NULL);
                ui_numedit_begin(but, data);
        }
        else if (data->state == BUTTON_STATE_NUM_EDITING) {
                ui_numedit_end(but, data);
                if (ui_is_a_warp_but(but))
-                       WM_cursor_ungrab(CTX_wm_window(C));
+                       WM_cursor_grab_disable(CTX_wm_window(C));
        }
        /* menu open */
        if (state == BUTTON_STATE_MENU_OPEN)
index bce69cb7d1d4a824d8469915799b48d7a84c82b1..62600c7fe6b15344eda6ecde8fe1f59fee118b14 100644 (file)
@@ -521,7 +521,7 @@ int paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], in
        if (!facesel_face_pick(C, me, ob, mval, &index, 1))
                return 0;
        
-       if (index >= me->totpoly || index < 0)
+       if (index >= me->totpoly)
                return 0;
 
        mpoly_sel = me->mpoly + index;
index 2e28db8ad8eed4227261291b9727d917d472127d..c3093259fd84b885187210c9d04ad433d4f1e214 100644 (file)
@@ -1256,7 +1256,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op)
 
        /* setup job */
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Multires Bake", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS);
-       WM_jobs_customdata(steve, bkr, multiresbake_freejob);
+       WM_jobs_customdata_set(steve, bkr, multiresbake_freejob);
        WM_jobs_timer(steve, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
        WM_jobs_callbacks(steve, multiresbake_startjob, NULL, NULL, NULL);
 
@@ -1483,7 +1483,7 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
 
                        /* setup job */
                        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Texture Bake", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS);
-                       WM_jobs_customdata(steve, bkr, bake_freejob);
+                       WM_jobs_customdata_set(steve, bkr, bake_freejob);
                        WM_jobs_timer(steve, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
                        WM_jobs_callbacks(steve, bake_startjob, NULL, bake_update, NULL);
 
index b47269097fbde5a1062dd90f95669387b6d6b5d8..2bace9c30d49ad52fea2ac8265777c5f85f929cd 100644 (file)
@@ -2187,7 +2187,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
        oj->och = och;
        oj->omd = omd;
        
-       WM_jobs_customdata(steve, oj, oceanbake_free);
+       WM_jobs_customdata_set(steve, oj, oceanbake_free);
        WM_jobs_timer(steve, 0.1, NC_OBJECT | ND_MODIFIER, NC_OBJECT | ND_MODIFIER);
        WM_jobs_callbacks(steve, oceanbake_startjob, NULL, NULL, oceanbake_endjob);
        
index bc09df734a61e2427f6bc04b814e40cbc7264f9b..70fe87e5c01e366158dfd9340306a26a7006219e 100644 (file)
@@ -299,7 +299,7 @@ static int dynamicPaint_bakeImageSequence(bContext *C, DynamicPaintSurface *surf
                if (blender_test_break()) return 0;
 
                /* Update progress bar cursor */
-               WM_timecursor(win, (int)progress);
+               WM_cursor_time(win, (int)progress);
 
                /* calculate a frame */
                scene->r.cfra = (int)frame;
index 1c4a4314d45cf669c9263b50da3e8933d55a4380..10a76825984c3610b7a676bd624c799fb434cbe4 100644 (file)
@@ -1071,7 +1071,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
                wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Fluid Simulation", WM_JOB_PROGRESS);
 
                /* setup job */
-               WM_jobs_customdata(steve, fb, fluidbake_free);
+               WM_jobs_customdata_set(steve, fb, fluidbake_free);
                WM_jobs_timer(steve, 0.1, NC_SCENE|ND_FRAME, NC_SCENE|ND_FRAME);
                WM_jobs_callbacks(steve, fluidbake_startjob, NULL, NULL, fluidbake_endjob);
 
index 6e772f66a6a9e19fde644c9d20fd7d87956ffa8a..218ae628d3ff061db5cf29742116c2946fcabbca 100644 (file)
@@ -111,7 +111,7 @@ static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
         * and pointcache baking will be reimplemented with
         * the job system soon anyways. */
        if (win) {
-               baker.progressbar = (void (*)(void *, int))WM_timecursor;
+               baker.progressbar = (void (*)(void *, int))WM_cursor_time;
                baker.progressend = (void (*)(void *))WM_cursor_restore;
                baker.progresscontext = win;
        }
@@ -215,7 +215,7 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
         * and pointcache baking will be reimplemented with
         * the job system soon anyways. */
        if (win) {
-               baker.progressbar = (void (*)(void *, int))WM_timecursor;
+               baker.progressbar = (void (*)(void *, int))WM_cursor_time;
                baker.progressend = (void (*)(void *))WM_cursor_restore;
                baker.progresscontext = win;
        }
index 8a61af6123944fff7166852adf3b74b7b86299cc..ae1b82c6690aede336c8d221b46c73e75047335b 100644 (file)
@@ -565,7 +565,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
        else name = "Render";
 
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, name, jobflag);
-       WM_jobs_customdata(steve, rj, render_freejob);
+       WM_jobs_customdata_set(steve, rj, render_freejob);
        WM_jobs_timer(steve, 0.2, NC_SCENE | ND_RENDER_RESULT, 0);
        WM_jobs_callbacks(steve, render_startjob, NULL, NULL, render_endjob);
 
index c7f48154970aec2a3d9a15bc3b40f6b181e3856c..03906c99c7463055920b3efa03a4dfab71ffc4f1 100644 (file)
@@ -1031,7 +1031,7 @@ void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *r
        ip = MEM_callocN(sizeof(IconPreview), "icon preview");
 
        /* render all resolutions from suspended job too */
-       old_ip = WM_jobs_get_customdata(steve);
+       old_ip = WM_jobs_customdata_get(steve);
        if (old_ip)
                BLI_movelisttolist(&ip->sizes, &old_ip->sizes);
 
@@ -1043,7 +1043,7 @@ void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *r
        icon_preview_add_size(ip, rect, sizex, sizey);
 
        /* setup job */
-       WM_jobs_customdata(steve, ip, icon_preview_free);
+       WM_jobs_customdata_set(steve, ip, icon_preview_free);
        WM_jobs_timer(steve, 0.25, NC_MATERIAL, NC_MATERIAL);
        WM_jobs_callbacks(steve, icon_preview_startjob_all_sizes, NULL, NULL, icon_preview_endjob);
 
@@ -1072,7 +1072,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M
        else sp->col[0] = sp->col[1] = sp->col[2] = sp->col[3] = 1.0f;
        
        /* setup job */
-       WM_jobs_customdata(steve, sp, shader_preview_free);
+       WM_jobs_customdata_set(steve, sp, shader_preview_free);
        WM_jobs_timer(steve, 0.1, NC_MATERIAL, NC_MATERIAL);
        WM_jobs_callbacks(steve, common_preview_startjob, NULL, shader_preview_updatejob, NULL);
        
index 79ff516b3626a11374264b1a1cefd30dbf0358d3..166a4943db0281e11800b9e427a22cb5b25939da 100644 (file)
@@ -420,7 +420,7 @@ static int screencast_exec(bContext *C, wmOperator *op)
        BKE_reports_init(&sj->reports, RPT_PRINT);
 
        /* setup job */
-       WM_jobs_customdata(steve, sj, screenshot_freejob);
+       WM_jobs_customdata_set(steve, sj, screenshot_freejob);
        WM_jobs_timer(steve, 0.1, 0, NC_SCREEN | ND_SCREENCAST);
        WM_jobs_callbacks(steve, screenshot_startjob, NULL, screenshot_updatejob, NULL);
        
index 2313b1760730875eb66e150baf22da0bddabad3b..b8657f9e688bc88c4591be183587027654095ed8 100644 (file)
@@ -1054,7 +1054,7 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
                                        clip->proxy.build_size_flag, clip->proxy.quality);
        }
 
-       WM_jobs_customdata(steve, pj, proxy_freejob);
+       WM_jobs_customdata_set(steve, pj, proxy_freejob);
        WM_jobs_timer(steve, 0.2, NC_MOVIECLIP | ND_DISPLAY, 0);
        WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob);
 
index 4283c6f77c792d77f5fbf98d157e3a64d8c39f38..bf0a6617e2b1c5b3ea2a3163f784d96db1c65e0a 100644 (file)
@@ -1262,7 +1262,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
 
        /* setup job */
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Track Markers", WM_JOB_PROGRESS);
-       WM_jobs_customdata(steve, tmj, track_markers_freejob);
+       WM_jobs_customdata_set(steve, tmj, track_markers_freejob);
 
        /* if there's delay set in tracking job, tracking should happen
         * with fixed FPS. To deal with editor refresh we have to synchronize
@@ -1493,7 +1493,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
 
        /* setup job */
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Solve Camera", WM_JOB_PROGRESS);
-       WM_jobs_customdata(steve, scj, solve_camera_freejob);
+       WM_jobs_customdata_set(steve, scj, solve_camera_freejob);
        WM_jobs_timer(steve, 0.1, NC_MOVIECLIP | NA_EVALUATED, 0);
        WM_jobs_callbacks(steve, solve_camera_startjob, NULL, solve_camera_updatejob, NULL);
 
index 2a99e479a46e2113f16add1ecab5e16a2cd1ed7f..27db7907e30834e5063cea7c3fa5ed7e45822bf3 100644 (file)
@@ -1369,7 +1369,7 @@ void thumbnails_start(struct FileList *filelist, const struct bContext *C)
 
        /* setup job */
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), filelist, "Thumbnails", 0);
-       WM_jobs_customdata(steve, tj, thumbnails_free);
+       WM_jobs_customdata_set(steve, tj, thumbnails_free);
        WM_jobs_timer(steve, 0.5, NC_WINDOW, NC_WINDOW);
        WM_jobs_callbacks(steve, thumbnails_startjob, NULL, thumbnails_update, NULL);
 
index 38a2e9725ff85cbbfaaba49dc008c1ee60aff4e8..1f9a60898f659a32c62bac9d2896806b5f36441c 100644 (file)
@@ -2252,7 +2252,7 @@ static int image_record_composite_apply(bContext *C, wmOperator *op)
        Scene *scene = CTX_data_scene(C);
        ImBuf *ibuf;
        
-       WM_timecursor(CTX_wm_window(C), scene->r.cfra);
+       WM_cursor_time(CTX_wm_window(C), scene->r.cfra);
 
        // XXX scene->nodetree->test_break= blender_test_break;
        // XXX scene->nodetree->test_break= NULL;
index 11f070b483dd82bd022b9e5443814ebb806231f0..60375e9ab029001ce6e99f06240b50e97e2b50b4 100644 (file)
@@ -189,7 +189,7 @@ void ED_node_composite_job(const bContext *C, struct bNodeTree *nodetree, Scene
        cj->ntree = nodetree;
 
        /* setup job */
-       WM_jobs_customdata(steve, cj, compo_freejob);
+       WM_jobs_customdata_set(steve, cj, compo_freejob);
        WM_jobs_timer(steve, 0.1, NC_SCENE, NC_SCENE | ND_COMPO_RESULT);
        WM_jobs_callbacks(steve, compo_startjob, compo_initjob, compo_updatejob, NULL);
 
index 7cc6e279ff2c6f37bb0be454ef6b7ca9bdfc83e1..b4832306daf51a076f078dccb3397601391dd364 100644 (file)
@@ -188,7 +188,7 @@ static void seq_proxy_build_job(const bContext *C)
 
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Building Proxies", WM_JOB_PROGRESS);
 
-       pj = WM_jobs_get_customdata(steve);
+       pj = WM_jobs_customdata_get(steve);
 
        if (!pj) {
                pj = MEM_callocN(sizeof(ProxyJob), "proxy rebuild job");
@@ -196,7 +196,7 @@ static void seq_proxy_build_job(const bContext *C)
                pj->scene = scene;
                pj->main = CTX_data_main(C);
 
-               WM_jobs_customdata(steve, pj, proxy_freejob);
+               WM_jobs_customdata_set(steve, pj, proxy_freejob);
                WM_jobs_timer(steve, 0.1, NC_SCENE | ND_SEQUENCER, NC_SCENE | ND_SEQUENCER);
                WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob);
        }
index 3803ac6593af432f02fc2fcfa52258345fdf0aa2..173bff61be67005da658beacfedf0d92669c38f3 100644 (file)
@@ -7277,7 +7277,7 @@ static void bbs_obmode_mesh_verts__mapFunc(void *userData, int index, const floa
        int offset = (intptr_t) data->offset;
 
        if (!(mv->flag & ME_HIDE)) {
-               WM_set_framebuffer_index_color(offset + index);
+               WM_framebuffer_index_set(offset + index);
                bglVertex3fv(co);
        }
 }
@@ -7304,7 +7304,7 @@ static void bbs_mesh_verts__mapFunc(void *userData, int index, const float co[3]
        BMVert *eve = EDBM_vert_at_index(ptrs[1], index);
 
        if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
-               WM_set_framebuffer_index_color(offset + index);
+               WM_framebuffer_index_set(offset + index);
                bglVertex3fv(co);
        }
 }
@@ -7326,7 +7326,7 @@ static DMDrawOption bbs_mesh_wire__setDrawOptions(void *userData, int index)
        BMEdge *eed = EDBM_edge_at_index(ptrs[1], index);
 
        if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
-               WM_set_framebuffer_index_color(offset + index);
+               WM_framebuffer_index_set(offset + index);
                return DM_DRAW_OPTION_NORMAL;
        }
        else {
@@ -7345,7 +7345,7 @@ static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int inde
        
        if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
                if (((void **)userData)[1]) {
-                       WM_set_framebuffer_index_color(index + 1);
+                       WM_framebuffer_index_set(index + 1);
                }
                return DM_DRAW_OPTION_NORMAL;
        }
@@ -7359,7 +7359,7 @@ static void bbs_mesh_solid__drawCenter(void *userData, int index, const float ce
        BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index);
 
        if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
-               WM_set_framebuffer_index_color(index + 1);
+               WM_framebuffer_index_set(index + 1);
 
                bglVertex3fv(cent);
        }
@@ -7392,7 +7392,7 @@ static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d,
 
 static DMDrawOption bbs_mesh_solid__setDrawOpts(void *UNUSED(userData), int index)
 {
-       WM_set_framebuffer_index_color(index + 1);
+       WM_framebuffer_index_set(index + 1);
        return DM_DRAW_OPTION_NORMAL;
 }
 
@@ -7401,7 +7401,7 @@ static DMDrawOption bbs_mesh_solid_hide__setDrawOpts(void *userData, int index)
        Mesh *me = userData;
 
        if (!(me->mpoly[index].flag & ME_HIDE)) {
-               WM_set_framebuffer_index_color(index + 1);
+               WM_framebuffer_index_set(index + 1);
                return DM_DRAW_OPTION_NORMAL;
        }
        else {
@@ -7409,7 +7409,7 @@ static DMDrawOption bbs_mesh_solid_hide__setDrawOpts(void *userData, int index)
        }
 }
 
-/* must have called WM_set_framebuffer_index_color beforehand */
+/* must have called WM_framebuffer_index_set beforehand */
 static DMDrawOption bbs_mesh_solid_hide2__setDrawOpts(void *userData, int index)
 {
        Mesh *me = userData;
index ee7b44fb1e92fa5d96f37c9c2051fa7b0fdd08c4..7a6c53a7d0113b066985b0d00b89a935945aa14b 100644 (file)
@@ -37,6 +37,7 @@
  *  \todo document
  */
 
+
 /* dna-savable wmStructs here */
 #include "DNA_windowmanager_types.h"
 #include "WM_keymap.h"
@@ -66,8 +67,8 @@ typedef struct wmJob wmJob;
 
 /* general API */
 void           WM_setprefsize          (int stax, int stay, int sizx, int sizy);
-void           WM_setinitialstate_fullscreen(void);
-void           WM_setinitialstate_normal(void);
+void           WM_init_state_fullscreen_set(void);
+void           WM_init_state_normal_set(void);
 
 void           WM_init                         (struct bContext *C, int argc, const char **argv);
 void           WM_exit_ext                     (struct bContext *C, const short do_python);
@@ -92,21 +93,21 @@ void                WM_window_open_temp     (struct bContext *C, struct rcti *position, int type);
 
 
                        /* files */
-int                    WM_read_homefile_exec(struct bContext *C, struct wmOperator *op);
-int                    WM_read_homefile        (struct bContext *C, struct ReportList *reports, short from_memory);
-int                    WM_write_homefile       (struct bContext *C, struct wmOperator *op);
-void           WM_read_file            (struct bContext *C, const char *filepath, struct ReportList *reports);
-int                    WM_write_file           (struct bContext *C, const char *target, int fileflags, struct ReportList *reports, int copy);
-void           WM_autosave_init        (struct wmWindowManager *wm);
+int                    WM_homefile_read_exec(struct bContext *C, struct wmOperator *op);
+int                    WM_homefile_read(struct bContext *C, struct ReportList *reports, short from_memory);
+int                    WM_homefile_write_exec(struct bContext *C, struct wmOperator *op);
+void           WM_file_read(struct bContext *C, const char *filepath, struct ReportList *reports);
+int                    WM_file_write(struct bContext *C, const char *target, int fileflags, struct ReportList *reports, int copy);
+void           WM_autosave_init(struct wmWindowManager *wm);
 
                        /* mouse cursors */
 void           WM_cursor_set           (struct wmWindow *win, int curs);
 void           WM_cursor_modal         (struct wmWindow *win, int curs);
 void           WM_cursor_restore       (struct wmWindow *win);
 void           WM_cursor_wait          (int val);
-void           WM_cursor_grab(struct wmWindow *win, int wrap, int hide, int *bounds);
-void           WM_cursor_ungrab(struct wmWindow *win);
-void           WM_timecursor           (struct wmWindow *win, int nr);
+void           WM_cursor_grab_enable(struct wmWindow *win, int wrap, int hide, int *bounds);
+void           WM_cursor_grab_disable(struct wmWindow *win);
+void           WM_cursor_time          (struct wmWindow *win, int nr);
 
 void           *WM_paint_cursor_activate(struct wmWindowManager *wm,
                                       int (*poll)(struct bContext *C),
@@ -243,11 +244,11 @@ void              WM_operator_bl_idname(char *to, const char *from);
 void           WM_operator_py_idname(char *to, const char *from);
 
 /* *************** menu types ******************** */
-void                           WM_menutype_init(void);
-struct MenuType                *WM_menutype_find(const char *idname, int quiet);
-int                                    WM_menutype_add(struct MenuType* mt);
-void                           WM_menutype_freelink(struct MenuType* mt);
-void                           WM_menutype_free(void);
+void                WM_menutype_init(void);
+struct MenuType    *WM_menutype_find(const char *idname, int quiet);
+int                 WM_menutype_add(struct MenuType* mt);
+void                WM_menutype_freelink(struct MenuType* mt);
+void                WM_menutype_free(void);
 
                        /* default operator callbacks for border/circle/lasso */
 int                    WM_border_select_invoke (struct bContext *C, struct wmOperator *op, struct wmEvent *event);
@@ -297,7 +298,7 @@ void                wmOrtho                         (float x1, float x2, float y1, float y2, float n, float f);
 void           wmOrtho2                        (float x1, float x2, float y1, float y2);
 
                        /* utilities */
-void           WM_set_framebuffer_index_color(int index);
+void           WM_framebuffer_index_set(int index);
 int                    WM_framebuffer_to_index(unsigned int col);
 
                        /* threaded Jobs Manager */
@@ -313,8 +314,8 @@ float               WM_jobs_progress(struct wmWindowManager *wm, void *owner);
 char           *WM_jobs_name(struct wmWindowManager *wm, void *owner);
 
 int         WM_jobs_is_running(struct wmJob *);
-void *      WM_jobs_get_customdata(struct wmJob *);
-void        WM_jobs_customdata(struct wmJob *, void *customdata, void (*free)(void *));
+void *      WM_jobs_customdata_get(struct wmJob *);
+void        WM_jobs_customdata_set(struct wmJob *, void *customdata, void (*free)(void *));
 void        WM_jobs_timer(struct wmJob *, double timestep, unsigned int note, unsigned int endnote);
 void        WM_jobs_callbacks(struct wmJob *,
                               void (*startjob)(void *, short *, short *, float *),
index 43435ce67e9c8a4397c7443891ad6dcc1132f7df..8d7dc21d95bd4800590ffa92984d0a752d4c4076 100644 (file)
@@ -28,6 +28,9 @@
  *  \ingroup wm
  */
 
+#ifndef __WM_TYPES_H__
+#define __WM_TYPES_H__
+
 /*
  * Overview of WM structs
  * ======================
@@ -95,9 +98,6 @@
  *
  */
 
-#ifndef __WM_TYPES_H__
-#define __WM_TYPES_H__
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 71d074e340fc1928e955c4461ee16bf8cea984ea..a7bd43986dd701dd105fa0e68d01f87faa63faa5 100644 (file)
@@ -124,14 +124,14 @@ void wm_set_apple_prefsize(int scr_x, int scr_y)
                short top, left, bottom, right;
                
                getMacAvailableBounds(&top, &left, &bottom, &right);
-               WM_setprefsize(left + 10, scr_y - bottom + 10, right - left - 20, bottom - 64);
+               WM_init_state_size_set(left + 10, scr_y - bottom + 10, right - left - 20, bottom - 64);
                G.windowstate = 0;
                
        }
        else {
                
                /* 40 + 684 + (headers) 22 + 22 = 768, the powerbook screen height */
-               WM_setprefsize(120, 40, 850, 684);
+               WM_init_state_size_set(120, 40, 850, 684);
                G.windowstate = 0;
        }
 }
index bb985802e23ec03c66aafbee614f6209584f8519..6fc6a57ade1526d83817930fedbd012badb37858 100644 (file)
@@ -179,7 +179,7 @@ void WM_cursor_wait(int val)
        }
 }
 
-void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds)
+void WM_cursor_grab_enable(wmWindow *win, int wrap, int hide, int *bounds)
 {
        /* Only grab cursor when not running debug.
         * It helps not to get a stuck WM when hitting a breakpoint  
@@ -202,7 +202,7 @@ void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds)
        }
 }
 
-void WM_cursor_ungrab(wmWindow *win)
+void WM_cursor_grab_disable(wmWindow *win)
 {
        if ((G.debug & G_DEBUG) == 0) {
                if (win && win->ghostwin) {
@@ -239,7 +239,7 @@ int wm_cursor_arrow_move(wmWindow *win, wmEvent *event)
 
 
 /* afer this you can call restore too */
-void WM_timecursor(wmWindow *win, int nr)
+void WM_cursor_time(wmWindow *win, int nr)
 {
        /* 10 8x8 digits */
        static char number_bitmaps[10][8] = {
index e3ad425d0f8b9af98048ffede82357c02b550698..10a383df5c947c30d6f2499fc3454c093611f0b8 100644 (file)
@@ -938,7 +938,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event,
                                        }
                                }
 
-                               WM_cursor_grab(CTX_wm_window(C), wrap, FALSE, bounds);
+                               WM_cursor_grab_enable(CTX_wm_window(C), wrap, FALSE, bounds);
                        }
 
                        /* cancel UI handlers, typically tooltips that can hang around
@@ -1202,7 +1202,7 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers)
                                CTX_wm_region_set(C, region);
                        }
 
-                       WM_cursor_ungrab(CTX_wm_window(C));
+                       WM_cursor_grab_disable(CTX_wm_window(C));
                        WM_operator_free(handler->op);
                }
                else if (handler->ui_remove) {
@@ -1432,7 +1432,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
 
                                /* remove modal handler, operator itself should have been canceled and freed */
                                if (retval & (OPERATOR_CANCELLED | OPERATOR_FINISHED)) {
-                                       WM_cursor_ungrab(CTX_wm_window(C));
+                                       WM_cursor_grab_disable(CTX_wm_window(C));
 
                                        BLI_remlink(handlers, handler);
                                        wm_event_free_handler(handler);
index d4b55677af1a9cc0c77fef883f22d13e754ec479..660117de9f74af1626246750881daa8782f18e2b 100644 (file)
@@ -356,7 +356,7 @@ static int wm_read_exotic(Scene *UNUSED(scene), const char *name)
        return retval;
 }
 
-void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
+void WM_file_read(bContext *C, const char *filepath, ReportList *reports)
 {
        int retval;
 
@@ -485,7 +485,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
 /* called on startup,  (context entirely filled with NULLs) */
 /* or called for 'New File' */
 /* op can be NULL */
-int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory)
+int WM_homefile_read(bContext *C, ReportList *UNUSED(reports), short from_memory)
 {
        ListBase wmbase;
        char tstr[FILE_MAX];
@@ -580,10 +580,10 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory
        return TRUE;
 }
 
-int WM_read_homefile_exec(bContext *C, wmOperator *op)
+int WM_homefile_read_exec(bContext *C, wmOperator *op)
 {
        int from_memory = strcmp(op->type->idname, "WM_OT_read_factory_settings") == 0;
-       return WM_read_homefile(C, op->reports, from_memory) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
+       return WM_homefile_read(C, op->reports, from_memory) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
 }
 
 void WM_read_history(void)
@@ -758,7 +758,7 @@ int write_crash_blend(void)
        }
 }
 
-int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *reports, int copy)
+int WM_file_write(bContext *C, const char *target, int fileflags, ReportList *reports, int copy)
 {
        Library *li;
        int len;
@@ -857,7 +857,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re
 }
 
 /* operator entry */
-int WM_write_homefile(bContext *C, wmOperator *op)
+int WM_homefile_write_exec(bContext *C, wmOperator *op)
 {
        wmWindowManager *wm = CTX_wm_manager(C);
        wmWindow *win = CTX_wm_window(C);
@@ -995,6 +995,6 @@ void wm_autosave_read(bContext *C, ReportList *reports)
        char filename[FILE_MAX];
 
        wm_autosave_location(filename);
-       WM_read_file(C, filename, reports);
+       WM_file_read(C, filename, reports);
 }
 
index 8ea644d6e5c7496d8810a753b91cafc55ecddc3e..ac9b44fddb0a1f6d30477ce7c8da33969f6263b0 100644 (file)
@@ -152,7 +152,7 @@ void WM_init(bContext *C, int argc, const char **argv)
        BLI_init_srgb_conversion();
 
        /* get the default database, plus a wm */
-       WM_read_homefile(C, NULL, G.factory_startup);
+       WM_homefile_read(C, NULL, G.factory_startup);
 
        BLF_lang_set(NULL);
 
@@ -161,7 +161,7 @@ void WM_init(bContext *C, int argc, const char **argv)
         * initializing space types and other internal data.
         *
         * However cant redo this at the moment. Solution is to load python
-        * before WM_read_homefile() or make py-drivers check if python is running.
+        * before WM_homefile_read() or make py-drivers check if python is running.
         * Will try fix when the crash can be repeated. - campbell. */
 
 #ifdef WITH_PYTHON
index bd7b4694471525dfa498bcd58891de5a0aec8748..ce0c7e134544c45666624caa49a31466f3f6a9c3 100644 (file)
@@ -209,7 +209,7 @@ int WM_jobs_is_running(wmJob *steve)
        return steve->running;
 }
 
-void *WM_jobs_get_customdata(wmJob *steve)
+void *WM_jobs_customdata_get(wmJob *steve)
 {
        if (!steve->customdata) {
                return steve->run_customdata;
@@ -219,7 +219,7 @@ void *WM_jobs_get_customdata(wmJob *steve)
        }
 }
 
-void WM_jobs_customdata(wmJob *steve, void *customdata, void (*free)(void *))
+void WM_jobs_customdata_set(wmJob *steve, void *customdata, void (*free)(void *))
 {
        /* pending job? just free */
        if (steve->customdata)
index 52436b6564ceb530e30be3a46da5241625a4a748..59e0614b18aa5cbe3e6c7c2ff18d351e6a4a9b04 100644 (file)
@@ -326,7 +326,7 @@ static int wm_macro_modal(bContext *C, wmOperator *op, wmEvent *event)
                                                }
                                        }
 
-                                       WM_cursor_grab(CTX_wm_window(C), wrap, FALSE, bounds);
+                                       WM_cursor_grab_enable(CTX_wm_window(C), wrap, FALSE, bounds);
                                }
                        }
                }
@@ -1575,7 +1575,7 @@ static void WM_OT_save_homefile(wmOperatorType *ot)
        ot->description = "Make the current file the default .blend file";
                
        ot->invoke = WM_operator_confirm;
-       ot->exec = WM_write_homefile;
+       ot->exec = WM_homefile_write_exec;
        ot->poll = WM_operator_winactive;
 }
 
@@ -1586,7 +1586,7 @@ static void WM_OT_read_homefile(wmOperatorType *ot)
        ot->description = "Open the default file (doesn't save the current file)";
        
        ot->invoke = WM_operator_confirm;
-       ot->exec = WM_read_homefile_exec;
+       ot->exec = WM_homefile_read_exec;
        /* ommit poll to run in background mode */
 }
 
@@ -1597,7 +1597,7 @@ static void WM_OT_read_factory_settings(wmOperatorType *ot)
        ot->description = "Load default file and user preferences";
        
        ot->invoke = WM_operator_confirm;
-       ot->exec = WM_read_homefile_exec;
+       ot->exec = WM_homefile_read_exec;
        /* ommit poll to run in background mode */
 }
 
@@ -1664,11 +1664,11 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op)
        else
                G.f &= ~G_SCRIPT_AUTOEXEC;
        
-       /* XXX wm in context is not set correctly after WM_read_file -> crash */
+       /* XXX wm in context is not set correctly after WM_file_read -> crash */
        /* do it before for now, but is this correct with multiple windows? */
        WM_event_add_notifier(C, NC_WINDOW, NULL);
 
-       WM_read_file(C, path, op->reports);
+       WM_file_read(C, path, op->reports);
        
        return OPERATOR_FINISHED;
 }
@@ -1895,13 +1895,13 @@ static int wm_recover_last_session_exec(bContext *C, wmOperator *op)
 
        G.fileflags |= G_FILE_RECOVER;
 
-       /* XXX wm in context is not set correctly after WM_read_file -> crash */
+       /* XXX wm in context is not set correctly after WM_file_read -> crash */
        /* do it before for now, but is this correct with multiple windows? */
        WM_event_add_notifier(C, NC_WINDOW, NULL);
 
        /* load file */
        BLI_make_file_string("/", filename, BLI_temporary_dir(), "quit.blend");
-       WM_read_file(C, filename, op->reports);
+       WM_file_read(C, filename, op->reports);
 
        G.fileflags &= ~G_FILE_RECOVER;
        return OPERATOR_FINISHED;
@@ -1927,12 +1927,12 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op)
 
        G.fileflags |= G_FILE_RECOVER;
 
-       /* XXX wm in context is not set correctly after WM_read_file -> crash */
+       /* XXX wm in context is not set correctly after WM_file_read -> crash */
        /* do it before for now, but is this correct with multiple windows? */
        WM_event_add_notifier(C, NC_WINDOW, NULL);
 
        /* load file */
-       WM_read_file(C, path, op->reports);
+       WM_file_read(C, path, op->reports);
 
        G.fileflags &= ~G_FILE_RECOVER;
 
@@ -2047,7 +2047,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
        }
 #endif
 
-       if (WM_write_file(C, path, fileflags, op->reports, copy) != 0)
+       if (WM_file_write(C, path, fileflags, op->reports, copy) != 0)
                return OPERATOR_CANCELLED;
 
        WM_event_add_notifier(C, NC_WM | ND_FILESAVE, NULL);
index 529910d220ee58e78e6e5165d196f369b9f43a13..c9fb2644cfa947dcaca48092d07f32d78d3a2069 100644 (file)
@@ -376,7 +376,7 @@ unsigned int index_to_framebuffer(int index)
 
 #endif
 
-void WM_set_framebuffer_index_color(int index)
+void WM_framebuffer_index_set(int index)
 {
        const int col = index_to_framebuffer(index);
        cpack(col);
index 28e50f1655e9bdd448119860c1150fc4cc87fabe..c2aa99352e953220da33d1a63093fdea0d29b41c 100644 (file)
@@ -1202,7 +1202,7 @@ void wm_get_cursor_position(wmWindow *win, int *x, int *y)
 
 
 /* called whem no ghost system was initialized */
-void WM_setprefsize(int stax, int stay, int sizx, int sizy)
+void WM_init_state_size_set(int stax, int stay, int sizx, int sizy)
 {
        wm_init_state.start_x = stax; /* left hand pos */
        wm_init_state.start_y = stay; /* bottom pos */
@@ -1212,13 +1212,13 @@ void WM_setprefsize(int stax, int stay, int sizx, int sizy)
 }
 
 /* for borderless and border windows set from command-line */
-void WM_setinitialstate_fullscreen(void)
+void WM_init_state_fullscreen_set(void)
 {
        wm_init_state.windowstate = GHOST_kWindowStateFullScreen;
        wm_init_state.override_flag |= WIN_OVERRIDE_WINSTATE;
 }
 
-void WM_setinitialstate_normal(void)
+void WM_init_state_normal_set(void)
 {
        wm_init_state.windowstate = GHOST_kWindowStateNormal;
        wm_init_state.override_flag |= WIN_OVERRIDE_WINSTATE;
index 26e5e16af48629c02e80b492cee8c2cd787b1a9f..3e884d1aa38f65ccd569b65e57014a2a7953e8cb 100644 (file)
@@ -480,20 +480,20 @@ static int prefsize(int argc, const char **argv, void *UNUSED(data))
        sizx = atoi(argv[3]);
        sizy = atoi(argv[4]);
 
-       WM_setprefsize(stax, stay, sizx, sizy);
+       WM_init_state_size_set(stax, stay, sizx, sizy);
 
        return 4;
 }
 
 static int with_borders(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
 {
-       WM_setinitialstate_normal();
+       WM_init_state_normal_set();
        return 0;
 }
 
 static int without_borders(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
 {
-       WM_setinitialstate_fullscreen();
+       WM_init_state_fullscreen_set();
        return 0;
 }
 
@@ -1029,7 +1029,7 @@ static int load_file(int UNUSED(argc), const char **argv, void *data)
                        return -1;
                }
 
-               /* WM_read_file() runs normally but since we're in background mode do here */
+               /* WM_file_read() runs normally but since we're in background mode do here */
 #ifdef WITH_PYTHON
                /* run any texts that were loaded in and flagged as modules */
                BPY_driver_reset();
@@ -1046,7 +1046,7 @@ static int load_file(int UNUSED(argc), const char **argv, void *data)
                 * a file - this should do everything a 'load file' does */
                ReportList reports;
                BKE_reports_init(&reports, RPT_PRINT);
-               WM_read_file(C, filename, &reports);
+               WM_file_read(C, filename, &reports);
                BKE_reports_clear(&reports);
        }