Update space dispatch:
- drawXXXspace, changeXXXspace, and winqreadXXXspace now receive the area and spacedata as explicit arguments, allowing them to access private data w/o going through globals. - pass the new BWinEvent through to the winqreadXXXspace, allowing future access to extended event data. Removed direct calls to winqreadXXXspace to simulate user actions, replaced by calls to action functions in edit.c or the appropriate handler.
This commit is contained in:
@@ -33,10 +33,11 @@
|
||||
#ifndef BIF_DRAWIMAGE_H
|
||||
#define BIF_DRAWIMAGE_H
|
||||
|
||||
struct ScrArea;
|
||||
struct SpaceImage;
|
||||
|
||||
void calc_image_view(struct SpaceImage *sima, char mode);
|
||||
void drawimagespace(void);
|
||||
void drawimagespace(struct ScrArea *sa, void *spacedata);
|
||||
void draw_tfaces(void);
|
||||
void image_changed(struct SpaceImage *sima, int dotile);
|
||||
void image_home(void);
|
||||
|
@@ -33,8 +33,10 @@
|
||||
#ifndef BIF_DRAWSEQ_H
|
||||
#define BIF_DRAWSEQ_H
|
||||
|
||||
struct ScrArea;
|
||||
struct Sequence;
|
||||
void drawseqspace(void);
|
||||
|
||||
void drawseqspace(struct ScrArea *sa, void *spacedata);
|
||||
void drawseq(struct Sequence *seq);
|
||||
void set_special_seq_update(int val);
|
||||
|
||||
|
@@ -53,12 +53,9 @@ void scrarea_do_headchange (struct ScrArea *sa);
|
||||
extern void space_set_commmandline_options(void);
|
||||
extern void allqueue(unsigned short event, short val);
|
||||
extern void allspace(unsigned short event, short val);
|
||||
extern void changebutspace(void);
|
||||
extern void changeview2d(void);
|
||||
extern void changeview3d(void);
|
||||
extern void copy_view3d_lock(short val);
|
||||
extern void drawemptyspace(void);
|
||||
extern void drawinfospace(void);
|
||||
extern void drawemptyspace(struct ScrArea *sa, void *spacedata);
|
||||
extern void drawinfospace(struct ScrArea *sa, void *spacedata);
|
||||
extern void duplicatespacelist(struct ScrArea *area, struct ListBase *lb1, struct ListBase *lb2);
|
||||
extern void extern_set_butspace(int fkey);
|
||||
extern void force_draw(void);
|
||||
@@ -77,14 +74,14 @@ extern void initipo(struct ScrArea *sa);
|
||||
extern void initview3d(struct ScrArea *sa);
|
||||
extern void newspace(struct ScrArea *sa, int type);
|
||||
extern void set_rects_butspace(struct SpaceButs *buts);
|
||||
extern void winqreadview3dspace(unsigned short event, short val, char ascii);
|
||||
extern void winqreadbutspace(unsigned short event, short val, char ascii);
|
||||
extern void winqreadimagespace(unsigned short event, short val, char ascii);
|
||||
extern void winqreadinfospace(unsigned short event, short val, char ascii);
|
||||
extern void winqreadipospace(unsigned short event, short val, char ascii);
|
||||
extern void winqreadoopsspace(unsigned short event, short val, char ascii);
|
||||
extern void winqreadnlaspace(unsigned short event, short val, char ascii);
|
||||
extern void winqreadseqspace(unsigned short event, short val, char ascii);
|
||||
extern void winqreadview3dspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
extern void winqreadbutspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
extern void winqreadimagespace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
extern void winqreadinfospace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
extern void winqreadipospace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
extern void winqreadoopsspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
extern void winqreadnlaspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
extern void winqreadseqspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
extern void test_butspace(void);
|
||||
extern void start_game(void);
|
||||
|
||||
|
@@ -31,12 +31,13 @@
|
||||
*/
|
||||
|
||||
struct ScrArea;
|
||||
struct BWinEvent;
|
||||
|
||||
typedef struct _SpaceType SpaceType;
|
||||
|
||||
typedef void (*SpaceDrawFP) (void);
|
||||
typedef void (*SpaceChangeFP) (void);
|
||||
typedef void (*SpaceHandleFP) (unsigned short evt, short val, char ascii);
|
||||
typedef void (*SpaceDrawFP) (struct ScrArea *sa, void *spacedata);
|
||||
typedef void (*SpaceChangeFP) (struct ScrArea *sa, void *spacedata);
|
||||
typedef void (*SpaceHandleFP) (struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
|
||||
/***/
|
||||
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#ifndef BSE_DRAWIMASEL_H
|
||||
#define BSE_DRAWIMASEL_H
|
||||
|
||||
struct ScrArea;
|
||||
struct SpaceImaSel;
|
||||
|
||||
void viewgate(short sx, short sy, short ex, short ey);
|
||||
@@ -45,7 +46,7 @@ void move_imadir_sli(struct SpaceImaSel *simasel);
|
||||
void move_imafile_sli(struct SpaceImaSel *simasel);
|
||||
void ima_select_all(struct SpaceImaSel *simasel);
|
||||
void pibplay(struct SpaceImaSel *simasel);
|
||||
void drawimaselspace(void);
|
||||
void drawimaselspace(struct ScrArea *sa, void *spacedata);
|
||||
|
||||
/* void calc_hilite(SpaceImaSel *simasel); */
|
||||
/* void ima_select_all(SpaceImaSel *simasel); */
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#define SELECT_SUBTRACT 4
|
||||
#define SELECT_INVERT 16
|
||||
|
||||
struct ScrArea;
|
||||
struct EditIpo;
|
||||
struct View2D;
|
||||
struct rctf;
|
||||
@@ -52,12 +53,13 @@ void areamouseco_to_ipoco (struct View2D *v2d, short *mval, float *x, float *y);
|
||||
void ipoco_to_areaco (struct View2D *v2d, float *vec, short *mval);
|
||||
void ipoco_to_areaco_noclip (struct View2D *v2d, float *vec, short *mval);
|
||||
|
||||
void view2d_zoom (struct View2D *v2d, float factor, int winx, int winy);
|
||||
void test_view2d (struct View2D *v2d, int winx, int winy);
|
||||
void calc_scrollrcts (struct View2D *v2d, int winx, int winy);
|
||||
|
||||
int in_ipo_buttons(void);
|
||||
void drawscroll(int disptype);
|
||||
void drawipospace(void);
|
||||
void drawipospace(struct ScrArea *sa, void *spacedata);
|
||||
|
||||
void center_currframe(void);
|
||||
void scroll_ipobuts(void);
|
||||
|
@@ -33,7 +33,9 @@
|
||||
#ifndef BSE_DRAWNLA_H
|
||||
#define BSE_DRAWNLA_H
|
||||
|
||||
void drawnlaspace(void);
|
||||
struct ScrArea;
|
||||
|
||||
void drawnlaspace(struct ScrArea *sa, void *spacedata);
|
||||
|
||||
#endif /* BSE_DRAWNLA */
|
||||
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#ifndef BSE_DRAWOOPS_H
|
||||
#define BSE_DRAWOOPS_H
|
||||
|
||||
struct ScrArea;
|
||||
struct Oops;
|
||||
struct uiBlock;
|
||||
|
||||
@@ -44,7 +45,7 @@ void mysbox(float x1, float y1, float x2, float y2);
|
||||
unsigned int give_oops_color(short type, short sel, unsigned int *border);
|
||||
void calc_oopstext(char *str, float *v1);
|
||||
void draw_oops(struct Oops *oops, struct uiBlock *block);
|
||||
void drawoopsspace(void);
|
||||
void drawoopsspace(struct ScrArea *sa, void *spacedata);
|
||||
|
||||
#endif /* BSE_DRAWOOPS */
|
||||
|
||||
|
@@ -36,6 +36,7 @@
|
||||
struct Object;
|
||||
struct BGpic;
|
||||
struct rcti;
|
||||
struct ScrArea;
|
||||
|
||||
void setalpha_bgpic(struct BGpic *bgpic);
|
||||
void default_gl_light(void);
|
||||
@@ -44,7 +45,7 @@ void two_sided(int val);
|
||||
void circf(float x, float y, float rad);
|
||||
void circ(float x, float y, float rad);
|
||||
void backdrawview3d(int test);
|
||||
void drawview3dspace(void);
|
||||
void drawview3dspace(struct ScrArea *sa, void *spacedata);
|
||||
void drawview3d_render(struct View3D *v3d);
|
||||
int update_time(void);
|
||||
void calc_viewborder(struct View3D *v3d, struct rcti *viewborder_r);
|
||||
|
@@ -40,6 +40,10 @@ int get_border(struct rcti *rect, short col);
|
||||
void count_object(struct Object *ob, int sel);
|
||||
void countall(void);
|
||||
void snapmenu(void);
|
||||
void mergemenu(void);
|
||||
void delete_context_selected(void);
|
||||
void duplicate_context_selected(void);
|
||||
void toggle_shading(void);
|
||||
|
||||
#endif /* BSE_EDIT_H */
|
||||
|
||||
|
@@ -48,7 +48,7 @@ void set_action_key (struct bAction *act, struct bPoseChannel *chan, int adrcode
|
||||
struct bAction *add_empty_action(void);
|
||||
void deselect_actionchannel_keys (struct bAction *act, int test);
|
||||
void deselect_actionchannels (struct bAction *act, int test);
|
||||
void winqreadactionspace(unsigned short event, short val, char ascii);
|
||||
void winqreadactionspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
void remake_action_ipos(struct bAction *act);
|
||||
void select_actionchannel_by_name (struct bAction *act, char *name, int select);
|
||||
struct bAction *bake_action_with_client (struct bAction *act, struct Object *arm, float tolerance);
|
||||
|
@@ -81,6 +81,7 @@ void test_editipo(void);
|
||||
void get_status_editipo(void);
|
||||
void update_editipo_flags(void);
|
||||
void set_editflag_editipo(void);
|
||||
void ipo_toggle_showkey(void);
|
||||
void swap_selectall_editipo(void);
|
||||
void swap_visible_editipo(void);
|
||||
void deselectall_editipo(void);
|
||||
|
@@ -37,6 +37,7 @@
|
||||
struct SpaceFile;
|
||||
struct direntry;
|
||||
struct ID;
|
||||
struct ScrArea;
|
||||
|
||||
void clear_global_filesel_vars(void);
|
||||
void filesel_statistics(struct SpaceFile *sfile, int *totfile, int *selfile, float *totlen, float *sellen);
|
||||
@@ -47,13 +48,13 @@ void read_dir(struct SpaceFile *sfile);
|
||||
void freefilelist(struct SpaceFile *sfile);
|
||||
void parent(struct SpaceFile *sfile);
|
||||
void swapselect_file(struct SpaceFile *sfile);
|
||||
void drawfilespace(void);
|
||||
void drawfilespace(struct ScrArea *sa, void *spacedata);
|
||||
void activate_fileselect(int type, char *title, char *file, void (*func)(char *));
|
||||
void activate_imageselect(int type, char *title, char *file, void (*func)(char *));
|
||||
void activate_databrowse(struct ID *id, int idcode, int fromcode, int retval, short *menup, void (*func)(unsigned short));
|
||||
void filesel_prevspace(void);
|
||||
void free_filesel_spec(char *dir);
|
||||
void winqreadfilespace(unsigned short event, short val, char ascii);
|
||||
void winqreadfilespace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
void main_to_filelist(struct SpaceFile *sfile);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user