Merge branch 'master' of git.lumiera.org:/git/LUMIERA into gui

This commit is contained in:
Joel Holdsworth 2009-01-05 17:59:23 +00:00
commit 22c9e8b082
11 changed files with 75 additions and 56 deletions

View file

@ -1,6 +1,7 @@
AC_INIT(lumiera, 0.1pre)
AC_CONFIG_SRCDIR(src/lib/luid.c)
AC_CONFIG_AUX_DIR(scripts)
AC_CONFIG_SRCDIR([src/lib/luid.c])
AC_CONFIG_AUX_DIR([scripts])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
AC_PREREQ(2.59)

View file

@ -68,40 +68,42 @@ namespace gui {
,lumieraorg_GuiNotificationFacade_descriptor
, NULL, NULL, NULL
, LUMIERA_INTERFACE_INLINE (name, "\044\117\156\365\344\056\362\220\166\350\320\214\115\221\302\177",
const char*, (LumieraInterface iface),
{ return "GuiNotification"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "GuiNotification"; }
)
, LUMIERA_INTERFACE_INLINE (brief, "\160\240\102\325\175\145\270\140\350\241\163\303\331\343\253\142",
const char*, (LumieraInterface iface),
{ return "GUI Interface: push state update and notification of events into the GUI"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "GUI Interface: push state update and notification of events into the GUI"; }
)
, LUMIERA_INTERFACE_INLINE (homepage, "\217\232\066\101\042\116\054\217\070\233\253\241\166\145\234\133",
const char*, (LumieraInterface iface),
{ return "http://www.lumiera.org/develompent.html" ;}
const char*, (LumieraInterface ifa),
{ (void)ifa; return "http://www.lumiera.org/develompent.html" ;}
)
, LUMIERA_INTERFACE_INLINE (version, "\350\365\121\052\037\022\300\021\171\357\017\367\270\071\266\376",
const char*, (LumieraInterface iface),
{ return "0.1~pre"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "0.1~pre"; }
)
, LUMIERA_INTERFACE_INLINE (author, "\117\007\006\234\153\206\000\344\303\043\027\261\045\320\166\133",
const char*, (LumieraInterface iface),
{ return "Hermann Vosseler"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "Hermann Vosseler"; }
)
, LUMIERA_INTERFACE_INLINE (email, "\356\243\022\137\345\275\016\034\337\144\031\260\303\050\140\327",
const char*, (LumieraInterface iface),
{ return "Ichthyostega@web.de"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "Ichthyostega@web.de"; }
)
, LUMIERA_INTERFACE_INLINE (copyright, "\365\220\260\051\267\345\330\046\145\134\331\320\115\157\332\356",
const char*, (LumieraInterface iface),
const char*, (LumieraInterface ifa),
{
(void)ifa;
return
"Copyright (C) Lumiera.org\n"
" 2008 Hermann Vosseler <Ichthyostega@web.de>";
}
)
, LUMIERA_INTERFACE_INLINE (license, "\155\335\361\364\221\012\115\325\306\046\153\152\002\117\075\077",
const char*, (LumieraInterface iface),
const char*, (LumieraInterface ifa),
{
(void)ifa;
return
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
@ -119,8 +121,8 @@ namespace gui {
}
)
, LUMIERA_INTERFACE_INLINE (state, "\227\170\230\144\310\330\131\175\367\152\327\324\113\275\223\245",
int, (LumieraInterface iface),
{return LUMIERA_INTERFACE_EXPERIMENTAL; }
int, (LumieraInterface ifa),
{(void)ifa; return LUMIERA_INTERFACE_EXPERIMENTAL; }
)
, LUMIERA_INTERFACE_INLINE (versioncmp, "\253\066\335\233\025\161\135\347\377\156\121\135\347\313\130\014",
int, (const char* a, const char* b),

View file

@ -106,32 +106,33 @@ extern "C" { /* ================== define an lumieraorg_Gui instance ===========
,lumieraorg_GuiStarterPlugin_descriptor
, NULL, NULL, NULL
, LUMIERA_INTERFACE_INLINE (name, "\126\247\365\337\126\254\173\037\130\310\337\345\200\347\323\136",
const char*, (LumieraInterface iface),
{ return "GuiStarterPlugin"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "GuiStarterPlugin"; }
)
, LUMIERA_INTERFACE_INLINE (brief, "\056\346\322\365\344\104\232\232\355\213\367\056\301\144\051\021",
const char*, (LumieraInterface iface),
{ return "entry point to start up the Lumiera GTK GUI contained in this dynamic module"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "entry point to start up the Lumiera GTK GUI contained in this dynamic module"; }
)
, LUMIERA_INTERFACE_INLINE (homepage, "\357\056\117\165\320\066\273\130\113\100\367\022\221\350\236\256",
const char*, (LumieraInterface iface),
{ return "http://www.lumiera.org/develompent.html" ;}
const char*, (LumieraInterface ifa),
{ (void)ifa; return "http://www.lumiera.org/develompent.html" ;}
)
, LUMIERA_INTERFACE_INLINE (version, "\013\117\366\210\070\320\274\076\253\230\032\116\271\161\027\354",
const char*, (LumieraInterface iface),
{ return "0.1~pre"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "0.1~pre"; }
)
, LUMIERA_INTERFACE_INLINE (author, "\371\262\024\273\170\105\163\261\351\240\051\003\153\040\256\155",
const char*, (LumieraInterface iface),
{ return "Joel Holdsworth, Christian Thaeter, Hermann Vosseler"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "Joel Holdsworth, Christian Thaeter, Hermann Vosseler"; }
)
, LUMIERA_INTERFACE_INLINE (email, "\353\242\247\130\056\242\314\145\053\162\003\060\200\357\303\214",
const char*, (LumieraInterface iface),
{ return "Lumiera@lists.lumiera.org"; }
const char*, (LumieraInterface ifa),
{ (void)ifa; return "Lumiera@lists.lumiera.org"; }
)
, LUMIERA_INTERFACE_INLINE (copyright, "\172\325\335\304\015\222\377\372\343\151\255\020\030\103\320\101",
const char*, (LumieraInterface iface),
const char*, (LumieraInterface ifa),
{
(void)ifa;
return
"Copyright (C) Lumiera.org\n"
"2007-2008, Joel Holdsworth <joel@airwebreathe.org.uk>\n"
@ -140,8 +141,9 @@ extern "C" { /* ================== define an lumieraorg_Gui instance ===========
}
)
, LUMIERA_INTERFACE_INLINE (license, "\016\264\202\005\160\305\033\227\037\077\143\363\263\011\167\257",
const char*, (LumieraInterface iface),
const char*, (LumieraInterface ifa),
{
(void)ifa;
return
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
@ -159,8 +161,8 @@ extern "C" { /* ================== define an lumieraorg_Gui instance ===========
}
)
, LUMIERA_INTERFACE_INLINE (state, "\006\070\035\065\267\073\016\107\376\027\355\035\135\176\107\064",
int, (LumieraInterface iface),
{return LUMIERA_INTERFACE_EXPERIMENTAL; }
int, (LumieraInterface ifa),
{(void)ifa; return LUMIERA_INTERFACE_EXPERIMENTAL; }
)
, LUMIERA_INTERFACE_INLINE (versioncmp, "\224\077\275\040\357\244\311\244\112\030\042\163\061\166\245\325",
int, (const char* a, const char* b),

View file

@ -74,10 +74,10 @@ Displayer::calculateVideoLayout(
video_x = ( widget_width - video_width ) / 2;
video_y = ( widget_height - video_height ) / 2;
ENSURE(video_x >= 0 && video_x < widget_width)
ENSURE(video_y >= 0 && video_y < widget_height)
ENSURE(video_width <= widget_width)
ENSURE(video_width <= widget_width)
ENSURE(video_x >= 0 && video_x < widget_width);
ENSURE(video_y >= 0 && video_y < widget_height);
ENSURE(video_width <= widget_width);
ENSURE(video_width <= widget_width);
}
} // namespace output

View file

@ -380,7 +380,7 @@ TimelineWidget::remove_orphaned_tracks()
pair;
BOOST_FOREACH( pair, orphan_track_map )
{
ENSURE(pair.first)
ENSURE(pair.first);
trackMap.erase(pair.first);
}
}

View file

@ -25,7 +25,7 @@
** Under some circumstances it is necessary to assemble functionality
** out of elementary building blocks. Especially, this assembly can be
** expressed as template specialisations directed by a configuration type.
** Thus, the purpose of this header is to encode flag-like configuraitons
** Thus, the purpose of this header is to encode flag-like configurations
** as distinct types, which can be used to select such specialisations.
** Each possible configuration can be encoded as a list of flags, which allows
** to generate, filter and process those configurations. The final goal is to
@ -33,8 +33,8 @@
** configured according to the situation encoded in the flags.
**
** @note currently there is an inherent limitation to configurations defined by
** a maximum of 5 independant flags. While it is easy to increase this limit,
** you should consider that the final goal is to genarate template instantiations,
** a maximum of 5 independent flags. While it is easy to increase this limit,
** you should consider that the final goal is to generate template instantiations,
** which would lead to more and more code bloat with growing number of possible
** combination.
**
@ -127,20 +127,31 @@ namespace lumiera {
>::Config Config;
typedef Config Type;
};
/** create a configuration type for the given list-of-flags */
template<class FLAGS>
struct DefineConfigByFlags : BuildConfigFromFlags<FLAGS> { };
namespace {
/** helper comparing enum values and chars (flags) */
template<char ii, char jj>
struct maxC
{
enum{ VAL = ii < jj? jj : ii };
};
}
/**
* Helper for calculating values and for
* invoking runtime code based on a given FlagTuple.
* Can also be used on a Typelist of several Configs.
* The latter case is typically used to invoke an operation
* while ennumerating all Flag-Configurations defined in Code.
* while enumerating all Flag-Configurations defined in Code.
* An example would be to build (at runtime) an dispatcher table.
* Explanation: For the Case covering a List of Configs, we provide
* a templated visitaion function, which can accept a functor object
* a templated visitation function, which can accept a functor object
* to be invoked on each Configuration.
*/
template<class FLAGS>
@ -149,10 +160,11 @@ namespace lumiera {
template<char ff, class FLAGS>
struct FlagInfo<Node<Flag<ff>, FLAGS> >
{
enum{ BITS = MAX(ff, FlagInfo<FLAGS>::BITS)
, CODE = (1<<ff) | FlagInfo<FLAGS>::CODE
enum{ BITS = maxC< ff, FlagInfo<FLAGS>::BITS> ::VAL
, CODE = (1<<ff) | FlagInfo<FLAGS>::CODE
};
};
template<>
struct FlagInfo<NullType>
{
@ -167,11 +179,13 @@ namespace lumiera {
return functor.done();
}
};
template<class CONF, class TAIL>
struct FlagInfo<Node<CONF, TAIL> >
{
typedef typename CONF::Flags ThisFlags;
enum{ BITS = MAX (char(FlagInfo<ThisFlags>::BITS), char(FlagInfo<TAIL>::BITS))
enum{
BITS = maxC< FlagInfo<ThisFlags>::BITS, FlagInfo<TAIL>::BITS > ::VAL
};
template<class FUNC>

View file

@ -269,7 +269,7 @@ namespace lib {
template<class X>
struct BoolMethodPredicate
{
typedef volatile bool (X::*Method)(void);
typedef bool (X::*Method)(void);
X& instance_;
Method method_;
@ -307,7 +307,7 @@ namespace lib {
template<class X>
bool
wait (X& instance, volatile bool (X::*method)(void), ulong timedwait=0)
wait (X& instance, bool (X::*method)(void), ulong timedwait=0)
{
BoolMethodPredicate<X> invokeMethod(instance, method);
return IMPL::wait(invokeMethod, timeout_.setOffset(timedwait));
@ -391,7 +391,7 @@ namespace lib {
* observing a condition defined as member function.
*/
template<class X>
Lock(X* it, volatile bool (X::*method)(void))
Lock(X* it, bool (X::*method)(void))
: mon_(getMonitor(it))
{
mon_.acquireLock();

View file

@ -107,7 +107,7 @@ namespace test
}
/** @return \c true if --describe switch was given */
const bool
bool
TestOption::getDescribe ()
{
return parameters["describe"].as<bool>();

View file

@ -33,8 +33,8 @@
namespace test
{
namespace test {
using std::string;
using std::ostream;
@ -56,7 +56,7 @@ namespace test
TestOption (util::Cmdline& cmdline);
const string getTestgroup ();
const string getTestID ();
const bool getDescribe ();
bool getDescribe ();
private:
boost::program_options::options_description syntax;

View file

@ -132,7 +132,7 @@ namespace lumiera {
*/
class ConfigFlags_test : public Test
{
virtual void run(Arg arg)
virtual void run(Arg)
{
check_testdata ();
check_flags();

View file

@ -94,7 +94,7 @@ namespace lib {
class SyncOnMemberPredicate
: public SyncOnBool
{
volatile bool checkTheFlag() { return this->got_new_data_; }
bool checkTheFlag() { return this->got_new_data_; }
public:
void getIt()