]> Pileus Git - ~andy/gtk/blob - libgail-util/gailmisc.h
9483755c7b2384955d2056799b95698d460ced22
[~andy/gtk] / libgail-util / gailmisc.h
1 /* GAIL - The GNOME Accessibility Implementation Library
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 #ifndef __GAIL_MISC_H__
21 #define __GAIL_MISC_H__
22
23 #include <glib-object.h>
24 #include <gtk/gtk.h>
25 #include <pango/pango.h>
26
27 G_BEGIN_DECLS
28
29 AtkAttributeSet* gail_misc_add_attribute          (AtkAttributeSet   *attrib_set,
30                                                    AtkTextAttribute   attr,
31                                                    gchar             *value);
32 AtkAttributeSet* gail_misc_layout_get_run_attributes
33                                                   (AtkAttributeSet   *attrib_set,
34                                                    PangoLayout       *layout,
35                                                    const gchar       *text,
36                                                    gint              offset,
37                                                    gint              *start_offset,
38                                                    gint              *end_offset);
39
40 AtkAttributeSet* gail_misc_get_default_attributes (AtkAttributeSet   *attrib_set,
41                                                    PangoLayout       *layout,
42                                                    GtkWidget         *widget);
43
44 void             gail_misc_get_extents_from_pango_rectangle
45                                                   (GtkWidget         *widget,
46                                                    PangoRectangle    *char_rect,
47                                                    gint              x_layout,
48                                                    gint              y_layout,
49                                                    gint              *x,
50                                                    gint              *y,
51                                                    gint              *width,
52                                                    gint              *height,
53                                                    AtkCoordType      coords);
54
55 gint             gail_misc_get_index_at_point_in_layout
56                                                   (GtkWidget         *widget,
57                                                    PangoLayout       *layout, 
58                                                    gint              x_layout,
59                                                    gint              y_layout,
60                                                    gint              x,
61                                                    gint              y,
62                                                    AtkCoordType      coords);
63
64 void             gail_misc_get_origins            (GtkWidget         *widget,
65                                                    gint              *x_window,
66                                                    gint              *y_window,
67                                                    gint              *x_toplevel,
68                                                    gint              *y_toplevel);
69
70 AtkAttributeSet* gail_misc_buffer_get_run_attributes
71                                                   (GtkTextBuffer     *buffer,
72                                                    gint              offset,
73                                                    gint              *start_offset,
74                                                    gint              *end_offset);
75
76 G_END_DECLS
77
78 #endif /*__GAIL_MISC_H__ */