本文整理汇总了C++中pd_bind函数的典型用法代码示例。如果您正苦于以下问题:C++ pd_bind函数的具体用法?C++ pd_bind怎么用?C++ pd_bind使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pd_bind函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: 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);
}
}
开发者ID:Git689,项目名称:libpd-cyclone-ios,代码行数:28,代码来源:grab.c
示例2: glob_init
void glob_init(void)
{
maxclass = class_new(gensym("max"), 0, 0, sizeof(t_pd),
CLASS_DEFAULT, A_NULL);
class_addanything(maxclass, max_default);
pd_bind(&maxclass, gensym("max"));
glob_pdobject = class_new(gensym("pd"), 0, 0, sizeof(t_pd),
CLASS_DEFAULT, A_NULL);
class_addmethod(glob_pdobject, (t_method)glob_initfromgui, gensym("init"),
A_GIMME, 0);
class_addmethod(glob_pdobject, (t_method)glob_setfilename, gensym("filename"),
A_SYMBOL, A_SYMBOL, 0);
class_addmethod(glob_pdobject, (t_method)glob_evalfile, gensym("open"),
A_SYMBOL, A_SYMBOL, 0);
class_addmethod(glob_pdobject, (t_method)glob_quit, gensym("quit"), 0);
class_addmethod(glob_pdobject, (t_method)glob_verifyquit,
gensym("verifyquit"), A_DEFFLOAT, 0);
// class_addmethod(glob_pdobject, (t_method)glob_foo, gensym("foo"), A_GIMME, 0);
class_addmethod(glob_pdobject, (t_method)glob_dsp, gensym("dsp"), A_GIMME, 0);
class_addmethod(glob_pdobject, (t_method)glob_meters, gensym("meters"),
A_FLOAT, 0);
class_addmethod(glob_pdobject, (t_method)glob_key, gensym("key"), A_GIMME, 0);
class_addmethod(glob_pdobject, (t_method)glob_audiostatus,
gensym("audiostatus"), 0);
class_addmethod(glob_pdobject, (t_method)glob_finderror,
gensym("finderror"), 0);
// class_addmethod(glob_pdobject, (t_method)glob_audio_properties,
// gensym("audio-properties"), A_DEFFLOAT, 0);
// class_addmethod(glob_pdobject, (t_method)glob_audio_dialog,
// gensym("audio-dialog"), A_GIMME, 0);
// class_addmethod(glob_pdobject, (t_method)glob_audio_setapi,
// gensym("audio-setapi"), A_FLOAT, 0);
// class_addmethod(glob_pdobject, (t_method)glob_midi_setapi,
// gensym("midi-setapi"), A_FLOAT, 0);
// class_addmethod(glob_pdobject, (t_method)glob_midi_properties,
// gensym("midi-properties"), A_DEFFLOAT, 0);
// class_addmethod(glob_pdobject, (t_method)glob_midi_dialog,
// gensym("midi-dialog"), A_GIMME, 0);
class_addmethod(glob_pdobject, (t_method)glob_start_path_dialog,
gensym("start-path-dialog"), 0);
class_addmethod(glob_pdobject, (t_method)glob_path_dialog,
gensym("path-dialog"), A_GIMME, 0);
class_addmethod(glob_pdobject, (t_method)glob_start_startup_dialog,
gensym("start-startup-dialog"), 0);
class_addmethod(glob_pdobject, (t_method)glob_startup_dialog,
gensym("startup-dialog"), A_GIMME, 0);
class_addmethod(glob_pdobject, (t_method)glob_ping, gensym("ping"), 0);
// class_addmethod(glob_pdobject, (t_method)glob_savepreferences,
// gensym("save-preferences"), 0);
class_addmethod(glob_pdobject, (t_method)glob_version,
gensym("version"), A_FLOAT, 0);
class_addmethod(glob_pdobject, (t_method)glob_perf,
gensym("perf"), A_FLOAT, 0);
class_addanything(glob_pdobject, max_default);
pd_bind(&glob_pdobject, gensym("pd"));
}
开发者ID:bryansum,项目名称:ijam,代码行数:57,代码来源:m_glob.c
示例3: pd_bind
void *masse_new(t_symbol *s, t_floatarg M, t_floatarg X)
{
t_masse *x = (t_masse *)pd_new(masse_class);
x->x_sym = s;
pd_bind(&x->x_obj.ob_pd, s);
x->position_new=outlet_new(&x->x_obj, 0);
x->force_out=outlet_new(&x->x_obj, 0);
x->vitesse_out=outlet_new(&x->x_obj, 0);
x->Xinit=X;
x->pos_old_1 = X;
x->pos_old_2 = X;
x->force=0;
x->masse=M;
x->minX = -100000;
x->maxX = 100000;
if (x->masse<=0) x->masse=1;
return (void *)x;
}
开发者ID:MagdaHertzberg,项目名称:Pure-Data,代码行数:26,代码来源:masse.c
示例4: pd_bind
void *liaKD_new(t_symbol *s, t_floatarg L, t_floatarg K, t_floatarg D, t_floatarg D2 )
{
t_liaKD *x = (t_liaKD *)pd_new(liaKD_class);
x->x_sym = s;
pd_bind(&x->x_obj.ob_pd, s);
floatinlet_new(&x->x_obj, &x->position2);
x->force1=outlet_new(&x->x_obj, 0);
x->force2=outlet_new(&x->x_obj, 0);
x->position1 = 0;
x->position2 = 0;
x->raideur=K;
x->viscosite=D;
x->D2=D2;
x->Lmin= 0;
x->Lmax= 10000;
x->longueur=L;
return (void *)x;
}
开发者ID:MagdaHertzberg,项目名称:Pure-Data,代码行数:27,代码来源:lia.c
示例5: pd_bind
void *libpdreceive_new(t_symbol *s, void *data) {
t_libpdrec *x = (t_libpdrec *)pd_new(libpdrec_class);
x->x_sym = s;
x->data = data;
pd_bind(&x->x_obj.ob_pd, s);
return x;
}
开发者ID:kmatheussen,项目名称:libpd,代码行数:7,代码来源:x_libpdreceive.c
示例6: outlet_new
static void *keyup_new( void)
{
t_keyup *x = (t_keyup *)pd_new(keyup_class);
outlet_new(&x->x_obj, &s_float);
pd_bind(&x->x_obj.ob_pd, keyup_sym);
return (x);
}
开发者ID:flummingbird,项目名称:pd,代码行数:7,代码来源:x_gui.c
示例7: s_inter_newpdinstance
EXTERN t_pdinstance *pdinstance_new(void)
{
t_pdinstance *x = (t_pdinstance *)getbytes(sizeof(t_pdinstance));
t_class *c;
int i;
pd_this = x;
s_inter_newpdinstance();
pdinstance_init(x);
sys_lock();
pd_globallock();
pd_instances = (t_pdinstance **)resizebytes(pd_instances,
pd_ninstances * sizeof(*pd_instances),
(pd_ninstances+1) * sizeof(*pd_instances));
pd_instances[pd_ninstances] = x;
for (c = class_list; c; c = c->c_next)
{
c->c_methods = (t_methodentry **)t_resizebytes(c->c_methods,
pd_ninstances * sizeof(*c->c_methods),
(pd_ninstances + 1) * sizeof(*c->c_methods));
c->c_methods[pd_ninstances] = t_getbytes(0);
for (i = 0; i < c->c_nmethod; i++)
class_addmethodtolist(c, &c->c_methods[pd_ninstances], i,
c->c_methods[0][i].me_fun,
dogensym(c->c_methods[0][i].me_name->s_name, 0, x),
c->c_methods[0][i].me_arg, x);
}
pd_ninstances++;
pdinstance_renumber();
pd_bind(&glob_pdobject, gensym("pd"));
text_template_init();
garray_init();
pd_globalunlock();
sys_unlock();
return (x);
}
开发者ID:danomatika,项目名称:ofxPd,代码行数:35,代码来源:m_class.c
示例8: pd_bind
void *lia2D_new(t_symbol *s, t_floatarg l, t_floatarg K, t_floatarg D, t_floatarg D2)
{
t_lia2D *x = (t_lia2D *)pd_new(lia2D_class);
x->x_sym = s;
pd_bind(&x->x_obj.ob_pd, s);
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("position2D"), gensym("position2D2"));
x->force1=outlet_new(&x->x_obj, 0);
x->force2=outlet_new(&x->x_obj, 0);
x->position2Dx1 = 0;
x->position2Dx2 = 0;
x->position2Dy1 = 0;
x->position2Dy2 = 0;
x->raideur=K;
x->viscosite=D;
x->longueur = l;
x->D2=D2;
x->Lmin= 0;
x->Lmax= 10000;
x->muscle= 1;
x->distance_old = x->longueur;
return (x);
}
开发者ID:MagdaHertzberg,项目名称:Pure-Data,代码行数:32,代码来源:lia2D.c
示例9: multireceive_add
static void multireceive_add(t_multireceive *x, t_symbol*s) {
t_symlist*sl=x->x_symlist;
t_symlist*element=NULL;
if(sl) {
while(sl->next) {
if(s==sl->s) {
// already bound to this symbol
return;
}
sl=sl->next;
}
}
element=(t_symlist*)getbytes(sizeof(t_symlist));
element->s=s;
element->next=NULL;
pd_bind(&x->x_proxy->x_obj.ob_pd, s);
if(sl) {
sl->next=element;
} else {
x->x_symlist=element;
}
}
开发者ID:Angeldude,项目名称:pd,代码行数:25,代码来源:multireceive.c
示例10: 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);
}
开发者ID:IvanKhodorich,项目名称:pd,代码行数:29,代码来源:g_all_guis.c
示例11: pd_bind
static void *receive_new(t_symbol *s)
{
t_receive *x = (t_receive *)pd_new(receive_class);
x->x_sym = s;
pd_bind(&x->x_obj.ob_pd, s);
outlet_new(&x->x_obj, 0);
return (x);
}
开发者ID:BurntBrunch,项目名称:rockbox-fft,代码行数:8,代码来源:x_connective.c
示例12: GemBase
/////////////////////////////////////////////////////////
//
// GemBase
//
/////////////////////////////////////////////////////////
// Constructor
//
/////////////////////////////////////////////////////////
GemBase :: GemBase(void)
: gem_amRendering(false), m_cache(NULL), m_modified(true),
m_out1(NULL),
m_enabled(true), m_state(INIT)
{
m_out1 = outlet_new(this->x_obj, 0);
pd_bind(&this->x_obj->ob_pd, gensym("__gemBase"));
}
开发者ID:megrimm,项目名称:Gem,代码行数:16,代码来源:GemBase.cpp
示例13: outlet_new
static void *sysexin_new( void)
{
t_midiin *x = (t_midiin *)pd_new(sysexin_class);
x->x_outlet1 = outlet_new(&x->x_obj, &s_float);
x->x_outlet2 = outlet_new(&x->x_obj, &s_float);
pd_bind(&x->x_obj.ob_pd, sysexin_sym);
return (x);
}
开发者ID:pedebt,项目名称:pd-vanilla,代码行数:8,代码来源:x_midi.c
示例14: outlet_new
static void *midirealtimein_new( void)
{
t_midirealtimein *x = (t_midirealtimein *)pd_new(midirealtimein_class);
x->x_outlet1 = outlet_new(&x->x_obj, &s_float);
x->x_outlet2 = outlet_new(&x->x_obj, &s_float);
pd_bind(&x->x_obj.ob_pd, pd_this->pd_midirealtimein_sym);
return (x);
}
开发者ID:DataPaulette,项目名称:pd-vanilla,代码行数:8,代码来源:x_midi.c
示例15: pd_bind
t_guiconnect *guiconnect_new(t_pd *who, t_symbol *sym)
{
t_guiconnect *x = (t_guiconnect *)pd_new(guiconnect_class);
x->x_who = who;
x->x_sym = sym;
pd_bind(&x->x_obj.ob_pd, sym);
return (x);
}
开发者ID:jyg,项目名称:pure-data,代码行数:8,代码来源:g_guiconnect.c
示例16: outlet_new
static void *midiclkin_new(t_floatarg f)
{
t_midiclkin *x = (t_midiclkin *)pd_new(midiclkin_class);
x->x_outlet1 = outlet_new(&x->x_obj, &s_float);
x->x_outlet2 = outlet_new(&x->x_obj, &s_float);
pd_bind(&x->x_obj.ob_pd, midiclkin_sym);
return (x);
}
开发者ID:Gaz5700,项目名称:pd-double,代码行数:8,代码来源:x_midi.c
示例17: return
static void *namecanvas_new(t_symbol *s)
{
t_namecanvas *x = (t_namecanvas *)pd_new(namecanvas_class);
x->x_owner = (t_pd *)canvas_getcurrent();
x->x_sym = s;
if (*s->s_name) pd_bind(x->x_owner, s);
return (x);
}
开发者ID:danomatika,项目名称:ofxPd,代码行数:8,代码来源:x_misc.c
示例18: sprintf
static void *openpanel_new( void)
{
char buf[50];
t_openpanel *x = (t_openpanel *)pd_new(openpanel_class);
sprintf(buf, "d%lx", (t_int)x);
x->x_s = gensym(buf);
pd_bind(&x->x_obj.ob_pd, x->x_s);
outlet_new(&x->x_obj, &s_symbol);
return (x);
}
开发者ID:IvanKhodorich,项目名称:pd,代码行数:10,代码来源:x_gui.c
示例19: pd_bind
void *sigcatch13_new(t_symbol *s)
{
t_sigcatch13 *x = (t_sigcatch13 *)pd_new(sigcatch13_class);
if (!*s->s_name) s = gensym("catch~");
pd_bind(&x->x_obj.ob_pd, s);
x->x_sym = s;
x->x_n = DEFSENDVS;
x->x_vec = (float *)getbytes(DEFSENDVS * sizeof(float));
outlet_new(&x->x_obj, &s_signal);
return (x);
}
开发者ID:Angeldude,项目名称:pd,代码行数:11,代码来源:catch13~.c
示例20: 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);
}
}
开发者ID:nicklan,项目名称:tglgrid,代码行数:11,代码来源:tglgrid.c
注:本文中的pd_bind函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论