* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* Boston, MA 02111-1307, USA.
*/
-#ifndef DESKTOP_H_
-#define DESKTOP_H_
+#ifndef SPI_DESKTOP_H_
+#define SPI_DESKTOP_H_
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#include <glib-object.h>
-#include <bonobo/bonobo-xobject.h>
-#include <atk/atkobject.h>
-#include <accessible.h>
-#include <application.h>
-#include <libspi/Accessibility.h>
+G_BEGIN_DECLS
-#define DESKTOP_TYPE (desktop_get_type ())
-#define DESKTOP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DESKTOP_TYPE, Desktop))
-#define DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DESKTOP_TYPE, DesktopClass))
-#define IS_DESKTOP(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), DESKTOP_TYPE))
-#define IS_DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DESKTOP_TYPE))
+#define SPI_DESKTOP_TYPE (spi_desktop_get_type ())
+#define SPI_DESKTOP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_DESKTOP_TYPE, SpiDesktop))
+#define SPI_DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_DESKTOP_TYPE, SpiDesktopClass))
+#define SPI_IS_DESKTOP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SPI_DESKTOP_TYPE))
+#define SPI_IS_DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_DESKTOP_TYPE))
typedef struct {
- Accessible parent;
- GList *applications; /* TODO: maybe change this so it's generated on-demand ? */
-} Desktop;
+ GObject parent;
+ GList *applications;
+} SpiDesktop;
typedef struct {
- AccessibleClass parent_class;
- POA_Accessibility_Desktop__epv epv;
-} DesktopClass;
-
-GType desktop_get_type (void);
-void desktop_add_application (Application *app);
-void desktop_remove_application (Application *app);
-Desktop *desktop_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* DESKTOP_H_ */
+ GObjectClass parent_class;
+ /*Signals */
+ void (*application_added) (SpiDesktop *desktop,
+ guint index);
+ void (*application_removed) (SpiDesktop *desktop,
+ guint index);
+} SpiDesktopClass;
+
+GType spi_desktop_get_type (void);
+SpiDesktop *spi_desktop_new (void);
+void spi_desktop_add_application (SpiDesktop *desktop,
+ const char *app_path);
+void spi_desktop_remove_application (SpiDesktop *desktop,
+ const char *app_path);
+
+G_END_DECLS
+
+#endif /* SPI_DESKTOP_H_ */