Eitan Isaacson has proposed merging lp:~eeejay/notify-osd/atk into 
lp:notify-osd.

Requested reviews:
    Notify OSD Developers (notify-osd-developers)

I think this is ready for prime time, or it's as ready as it will get. I think 
the earlier the merge the quicker we will iron out kinks.

I already committed an Orca script upstream that provides support for this ATK 
tooling.
http://bugzilla.gnome.org/show_bug.cgi?id=573156

Try it, and be stunned.
-- 
https://code.launchpad.net/~eeejay/notify-osd/atk/+merge/3987
Your team Notify OSD Developers is subscribed to branch lp:notify-osd.
=== modified file 'src/Makefile.am'
--- src/Makefile.am	2009-02-19 13:55:09 +0000
+++ src/Makefile.am	2009-02-25 10:02:29 +0000
@@ -22,6 +22,9 @@
 	dbus.c			\
 	dnd.c			\
 	apport.c		\
+	bubble-window.c \
+	bubble-window-accessible.c \
+	bubble-window-accessible-factory.c \
 	../egg/egg-fixed.c		\
 	../egg/egg-units.c		\
 	../egg/egg-timeline.c		\
@@ -39,6 +42,9 @@
 	dbus.h			\
 	dnd.h			\
 	apport.h		\
+	bubble-window.h \
+	bubble-window-accessible.h \
+	bubble-window-accessible-factory.h \
 	../egg/egg-fixed.h		\
 	../egg/egg-units.h		\
 	../egg/egg-timeline.h		\

=== added file 'src/bubble-window-accessible-factory.c'
--- src/bubble-window-accessible-factory.c	1970-01-01 00:00:00 +0000
+++ src/bubble-window-accessible-factory.c	2009-02-24 08:48:11 +0000
@@ -0,0 +1,77 @@
+/*******************************************************************************
+**3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
+**      10        20        30        40        50        60        70        80
+**
+** Codename "alsdorf"
+**
+** bubble-accessible-factory.c - implements an accessible object factory
+**
+** Copyright 2009 Canonical Ltd.
+**
+** Authors:
+**    Eitan Isaacson <[email protected]>
+**
+** This program is free software: you can redistribute it and/or modify it
+** under the terms of the GNU General Public License version 3, as published
+** by the Free Software Foundation.
+**
+** This program is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranties of
+** MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+** PURPOSE.  See the GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License along
+** with this program.  If not, see <http://www.gnu.org/licenses/>.
+**
+*******************************************************************************/
+
+#include "bubble-window-accessible-factory.h"
+#include "bubble-window-accessible.h"
+
+G_DEFINE_TYPE (BubbleWindowAccessibleFactory, bubble_window_accessible_factory, ATK_TYPE_OBJECT_FACTORY);
+
+static AtkObject* bubble_window_accessible_factory_create_accessible (GObject *obj);
+static GType bubble_window_accessible_factory_get_accessible_type (void);
+
+
+static void
+bubble_window_accessible_factory_init (BubbleWindowAccessibleFactory *object)
+{
+	/* TODO: Add initialization code here */
+}
+
+static void
+bubble_window_accessible_factory_class_init (BubbleWindowAccessibleFactoryClass *klass)
+{
+	AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
+
+	class->create_accessible = bubble_window_accessible_factory_create_accessible;
+	class->get_accessible_type = bubble_window_accessible_factory_get_accessible_type;
+}
+
+AtkObjectFactory*
+bubble_window_accessible_factory_new (void)
+{
+	GObject *factory;
+	factory = g_object_new (BUBBLE_WINDOW_TYPE_ACCESSIBLE_FACTORY, NULL);
+	return ATK_OBJECT_FACTORY (factory);
+}
+
+static AtkObject*
+bubble_window_accessible_factory_create_accessible (GObject *obj)
+{
+	GtkWidget *widget;
+  
+	g_return_val_if_fail (GTK_IS_WIDGET (obj), NULL);
+  
+	widget = GTK_WIDGET (obj);
+	
+	return bubble_window_accessible_new (widget);
+}
+
+static GType
+bubble_window_accessible_factory_get_accessible_type (void)
+{
+	
+	return BUBBLE_WINDOW_TYPE_ACCESSIBLE;
+}

