aboutsummaryrefslogtreecommitdiff
path: root/Gem/develop
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2016-11-27 20:40:23 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2016-11-27 20:40:23 +0000
commit26cd45204d117a3c66cb9d39d6533ee5b2529a76 (patch)
tree36d7613aeefcbfe3d2abd1c415b18d675b4f0294 /Gem/develop
parentc80f6de851ed71afa1fdefd2b36f4b17cac0580e (diff)
Gem d73a166d780de4fd9fc364350a9a0634af27d74f osx/i386
built 'master:d73a166d780de4fd9fc364350a9a0634af27d74f' for osx/i386
Diffstat (limited to 'Gem/develop')
-rw-r--r--Gem/develop/include/Gem/Gem/Loaders.h14
-rw-r--r--Gem/develop/include/Gem/Utils/nop.h29
2 files changed, 42 insertions, 1 deletions
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/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
+