Blender V2.61 - r43446

ED_markers.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version. 
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2008 Blender Foundation.
00019  * All rights reserved.
00020  *
00021  * 
00022  * Contributor(s): Blender Foundation
00023  *
00024  * ***** END GPL LICENSE BLOCK *****
00025  */
00026 
00031 #ifndef ED_MARKERS_H
00032 #define ED_MARKERS_H
00033 
00034 struct wmKeyConfig;
00035 struct wmKeyMap;
00036 struct bContext;
00037 struct bAnimContext;
00038 struct Scene;
00039 struct TimeMarker;
00040 
00041 /* Drawing API ------------------------------ */
00042 
00043 /* flags for drawing markers */
00044 enum {
00045     DRAW_MARKERS_LINES  = (1<<0),
00046     DRAW_MARKERS_LOCAL  = (1<<1)
00047 };
00048 
00049 void draw_markers_time(const struct bContext *C, int flag);
00050 
00051 /* Backend API ----------------------------- */
00052 
00053 ListBase *ED_context_get_markers(const struct bContext *C);
00054 ListBase *ED_animcontext_get_markers(const struct bAnimContext *ac);
00055 
00056 int ED_markers_post_apply_transform(ListBase *markers, struct Scene *scene, int mode, float value, char side);
00057 
00058 struct TimeMarker *ED_markers_find_nearest_marker(ListBase *markers, float x);
00059 int ED_markers_find_nearest_marker_time(ListBase *markers, float x);
00060 
00061 void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *last);
00062 
00063 void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short sel);
00064 
00065 struct TimeMarker *ED_markers_get_first_selected(ListBase *markers);
00066 
00067 /* Operators ------------------------------ */
00068 
00069 /* called in screen_ops.c:ED_operatortypes_screen() */
00070 void ED_operatortypes_marker(void); 
00071 /* called in screen_ops.c:ED_keymap_screen() */
00072 void ED_marker_keymap(struct wmKeyConfig *keyconf);
00073 
00074 /* called in animation editors - keymap defines */
00075 void ED_marker_keymap_animedit_conflictfree(struct wmKeyMap *keymap);
00076 
00077 /* debugging only */
00078 void debug_markers_print_list(struct ListBase *markers);
00079 
00080 #endif /* ED_MARKERS_H */
00081