=== added file 'src/bubble-window-accessible-factory.h'
--- src/bubble-window-accessible-factory.h	1970-01-01 00:00:00 +0000
+++ src/bubble-window-accessible-factory.h	2009-02-24 08:48:11 +0000
@@ -0,0 +1,61 @@
+/*******************************************************************************
+**3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
+**      10        20        30        40        50        60        70        80
+**
+** Codename "alsdorf"
+**
+** bubble-accessible-factory.c - implements an accessible object factory
+**
+** Copyright 2009 Canonical Ltd.
+**
+** Authors:
+**    Eitan Isaacson <[email protected]>
+**
+** This program is free software: you can redistribute it and/or modify it
+** under the terms of the GNU General Public License version 3, as published
+** by the Free Software Foundation.
+**
+** This program is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranties of
+** MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+** PURPOSE.  See the GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License along
+** with this program.  If not, see <http://www.gnu.org/licenses/>.
+**
+*******************************************************************************/
+
+#ifndef _BUBBLE_WINDOW_ACCESSIBLE_FACTORY_H_
+#define _BUBBLE_WINDOW_ACCESSIBLE_FACTORY_H_
+
+#include <atk/atkobjectfactory.h>
+
+G_BEGIN_DECLS
+
+#define BUBBLE_WINDOW_TYPE_ACCESSIBLE_FACTORY             (bubble_window_accessible_factory_get_type ())
+#define BUBBLE_WINDOW_ACCESSIBLE_FACTORY(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUBBLE_WINDOW_TYPE_ACCESSIBLE_FACTORY, BubbleWindowAccessibleFactory))
+#define BUBBLE_WINDOW_ACCESSIBLE_FACTORY_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), BUBBLE_WINDOW_TYPE_ACCESSIBLE_FACTORY, BubbleWindowAccessibleFactoryClass))
+#define BUBBLE_WINDOW_IS_ACCESSIBLE_FACTORY(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUBBLE_WINDOW_TYPE_ACCESSIBLE_FACTORY))
+#define BUBBLE_WINDOW_IS_ACCESSIBLE_FACTORY_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), BUBBLE_WINDOW_TYPE_ACCESSIBLE_FACTORY))
+#define BUBBLE_WINDOW_ACCESSIBLE_FACTORY_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), BUBBLE_WINDOW_TYPE_ACCESSIBLE_FACTORY, BubbleWindowAccessibleFactoryClass))
+
+typedef struct _BubbleWindowAccessibleFactoryClass BubbleWindowAccessibleFactoryClass;
+typedef struct _BubbleWindowAccessibleFactory BubbleWindowAccessibleFactory;
+
+struct _BubbleWindowAccessibleFactoryClass
+{
+	AtkObjectFactoryClass parent_class;
+};
+
+struct _BubbleWindowAccessibleFactory
+{
+	AtkObjectFactory parent_instance;
+};
+
+GType bubble_window_accessible_factory_get_type (void) G_GNUC_CONST;
+
+AtkObjectFactory* bubble_window_accessible_factory_new (void);
+
+G_END_DECLS
+
+#endif /* _BUBBLE_WINDOW_ACCESSIBLE_FACTORY_H_ */

