Blender V2.61 - r43446

ED_screen.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_SCREEN_H
00032 #define ED_SCREEN_H
00033 
00034 #include "DNA_screen_types.h"
00035 #include "DNA_space_types.h"
00036 #include "DNA_view2d_types.h"
00037 #include "DNA_view3d_types.h"
00038 
00039 struct wmWindowManager;
00040 struct wmWindow;
00041 struct wmNotifier;
00042 struct wmEvent;
00043 struct wmKeyConfig;
00044 struct bContext;
00045 struct SpaceType;
00046 struct Scene;
00047 struct bScreen;
00048 struct ARegion;
00049 struct uiBlock;
00050 struct rcti;
00051 
00052 /* regions */
00053 void    ED_region_do_listen(struct ARegion *ar, struct wmNotifier *note);
00054 void    ED_region_do_draw(struct bContext *C, struct ARegion *ar);
00055 void    ED_region_exit(struct bContext *C, struct ARegion *ar);
00056 void    ED_region_pixelspace(struct ARegion *ar);
00057 void    ED_region_set(const struct bContext *C, struct ARegion *ar);
00058 void    ED_region_init(struct bContext *C, struct ARegion *ar);
00059 void    ED_region_tag_redraw(struct ARegion *ar);
00060 void    ED_region_tag_redraw_partial(struct ARegion *ar, struct rcti *rct);
00061 void    ED_region_tag_redraw_overlay(struct ARegion *ar);
00062 void    ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *ar);
00063 void    ED_region_panels(const struct bContext *C, struct ARegion *ar, int vertical, const char *context, int contextnr);
00064 void    ED_region_header_init(struct ARegion *ar);
00065 void    ED_region_header(const struct bContext *C, struct ARegion *ar);
00066 void    ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar);
00067 void    region_scissor_winrct(struct ARegion *ar, struct rcti *winrct);
00068 void    ED_region_info_draw(struct ARegion *ar, const char *text, int block, float alpha);
00069 
00070 /* spaces */
00071 void    ED_spacetypes_init(void);
00072 void    ED_spacetypes_keymap(struct wmKeyConfig *keyconf);
00073 int     ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco);
00074 int     ED_area_header_standardbuttons(const struct bContext *C, struct uiBlock *block, int yco);
00075 void    ED_area_overdraw(struct bContext *C);
00076 void    ED_area_overdraw_flush(struct ScrArea *sa, struct ARegion *ar);
00077 
00078 
00079 /* areas */
00080 void    ED_area_initialize(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *sa);
00081 void    ED_area_exit(struct bContext *C, struct ScrArea *sa);
00082 int     ED_screen_area_active(const struct bContext *C);
00083 void    ED_area_do_listen(ScrArea *sa, struct wmNotifier *note);
00084 void    ED_area_tag_redraw(ScrArea *sa);
00085 void    ED_area_tag_redraw_regiontype(ScrArea *sa, int type);
00086 void    ED_area_tag_refresh(ScrArea *sa);
00087 void    ED_area_do_refresh(struct bContext *C, ScrArea *sa);
00088 void    ED_area_headerprint(ScrArea *sa, const char *str);
00089 void    ED_area_newspace(struct bContext *C, ScrArea *sa, int type);
00090 void    ED_area_prevspace(struct bContext *C, ScrArea *sa);
00091 void    ED_area_swapspace(struct bContext *C, ScrArea *sa1, ScrArea *sa2);
00092 int     ED_area_headersize(void);
00093 
00094 /* screens */
00095 void    ED_screens_initialize(struct wmWindowManager *wm);
00096 void    ED_screen_draw(struct wmWindow *win);
00097 void    ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win);
00098 void    ED_screen_do_listen(struct bContext *C, struct wmNotifier *note);
00099 bScreen *ED_screen_duplicate(struct wmWindow *win, struct bScreen *sc);
00100 bScreen *ED_screen_add(struct wmWindow *win, struct Scene *scene, const char *name);
00101 void    ED_screen_set(struct bContext *C, struct bScreen *sc);
00102 void    ED_screen_delete(struct bContext *C, struct bScreen *sc);
00103 void    ED_screen_set_scene(struct bContext *C, struct Scene *scene);
00104 void    ED_screen_delete_scene(struct bContext *C, struct Scene *scene);
00105 void    ED_screen_set_subwinactive(struct bContext *C, struct wmEvent *event);
00106 void    ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen);
00107 void    ED_screen_animation_timer(struct bContext *C, int redraws, int refresh, int sync, int enable);
00108 void    ED_screen_animation_timer_update(struct bScreen *screen, int redraws, int refresh);
00109 ScrArea *ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type);
00110 void    ED_screen_full_prevspace(struct bContext *C, ScrArea *sa);
00111 void    ED_screen_full_restore(struct bContext *C, ScrArea *sa);
00112 struct ScrArea *ED_screen_full_toggle(struct bContext *C, struct wmWindow *win, struct ScrArea *sa);
00113 
00114 void    ED_screen_new_window(struct bContext *C, struct rcti *position, int type);
00115 
00116 /* anim */
00117 void    ED_update_for_newframe(struct Main *bmain, struct Scene *scene, struct bScreen *screen, int mute);
00118 
00119 void    ED_refresh_viewport_fps(struct bContext *C);
00120 int ED_screen_animation_play(struct bContext *C, int sync, int mode);
00121 
00122 /* screen keymaps */
00123 void    ED_operatortypes_screen(void);
00124 void    ED_keymap_screen(struct wmKeyConfig *keyconf);
00125 
00126 /* operators; context poll callbacks */
00127 int     ED_operator_screenactive(struct bContext *C);
00128 int     ED_operator_screen_mainwinactive(struct bContext *C);
00129 int     ED_operator_areaactive(struct bContext *C);
00130 int     ED_operator_regionactive(struct bContext *C);
00131 
00132 int     ED_operator_scene_editable(struct bContext *C);
00133 int     ED_operator_objectmode(struct bContext *C);
00134 
00135 int     ED_operator_view3d_active(struct bContext *C);
00136 int     ED_operator_region_view3d_active(struct bContext *C);
00137 int     ED_operator_animview_active(struct bContext *C);
00138 int     ED_operator_timeline_active(struct bContext *C);
00139 int     ED_operator_outliner_active(struct bContext *C);
00140 int     ED_operator_outliner_active_no_editobject(struct bContext *C);
00141 int     ED_operator_file_active(struct bContext *C);
00142 int     ED_operator_action_active(struct bContext *C);
00143 int     ED_operator_buttons_active(struct bContext *C);
00144 int     ED_operator_node_active(struct bContext *C);
00145 int     ED_operator_graphedit_active(struct bContext *C);
00146 int     ED_operator_sequencer_active(struct bContext *C);
00147 int     ED_operator_image_active(struct bContext *C);
00148 int     ED_operator_nla_active(struct bContext *C);
00149 int     ED_operator_logic_active(struct bContext *C);
00150 int     ED_operator_info_active(struct bContext *C);
00151 int     ED_operator_console_active(struct bContext *C);
00152 
00153 
00154 int     ED_operator_object_active(struct bContext *C);
00155 int     ED_operator_object_active_editable(struct bContext *C);
00156 int     ED_operator_object_active_editable_mesh(struct bContext *C);
00157 int     ED_operator_object_active_editable_font(struct bContext *C);
00158 int     ED_operator_editmesh(struct bContext *C);
00159 int     ED_operator_editmesh_view3d(struct bContext *C);
00160 int     ED_operator_editmesh_region_view3d(struct bContext *C);
00161 int     ED_operator_editarmature(struct bContext *C);
00162 int     ED_operator_editcurve(struct bContext *C);
00163 int     ED_operator_editcurve_3d(struct bContext *C);
00164 int     ED_operator_editsurf(struct bContext *C);
00165 int     ED_operator_editsurfcurve(struct bContext *C);
00166 int     ED_operator_editsurfcurve_region_view3d(struct bContext *C);
00167 int     ED_operator_editfont(struct bContext *C);
00168 int     ED_operator_editlattice(struct bContext *C);
00169 int     ED_operator_editmball(struct bContext *C);
00170 int     ED_operator_uvedit(struct bContext *C);
00171 int     ED_operator_uvmap(struct bContext *C);
00172 int     ED_operator_posemode(struct bContext *C);
00173 
00174 
00175 /* default keymaps, bitflags */
00176 #define ED_KEYMAP_UI        1
00177 #define ED_KEYMAP_VIEW2D    2
00178 #define ED_KEYMAP_MARKERS   4
00179 #define ED_KEYMAP_ANIMATION 8
00180 #define ED_KEYMAP_FRAMES    16
00181 #define ED_KEYMAP_GPENCIL   32
00182 #define ED_KEYMAP_HEADER    64
00183 
00184 #endif /* ED_SCREEN_H */
00185