Blender  V2.59
ED_markers.h
Go to the documentation of this file.
00001 /*
00002  * $Id: ED_markers.h 35537 2011-03-14 10:45:42Z aligorith $
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_MARKERS_H
00034 #define ED_MARKERS_H
00035 
00036 struct wmKeyConfig;
00037 struct bContext;
00038 struct bAnimContext;
00039 struct Scene;
00040 struct TimeMarker;
00041 
00042 /* Drawing API ------------------------------ */
00043 
00044 /* flags for drawing markers */
00045 enum {
00046         DRAW_MARKERS_LINES      = (1<<0),
00047         DRAW_MARKERS_LOCAL      = (1<<1)
00048 };
00049 
00050 void draw_markers_time(const struct bContext *C, int flag);
00051 
00052 /* Backend API ----------------------------- */
00053 
00054 ListBase *ED_context_get_markers(const struct bContext *C);
00055 ListBase *ED_animcontext_get_markers(const struct bAnimContext *ac);
00056 
00057 int ED_markers_post_apply_transform(ListBase *markers, struct Scene *scene, int mode, float value, char side);
00058 
00059 struct TimeMarker *ED_markers_find_nearest_marker(ListBase *markers, float x);
00060 int ED_markers_find_nearest_marker_time(ListBase *markers, float x);
00061 
00062 void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *last);
00063 
00064 void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short sel);
00065 
00066 struct TimeMarker *ED_markers_get_first_selected(ListBase *markers);
00067 
00068 /* Operators ------------------------------ */
00069 
00070 /* called in screen_ops.c:ED_operatortypes_screen() */
00071 void ED_operatortypes_marker(void); 
00072 /* called in screen_ops.c:ED_keymap_screen() */
00073 void ED_marker_keymap(struct wmKeyConfig *keyconf);
00074 
00075 /* debugging only */
00076 void debug_markers_print_list(struct ListBase *markers);
00077 
00078 #endif /* ED_MARKERS_H */
00079