Code

Core Dbus files.
[inkscape.git] / src / extension / dbus / application-interface.cpp
1 #include "application-interface.h"
2 #include <string.h>
3 #include "dbus-init.h"
5 G_DEFINE_TYPE(ApplicationInterface, application_interface, G_TYPE_OBJECT)
7 static void
8 application_interface_finalize (GObject *object)
9 {
10         G_OBJECT_CLASS (application_interface_parent_class)->finalize (object);
11 }
14 static void
15 application_interface_class_init (ApplicationInterfaceClass *klass)
16 {
17         GObjectClass *object_class;
18         object_class = G_OBJECT_CLASS (klass);
19         object_class->finalize = application_interface_finalize;
20 }
22 static void
23 application_interface_init (ApplicationInterface *object)
24 {
25 }
28 ApplicationInterface *
29 application_interface_new (void)
30 {
31         return (ApplicationInterface*)g_object_new (TYPE_APPLICATION_INTERFACE, NULL);
32 }
34 /****************************************************************************
35      DESKTOP FUNCTIONS
36 ****************************************************************************/
38 gchar* 
39 application_interface_desktop_new (ApplicationInterface *object, 
40                                    GError **error) 
41 {
42   return (gchar*)Inkscape::Extension::Dbus::init_desktop();
43 }
45 gchar** 
46 application_interface_get_desktop_list (ApplicationInterface *object)
47 {
48   return NULL;
49 }
51 gchar* 
52 application_interface_get_active_desktop (ApplicationInterface *object,
53                                           GError **error)
54 {
55   return NULL;
56 }
58 gboolean
59 application_interface_set_active_desktop (ApplicationInterface *object, 
60                                           gchar* document_name,
61                                           GError **error)
62 {
63   return TRUE;
64 }
66 gboolean
67 application_interface_desktop_close_all (ApplicationInterface *object,
68                                           GError **error) 
69 {
70   return TRUE;
71 }
73 gboolean
74 application_interface_exit (ApplicationInterface *object, GError **error)
75 {
76     return TRUE;
77 }
79 /****************************************************************************
80      DOCUMENT FUNCTIONS
81 ****************************************************************************/
83 gchar* application_interface_document_new (ApplicationInterface *object,
84                                            GError **error)
85 {
86   return (gchar*)Inkscape::Extension::Dbus::init_document();
87 }
89 gchar** 
90 application_interface_get_document_list (ApplicationInterface *object)
91 {
92   return NULL;
93 }
95 gboolean
96 application_interface_document_close_all (ApplicationInterface *object,
97                                           GError **error) 
98 {
99   return TRUE;
102 /* INTERESTING FUNCTIONS
103     SPDesktop  *desktop = SP_ACTIVE_DESKTOP;
104     g_assert(desktop != NULL);
106     SPDocument *doc = sp_desktop_document(desktop);
107     g_assert(doc != NULL);
109     Inkscape::XML::Node     *repr = sp_document_repr_root(doc);
110     g_assert(repr != NULL);
111 */