Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_intern.h
| Show All 23 Lines | |||||
| #pragma once | #pragma once | ||||
| struct Main; | struct Main; | ||||
| struct bContext; | struct bContext; | ||||
| struct bContextDataResult; | struct bContextDataResult; | ||||
| /* internal exports only */ | /* internal exports only */ | ||||
| typedef enum eScreenDir { | |||||
| /** This can mean unset, unknown or invalid. */ | |||||
| SCREEN_DIR_NONE = -1, | |||||
| /** West/Left. */ | |||||
| SCREEN_DIR_W = 0, | |||||
| /** North/Up. */ | |||||
| SCREEN_DIR_N = 1, | |||||
| /** East/Right. */ | |||||
| SCREEN_DIR_E = 2, | |||||
| /** South/Down. */ | |||||
| SCREEN_DIR_S = 3, | |||||
| } eScreenDir; | |||||
| #define SCREEN_DIR_IS_VERTICAL(dir) (ELEM(dir, SCREEN_DIR_N, SCREEN_DIR_S)) | |||||
| #define SCREEN_DIR_IS_HORIZONTAL(dir) (ELEM(dir, SCREEN_DIR_W, SCREEN_DIR_E)) | |||||
| typedef enum eScreenAxis { | |||||
| /** Horizontal. */ | |||||
| SCREEN_AXIS_H = 'h', | |||||
| /** Vertical. */ | |||||
| SCREEN_AXIS_V = 'v', | |||||
| } eScreenAxis; | |||||
| #define AZONESPOTW UI_HEADER_OFFSET /* width of corner #AZone - max */ | #define AZONESPOTW UI_HEADER_OFFSET /* width of corner #AZone - max */ | ||||
| #define AZONESPOTH (0.6f * U.widget_unit) /* height of corner #AZone */ | #define AZONESPOTH (0.6f * U.widget_unit) /* height of corner #AZone */ | ||||
| #define AZONEFADEIN (5.0f * U.widget_unit) /* when #AZone is totally visible */ | #define AZONEFADEIN (5.0f * U.widget_unit) /* when #AZone is totally visible */ | ||||
| #define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the #AZone */ | #define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the #AZone */ | ||||
| /* Edges must be within these to allow joining. */ | /* Edges must be within these to allow joining. */ | ||||
| #define AREAJOINTOLERANCEX (AREAMINX * U.dpi_fac) | #define AREAJOINTOLERANCEX (AREAMINX * U.dpi_fac) | ||||
| #define AREAJOINTOLERANCEY (HEADERY * U.dpi_fac) | #define AREAJOINTOLERANCEY (HEADERY * U.dpi_fac) | ||||
| /* Expanded interaction influence of area borders. */ | /* Expanded interaction influence of area borders. */ | ||||
| #define BORDERPADDING (U.dpi_fac + U.pixelsize) | #define BORDERPADDING (U.dpi_fac + U.pixelsize) | ||||
| /* area.c */ | /* area.c */ | ||||
| void ED_area_data_copy(ScrArea *area_dst, ScrArea *area_src, const bool do_free); | void ED_area_data_copy(ScrArea *area_dst, ScrArea *area_src, const bool do_free); | ||||
| void ED_area_data_swap(ScrArea *area_dst, ScrArea *area_src); | void ED_area_data_swap(ScrArea *area_dst, ScrArea *area_src); | ||||
| void region_toggle_hidden(struct bContext *C, ARegion *region, const bool do_fade); | void region_toggle_hidden(struct bContext *C, ARegion *region, const bool do_fade); | ||||
| /* screen_draw.c */ | |||||
| void screen_draw_join_highlight(struct ScrArea *sa1, struct ScrArea *sa2); | |||||
| void screen_draw_split_preview(struct ScrArea *area, const eScreenAxis dir_axis, const float fac); | |||||
| /* screen_edit.c */ | /* screen_edit.c */ | ||||
| bScreen *screen_add(struct Main *bmain, const char *name, const rcti *rect); | bScreen *screen_add(struct Main *bmain, const char *name, const rcti *rect); | ||||
| void screen_data_copy(bScreen *to, bScreen *from); | void screen_data_copy(bScreen *to, bScreen *from); | ||||
| void screen_new_activate_prepare(const wmWindow *win, bScreen *screen_new); | void screen_new_activate_prepare(const wmWindow *win, bScreen *screen_new); | ||||
| void screen_change_update(struct bContext *C, wmWindow *win, bScreen *screen); | void screen_change_update(struct bContext *C, wmWindow *win, bScreen *screen); | ||||
| void screen_change_prepare(bScreen *screen_old, | void screen_change_prepare(bScreen *screen_old, | ||||
| bScreen *screen_new, | bScreen *screen_new, | ||||
| struct Main *bmain, | struct Main *bmain, | ||||
| struct bContext *C, | struct bContext *C, | ||||
| wmWindow *win); | wmWindow *win); | ||||
| ScrArea *area_split(const wmWindow *win, | ScrArea *area_split(const wmWindow *win, | ||||
| bScreen *screen, | bScreen *screen, | ||||
| ScrArea *area, | ScrArea *area, | ||||
| char dir, | const eScreenAxis dir_axis, | ||||
| const float fac, | const float fac, | ||||
| const bool merge); | const bool merge); | ||||
| int screen_area_join(struct bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2); | int screen_area_join(struct bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2); | ||||
| int area_getorientation(ScrArea *sa_a, ScrArea *sa_b); | eScreenDir area_getorientation(ScrArea *sa_a, ScrArea *sa_b); | ||||
| void area_getoffsets(ScrArea *sa_a, ScrArea *sa_b, const int dir, int *r_offset1, int *r_offset2); | void area_getoffsets( | ||||
| ScrArea *sa_a, ScrArea *sa_b, const eScreenDir dir, int *r_offset1, int *r_offset2); | |||||
| bool screen_area_close(struct bContext *C, bScreen *screen, ScrArea *area); | bool screen_area_close(struct bContext *C, bScreen *screen, ScrArea *area); | ||||
| struct AZone *ED_area_actionzone_find_xy(ScrArea *area, const int xy[2]); | struct AZone *ED_area_actionzone_find_xy(ScrArea *area, const int xy[2]); | ||||
| /* screen_geometry.c */ | /* screen_geometry.c */ | ||||
| int screen_geom_area_height(const ScrArea *area); | int screen_geom_area_height(const ScrArea *area); | ||||
| int screen_geom_area_width(const ScrArea *area); | int screen_geom_area_width(const ScrArea *area); | ||||
| ScrVert *screen_geom_vertex_add_ex(ScrAreaMap *area_map, short x, short y); | ScrVert *screen_geom_vertex_add_ex(ScrAreaMap *area_map, short x, short y); | ||||
| ScrVert *screen_geom_vertex_add(bScreen *screen, short x, short y); | ScrVert *screen_geom_vertex_add(bScreen *screen, short x, short y); | ||||
| ScrEdge *screen_geom_edge_add_ex(ScrAreaMap *area_map, ScrVert *v1, ScrVert *v2); | ScrEdge *screen_geom_edge_add_ex(ScrAreaMap *area_map, ScrVert *v1, ScrVert *v2); | ||||
| ScrEdge *screen_geom_edge_add(bScreen *screen, ScrVert *v1, ScrVert *v2); | ScrEdge *screen_geom_edge_add(bScreen *screen, ScrVert *v1, ScrVert *v2); | ||||
| bool screen_geom_edge_is_horizontal(ScrEdge *se); | bool screen_geom_edge_is_horizontal(ScrEdge *se); | ||||
| ScrEdge *screen_geom_area_map_find_active_scredge(const struct ScrAreaMap *area_map, | ScrEdge *screen_geom_area_map_find_active_scredge(const struct ScrAreaMap *area_map, | ||||
| const rcti *bounds_rect, | const rcti *bounds_rect, | ||||
| const int mx, | const int mx, | ||||
| const int my); | const int my); | ||||
| ScrEdge *screen_geom_find_active_scredge(const wmWindow *win, | ScrEdge *screen_geom_find_active_scredge(const wmWindow *win, | ||||
| const bScreen *screen, | const bScreen *screen, | ||||
| const int mx, | const int mx, | ||||
| const int my); | const int my); | ||||
| void screen_geom_vertices_scale(const wmWindow *win, bScreen *screen); | void screen_geom_vertices_scale(const wmWindow *win, bScreen *screen); | ||||
| short screen_geom_find_area_split_point(const ScrArea *area, | short screen_geom_find_area_split_point(const ScrArea *area, | ||||
| const rcti *window_rect, | const rcti *window_rect, | ||||
| char dir, | const eScreenAxis dir_axis, | ||||
| float fac); | float fac); | ||||
| void screen_geom_select_connected_edge(const wmWindow *win, ScrEdge *edge); | void screen_geom_select_connected_edge(const wmWindow *win, ScrEdge *edge); | ||||
| /* screen_context.c */ | /* screen_context.c */ | ||||
| int ed_screen_context(const struct bContext *C, | int ed_screen_context(const struct bContext *C, | ||||
| const char *member, | const char *member, | ||||
| struct bContextDataResult *result); | struct bContextDataResult *result); | ||||
| extern const char *screen_context_dir[]; /* doc access */ | extern const char *screen_context_dir[]; /* doc access */ | ||||
| /* screendump.c */ | /* screendump.c */ | ||||
| void SCREEN_OT_screenshot(struct wmOperatorType *ot); | void SCREEN_OT_screenshot(struct wmOperatorType *ot); | ||||
| /* workspace_layout_edit.c */ | /* workspace_layout_edit.c */ | ||||
| bool workspace_layout_set_poll(const struct WorkSpaceLayout *layout); | bool workspace_layout_set_poll(const struct WorkSpaceLayout *layout); | ||||