[PD-cvs] pd/src desire.c,1.1.2.7,1.1.2.8

Mathieu Bouchard matju at users.sourceforge.net
Sat Sep 10 10:25:37 CEST 2005


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

Modified Files:
      Tag: devel_0_39
	desire.c 
Log Message:
removing more dead code


Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -C2 -d -r1.1.2.7 -r1.1.2.8
*** desire.c	10 Sep 2005 06:22:25 -0000	1.1.2.7
--- desire.c	10 Sep 2005 08:25:35 -0000	1.1.2.8
***************
*** 389,393 ****
  }
  
! static void message_click(t_message *x, t_floatarg xpos, t_floatarg ypos,
  t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
  {
--- 389,393 ----
  }
  
! /*static void message_click(t_message *x, t_floatarg xpos, t_floatarg ypos,
  t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
  {
***************
*** 400,404 ****
      	clock_delay(x->m_clock, 120);
      }
! }
  
  static void message_tick(t_message *x)
--- 400,404 ----
      	clock_delay(x->m_clock, 120);
      }
! }*/
  
  static void message_tick(t_message *x)
***************
*** 669,702 ****
  }
  
! static void gatom_click(t_gatom *x,
!     t_floatarg xpos, t_floatarg ypos, t_floatarg shift, t_floatarg ctrl,
!     t_floatarg alt)
! {
!     if (x->a_text.te_width == 1)
!     {
!     	if (x->a_atom.a_type == A_FLOAT)
! 	    gatom_float(x, (x->a_atom.a_w.w_float == 0));
!     }
!     else
!     {
! 	if (alt)
! 	{
!     	    if (x->a_atom.a_type != A_FLOAT) return;
!     	    if (x->a_atom.a_w.w_float != 0)
!     	    {
!     		x->a_toggle = x->a_atom.a_w.w_float;
!     		gatom_float(x, 0);
!     		return;
!     	    }
!     	    else gatom_float(x, x->a_toggle);
! 	}
! 	x->a_shift = shift;
! 	x->a_buf[0] = 0;
! 	glist_grab(x->a_glist, &x->a_text.te_g, gatom_motion, gatom_key,
!     	    xpos, ypos);
!     }
! }
! 
!     /* message back from dialog window */
  static void gatom_param(t_gatom *x, t_symbol *sel, int argc, t_atom *argv)
  {
--- 669,673 ----
  }
  
! /* message back from dialog window */
  static void gatom_param(t_gatom *x, t_symbol *sel, int argc, t_atom *argv)
  {
***************
*** 897,934 ****
  }
  
- static int text_click(t_gobj *z, struct _glist *glist,
-     int xpix, int ypix, int shift, int alt, int dbl, int doit)
- {
-     t_text *x = (t_text *)z;
-     if (x->te_type == T_OBJECT)
-     {
-     	t_symbol *clicksym = gensym("click");
- 	if (zgetfn(&x->te_pd, clicksym))
- 	{
- 	    if (doit)
- 	    	pd_vmess(&x->te_pd, clicksym, "fffff",
- 		    (double)xpix, (double)ypix,
-     	    	    	(double)shift, 0, (double)alt);
- 	    return (1);
- 	}
- 	else return (0);
-     }
-     else if (x->te_type == T_ATOM)
-     {
-     	if (doit)
- 	    gatom_click((t_gatom *)x, (t_floatarg)xpix, (t_floatarg)ypix,
- 	    	(t_floatarg)shift, 0, (t_floatarg)alt);
- 	return (1);
-     }
-     else if (x->te_type == T_MESSAGE)
-     {
-     	if (doit)
- 	    message_click((t_message *)x, (t_floatarg)xpix, (t_floatarg)ypix,
- 	    	(t_floatarg)shift, 0, (t_floatarg)alt);
- 	return (1);
-     }
-     else return (0);
- }
- 
  void text_save(t_gobj *z, t_binbuf *b)
  {
--- 868,871 ----
***************
*** 996,1000 ****
      text_delete,
      text_vis,
!     text_click,
  };
  
--- 933,937 ----
      text_delete,
      text_vis,
!     0,
  };
  
***************
*** 1007,1127 ****
  #endif
  
-     /* draw inlets and outlets for a text object or for a graph. */
  void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
