diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 01:46:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 01:46:35 +0400 |
commit | cfb160c764b2bc65755b73ca42a60f7a5572e4f3 (patch) | |
tree | e2e3b77c1c25cede3568e8c97c1e08814fa248ad /source/blender | |
parent | 3c2b4107dee8efe3888bf7d03d64e2970db72676 (diff) |
style cleanup
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 33 | ||||
-rw-r--r-- | source/blender/imbuf/intern/rectop.c | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 13 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 28 |
4 files changed, 44 insertions, 33 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index fbcd943e13f..1adf2c891e3 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1508,7 +1508,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec y -= h; /* also a little of space to the background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); /* and draw the text. */ BLF_position(mono, x, y + y_ofs, 0.0); @@ -1524,7 +1525,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec y -= h; /* and space for background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + 0, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); BLF_position(mono, x, y + y_ofs, 0.0); BLF_draw_buffer(mono, stamp_data.note); @@ -1539,7 +1541,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec y -= h; /* and space for background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + 0, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); BLF_position(mono, x, y + y_ofs, 0.0); BLF_draw_buffer(mono, stamp_data.date); @@ -1554,7 +1557,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec y -= h; /* and space for background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + 0, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); BLF_position(mono, x, y + y_ofs, 0.0); BLF_draw_buffer(mono, stamp_data.rendertime); @@ -1568,7 +1572,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec BLF_width_and_height(mono, stamp_data.marker, &w, &h); h = h_fixed; /* extra space for background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); /* and pad the text. */ BLF_position(mono, x, y + y_ofs, 0.0); @@ -1583,7 +1588,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec BLF_width_and_height(mono, stamp_data.time, &w, &h); h = h_fixed; /* extra space for background */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + x - BUFF_MARGIN_X, y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); /* and pad the text. */ BLF_position(mono, x, y + y_ofs, 0.0); @@ -1597,7 +1603,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec BLF_width_and_height(mono, stamp_data.frame, &w, &h); h = h_fixed; /* extra space for background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); /* and pad the text. */ BLF_position(mono, x, y + y_ofs, 0.0); @@ -1611,7 +1618,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec BLF_width_and_height(mono, stamp_data.camera, &w, &h); h = h_fixed; /* extra space for background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); BLF_position(mono, x, y + y_ofs, 0.0); BLF_draw_buffer(mono, stamp_data.camera); @@ -1623,7 +1631,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec BLF_width_and_height(mono, stamp_data.cameralens, &w, &h); h = h_fixed; /* extra space for background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); BLF_position(mono, x, y + y_ofs, 0.0); BLF_draw_buffer(mono, stamp_data.cameralens); } @@ -1635,7 +1644,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec x = width - w - 2; /* extra space for background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); /* and pad the text. */ BLF_position(mono, x, y + y_ofs, 0.0); @@ -1650,7 +1660,8 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec y = height - h; /* extra space for background. */ - buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); + buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, + x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y); BLF_position(mono, x, y + y_ofs, 0.0); BLF_draw_buffer(mono, stamp_data.strip); diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index da7618ef806..d9cbbd03923 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -481,7 +481,8 @@ void IMB_rectfill(struct ImBuf *drect, const float col[4]) } -void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, const float col[4], int x1, int y1, int x2, int y2) +void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, const float col[4], + int x1, int y1, int x2, int y2) { int i, j; float a; /* alpha */ diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 55783c3b980..584790b4cda 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -37,7 +37,6 @@ * \todo document */ - /* dna-savable wmStructs here */ #include "DNA_windowmanager_types.h" #include "WM_keymap.h" @@ -83,7 +82,7 @@ void WM_check (struct bContext *C); struct wmWindow *WM_window_open (struct bContext *C, struct rcti *rect); - /* defines for 'type' WM_window_open_temp */ + /* defines for 'type' WM_window_open_temp */ #define WM_WINDOW_RENDER 0 #define WM_WINDOW_USERPREFS 1 #define WM_WINDOW_FILESEL 2 @@ -183,7 +182,7 @@ void WM_operator_free (struct wmOperator *op); void WM_operator_stack_clear(struct wmWindowManager *wm); struct wmOperatorType *WM_operatortype_find(const char *idnamem, int quiet); -struct GHashIterator *WM_operatortype_iter(void); +struct GHashIterator *WM_operatortype_iter(void); void WM_operatortype_append (void (*opfunc)(struct wmOperatorType*)); void WM_operatortype_append_ptr (void (*opfunc)(struct wmOperatorType*, void *), void *userdata); void WM_operatortype_append_macro_ptr (void (*opfunc)(struct wmOperatorType*, void *), void *userdata); @@ -311,10 +310,10 @@ struct wmJob *WM_jobs_get(struct wmWindowManager *wm, struct wmWindow *win, void int WM_jobs_test(struct wmWindowManager *wm, void *owner); float WM_jobs_progress(struct wmWindowManager *wm, void *owner); -char *WM_jobs_name(struct wmWindowManager *wm, void *owner); +char *WM_jobs_name(struct wmWindowManager *wm, void *owner); int WM_jobs_is_running(struct wmJob *); -void * WM_jobs_customdata_get(struct wmJob *); +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 *, @@ -331,8 +330,8 @@ void WM_jobs_stop_all(struct wmWindowManager *wm); int WM_jobs_has_running(struct wmWindowManager *wm); /* clipboard */ -char *WM_clipboard_text_get(int selection); -void WM_clipboard_text_set(char *buf, int selection); +char *WM_clipboard_text_get(int selection); +void WM_clipboard_text_set(char *buf, int selection); /* progress */ void WM_progress_set(struct wmWindow *win, float progress); diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 8d7dc21d95b..91f93828235 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -454,28 +454,28 @@ typedef struct wmTabletData { typedef enum { /* motion progress, for modal handlers */ P_NOT_STARTED, - P_STARTING, // <-- - P_IN_PROGRESS, // <-- only these are sent for NDOF motion - P_FINISHING, // <-- + P_STARTING, /* <-- */ + P_IN_PROGRESS, /* <-- only these are sent for NDOF motion*/ + P_FINISHING, /* <-- */ P_FINISHED - } wmProgress; +} wmProgress; typedef struct wmNDOFMotionData { /* awfully similar to GHOST_TEventNDOFMotionData... */ - // Each component normally ranges from -1 to +1, but can exceed that. - // These use blender standard view coordinates, with positive rotations being CCW about the axis. + /* Each component normally ranges from -1 to +1, but can exceed that. + * These use blender standard view coordinates, with positive rotations being CCW about the axis. */ union { - float tvec[3]; // translation + float tvec[3]; /* translation */ struct { float tx, ty, tz; }; - }; + }; union { - float rvec[3]; // rotation: + float rvec[3]; /* rotation: */ struct { float rx, ry, rz; }; - }; - // axis = (rx,ry,rz).normalized - // amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg] - float dt; // time since previous NDOF Motion event - wmProgress progress; // is this the first event, the last, or one of many in between? + }; + /* axis = (rx,ry,rz).normalized */ + /* amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg] */ + float dt; /* time since previous NDOF Motion event */ + wmProgress progress; /* is this the first event, the last, or one of many in between? */ } wmNDOFMotionData; typedef struct wmTimer { |