[Bf-blender-cvs] [15cc4c4cb3c] master: Cleanup: use doxy comments for WM_types.h

Campbell Barton noreply at git.blender.org
Fri Jul 5 13:53:22 CEST 2019


Commit: 15cc4c4cb3cd6e5d19678a2440e99d1e7fda6416
Author: Campbell Barton
Date:   Thu Jul 4 14:44:24 2019 +1000
Branches: master
https://developer.blender.org/rB15cc4c4cb3cd6e5d19678a2440e99d1e7fda6416

Cleanup: use doxy comments for WM_types.h

===================================================================

M	source/blender/windowmanager/WM_types.h

===================================================================

diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index d2a876dfb5e..7015f3cc02f 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -141,7 +141,7 @@ enum {
   OPTYPE_REGISTER = (1 << 0),
   /** Do an undo push after the operator runs. */
   OPTYPE_UNDO = (1 << 1),
-  /** Let Blender grab all input from the WM (X11) */
+  /** Let Blender grab all input from the WM (X11). */
   OPTYPE_BLOCKING = (1 << 2),
   OPTYPE_MACRO = (1 << 3),
 
@@ -178,8 +178,10 @@ enum {
   WM_CURSOR_WRAP_XY,
 };
 
-/* context to call operator in for WM_operator_name_call */
-/* rna_ui.c contains EnumPropertyItem's of these, keep in sync */
+/**
+ * Context to call operator in for #WM_operator_name_call.
+ * rna_ui.c contains EnumPropertyItem's of these, keep in sync.
+ */
 enum {
   /* if there's invoke, call it, otherwise exec */
   WM_OP_INVOKE_DEFAULT,
@@ -448,80 +450,106 @@ typedef struct wmNotifier {
 #define WM_GESTURE_CIRCLE 5
 #define WM_GESTURE_STRAIGHTLINE 6
 
-/* wmGesture is registered to window listbase, handled by operator callbacks */
-/* tweak gesture is builtin feature */
+/**
+ * wmGesture is registered to #wmWindow.gesture, handled by operator callbacks.
+ * Tweak gesture is builtin feature.
+ */
 typedef struct wmGesture {
   struct wmGesture *next, *prev;
-  int event_type;   /* event->type */
-  int type;         /* gesture type define */
-  rcti winrct;      /* bounds of region to draw gesture within */
-  int points;       /* optional, amount of points stored */
-  int points_alloc; /* optional, maximum amount of points stored */
+  /** #wmEvent.type */
+  int event_type;
+  /** Gesture type define. */
+  int type;
+  /** bounds of region to draw gesture within. */
+  rcti winrct;
+  /** optional, amount of points stored. */
+  int points;
+  /** optional, maximum amount of points stored. */
+  int points_alloc;
   int modal_state;
 
-  /* For modal operators which may be running idle, waiting for an event to activate the gesture.
+  /**
+   * For modal operators which may be running idle, waiting for an event to activate the gesture.
    * Typically this is set when the user is click-dragging the gesture
-   * (border and circle select for eg). */
+   * (box and circle select for eg).
+   */
   uint is_active : 1;
-  /* Previous value of is-active (use to detect first run & edge cases). */
+  /** Previous value of is-active (use to detect first run & edge cases). */
   uint is_active_prev : 1;
-  /* Use for gestures that support both immediate or delayed activation. */
+  /** Use for gestures that support both immediate or delayed activation. */
   uint wait_for_input : 1;
 
+  /**
+   * customdata
+   * - for border is a #rcti.
+   * - for circle is recti, (xmin, ymin) is center, xmax radius.
+   * - for lasso is short array.
+   * - for straight line is a recti: (xmin,ymin) is start, (xmax, ymax) is end.
+   */
   void *customdata;
-  /* customdata for border is a recti */
-  /* customdata for circle is recti, (xmin, ymin) is center, xmax radius */
-  /* customdata for lasso is short array */
-  /* customdata for straight line is a recti: (xmin,ymin) is start, (xmax, ymax) is end */
 
-  /* free pointer to use for operator allocs (if set, its freed on exit)*/
+  /** Free pointer to use for operator allocs (if set, its freed on exit). */
   wmGenericUserData user_data;
 } wmGesture;
 
 /* ************** wmEvent ************************ */
 
-/* each event should have full modifier state */
-/* event comes from eventmanager and from keymap */
+/**
+ * Each event should have full modifier state.
+ * event comes from event manager and from keymap.
+ */
 typedef struct wmEvent {
   struct wmEvent *next, *prev;
 
-  short type;       /* event code itself (short, is also in keymap) */
-  short val;        /* press, release, scrollvalue */
-  int x, y;         /* mouse pointer position, screen coord */
-  int mval[2];      /* region mouse position, name convention pre 2.5 :) */
-  char utf8_buf[6]; /* from, ghost if utf8 is enabled for the platform,
-                     * BLI_str_utf8_size() must _always_ be valid, check
-                     * when assigning s we don't need to check on every access after */
-  char ascii;       /* from ghost, fallback if utf8 isn't set */
+  /** Event code itself (short, is also in keymap). */
+  short type;
+  /** Press, release, scrollvalue. */
+  short val;
+  /** Mouse pointer position, screen coord. */
+  int x, y;
+  /** Region mouse position, name convention pre 2.5 :). */
+  int mval[2];
+  /**
+   * From, ghost if utf8 is enabled for the platform,
+   * #BLI_str_utf8_size() must _always_ be valid, check
+   * when assigning s we don't need to check on every access after.
+   */
+  char utf8_buf[6];
+  /** From ghost, fallback if utf8 isn't set. */
+  char ascii;
   char pad;
 
-  /* previous state, used for double click and the 'click' */
+  /** Previous state, used for double click and the 'click'. */
   short prevtype;
   short prevval;
   int prevx, prevy;
   double prevclicktime;
   int prevclickx, prevclicky;
 
-  /* modifier states */
-  short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
-  short keymodifier;             /* rawkey modifier */
+  /** Modifier states. */
+  /** 'oskey' is apple or windows-key, value denotes order of pressed. */
+  short shift, ctrl, alt, oskey;
+  /** rawkey modifier. */
+  short keymodifier;
 
-  /* set in case a KM_PRESS went by unhandled */
+  /** Set in case a #KM_PRESS went by unhandled. */
   char check_click;
   char check_drag;
   char is_motion_absolute;
 
-  /* keymap item, set by handler (weak?) */
+  /** Keymap item, set by handler (weak?). */
   const char *keymap_idname;
 
-  /* tablet info, only use when the tablet is active */
+  /** Tablet info, only use when the tablet is active. */
   const struct wmTabletData *tablet_data;
 
   /* custom data */
-  short custom; /* custom data type, stylus, 6dof, see wm_event_types.h */
+  /** Custom data type, stylus, 6dof, see wm_event_types.h */
+  short custom;
   short customdatafree;
   int pad2;
-  void *customdata; /* ascii, unicode, mouse coords, angles, vectors, dragdrop info */
+  /** Ascii, unicode, mouse coords, angles, vectors, dragdrop info. */
+  void *customdata;
 
 } wmEvent;
 
@@ -543,32 +571,46 @@ bool WM_event_cursor_click_drag_threshold_met(const wmEvent *event);
 
 /* ************** custom wmEvent data ************** */
 typedef struct wmTabletData {
-  int Active;     /* 0=EVT_TABLET_NONE, 1=EVT_TABLET_STYLUS, 2=EVT_TABLET_ERASER */
-  float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */
-  float Xtilt;    /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */
-  float Ytilt;    /* as above */
+  /** 0=EVT_TABLET_NONE, 1=EVT_TABLET_STYLUS, 2=EVT_TABLET_ERASER. */
+  int Active;
+  /** range 0.0 (not touching) to 1.0 (full pressure). */
+  float Pressure;
+  /** range 0.0 (upright) to 1.0 (tilted fully against the tablet surface). */
+  float Xtilt;
+  /** as above. */
+  float Ytilt;
 } 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_FINISHED,
+/** Motion progress, for modal handlers. */
+typedef enum {
+  P_NOT_STARTED,
+  P_STARTING,    /* <-- */
+  P_IN_PROGRESS, /* <-- only these are sent for NDOF motion. */
+  P_FINISHING,   /* <-- */
+  P_FINISHED,
 } wmProgress;
 
 #ifdef WITH_INPUT_NDOF
 typedef struct wmNDOFMotionData {
   /* awfully similar to GHOST_TEventNDOFMotionData... */
-  /* Each component normally ranges from -1 to +1, but can exceed that.
+  /**
+   * 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. */
-  float tvec[3]; /* translation */
-  float rvec[3]; /* rotation: */
-  /* 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? */
+   * with positive rotations being CCW about the axis.
+   */
+  /** Translation. */
+  float tvec[3];
+  /** Rotation.
+   * <pre>
+   * axis = (rx,ry,rz).normalized.
+   * amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg]
+   * </pre>
+   */
+  float rvec[3];
+  /** Time since previous NDOF Motion event. */
+  float dt;
+  /** Is this the first event, the last, or one of many in between? */
+  wmProgress progress;
 } wmNDOFMotionData;
 #endif /* WITH_INPUT_NDOF */
 
@@ -581,82 +623,113 @@ typedef enum {
 typedef struct wmTimer {
   struct wmTimer *next, *prev;
 
-  struct wmWindow *win; /* window this timer is attached to (optional) */
-
-  double timestep;    /* set by timer user */
-  int event_type;     /* set by timer user, goes to event system */
-  wmTimerFlags flags; /* Various flags controlling timer options, see below. */
-  void *customdata;   /* set by timer user, to allow custom values */
+  /** Window this timer is attached to (optional). */
+  struct wmWindow *win;
 
-  double duration; /* total running time in seconds */
-  double delta;    /* time since previous step in seconds */
+  /** Set by timer user. */
+  double timestep;
+  /** Set by timer user, goes to event system. */
+  int event_type;
+  /** Various flags controlling timer options, see below. */
+  wmTimerFlags flags;
+  /** Set by timer user, to allow custom values. */
+  void *customdata;
 
-  double ltime; /* internal, last time timer was activated */
-  double ntime; /* internal, next time we want to activate the timer */
-  double stime; /* internal, when the timer started */
-  bool sleep;   /* internal, put timers to sleep when needed */
+  /** Total running time in seconds. */
+  double duration;
+  /** Time since previous step in seconds. */
+  double delta;
+
+  /** Internal, last time timer was activated. */
+  do

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list