!     char *tag, int x1, int y1, int x2, int y2)
! {
!     int n = obj_noutlets(ob), nplus = (n == 1 ? 1 : n-1), i;
!     int width = x2 - x1;
!     for (i = 0; i < n; i++)
!     {
!     	int onset = x1 + (width - IOWIDTH) * i / nplus;
!     	if (firsttime)
!     	    sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %so%d\n",
!     	    	glist_getcanvas(glist),
!     	    	onset, y2 - 1,
!     	    	onset + IOWIDTH, y2,
!     	    	tag, i);
!     	else
!     	    sys_vgui(".x%x.c coords %so%d %d %d %d %d\n",
!     	    	glist_getcanvas(glist), tag, i,
!     	    	onset, y2 - 1,
!     	    	onset + IOWIDTH, y2);
!     }
!     n = obj_ninlets(ob);
!     nplus = (n == 1 ? 1 : n-1);
!     for (i = 0; i < n; i++)
!     {
!     	int onset = x1 + (width - IOWIDTH) * i / nplus;
!     	if (firsttime)
!     	    sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %si%d\n",
!     	    	glist_getcanvas(glist),
!     	    	onset, y1,
!     	    	onset + IOWIDTH, y1 + EXTRAPIX,
!     	    	tag, i);
!     	else
!     	    sys_vgui(".x%x.c coords %si%d %d %d %d %d\n",
!     	    	glist_getcanvas(glist), tag, i,
!     	    	onset, y1,
!     	    	onset + IOWIDTH, y1 + EXTRAPIX);
!     }
! }
! 
  void text_drawborder(t_text *x, t_glist *glist,
!     char *tag, int width2, int height2, int firsttime)
! {
!     t_object *ob;
!     int x1, y1, x2, y2, width, height;
!     text_getrect(&x->te_g, glist, &x1, &y1, &x2, &y2);
!     width = x2 - x1;
!     height = y2 - y1;
!     if (x->te_type == T_OBJECT)
!     {
! 	if (firsttime)
!     	    sys_vgui(".x%x.c create line\
!  %d %d %d %d %d %d %d %d %d %d -tags %sR\n",
! 		glist_getcanvas(glist),
! 		    x1, y1,  x2, y1,  x2, y2,  x1, y2,  x1, y1,  tag);
! 	else
!     	    sys_vgui(".x%x.c coords %sR\
!  %d %d %d %d %d %d %d %d %d %d\n",
! 		glist_getcanvas(glist), tag,
! 		    x1, y1,  x2, y1,  x2, y2,  x1, y2,  x1, y1);
!     }
!     else if (x->te_type == T_MESSAGE)
!     {
! 	if (firsttime)
!     	    sys_vgui(".x%x.c create line\
!  %d %d %d %d %d %d %d %d %d %d %d %d %d %d -tags %sR\n",
! 		glist_getcanvas(glist),
! 		x1, y1,  x2+4, y1,  x2, y1+4,  x2, y2-4,  x2+4, y2,
! 		x1, y2,  x1, y1,
! 	    	    tag);
! 	else
!     	    sys_vgui(".x%x.c coords %sR\
!  %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
! 		glist_getcanvas(glist), tag,
! 		x1, y1,  x2+4, y1,  x2, y1+4,  x2, y2-4,  x2+4, y2,
! 		x1, y2,  x1, y1);
!     }
!     else if (x->te_type == T_ATOM)
!     {
! 	if (firsttime)
!     	    sys_vgui(".x%x.c create line\
!  %d %d %d %d %d %d %d %d %d %d %d %d -tags %sR\n",
! 		glist_getcanvas(glist),
! 		x1, y1,  x2-4, y1,  x2, y1+4,  x2, y2,  x1, y2,  x1, y1,
! 	    	    tag);
! 	else
!     	    sys_vgui(".x%x.c coords %sR\
!  %d %d %d %d %d %d %d %d %d %d %d %d\n",
! 		glist_getcanvas(glist), tag,
! 		x1, y1,  x2-4, y1,  x2, y1+4,  x2, y2,  x1, y2,  x1, y1);
!     }
!     	/* draw inlets/outlets */
!     
!     if ((ob = pd_checkobject(&x->te_pd)))
!     	glist_drawiofor(glist, ob, firsttime, tag, x1, y1, x2, y2);
! }
! 
! void glist_eraseiofor(t_glist *glist, t_object *ob, char *tag)
! {
!     int i, n;
!     n = obj_noutlets(ob);
!     for (i = 0; i < n; i++)
!     	sys_vgui(".x%x.c delete %so%d\n",
!     	    glist_getcanvas(glist), tag, i);
!     n = obj_ninlets(ob);
!     for (i = 0; i < n; i++)
!     	sys_vgui(".x%x.c delete %si%d\n",
!     	    glist_getcanvas(glist), tag, i);
! }
! 
! void text_eraseborder(t_text *x, t_glist *glist, char *tag)
! {
!     if (x->te_type == T_TEXT) return;
!     sys_vgui(".x%x.c delete %sR\n",
!     	glist_getcanvas(glist), tag);
!     glist_eraseiofor(glist, x, tag);
! }
  
      /* change text; if T_OBJECT, remake it.  LATER we'll have an undo buffer
--- 944,953 ----
  #endif
  
  void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
!     char *tag, int x1, int y1, int x2, int y2) {}
  void text_drawborder(t_text *x, t_glist *glist,
!     char *tag, int width2, int height2, int firsttime) {}
! void glist_eraseiofor(t_glist *glist, t_object *ob, char *tag) {}
! void text_eraseborder(t_text *x, t_glist *glist, char *tag) {}
  
      /* change text; if T_OBJECT, remake it.  LATER we'll have an undo buffer
***************
*** 1181,1196 ****
      class_addlist(message_class, message_list);
      class_addanything(message_class, message_list);
  
!     class_addmethod(message_class, (t_method)message_click, gensym("click"),
!     	A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
!     class_addmethod(message_class, (t_method)message_set, gensym("set"),
!     	A_GIMME, 0);
!     class_addmethod(message_class, (t_method)message_add, gensym("add"),
!     	A_GIMME, 0);
!     class_addmethod(message_class, (t_method)message_add2, gensym("add2"),
!     	A_GIMME, 0);
! 
!     messresponder_class = class_new(gensym("messresponder"), 0, 0,
!     	sizeof(t_text), CLASS_PD, 0);
      class_addbang(messresponder_class, messresponder_bang);
      class_addfloat(messresponder_class, (t_method) messresponder_float);
--- 1007,1015 ----
      class_addlist(message_class, message_list);
      class_addanything(message_class, message_list);
+     class_addmethod(message_class, (t_method)message_set, gensym("set"), A_GIMME, 0);
+     class_addmethod(message_class, (t_method)message_add, gensym("add"), A_GIMME, 0);
+     class_addmethod(message_class, (t_method)message_add2, gensym("add2"), A_GIMME, 0);
  
!     messresponder_class = class_new(gensym("messresponder"), 0, 0, sizeof(t_text), CLASS_PD, 0);
      class_addbang(messresponder_class, messresponder_bang);
      class_addfloat(messresponder_class, (t_method) messresponder_float);
***************
*** 1204,1218 ****
      class_addfloat(gatom_class, gatom_float);
      class_addsymbol(gatom_class, gatom_symbol);
!     class_addmethod(gatom_class, (t_method)gatom_set, gensym("set"),
!     	A_GIMME, 0);
!     class_addmethod(gatom_class, (t_method)gatom_click, gensym("click"),
!     	A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
!     class_addmethod(gatom_class, (t_method)gatom_param, gensym("param"),
!     	A_GIMME, 0);
      class_setpropertiesfn(gatom_class, gatom_properties);
  }
  
! static int iemgui_color_hex[]=
! {
  	0xfcfcfc, 0xa0a0a0, 0x404040, 0xfce0e0, 0xfce0c0,
  	0xfcfcc8, 0xd8fcd8, 0xd8fcfc, 0xdce4fc, 0xf8d8fc,
--- 1023,1032 ----
      class_addfloat(gatom_class, gatom_float);
      class_addsymbol(gatom_class, gatom_symbol);
!     class_addmethod(gatom_class, (t_method)gatom_set, gensym("set"), A_GIMME, 0);
!     class_addmethod(gatom_class, (t_method)gatom_param, gensym("param"), A_GIMME, 0);
      class_setpropertiesfn(gatom_class, gatom_properties);
  }
  
! static int iemgui_color_hex[]= {
  	0xfcfcfc, 0xa0a0a0, 0x404040, 0xfce0e0, 0xfce0c0,
  	0xfcfcc8, 0xd8fcd8, 0xd8fcfc, 0xdce4fc, 0xf8d8fc,





More information about the Pd-cvs mailing list