Debian Codegraph @

atk/src/image.hg

raw
1 /* Copyright (C) 2002 The gtkmm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
15 */
16
17 _DEFS(atkmm,atk)
18 _PINCLUDE(atk/atkimage.h)
19
20 #include <atkmm/component.h> /* for Atk::CoordType */
21
22 #ifndef DOXYGEN_SHOULD_SKIP_THIS
23 extern "C"
24 {
25 typedef struct _AtkImageIface AtkImageIface;
26 typedef struct _AtkImage AtkImage;
27 }
28 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
29
30
31 namespace Atk
32 {
33
34 /** The ATK Interface implemented by components which expose image or pixmap content on-screen.
35 * This should be implemented by Atk::Object subtypes on behalf of components which display image/pixmap information
36 * onscreen, and which provide information (other than just widget borders, etc.) via that image content. For instance,
37 * icons, buttons with icons, toolbar elements, and image viewing panes typically should implement AtkImage.
38 *
39 * Atk::Image primarily provides two types of information: coordinate information (useful for screen review mode of
40 * screenreaders, and for use by onscreen magnifiers), and descriptive information. The descriptive information is
41 * provided for alternative, text-only presentation of the most significant information present in the image.
42 */
43 class ATKMM_API Image : public Glib::Interface
44 {
45 _CLASS_INTERFACE(Image, AtkImage, ATK_IMAGE, AtkImageIface, , , ATKMM_API)
46
47 public:
48 _WRAP_METHOD(bool set_image_description(const Glib::ustring& description), atk_image_set_image_description)
49 _WRAP_METHOD(Glib::ustring get_image_description() const, atk_image_get_image_description)
50
51 _WRAP_METHOD(void get_image_size(int& width, int& height) const, atk_image_get_image_size)
52 _WRAP_METHOD(void get_image_position(int& x, int& y, CoordType coord_type) const, atk_image_get_image_position)
53
54 protected:
55 #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
56 _WRAP_VFUNC(bool set_image_description(const Glib::ustring& description), set_image_description)
57 _WRAP_VFUNC(const char* get_image_description() const, get_image_description)
58
59 _WRAP_VFUNC(void get_image_position(int& x, int& y, CoordType coord_type) const, get_image_position)
60 _WRAP_VFUNC(void get_image_size(int& width, int& height) const, get_image_size)
61 };
62
63 } // namespace Atk