~macslow/notify-osd/mouse-movement-monitor

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*******************************************************************************
**3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
**      10        20        30        40        50        60        70        80
**
** notify-osd
**
** bubble-window-accessible-factory.c - implements an accessible object factory
**
** Copyright 2009 Canonical Ltd.
**
** Authors:
**    Eitan Isaacson <eitan@ascender.com>
**
** 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;
}