=== added file 'src/bubble-window-accessible.c'
--- src/bubble-window-accessible.c	1970-01-01 00:00:00 +0000
+++ src/bubble-window-accessible.c	2009-02-25 16:44:14 +0000
@@ -0,0 +1,291 @@
+/*******************************************************************************
+**3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
+**      10        20        30        40        50        60        70        80
+**
+** Codename "alsdorf"
+**
+** bubble-accessible-factory.c - implements an accessible object factory
+**
+** Copyright 2009 Canonical Ltd.
+**
+** Authors:
+**    Eitan Isaacson <[email protected]>
+**
+** This program is free software: you can redistribute it and/or modify it
+** under the terms of the GNU General Public License version 3, as published
+** by the Free Software Foundation.
+**
+** This program is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranties of
+** MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+** PURPOSE.  See the GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License along
+** with this program.  If not, see <http://www.gnu.org/licenses/>.
+**
+*******************************************************************************/
+
+#include "bubble-window-accessible.h"
+#include "bubble.h"
+#include <string.h>
+
+static void        bubble_window_accessible_init            (BubbleWindowAccessible*      object);
+static void        bubble_window_accessible_finalize        (GObject*                     object);
+static void        bubble_window_accessible_class_init      (BubbleWindowAccessibleClass* klass);
+static const char* bubble_window_accessible_get_name        (AtkObject*                   obj);
+static const char* bubble_window_accessible_get_description (AtkObject*                   obj);
+static void        bubble_window_real_initialize            (AtkObject*                   obj,
+                                                             gpointer                     data);
+static void        atk_value_interface_init                 (AtkValueIface*               iface);
+static void        bubble_window_get_current_value          (AtkValue*                    obj,
+                                                             GValue*                      value);
+static void        bubble_window_get_maximum_value          (AtkValue*                    obj,
+                                                             GValue*                      value);
+static void        bubble_window_get_minimum_value          (AtkValue*                    obj,
+                                                             GValue*                      value);
+static void        bubble_value_changed_event               (Bubble*                      bubble,
+                                                             gint                         value,
+                                                             AtkObject                   *obj);
+
+static void* bubble_window_accessible_parent_class;
+
+GType
+bubble_window_accessible_get_type (void)
+{
+    static GType type = 0;
+    
+    if (!type) 
+    {
+        GTypeInfo tinfo = 
+        {
+            sizeof (BubbleWindowAccessibleClass),
+            (GBaseInitFunc) bubble_window_accessible_init, /* base init */
+            (GBaseFinalizeFunc) bubble_window_accessible_finalize, /* base finalize */
+            (GClassInitFunc) bubble_window_accessible_class_init, /* class init */
+            (GClassFinalizeFunc) NULL, /* class finalize */
+            NULL, /* class data */
+            sizeof (BubbleWindowAccessible), /* instance size */
+            0, /* nb preallocs */
+            NULL, /* instance init */
+            NULL /* value table */
+        };
+                
+        const GInterfaceInfo atk_value_info = 
+        {
+            (GInterfaceInitFunc) atk_value_interface_init,
+            (GInterfaceFinalizeFunc) NULL,
+            NULL
+        };
+        
+        /*
+         * Figure out the size of the class and instance
+         * we are deriving from
+         */
+        AtkObjectFactory *factory;
+        GType derived_type;
+        GTypeQuery query;
+        GType derived_atk_type;
+        
+        derived_type = g_type_parent (BUBBLE_TYPE_WINDOW);  
+        
+        factory = atk_registry_get_factory (atk_get_default_registry (),
+                                            derived_type);
+        derived_atk_type = atk_object_factory_get_accessible_type (factory);
+        
+        g_type_query (derived_atk_type, &query);
+        tinfo.class_size = query.class_size;
+        tinfo.instance_size = query.instance_size;
+        
+        type = g_type_register_static (derived_atk_type,
+                                       "BubbleWindowAccessible", &tinfo, 0);
+
+        g_type_add_interface_static (type, ATK_TYPE_VALUE, &atk_value_info);
+    }
+    
+    return type;
+}
+
+static void
+atk_value_interface_init (AtkValueIface* iface)
+{
+    g_return_if_fail (iface != NULL);
+    
+    iface->get_current_value = bubble_window_get_current_value;
+    iface->get_maximum_value = bubble_window_get_maximum_value;
+    iface->get_minimum_value = bubble_window_get_minimum_value;
+}
+
+static void
+bubble_window_accessible_init (BubbleWindowAccessible *object)
+{
+	/* TODO: Add initialization code here */
+}
+
+static void
+bubble_window_accessible_finalize (GObject *object)
+{
+	/* TODO: Add deinitalization code here */
+
+	G_OBJECT_CLASS (bubble_window_accessible_parent_class)->finalize (object);
+}
+
+static void
+bubble_window_accessible_class_init (BubbleWindowAccessibleClass *klass)
+{
+	GObjectClass* object_class = G_OBJECT_CLASS (klass);
+	AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
+    
+    bubble_window_accessible_parent_class = g_type_class_peek_parent (klass);
+    
+    class->get_name = bubble_window_accessible_get_name;
+    class->get_description = bubble_window_accessible_get_description;
+    class->initialize = bubble_window_real_initialize;
+
+	object_class->finalize = bubble_window_accessible_finalize;
+}
+
+static void
+bubble_window_real_initialize (AtkObject* obj,
+                               gpointer   data)
+{
+    GtkWidget* widget = GTK_WIDGET (data);
+    Bubble*    bubble; 
+
+    ATK_OBJECT_CLASS (bubble_window_accessible_parent_class)->initialize (obj, data);
+
+    bubble = g_object_get_data (G_OBJECT(widget), "bubble");
+    
+    g_signal_connect (bubble,
+                      "value-changed",
+                      G_CALLBACK (bubble_value_changed_event),
+                      obj);
+
+}
+
+AtkObject*
+bubble_window_accessible_new (GtkWidget *widget)
+{
+	GObject *object;
+	AtkObject *aobj;
+	GtkAccessible *gtk_accessible;
+	
+	object = g_object_new (BUBBLE_WINDOW_TYPE_ACCESSIBLE, NULL);
+	
+	aobj = ATK_OBJECT (object);
+	
+	gtk_accessible = GTK_ACCESSIBLE (aobj);
+	gtk_accessible->widget = widget;
+	
+	atk_object_initialize (aobj, widget);
+	aobj->role = ATK_ROLE_GLASS_PANE;
+	
+	return aobj;
+}
+
+static const char* 
+bubble_window_accessible_get_name (AtkObject* obj)
+{
+    GtkAccessible* accessible;
+ 	Bubble*        bubble;
+    const gchar*   title;
+ 
+ 	g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), "");
+ 	
+ 	accessible = GTK_ACCESSIBLE (obj);
+    
+    if (accessible->widget == NULL)
+        return "";
+ 	
+ 	bubble = g_object_get_data (G_OBJECT(accessible->widget), "bubble");
+
+    g_return_val_if_fail (IS_BUBBLE (bubble), "");
+    
+    
+    title = bubble_get_title(bubble);
+    if (g_strcmp0(title, " ") == 0)
+    {
+        /* Titles should never be empty:
+           https://bugs.launchpad.net/notify-osd/+bug/334292
+           This solution is extremely wrong. */
+        const gchar* synch_str;    
+        synch_str = bubble_get_synchronous(bubble);
+        if (synch_str != NULL)
+            return synch_str;
+        else
+            return " ";
+    } 
+    
+    
+    return title;
+}
+
+static const char*
+bubble_window_accessible_get_description (AtkObject* obj)
+{
+    GtkAccessible *accessible;
+ 	Bubble *bubble;
+ 
+ 	g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), "");
+ 	
+ 	accessible = GTK_ACCESSIBLE (obj);
+    
+    if (accessible->widget == NULL)
+        return "";
+ 	
+ 	bubble = g_object_get_data (G_OBJECT(accessible->widget), "bubble");
+
+    g_return_val_if_fail (IS_BUBBLE (bubble), "");
+    
+    return bubble_get_message_body(bubble);
+}
+
+static void      
+bubble_window_get_current_value (AtkValue             *obj,
+                                 GValue               *value)
+{
+    gdouble current_value;
+    GtkAccessible *accessible;
+ 	Bubble *bubble;
+ 
+ 	g_return_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj));
+ 	
+ 	accessible = GTK_ACCESSIBLE (obj);
+    
+    if (accessible->widget == NULL)
+        return;
+ 	
+ 	bubble = g_object_get_data (G_OBJECT(accessible->widget), "bubble");
+    
+    current_value = (gdouble) bubble_get_value(bubble);
+    
+    memset (value,  0, sizeof (GValue));
+    g_value_init (value, G_TYPE_DOUBLE);
+    g_value_set_double (value,current_value);
+}
+
+static void      
+bubble_window_get_maximum_value (AtkValue             *obj,
+                                 GValue               *value)
+{
+    memset (value,  0, sizeof (GValue));
+    g_value_init (value, G_TYPE_DOUBLE);
+    g_value_set_double (value, 100.0);
+    
+}
+
+static void      
+bubble_window_get_minimum_value (AtkValue             *obj,
+                                 GValue               *value)
+{
+    memset (value,  0, sizeof (GValue));
+    g_value_init (value, G_TYPE_DOUBLE);
+    g_value_set_double (value, 0.0);
+}
+
+static void
+bubble_value_changed_event (Bubble*    bubble,
+                            gint       value,
+                            AtkObject* obj)
+{
+    g_object_notify (G_OBJECT (obj), "accessible-value");
+}

