2008-01-01 18:29:19 +00:00
|
|
|
/**
|
|
|
|
* $Id:
|
|
|
|
*
|
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
#ifndef ED_SCREEN_H
|
|
|
|
#define ED_SCREEN_H
|
|
|
|
|
|
|
|
#include "DNA_screen_types.h"
|
2008-01-07 18:03:41 +00:00
|
|
|
#include "DNA_space_types.h"
|
|
|
|
#include "DNA_view2d_types.h"
|
|
|
|
#include "DNA_view3d_types.h"
|
|
|
|
|
|
|
|
struct wmWindowManager;
|
|
|
|
struct wmWindow;
|
|
|
|
struct wmNotifier;
|
2008-12-15 18:43:18 +00:00
|
|
|
struct wmEvent;
|
2008-12-19 14:14:43 +00:00
|
|
|
struct bContext;
|
2008-12-08 15:02:57 +00:00
|
|
|
struct SpaceType;
|
|
|
|
struct AreagionType;
|
2008-12-14 12:16:55 +00:00
|
|
|
struct uiBlock;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
/* regions */
|
|
|
|
void ED_region_do_listen(ARegion *ar, struct wmNotifier *note);
|
2008-12-10 17:58:18 +00:00
|
|
|
void ED_region_do_draw(struct bContext *C, struct ARegion *ar);
|
|
|
|
void ED_region_exit(struct bContext *C, struct ARegion *ar);
|
2008-12-19 14:14:43 +00:00
|
|
|
void ED_region_pixelspace(struct ARegion *ar);
|
2008-12-10 17:58:18 +00:00
|
|
|
void ED_region_init(struct bContext *C, struct ARegion *ar);
|
2008-12-16 12:28:00 +00:00
|
|
|
void ED_region_tag_redraw(struct ARegion *ar);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
/* spaces */
|
|
|
|
void ED_spacetypes_init(void);
|
2.5 Branch
==========
* Changed wmOperatorType, removing init/exit callbacks and adding cancel
callback, removed default storage in favor of properties. Defined return
values for exec/invoke/modal/cancel.
* Don't allocate operator on the stack, and removed operator copy for
handlers. Now it frees based on return values from callbacks, and just
keeps a wmOperator on the heap. Also it now registers after the operator
is fully finished, to get the correct final properties.
* Changed OP_get_* functions to return 1 if the property is found and 0
otherwise, gives more readable code in my opinion. Added OP_verify_*
functions to quickly check if the property is available and set if it's
not, that's common for exec/invoke.
* Removed WM_operatortypelist_append in favor of WM_operatortype_append
which takes a function pointer instead of a list, avoids macro's and
duplicating code.
* Fix a crash where the handler would still be used while it was freed by
the operator.
* Spacetypes now have operatortypes() and keymap() callbacks to abstract
them a bit more.
* Renamed C->curarea to C->area for consistency. Removed View3D/View2D/
SpaceIpo from bContext, seems bad to keep these.
* Set context variables like window/screen/area/region to NULL again when
leaving that context, instead of leaving the pointers there.
* Added if(G.f & G_DEBUG) for many of the prints, makes output a bit
cleaner and easier to debug.
* Fixed priority of the editors/interface module in scons, would otherwise
give link errors.
* Added start of generic view2d api.
* Added space_time with some basic drawing and a single operator to change
the frame.
2008-06-11 10:10:31 +00:00
|
|
|
void ED_spacetypes_keymap(struct wmWindowManager *wm);
|
2008-12-14 12:16:55 +00:00
|
|
|
struct ARegionType *ED_regiontype_from_id(struct SpaceType *st, int regionid);
|
2008-12-19 14:14:43 +00:00
|
|
|
int ED_area_header_standardbuttons(const struct bContext *C, struct uiBlock *block, int yco);
|
2008-12-16 18:42:12 +00:00
|
|
|
void ED_area_overdraw(struct bContext *C);
|
|
|
|
void ED_area_overdraw_flush(struct bContext *C);
|
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
/* areas */
|
|
|
|
void ED_area_initialize(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *sa);
|
2008-12-10 17:58:18 +00:00
|
|
|
void ED_area_exit(struct bContext *C, struct ScrArea *sa);
|
|
|
|
int ED_screen_area_active(const struct bContext *C);
|
2008-12-16 12:28:00 +00:00
|
|
|
void ED_area_tag_redraw(ScrArea *sa);
|
2008-12-21 17:18:36 +00:00
|
|
|
void ED_area_headerprint(ScrArea *sa, const char *str);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
/* screens */
|
|
|
|
void ED_screens_initialize(struct wmWindowManager *wm);
|
|
|
|
void ED_screen_draw(struct wmWindow *win);
|
|
|
|
void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win);
|
2008-01-19 17:54:05 +00:00
|
|
|
void ED_screen_do_listen(struct wmWindow *win, struct wmNotifier *note);
|
2008-12-10 17:58:18 +00:00
|
|
|
bScreen *ED_screen_duplicate(struct wmWindow *win, struct bScreen *sc);
|
2008-12-15 18:43:18 +00:00
|
|
|
void ED_screen_set_subwinactive(struct wmWindow *win, struct wmEvent *event);
|
2008-12-10 17:58:18 +00:00
|
|
|
void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen);
|
2008-12-22 12:57:53 +00:00
|
|
|
void ED_screen_animation_timer(struct bContext *C, int enable);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2.5 Branch
==========
* Changed wmOperatorType, removing init/exit callbacks and adding cancel
callback, removed default storage in favor of properties. Defined return
values for exec/invoke/modal/cancel.
* Don't allocate operator on the stack, and removed operator copy for
handlers. Now it frees based on return values from callbacks, and just
keeps a wmOperator on the heap. Also it now registers after the operator
is fully finished, to get the correct final properties.
* Changed OP_get_* functions to return 1 if the property is found and 0
otherwise, gives more readable code in my opinion. Added OP_verify_*
functions to quickly check if the property is available and set if it's
not, that's common for exec/invoke.
* Removed WM_operatortypelist_append in favor of WM_operatortype_append
which takes a function pointer instead of a list, avoids macro's and
duplicating code.
* Fix a crash where the handler would still be used while it was freed by
the operator.
* Spacetypes now have operatortypes() and keymap() callbacks to abstract
them a bit more.
* Renamed C->curarea to C->area for consistency. Removed View3D/View2D/
SpaceIpo from bContext, seems bad to keep these.
* Set context variables like window/screen/area/region to NULL again when
leaving that context, instead of leaving the pointers there.
* Added if(G.f & G_DEBUG) for many of the prints, makes output a bit
cleaner and easier to debug.
* Fixed priority of the editors/interface module in scons, would otherwise
give link errors.
* Added start of generic view2d api.
* Added space_time with some basic drawing and a single operator to change
the frame.
2008-06-11 10:10:31 +00:00
|
|
|
void ED_operatortypes_screen(void);
|
|
|
|
void ED_keymap_screen(struct wmWindowManager *wm);
|
2008-01-01 18:29:19 +00:00
|
|
|
|
2008-01-10 17:38:17 +00:00
|
|
|
/* operators; context poll callbacks */
|
2008-06-24 14:51:02 +00:00
|
|
|
int ED_operator_screenactive(struct bContext *C);
|
|
|
|
int ED_operator_screen_mainwinactive(struct bContext *C);
|
2.5 getting-back-into-coding commit :)
- cleaned up join and split operations. Most noticable is operator callback
design, which should make a design based on user-less exec() first, then
wrap invoke() and modal() around it. The exec() should be callable with
only Context and properties.
- split now works again; and inversed as previously, if you drag from a
triangle (action zone) inside area it subdivides area as expected.
- dragging from triangle outside area, over an edge, joins areas
- split has been simplified, it had too many options... it could just work
simpler (now)
- 'action zone' now is an operator itself, a widget sending an ACTIONZONE event,
which can be handled by others (so other gestures can be added in action zone
too)
Still evaluating:
- context gets set where?
- code structure confuses... what are proper functions for operators?
- what is WM... should low level screen stuff more there?
- when do you send event, notifier?
- files grow to large, will clean
Oh yeah and docs, docs, docs. Coming! :)
2008-11-17 18:54:03 +00:00
|
|
|
int ED_operator_areaactive(struct bContext *C);
|
2008-01-10 17:38:17 +00:00
|
|
|
|
2008-12-26 19:07:31 +00:00
|
|
|
int ED_operator_view3d_active(struct bContext *C);
|
|
|
|
int ED_operator_timeline_active(struct bContext *C);
|
|
|
|
int ED_operator_outliner_active(struct bContext *C);
|
|
|
|
int ED_operator_file_active(struct bContext *C);
|
|
|
|
int ED_operator_action_active(struct bContext *C);
|
|
|
|
int ED_operator_buttons_active(struct bContext *C);
|
|
|
|
int ED_operator_node_active(struct bContext *C);
|
|
|
|
int ED_operator_ipo_active(struct bContext *C);
|
|
|
|
int ED_operator_sequencer_active(struct bContext *C);
|
|
|
|
|
2009-01-01 13:15:35 +00:00
|
|
|
int ED_operator_object_active(struct bContext *C);
|
|
|
|
int ED_operator_editmesh(struct bContext *C);
|
|
|
|
int ED_operator_editcurve(struct bContext *C);
|
2008-12-26 19:07:31 +00:00
|
|
|
|
2008-12-10 13:56:54 +00:00
|
|
|
/* default keymaps, bitflags */
|
|
|
|
#define ED_KEYMAP_UI 1
|
|
|
|
#define ED_KEYMAP_VIEW2D 2
|
|
|
|
#define ED_KEYMAP_MARKERS 4
|
2008-12-21 08:02:24 +00:00
|
|
|
#define ED_KEYMAP_ANIMATION 8
|
2008-01-10 17:38:17 +00:00
|
|
|
|
2008-01-01 18:29:19 +00:00
|
|
|
#endif /* ED_SCREEN_H */
|
|
|
|
|