Workaround for window manager bug using some non-gnome WMs, for magnifier.
[platform/core/uifw/at-spi2-atk.git] / libspi / remoteobject.c
1 /* AT-SPI : Assistive Technology Service Provider Interface
2  * Copyright 2001 Sun Microsystems Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #include "remoteobject.h"
21
22 static Accessibility_Accessible
23 impl_spi_remote_object_get_accessible (SpiRemoteObject *o) /* default impl */
24 {
25   return CORBA_OBJECT_NIL;
26 }
27
28 Accessibility_Accessible
29 spi_remote_object_get_accessible (SpiRemoteObject *o)
30 {
31   SpiRemoteObjectClass *klass;  
32   g_assert (SPI_IS_REMOTE_OBJECT (o));
33   
34   klass = SPI_REMOTE_OBJECT_GET_CLASS (o);
35   if (klass->get_accessible)
36     return (klass->get_accessible) (o);
37   else
38     return CORBA_OBJECT_NIL;
39 }
40
41 static void
42 spi_remote_object_class_init (AtkObjectClass *klass)
43 {
44   SpiRemoteObjectClass *parent_class = SPI_REMOTE_OBJECT_CLASS (klass);
45   parent_class->get_accessible = impl_spi_remote_object_get_accessible;
46
47
48 GType
49 spi_remote_object_get_type (void)
50 {
51   static GType type = 0;
52
53   if (!type)
54     {
55       static const GTypeInfo typeInfo =
56       {
57         sizeof (SpiRemoteObjectClass),
58         (GBaseInitFunc) NULL,
59         (GBaseFinalizeFunc) NULL,
60         (GClassInitFunc) spi_remote_object_class_init,
61         (GClassFinalizeFunc) NULL,
62         NULL,
63         sizeof (SpiRemoteObject),
64         0,
65         (GInstanceInitFunc) NULL,
66       } ;
67       type = g_type_register_static (ATK_TYPE_OBJECT, "SpiRemoteObject", &typeInfo, 0) ;
68     }
69   return type;
70 }
71