=== added file 'src/bubble-window-accessible.h'
--- src/bubble-window-accessible.h	1970-01-01 00:00:00 +0000
+++ src/bubble-window-accessible.h	2009-02-24 13:53:21 +0000
@@ -0,0 +1,63 @@
+/*******************************************************************************
+**3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
+**      10        20        30        40        50        60        70        80
+**
+** Codename "alsdorf"
+**
+** bubble-accessible-factory.c - implements an accessible object factory
+**
+** Copyright 2009 Canonical Ltd.
+**
+** Authors:
+**    Eitan Isaacson <[email protected]>
+**
+** This program is free software: you can redistribute it and/or modify it
+** under the terms of the GNU General Public License version 3, as published
+** by the Free Software Foundation.
+**
+** This program is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranties of
+** MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+** PURPOSE.  See the GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License along
+** with this program.  If not, see <http://www.gnu.org/licenses/>.
+**
+*******************************************************************************/
+
+#ifndef _BUBBLE_WINDOW_ACCESSIBLE_H_
+#define _BUBBLE_WINDOW_ACCESSIBLE_H_
+
+#include <gtk/gtk.h>
+#include <atk/atk.h>
+#include "bubble-window.h"
+
+G_BEGIN_DECLS
+
+#define BUBBLE_WINDOW_TYPE_ACCESSIBLE             (bubble_window_accessible_get_type ())
+#define BUBBLE_WINDOW_ACCESSIBLE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUBBLE_WINDOW_TYPE_ACCESSIBLE, BubbleWindowAccessible))
+#define BUBBLE_WINDOW_ACCESSIBLE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), BUBBLE_WINDOW_TYPE_ACCESSIBLE, BubbleWindowAccessibleClass))
+#define BUBBLE_WINDOW_IS_ACCESSIBLE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUBBLE_WINDOW_TYPE_ACCESSIBLE))
+#define BUBBLE_WINDOW_IS_ACCESSIBLE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), BUBBLE_WINDOW_TYPE_ACCESSIBLE))
+#define BUBBLE_WINDOW_ACCESSIBLE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), BUBBLE_WINDOW_TYPE_ACCESSIBLE, BubbleWindowAccessibleClass))
+
+typedef struct _BubbleWindowAccessibleClass BubbleWindowAccessibleClass;
+typedef struct _BubbleWindowAccessible BubbleWindowAccessible;
+
+struct _BubbleWindowAccessibleClass
+{
+	GtkAccessibleClass parent_class;
+};
+
+struct _BubbleWindowAccessible
+{
+	GtkAccessible parent_instance;
+};
+
+GType bubble_window_accessible_get_type (void);
+
+AtkObject* bubble_window_accessible_new (GtkWidget *widget);
+
+G_END_DECLS
+
+#endif /* _BUBBLE_WINDOW_ACCESSIBLE_H_ */

