[PD-cvs] pd/src g_all_guis.h,1.1.1.4.2.2.2.30,1.1.1.4.2.2.2.31 g_all_guis.c,1.1.1.4.2.4.2.35,1.1.1.4.2.4.2.36 g_bang.c,1.1.1.3.2.2.2.28,1.1.1.3.2.2.2.29 g_hdial.c,1.1.1.4.2.2.2.25,1.1.1.4.2.2.2.26 g_hslider.c,1.1.1.3.2.2.2.30,1.1.1.3.2.2.2.31 g_numbox.c,1.1.1.4.2.2.2.25,1.1.1.4.2.2.2.26 g_toggle.c,1.1.1.3.2.2.2.24,1.1.1.3.2.2.2.25

Mathieu Bouchard matju at users.sourceforge.net
Wed May 12 12:25:05 CEST 2004


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

Modified Files:
      Tag: impd_0_37
	g_all_guis.h g_all_guis.c g_bang.c g_hdial.c g_hslider.c 
	g_numbox.c g_toggle.c 
Log Message:
removing x_put_in2out from t_iemgui


Index: g_toggle.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v
retrieving revision 1.1.1.3.2.2.2.24
retrieving revision 1.1.1.3.2.2.2.25
diff -C2 -d -r1.1.1.3.2.2.2.24 -r1.1.1.3.2.2.2.25
*** g_toggle.c	12 May 2004 09:13:18 -0000	1.1.1.3.2.2.2.24
--- g_toggle.c	12 May 2004 10:25:02 -0000	1.1.1.3.2.2.2.25
***************
*** 52,56 ****
  
  static void toggle_float(t_toggle *x, t_floatarg f)
! {toggle_set(x, f); if(x->x_gui.x_put_in2out) toggle_action(x);}
  
  static void toggle_fout(t_toggle *x, t_floatarg f)
--- 52,56 ----
  
  static void toggle_float(t_toggle *x, t_floatarg f)
! {toggle_set(x, f); if(iemgui_forward(x)) toggle_action(x);}
  
  static void toggle_fout(t_toggle *x, t_floatarg f)

Index: g_hdial.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v
retrieving revision 1.1.1.4.2.2.2.25
retrieving revision 1.1.1.4.2.2.2.26
diff -C2 -d -r1.1.1.4.2.2.2.25 -r1.1.1.4.2.2.2.26
*** g_hdial.c	12 May 2004 09:13:18 -0000	1.1.1.4.2.2.2.25
--- g_hdial.c	12 May 2004 10:25:02 -0000	1.1.1.4.2.2.2.26
***************
*** 102,106 ****
      {
  	/* compatibility with earlier "vdial" behavior */
! 	if (x->x_change && i!=x->x_on_old && x->x_gui.x_put_in2out)
  		radio_send2(x,x->x_on_old,0.0);
  	x->x_on_old = x->x_on;
--- 102,106 ----
      {
  	/* compatibility with earlier "vdial" behavior */
! 	if (x->x_change && i!=x->x_on_old && iemgui_forward(x))
  		radio_send2(x,x->x_on_old,0.0);
  	x->x_on_old = x->x_on;
***************
*** 108,115 ****
  	iemgui_dodraw((t_iemgui *)x);
  	x->x_on_old = x->x_on;
! 	if(x->x_gui.x_put_in2out) radio_send2(x,x->x_on,1.0);
      } else {
      	x->x_on = i;
! 	if (x->x_gui.x_put_in2out) radio_send(x,x->x_on);
  	iemgui_dodraw((t_iemgui *)x);
  	x->x_on_old = x->x_on;
--- 108,115 ----
  	iemgui_dodraw((t_iemgui *)x);
  	x->x_on_old = x->x_on;
! 	if(iemgui_forward(x)) radio_send2(x,x->x_on,1.0);
      } else {
      	x->x_on = i;
! 	if (iemgui_forward(x)) radio_send(x,x->x_on);
  	iemgui_dodraw((t_iemgui *)x);
  	x->x_on_old = x->x_on;

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.35
retrieving revision 1.1.1.4.2.4.2.36
diff -C2 -d -r1.1.1.4.2.4.2.35 -r1.1.1.4.2.4.2.36
*** g_all_guis.c	12 May 2004 10:06:58 -0000	1.1.1.4.2.4.2.35
--- g_all_guis.c	12 May 2004 10:25:02 -0000	1.1.1.4.2.4.2.36
***************
*** 59,65 ****
  int iemgui_clip_font(int size) {return MAX(size,IEM_FONT_MINSIZE);}
  
- void iemgui_verify_snd_ne_rcv(t_iemgui *x)
- {x->x_put_in2out = !x->x_snd || !x->x_rcv || x->x_snd != x->x_rcv;}
- 
  t_symbol *iemgui_new_dogetname(t_iemgui *iemgui, int indx, t_atom *argv)
  {
--- 59,62 ----
***************
*** 89,93 ****
      x->x_snd = canvas_realizedollar(x->x_glist, s);
      if (x->x_snd==s_empty) x->x_snd=0;
-     iemgui_verify_snd_ne_rcv(x);
      iemgui_dodraw(x);
  }
--- 86,89 ----
***************
*** 107,111 ****
  	x->x_rcv = rcv;
      }
-     iemgui_verify_snd_ne_rcv(x);
      if(glist_isvisible(x->x_glist)) iemgui_dodraw(x);
  }
