aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
Diffstat (limited to 'externals')
-rw-r--r--externals/grill/flext/buildsys/bmake.inc3
-rw-r--r--externals/grill/flext/buildsys/gnumake.inc3
-rw-r--r--externals/grill/flext/buildsys/nmake.inc3
-rw-r--r--externals/grill/flext/changes.txt3
-rw-r--r--externals/grill/flext/notes.txt1
-rw-r--r--externals/grill/flext/source/flattr_ed.cpp3
-rw-r--r--externals/grill/flext/source/flbind.cpp9
-rw-r--r--externals/grill/flext/source/flbuf.cpp8
-rw-r--r--externals/grill/flext/source/flclass.h11
-rw-r--r--externals/grill/flext/source/flext.cpp37
-rw-r--r--externals/grill/flext/source/flinternal.h1
-rwxr-xr-xexternals/grill/flext/source/flitem.cpp11
12 files changed, 73 insertions, 20 deletions
diff --git a/externals/grill/flext/buildsys/bmake.inc b/externals/grill/flext/buildsys/bmake.inc
index 401c8006..c8dac6fa 100644
--- a/externals/grill/flext/buildsys/bmake.inc
+++ b/externals/grill/flext/buildsys/bmake.inc
@@ -47,6 +47,9 @@ MODEEXT=d
MODEEXT=p
!else
MODEEXT=
+!ifdef SHARED
+TYPEEXT=
+!endif
!endif
!endif
diff --git a/externals/grill/flext/buildsys/gnumake.inc b/externals/grill/flext/buildsys/gnumake.inc
index 0db24110..a52d437f 100644
--- a/externals/grill/flext/buildsys/gnumake.inc
+++ b/externals/grill/flext/buildsys/gnumake.inc
@@ -47,6 +47,9 @@ ifdef PROFILE
MODEEXT=p
else
MODEEXT=
+ifdef SHARED
+TYPEEXT=
+endif
endif
endif
diff --git a/externals/grill/flext/buildsys/nmake.inc b/externals/grill/flext/buildsys/nmake.inc
index bf86cc34..888d5328 100644
--- a/externals/grill/flext/buildsys/nmake.inc
+++ b/externals/grill/flext/buildsys/nmake.inc
@@ -45,6 +45,9 @@ MODEEXT=d
MODEEXT=p
!else
MODEEXT=
+!ifdef SHARED
+TYPEEXT=
+!endif
!endif
!endif
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt
index 0364a0ca..2615e9ff 100644
--- a/externals/grill/flext/changes.txt
+++ b/externals/grill/flext/changes.txt
@@ -24,6 +24,9 @@ Version history:
- enhanced buffer handling
- support for buffer locking (flext::buffer::Lock() and Unlock()) - it's a must for Max/MSP at least
- use new PD idle callback for queues messages (currently in devel_0_38)
+- fixed bug with unregistering for bound symbols
+- removed virtual m_assist function (which was only useful for Max)... stick to static assist strings
+- added m_click method which gets called on alt-click (PD) resp. double clicks (Max) onto the object box
0.4.7:
- added flext::GetBool (just because flext::GetInt has been there for a while)
diff --git a/externals/grill/flext/notes.txt b/externals/grill/flext/notes.txt
index d056236a..67b4d11b 100644
--- a/externals/grill/flext/notes.txt
+++ b/externals/grill/flext/notes.txt
@@ -42,6 +42,7 @@ TODO LIST:
- add double handlers
- add signal in/out connection query function
+- support creation of buffers
- support for Max qelem style
- flext::post and flext::error should print via a worker thread (and should be unlimited in characters)
diff --git a/externals/grill/flext/source/flattr_ed.cpp b/externals/grill/flext/source/flattr_ed.cpp
index 7b12a489..8757c803 100644
--- a/externals/grill/flext/source/flattr_ed.cpp
+++ b/externals/grill/flext/source/flattr_ed.cpp
@@ -419,14 +419,12 @@ void flext_base::SetAttrEditor(t_classid c)
widgetbehavior.w_displacefn = c->c_wb->w_displacefn;
widgetbehavior.w_activatefn = c->c_wb->w_activatefn;
widgetbehavior.w_deletefn = c->c_wb->w_deletefn;
- widgetbehavior.w_clickfn = c->c_wb->w_clickfn;
widgetbehavior.w_selectfn = c->c_wb->w_selectfn;
#else
widgetbehavior.w_getrectfn = text_widgetbehavior.w_getrectfn;
widgetbehavior.w_displacefn = text_widgetbehavior.w_displacefn;
widgetbehavior.w_activatefn = text_widgetbehavior.w_activatefn;
widgetbehavior.w_deletefn = text_widgetbehavior.w_deletefn;
- widgetbehavior.w_clickfn = text_widgetbehavior.w_clickfn;
widgetbehavior.w_selectfn = text_widgetbehavior.w_selectfn;
#endif
@@ -438,6 +436,7 @@ void flext_base::SetAttrEditor(t_classid c)
widgetbehavior.w_savefn = cb_GfxSave;
#endif
+ widgetbehavior.w_clickfn = cb_click;
widgetbehavior.w_visfn = cb_GfxVis;
widgetbehavior.w_selectfn = cb_GfxSelect;
class_setwidget(c, &widgetbehavior);
diff --git a/externals/grill/flext/source/flbind.cpp b/externals/grill/flext/source/flbind.cpp
index 6e4d4f92..4ec9686b 100644
--- a/externals/grill/flext/source/flbind.cpp
+++ b/externals/grill/flext/source/flbind.cpp
@@ -165,13 +165,18 @@ bool flext_base::UnbindMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_sym
for(ItemSet::iterator si = it1; si != it2 && !it; ++si) {
for(Item *i = si.data(); i; i = i->nxt) {
BindItem *item = (BindItem *)i;
- if(!fun || item->fun == fun) { it = item; break; }
+ if(!fun || item->fun == fun)
+ {
+ it = item;
+ if(!sym) sym = si.key();
+ break;
+ }
}
}
if(it) {
if(data) *data = it->px->data;
- ok = bindhead->Remove(it,sym);
+ ok = bindhead->Remove(it,sym,0,false);
if(ok) {
it->Unbind(sym);
delete it;
diff --git a/externals/grill/flext/source/flbuf.cpp b/externals/grill/flext/source/flbuf.cpp
index e42015c6..1d2ff839 100644
--- a/externals/grill/flext/source/flbuf.cpp
+++ b/externals/grill/flext/source/flbuf.cpp
@@ -43,8 +43,12 @@ flext::buffer::buffer(const t_symbol *bn,bool delayed):
ticking = false;
tick = clock_new(this,(t_method)cb_tick);
#elif FLEXT_SYS == FLEXT_SYS_MAX
- if(!sym_buffer) sym_buffer = flext::MakeSymbol("buffer~");
- if(!sym_size) sym_size = flext::MakeSymbol("size");
+ // for some strange reasons (maybe only on Mac)
+ // static initializations are not processed
+ if(!sym_buffer) {
+ sym_buffer = flext::MakeSymbol("buffer~");
+ sym_size = flext::MakeSymbol("size");
+ }
#endif
if(bn) Set(bn,delayed);
diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h
index edf8866c..dc444260 100644
--- a/externals/grill/flext/source/flclass.h
+++ b/externals/grill/flext/source/flclass.h
@@ -91,8 +91,8 @@ public:
//! called on patcher load (not on mere object creation!)
virtual void m_loadbang();
- //! quickhelp for inlets/outlets (gets called in Max/MSP only)
- virtual void m_assist(long /*msg*/,long /*arg*/,char * /*s*/);
+ //! called on (double-)click into object box
+ virtual void m_click();
/*! \brief Called for every incoming message.
All method handling is done in there
@@ -643,7 +643,7 @@ protected:
//! Add an entry
void Add(Item *it,const t_symbol *tag,int inlet = 0);
//! Remove an entry
- bool Remove(Item *it,const t_symbol *tag,int inlet = 0);
+ bool Remove(Item *it,const t_symbol *tag,int inlet,bool free);
//! Find an entry list in the Item array
Item *FindList(const t_symbol *tag,int inlet = 0);
@@ -978,10 +978,15 @@ private:
static void cb_loadbang(t_class *c);
#endif
+#if FLEXT_SYS == FLEXT_SYS_PD
+ static int cb_click(t_gobj *z, struct _glist *glist,int xpix, int ypix, int shift, int alt, int dbl, int doit);
+#endif
+
#if FLEXT_SYS == FLEXT_SYS_MAX
char **indesc,**outdesc;
static void cb_assist(t_class *c,void *b,long msg,long arg,char *s);
+ static void cb_click (t_class *c, Point pt, short mods);
#endif
};
diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp
index fc960f01..1e932360 100644
--- a/externals/grill/flext/source/flext.cpp
+++ b/externals/grill/flext/source/flext.cpp
@@ -148,6 +148,7 @@ void flext_base::Setup(t_classid id)
add_loadbang(c,cb_loadbang);
#if FLEXT_SYS == FLEXT_SYS_MAX
add_assist(c,cb_assist);
+ add_dblclick(c,cb_click);
#endif
#else
fts_class_message_varargs(c,MakeSymbol("help"),cb_help);
@@ -184,23 +185,41 @@ void flext_base::m_help()
void flext_base::m_loadbang() {}
-#if FLEXT_SYS == FLEXT_SYS_MAX
-void flext_base::cb_assist(t_class *c,void * /*b*/,long msg,long arg,char *s) { thisObject(c)->m_assist(msg,arg,s); }
-#endif
+void flext_base::m_click() {}
-void flext_base::m_assist(long msg,long arg,char *s)
+#if FLEXT_SYS == FLEXT_SYS_PD
+int flext_base::cb_click(t_gobj *c, struct _glist *glist,int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
+ if(doit && alt) {
+ thisObject(c)->m_click();
+ return 1;
+ }
+ else
+ return 0;
+}
+#endif
+
#if FLEXT_SYS == FLEXT_SYS_MAX
+void flext_base::cb_click(t_class *c, Point pt, short mods)
+{
+ thisObject(c)->m_click();
+}
+
+void flext_base::cb_assist(t_class *c,void * /*b*/,long msg,long arg,char *s)
+{
+ flext_base *th = thisObject(c);
+
switch(msg) {
case 1: //ASSIST_INLET:
- strcpy(s,arg < incnt && indesc[arg]?indesc[arg]:"");
+ if(arg < th->incnt && th->indesc[arg]) strcpy(s,th->indesc[arg]);
break;
case 2: //ASSIST_OUTLET:
- if(arg < outcnt)
- strcpy(s,outdesc[arg]?outdesc[arg]:"");
+ if(arg < th->outcnt) {
+ if(th->outdesc[arg]) strcpy(s,th->outdesc[arg]);
+ }
else
- strcpy(s,arg == outcnt && procattr?"Attributes":"");
+ if(arg == th->outcnt && th->procattr) strcpy(s,"Attributes");
break;
}
-#endif
}
+#endif
diff --git a/externals/grill/flext/source/flinternal.h b/externals/grill/flext/source/flinternal.h
index 0bdc3bf6..1a1f0f4b 100644
--- a/externals/grill/flext/source/flinternal.h
+++ b/externals/grill/flext/source/flinternal.h
@@ -91,6 +91,7 @@ typedef void t_outlet;
#define add_assist(clss,meth) addmess((method)meth, "assist", A_CANT, A_NULL)
#define add_loadbang(clss,meth) addmess((method)meth, "loadbang", A_CANT, A_NULL)
+#define add_dblclick(clss,meth) addmess((method)meth, "dblclick", A_CANT, A_NULL)
#define newout_signal(clss) outlet_new(clss,"signal")
#define newout_float(clss) outlet_new(clss,"float")
diff --git a/externals/grill/flext/source/flitem.cpp b/externals/grill/flext/source/flitem.cpp
index 90c357d9..0c3f0f03 100755
--- a/externals/grill/flext/source/flitem.cpp
+++ b/externals/grill/flext/source/flitem.cpp
@@ -60,6 +60,8 @@ void flext_base::ItemCont::Resize(int nsz)
void flext_base::ItemCont::Add(Item *item,const t_symbol *tag,int inlet)
{
+ FLEXT_ASSERT(tag);
+
if(!Contained(inlet)) Resize(inlet+2);
ItemSet &set = GetInlet(inlet);
Item *&lst = set[tag];
@@ -72,8 +74,10 @@ void flext_base::ItemCont::Add(Item *item,const t_symbol *tag,int inlet)
members++;
}
-bool flext_base::ItemCont::Remove(Item *item,const t_symbol *tag,int inlet)
+bool flext_base::ItemCont::Remove(Item *item,const t_symbol *tag,int inlet,bool free)
{
+ FLEXT_ASSERT(tag);
+
if(Contained(inlet)) {
ItemSet &set = GetInlet(inlet);
ItemSet::iterator it = set.find(tag);
@@ -83,7 +87,8 @@ bool flext_base::ItemCont::Remove(Item *item,const t_symbol *tag,int inlet)
if(prv) prv->nxt = lit->nxt;
else it.data() = lit->nxt;
- lit->nxt = NULL; delete lit;
+ lit->nxt = NULL;
+ if(free) delete lit;
return true;
}
}
@@ -94,6 +99,8 @@ bool flext_base::ItemCont::Remove(Item *item,const t_symbol *tag,int inlet)
flext_base::Item *flext_base::ItemCont::FindList(const t_symbol *tag,int inlet)
{
+ FLEXT_ASSERT(tag);
+
if(Contained(inlet)) {
ItemSet &ai = GetInlet(inlet);
ItemSet::iterator as = ai.find(tag);