From f688c9de1efee2e09fbb9b39a715853b23fadcb3 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 17 Dec 2004 05:01:18 +0000 Subject: global system lock functions fixed a thread sensitive spot fix for _long_ attribute dialogs build system for flext-based externals typo fixed in attribute editor atom outlet functions svn path=/trunk/; revision=2394 --- externals/grill/flext/source/flqueue.cpp | 41 +++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) (limited to 'externals/grill/flext/source/flqueue.cpp') diff --git a/externals/grill/flext/source/flqueue.cpp b/externals/grill/flext/source/flqueue.cpp index 41b201d7..9277887b 100755 --- a/externals/grill/flext/source/flqueue.cpp +++ b/externals/grill/flext/source/flqueue.cpp @@ -32,7 +32,11 @@ flext::thrid_t flext::thrmsgid = 0; class qmsg { public: - void Set(flext_base *t,int o,const t_symbol *s,int ac,const t_atom *av) { th = t,out = o,sym = s,argc = ac,argv = av; } + void Set(flext_base *t,int o,const t_symbol *s,int ac,const t_atom *av) + { + th = t; out = o; + sym = s,argc = ac,argv = av; + } // \note PD sys lock must already be held by caller void Send() const @@ -98,10 +102,11 @@ public: { t_atom *at = GetAtoms(1); SetInt(*at,dt); + const t_symbol *sym; #if FLEXT_SYS == FLEXT_SYS_PD - const t_symbol *sym = sym_float; + sym = sym_float; #elif FLEXT_SYS == FLEXT_SYS_MAX - const t_symbol *sym = sym_int; + sym = sym_int; #else #error Not implemented! #endif @@ -115,6 +120,30 @@ public: Set(th,o,sym_symbol,1,at); } + void Push(flext_base *th,int o,const t_atom &a) + { + t_atom *at = GetAtoms(1); + *at = a; + const t_symbol *sym; + if(IsSymbol(a)) + sym = sym_symbol; + else if(IsFloat(a)) + sym = sym_float; +#if FLEXT_SYS == FLEXT_SYS_MAX + else if(IsInt(a)) + sym = sym_int; +#endif +#if FLEXT_SYS == FLEXT_SYS_PD + else if(IsPointer(a)) + sym = sym_pointer; +#endif + else { + error("atom type not supported"); + return; + } + Set(th,o,sym,1,at); + } + void Push(flext_base *th,int o,int argc,const t_atom *argv) { t_atom *at = GetAtoms(argc); @@ -312,6 +341,12 @@ void flext_base::ToQueueSymbol(int o,const t_symbol *s) const Trigger(); } +void flext_base::ToQueueAtom(int o,const t_atom &at) const +{ + queue.Push(const_cast(this),o,at); + Trigger(); +} + void flext_base::ToQueueList(int o,int argc,const t_atom *argv) const { queue.Push(const_cast(this),o,argc,argv); -- cgit v1.2.1