[PD-cvs] pd/src g_all_guis.c,1.1.1.4.2.4.2.42,1.1.1.4.2.4.2.43 g_all_guis.h,1.1.1.4.2.2.2.36,1.1.1.4.2.2.2.37 g_bang.c,1.1.1.3.2.2.2.32,1.1.1.3.2.2.2.33 g_dropper.c,1.1.2.22,1.1.2.23 g_toggle.c,1.1.1.3.2.2.2.28,1.1.1.3.2.2.2.29 g_mycanvas.c,1.1.1.3.2.2.2.19,1.1.1.3.2.2.2.20

Mathieu Bouchard matju at users.sourceforge.net
Sat Aug 14 05:38:23 CEST 2004


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

Modified Files:
      Tag: impd_0_37
	g_all_guis.c g_all_guis.h g_bang.c g_dropper.c g_toggle.c 
	g_mycanvas.c 
Log Message:
removing redundant getrect() in [bng] [tgl] [cnv] [dropper]


Index: g_toggle.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v
retrieving revision 1.1.1.3.2.2.2.28
retrieving revision 1.1.1.3.2.2.2.29
diff -C2 -d -r1.1.1.3.2.2.2.28 -r1.1.1.3.2.2.2.29
*** g_toggle.c	13 Aug 2004 16:58:50 -0000	1.1.1.3.2.2.2.28
--- g_toggle.c	14 Aug 2004 03:38:19 -0000	1.1.1.3.2.2.2.29
***************
*** 19,33 ****
  static t_class *toggle_class;
  
- /* ------------------------ tgl widgetbehaviour----------------------------- */
- 
- static void toggle_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2)
- {
-     t_toggle *x = (t_toggle *)z;
-     *xp1 = text_xpix((t_text *)x, glist);
-     *yp1 = text_ypix((t_text *)x, glist);
-     *xp2 = *xp1 + x->x_gui.x_w;
-     *yp2 = *yp1 + x->x_gui.x_h;
- }
- 
  static void toggle_action(t_toggle *x) {
      t_iemgui *y = (t_iemgui *)x;
--- 19,22 ----
***************
*** 127,131 ****
      class_addmethod(c, (t_method)iemgui_init, gensym("init"), A_FLOAT, 0);
      class_addmethod(c, (t_method)toggle_nonzero, gensym("nonzero"), A_FLOAT, 0);
!     wb.w_getrectfn = toggle_getrect;
      wb.w_displacefn = iemgui_displace;
      wb.w_selectfn = iemgui_select;
--- 116,120 ----
      class_addmethod(c, (t_method)iemgui_init, gensym("init"), A_FLOAT, 0);
      class_addmethod(c, (t_method)toggle_nonzero, gensym("nonzero"), A_FLOAT, 0);
!     wb.w_getrectfn = iemgui_getrect;
      wb.w_displacefn = iemgui_displace;
      wb.w_selectfn = iemgui_select;

Index: g_all_guis.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v
retrieving revision 1.1.1.4.2.4.2.42
retrieving revision 1.1.1.4.2.4.2.43
diff -C2 -d -r1.1.1.4.2.4.2.42 -r1.1.1.4.2.4.2.43
*** g_all_guis.c	13 Aug 2004 18:22:15 -0000	1.1.1.4.2.4.2.42
--- g_all_guis.c	14 Aug 2004 03:38:19 -0000	1.1.1.4.2.4.2.43
***************
*** 426,427 ****
--- 426,437 ----
  	self->x_draw(self,self->x_glist, 0);
  }
+ 
+ EXTERN void iemgui_getrect(t_gobj *z, t_glist *glist,
+ int *xp1, int *yp1, int *xp2, int *yp2)
+ {
+     t_iemgui* x = (t_iemgui*)z;
+     *xp1 = text_xpix((t_text *)x,glist);
+     *yp1 = text_ypix((t_text *)x,glist);
+     *xp2 = *xp1+x->x_w;
+     *yp2 = *yp1+x->x_h;
+ }

Index: g_mycanvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_mycanvas.c,v
retrieving revision 1.1.1.3.2.2.2.19
retrieving revision 1.1.1.3.2.2.2.20
diff -C2 -d -r1.1.1.3.2.2.2.19 -r1.1.1.3.2.2.2.20
*** g_mycanvas.c	13 Aug 2004 16:41:47 -0000	1.1.1.3.2.2.2.19
--- g_mycanvas.c	14 Aug 2004 03:38:19 -0000	1.1.1.3.2.2.2.20
***************
*** 17,31 ****
  static t_class *cnv_class;
  
