Initial revision
[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  * A focus tracker is a function which is called when an object 
31  * receives focus.
32  */
33 typedef void  (*AtkFocusTracker) (AtkObject*);
34 typedef void  (*AtkFocusTrackerInit) (void);
35
36
37 /*
38  * Adds the specified function to the list of functions to be called
39  * when an object receives focus.
40  */
41 guint    atk_add_focus_tracker     (AtkFocusTracker      focus_tracker);
42 /*
43  * Removes the specified focus tracker from the list of function
44  * to be called when any object receives focus
45  */
46 void     atk_remove_focus_tracker  (guint                tracker_id);
47 /*
48  * Specifies the function to be called for focus tracker initialization.
49  * removal. This function should be called by an implementation of the
50  * ATK interface if any specific work needs to be done to enable
51  * focus tracking.
52  */
53 void     atk_focus_tracker_init    (AtkFocusTrackerInit  add_function);
54 /*
55  * Cause the focus tracker functions which have been specified to be
56  * executed for the object.
57  */
58 void     atk_focus_tracker_notify  (AtkObject            *object);
59
60 #ifdef __cplusplus
61 }
62 #endif /* __cplusplus */
63
64
65 #endif /* __ATK_UTIL_H__ */