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>2020-05-07 16:16:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-07 16:32:14 +0300
commit74c01afe228322137b8c1a813452d185028d4c8f (patch)
treed24d494dff9147259c0e4cac23b337ff1d2b94d0 /source/blender/editors/interface/interface_intern.h
parent7181342e628568e2a427b5baa2eeedd0dba1c528 (diff)
Cleanup: split button search callbacks into their own struct
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r--source/blender/editors/interface/interface_intern.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index e42bbdfdba5..da7cbc8638b 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -145,6 +145,14 @@ enum {
/* max amount of items a radial menu (pie menu) can contain */
#define PIE_MAX_ITEMS 8
+struct uiButSearchData {
+ uiButSearchCreateFn create_fn;
+ uiButSearchUpdateFn update_fn;
+ void *arg;
+ uiButSearchArgFreeFn arg_free_fn;
+ const char *sep_string;
+};
+
struct uiBut {
struct uiBut *next, *prev;
int flag, drawflag;
@@ -201,11 +209,7 @@ struct uiBut {
uiButCompleteFunc autocomplete_func;
void *autofunc_arg;
- uiButSearchCreateFunc search_create_func;
- uiButSearchFunc search_func;
- void *search_arg;
- uiButSearchArgFreeFunc search_arg_free_func;
- const char *search_sep_string;
+ struct uiButSearchData *search;
uiButHandleRenameFunc rename_func;
void *rename_arg1;
@@ -1012,7 +1016,7 @@ void UI_OT_eyedropper_gpencil_color(struct wmOperatorType *ot);
bool ui_str_has_word_prefix(const char *haystack, const char *needle, size_t needle_len);
/**
- * For use with #ui_rna_collection_search_cb.
+ * For use with #ui_rna_collection_search_update_fn.
*/
typedef struct uiRNACollectionSearch {
PointerRNA target_ptr;
@@ -1027,10 +1031,10 @@ typedef struct uiRNACollectionSearch {
/* Block has to be stored for freeing butstore (uiBut.block doesn't work with undo). */
uiBlock *butstore_block;
} uiRNACollectionSearch;
-void ui_rna_collection_search_cb(const struct bContext *C,
- void *arg,
- const char *str,
- uiSearchItems *items);
+void ui_rna_collection_search_update_fn(const struct bContext *C,
+ void *arg,
+ const char *str,
+ uiSearchItems *items);
/* interface_ops.c */
bool ui_jump_to_target_button_poll(struct bContext *C);