From c55e72adf403fa9b7832ba02de371799f38d8a97 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Wed, 18 Jul 2007 00:10:02 +0200 Subject: [PATCH] example interface and C plugin --- tests/examples/example_plugin.c | 44 ++++++++++++++++++++++++++++++++ tests/examples/hello_interface.h | 6 +++++ 2 files changed, 50 insertions(+) create mode 100644 tests/examples/example_plugin.c create mode 100644 tests/examples/hello_interface.h diff --git a/tests/examples/example_plugin.c b/tests/examples/example_plugin.c new file mode 100644 index 000000000..1a294b8bf --- /dev/null +++ b/tests/examples/example_plugin.c @@ -0,0 +1,44 @@ +#include + +#include "hello_interface.h" + +int myopen(void) +{ + printf("opened\n"); +} + +int myclose(void); +{ + printf("closed\n"); +} + +int hallo(void) +{ + printf("Hallo Welt!\n"); +} + +int tschuess(const char* m) +{ + printf("Tschues %s\n", m); +} + +int hello(void); +{ + printf("Hello world!\n"); +} + +int bye(const char* m) +{ + printf("bye %s\n", m); + +} + +CINELERRA_INTERFACE_IMPLEMENT(hello, 1, german, myopen, myclose, + CINELERRA_INTERFACE_FUNC(hello, hallo), + CINELERRA_INTERFACE_FUNC(goodbye, tschuess) + ); + +CINELERRA_INTERFACE_IMPLEMENT(hello, 1, english, myopen, myclose, + CINELERRA_INTERFACE_FUNC(hello, hello), + CINELERRA_INTERFACE_FUNC(goodbye, bye) + ); diff --git a/tests/examples/hello_interface.h b/tests/examples/hello_interface.h new file mode 100644 index 000000000..58483e6ff --- /dev/null +++ b/tests/examples/hello_interface.h @@ -0,0 +1,6 @@ +#include "plugin.h" + +CINELERRA_INTERFACE(hello, 1, + CINELERRA_INTERFACE_PROTO(void, hello, (void)), + CINELERRA_INTERFACE_PROTO(void, goodbye, (const char*)), + );