=== added file 'src/bubble-window.c'
--- src/bubble-window.c	1970-01-01 00:00:00 +0000
+++ src/bubble-window.c	2009-02-25 10:02:29 +0000
@@ -0,0 +1,89 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * bubble-window.c
+ * Copyright (C) Eitan Isaacson 2009 <[email protected]>
+ * 
+ */
+
+#include "bubble-window.h"
+#include "bubble.h"
+#include "bubble-window-accessible-factory.h"
+
+G_DEFINE_TYPE (BubbleWindow, bubble_window, GTK_TYPE_WINDOW);
+
+static AtkObject* bubble_window_get_accessible (GtkWidget *widget);
+
+static void
+bubble_window_init (BubbleWindow *object)
+{
+	/* TODO: Add initialization code here */
+}
+
+static void
+bubble_window_finalize (GObject *object)
+{
+	/* TODO: Add deinitalization code here */
+
+	G_OBJECT_CLASS (bubble_window_parent_class)->finalize (object);
+}
+
+static void
+bubble_window_class_init (BubbleWindowClass *klass)
+{
+	GObjectClass* object_class = G_OBJECT_CLASS (klass);
+	GtkWidgetClass* widget_class = GTK_WIDGET_CLASS (klass);
+	
+	widget_class->get_accessible = bubble_window_get_accessible;
+
+	object_class->finalize = bubble_window_finalize;
+}
+
+GtkWidget *
+bubble_window_new (void)
+{
+	GtkWidget *bubble_window;
+
+	bubble_window = g_object_new (BUBBLE_TYPE_WINDOW, 
+						 "type", GTK_WINDOW_POPUP, NULL);
+	return bubble_window;
+}
+
+static AtkObject *
+bubble_window_get_accessible (GtkWidget *widget)
+{
+  static gboolean first_time = TRUE;
+
+  if (first_time) 
+    {
+      AtkObjectFactory *factory;
+      AtkRegistry *registry;
+      GType derived_type;
+      GType derived_atk_type;
+
+      /*
+       * Figure out whether accessibility is enabled by looking at the
+       * type of the accessible object which would be created for
+       * the parent type WnckPager.
+       */
+      derived_type = g_type_parent (BUBBLE_TYPE_WINDOW);
+
+      registry = atk_get_default_registry ();
+      factory = atk_registry_get_factory (registry,
+                                          derived_type);
+      derived_atk_type = atk_object_factory_get_accessible_type (factory);
+
+      if (g_type_is_a (derived_atk_type, GTK_TYPE_ACCESSIBLE)) 
+        {
+			/*
+			 * Specify what factory to use to create accessible
+			 * objects
+			 */
+			atk_registry_set_factory_type (registry,
+										   BUBBLE_TYPE_WINDOW,
+										   BUBBLE_WINDOW_TYPE_ACCESSIBLE_FACTORY);
+
+		}
+      first_time = FALSE;
+    }
+  return GTK_WIDGET_CLASS (bubble_window_parent_class)->get_accessible (widget);
+}

