Blender  V2.93
screen_intern.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 struct Main;
27 struct bContext;
28 struct bContextDataResult;
29 
30 /* internal exports only */
31 
32 #define AZONESPOTW UI_HEADER_OFFSET /* width of corner #AZone - max */
33 #define AZONESPOTH (0.6f * U.widget_unit) /* height of corner #AZone */
34 #define AZONEFADEIN (5.0f * U.widget_unit) /* when #AZone is totally visible */
35 #define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the #AZone */
36 
37 #define AREAJOINTOLERANCE (1.0f * U.widget_unit) /* Edges must be close to allow joining. */
38 
39 /* Expanded interaction influence of area borders. */
40 #define BORDERPADDING (U.dpi_fac + U.pixelsize)
41 
42 /* area.c */
43 void ED_area_data_copy(ScrArea *area_dst, ScrArea *area_src, const bool do_free);
44 void ED_area_data_swap(ScrArea *area_dst, ScrArea *area_src);
45 void region_toggle_hidden(struct bContext *C, ARegion *region, const bool do_fade);
46 
47 /* screen_edit.c */
48 bScreen *screen_add(struct Main *bmain, const char *name, const rcti *rect);
50 void screen_new_activate_prepare(const wmWindow *win, bScreen *screen_new);
51 void screen_change_update(struct bContext *C, wmWindow *win, bScreen *screen);
52 void screen_change_prepare(bScreen *screen_old,
53  bScreen *screen_new,
54  struct Main *bmain,
55  struct bContext *C,
56  wmWindow *win);
58  const wmWindow *win, bScreen *screen, ScrArea *area, char dir, float fac, int merge);
59 int screen_area_join(struct bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2);
61 
62 struct AZone *ED_area_actionzone_find_xy(ScrArea *area, const int xy[2]);
63 
64 /* screen_geometry.c */
67 ScrVert *screen_geom_vertex_add_ex(ScrAreaMap *area_map, short x, short y);
68 ScrVert *screen_geom_vertex_add(bScreen *screen, short x, short y);
73  const rcti *bounds_rect,
74  const int mx,
75  const int my);
77  const bScreen *screen,
78  const int mx,
79  const int my);
80 void screen_geom_vertices_scale(const wmWindow *win, bScreen *screen);
82  const rcti *window_rect,
83  char dir,
84  float fac);
86 
87 /* screen_context.c */
88 int ed_screen_context(const struct bContext *C,
89  const char *member,
90  struct bContextDataResult *result);
91 
92 extern const char *screen_context_dir[]; /* doc access */
93 
94 /* screendump.c */
96 
97 /* workspace_layout_edit.c */
98 bool workspace_layout_set_poll(const struct WorkSpaceLayout *layout);
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
#define C
Definition: RandGen.cpp:39
ATTR_WARN_UNUSED_RESULT const BMVert * v2
StackEntry * from
static void area(int d1, int d2, int e1, int e2, float weights[2])
void region_toggle_hidden(struct bContext *C, ARegion *region, const bool do_fade)
Definition: area.c:2043
const char * screen_context_dir[]
struct AZone * ED_area_actionzone_find_xy(ScrArea *area, const int xy[2])
Definition: screen_ops.c:945
int screen_area_join(struct bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2)
Definition: screen_edit.c:396
void screen_new_activate_prepare(const wmWindow *win, bScreen *screen_new)
Definition: screen_edit.c:275
int area_getorientation(ScrArea *area, ScrArea *sb)
Definition: screen_edit.c:285
short screen_geom_find_area_split_point(const ScrArea *area, const rcti *window_rect, char dir, float fac)
ScrEdge * screen_geom_area_map_find_active_scredge(const struct ScrAreaMap *area_map, const rcti *bounds_rect, const int mx, const int my)
void screen_change_prepare(bScreen *screen_old, bScreen *screen_new, struct Main *bmain, struct bContext *C, wmWindow *win)
Definition: screen_edit.c:985
void screen_geom_select_connected_edge(const wmWindow *win, ScrEdge *edge)
bool screen_geom_edge_is_horizontal(ScrEdge *se)
ScrEdge * screen_geom_find_active_scredge(const wmWindow *win, const bScreen *screen, const int mx, const int my)
bool workspace_layout_set_poll(const struct WorkSpaceLayout *layout)
void ED_area_data_copy(ScrArea *area_dst, ScrArea *area_src, const bool do_free)
Definition: area.c:2067
ScrEdge * screen_geom_edge_add(bScreen *screen, ScrVert *v1, ScrVert *v2)
ScrVert * screen_geom_vertex_add(bScreen *screen, short x, short y)
int ed_screen_context(const struct bContext *C, const char *member, struct bContextDataResult *result)
int screen_geom_area_width(const ScrArea *area)
void ED_area_data_swap(ScrArea *area_dst, ScrArea *area_src)
Definition: area.c:2100
void screen_change_update(struct bContext *C, wmWindow *win, bScreen *screen)
Definition: screen_edit.c:1013
bScreen * screen_add(struct Main *bmain, const char *name, const rcti *rect)
Definition: screen_edit.c:204
ScrEdge * screen_geom_edge_add_ex(ScrAreaMap *area_map, ScrVert *v1, ScrVert *v2)
int screen_geom_area_height(const ScrArea *area)
ScrArea * area_split(const wmWindow *win, bScreen *screen, ScrArea *area, char dir, float fac, int merge)
Definition: screen_edit.c:107
void screen_data_copy(bScreen *to, bScreen *from)
Definition: screen_edit.c:226
ScrVert * screen_geom_vertex_add_ex(ScrAreaMap *area_map, short x, short y)
void SCREEN_OT_screenshot(struct wmOperatorType *ot)
Definition: screendump.c:231
void screen_geom_vertices_scale(const wmWindow *win, bScreen *screen)
Main screen-layout calculation function.
AZEdge edge
Definition: BKE_main.h:116
Wrapper for bScreen.
const char ** dir
Definition: context.c:252
__forceinline BoundBox merge(const BoundBox &bbox, const float3 &pt)
wmOperatorType * ot
Definition: wm_files.c:3156