Updated so that functions that take screen coords as
[platform/upstream/atk.git] / atk / atkutil.h
1 /* ATK -  Accessibility Toolkit
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 __ATK_UTIL_H__
21 #define __ATK_UTIL_H__
22
23 #include <atk/atkobject.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28
29 /**
30  *AtkCoordType:
31  *@ATK_XY_SCREEN: specifies xy coordinates relative to the screen
32  *@ATK_XY_WINDOW: specifies xy coordinates relative to the widgets 
33  * top-level window
34  *
35  *Specifies how xy coordinates are to be interpreted 
36  **/
37 typedef enum {
38   ATK_XY_SCREEN,
39   ATK_XY_WINDOW
40 }AtkCoordType;
41
42 /*
43  * A focus tracker is a function which is called when an object 
44  * receives focus.
45  */
46 typedef void  (*AtkFocusTracker) (AtkObject*);
47 typedef void  (*AtkFocusTrackerInit) (void);
48
49
50 /*
51  * Adds the specified function to the list of functions to be called
52  * when an object receives focus.
53  */
54 guint    atk_add_focus_tracker     (AtkFocusTracker      focus_tracker);
55 /*
56  * Removes the specified focus tracker from the list of function
57  * to be called when any object receives focus
58  */
59 void     atk_remove_focus_tracker  (guint                tracker_id);
60 /*
61  * Specifies the function to be called for focus tracker initialization.
62  * removal. This function should be called by an implementation of the
63  * ATK interface if any specific work needs to be done to enable
64  * focus tracking.
65  */
66 void     atk_focus_tracker_init    (AtkFocusTrackerInit  add_function);
67 /*
68  * Cause the focus tracker functions which have been specified to be
69  * executed for the object.
70  */
71 void     atk_focus_tracker_notify  (AtkObject            *object);
72
73 #ifdef __cplusplus
74 }
75 #endif /* __cplusplus */
76
77
78 #endif /* __ATK_UTIL_H__ */