- /* ------------------------ cnv widgetbehaviour----------------------------- */
- 
- static void cnv_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2)
- {
-     t_cnv *x = (t_cnv *)z;
-     *xp1 = text_xpix(&x->x_gui.x_obj, glist);
-     *yp1 = text_ypix(&x->x_gui.x_obj, glist);
-     *xp2 = *xp1 + x->x_gui.x_w;
-     *yp2 = *yp1 + x->x_gui.x_h;
- }
- 
  static void cnv_get_pos(t_cnv *x)
  {
--- 17,20 ----
***************
*** 103,107 ****
      class_addmethod(c, (t_method)cnv_get_pos, gensym("get_pos"), 0);
      iemgui_subclass(c);
!     wb.w_getrectfn = cnv_getrect;
      wb.w_displacefn = iemgui_displace;
      wb.w_selectfn = iemgui_select;
--- 92,96 ----
      class_addmethod(c, (t_method)cnv_get_pos, gensym("get_pos"), 0);
      iemgui_subclass(c);
!     wb.w_getrectfn = iemgui_getrect;
      wb.w_displacefn = iemgui_displace;
      wb.w_selectfn = iemgui_select;

Index: g_dropper.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/g_dropper.c,v
retrieving revision 1.1.2.22
retrieving revision 1.1.2.23
diff -C2 -d -r1.1.2.22 -r1.1.2.23
*** g_dropper.c	13 May 2004 14:37:20 -0000	1.1.2.22
--- g_dropper.c	14 Aug 2004 03:38:19 -0000	1.1.2.23
***************
*** 23,37 ****
  static t_class *dropper_class;
  
- /* ------------------------ dropper widgetbehaviour----------------------------- */
- 
- static void dropper_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2)
- {
-     t_dropper *x = (t_dropper *)z;
-     *xp1 = text_xpix(&x->x_gui.x_obj, glist);
-     *yp1 = text_ypix(&x->x_gui.x_obj, glist);
-     *xp2 = *xp1 + x->x_gui.x_w;
-     *yp2 = *yp1 + x->x_gui.x_h;
- }
- 
  static void dropper_bang(t_dropper *x)
  {
--- 23,26 ----
***************
*** 84,88 ****
      class_addsymbol(c, dropper_symbol);
      class_addmethod(c, (t_method)dropper_reload, gensym("reload"), A_GIMME, 0);
!     wb.w_getrectfn = dropper_getrect;
      wb.w_displacefn = iemgui_displace;
      wb.w_selectfn = iemgui_select;
--- 73,77 ----
      class_addsymbol(c, dropper_symbol);
      class_addmethod(c, (t_method)dropper_reload, gensym("reload"), A_GIMME, 0);
!     wb.w_getrectfn = iemgui_getrect;
      wb.w_displacefn = iemgui_displace;
      wb.w_selectfn = iemgui_select;

Index: g_bang.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v
retrieving revision 1.1.1.3.2.2.2.32
retrieving revision 1.1.1.3.2.2.2.33
diff -C2 -d -r1.1.1.3.2.2.2.32 -r1.1.1.3.2.2.2.33
*** g_bang.c	13 Aug 2004 16:58:50 -0000	1.1.1.3.2.2.2.32
--- g_bang.c	14 Aug 2004 03:38:19 -0000	1.1.1.3.2.2.2.33
***************
*** 19,33 ****
  static t_class *bng_class;
  
- /* ------------------------ bng widgetbehaviour----------------------------- */
- 
- static void bng_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2)
- {
-     t_bng *x = (t_bng *)z;
-     *xp1 = text_xpix(&x->x_gui.x_obj, glist);
-     *yp1 = text_ypix(&x->x_gui.x_obj, glist);
-     *xp2 = *xp1 + x->x_gui.x_w;
-     *yp2 = *yp1 + x->x_gui.x_h;
- }
- 
  static void bng_check_minmax(t_bng *x) {
      if(x->x_ftbreak > x->x_fthold) {
--- 19,22 ----
***************
*** 155,159 ****
      class_addmethod(c, (t_method)bng_flashtime, gensym("flashtime"), A_GIMME, 0);
      class_addmethod(c, (t_method)iemgui_init, gensym("init"), A_FLOAT, 0);
!     wb.w_getrectfn = bng_getrect;
      wb.w_displacefn = iemgui_displace;
      wb.w_selectfn = iemgui_select;
--- 144,148 ----
      class_addmethod(c, (t_method)bng_flashtime, gensym("flashtime"), A_GIMME, 0);
      class_addmethod(c, (t_method)iemgui_init, gensym("init"), A_FLOAT, 0);
!     wb.w_getrectfn = iemgui_getrect;
      wb.w_displacefn = iemgui_displace;
      wb.w_selectfn = iemgui_select;

Index: g_all_guis.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.h,v
retrieving revision 1.1.1.4.2.2.2.36
retrieving revision 1.1.1.4.2.2.2.37
diff -C2 -d -r1.1.1.4.2.2.2.36 -r1.1.1.4.2.2.2.37
*** g_all_guis.h	13 Aug 2004 16:56:26 -0000	1.1.1.4.2.2.2.36
--- g_all_guis.h	14 Aug 2004 03:38:19 -0000	1.1.1.4.2.2.2.37
***************
*** 147,148 ****
--- 147,150 ----
  EXTERN int pd_saveargs(t_binbuf *b, char *fmt, ...);
  EXTERN int pd_savehead(t_binbuf *b, t_iemgui *x, char *name);
+ EXTERN void iemgui_getrect(t_gobj *z, t_glist *glist,
+ int *xp1, int *yp1, int *xp2, int *yp2);





More information about the Pd-cvs mailing list