xine-lib: xine-lib-1.2.13/src/post/goom/goomsl.h Source File

xine-lib 1.2.13-20230125hg15249

goomsl.h
Go to the documentation of this file.
1#ifndef _GOOMSL_H
2#define _GOOMSL_H
3
4#include "goomsl_hash.h"
5
6 typedef struct _GoomSL GoomSL;
7 typedef void (*GoomSL_ExternalFunction)(GoomSL *gsl, GoomHash *global_vars, GoomHash *local_vars);
8
9 GoomSL*gsl_new(void);
10void gsl_free(GoomSL *gss);
11
12char *gsl_init_buffer(const char *file_name);
13void gsl_append_file_to_buffer(const char *file_name, char **buffer);
14
15void gsl_compile (GoomSL *scanner, const char *script);
16void gsl_execute (GoomSL *scanner);
17int gsl_is_compiled (GoomSL *gss);
18void gsl_bind_function(GoomSL *gss, const char *fname, GoomSL_ExternalFunction func);
19
20int gsl_malloc (GoomSL *_this, int size);
21void *gsl_get_ptr (GoomSL *_this, int id);
22void gsl_free_ptr(GoomSL *_this, int id);
23
24 GoomHash *gsl_globals(GoomSL *_this);
25
26#define GSL_LOCAL_PTR(gsl,local,name) gsl_get_ptr(gsl, *(int*)goom_hash_get(local,name)->ptr)
27#define GSL_LOCAL_INT(gsl,local,name) (*(int*)goom_hash_get(local,name)->ptr)
28#define GSL_LOCAL_FLOAT(gsl,local,name) (*(float*)goom_hash_get(local,name)->ptr)
29
30#define GSL_GLOBAL_PTR(gsl,name) gsl_get_ptr(gsl, *(int*)goom_hash_get(gsl_globals(gsl),name)->ptr)
31#define GSL_GLOBAL_INT(gsl,name) (*(int*)goom_hash_get(gsl_globals(gsl),name)->ptr)
32#define GSL_GLOBAL_FLOAT(gsl,name) (*(float*)goom_hash_get(gsl_globals(gsl),name)->ptr)
33
34#endif
GoomSL_ExternalFunction
void(* GoomSL_ExternalFunction)(GoomSL *gsl, GoomHash *global_vars, GoomHash *local_vars)
Definition goomsl.h:7
gsl_globals
GoomHash * gsl_globals(GoomSL *_this)
Definition goomsl.c:1296
gsl_bind_function
void gsl_bind_function(GoomSL *gss, const char *fname, GoomSL_ExternalFunction func)
Definition goomsl.c:1414
gsl_free_ptr
void gsl_free_ptr(GoomSL *_this, int id)
Definition goomsl.c:801
gsl_append_file_to_buffer
void gsl_append_file_to_buffer(const char *file_name, char **buffer)
Definition goomsl.c:1487
gsl_new
GoomSL * gsl_new(void)
Definition goomsl.c:1387
gsl_init_buffer
char * gsl_init_buffer(const char *file_name)
Definition goomsl.c:1453
gsl_is_compiled
int gsl_is_compiled(GoomSL *gss)
Definition goomsl.c:1424
gsl_execute
void gsl_execute(GoomSL *scanner)
Definition goomsl.c:1376
gsl_compile
void gsl_compile(GoomSL *scanner, const char *script)
Definition goomsl.c:1332
gsl_free
void gsl_free(GoomSL *gss)
Definition goomsl.c:1429
gsl_get_ptr
void * gsl_get_ptr(GoomSL *_this, int id)
Definition goomsl.c:793
gsl_malloc
int gsl_malloc(GoomSL *_this, int size)
Definition goomsl.c:783
goomsl_hash.h
GOOM_HASH
Definition goomsl_hash.h:20
_GoomSL
Definition goomsl_private.h:165