2001-12-10 Michael Meeks <michael@ximian.com>
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_image.c
1 #include <cspi/spi-private.h>
2
3 /**
4  * AccessibleImage_ref:
5  * @obj: a pointer to the #AccessibleImage implementor on which to operate.
6  *
7  * Increment the reference count for an #AccessibleImage object.
8  *
9  * Returns: (no return code implemented yet).
10  *
11  **/
12 void
13 AccessibleImage_ref (AccessibleImage *obj)
14 {
15   cspi_object_ref (obj);
16 }
17
18 /**
19  * AccessibleImage_unref:
20  * @obj: a pointer to the #AccessibleImage implementor on which to operate.
21  *
22  * Decrement the reference count for an #AccessibleImage object.
23  *
24  * Returns: (no return code implemented yet).
25  *
26  **/
27 void
28 AccessibleImage_unref (AccessibleImage *obj)
29 {
30   cspi_object_unref (obj);
31 }
32
33
34 /**
35  * AccessibleImage_getImageDescription:
36  * @obj: a pointer to the #AccessibleImage implementor on which to operate.
37  *
38  * Get the description of the image displayed in an #AccessibleImage object.
39  *
40  * Returns: a UTF-8 string describing the image.
41  *
42  **/
43 char *
44 AccessibleImage_getImageDescription (AccessibleImage *obj)
45 {
46   return (char *)
47     Accessibility_Image__get_imageDescription (CSPI_OBJREF (obj), cspi_ev ());
48 }
49
50
51
52 /**
53  * AccessibleImage_getImageSize:
54  * @obj: a pointer to the #AccessibleImage to query.
55  * @width: a pointer to a #long into which the x extents (width) will be returned.
56  * @height: a pointer to a #long into which the y extents (height) will be returned.
57  *
58  * Get the size of the image displayed in a specified #AccessibleImage object.
59  *
60  **/
61 void
62 AccessibleImage_getImageSize (AccessibleImage *obj,
63                               long int *width,
64                               long int *height)
65 {
66   Accessibility_Image_getImageSize (CSPI_OBJREF (obj),
67                                     (CORBA_long *) width, (CORBA_long *) height, cspi_ev ());
68 }
69
70
71
72 /**
73  * AccessibleImage_getImagePosition:
74  * @obj: a pointer to the #AccessibleImage implementor to query.
75  * @x: a pointer to a #long into which the minimum x coordinate will be returned.
76  * @y: a pointer to a #long into which the minimum y coordinate will be returned.
77  * @ctype: the desired coordinate system into which to return the results,
78  *         (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
79  *
80  * Get the minimum x and y coordinates of the image displayed in a
81  *         specified #AccessibleImage implementor.
82  *
83  **/
84 void
85 AccessibleImage_getImagePosition (AccessibleImage *obj,
86                                   long *x,
87                                   long *y,
88                                   AccessibleCoordType ctype)
89 {
90   Accessibility_Image_getImagePosition (CSPI_OBJREF (obj),
91                                         (CORBA_long *) x, (CORBA_long *) y, (CORBA_short) ctype,
92                                         cspi_ev ());
93 }
94
95 /**
96  * AccessibleImage_getImageExtents:
97  * @obj: a pointer to the #AccessibleImage implementor to query.
98  * @x: a pointer to a #long into which the minimum x coordinate will be returned.
99  * @y: a pointer to a #long into which the minimum y coordinate will be returned.
100  * @width: a pointer to a #long into which the image x extent will be returned.
101  * @height: a pointer to a #long into which the image y extent will be returned.
102  * @ctype: the desired coordinate system into which to return the results,
103  *         (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
104  *
105  * Get the bounding box of the image displayed in a
106  *         specified #AccessibleImage implementor.
107  *
108  **/
109 void
110 AccessibleImage_getImageExtents (AccessibleImage *obj,
111                                  long *x,
112                                  long *y,
113                                  long *width,
114                                  long *height,
115                                  AccessibleCoordType ctype)
116 {
117   Accessibility_BoundingBox bbox;       
118   bbox = Accessibility_Image_getImageExtents (CSPI_OBJREF (obj),
119                                               (CORBA_short) ctype,
120                                               cspi_ev ());
121   *x = bbox.x;
122   *y = bbox.y;
123   *width = bbox.width;
124   *height = bbox.height;
125 }