--- 103,106 ----
***************
*** 350,354 ****
  	x->x_font_style = 0;
  	x->x_fontsize = 8;
- 	x->x_put_in2out = 1;
  	x->x_snd = 0;
  	x->x_rcv = 0;
--- 345,348 ----
***************
*** 380,384 ****
      x->x_h = iemgui_clip_size(x->x_h);
      x->x_w = iemgui_clip_size(x->x_w);
-     iemgui_verify_snd_ne_rcv(x);
  }
  
--- 374,377 ----
***************
*** 400,401 ****
--- 393,399 ----
  	return !sys_noloadbang && self->x_isa&1;
  }
+ 
+ EXTERN /*bool*/ int iemgui_forward (/*t_iemgui*/ void *x) {
+ 	t_iemgui *self = (t_iemgui *)x;
+ 	return !self->x_snd || !self->x_rcv || self->x_snd != self->x_rcv;
+ }

Index: g_hslider.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hslider.c,v
retrieving revision 1.1.1.3.2.2.2.30
retrieving revision 1.1.1.3.2.2.2.31
diff -C2 -d -r1.1.1.3.2.2.2.30 -r1.1.1.3.2.2.2.31
*** g_hslider.c	12 May 2004 10:06:58 -0000	1.1.1.3.2.2.2.30
--- g_hslider.c	12 May 2004 10:25:02 -0000	1.1.1.3.2.2.2.31
***************
*** 111,115 ****
  static void slider_steady(t_slider *x, t_floatarg f) {x->x_steady = !!f;}
  static void slider_float(t_slider *x, t_floatarg f)
! {slider_set(x, f); if(x->x_gui.x_put_in2out) slider_bang(x);}
  static void slider_loadbang(t_slider *x)
  {if(iemgui_loadbang(x)) slider_bang(x);}
--- 111,115 ----
  static void slider_steady(t_slider *x, t_floatarg f) {x->x_steady = !!f;}
  static void slider_float(t_slider *x, t_floatarg f)
! {slider_set(x, f); if(iemgui_forward(x)) slider_bang(x);}
  static void slider_loadbang(t_slider *x)
  {if(iemgui_loadbang(x)) slider_bang(x);}

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.30
retrieving revision 1.1.1.4.2.2.2.31
diff -C2 -d -r1.1.1.4.2.2.2.30 -r1.1.1.4.2.2.2.31
*** g_all_guis.h	12 May 2004 10:06:58 -0000	1.1.1.4.2.2.2.30
--- g_all_guis.h	12 May 2004 10:25:02 -0000	1.1.1.4.2.2.2.31
***************
*** 22,26 ****
      int x_ldx, x_ldy;
      int x_isa; /* bit 0: loadinit; bit 20: scale */
-     unsigned x_put_in2out:1;
      int x_font_style, x_fontsize;
      int x_fcol, x_bcol, x_lcol; /* foreground, background, label colors */
--- 22,25 ----
***************
*** 33,38 ****
      int      x_flashed;
      int      x_locked;
!     int      x_flashtime_break;
!     int      x_flashtime_hold;
      t_clock  *x_clock_hld;
      t_clock  *x_clock_brk;
--- 32,37 ----
      int      x_flashed;
      int      x_locked;
!     int      x_ftbreak; /* flash time break (ms) */
!     int      x_fthold;  /* flash time hold  (ms) */
      t_clock  *x_clock_hld;
      t_clock  *x_clock_brk;
***************
*** 119,123 ****
  EXTERN int iemgui_clip_size(int size);
  EXTERN int iemgui_clip_font(int size);