=== added file 'src/bubble-window.h'
--- src/bubble-window.h	1970-01-01 00:00:00 +0000
+++ src/bubble-window.h	2009-02-24 08:48:11 +0000
@@ -0,0 +1,43 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * bubble-window.c
+ * Copyright (C) Eitan Isaacson 2009 <[email protected]>
+ * 
+ */
+
+#ifndef _BUBBLE_WINDOW_H_
+#define _BUBBLE_WINDOW_H_
+
+#include <glib-object.h>
+#include <gtk/gtkwindow.h>
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define BUBBLE_TYPE_WINDOW             (bubble_window_get_type ())
+#define BUBBLE_WINDOW(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUBBLE_TYPE_WINDOW, BubbleWindow))
+#define BUBBLE_WINDOW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), BUBBLE_TYPE_WINDOW, BubbleWindowClass))
+#define BUBBLE_IS_WINDOW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUBBLE_TYPE_WINDOW))
+#define BUBBLE_IS_WINDOW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), BUBBLE_TYPE_WINDOW))
+#define BUBBLE_WINDOW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), BUBBLE_TYPE_WINDOW, BubbleWindowClass))
+
+typedef struct _BubbleWindowClass BubbleWindowClass;
+typedef struct _BubbleWindow BubbleWindow;
+
+struct _BubbleWindowClass
+{
+	GtkWindowClass parent_class;
+};
+
+struct _BubbleWindow
+{
+	GtkWindow parent_instance;
+};
+
+GType bubble_window_get_type (void) G_GNUC_CONST;
+
+GtkWidget *bubble_window_new (void);
+
+G_END_DECLS
+
+#endif /* _BUBBLE_WINDOW_H_ */

