[PD-cvs] pd/src desire.c,1.1.2.28,1.1.2.29

Mathieu Bouchard matju at users.sourceforge.net
Sat Sep 24 23:19:36 CEST 2005


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

Modified Files:
      Tag: devel_0_39
	desire.c 
Log Message:
.


Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.28
retrieving revision 1.1.2.29
diff -C2 -d -r1.1.2.28 -r1.1.2.29
*** desire.c	24 Sep 2005 08:29:38 -0000	1.1.2.28
--- desire.c	24 Sep 2005 21:19:34 -0000	1.1.2.29
***************
*** 70,75 ****
  #endif
  
- /* ---------------------- variables --------------------------- */
- 
  extern t_pd *newest;
  t_class *canvas_class;
--- 70,73 ----
***************
*** 78,91 ****
  t_canvas *canvas_whichfind;         /* last canvas we did a find in */ 
  t_canvas *canvas_list;              /* list of all root canvases */
- 
- /* ------------------ forward function declarations --------------- */
- /*
- static void canvas_start_dsp(void);
- static void canvas_stop_dsp(void);
- static void canvas_addtolist(t_canvas *x);
- static void canvas_takeofflist(t_canvas *x);
- static void canvas_pop(t_canvas *x, t_floatarg fvis);
- void canvas_create_editor(t_glist *x, int createit);
- */
  static void canvas_reflecttitle(t_canvas *x);
  static void canvas_setbounds(t_canvas *x, int x1, int y1, int x2, int y2);
--- 76,79 ----
***************
*** 93,97 ****
  
  /* --------- functions to handle the canvas environment ----------- */
- 
  static t_symbol *canvas_newfilename = &s_;
  static t_symbol *canvas_newdirectory = &s_;
--- 81,84 ----
***************
*** 226,240 ****
  }
  
! t_symbol *canvas_getcurrentdir(void)
! {
!     t_canvasenvironment *e = canvas_getenv(canvas_getcurrent());
!     return (e->ce_dir);
! }
! 
! t_symbol *canvas_getdir(t_canvas *x)
! {
!     t_canvasenvironment *e = canvas_getenv(x);
!     return (e->ce_dir);
! }
  
  void canvas_makefilename(t_canvas *x, char *file, char *result, int resultsize)
--- 213,218 ----
  }
  
! t_symbol *canvas_getcurrentdir(void) {return canvas_getenv(canvas_getcurrent())->ce_dir;}
! t_symbol *canvas_getdir(t_canvas *x) {return canvas_getenv(                  x)->ce_dir;}
  
  void canvas_makefilename(t_canvas *x, char *file, char *result, int resultsize)
***************
*** 261,276 ****
  void canvas_rename(t_canvas *x, t_symbol *s, t_symbol *dir)
  {
!     if (strcmp(x->gl_name->s_name, "Pd"))
!         pd_unbind(&x->gl_pd, canvas_makebindsym(x->gl_name));
      x->gl_name = s;
!     if (strcmp(x->gl_name->s_name, "Pd"))
!         pd_bind(&x->gl_pd, canvas_makebindsym(x->gl_name));
!     if (glist_isvisible(x))
!         canvas_reflecttitle(x);
!     if (dir && dir != &s_)
!     {
!         t_canvasenvironment *e = canvas_getenv(x);
!         e->ce_dir = dir;
!     }
  }
  
--- 239,247 ----
  void canvas_rename(t_canvas *x, t_symbol *s, t_symbol *dir)
  {
!     if (strcmp(x->gl_name->s_name, "Pd")) pd_unbind(&x->gl_pd, canvas_makebindsym(x->gl_name));
      x->gl_name = s;
!     if (strcmp(x->gl_name->s_name, "Pd"))   pd_bind(&x->gl_pd, canvas_makebindsym(x->gl_name));
!     if (glist_isvisible(x)) canvas_reflecttitle(x);
!     if (dir && dir != &s_) canvas_getenv(x)->ce_dir = dir;
  }
  
***************
*** 360,364 ****
      /* post("canvas %lx, owner %lx", x, owner); */
  
