1 /* $Id: component.hg,v 1.5 2004/03/12 20:35:53 murrayc Exp $ */
3 /* Copyright (C) 2002 The gtkmm Development Team
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 _PINCLUDE(atk/atkcomponent.h)
24 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 typedef struct _AtkComponentIface AtkComponentIface;
28 typedef struct _AtkObject AtkObject;
29 typedef void (* AtkFocusHandler) (AtkObject*, gboolean);
31 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37 _CC_INCLUDE(atk/atk-enum-types.h)
38 _WRAP_ENUM(CoordType, AtkCoordType)
39 _WRAP_ENUM(Layer, AtkLayer)
44 /** The ATK interface provided by UI components which occupy a physical area on the screen.
45 * This should be implemented by most if not all UI elements with an actual on-screen presence, i.e. components which
46 * can be said to have a screen-coordinate bounding box. Virtually all widgets will need to have Atk::Component
47 * implementations provided for their corresponding Atk::Object class. In short, only UI elements which are *not* GUI
48 * elements will omit this ATK interface.
50 * A possible exception might be textual information with a transparent background, in which case text glyph bounding
51 * box information is provided by Atk::Text.
53 class Component : public Glib::Interface
55 _CLASS_INTERFACE(Component, AtkComponent, ATK_COMPONENT, AtkComponentIface)
58 _WRAP_METHOD(guint add_focus_handler(AtkFocusHandler handler), atk_component_add_focus_handler)
59 _WRAP_METHOD(bool contains(int x, int y, CoordType coord_type) const, atk_component_contains)
60 _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_accessible_at_point(int x, int y, CoordType coord_type), atk_component_ref_accessible_at_point)
61 _WRAP_METHOD(void get_extents(int& x, int& y, int& width, int& height, CoordType coord_type) const, atk_component_get_extents)
62 _WRAP_METHOD(void get_position(int& x, int& y, CoordType coord_type) const, atk_component_get_position)
63 _WRAP_METHOD(void get_size(int& width, int& height) const, atk_component_get_size)
64 _WRAP_METHOD(Layer get_layer() const, atk_component_get_layer)
65 _WRAP_METHOD(int get_mdi_zorder() const, atk_component_get_mdi_zorder)
66 _WRAP_METHOD(bool grab_focus(), atk_component_grab_focus)
67 _WRAP_METHOD(void remove_focus_handler(guint handler_id), atk_component_remove_focus_handler)
68 _WRAP_METHOD(bool set_extents(int x, int y, int width, int height, CoordType coord_type), atk_component_set_extents)
69 _WRAP_METHOD(bool set_position(int x, int y, CoordType coord_type), atk_component_set_position)
70 _WRAP_METHOD(bool set_size(int width, int height), atk_component_set_size)
73 _WRAP_VFUNC(guint add_focus_handler(AtkFocusHandler handler), add_focus_handler)
74 _WRAP_VFUNC(bool contains(int x, int y, CoordType coord_type) const, contains)
76 _WRAP_VFUNC(Glib::RefPtr<Atk::Object> get_accessible_at_point(int x, int y, CoordType coord_type), ref_accessible_at_point, refreturn_ctype)
78 _WRAP_VFUNC(void get_extents(int& x, int& y, int& width, int& height, CoordType coord_type) const, get_extents)
79 _WRAP_VFUNC(void get_position(int& x, int& y, CoordType coord_type) const, get_position)
80 _WRAP_VFUNC(void get_size(int& width, int& height) const, get_size)
81 _WRAP_VFUNC(Layer get_layer() const, get_layer)
82 _WRAP_VFUNC(int get_mdi_zorder() const, get_mdi_zorder)
83 _WRAP_VFUNC(bool grab_focus(), grab_focus)
84 _WRAP_VFUNC(void remove_focus_handler(guint handler_id), remove_focus_handler)
85 _WRAP_VFUNC(bool set_extents(int x, int y, int width, int height, CoordType coord_type), set_extents)
86 _WRAP_VFUNC(bool set_position(int x, int y, CoordType coord_type), set_position)
87 _WRAP_VFUNC(bool set_size(int width, int height), set_size)