Blender  V2.59
ED_screen_types.h
Go to the documentation of this file.
00001 /*
00002  * $Id: ED_screen_types.h 35016 2011-02-21 07:25:24Z jesterking $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version. 
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2008 Blender Foundation.
00021  * All rights reserved.
00022  *
00023  * 
00024  * Contributor(s): Blender Foundation
00025  *
00026  * ***** END GPL LICENSE BLOCK *****
00027  */
00028 
00033 #ifndef ED_SCREEN_TYPES_H__
00034 #define ED_SCREEN_TYPES_H__
00035 
00036 /* ----------------------------------------------------- */
00037 
00038 /* for animplayer */
00039 typedef struct ScreenAnimData {
00040         ARegion *ar;            /* do not read from this, only for comparing if region exists */
00041         short redraws;
00042         short refresh;
00043         short flag;                     /* flags for playback */
00044         int sfra;                       /* frame that playback was started from */
00045         int nextfra;            /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */
00046 } ScreenAnimData;
00047 
00048 /* for animplayer */
00049 enum {
00050                 /* user-setting - frame range is played backwards */
00051         ANIMPLAY_FLAG_REVERSE           = (1<<0),
00052                 /* temporary - playback just jumped to the start/end */
00053         ANIMPLAY_FLAG_JUMPED            = (1<<1),
00054                 /* drop frames as needed to maintain framerate */
00055         ANIMPLAY_FLAG_SYNC                      = (1<<2),
00056                 /* don't drop frames (and ignore SCE_FRAME_DROP flag) */
00057         ANIMPLAY_FLAG_NO_SYNC           = (1<<3),
00058                 /* use nextfra at next timer update */
00059         ANIMPLAY_FLAG_USE_NEXT_FRAME = (1<<4)
00060 };
00061 
00062 /* ----------------------------------------------------- */
00063 
00064 #define REDRAW_FRAME_AVERAGE 8
00065 
00066 /* for playback framerate info 
00067  * stored during runtime as scene->fps_info
00068  */
00069 typedef struct ScreenFrameRateInfo {
00070         double redrawtime;
00071         double lredrawtime;
00072         float redrawtimes_fps[REDRAW_FRAME_AVERAGE];
00073         short redrawtime_index;
00074 } ScreenFrameRateInfo;
00075 
00076 /* ----------------------------------------------------- */
00077 
00078 /* Enum for Action Zone Edges. Which edge of area is action zone. */
00079 typedef enum {
00080         AE_RIGHT_TO_TOPLEFT,    /* Region located on the left, _right_ edge is action zone. Region minimised to the top left */
00081         AE_LEFT_TO_TOPRIGHT,    /* Region located on the right, _left_ edge is action zone. Region minimised to the top right */
00082         AE_TOP_TO_BOTTOMRIGHT,          /* Region located at the bottom, _top_ edge is action zone. Region minimised to the bottom right */
00083         AE_BOTTOM_TO_TOPLEFT    /* Region located at the top, _bottom_edge is action zone. Region minimised to the top left */
00084 } AZEdge;
00085 
00086 /* for editing areas/regions */
00087 typedef struct AZone {
00088         struct AZone *next, *prev;
00089         ARegion *ar;
00090         int type;
00091         /* region-azone, which of the edges */
00092         AZEdge edge;
00093         /* internal */
00094         short do_draw;
00095         /* for draw */
00096         short x1, y1, x2, y2;
00097         /* for clip */
00098         rcti rect;      
00099 } AZone;
00100 
00101 /* actionzone type */
00102 #define AZONE_AREA                      1
00103 #define AZONE_REGION            2
00104 
00105 #endif /* ED_SCREEN_TYPES_H__ */