application-interface.cpp revision c596be6d145df956e779f427dde5aabc8559dd6c
0N/A#include "application-interface.h"
189N/A#include <string.h>
0N/A#include "dbus-init.h"
0N/A
0N/AG_DEFINE_TYPE(ApplicationInterface, application_interface, G_TYPE_OBJECT)
0N/A
180N/Astatic void
0N/Aapplication_interface_finalize (GObject *object)
180N/A{
0N/A G_OBJECT_CLASS (application_interface_parent_class)->finalize (object);
0N/A}
0N/A
0N/A
0N/Astatic void
0N/Aapplication_interface_class_init (ApplicationInterfaceClass *klass)
0N/A{
0N/A GObjectClass *object_class;
0N/A object_class = G_OBJECT_CLASS (klass);
0N/A object_class->finalize = application_interface_finalize;
0N/A}
180N/A
180N/Astatic void
180N/Aapplication_interface_init (ApplicationInterface *object)
0N/A{
0N/A}
5N/A
5N/A
0N/AApplicationInterface *
8N/Aapplication_interface_new (void)
0N/A{
0N/A return (ApplicationInterface*)g_object_new (TYPE_APPLICATION_INTERFACE, NULL);
0N/A}
0N/A
0N/A/****************************************************************************
0N/A DESKTOP FUNCTIONS
0N/A****************************************************************************/
0N/A
0N/Agchar*
27N/Aapplication_interface_desktop_new (ApplicationInterface *object,
27N/A GError **error)
142N/A{
27N/A return (gchar*)Inkscape::Extension::Dbus::init_desktop();
27N/A}
0N/A
27N/Agchar**
0N/Aapplication_interface_get_desktop_list (ApplicationInterface *object)
27N/A{
27N/A return NULL;
27N/A}
0N/A
0N/Agchar*
0N/Aapplication_interface_get_active_desktop (ApplicationInterface *object,
0N/A GError **error)
0N/A{
0N/A return NULL;
0N/A}
0N/A
0N/Agboolean
0N/Aapplication_interface_set_active_desktop (ApplicationInterface *object,
27N/A gchar* document_name,
27N/A GError **error)
27N/A{
27N/A return TRUE;
286N/A}
27N/A
27N/Agboolean
27N/Aapplication_interface_desktop_close_all (ApplicationInterface *object,
27N/A GError **error)
27N/A{
27N/A return TRUE;
27N/A}
27N/A
27N/Agboolean
32N/Aapplication_interface_exit (ApplicationInterface *object, GError **error)
32N/A{
27N/A return TRUE;
27N/A}
27N/A
27N/A/****************************************************************************
27N/A DOCUMENT FUNCTIONS
27N/A****************************************************************************/
27N/A
27N/Agchar* application_interface_document_new (ApplicationInterface *object,
27N/A GError **error)
27N/A{
27N/A return (gchar*)Inkscape::Extension::Dbus::init_document();
27N/A}
27N/A
27N/Agchar**
27N/Aapplication_interface_get_document_list (ApplicationInterface *object)
27N/A{
27N/A return NULL;
27N/A}
27N/A
27N/Agboolean
27N/Aapplication_interface_document_close_all (ApplicationInterface *object,
27N/A GError **error)
27N/A{
27N/A return TRUE;
27N/A}
27N/A
27N/A/* INTERESTING FUNCTIONS
27N/A SPDesktop *desktop = SP_ACTIVE_DESKTOP;
27N/A g_assert(desktop != NULL);
27N/A
189N/A SPDocument *doc = sp_desktop_document(desktop);
27N/A g_assert(doc != NULL);
27N/A
27N/A Inkscape::XML::Node *repr = sp_document_repr_root(doc);
27N/A g_assert(repr != NULL);
27N/A*/
27N/A
27N/A