本文整理汇总了C++中pd_unbind函数的典型用法代码示例。如果您正苦于以下问题:C++ pd_unbind函数的具体用法?C++ pd_unbind怎么用?C++ pd_unbind使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pd_unbind函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: iemgui_receive
void iemgui_receive(t_iemgui *x, t_symbol *s)
{
t_symbol *rcv;
if (s == &s_) s = s_empty; //tb: fix for empty label
int oldsndrcvable=0;
if(iemgui_has_rcv(x)) oldsndrcvable += IEM_GUI_OLD_RCV_FLAG;
if(iemgui_has_snd(x)) oldsndrcvable += IEM_GUI_OLD_SND_FLAG;
rcv = iemgui_raute2dollar(s);
x->x_rcv_unexpanded = rcv;
rcv = canvas_realizedollar(x->x_glist, rcv);
if(s!=s_empty)
{
if(rcv!=x->x_rcv)
{
if(iemgui_has_rcv(x))
pd_unbind((t_pd *)x, x->x_rcv);
x->x_rcv = rcv;
pd_bind((t_pd *)x, x->x_rcv);
}
}
else if(s==s_empty && iemgui_has_rcv(x))
{
pd_unbind((t_pd *)x, x->x_rcv);
x->x_rcv = rcv;
}
iemgui_verify_snd_ne_rcv(x);
iemgui_draw_io(x, oldsndrcvable);
}
示例2: grab_setup
void grab_setup(void)
{
t_symbol *s = gensym("grab");
grab_class = class_new(s, (t_newmethod)grab_new,
(t_method)grab_free,
sizeof(t_grab), 0,
A_DEFFLOAT, A_DEFSYMBOL, 0);
class_addfloat(grab_class, grab_float);
class_addbang(grab_class, grab_bang);
class_addsymbol(grab_class, grab_symbol);
class_addpointer(grab_class, grab_pointer);
class_addlist(grab_class, grab_list);
class_addanything(grab_class, grab_anything);
class_addmethod(grab_class, (t_method)grab_set,
gensym("set"), A_SYMBOL, 0);
if (!bindlist_class)
{
t_class *c = grab_class;
pd_bind(&grab_class, s);
pd_bind(&c, s);
if (!s->s_thing
|| !(bindlist_class = *s->s_thing)
|| bindlist_class->c_name != gensym("bindlist"))
error("grab: failure to initialize remote grabbing feature");
pd_unbind(&c, s);
pd_unbind(&grab_class, s);
}
}
示例3: hammerfile_free
void hammerfile_free(t_hammerfile *f)
{
t_hammerfile *prev, *next;
hammereditor_close(f, 0);
if (f->f_embedfn)
/* just in case of missing 'restore' */
hammerembed_gc(f->f_master, ps__C, 0);
if (f->f_savepanel)
{
pd_unbind((t_pd *)f->f_savepanel, f->f_savepanel->f_bindname);
pd_free((t_pd *)f->f_savepanel);
}
if (f->f_bindname) pd_unbind((t_pd *)f, f->f_bindname);
if (f->f_panelclock) clock_free(f->f_panelclock);
if (f->f_editorclock) clock_free(f->f_editorclock);
for (prev = 0, next = hammerfile_proxies;
next; prev = next, next = next->f_next)
if (next == f)
break;
if (prev)
prev->f_next = f->f_next;
else if (f == hammerfile_proxies)
hammerfile_proxies = f->f_next;
pd_free((t_pd *)f);
}
示例4: guiconnect_free
/* cleanup routine; delete any resources we have */
static void guiconnect_free(t_guiconnect *x)
{
if (x->x_sym)
pd_unbind(&x->x_obj.ob_pd, x->x_sym);
if (x->x_clock)
clock_free(x->x_clock);
}
示例5: hammerembed_gc
static void hammerembed_gc(t_pd *x, t_symbol *s, int expected)
{
t_pd *garbage;
int count = 0;
while (garbage = pd_findbyclass(s, *x)) pd_unbind(garbage, s), count++;
if (count != expected)
bug("hammerembed_gc (%d garbage bindings)", count);
}
示例6: image_free
static void image_free(t_image *x)
{
sys_vgui("image delete img%x\n", x);
if (x->x_receive) {
pd_unbind(&x->x_obj.ob_pd,x->x_receive);
}
//sys_vgui(".x%lx.c delete %xSEL\n", x);
//sys_vgui(".x%lx.c delete %xS\n", x);
}
示例7: number_release
void number_release(t_symbol *s)
{ t_number *num = (t_number *)pd_findbyclass(s,number_class);
if (num) {
if (!--num->o_refcount) {
pd_unbind(&num->o_pd, s);
pd_free(&num->o_pd);
}
}
else bug("value_release");
}
示例8: guiconnect_signoff
/* the GUI calls this when it disappears. (If there's any chance the
GUI will fail to do this, the "target", when it signs off, should specify
a timeout after which the guiconnect will disappear.) */
static void guiconnect_signoff(t_guiconnect *x)
{
if (!x->x_who)
pd_free(&x->x_obj.ob_pd);
else
{
pd_unbind(&x->x_obj.ob_pd, x->x_sym);
x->x_sym = 0;
}
}
示例9: draw_select
static void draw_select(t_tg* tg,t_glist* glist) {
t_canvas *canvas = glist_getcanvas(glist);
if(tg->selected) {
pd_bind(&tg->x_obj.ob_pd, tg->name);
sys_vgui(".x%lx.c itemconfigure %lxTGLBOUND -outline #0000FF\n", canvas, tg);
}
else {
pd_unbind(&tg->x_obj.ob_pd, tg->name);
sys_vgui(".x%lx.c itemconfigure %lxTGLBOUND -outline #000000\n", canvas, tg);
}
}
示例10: stopRendering
/////////////////////////////////////////////////////////
// Destructor
//
/////////////////////////////////////////////////////////
GemBase :: ~GemBase(void)
{
if (gem_amRendering) {
stopRendering();
gem_amRendering=false;
}
if (m_out1) {
outlet_free(m_out1);
}
pd_unbind(&this->x_obj->ob_pd, gensym("__gemBase"));
}
示例11: scope_free
static void scope_free(t_scope *x)
{
if (x->x_clock) clock_free(x->x_clock);
if (x->x_xbuffer != x->x_xbufini)
freebytes(x->x_xbuffer, x->x_allocsize * sizeof(*x->x_xbuffer));
if (x->x_ybuffer != x->x_ybufini)
freebytes(x->x_ybuffer, x->x_allocsize * sizeof(*x->x_ybuffer));
if (x->x_handle)
{
pd_unbind(x->x_handle, ((t_scopehandle *)x->x_handle)->h_bindsym);
pd_free(x->x_handle);
}
}
示例12: value_release
/* release a variable. This only frees the "vcommon" resource when the
last interested party releases it. */
void value_release(t_symbol *s)
{
t_vcommon *c = (t_vcommon *)pd_findbyclass(s, vcommon_class);
if (c)
{
if (!--c->c_refcount)
{
pd_unbind(&c->c_pd, s);
pd_free(&c->c_pd);
}
}
else bug("value_release");
}
示例13: paramClass_free
static void paramClass_free(t_paramClass *x)
{
if(x->inlet2) pd_free((t_pd *)x->inlet2);
if (x->receive) pd_unbind(&x->x_obj.ob_pd, x->receive);
if (x->param) param_unregister(x->param);
freebytes(x->gav, x->gac * sizeof(*(x->gav)));
freebytes(x->av, x->alloc * sizeof(*(x->av)));
}
示例14: iemgui_dialog
int iemgui_dialog(t_iemgui *x, int argc, t_atom *argv)
{
t_symbol *srl[3];
x->x_loadinit = !!atom_getintarg(5, argc, argv);
srl[0] = iemgui_getfloatsymarg(7,argc,argv);
srl[1] = iemgui_getfloatsymarg(8,argc,argv);
srl[2] = iemgui_getfloatsymarg(9,argc,argv);
x->x_ldx = atom_getintarg(10, argc, argv);
x->x_ldy = atom_getintarg(11, argc, argv);
int f = atom_getintarg(12, argc, argv);
x->x_fontsize = maxi(atom_getintarg(13, argc, argv),4);
x->x_bcol = atom_getintarg(14, argc, argv) & 0xffffff;
x->x_fcol = atom_getintarg(15, argc, argv) & 0xffffff;
x->x_lcol = atom_getintarg(16, argc, argv) & 0xffffff;
int oldsndrcvable=0;
if(iemgui_has_rcv(x)) oldsndrcvable |= IEM_GUI_OLD_RCV_FLAG;
if(iemgui_has_snd(x)) oldsndrcvable |= IEM_GUI_OLD_SND_FLAG;
iemgui_all_raute2dollar(srl);
// replace ascii code 11 (\v or vertical tab) with spaces
// we do this so that the string with spaces can survive argc,argv
// conversion when coming from dialog side of things where it is parsed
char *c;
for(c = srl[2]->s_name; c != NULL && *c != '\0'; c++)
{
if(*c == '\v')
{
*c = ' ';
}
}
x->x_snd_unexpanded=srl[0]; srl[0]=canvas_realizedollar(x->x_glist, srl[0]);
x->x_rcv_unexpanded=srl[1]; srl[1]=canvas_realizedollar(x->x_glist, srl[1]);
x->x_lab_unexpanded=srl[2]; srl[2]=canvas_realizedollar(x->x_glist, srl[2]);
if(srl[1]!=x->x_rcv)
{
if(iemgui_has_rcv(x))
pd_unbind((t_pd *)x, x->x_rcv);
x->x_rcv = srl[1];
pd_bind((t_pd *)x, x->x_rcv);
}
x->x_snd = srl[0];
x->x_lab = srl[2];
if(f<0 || f>2) f=0;
x->x_font_style = f;
iemgui_verify_snd_ne_rcv(x);
canvas_dirty(x->x_glist, 1);
return oldsndrcvable;
}
示例15: multireceive_clear
static void multireceive_clear(t_multireceive *x) {
t_symlist*sl=x->x_symlist;
t_symlist*current=NULL;
while(sl) {
current=sl;
sl=sl->next;
pd_unbind(&x->x_proxy->x_obj.ob_pd, current->s);
current->s=NULL;
current->next=NULL;
freebytes(current, sizeof(t_symlist));
}
x->x_symlist=NULL;
}