=== modified file 'src/bubble.c'
--- src/bubble.c	2009-02-25 22:27:29 +0000
+++ src/bubble.c	2009-02-26 10:28:44 +0000
@@ -42,6 +42,7 @@
 #include "defaults.h"
 #include "stack.h"
 #include "dbus.h"
+#include "bubble-window.h"
 
 G_DEFINE_TYPE (Bubble, bubble, G_TYPE_OBJECT);
 
@@ -87,6 +88,7 @@
 enum
 {
 	TIMED_OUT,
+    VALUE_CHANGED,
 	LAST_SIGNAL
 };
 
@@ -1855,6 +1857,18 @@
 		g_cclosure_marshal_VOID__VOID,
 		G_TYPE_NONE,
 		0);
+
+    g_bubble_signals[VALUE_CHANGED] = g_signal_new (
+		"value-changed",
+		G_OBJECT_CLASS_TYPE (gobject_class),
+		G_SIGNAL_RUN_LAST,
+		G_STRUCT_OFFSET (BubbleClass, value_changed),
+		NULL,
+		NULL,
+		g_cclosure_marshal_VOID__INT,
+		G_TYPE_NONE,
+		1,
+        G_TYPE_INT);
 }
 
 /*-- public API --------------------------------------------------------------*/
@@ -1873,7 +1887,7 @@
 	this->defaults = defaults;
 	priv = GET_PRIVATE (this);
 
-	priv->widget = gtk_window_new (GTK_WINDOW_POPUP);
+	priv->widget = bubble_window_new();
 	window = priv->widget;
 	if (!window)
 		return NULL;
@@ -2163,6 +2177,8 @@
 		return;
 
 	GET_PRIVATE (self)->value = value;
+    
+    g_signal_emit (self, g_bubble_signals[VALUE_CHANGED], 0, value);	
 }
 
 gint

=== modified file 'src/bubble.h'
--- src/bubble.h	2009-02-25 12:01:57 +0000
+++ src/bubble.h	2009-02-26 10:28:44 +0000
@@ -75,6 +75,7 @@
 
 	/*< signals >*/
 	void (*timed_out) (Bubble* bubble);
+    void (*value_changed) (Bubble* bubble);
 };
 
 GType bubble_get_type (void);

=== modified file 'tests/Makefile.am'
--- tests/Makefile.am	2009-02-10 16:55:25 +0000
+++ tests/Makefile.am	2009-02-25 10:02:29 +0000
@@ -9,14 +9,17 @@
 check_PROGRAMS = test-modules
 TESTS = test-modules
 
-test_modules_SOURCES =		\
-	../src/bubble.c		\
-	../src/defaults.c	\
-	../src/observer.c	\
-	../src/stack.c		\
-	../src/dbus.c		\
-	../src/dnd.c		\
-	../src/apport.c		\
+test_modules_SOURCES =		                   \
+	../src/bubble.c		                   \
+	../src/defaults.c	                   \ 
+	../src/observer.c	                   \
+	../src/stack.c		                   \
+	../src/dbus.c		                   \
+	../src/dnd.c		                   \
+	../src/apport.c		                   \
+	../src/bubble-window.c                     \
+	../src/bubble-window-accessible.c          \
+	../src/bubble-window-accessible-factory.c  \
 	$(EGG_MODULES)	\
 	test-modules-main.c     \
 	test-apport.c		\

_______________________________________________
Mailing list: https://launchpad.net/~dx-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~dx-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to