From 737c102766a9e1e89384cc3bdddfeddb2b85dcfb Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Tue, 17 Jul 2007 22:24:46 +0200 Subject: [PATCH] extended example, prepared for C++ plugin --- tests/examples/plugin_main.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/tests/examples/plugin_main.c b/tests/examples/plugin_main.c index b50e74cbc..1902fc5fe 100644 --- a/tests/examples/plugin_main.c +++ b/tests/examples/plugin_main.c @@ -14,15 +14,40 @@ main(int argc, char** argv) struct hello_interface_1* hello_de = cinelerra_interface_open ("hello_1", "german_1", sizeof(struct hello_interface_1)); - if (!hello) CINELERRA_DIE; + if (!hello_de) CINELERRA_DIE; + + hello_de->say_hello(); + struct hello_interface_1* hello_en = cinelerra_interface_open ("hello_1", "english_1", sizeof(struct hello_interface_1)); - if (!hello) CINELERRA_DIE; + if (!hello_en) CINELERRA_DIE; - hello_de->say_hello(); hello_en->say_hello(); cinelerra_interface_close (hello_en); cinelerra_interface_close (hello_de); + +#if 0 + /* + same again for a plugin written in C++ + */ + hello_de = + cinelerra_interface_open ("hellocpp_1", "german_1", sizeof(struct hello_interface_1)); + if (!hello_de) CINELERRA_DIE; + + hello_de->say_hello(); + + + hello_en = + cinelerra_interface_open ("hellocpp_1", "english_1", sizeof(struct hello_interface_1)); + if (!hello_en) CINELERRA_DIE; + + hello_en->say_hello(); + + cinelerra_interface_close (hello_en); + cinelerra_interface_close (hello_de); +#endif + + return 0; }