diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-17 01:52:24 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-17 02:08:41 +0300 |
commit | 27388f7f46db6ce87d89bf1aa3350c899d56f42b (patch) | |
tree | ffb4e0383c5e690381f98c657cddd64d3f1d6f1a /source/blender/windowmanager | |
parent | 33409f9f1cd42e899f2706fe7878e5e89b50d617 (diff) |
Cleanup: include argument names for drop-box callbacks
Indicates typical names for callbacks and allows them to be documented.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 9edbafafdd3..6df65f2a2a3 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -1167,25 +1167,28 @@ typedef struct wmDropBox { struct wmDropBox *next, *prev; /** Test if the dropbox is active. */ - bool (*poll)(struct bContext *, struct wmDrag *, const wmEvent *); + bool (*poll)(struct bContext *C, struct wmDrag *drag, const wmEvent *event); /** Before exec, this copies drag info to #wmDrop properties. */ - void (*copy)(struct wmDrag *, struct wmDropBox *); + void (*copy)(struct wmDrag *drag, struct wmDropBox *drop); /** - * If the operator is cancelled (returns `OPERATOR_CANCELLED`), this can be used for cleanup of + * If the operator is canceled (returns `OPERATOR_CANCELLED`), this can be used for cleanup of * `copy()` resources. */ - void (*cancel)(struct Main *, struct wmDrag *, struct wmDropBox *); + void (*cancel)(struct Main *bmain, struct wmDrag *drag, struct wmDropBox *drop); - /** Override the default drawing function. */ - void (*draw)(struct bContext *, struct wmWindow *, struct wmDrag *, const int *); + /** + * Override the default drawing function. + * \param xy: Cursor location in window coordinates (#wmEvent.xy compatible). + */ + void (*draw)(struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2]); /** Called when pool returns true the first time. */ - void (*draw_activate)(struct wmDropBox *, struct wmDrag *drag); + void (*draw_activate)(struct wmDropBox *drop, struct wmDrag *drag); /** Called when pool returns false the first time or when the drag event ends. */ - void (*draw_deactivate)(struct wmDropBox *, struct wmDrag *drag); + void (*draw_deactivate)(struct wmDropBox *drop, struct wmDrag *drag); /** Custom data for drawing. */ void *draw_data; |