Update of /cvsroot/pure-data/externals/ggee/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10289/include
Modified Files: g_canvas.h Log Message: compilation of fofsynth
Index: g_canvas.h =================================================================== RCS file: /cvsroot/pure-data/externals/ggee/include/g_canvas.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** g_canvas.h 1 Jul 2005 08:13:35 -0000 1.4 --- g_canvas.h 1 Jun 2006 06:53:39 -0000 1.5 *************** *** 37,50 **** in future releases. The public (stable) API is in m_pd.h. */
- #ifndef __G_CANVAS_H - #if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) extern "C" { #endif
- #ifdef GARRAY_THREAD_LOCK - #include <pthread.h> /* TB: for t_garray */ - #endif - /* --------------------- geometry ---------------------------- */ #define IOWIDTH 7 /* width of an inlet/outlet in pixels */ --- 37,44 ---- *************** *** 80,83 **** --- 74,80 ---- #define t_canvasenvironment struct _canvasenvironment
+ EXTERN_STRUCT _fielddesc; + #define t_fielddesc struct _fielddesc + typedef struct _selection { *************** *** 162,165 **** --- 159,164 ---- int gl_screenx2; int gl_screeny2; + int gl_xmargin; /* origin for GOP rectangle */ + int gl_ymargin; t_tick gl_xtick; /* ticks marking X values */ int gl_nxlabels; /* number of X coordinate labels */ *************** *** 182,186 **** unsigned int gl_edit:1; /* edit mode */ unsigned int gl_isdeleting:1; /* we're inside glist_delete -- hack! */ ! unsigned int gl_stretch:1; /* stretch contents on resize */ unsigned int gl_isgraph:1; /* show as graph on parent */ }; --- 181,185 ---- unsigned int gl_edit:1; /* edit mode */ unsigned int gl_isdeleting:1; /* we're inside glist_delete -- hack! */ ! unsigned int gl_goprect:1; /* draw rectangle for graph-on-parent */ unsigned int gl_isgraph:1; /* show as graph on parent */ }; *************** *** 203,208 **** } t_dataslot;
- - /* T.Grill - changed t_pd member to t_pdobj to avoid name clashed */ typedef struct _template { --- 202,205 ---- *************** *** 222,247 **** int a_valid; /* protection against stale pointers into array */ t_gpointer a_gp; /* pointer to scalar or array element we're in */ ! t_gstub *a_stub; ! }; ! ! struct _garray ! { ! t_gobj x_gobj; ! t_glist *x_glist; ! t_array x_array; /* actual array; note only 4 fields used as below */ ! t_symbol *x_name; ! t_symbol *x_realname; /* name with "$" expanded */ ! t_float x_firstx; /* X value of first item */ ! t_float x_xinc; /* X increment */ ! char x_usedindsp; /* true if some DSP routine is using this */ ! char x_saveit; /* true if we should save this with parent */ ! char x_drawasrects; /* draw as rectangles, not a polygon */ ! double x_lastupdate; /* T.Grill - clock_getlogicaltime() of last array update */ ! #ifdef GARRAY_THREAD_LOCK ! pthread_mutex_t * x_mutex; /* TB: mutex */ ! #endif };
- /* structure for traversing all the connections in a glist */ typedef struct _linetraverser --- 219,225 ---- int a_valid; /* protection against stale pointers into array */ t_gpointer a_gp; /* pointer to scalar or array element we're in */ ! t_gstub *a_stub; /* stub for pointing into this array */ };
/* structure for traversing all the connections in a glist */ typedef struct _linetraverser *************** *** 328,332 **** /* field a mouse click */ typedef int (*t_parentclickfn)(t_gobj *x, struct _glist *glist, ! t_scalar *sc, t_template *tmpl, float basex, float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit);
--- 306,311 ---- /* field a mouse click */ typedef int (*t_parentclickfn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, t_scalar *sc, t_array *ap, ! float basex, float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit);
*************** *** 357,360 **** --- 336,343 ---- extern int glist_valid; /* incremented when pointers might be stale */
+ #define PLOTSTYLE_POINTS 0 /* plotting styles for arrays */ + #define PLOTSTYLE_POLY 1 + #define PLOTSTYLE_BEZ 2 + /* ------------------- functions on any gobj ----------------------------- */ EXTERN void gobj_getrect(t_gobj *x, t_glist *owner, int *x1, int *y1, *************** *** 370,374 **** EXTERN void gobj_properties(t_gobj *x, struct _glist *glist); EXTERN void gobj_save(t_gobj *x, t_binbuf *b); - EXTERN void gobj_redraw(t_gobj *gobj, t_glist *glist);
/* -------------------- functions on glists --------------------- */ --- 353,356 ---- *************** *** 405,409 **** EXTERN float glist_dpixtody(t_glist *x, float dypix);
- EXTERN void glist_redrawitem(t_glist *owner, t_gobj *gobj); EXTERN void glist_getnextxy(t_glist *gl, int *xval, int *yval); EXTERN void glist_glist(t_glist *g, t_symbol *s, int argc, t_atom *argv); --- 387,390 ---- *************** *** 472,481 **** EXTERN void canvas_redraw(t_canvas *x);
! EXTERN t_inlet *canvas_addinlet(t_canvas *x, t_pd *who, t_symbol *sym, ! t_symbol* h); EXTERN void canvas_rminlet(t_canvas *x, t_inlet *ip); EXTERN t_outlet *canvas_addoutlet(t_canvas *x, t_pd *who, t_symbol *sym); EXTERN void canvas_rmoutlet(t_canvas *x, t_outlet *op); ! EXTERN void canvas_redrawallfortemplate(t_canvas *tmpl); EXTERN void canvas_zapallfortemplate(t_canvas *tmpl); EXTERN void canvas_setusedastemplate(t_canvas *x); --- 453,462 ---- EXTERN void canvas_redraw(t_canvas *x);
! EXTERN t_inlet *canvas_addinlet(t_canvas *x, t_pd *who, t_symbol *sym); EXTERN void canvas_rminlet(t_canvas *x, t_inlet *ip); EXTERN t_outlet *canvas_addoutlet(t_canvas *x, t_pd *who, t_symbol *sym); EXTERN void canvas_rmoutlet(t_canvas *x, t_outlet *op); ! EXTERN void canvas_redrawallfortemplate(t_template *tmpl, int action); ! EXTERN void canvas_redrawallfortemplatecanvas(t_canvas *x, int action); EXTERN void canvas_zapallfortemplate(t_canvas *tmpl); EXTERN void canvas_setusedastemplate(t_canvas *x); *************** *** 518,523 **** EXTERN int canvas_getindex(t_canvas *x, t_gobj *y);
- /* T.Grill - made public for dynamic object creation */ - /* in g_editor.c */ EXTERN void canvas_connect(t_canvas *x, t_floatarg fwhoout, t_floatarg foutno,t_floatarg fwhoin, t_floatarg finno); --- 499,502 ---- *************** *** 542,553 **** EXTERN void linetraverser_skipobject(t_linetraverser *t);
- /* --------------------- functions on tscalars --------------------- */ - - EXTERN void tscalar_getrect(t_tscalar *x, t_glist *owner, - int *xp1, int *yp1, int *xp2, int *yp2); - EXTERN void tscalar_vis(t_tscalar *x, t_glist *owner, int flag); - EXTERN int tscalar_click(t_tscalar *x, int xpix, int ypix, int shift, - int alt, int dbl, int doit); - /* --------- functions on garrays (graphical arrays) -------------------- */
--- 521,524 ---- *************** *** 558,562 **** t_floatarg f, t_floatarg saveit); EXTERN t_array *array_new(t_symbol *templatesym, t_gpointer *parent); ! EXTERN void array_resize(t_array *x, t_template *tmpl, int n); EXTERN void array_free(t_array *x);
--- 529,533 ---- t_floatarg f, t_floatarg saveit); EXTERN t_array *array_new(t_symbol *templatesym, t_gpointer *parent); ! EXTERN void array_resize(t_array *x, int n); EXTERN void array_free(t_array *x);
*************** *** 572,581 **** EXTERN t_scalar *scalar_new(t_glist *owner, t_symbol *templatesym); EXTERN void scalar_getbasexy(t_scalar *x, float *basex, float *basey);
/* ------helper routines for "garrays" and "plots" -------------- */ ! EXTERN int array_doclick(t_array *array, t_glist *glist, t_gobj *gobj, t_symbol *elemtemplatesym, ! float linewidth, float xloc, float xinc, float yloc, int xpix, int ypix, int shift, int alt, int dbl, int doit);
--- 543,555 ---- EXTERN t_scalar *scalar_new(t_glist *owner, t_symbol *templatesym); + EXTERN void word_free(t_word *wp, t_template *tmpl); EXTERN void scalar_getbasexy(t_scalar *x, float *basex, float *basey); + EXTERN void scalar_redraw(t_scalar *x, t_glist *glist);
/* ------helper routines for "garrays" and "plots" -------------- */ ! EXTERN int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap, t_symbol *elemtemplatesym, ! float linewidth, float xloc, float xinc, float yloc, float scalarvis, ! t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield, int xpix, int ypix, int shift, int alt, int dbl, int doit);
*************** *** 583,586 **** --- 557,561 ---- char *elem, int xonset, int yonset, int wonset, int indx, float basex, float basey, float xinc, + t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc, float *xp, float *yp, float *wp);
*************** *** 588,591 **** --- 563,567 ---- t_canvas **elemtemplatecanvasp, t_template **elemtemplatep, int *elemsizep, + t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc, int *xonsetp, int *yonsetp, int *wonsetp);
*************** *** 608,611 **** --- 584,589 ---- EXTERN t_template *template_findbyname(t_symbol *s); EXTERN t_canvas *template_findcanvas(t_template *tmpl); + EXTERN void template_notify(t_template *tmpl, + t_symbol *s, int argc, t_atom *argv);
EXTERN t_float template_getfloat(t_template *x, t_symbol *fieldname, *************** *** 617,620 **** --- 595,605 ---- EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname, t_word *wp, t_symbol *s, int loud); + EXTERN t_float fielddesc_getcoord(t_fielddesc *f, t_template *tmpl, + t_word *wp, int loud); + EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *tmpl, + t_word *wp, float pix, int loud); + EXTERN t_float fielddesc_cvttocoord(t_fielddesc *f, float val); + EXTERN float fielddesc_cvtfromcoord(t_fielddesc *f, float coord); +
/* ----------------------- guiconnects, g_guiconnect.c --------- */ *************** *** 629,636 **** } #endif - - #else - #define __G_CANVAS_H - - #endif - --- 614,615 ----