diff options
author | Travis CI <zmoelnig@travis-ci.umlaeute.mur.at> | 2016-12-21 21:52:25 +0000 |
---|---|---|
committer | Travis CI <zmoelnig@travis-ci.umlaeute.mur.at> | 2016-12-21 21:52:25 +0000 |
commit | 027150827a4b2f641415225afb3b5a2ec8732617 (patch) | |
tree | 5b95ed443bcbba685ec4a9de608e1a380eba64f8 /Gem/develop | |
parent | a4b06f660a60ad1e1002b3300c8f6b8e54dfcba6 (diff) |
Gem 0002aa3425e54b0c993fc9a5009ee7798aa3ba01 osx/x86_64
built 'master:0002aa3425e54b0c993fc9a5009ee7798aa3ba01' for osx/x86_64
Diffstat (limited to 'Gem/develop')
-rw-r--r-- | Gem/develop/include/Gem/Base/GemWindow.h | 2 | ||||
-rw-r--r-- | Gem/develop/include/Gem/Gem/GLStack.h | 5 | ||||
-rw-r--r-- | Gem/develop/include/Gem/Gem/Loaders.h | 14 | ||||
-rw-r--r-- | Gem/develop/include/Gem/Utils/any.h | 18 | ||||
-rw-r--r-- | Gem/develop/include/Gem/Utils/nop.h | 29 |
5 files changed, 63 insertions, 5 deletions
diff --git a/Gem/develop/include/Gem/Base/GemWindow.h b/Gem/develop/include/Gem/Base/GemWindow.h index 18ad28f..c69f249 100644 --- a/Gem/develop/include/Gem/Base/GemWindow.h +++ b/Gem/develop/include/Gem/Base/GemWindow.h @@ -174,6 +174,7 @@ class GEM_EXTERN GemWindow : public CPPExtern /* render context (pre creation) */ virtual void bufferMess(int buf); virtual void fsaaMess(int value); + virtual void transparentMess(bool on); /* window decoration (pre creation) */ virtual void titleMess(std::string); @@ -208,6 +209,7 @@ class GEM_EXTERN GemWindow : public CPPExtern unsigned int m_buffer; std::string m_title; bool m_cursor; + bool m_transparent; int m_fsaa; gem::Context* m_context; diff --git a/Gem/develop/include/Gem/Gem/GLStack.h b/Gem/develop/include/Gem/Gem/GLStack.h index 2584578..4c9037c 100644 --- a/Gem/develop/include/Gem/Gem/GLStack.h +++ b/Gem/develop/include/Gem/Gem/GLStack.h @@ -65,7 +65,12 @@ class GEM_EXTERN GLStack { private: class Data; + // try using unique_ptr<> if it is supported +#if __cplusplus < 201103L std::auto_ptr<Data>data; +#else + std::unique_ptr<Data>data; +#endif }; } /* namespace gem */ diff --git a/Gem/develop/include/Gem/Gem/Loaders.h b/Gem/develop/include/Gem/Gem/Loaders.h index 2a3e1c0..ccc5769 100644 --- a/Gem/develop/include/Gem/Gem/Loaders.h +++ b/Gem/develop/include/Gem/Gem/Loaders.h @@ -18,8 +18,20 @@ LOG #include "Gem/RTE.h" extern "C" { - typedef int (*gem_loader_t)(t_canvas *canvas, char *classname); + /* search for a class <classname> in <path> + * if <path> is NULL, search all paths yourself + * Only on Pd>=0.47 will <path> have a value */ + typedef int (*gem_loader_t)(const t_canvas *canvas, const char *classname, const char *path); + /* register a loader that respects the path (any file-based loader) + * In Pd<0.47 this loader will be called with a path==NULL, and the loader needs to iterate + * over the paths on its own (e.g. using canvas_open()) + * In Pd>=0.47 this loader will only be called with path!=NULL + */ void gem_register_loader(gem_loader_t loader); + /* registers a loader that ignores the path (path will always be set to NULL) + * for Pd>=0.47 this loader will be called after all the path-accepting loaders + */ + void gem_register_loader_nopath(gem_loader_t loader); } #endif diff --git a/Gem/develop/include/Gem/Utils/any.h b/Gem/develop/include/Gem/Utils/any.h index fc66b46..56cdec7 100644 --- a/Gem/develop/include/Gem/Utils/any.h +++ b/Gem/develop/include/Gem/Utils/any.h @@ -132,12 +132,19 @@ namespace gem template <typename T> any(const T& x) : table(NULL), object(NULL) { table = any_detail::get_table<T>::get(); +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wplacement-new" +#endif if (sizeof(T) <= sizeof(void*)) { new(&object) T(x); } else { object = new T(x); } +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif } any(void) : table(NULL), object(NULL) { @@ -181,14 +188,16 @@ namespace gem if (table == x_table) { // if so, we can avoid deallocating and resuse memory +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wplacement-new" +#endif if (sizeof(T) <= sizeof(void*)) { // create copy on-top of object pointer itself - new(&object) T(x); } else { // create copy on-top of old version - new(object) T(x); } } @@ -196,16 +205,17 @@ namespace gem reset(); if (sizeof(T) <= sizeof(void*)) { // create copy on-top of object pointer itself - new(&object) T(x); // update table pointer - table = x_table; } else { object = new T(x); table = x_table; } +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif } return *this; } diff --git a/Gem/develop/include/Gem/Utils/nop.h b/Gem/develop/include/Gem/Utils/nop.h new file mode 100644 index 0000000..0be005b --- /dev/null +++ b/Gem/develop/include/Gem/Utils/nop.h @@ -0,0 +1,29 @@ +/*----------------------------------------------------------------- +LOG + GEM - Graphics Environment for Multimedia + + nop.h + - contains nop functions/macros + - part of GEM + + Copyright (c) 2016 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at + For information on usage and redistribution, and for a DISCLAIMER OF ALL + WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. + +-----------------------------------------------------------------*/ + +#ifndef _INCLUDE__GEM_UTILS_NOP_H_ +#define _INCLUDE__GEM_UTILS_NOP_H_ + +#if __STDC_VERSION__ >= 199901L +# define nop(...) +#else +# define nop +#endif + +static inline void gem__nop_post(void) { ; } +static inline void gem__nop_post(const char*fmt, ...) { ; } +#define nop_post gem__nop_post + +#endif // for header file + |