- EXTERN void iemgui_verify_snd_ne_rcv(t_iemgui *iemgui);
  EXTERN t_symbol *iemgui_new_dogetname(t_iemgui *iemgui, int indx, t_atom *argv);
  EXTERN void iemgui_size(t_iemgui *x);
--- 118,121 ----
***************
*** 149,150 ****
--- 147,149 ----
  EXTERN void binbuf_update(t_iemgui *x, t_symbol *qlass, int argc, t_atom *argv);
  EXTERN /*bool*/ int iemgui_loadbang (/*t_iemgui*/ void *x);
+ EXTERN /*bool*/ int iemgui_forward (/*t_iemgui*/ void *x); /* was x_put_in2out */

Index: g_bang.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_bang.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_bang.c	12 May 2004 09:13:17 -0000	1.1.1.3.2.2.2.28
--- g_bang.c	12 May 2004 10:25:02 -0000	1.1.1.3.2.2.2.29
***************
*** 30,37 ****
  }
  
! void bng_check_minmax(t_bng *x, int ftbreak, int fthold) {
!     if(ftbreak > fthold) {int h = ftbreak; ftbreak = fthold; fthold = h;}
!     x->x_flashtime_break = MAX(ftbreak,10);
!     x->x_flashtime_hold  = MAX(fthold, 50);
  }
  
--- 30,41 ----
  }
  
! static void bng_check_minmax(t_bng *x) {
!     if(x->x_ftbreak > x->x_fthold) {
! 	int h = x->x_ftbreak;
! 	x->x_ftbreak = x->x_fthold;
! 	x->x_fthold = h;
!     }
!     x->x_ftbreak = MAX(x->x_ftbreak,10);
!     x->x_fthold  = MAX(x->x_fthold, 50);
  }
  
***************
*** 40,44 ****
      if(x->x_flashed) {
  	x->x_flashed = 0;
! 	clock_delay(x->x_clock_brk, x->x_flashtime_break);
      } else {
  	t_canvas *glist = ((t_iemgui *)x)->x_glist;
--- 44,48 ----
      if(x->x_flashed) {
  	x->x_flashed = 0;
! 	clock_delay(x->x_clock_brk, x->x_ftbreak);
      } else {
  	t_canvas *glist = ((t_iemgui *)x)->x_glist;
***************
*** 46,55 ****
      }
      x->x_flashed = 1;
!     clock_delay(x->x_clock_hld, x->x_flashtime_hold);
  }
  
  static void bng_bout2(t_bng *x)
  {
!     if(!x->x_gui.x_put_in2out) {x->x_locked=1; clock_delay(x->x_clock_lck, 2);}
      outlet_bang(x->x_gui.x_obj.ob_outlet);
      if(x->x_gui.x_snd && x->x_gui.x_snd->s_thing) pd_bang(x->x_gui.x_snd->s_thing);
--- 50,59 ----
      }
      x->x_flashed = 1;
!     clock_delay(x->x_clock_hld, x->x_fthold);
  }
  
  static void bng_bout2(t_bng *x)
  {
!     if(!iemgui_forward(x)) {x->x_locked=1; clock_delay(x->x_clock_lck, 2);}
      outlet_bang(x->x_gui.x_obj.ob_outlet);
      if(x->x_gui.x_snd && x->x_gui.x_snd->s_thing) pd_bang(x->x_gui.x_snd->s_thing);
***************
*** 60,75 ****
      if(x->x_locked) return;
      bng_set(x);
!     if(!x->x_gui.x_put_in2out) {x->x_locked = 1; clock_delay(x->x_clock_lck, 2);}
      outlet_bang(x->x_gui.x_obj.ob_outlet);
!     if(x->x_gui.x_snd && x->x_gui.x_snd->s_thing && x->x_gui.x_put_in2out) pd_bang(x->x_gui.x_snd->s_thing);
! }
! static void bng_bang2(t_bng *x) {
! 	if(x->x_locked) return;
! 	bng_set(x);
! 	bng_bout2(x);
  }
! 
! static void bng_loadbang(t_bng *x)
! {if(iemgui_loadbang(x)) {bng_set(x); bng_bout2(x);}}
  
  static void bng_size(t_bng *x, t_symbol *s, int ac, t_atom *av)
--- 64,73 ----
      if(x->x_locked) return;
      bng_set(x);
!     if(!iemgui_forward(x)) {x->x_locked = 1; clock_delay(x->x_clock_lck, 2);}
      outlet_bang(x->x_gui.x_obj.ob_outlet);
