Blender  V3.3
ED_screen_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /* ----------------------------------------------------- */
15 
19 typedef struct ScreenAnimData {
20  ARegion *region; /* do not read from this, only for comparing if region exists */
21  short redraws;
22  short flag; /* flags for playback */
23  int sfra; /* frame that playback was started from */
24  int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */
25  double lagging_frame_count; /* used for frame dropping */
26  bool from_anim_edit; /* playback was invoked from animation editor */
28 
30 enum {
31  /* user-setting - frame range is played backwards */
33  /* temporary - playback just jumped to the start/end */
35  /* drop frames as needed to maintain framerate */
36  ANIMPLAY_FLAG_SYNC = (1 << 2),
37  /* don't drop frames (and ignore SCE_FRAME_DROP flag) */
39  /* use nextfra at next timer update */
41 };
42 
43 /* ----------------------------------------------------- */
44 
45 #define REDRAW_FRAME_AVERAGE 8
46 
47 /* for playback framerate info
48  * stored during runtime as scene->fps_info
49  */
50 typedef struct ScreenFrameRateInfo {
51  double redrawtime;
52  double lredrawtime;
56 
57 /* ----------------------------------------------------- */
58 
59 /* Enum for Action Zone Edges. Which edge of area is action zone. */
60 typedef enum {
73 } AZEdge;
74 
75 typedef enum {
79 
80 /* for editing areas/regions */
81 typedef struct AZone {
82  struct AZone *next, *prev;
84  int type;
85 
86  union {
87  /* region-azone, which of the edges (only for AZONE_REGION) */
90  };
91  /* for draw */
92  short x1, y1, x2, y2;
93  /* for clip */
95  /* for fade in/out */
96  float alpha;
98 
100 enum {
123 };
124 
125 #ifdef __cplusplus
126 }
127 #endif
struct ScreenAnimData ScreenAnimData
@ AZONE_REGION
@ AZONE_FULLSCREEN
@ AZONE_REGION_SCROLL
@ AZONE_AREA
struct AZone AZone
AZScrollDirection
@ AZ_SCROLL_HOR
@ AZ_SCROLL_VERT
struct ScreenFrameRateInfo ScreenFrameRateInfo
@ ANIMPLAY_FLAG_JUMPED
@ ANIMPLAY_FLAG_NO_SYNC
@ ANIMPLAY_FLAG_REVERSE
@ ANIMPLAY_FLAG_SYNC
@ ANIMPLAY_FLAG_USE_NEXT_FRAME
AZEdge
@ AE_LEFT_TO_TOPRIGHT
@ AE_RIGHT_TO_TOPLEFT
@ AE_BOTTOM_TO_TOPLEFT
@ AE_TOP_TO_BOTTOMRIGHT
#define REDRAW_FRAME_AVERAGE
rcti rect
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]