[Bf-blender-cvs] [dd35048602a] master: Cleanup: doxy groups for screen_ops.c
Campbell Barton
noreply at git.blender.org
Sat Jan 20 15:31:38 CET 2018
Commit: dd35048602a3dea450192195cfbedcaaca555c21
Author: Campbell Barton
Date: Sun Jan 21 01:41:58 2018 +1100
Branches: master
https://developer.blender.org/rBdd35048602a3dea450192195cfbedcaaca555c21
Cleanup: doxy groups for screen_ops.c
===================================================================
M source/blender/editors/screen/screen_ops.c
===================================================================
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index e43f95f788b..0496acb6ea2 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -90,7 +90,9 @@
#define KM_MODAL_SNAP_ON 3
#define KM_MODAL_SNAP_OFF 4
-/* ************** Exported Poll tests ********************** */
+/* -------------------------------------------------------------------- */
+/** \name Public Poll API
+ * \{ */
int ED_operator_regionactive(bContext *C)
{
@@ -124,36 +126,6 @@ static int ED_operator_screenactive_norender(bContext *C)
return 1;
}
-
-static int screen_active_editable(bContext *C)
-{
- if (ED_operator_screenactive(C)) {
- /* no full window splitting allowed */
- if (CTX_wm_screen(C)->state != SCREENNORMAL)
- return 0;
- return 1;
- }
- return 0;
-}
-
-static ARegion *screen_find_region_type(bContext *C, int type)
-{
- ARegion *ar = CTX_wm_region(C);
-
- /* find the header region
- * - try context first, but upon failing, search all regions in area...
- */
- if ((ar == NULL) || (ar->regiontype != type)) {
- ScrArea *sa = CTX_wm_area(C);
- ar = BKE_area_find_region_type(sa, type);
- }
- else {
- ar = NULL;
- }
-
- return ar;
-}
-
/* when mouse is over area-edge */
int ED_operator_screen_mainwinactive(bContext *C)
{
@@ -580,7 +552,46 @@ int ED_operator_mask(bContext *C)
return false;
}
-/* *************************** action zone operator ************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Internal Screen Utilities
+ * \{ */
+
+static int screen_active_editable(bContext *C)
+{
+ if (ED_operator_screenactive(C)) {
+ /* no full window splitting allowed */
+ if (CTX_wm_screen(C)->state != SCREENNORMAL)
+ return 0;
+ return 1;
+ }
+ return 0;
+}
+
+static ARegion *screen_find_region_type(bContext *C, int type)
+{
+ ARegion *ar = CTX_wm_region(C);
+
+ /* find the header region
+ * - try context first, but upon failing, search all regions in area...
+ */
+ if ((ar == NULL) || (ar->regiontype != type)) {
+ ScrArea *sa = CTX_wm_area(C);
+ ar = BKE_area_find_region_type(sa, type);
+ }
+ else {
+ ar = NULL;
+ }
+
+ return ar;
+}
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Action Zone Operator
+ * \{ */
/* operator state vars used:
* none
@@ -852,7 +863,11 @@ static void SCREEN_OT_actionzone(wmOperatorType *ot)
RNA_def_int(ot->srna, "modifier", 0, 0, 2, "Modifier", "Modifier state", 0, 2);
}
-/* ************** swap area operator *********************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Swap Area Operator
+ * \{ */
/* operator state vars used:
* sa1 start area
@@ -972,7 +987,13 @@ static void SCREEN_OT_area_swap(wmOperatorType *ot)
ot->flag = OPTYPE_BLOCKING;
}
-/* *********** Duplicate area as new window operator ****************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Area Duplicate Operator
+ *
+ * Create new window from area.
+ * \{ */
/* operator callback */
static int area_dupli_invoke(bContext *C, wmOperator *op, const wmEvent *event)
@@ -1045,8 +1066,11 @@ static void SCREEN_OT_area_dupli(wmOperatorType *ot)
ot->poll = ED_operator_areaactive;
}
+/** \} */
-/* ************** move area edge operator *********************************** */
+/* -------------------------------------------------------------------- */
+/** \name Move Area Edge Operator
+ * \{ */
/* operator state vars used:
* x, y mouse coord near edge
@@ -1386,7 +1410,11 @@ static void SCREEN_OT_area_move(wmOperatorType *ot)
RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
}
-/* ************** split area operator *********************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Split Area Operator
+ * \{ */
/*
* operator state vars:
@@ -1424,7 +1452,7 @@ static void SCREEN_OT_area_move(wmOperatorType *ot)
typedef struct sAreaSplitData {
int x, y; /* last used mouse position */
-
+
int origval; /* for move areas */
int bigger, smaller; /* constraints for moving new edge */
int delta; /* delta move edge */
@@ -1868,9 +1896,11 @@ static void SCREEN_OT_area_split(wmOperatorType *ot)
RNA_def_int(ot->srna, "mouse_y", -100, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX);
}
+/** \} */
-
-/* ************** scale region edge operator *********************************** */
+/* -------------------------------------------------------------------- */
+/** \name Scale Region Edge Operator
+ * \{ */
typedef struct RegionMoveData {
AZone *az;
@@ -2139,8 +2169,11 @@ static void SCREEN_OT_region_scale(wmOperatorType *ot)
ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
}
+/** \} */
-/* ************** frame change operator ***************************** */
+/* -------------------------------------------------------------------- */
+/** \name Frame Change Operator
+ * \{ */
static void areas_do_frame_follow(bContext *C, bool middle)
{
@@ -2222,6 +2255,11 @@ static void SCREEN_OT_frame_offset(wmOperatorType *ot)
RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Frame Jump Operator
+ * \{ */
/* function to be called outside UI context, or for redo */
static int frame_jump_exec(bContext *C, wmOperator *op)
@@ -2276,8 +2314,11 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "end", 0, "Last Frame", "Jump to the last frame of the frame range");
}
+/** \} */
-/* ************** jump to keyframe operator ***************************** */
+/* -------------------------------------------------------------------- */
+/** \name Jump to Key-Frame Operator
+ * \{ */
/* function to be called outside UI context, or for redo */
static int keyframe_jump_exec(bContext *C, wmOperator *op)
@@ -2386,7 +2427,11 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "next", true, "Next Keyframe", "");
}
-/* ************** jump to marker operator ***************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Jump to Marker Operator
+ * \{ */
/* function to be called outside UI context, or for redo */
static int marker_jump_exec(bContext *C, wmOperator *op)
@@ -2449,7 +2494,11 @@ static void SCREEN_OT_marker_jump(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "next", true, "Next Marker", "");
}
-/* ************** switch screen operator ***************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Set Screen Operator
+ * \{ */
static bool screen_set_is_ok(bScreen *screen, bScreen *screen_prev)
{
@@ -2525,8 +2574,11 @@ static void SCREEN_OT_screen_set(wmOperatorType *ot)
RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
}
-/* ************** screen full-area operator ***************************** */
+/** \} */
+/* -------------------------------------------------------------------- */
+/** \name Screen Full-Area Operator
+ * \{ */
/* function to be called outside UI context, or for redo */
static int screen_maximize_area_exec(bContext *C, wmOperator *op)
@@ -2577,7 +2629,11 @@ static void SCREEN_OT_screen_full_area(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
-/* ************** join area operator ********************************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Screen Join-Area Operator
+ * \{ */
/* operator state vars used:
* x1, y1 mouse coord in first area, which will disappear
@@ -2862,7 +2918,11 @@ static void SCREEN_OT_area_join(wmOperatorType *ot)
RNA_def_int(ot->srna, "max_y", -100, INT_MIN, INT_MAX, "Y 2", "", INT_MIN, INT_MAX);
}
-/* ******************************* */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Screen Area Options Operator
+ * \{ */
static int screen_area_options_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
@@ -2915,9 +2975,11 @@ static void SCREEN_OT_area_options(wmOperatorType *ot)
ot->flag = OPTYPE_INTERNAL;
}
+/** \} */
-/* ******************************* */
-
+/* -------------------------------------------------------------------- */
+/** \name Space Data Cleanup Operator
+ * \{ */
static int spacedata_cleanup_exec(bContext *C, wmOperator *op)
{
@@ -2956,7 +3018,11 @@ static void SCREEN_OT_spacedata_cleanup(wmOperatorType *ot)
}
-/* ************** repeat last operator ***************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Repeat Last Operator
+ * \{ */
static int repeat_last_exec(bContext *C, wmOperator *UNUSED(op))
{
@@ -2995,6 +3061,12 @@ static void SCREEN_OT_repeat_last(wmOperatorType *ot)
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Repeat History Operator
+ * \{ */
+
static int repeat_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
wmWindowManager *wm = CTX_wm_manager(C);
@@ -3052,7 +3124,11 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot)
RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, 1000);
}
-/* ********************** redo operator ***************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Redo Operator
+ * \{ */
static int redo_last_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event))
{
@@ -3077,7 +3153,11 @@ static void SCREEN_OT_redo_last(wmOperatorType *ot)
ot->poll = ED_operator_screenactive;
}
-/* ************** region fou
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list