Debian Codegraph @

peas-demo/plugins/helloworld/peasdemo-hello-world-configurable.c

raw
1 /*
2 * peasdemo-hello-world-configurable.c
3 * This file is part of libpeas
4 *
5 * Copyright (C) 2009-2010 Steve Frécinaux
6 *
7 * libpeas is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * libpeas is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
25
26 #include <glib.h>
27 #include <glib-object.h>
28 #include <gmodule.h>
29 #include <gtk/gtk.h>
30
31 #include <libpeas/peas.h>
32 #include <libpeas-gtk/peas-gtk.h>
33
34 #include "peasdemo-hello-world-configurable.h"
35
36 static void peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface);
37
38 G_DEFINE_DYNAMIC_TYPE_EXTENDED (PeasDemoHelloWorldConfigurable,
39 peasdemo_hello_world_configurable,
40 PEAS_TYPE_EXTENSION_BASE,
41 0,
42 G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE,
43 peas_gtk_configurable_iface_init))
44
45 static void
46 peasdemo_hello_world_configurable_init (PeasDemoHelloWorldConfigurable *plugin)
47 {
48 g_debug ("%s", G_STRFUNC);
49 }
50
51 static GtkWidget *
52 peasdemo_hello_world_configurable_create_configure_widget (PeasGtkConfigurable *configurable)
53 {
54 g_debug ("%s", G_STRFUNC);
55
56 return gtk_label_new ("This is a configuration dialog for the HelloWorld plugin.");
57 }
58
59 static void
60 peasdemo_hello_world_configurable_class_init (PeasDemoHelloWorldConfigurableClass *klass)
61 {
62 }
63
64 static void
65 peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface)
66 {
67 iface->create_configure_widget = peasdemo_hello_world_configurable_create_configure_widget;
68 }
69
70 static void
71 peasdemo_hello_world_configurable_class_finalize (PeasDemoHelloWorldConfigurableClass *klass)
72 {
73 }
74
75 void
76 peasdemo_hello_world_configurable_register (GTypeModule *module)
77 {
78 peasdemo_hello_world_configurable_register_type (module);
79 }