Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17136
Modified Files: Tag: devel_0_39 desire.c Log Message: removing .x prefix and .c suffix from canvas id (let the client deal with that) [bng]: removing fields "flashed" and "locked" [bng]: adding field "count"
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -C2 -d -r1.1.2.9 -r1.1.2.10 *** desire.c 11 Sep 2005 20:33:09 -0000 1.1.2.9 --- desire.c 14 Sep 2005 08:37:52 -0000 1.1.2.10 *************** *** 1,3 **** ! /* This file is part of DesireData. Copyright (c) 2004,2005 by Mathieu Bouchard. --- 1,4 ---- ! /* $Id$ ! This file is part of DesireData. Copyright (c) 2004,2005 by Mathieu Bouchard. *************** *** 43,58 **** t_symbol *snd,*rcv,*lab; /* send, receive, label symbols */
! typedef struct _iemgui { IEMGUI_FIELDS } t_iemgui;
! typedef struct _bng { ! IEMGUI_FIELDS ! int flashed; ! int locked; int ftbreak; /* flash time break (ms) */ int fthold; /* flash time hold (ms) */ } t_bng;
! typedef struct _slider { ! IEMGUI_FIELDS t_symbol *flavor; int pos; --- 44,56 ---- t_symbol *snd,*rcv,*lab; /* send, receive, label symbols */
! typedef struct { IEMGUI_FIELDS } t_iemgui;
! typedef struct { IEMGUI_FIELDS ! int count; int ftbreak; /* flash time break (ms) */ int fthold; /* flash time hold (ms) */ } t_bng;
! typedef struct { IEMGUI_FIELDS t_symbol *flavor; int pos; *************** *** 65,70 **** } t_slider;
! typedef struct _radio { ! IEMGUI_FIELDS t_symbol *flavor; int on; --- 63,67 ---- } t_slider;
! typedef struct { IEMGUI_FIELDS t_symbol *flavor; int on; *************** *** 75,86 **** } t_radio;
! typedef struct _toggle { ! IEMGUI_FIELDS float on; float nonzero; } t_toggle;
! typedef struct _my_canvas { ! IEMGUI_FIELDS t_atom at[3]; int vis_w; --- 72,81 ---- } t_radio;
! typedef struct { IEMGUI_FIELDS float on; float nonzero; } t_toggle;
! typedef struct { IEMGUI_FIELDS t_atom at[3]; int vis_w; *************** *** 88,99 **** } t_my_canvas, t_cnv;
! typedef struct _dropper { ! IEMGUI_FIELDS t_symbol *s; t_symbol *ds; } t_dropper;
! typedef struct _vu { ! IEMGUI_FIELDS int led_size; int peak; --- 83,92 ---- } t_my_canvas, t_cnv;
! typedef struct { IEMGUI_FIELDS t_symbol *s; t_symbol *ds; } t_dropper;
! typedef struct { IEMGUI_FIELDS int led_size; int peak; *************** *** 106,111 **** } t_vu;
! typedef struct _nbx { ! IEMGUI_FIELDS double val; double min; --- 99,103 ---- } t_vu;
! typedef struct { IEMGUI_FIELDS double val; double min; *************** *** 118,122 **** int change; int is_log; ! } t_my_numbox, t_nbx;
static int iemgui_clip_size(int size); --- 110,114 ---- int change; int is_log; ! } t_nbx;
static int iemgui_clip_size(int size); *************** *** 184,188 **** t_text *x = (t_text *)pd_new(text_class); t_atom at; ! sys_vgui("global _; set _(%x:canvas) .x%lx.c\n",(long)x,(long)gl); x->te_width = 0; /* don't know it yet. */ x->te_type = T_TEXT; --- 176,180 ---- t_text *x = (t_text *)pd_new(text_class); t_atom at; ! sys_vgui("global _; set _(%x:canvas) %lx\n",(long)x,(long)gl); x->te_width = 0; /* don't know it yet. */ x->te_type = T_TEXT; *************** *** 246,250 **** } if (!x) x = (t_text *)pd_new(text_class); ! sys_vgui("global _; set _(%x:canvas) .x%lx.c\n",(long)x,(long)gl); x->te_binbuf = b; x->te_xpix = xpix; --- 238,242 ---- } if (!x) x = (t_text *)pd_new(text_class); ! sys_vgui("global _; set _(%x:canvas) %lx\n",(long)x,(long)gl); x->te_binbuf = b; x->te_xpix = xpix; *************** *** 1273,1303 **** }
! static void bng_set(t_bng *x) ! { ! if(x->flashed) { ! x->flashed = 0; ! } else { ! t_canvas *glist = ((t_iemgui *)x)->glist; ! if (glist_isvisible(glist_getcanvas(glist))) sys_mgui((t_gobj *)x,"bang",""); ! } ! x->flashed = 1; ! } ! ! static void bng_bout2(t_bng *x) ! { ! if(!iemgui_forward(x)) {x->locked=1;} outlet_bang(x->obj.ob_outlet); if(x->snd && x->snd->s_thing) pd_bang(x->snd->s_thing); }
! static void bng_bang(t_bng *x) ! { ! if(x->locked) return; bng_set(x); - if(!iemgui_forward(x)) {x->locked = 1;} outlet_bang(x->obj.ob_outlet); if(x->snd && x->snd->s_thing && iemgui_forward(x)) pd_bang(x->snd->s_thing); } ! static void bng_bang2 (t_bng *x) {if(!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);}}
--- 1265,1280 ---- }
! static void bng_set(t_bng *x) {x->count++; pd_changed(x);} ! static void bng_bout2(t_bng *x) { outlet_bang(x->obj.ob_outlet); if(x->snd && x->snd->s_thing) pd_bang(x->snd->s_thing); }
! static void bng_bang(t_bng *x) { bng_set(x); outlet_bang(x->obj.ob_outlet); if(x->snd && x->snd->s_thing && iemgui_forward(x)) pd_bang(x->snd->s_thing); } ! static void bng_bang2 (t_bng *x) { {bng_set(x); bng_bout2(x);}} static void bng_loadbang(t_bng *x) {if(iemgui_loadbang(x)) {bng_set(x); bng_bout2(x);}}
*************** *** 1344,1350 **** x->ftbreak = 250; x->fthold = 50; bng_check_minmax(x); - x->flashed = 0; - x->locked = 0; outlet_new((t_text *)x, &s_bang); bng_reload(x,0,argc,argv); --- 1321,1326 ---- x->ftbreak = 250; x->fthold = 50; + x->count = 0; bng_check_minmax(x); outlet_new((t_text *)x, &s_bang); bng_reload(x,0,argc,argv);