summaryrefslogtreecommitdiffstats
path: root/gst/goom/goomsl.h
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2008-02-23 01:51:37 +0000
committerBastien Nocera <hadess@hadess.net>2008-02-23 01:51:37 +0000
commita7bc7485b1a4d7e1b1a12ff593ca4ccb1d59e466 (patch)
treeffba99ad38c7616d089c5e728c75a6bd5f736c6c /gst/goom/goomsl.h
parent7f0745bb7f26c69766bb0c64458c6543588cc4dc (diff)
configure.ac: Add checks for Flex/Yacc/Bison and other furry animals, for the new goom 2k4 based plugin
Original commit message from CVS: 2008-02-23 Bastien Nocera <hadess@hadess.net> * configure.ac: Add checks for Flex/Yacc/Bison and other furry animals, for the new goom 2k4 based plugin * gst/goom/*: Update to use goom 2k4, uses liboil to detect CPU optimisations (not working yet), move the old plugin to... * gst/goom2k1/*: ... here, in case somebody is sick enough Fixes #515073
Diffstat (limited to 'gst/goom/goomsl.h')
-rw-r--r--gst/goom/goomsl.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/gst/goom/goomsl.h b/gst/goom/goomsl.h
new file mode 100644
index 00000000..b9f20d6c
--- /dev/null
+++ b/gst/goom/goomsl.h
@@ -0,0 +1,34 @@
+#ifndef _GOOMSL_H
+#define _GOOMSL_H
+
+#include "goomsl_hash.h"
+
+typedef struct _GoomSL GoomSL;
+typedef void (*GoomSL_ExternalFunction)(GoomSL *gsl, GoomHash *global_vars, GoomHash *local_vars);
+
+GoomSL*gsl_new(void);
+void gsl_free(GoomSL *gss);
+
+char *gsl_init_buffer(const char *file_name);
+void gsl_append_file_to_buffer(const char *file_name, char **buffer);
+
+void gsl_compile (GoomSL *scanner, const char *script);
+void gsl_execute (GoomSL *scanner);
+int gsl_is_compiled (GoomSL *gss);
+void gsl_bind_function(GoomSL *gss, const char *fname, GoomSL_ExternalFunction func);
+
+int gsl_malloc (GoomSL *_this, int size);
+void *gsl_get_ptr (GoomSL *_this, int id);
+void gsl_free_ptr(GoomSL *_this, int id);
+
+GoomHash *gsl_globals(GoomSL *_this);
+
+#define GSL_LOCAL_PTR(gsl,local,name) gsl_get_ptr(gsl, *(int*)goom_hash_get(local,name)->ptr)
+#define GSL_LOCAL_INT(gsl,local,name) (*(int*)goom_hash_get(local,name)->ptr)
+#define GSL_LOCAL_FLOAT(gsl,local,name) (*(float*)goom_hash_get(local,name)->ptr)
+
+#define GSL_GLOBAL_PTR(gsl,name) gsl_get_ptr(gsl, *(int*)goom_hash_get(gsl_globals(gsl),name)->ptr)
+#define GSL_GLOBAL_INT(gsl,name) (*(int*)goom_hash_get(gsl_globals(gsl),name)->ptr)
+#define GSL_GLOBAL_FLOAT(gsl,name) (*(float*)goom_hash_get(gsl_globals(gsl),name)->ptr)
+
+#endif