!     if(x->x_gui.x_snd && x->x_gui.x_snd->s_thing && iemgui_forward(x)) pd_bang(x->x_gui.x_snd->s_thing);
  }
! static void bng_bang2   (t_bng *x) {if(!x->x_locked)       {bng_set(x); bng_bout2(x);}}
! static void bng_loadbang(t_bng *x) {if(iemgui_loadbang(x)) {bng_set(x); bng_bout2(x);}}
  
  static void bng_size(t_bng *x, t_symbol *s, int ac, t_atom *av)
***************
*** 79,87 ****
  }
  
! static void bng_flashtime(t_bng *x, t_symbol *s, int ac, t_atom *av)
! {
!     bng_check_minmax(x,
! 	(int)atom_getintarg(0, ac, av),
! 	(int)atom_getintarg(1, ac, av));
  }
  
--- 77,84 ----
  }
  
! static void bng_flashtime(t_bng *x, t_symbol *s, int ac, t_atom *av) {
!     x->x_ftbreak = atom_getintarg(0, ac, av);
!     x->x_fthold  = atom_getintarg(1, ac, av);
!     bng_check_minmax(x);
  }
  
***************
*** 95,103 ****
      binbuf_update(y,gensym("bng"),argc,argv);
      if (!pd_scanargs(argc,argv,"iiiiaaaiiiiccc",
! 	&y->x_w,&x->x_flashtime_hold,&x->x_flashtime_break,&y->x_isa,&y->x_snd,&y->x_rcv,&y->x_lab,
  	&y->x_ldx,&y->x_ldy,&y->x_font_style,&y->x_fontsize,
  	&y->x_bcol,&y->x_fcol,&y->x_lcol)) return;
      y->x_h = y->x_w;
!     bng_check_minmax(x, x->x_flashtime_break, x->x_flashtime_hold);
      iemgui_constrain(y);
      if (y->x_rcv) pd_bind((t_pd *)x, y->x_rcv);
--- 92,100 ----
      binbuf_update(y,gensym("bng"),argc,argv);
      if (!pd_scanargs(argc,argv,"iiiiaaaiiiiccc",
! 	&y->x_w,&x->x_fthold,&x->x_ftbreak,&y->x_isa,&y->x_snd,&y->x_rcv,&y->x_lab,
  	&y->x_ldx,&y->x_ldy,&y->x_font_style,&y->x_fontsize,
  	&y->x_bcol,&y->x_fcol,&y->x_lcol)) return;
      y->x_h = y->x_w;
!     bng_check_minmax(x);
      iemgui_constrain(y);
      if (y->x_rcv) pd_bind((t_pd *)x, y->x_rcv);
***************
*** 109,115 ****
      t_iemgui *y = iemgui_new(bng_class);
      t_bng *x = (t_bng *)y;
!     x->x_flashtime_break = 250;
!     x->x_flashtime_hold = 50;
!     bng_check_minmax(x, x->x_flashtime_break, x->x_flashtime_hold);
      x->x_flashed = 0;
      x->x_locked = 0;
--- 106,112 ----
      t_iemgui *y = iemgui_new(bng_class);
      t_bng *x = (t_bng *)y;
!     x->x_ftbreak = 250;
!     x->x_fthold = 50;
!     bng_check_minmax(x);
      x->x_flashed = 0;
      x->x_locked = 0;

Index: g_numbox.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_numbox.c,v
retrieving revision 1.1.1.4.2.2.2.25
retrieving revision 1.1.1.4.2.2.2.26
diff -C2 -d -r1.1.1.4.2.2.2.25 -r1.1.1.4.2.2.2.26
*** g_numbox.c	12 May 2004 10:06:58 -0000	1.1.1.4.2.2.2.25
--- g_numbox.c	12 May 2004 10:25:02 -0000	1.1.1.4.2.2.2.26
***************
*** 95,99 ****
  
  static void my_numbox_float(t_my_numbox *x, t_floatarg f)
! {my_numbox_set(x, f); if(x->x_gui.x_put_in2out) my_numbox_bang(x);}
  
  static void my_numbox_size(t_my_numbox *x, t_symbol *s, int ac, t_atom *av)
--- 95,99 ----
  
  static void my_numbox_float(t_my_numbox *x, t_floatarg f)
! {my_numbox_set(x, f); if(iemgui_forward(x)) my_numbox_bang(x);}
  
  static void my_numbox_size(t_my_numbox *x, t_symbol *s, int ac, t_atom *av)





More information about the Pd-cvs mailing list