[PD-cvs] pd/src g_canvas.h,1.3.4.3,1.3.4.3.2.1

Tim Blechmann timblech at users.sourceforge.net
Sun May 22 14:42:13 CEST 2005


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8998

Modified Files:
      Tag: devel_0_39
	g_canvas.h 
Log Message:
upgrading to 0.39-test2


Index: g_canvas.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.h,v
retrieving revision 1.3.4.3
retrieving revision 1.3.4.3.2.1
diff -C2 -d -r1.3.4.3 -r1.3.4.3.2.1
*** g_canvas.h	14 Jan 2005 18:34:13 -0000	1.3.4.3
--- g_canvas.h	22 May 2005 12:42:10 -0000	1.3.4.3.2.1
***************
*** 80,83 ****
--- 80,86 ----
  #define t_canvasenvironment struct _canvasenvironment 
  
+ EXTERN_STRUCT _fielddesc;
+ #define t_fielddesc struct _fielddesc
+ 
  typedef struct _selection
  {
***************
*** 203,208 ****
  } t_dataslot;
  
- 
- /* T.Grill - changed t_pd member to t_pdobj to avoid name clashed */
  typedef struct _template
  {
--- 206,209 ----
***************
*** 214,218 ****
  } t_template;
  
- 
  struct _array
  {
--- 215,218 ----
***************
*** 223,241 ****
      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
--- 223,242 ----
      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 */
  };
  
+ 
+ 
+ 
  struct _garray
  {
      t_gobj x_gobj;
!     t_scalar *x_scalar;     /* scalar "containing" the array */
!     t_glist *x_glist;       /* containing glist */
!     t_symbol *x_name;       /* unexpanded name (possibly with leading '$') */
!     t_symbol *x_realname;   /* expanded name (symbol we're bound to) */
!     char x_usedindsp;       /* true if some DSP routine is using this */
!     char x_saveit;          /* true if we should save this with parent */
!     char x_listviewing;     /* true if list view window is open */
      double x_lastupdate;    /* T.Grill - clock_getlogicaltime() of last array update */
  #ifdef GARRAY_THREAD_LOCK
***************
*** 244,248 ****
  };
  
- 
      /* structure for traversing all the connections in a glist */
  typedef struct _linetraverser
--- 245,248 ----
***************
*** 329,333 ****
          /*  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);
  
--- 329,334 ----
          /*  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);
  
***************
*** 358,361 ****
--- 359,366 ----
  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,
***************
*** 473,482 ****
  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);
--- 478,487 ----
  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_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);
***************
*** 519,524 ****
  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);
--- 524,527 ----
***************
*** 559,563 ****
      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);
  
--- 562,566 ----
      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);
  
***************
*** 573,582 ****
  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);
  
--- 576,587 ----
  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);
  
  /* ------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,
+     t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield,
      int xpix, int ypix, int shift, int alt, int dbl, int doit);
  
***************
*** 584,587 ****
--- 589,593 ----
      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);
  
***************
*** 589,592 ****
--- 595,599 ----
      t_canvas **elemtemplatecanvasp,
      t_template **elemtemplatep, int *elemsizep,
+     t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc, 
      int *xonsetp, int *yonsetp, int *wonsetp);
  
***************
*** 609,612 ****
--- 616,621 ----
  EXTERN t_template *template_findbyname(t_symbol *s);
  EXTERN t_canvas *template_findcanvas(t_template *tmpl);
+ EXTERN void template_notify(t_template *,
+     t_symbol *s, int argc, t_atom *argv);
  
  EXTERN t_float template_getfloat(t_template *x, t_symbol *fieldname,
***************
*** 618,621 ****
--- 627,637 ----
  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 *,
+     t_word *wp, int loud);
+ EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *,
+     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 --------- */





More information about the Pd-cvs mailing list