Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_intern.h
| Show First 20 Lines • Show All 591 Lines • ▼ Show 20 Lines | typedef struct uiSafetyRct { | ||||
| rctf parent; | rctf parent; | ||||
| rctf safety; | rctf safety; | ||||
| } uiSafetyRct; | } uiSafetyRct; | ||||
| /* interface.c */ | /* interface.c */ | ||||
| void ui_fontscale(short *points, float aspect); | void ui_fontscale(short *points, float aspect); | ||||
| extern void ui_block_to_region_fl(const struct ARegion *region, | |||||
| uiBlock *block, | |||||
| float *r_x, | |||||
| float *r_y); | |||||
| extern void ui_block_to_window_fl(const struct ARegion *region, | extern void ui_block_to_window_fl(const struct ARegion *region, | ||||
| uiBlock *block, | uiBlock *block, | ||||
| float *x, | float *x, | ||||
| float *y); | float *y); | ||||
| extern void ui_block_to_window(const struct ARegion *region, uiBlock *block, int *x, int *y); | extern void ui_block_to_window(const struct ARegion *region, uiBlock *block, int *x, int *y); | ||||
| extern void ui_block_to_region_rctf(const struct ARegion *region, | |||||
| uiBlock *block, | |||||
| rctf *rct_dst, | |||||
| const rctf *rct_src); | |||||
| extern void ui_block_to_window_rctf(const struct ARegion *region, | extern void ui_block_to_window_rctf(const struct ARegion *region, | ||||
| uiBlock *block, | uiBlock *block, | ||||
| rctf *rct_dst, | rctf *rct_dst, | ||||
| const rctf *rct_src); | const rctf *rct_src); | ||||
| extern float ui_block_to_window_scale(const struct ARegion *region, uiBlock *block); | extern float ui_block_to_window_scale(const struct ARegion *region, uiBlock *block); | ||||
| extern void ui_window_to_block_fl(const struct ARegion *region, | extern void ui_window_to_block_fl(const struct ARegion *region, | ||||
| uiBlock *block, | uiBlock *block, | ||||
| float *x, | float *x, | ||||
| float *y); | float *y); | ||||
| extern void ui_window_to_block(const struct ARegion *region, uiBlock *block, int *x, int *y); | extern void ui_window_to_block(const struct ARegion *region, uiBlock *block, int *x, int *y); | ||||
| extern void ui_window_to_block_rctf(const struct ARegion *region, | extern void ui_window_to_block_rctf(const struct ARegion *region, | ||||
| uiBlock *block, | uiBlock *block, | ||||
| rctf *rct_dst, | rctf *rct_dst, | ||||
| const rctf *rct_src); | const rctf *rct_src); | ||||
| extern void ui_window_to_region(const struct ARegion *region, int *x, int *y); | extern void ui_window_to_region(const struct ARegion *region, int *x, int *y); | ||||
| extern void ui_window_to_region_rcti(const struct ARegion *region, | extern void ui_window_to_region_rcti(const struct ARegion *region, | ||||
| rcti *rect_dst, | rcti *rect_dst, | ||||
| const rcti *rct_src); | const rcti *rct_src); | ||||
| extern void ui_window_to_region_rctf(const struct ARegion *region, | |||||
| rctf *rect_dst, | |||||
| const rctf *rct_src); | |||||
| extern void ui_region_to_window(const struct ARegion *region, int *x, int *y); | extern void ui_region_to_window(const struct ARegion *region, int *x, int *y); | ||||
| extern void ui_region_winrct_get_no_margin(const struct ARegion *region, struct rcti *r_rect); | extern void ui_region_winrct_get_no_margin(const struct ARegion *region, struct rcti *r_rect); | ||||
| uiBut *ui_but_change_type(uiBut *but, eButType new_type); | uiBut *ui_but_change_type(uiBut *but, eButType new_type); | ||||
| extern double ui_but_value_get(uiBut *but); | extern double ui_but_value_get(uiBut *but); | ||||
| extern void ui_but_value_set(uiBut *but, double value); | extern void ui_but_value_set(uiBut *but, double value); | ||||
| extern void ui_but_hsv_set(uiBut *but); | extern void ui_but_hsv_set(uiBut *but); | ||||
| ▲ Show 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | |||||
| void ui_textedit_undo_push(struct uiUndoStack_Text *undo_stack, | void ui_textedit_undo_push(struct uiUndoStack_Text *undo_stack, | ||||
| const char *text, | const char *text, | ||||
| int cursor_index); | int cursor_index); | ||||
| const char *ui_textedit_undo(struct uiUndoStack_Text *undo_stack, | const char *ui_textedit_undo(struct uiUndoStack_Text *undo_stack, | ||||
| int direction, | int direction, | ||||
| int *r_cursor_index); | int *r_cursor_index); | ||||
| /* interface_handlers.c */ | /* interface_handlers.c */ | ||||
| PointerRNA *ui_handle_afterfunc_add_operator(struct wmOperatorType *ot, | extern void ui_handle_afterfunc_add_operator(struct wmOperatorType *ot, int opcontext); | ||||
| int opcontext, | |||||
| bool create_props); | |||||
| extern void ui_pan_to_scroll(const struct wmEvent *event, int *type, int *val); | extern void ui_pan_to_scroll(const struct wmEvent *event, int *type, int *val); | ||||
| extern void ui_but_activate_event(struct bContext *C, struct ARegion *region, uiBut *but); | extern void ui_but_activate_event(struct bContext *C, struct ARegion *region, uiBut *but); | ||||
| extern void ui_but_activate_over(struct bContext *C, struct ARegion *region, uiBut *but); | extern void ui_but_activate_over(struct bContext *C, struct ARegion *region, uiBut *but); | ||||
| extern void ui_but_execute_begin(struct bContext *C, | extern void ui_but_execute_begin(struct bContext *C, | ||||
| struct ARegion *region, | struct ARegion *region, | ||||
| uiBut *but, | uiBut *but, | ||||
| void **active_back); | void **active_back); | ||||
| extern void ui_but_execute_end(struct bContext *C, | extern void ui_but_execute_end(struct bContext *C, | ||||
| struct ARegion *region, | struct ARegion *region, | ||||
| uiBut *but, | uiBut *but, | ||||
| void *active_back); | void *active_back); | ||||
| extern void ui_but_active_free(const struct bContext *C, uiBut *but); | extern void ui_but_active_free(const struct bContext *C, uiBut *but); | ||||
| extern void ui_but_update_view_for_active(const struct bContext *C, const uiBlock *block); | |||||
| extern int ui_but_menu_direction(uiBut *but); | extern int ui_but_menu_direction(uiBut *but); | ||||
| extern void ui_but_text_password_hide(char password_str[128], uiBut *but, const bool restore); | extern void ui_but_text_password_hide(char password_str[128], uiBut *but, const bool restore); | ||||
| extern uiBut *ui_but_find_select_in_enum(uiBut *but, int direction); | extern uiBut *ui_but_find_select_in_enum(uiBut *but, int direction); | ||||
| bool ui_but_is_editing(const uiBut *but); | bool ui_but_is_editing(const uiBut *but); | ||||
| float ui_block_calc_pie_segment(struct uiBlock *block, const float event_xy[2]); | float ui_block_calc_pie_segment(struct uiBlock *block, const float event_xy[2]); | ||||
| void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_strip); | void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_strip); | ||||
| void ui_but_clipboard_free(void); | void ui_but_clipboard_free(void); | ||||
| ▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | |||||
| } uiMenuItemSeparatorType; | } uiMenuItemSeparatorType; | ||||
| void ui_draw_menu_item(const struct uiFontStyle *fstyle, | void ui_draw_menu_item(const struct uiFontStyle *fstyle, | ||||
| rcti *rect, | rcti *rect, | ||||
| const char *name, | const char *name, | ||||
| int iconid, | int iconid, | ||||
| int state, | int state, | ||||
| uiMenuItemSeparatorType separator_type, | uiMenuItemSeparatorType separator_type, | ||||
| int *r_xmax); | int *r_xmax); | ||||
| void ui_draw_preview_item( | void ui_draw_preview_item(const struct uiFontStyle *fstyle, | ||||
| const struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state); | rcti *rect, | ||||
| const char *name, | |||||
| int iconid, | |||||
| int state, | |||||
| eFontStyle_Align text_align); | |||||
| void ui_draw_preview_item_stateless(const struct uiFontStyle *fstyle, | |||||
| rcti *rect, | |||||
| const char *name, | |||||
| int iconid, | |||||
| const uchar text_col[4], | |||||
| eFontStyle_Align text_align); | |||||
| #define UI_TEXT_MARGIN_X 0.4f | #define UI_TEXT_MARGIN_X 0.4f | ||||
| #define UI_POPUP_MARGIN (UI_DPI_FAC * 12) | #define UI_POPUP_MARGIN (UI_DPI_FAC * 12) | ||||
| /* Margin at top of screen for popups. Note this value must be sufficient | /* Margin at top of screen for popups. Note this value must be sufficient | ||||
| to draw a popover arrow to avoid cropping it. */ | to draw a popover arrow to avoid cropping it. */ | ||||
| #define UI_POPUP_MENU_TOP (int)(10 * UI_DPI_FAC) | #define UI_POPUP_MENU_TOP (int)(10 * UI_DPI_FAC) | ||||
| #define UI_PIXEL_AA_JITTER 8 | #define UI_PIXEL_AA_JITTER 8 | ||||
| ▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
| bool ui_but_contains_pt(const uiBut *but, float mx, float my) ATTR_WARN_UNUSED_RESULT; | bool ui_but_contains_pt(const uiBut *but, float mx, float my) ATTR_WARN_UNUSED_RESULT; | ||||
| bool ui_but_contains_rect(const uiBut *but, const rctf *rect); | bool ui_but_contains_rect(const uiBut *but, const rctf *rect); | ||||
| bool ui_but_contains_point_px_icon(const uiBut *but, | bool ui_but_contains_point_px_icon(const uiBut *but, | ||||
| struct ARegion *region, | struct ARegion *region, | ||||
| const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT; | const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT; | ||||
| bool ui_but_contains_point_px(const uiBut *but, const struct ARegion *region, int x, int y) | bool ui_but_contains_point_px(const uiBut *but, const struct ARegion *region, int x, int y) | ||||
| ATTR_WARN_UNUSED_RESULT; | ATTR_WARN_UNUSED_RESULT; | ||||
| uiBut *ui_list_find_mouse_over(struct ARegion *region, | uiBut *ui_list_find_mouse_over(const struct ARegion *region, | ||||
| const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT; | const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT; | ||||
| uiBut *ui_list_find_from_row(const struct ARegion *region, | |||||
| const uiBut *row_but) ATTR_WARN_UNUSED_RESULT; | |||||
| uiBut *ui_list_row_find_mouse_over(const struct ARegion *region, | |||||
| int x, | |||||
| int y) ATTR_WARN_UNUSED_RESULT; | |||||
| uiBut *ui_list_row_find_from_index(const struct ARegion *region, | |||||
| const int index, | |||||
| uiBut *listbox) ATTR_WARN_UNUSED_RESULT; | |||||
| typedef bool (*uiButFindPollFn)(const uiBut *but, const void *customdata); | |||||
| uiBut *ui_but_find_mouse_over_ex(const struct ARegion *region, | uiBut *ui_but_find_mouse_over_ex(const struct ARegion *region, | ||||
| const int x, | const int x, | ||||
| const int y, | const int y, | ||||
| const bool labeledit) ATTR_WARN_UNUSED_RESULT; | const bool labeledit, | ||||
| const uiButFindPollFn find_poll, | |||||
| const void *find_custom_data) ATTR_WARN_UNUSED_RESULT; | |||||
| uiBut *ui_but_find_mouse_over(const struct ARegion *region, | uiBut *ui_but_find_mouse_over(const struct ARegion *region, | ||||
| const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT; | const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT; | ||||
| uiBut *ui_but_find_rect_over(const struct ARegion *region, | uiBut *ui_but_find_rect_over(const struct ARegion *region, | ||||
| const rcti *rect_px) ATTR_WARN_UNUSED_RESULT; | const rcti *rect_px) ATTR_WARN_UNUSED_RESULT; | ||||
| uiBut *ui_list_find_mouse_over_ex(struct ARegion *region, int x, int y) ATTR_WARN_UNUSED_RESULT; | uiBut *ui_list_find_mouse_over_ex(const struct ARegion *region, | ||||
| int x, | |||||
| int y) ATTR_WARN_UNUSED_RESULT; | |||||
| bool ui_but_contains_password(const uiBut *but) ATTR_WARN_UNUSED_RESULT; | bool ui_but_contains_password(const uiBut *but) ATTR_WARN_UNUSED_RESULT; | ||||
| size_t ui_but_drawstr_len_without_sep_char(const uiBut *but); | size_t ui_but_drawstr_len_without_sep_char(const uiBut *but); | ||||
| size_t ui_but_tip_len_only_first_line(const uiBut *but); | size_t ui_but_tip_len_only_first_line(const uiBut *but); | ||||
| uiBut *ui_but_prev(uiBut *but) ATTR_WARN_UNUSED_RESULT; | uiBut *ui_but_prev(uiBut *but) ATTR_WARN_UNUSED_RESULT; | ||||
| uiBut *ui_but_next(uiBut *but) ATTR_WARN_UNUSED_RESULT; | uiBut *ui_but_next(uiBut *but) ATTR_WARN_UNUSED_RESULT; | ||||
| uiBut *ui_but_first(uiBlock *block) ATTR_WARN_UNUSED_RESULT; | uiBut *ui_but_first(uiBlock *block) ATTR_WARN_UNUSED_RESULT; | ||||
| uiBut *ui_but_last(uiBlock *block) ATTR_WARN_UNUSED_RESULT; | uiBut *ui_but_last(uiBlock *block) ATTR_WARN_UNUSED_RESULT; | ||||
| uiBut *ui_block_active_but_get(const uiBlock *block); | |||||
| bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT; | bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT; | ||||
| bool ui_block_is_popover(const uiBlock *block) ATTR_WARN_UNUSED_RESULT; | bool ui_block_is_popover(const uiBlock *block) ATTR_WARN_UNUSED_RESULT; | ||||
| bool ui_block_is_pie_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT; | bool ui_block_is_pie_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT; | ||||
| bool ui_block_is_popup_any(const uiBlock *block) ATTR_WARN_UNUSED_RESULT; | bool ui_block_is_popup_any(const uiBlock *block) ATTR_WARN_UNUSED_RESULT; | ||||
| uiBlock *ui_block_find_mouse_over_ex(const struct ARegion *region, | uiBlock *ui_block_find_mouse_over_ex(const struct ARegion *region, | ||||
| const int x, | const int x, | ||||
| const int y, | const int y, | ||||
| Show All 11 Lines | bool ui_region_contains_point_px(const struct ARegion *region, | ||||
| int y) ATTR_WARN_UNUSED_RESULT; | int y) ATTR_WARN_UNUSED_RESULT; | ||||
| bool ui_region_contains_rect_px(const struct ARegion *region, const rcti *rect_px); | bool ui_region_contains_rect_px(const struct ARegion *region, const rcti *rect_px); | ||||
| struct ARegion *ui_screen_region_find_mouse_over_ex(struct bScreen *screen, int x, int y); | struct ARegion *ui_screen_region_find_mouse_over_ex(struct bScreen *screen, int x, int y); | ||||
| struct ARegion *ui_screen_region_find_mouse_over(struct bScreen *screen, | struct ARegion *ui_screen_region_find_mouse_over(struct bScreen *screen, | ||||
| const struct wmEvent *event); | const struct wmEvent *event); | ||||
| /* interface_context_menu.c */ | /* interface_context_menu.c */ | ||||
| bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but); | bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but, const struct wmEvent *event); | ||||
| void ui_popup_context_menu_for_panel(struct bContext *C, | void ui_popup_context_menu_for_panel(struct bContext *C, | ||||
| struct ARegion *region, | struct ARegion *region, | ||||
| struct Panel *panel); | struct Panel *panel); | ||||
| /* interface_eyedropper.c */ | /* interface_eyedropper.c */ | ||||
| struct wmKeyMap *eyedropper_modal_keymap(struct wmKeyConfig *keyconf); | struct wmKeyMap *eyedropper_modal_keymap(struct wmKeyConfig *keyconf); | ||||
| struct wmKeyMap *eyedropper_colorband_modal_keymap(struct wmKeyConfig *keyconf); | struct wmKeyMap *eyedropper_colorband_modal_keymap(struct wmKeyConfig *keyconf); | ||||
| Show All 11 Lines | |||||
| void UI_OT_eyedropper_depth(struct wmOperatorType *ot); | void UI_OT_eyedropper_depth(struct wmOperatorType *ot); | ||||
| /* interface_eyedropper_driver.c */ | /* interface_eyedropper_driver.c */ | ||||
| void UI_OT_eyedropper_driver(struct wmOperatorType *ot); | void UI_OT_eyedropper_driver(struct wmOperatorType *ot); | ||||
| /* interface_eyedropper_gpencil_color.c */ | /* interface_eyedropper_gpencil_color.c */ | ||||
| void UI_OT_eyedropper_gpencil_color(struct wmOperatorType *ot); | void UI_OT_eyedropper_gpencil_color(struct wmOperatorType *ot); | ||||
| /* interface_template_asset_view.cc */ | |||||
| struct uiListType *UI_UL_asset_view(void); | |||||
| /** | /** | ||||
| * For use with #ui_rna_collection_search_update_fn. | * For use with #ui_rna_collection_search_update_fn. | ||||
| */ | */ | ||||
| typedef struct uiRNACollectionSearch { | typedef struct uiRNACollectionSearch { | ||||
| PointerRNA target_ptr; | PointerRNA target_ptr; | ||||
| PropertyRNA *target_prop; | PropertyRNA *target_prop; | ||||
| PointerRNA search_ptr; | PointerRNA search_ptr; | ||||
| Show All 23 Lines | |||||