2
#include <ethos/ethos.h>
3
#include <ethos/ethos-ui.h>
5
/* This example shows how you can use a widget to turn on and off lugins.
6
* However, it doesn't really show the plugins connecting to the user
7
* interface in any way. To do that, you want to create a new interface
8
* that provides your UI hooking methods. Then check to see if the plugin
9
* implements that interface, and if so, call its hook methods.
18
EthosManager *manager;
19
gchar *plugins[] = { "../../tests/manager-dep/", NULL };
21
gtk_init (&argc, &argv);
23
manager = ethos_manager_new ();
24
ethos_manager_set_app_name (manager, "Test");
25
ethos_manager_set_plugin_dirs (manager, plugins);
26
ethos_manager_initialize (manager);
28
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
29
gtk_window_set_title (GTK_WINDOW (window), "Ethos UI");
30
gtk_window_set_default_size (GTK_WINDOW (window), 400, 500);
31
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
32
gtk_widget_show (window);
34
manager_widget = ethos_ui_manager_widget_new ();
35
ethos_ui_manager_widget_set_manager (
36
ETHOS_UI_MANAGER_WIDGET (manager_widget),
38
gtk_container_add (GTK_CONTAINER (window), manager_widget);
39
gtk_widget_show (manager_widget);
41
g_signal_connect (G_OBJECT (window),
43
G_CALLBACK (gtk_main_quit),