example interface and C plugin
This commit is contained in:
parent
737c102766
commit
c55e72adf4
2 changed files with 50 additions and 0 deletions
44
tests/examples/example_plugin.c
Normal file
44
tests/examples/example_plugin.c
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#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)
|
||||
);
|
||||
6
tests/examples/hello_interface.h
Normal file
6
tests/examples/hello_interface.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#include "plugin.h"
|
||||
|
||||
CINELERRA_INTERFACE(hello, 1,
|
||||
CINELERRA_INTERFACE_PROTO(void, hello, (void)),
|
||||
CINELERRA_INTERFACE_PROTO(void, goodbye, (const char*)),
|
||||
);
|
||||
Loading…
Reference in a new issue