Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-03-03 20:31:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-03 20:31:46 +0400
commita2c182e9233333fc3b8ff40d352113ec95e7e30c (patch)
tree37a9e08f4e6c4bf794aa0c8c15af875299db4a1b /source/blender/editors/screen
parent86cec98f9e1523ed41b67ef998174289dbae9b83 (diff)
style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide).
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/area.c12
-rw-r--r--source/blender/editors/screen/glutil.c31
-rw-r--r--source/blender/editors/screen/screen_edit.c19
-rw-r--r--source/blender/editors/screen/screen_ops.c281
4 files changed, 170 insertions, 173 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index e4088fe10c4..6f846b82c5f 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -496,9 +496,9 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
}
/* **********************************
- maybe silly, but let's try for now
- to keep these tags protected
- ********************************** */
+ * maybe silly, but let's try for now
+ * to keep these tags protected
+ * ********************************** */
void ED_region_tag_redraw(ARegion *ar)
{
@@ -658,8 +658,8 @@ static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
int tot=0;
/* count how many actionzones with along same edge are available.
- This allows for adding more action zones in the future without
- having to worry about correct offset */
+ * This allows for adding more action zones in the future without
+ * having to worry about correct offset */
for(azt= sa->actionzones.first; azt; azt= azt->next) {
if(azt->edge == az->edge) tot++;
}
@@ -1432,7 +1432,7 @@ void ED_area_prevspace(bContext *C, ScrArea *sa)
if(sl->next) {
/* workaround for case of double prevspace, render window
- with a file browser on top of it */
+ * with a file browser on top of it */
if(sl->next->spacetype == SPACE_FILE && sl->next->next)
ED_area_newspace(C, sa, sl->next->next->spacetype);
else
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 918df2f90e0..2608e9e3482 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -73,10 +73,11 @@ GLubyte stipple_halftone[128] = {
/* repeat this pattern
- X000X000
- 00000000
- 00X000X0
- 00000000 */
+ *
+ * X000X000
+ * 00000000
+ * 00X000X0
+ * 00000000 */
GLubyte stipple_quarttone[128] = {
@@ -148,8 +149,10 @@ void fdrawbezier(float vec[4][3])
glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, vec[0]);
glBegin(GL_LINE_STRIP);
while (spline_step < 1.000001f) {
- /*if(do_shaded)
- UI_ThemeColorBlend(th_col1, th_col2, spline_step);*/
+#if 0
+ if(do_shaded)
+ UI_ThemeColorBlend(th_col1, th_col2, spline_step);
+#endif
glEvalCoord1f(spline_step);
spline_step += dist;
}
@@ -201,14 +204,12 @@ void sdrawline(short x1, short y1, short x2, short y2)
}
/*
-
- x1,y2
- | \
- | \
- | \
- x1,y1-- x2,y1
-
-*/
+ * x1,y2
+ * | \
+ * | \
+ * | \
+ * x1,y1-- x2,y1
+ */
static void sdrawtripoints(short x1, short y1, short x2, short y2)
{
@@ -847,7 +848,7 @@ void bgl_get_mats(bglMats *mats)
glGetIntegerv(GL_VIEWPORT, (GLint *)mats->viewport);
/* Very strange code here - it seems that certain bad values in the
- modelview matrix can cause gluUnProject to give bad results. */
+ * modelview matrix can cause gluUnProject to give bad results. */
if(mats->modelview[0] < badvalue &&
mats->modelview[0] > -badvalue)
mats->modelview[0]= 0;
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index f3a6904f8d0..7ab73c6b976 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -524,8 +524,8 @@ int area_getorientation(ScrArea *sa, ScrArea *sb)
}
/* Helper function to join 2 areas, it has a return value, 0=failed 1=success
-* used by the split, join operators
-*/
+ * used by the split, join operators
+ */
int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2)
{
int dir;
@@ -1401,8 +1401,8 @@ void ED_screen_delete(bContext *C, bScreen *sc)
/* screen can only be in use by one window at a time, so as
- long as we are able to find a screen that is unused, we
- can safely assume ours is not in use anywhere an delete it */
+ * long as we are able to find a screen that is unused, we
+ * can safely assume ours is not in use anywhere an delete it */
for(newsc= sc->id.prev; newsc; newsc=newsc->id.prev)
if(!ed_screen_used(wm, newsc))
@@ -1600,8 +1600,8 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
if(sa) {
/* ensure we don't have a button active anymore, can crash when
- switching screens with tooltip open because region and tooltip
- are no longer in the same screen */
+ * switching screens with tooltip open because region and tooltip
+ * are no longer in the same screen */
for(ar=sa->regionbase.first; ar; ar=ar->next)
uiFreeBlocks(C, &ar->uiblocks);
@@ -1651,10 +1651,11 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
oldscreen= win->screen;
/* nothing wrong with having only 1 area, as far as I can see...
- // is there only 1 area?
+ * is there only 1 area? */
+#if 0
if(oldscreen->areabase.first==oldscreen->areabase.last)
return NULL;
- */
+#endif
oldscreen->full = SCREENFULL;
BLI_snprintf(newname, sizeof(newname), "%s-%s", oldscreen->id.name+2, "full");
@@ -1670,7 +1671,7 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
ED_area_newspace(C, newa, SPACE_INFO);
/* use random area when we have no active one, e.g. when the
- mouse is outside of the window and we open a file browser */
+ * mouse is outside of the window and we open a file browser */
if(!sa)
sa= oldscreen->areabase.first;
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 8818bd66b23..94d1f3c6a81 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -452,26 +452,25 @@ int ED_operator_editmball(bContext *C)
/* *************************** action zone operator ************************** */
/* operator state vars used:
- none
-
- functions:
-
- apply() set actionzone event
-
- exit() free customdata
-
- callbacks:
-
- exec() never used
-
- invoke() check if in zone
- add customdata, put mouseco and area in it
- add modal handler
-
- modal() accept modal events while doing it
- call apply() with gesture info, active window, nonactive window
- call exit() and remove handler when LMB confirm
-
+ * none
+ *
+ * functions:
+ *
+ * apply() set actionzone event
+ *
+ * exit() free customdata
+ *
+ * callbacks:
+ *
+ * exec() never used
+ *
+ * invoke() check if in zone
+ * add customdata, put mouseco and area in it
+ * add modal handler
+ *
+ * modal() accept modal events while doing it
+ * call apply() with gesture info, active window, nonactive window
+ * call exit() and remove handler when LMB confirm
*/
typedef struct sActionzoneData {
@@ -664,24 +663,23 @@ static void SCREEN_OT_actionzone(wmOperatorType *ot)
/* ************** swap area operator *********************************** */
/* operator state vars used:
- sa1 start area
- sa2 area to swap with
-
- functions:
-
- init() set custom data for operator, based on actionzone event custom data
-
- cancel() cancel the operator
-
- exit() cleanup, send notifier
-
- callbacks:
-
- invoke() gets called on shift+lmb drag in actionzone
- call init(), add handler
-
- modal() accept modal events while doing it
-
+ * sa1 start area
+ * sa2 area to swap with
+ *
+ * functions:
+ *
+ * init() set custom data for operator, based on actionzone event custom data
+ *
+ * cancel() cancel the operator
+ *
+ * exit() cleanup, send notifier
+ *
+ * callbacks:
+ *
+ * invoke() gets called on shift+lmb drag in actionzone
+ * call init(), add handler
+ *
+ * modal() accept modal events while doing it
*/
typedef struct sAreaSwapData {
@@ -850,32 +848,31 @@ static void SCREEN_OT_area_dupli(wmOperatorType *ot)
/* ************** move area edge operator *********************************** */
/* operator state vars used:
- x, y mouse coord near edge
- delta movement of edge
-
- functions:
-
- init() set default property values, find edge based on mouse coords, test
- if the edge can be moved, select edges, calculate min and max movement
-
- apply() apply delta on selection
-
- exit() cleanup, send notifier
-
- cancel() cancel moving
-
- callbacks:
-
- exec() execute without any user interaction, based on properties
- call init(), apply(), exit()
-
- invoke() gets called on mouse click near edge
- call init(), add handler
-
- modal() accept modal events while doing it
- call apply() with delta motion
- call exit() and remove handler
-
+ * x, y mouse coord near edge
+ * delta movement of edge
+ *
+ * functions:
+ *
+ * init() set default property values, find edge based on mouse coords, test
+ * if the edge can be moved, select edges, calculate min and max movement
+ *
+ * apply() apply delta on selection
+ *
+ * exit() cleanup, send notifier
+ *
+ * cancel() cancel moving
+ *
+ * callbacks:
+ *
+ * exec() execute without any user interaction, based on properties
+ * call init(), apply(), exit()
+ *
+ * invoke() gets called on mouse click near edge
+ * call init(), add handler
+ *
+ * modal() accept modal events while doing it
+ * call apply() with delta motion
+ * call exit() and remove handler
*/
typedef struct sAreaMoveData {
@@ -1107,38 +1104,37 @@ static void SCREEN_OT_area_move(wmOperatorType *ot)
/* ************** split area operator *********************************** */
/*
- operator state vars:
- fac spit point
- dir direction 'v' or 'h'
-
- operator customdata:
- area pointer to (active) area
- x, y last used mouse pos
- (more, see below)
-
- functions:
-
- init() set default property values, find area based on context
-
- apply() split area based on state vars
-
- exit() cleanup, send notifier
-
- cancel() remove duplicated area
-
- callbacks:
-
- exec() execute without any user interaction, based on state vars
- call init(), apply(), exit()
-
- invoke() gets called on mouse click in action-widget
- call init(), add modal handler
- call apply() with initial motion
-
- modal() accept modal events while doing it
- call move-areas code with delta motion
- call exit() or cancel() and remove handler
-
+ * operator state vars:
+ * fac spit point
+ * dir direction 'v' or 'h'
+ *
+ * operator customdata:
+ * area pointer to (active) area
+ * x, y last used mouse pos
+ * (more, see below)
+ *
+ * functions:
+ *
+ * init() set default property values, find area based on context
+ *
+ * apply() split area based on state vars
+ *
+ * exit() cleanup, send notifier
+ *
+ * cancel() remove duplicated area
+ *
+ * callbacks:
+ *
+ * exec() execute without any user interaction, based on state vars
+ * call init(), apply(), exit()
+ *
+ * invoke() gets called on mouse click in action-widget
+ * call init(), add modal handler
+ * call apply() with initial motion
+ *
+ * modal() accept modal events while doing it
+ * call move-areas code with delta motion
+ * call exit() or cancel() and remove handler
*/
#define SPLIT_STARTED 1
@@ -2080,31 +2076,30 @@ static void SCREEN_OT_screen_full_area(wmOperatorType *ot)
/* ************** join area operator ********************************************** */
/* operator state vars used:
- x1, y1 mouse coord in first area, which will disappear
- x2, y2 mouse coord in 2nd area, which will become joined
-
- functions:
-
- init() find edge based on state vars
- test if the edge divides two areas,
- store active and nonactive area,
-
- apply() do the actual join
-
- exit() cleanup, send notifier
-
- callbacks:
-
- exec() calls init, apply, exit
-
- invoke() sets mouse coords in x,y
- call init()
- add modal handler
-
- modal() accept modal events while doing it
- call apply() with active window and nonactive window
- call exit() and remove handler when LMB confirm
-
+ * x1, y1 mouse coord in first area, which will disappear
+ * x2, y2 mouse coord in 2nd area, which will become joined
+ *
+ * functions:
+ *
+ * init() find edge based on state vars
+ * test if the edge divides two areas,
+ * store active and nonactive area,
+ *
+ * apply() do the actual join
+ *
+ * exit() cleanup, send notifier
+ *
+ * callbacks:
+ *
+ * exec() calls init, apply, exit
+ *
+ * invoke() sets mouse coords in x,y
+ * call init()
+ * add modal handler
+ *
+ * modal() accept modal events while doing it
+ * call apply() with active window and nonactive window
+ * call exit() and remove handler when LMB confirm
*/
typedef struct sAreaJoinData
@@ -2282,8 +2277,8 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
}
else {
/* we are not bordering on the previously selected area
- we check if area has common border with the one marked for removal
- in this case we can swap areas.
+ * we check if area has common border with the one marked for removal
+ * in this case we can swap areas.
*/
dir = area_getorientation(sa, jd->sa2);
if (dir >= 0) {
@@ -2867,10 +2862,10 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
else if(regiontype==RGN_TYPE_UI) {
if(spacetype==SPACE_CLIP) {
/* Track Preview button is on Properties Editor in SpaceClip,
- and it's very common case when users want it be refreshing
- during playback, so asking people to enable special option
- for this is a bit ticky, so add exception here for refreshing
- Properties Editor for SpaceClip always */
+ * and it's very common case when users want it be refreshing
+ * during playback, so asking people to enable special option
+ * for this is a bit ticky, so add exception here for refreshing
+ * Properties Editor for SpaceClip always */
return 1;
}
@@ -3127,22 +3122,22 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot)
/* ************** border select operator (template) ***************************** */
/* operator state vars used: (added by default WM callbacks)
- xmin, ymin
- xmax, ymax
-
- customdata: the wmGesture pointer
-
- callbacks:
-
- exec() has to be filled in by user
-
- invoke() default WM function
- adds modal handler
-
- modal() default WM function
- accept modal events while doing it, calls exec(), handles ESC and border drawing
-
- poll() has to be filled in by user for context
+ * xmin, ymin
+ * xmax, ymax
+ *
+ * customdata: the wmGesture pointer
+ *
+ * callbacks:
+ *
+ * exec() has to be filled in by user
+ *
+ * invoke() default WM function
+ * adds modal handler
+ *
+ * modal() default WM function
+ * accept modal events while doing it, calls exec(), handles ESC and border drawing
+ *
+ * poll() has to be filled in by user for context
*/
#if 0
static int border_select_do(bContext *C, wmOperator *op)