!     if (argc == 5)  /* toplevel: x, y, w, h, font */
      {
          xloc = atom_getintarg(0, argc, argv);
--- 331,335 ----
      /* post("canvas %lx, owner %lx", x, owner); */
  
!     if (argc == 5)  /* toplevel */
      {
          xloc = atom_getintarg(0, argc, argv);
***************
*** 368,372 ****
          font = atom_getintarg(4, argc, argv);
      }
!     else if (argc == 6)  /* subwindow: x, y, w, h, name, vis */
      {
          xloc = atom_getintarg(0, argc, argv);
--- 339,343 ----
          font = atom_getintarg(4, argc, argv);
      }
!     else if (argc == 6)  /* subwindow */
      {
          xloc = atom_getintarg(0, argc, argv);
***************
*** 1395,1419 ****
  void gobj_getrect(t_gobj *x, t_glist *glist, int *x1, int *y1, int *x2, int *y2) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_getrectfn) (*w->w_getrectfn)(x, glist, x1, y1, x2, y2);
  }
  
  void gobj_displace(t_gobj *x, t_glist *glist, int dx, int dy) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_displacefn) (*w->w_displacefn)(x, glist, dx, dy);
  }
  
  void gobj_select(t_gobj *x, t_glist *glist, int state) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_selectfn) (*w->w_selectfn)(x, glist, state);
  }
  
  void gobj_activate(t_gobj *x, t_glist *glist, int state) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_activatefn) (*w->w_activatefn)(x, glist, state);
  }
  
  void gobj_delete(t_gobj *x, t_glist *glist) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_deletefn) (*w->w_deletefn)(x, glist);
  }
  
--- 1366,1390 ----
  void gobj_getrect(t_gobj *x, t_glist *glist, int *x1, int *y1, int *x2, int *y2) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_getrectfn) w->w_getrectfn(x, glist, x1, y1, x2, y2);
  }
  
  void gobj_displace(t_gobj *x, t_glist *glist, int dx, int dy) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_displacefn) w->w_displacefn(x, glist, dx, dy);
  }
  
  void gobj_select(t_gobj *x, t_glist *glist, int state) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_selectfn) w->w_selectfn(x, glist, state);
  }
  
  void gobj_activate(t_gobj *x, t_glist *glist, int state) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_activatefn) w->w_activatefn(x, glist, state);
  }
  
  void gobj_delete(t_gobj *x, t_glist *glist) {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_deletefn) w->w_deletefn(x, glist);
  }
  
***************
*** 1437,1441 ****
                      return;
          }
!         (*w->w_visfn)(x, glist, flag);
      }
  }
--- 1408,1412 ----
                      return;
          }
!         w->w_visfn(x, glist, flag);
      }
  }
***************
*** 1445,1450 ****
  {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_clickfn)
!         return ((*w->w_clickfn)(x, glist, xpix, ypix, shift, alt, dbl, doit));
      else return 0;
  }
--- 1416,1420 ----
  {
      t_widgetbehavior *w = x->g_pd->c_wb;
!     if (w && w->w_clickfn) return w->w_clickfn(x, glist, xpix, ypix, shift, alt, dbl, doit);
      else return 0;
  }
***************
*** 5277,5282 ****
      t_object *ob;
      y->g_next = 0;
-     pd_upload(y);
- /*    sys_mgui(y,"draw","");*/
      if (!x->gl_list) x->gl_list = y;
      else
--- 5247,5250 ----
***************
*** 5286,5291 ****
          y2->g_next = y;
      }
!     if (x->gl_editor && (ob = pd_checkobject(&y->g_pd)))
!         rtext_new(x, ob);
      if (x->gl_editor && x->gl_isgraph && !x->gl_goprect
          && pd_checkobject(&y->g_pd))
--- 5254,5259 ----
          y2->g_next = y;
      }
!     /* voodoo */
!     /* if (x->gl_editor && (ob = pd_checkobject(&y->g_pd))) rtext_new(x, ob); */
      if (x->gl_editor && x->gl_isgraph && !x->gl_goprect
          && pd_checkobject(&y->g_pd))
***************
*** 12454,12458 ****
  	va_list val;
  	va_start(val,fmt);
! 	i+=snprintf(buf+i,n-i,"%x %s [%x canvas]", (unsigned)self, sel, (unsigned)self);
  	if (i>=n) goto over;
  	while (*fmt) {
--- 12422,12426 ----
  	va_list val;
  	va_start(val,fmt);
! 	i+=snprintf(buf+i,n-i,"%x %s", (unsigned)self, sel);
  	if (i>=n) goto over;
  	while (*fmt) {





More information about the Pd-cvs mailing list