Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:16

0001 /*
0002  * AT-SPI - Assistive Technology Service Provider Interface
0003  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
0004  *
0005  * Copyright 2002 Ximian, Inc.
0006  *           2002 Sun Microsystems Inc.
0007  * Copyright 2010, 2011 Novell, Inc.
0008  *
0009  *
0010  * This library is free software; you can redistribute it and/or
0011  * modify it under the terms of the GNU Lesser General Public
0012  * License as published by the Free Software Foundation; either
0013  * version 2.1 of the License, or (at your option) any later version.
0014  *
0015  * This library is distributed in the hope that it will be useful,
0016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0018  * Lesser General Public License for more details.
0019  *
0020  * You should have received a copy of the GNU Lesser General Public
0021  * License along with this library; if not, write to the
0022  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0023  * Boston, MA 02110-1301, USA.
0024  */
0025 
0026 #ifndef _ATSPI_EVENT_LISTENER_H_
0027 #define _ATSPI_EVENT_LISTENER_H_
0028 
0029 #include "glib-object.h"
0030 
0031 #include "atspi-types.h"
0032 
0033 G_BEGIN_DECLS
0034 
0035 GType atspi_event_get_type (void);
0036 
0037 /**
0038  * AtspiEventListenerCB:
0039  * @event: (transfer full): The event for which notification is sent.
0040  * @user_data: User data which is passed to the callback each time a notification takes place.
0041  *
0042  * A function prototype for callbacks via which clients are notified of AT-SPI events.
0043  *
0044  **/
0045 typedef void (*AtspiEventListenerCB) (AtspiEvent *event,
0046                                       void *user_data);
0047 
0048 /**
0049  * AtspiEventListenerSimpleCB:
0050  * @event: (transfer full): The event for which notification is sent.
0051  *
0052  * Like #AtspiEventlistenerCB, but with no user_data.
0053  *
0054  **/
0055 typedef void (*AtspiEventListenerSimpleCB) (const AtspiEvent *event);
0056 
0057 #define ATSPI_TYPE_EVENT_LISTENER (atspi_event_listener_get_type ())
0058 #define ATSPI_EVENT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_EVENT_LISTENER, AtspiEventListener))
0059 #define ATSPI_EVENT_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATSPI_TYPE_EVENT_LISTENER, AtspiEventListenerClass))
0060 #define ATSPI_IS_EVENT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_EVENT_LISTENER))
0061 #define ATSPI_IS_EVENT_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATSPI_TYPE_EVENT_LISTENER))
0062 #define ATSPI_EVENT_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATSPI_TYPE_EVENT_LISTENER, AtspiEventListenerClass))
0063 
0064 typedef struct _AtspiEventListener AtspiEventListener;
0065 struct _AtspiEventListener
0066 {
0067   GObject parent;
0068   AtspiEventListenerCB callback;
0069   void *user_data;
0070   GDestroyNotify cb_destroyed;
0071 };
0072 
0073 typedef struct _AtspiEventListenerClass AtspiEventListenerClass;
0074 struct _AtspiEventListenerClass
0075 {
0076   GObjectClass parent_class;
0077 };
0078 
0079 GType atspi_event_listener_get_type (void);
0080 
0081 AtspiEventListener *
0082 atspi_event_listener_new (AtspiEventListenerCB callback,
0083                           gpointer user_data,
0084                           GDestroyNotify callback_destroyed);
0085 
0086 AtspiEventListener *
0087 atspi_event_listener_new_simple (AtspiEventListenerSimpleCB callback,
0088                                  GDestroyNotify callback_destroyed);
0089 
0090 gboolean
0091 atspi_event_listener_register (AtspiEventListener *listener,
0092                                const gchar *event_type,
0093                                GError **error);
0094 
0095 gboolean
0096 atspi_event_listener_register_full (AtspiEventListener *listener,
0097                                     const gchar *event_type,
0098                                     GArray *properties,
0099                                     GError **error);
0100 
0101 gboolean
0102 atspi_event_listener_register_with_app (AtspiEventListener *listener,
0103                                         const gchar *event_type,
0104                                         GArray *properties,
0105                                         AtspiAccessible *app,
0106                                         GError **error);
0107 
0108 gboolean
0109 atspi_event_listener_register_from_callback (AtspiEventListenerCB callback,
0110                                              void *user_data,
0111                                              GDestroyNotify callback_destroyed,
0112                                              const gchar *event_type,
0113                                              GError **error);
0114 
0115 gboolean
0116 atspi_event_listener_register_from_callback_full (AtspiEventListenerCB callback,
0117                                                   void *user_data,
0118                                                   GDestroyNotify callback_destroyed,
0119                                                   const gchar *event_type,
0120                                                   GArray *properties,
0121                                                   GError **error);
0122 
0123 gboolean
0124 atspi_event_listener_register_from_callback_with_app (AtspiEventListenerCB callback,
0125                                                       void *user_data,
0126                                                       GDestroyNotify callback_destroyed,
0127                                                       const gchar *event_type,
0128                                                       GArray *properties,
0129                                                       AtspiAccessible *app,
0130                                                       GError **error);
0131 
0132 gboolean
0133 atspi_event_listener_register_no_data (AtspiEventListenerSimpleCB callback,
0134                                        GDestroyNotify callback_destroyed,
0135                                        const gchar *event_type,
0136                                        GError **error);
0137 
0138 gboolean
0139 atspi_event_listener_deregister (AtspiEventListener *listener,
0140                                  const gchar *event_type,
0141                                  GError **error);
0142 
0143 gboolean
0144 atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback,
0145                                                void *user_data,
0146                                                const gchar *event_type,
0147                                                GError **error);
0148 
0149 gboolean
0150 atspi_event_listener_deregister_no_data (AtspiEventListenerSimpleCB callback,
0151                                          const gchar *event_type,
0152                                          GError **error);
0153 
0154 G_END_DECLS
0155 
0156 #endif /* _ATSPI_EVENT_LISTENER_H_ */