X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libspi%2Fimage.c;h=b9578495fc352e8a8c496ac4ae7e8b29306a66df;hb=e215f4330239bfe0d9bf87dfe968ced9eca79089;hp=f1c989359739eeaa6def05ea27f95f41c0332386;hpb=d809d79f978308b8e2039e7958e6b5773950ed69;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/libspi/image.c b/libspi/image.c index f1c9893..b957849 100644 --- a/libspi/image.c +++ b/libspi/image.c @@ -20,35 +20,20 @@ * Boston, MA 02111-1307, USA. */ -/* - * component.c : bonobo wrapper for accessible component implementation - * - */ -#include -#include +/* image.c : implements the Image interface */ +#include #include +#include -/* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server - */ -#include - -/* - * This pulls the definition of the image bonobo object - */ -#include "image.h" - -/* - * Static function declarations - */ +/* Static function declarations */ static void -image_class_init (ImageClass *klass); +spi_image_class_init (SpiImageClass *klass); static void -image_init (Image *image); +spi_image_init (SpiImage *image); static void -image_finalize (GObject *obj); +spi_image_finalize (GObject *obj); static void impl_getImagePosition (PortableServer_Servant _servant, CORBA_long * x, CORBA_long * y, @@ -66,21 +51,21 @@ impl__get_imageDescription (PortableServer_Servant _servant, static GObjectClass *parent_class; GType -image_get_type (void) +spi_image_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (ImageClass), + sizeof (SpiImageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) image_class_init, + (GClassInitFunc) spi_image_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Image), + sizeof (SpiImage), 0, /* n preallocs */ - (GInstanceInitFunc) image_init, + (GInstanceInitFunc) spi_image_init, NULL /* value table */ }; @@ -93,22 +78,22 @@ image_get_type (void) BONOBO_OBJECT_TYPE, POA_Accessibility_Image__init, NULL, - G_STRUCT_OFFSET (ImageClass, epv), + G_STRUCT_OFFSET (SpiImageClass, epv), &tinfo, - "AccessibleImage"); + "SpiAccessibleImage"); } return type; } static void -image_class_init (ImageClass *klass) +spi_image_class_init (SpiImageClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; POA_Accessibility_Image__epv *epv = &klass->epv; parent_class = g_type_class_peek_parent (klass); - object_class->finalize = image_finalize; + object_class->finalize = spi_image_finalize; /* Initialize epv table */ @@ -119,24 +104,24 @@ image_class_init (ImageClass *klass) } static void -image_init (Image *image) +spi_image_init (SpiImage *image) { } static void -image_finalize (GObject *obj) +spi_image_finalize (GObject *obj) { - Image *image = IMAGE (obj); + SpiImage *image = SPI_IMAGE (obj); g_object_unref (image->atko); image->atko = NULL; parent_class->finalize (obj); } -Image * -image_interface_new (AtkObject *obj) +SpiImage * +spi_image_interface_new (AtkObject *obj) { - Image *new_image = - IMAGE(g_object_new (IMAGE_TYPE, NULL)); + SpiImage *new_image = + SPI_IMAGE(g_object_new (SPI_IMAGE_TYPE, NULL)); new_image->atko = obj; g_object_ref (obj); return new_image; @@ -150,7 +135,7 @@ impl_getImagePosition (PortableServer_Servant _servant, const CORBA_short coordType, CORBA_Environment * ev) { - Image *image = IMAGE (bonobo_object_from_servant(_servant)); + SpiImage *image = SPI_IMAGE (bonobo_object_from_servant(_servant)); atk_image_get_image_position (ATK_IMAGE(image->atko), (gint *) x, (gint *) y, (AtkCoordType) coordType); @@ -163,7 +148,7 @@ impl_getImageSize (PortableServer_Servant _servant, CORBA_long * width, CORBA_long * height, CORBA_Environment * ev) { - Image *image = IMAGE (bonobo_object_from_servant(_servant)); + SpiImage *image = SPI_IMAGE (bonobo_object_from_servant(_servant)); atk_image_get_image_size (ATK_IMAGE(image->atko), (gint *) width, (gint *) height); } @@ -171,13 +156,15 @@ impl_getImageSize (PortableServer_Servant _servant, static CORBA_string -impl__get_imageDescription (PortableServer_Servant _servant, - CORBA_Environment * ev) +impl__get_imageDescription (PortableServer_Servant servant, + CORBA_Environment *ev) { - Image *image = IMAGE (bonobo_object_from_servant(_servant)); - CORBA_char *rv; + SpiImage *image; + const char *rv; + + image = SPI_IMAGE (bonobo_object_from_servant (servant)); - rv = atk_image_get_image_description (ATK_IMAGE(image->atko)); + rv = atk_image_get_image_description (ATK_IMAGE (image->atko)); if (rv) return CORBA_string_dup (rv); else