|
Packit |
8b6d7a |
/*
|
|
Packit |
8b6d7a |
* AT-SPI - Assistive Technology Service Provider Interface
|
|
Packit |
8b6d7a |
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
|
|
Packit |
8b6d7a |
*
|
|
Packit |
8b6d7a |
* Copyright 2002 Ximian, Inc.
|
|
Packit |
8b6d7a |
* 2002 Sun Microsystems Inc.
|
|
Packit |
8b6d7a |
* Copyright 2010, 2011 Novell, Inc.
|
|
Packit |
8b6d7a |
*
|
|
Packit |
8b6d7a |
*
|
|
Packit |
8b6d7a |
* This library is free software; you can redistribute it and/or
|
|
Packit |
8b6d7a |
* modify it under the terms of the GNU Library General Public
|
|
Packit |
8b6d7a |
* License as published by the Free Software Foundation; either
|
|
Packit |
8b6d7a |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
8b6d7a |
*
|
|
Packit |
8b6d7a |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
8b6d7a |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
8b6d7a |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
8b6d7a |
* Library General Public License for more details.
|
|
Packit |
8b6d7a |
*
|
|
Packit |
8b6d7a |
* You should have received a copy of the GNU Library General Public
|
|
Packit |
8b6d7a |
* License along with this library; if not, write to the
|
|
Packit |
8b6d7a |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Packit |
8b6d7a |
* Boston, MA 02111-1307, USA.
|
|
Packit |
8b6d7a |
*/
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
#ifndef _ATSPI_DEVICE_LISTENER_H_
|
|
Packit |
8b6d7a |
#define _ATSPI_DEVICE_LISTENER_H_
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
#include "glib-object.h"
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
#include "atspi-types.h"
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
G_BEGIN_DECLS
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
GType atspi_device_event_get_type (void);
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
/**
|
|
Packit |
8b6d7a |
* AtspiDeviceListenerCB:
|
|
Packit |
8b6d7a |
* @stroke: (transfer full): The #AtspiDeviceEvent for which notification is
|
|
Packit |
8b6d7a |
* being received.
|
|
Packit |
8b6d7a |
* @user_data: Data which is passed to the client each time this callback is notified.
|
|
Packit |
8b6d7a |
*
|
|
Packit |
8b6d7a |
* A callback function prototype via which clients receive device event notifications.
|
|
Packit |
8b6d7a |
*
|
|
Packit |
8b6d7a |
* Returns: #TRUE if the client wishes to consume/preempt the event, preventing it from being
|
|
Packit |
8b6d7a |
* relayed to the currently focussed application, #FALSE if the event delivery should proceed as normal.
|
|
Packit |
8b6d7a |
**/
|
|
Packit |
8b6d7a |
typedef gboolean (*AtspiDeviceListenerCB) (const AtspiDeviceEvent *stroke,
|
|
Packit |
8b6d7a |
void *user_data);
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
/**
|
|
Packit |
8b6d7a |
* AtspiDeviceListenerSimpleCB:
|
|
Packit |
8b6d7a |
* @stroke: (transfer full): The #AtspiDeviceEvent for which notification is
|
|
Packit |
8b6d7a |
* being received.
|
|
Packit |
8b6d7a |
*
|
|
Packit |
8b6d7a |
* Similar to #AtspiDeviceListenerCB, but with no user data.
|
|
Packit |
8b6d7a |
*
|
|
Packit |
8b6d7a |
* Returns: #TRUE if the client wishes to consume/preempt the event, preventing it from being
|
|
Packit |
8b6d7a |
* relayed to the currently focussed application, #FALSE if the event delivery should proceed as normal.
|
|
Packit |
8b6d7a |
**/
|
|
Packit |
8b6d7a |
typedef gboolean (*AtspiDeviceListenerSimpleCB) (const AtspiDeviceEvent *stroke);
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
#define ATSPI_TYPE_DEVICE_LISTENER (atspi_device_listener_get_type ())
|
|
Packit |
8b6d7a |
#define ATSPI_DEVICE_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_DEVICE_LISTENER, AtspiDeviceListener))
|
|
Packit |
8b6d7a |
#define ATSPI_DEVICE_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATSPI_TYPE_DEVICE_LISTENER, AtspiDeviceListenerClass))
|
|
Packit |
8b6d7a |
#define ATSPI_IS_DEVICE_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_DEVICE_LISTENER))
|
|
Packit |
8b6d7a |
#define ATSPI_IS_DEVICE_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATSPI_TYPE_DEVICE_LISTENER))
|
|
Packit |
8b6d7a |
#define ATSPI_DEVICE_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATSPI_TYPE_DEVICE_LISTENER, AtspiDeviceListenerClass))
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
typedef struct _AtspiDeviceListener AtspiDeviceListener;
|
|
Packit |
8b6d7a |
struct _AtspiDeviceListener
|
|
Packit |
8b6d7a |
{
|
|
Packit |
8b6d7a |
GObject parent;
|
|
Packit |
8b6d7a |
guint id;
|
|
Packit |
8b6d7a |
GList *callbacks;
|
|
Packit |
8b6d7a |
};
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
typedef struct _AtspiDeviceListenerClass AtspiDeviceListenerClass;
|
|
Packit |
8b6d7a |
struct _AtspiDeviceListenerClass
|
|
Packit |
8b6d7a |
{
|
|
Packit |
8b6d7a |
GObjectClass parent_class;
|
|
Packit |
8b6d7a |
gboolean (*device_event) (AtspiDeviceListener *listener, const AtspiDeviceEvent *event);
|
|
Packit |
8b6d7a |
};
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
GType atspi_device_listener_get_type (void);
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
AtspiDeviceListener *atspi_device_listener_new (AtspiDeviceListenerCB callback, void *user_data, GDestroyNotify callback_destroyed);
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
AtspiDeviceListener *atspi_device_listener_new_simple (AtspiDeviceListenerSimpleCB callback, GDestroyNotify callback_destroyed);
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
void atspi_device_listener_add_callback (AtspiDeviceListener *listener, AtspiDeviceListenerCB callback, GDestroyNotify callback_destroyed, void *user_data);
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
void atspi_device_listener_remove_callback (AtspiDeviceListener *listener, AtspiDeviceListenerCB callback);
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
G_END_DECLS
|
|
Packit |
8b6d7a |
|
|
Packit |
8b6d7a |
#endif /* _ATSPI_DEVICE_LISTENER_H_ */
|