Blender  V2.93
ED_screen_types.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 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /* ----------------------------------------------------- */
31 
32 /* for animplayer */
33 typedef struct ScreenAnimData {
34  ARegion *region; /* do not read from this, only for comparing if region exists */
35  short redraws;
36  short flag; /* flags for playback */
37  int sfra; /* frame that playback was started from */
38  int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */
39  double lagging_frame_count; /* used for frame dropping */
40  bool from_anim_edit; /* playback was invoked from animation editor */
42 
43 /* for animplayer */
44 enum {
45  /* user-setting - frame range is played backwards */
47  /* temporary - playback just jumped to the start/end */
49  /* drop frames as needed to maintain framerate */
50  ANIMPLAY_FLAG_SYNC = (1 << 2),
51  /* don't drop frames (and ignore SCE_FRAME_DROP flag) */
53  /* use nextfra at next timer update */
55 };
56 
57 /* ----------------------------------------------------- */
58 
59 #define REDRAW_FRAME_AVERAGE 8
60 
61 /* for playback framerate info
62  * stored during runtime as scene->fps_info
63  */
64 typedef struct ScreenFrameRateInfo {
65  double redrawtime;
66  double lredrawtime;
70 
71 /* ----------------------------------------------------- */
72 
73 /* Enum for Action Zone Edges. Which edge of area is action zone. */
74 typedef enum {
87 } AZEdge;
88 
89 typedef enum {
93 
94 /* for editing areas/regions */
95 typedef struct AZone {
96  struct AZone *next, *prev;
98  int type;
99 
100  union {
101  /* region-azone, which of the edges (only for AZONE_REGION) */
104  };
105  /* for draw */
106  short x1, y1, x2, y2;
107  /* for clip */
109  /* for fade in/out */
110  float alpha;
112 
114 enum {
137 };
138 
139 #ifdef __cplusplus
140 }
141 #endif
@ AZONE_REGION
@ AZONE_FULLSCREEN
@ AZONE_REGION_SCROLL
@ AZONE_AREA
struct ScreenAnimData ScreenAnimData
@ ANIMPLAY_FLAG_JUMPED
@ ANIMPLAY_FLAG_NO_SYNC
@ ANIMPLAY_FLAG_REVERSE
@ ANIMPLAY_FLAG_SYNC
@ ANIMPLAY_FLAG_USE_NEXT_FRAME
struct AZone AZone
AZScrollDirection
@ AZ_SCROLL_HOR
@ AZ_SCROLL_VERT
struct ScreenFrameRateInfo ScreenFrameRateInfo
AZEdge
@ AE_LEFT_TO_TOPRIGHT
@ AE_RIGHT_TO_TOPLEFT
@ AE_BOTTOM_TO_TOPLEFT
@ AE_TOP_TO_BOTTOMRIGHT
#define REDRAW_FRAME_AVERAGE
short y2
float alpha
struct AZone * next
AZEdge edge
ARegion * region
short x1
short x2
AZScrollDirection direction
short y1
struct AZone * prev
ARegion * region
double lagging_frame_count
float redrawtimes_fps[REDRAW_FRAME_AVERAGE]