2010-10-21 12:13:00 +00:00
|
|
|
/*
|
|
|
|
* Clutter.
|
|
|
|
*
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Intel Corporation.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Author:
|
|
|
|
* Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
*/
|
|
|
|
|
2010-10-21 09:54:14 +00:00
|
|
|
#ifndef __CLUTTER_DEVICE_MANAGER_PRIVATE_H__
|
|
|
|
#define __CLUTTER_DEVICE_MANAGER_PRIVATE_H__
|
|
|
|
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
#include <clutter/clutter-backend.h>
|
2010-10-21 09:54:14 +00:00
|
|
|
#include <clutter/clutter-device-manager.h>
|
2010-11-04 14:38:32 +00:00
|
|
|
#include <clutter/clutter-event.h>
|
2010-10-21 09:54:14 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
typedef struct _ClutterAxisInfo
|
|
|
|
{
|
|
|
|
ClutterInputAxis axis;
|
|
|
|
|
|
|
|
gdouble min_axis;
|
|
|
|
gdouble max_axis;
|
|
|
|
|
|
|
|
gdouble min_value;
|
|
|
|
gdouble max_value;
|
|
|
|
|
|
|
|
gdouble resolution;
|
|
|
|
} ClutterAxisInfo;
|
|
|
|
|
|
|
|
typedef struct _ClutterKeyInfo
|
|
|
|
{
|
|
|
|
guint keyval;
|
|
|
|
ClutterModifierType modifiers;
|
|
|
|
} ClutterKeyInfo;
|
|
|
|
|
2012-03-19 12:16:53 +00:00
|
|
|
typedef struct _ClutterScrollInfo
|
|
|
|
{
|
|
|
|
guint axis_id;
|
|
|
|
ClutterScrollDirection direction;
|
|
|
|
gdouble increment;
|
|
|
|
|
|
|
|
gdouble last_value;
|
|
|
|
guint last_value_valid : 1;
|
|
|
|
} ClutterScrollInfo;
|
|
|
|
|
2012-07-11 15:21:28 +00:00
|
|
|
typedef struct _ClutterTouchInfo
|
|
|
|
{
|
|
|
|
ClutterEventSequence *sequence;
|
|
|
|
ClutterActor *actor;
|
|
|
|
|
2014-09-14 11:58:11 +00:00
|
|
|
gfloat current_x;
|
|
|
|
gfloat current_y;
|
2012-07-11 15:21:28 +00:00
|
|
|
} ClutterTouchInfo;
|
|
|
|
|
2010-10-21 09:54:14 +00:00
|
|
|
struct _ClutterInputDevice
|
|
|
|
{
|
|
|
|
GObject parent_instance;
|
|
|
|
|
|
|
|
gint id;
|
|
|
|
|
|
|
|
ClutterInputDeviceType device_type;
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
ClutterInputMode device_mode;
|
2010-10-21 09:54:14 +00:00
|
|
|
|
|
|
|
gchar *device_name;
|
|
|
|
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
ClutterDeviceManager *device_manager;
|
|
|
|
|
|
|
|
ClutterBackend *backend;
|
|
|
|
|
|
|
|
/* the associated device */
|
|
|
|
ClutterInputDevice *associated;
|
|
|
|
|
|
|
|
GList *slaves;
|
|
|
|
|
2010-10-21 09:54:14 +00:00
|
|
|
/* the actor underneath the pointer */
|
|
|
|
ClutterActor *cursor_actor;
|
2012-07-11 15:21:28 +00:00
|
|
|
GHashTable *inv_touch_sequence_actors;
|
2010-10-21 09:54:14 +00:00
|
|
|
|
|
|
|
/* the actor that has a grab in place for the device */
|
|
|
|
ClutterActor *pointer_grab_actor;
|
2011-10-10 15:45:20 +00:00
|
|
|
ClutterActor *keyboard_grab_actor;
|
2012-06-16 23:44:44 +00:00
|
|
|
GHashTable *sequence_grab_actors;
|
|
|
|
GHashTable *inv_sequence_grab_actors;
|
2010-10-21 09:54:14 +00:00
|
|
|
|
|
|
|
/* the current click count */
|
|
|
|
gint click_count;
|
|
|
|
|
|
|
|
/* the stage the device is on */
|
|
|
|
ClutterStage *stage;
|
|
|
|
|
|
|
|
/* the current state */
|
2014-09-14 11:58:11 +00:00
|
|
|
gfloat current_x;
|
|
|
|
gfloat current_y;
|
2010-10-21 09:54:14 +00:00
|
|
|
guint32 current_time;
|
|
|
|
gint current_button_number;
|
|
|
|
ClutterModifierType current_state;
|
|
|
|
|
2012-07-11 15:21:28 +00:00
|
|
|
/* the current touch points states */
|
|
|
|
GHashTable *touch_sequences_info;
|
|
|
|
|
2010-10-21 09:54:14 +00:00
|
|
|
/* the previous state, used for click count generation */
|
|
|
|
gint previous_x;
|
|
|
|
gint previous_y;
|
|
|
|
guint32 previous_time;
|
|
|
|
gint previous_button_number;
|
|
|
|
ClutterModifierType previous_state;
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
|
|
|
|
GArray *axes;
|
|
|
|
|
|
|
|
guint n_keys;
|
|
|
|
GArray *keys;
|
|
|
|
|
2012-03-19 12:16:53 +00:00
|
|
|
GArray *scroll_info;
|
|
|
|
|
2014-11-25 20:09:32 +00:00
|
|
|
gchar *vendor_id;
|
|
|
|
gchar *product_id;
|
|
|
|
|
2011-01-19 16:23:45 +00:00
|
|
|
guint has_cursor : 1;
|
|
|
|
guint is_enabled : 1;
|
2010-10-21 09:54:14 +00:00
|
|
|
};
|
|
|
|
|
2011-01-17 16:56:07 +00:00
|
|
|
struct _ClutterInputDeviceClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2011-01-17 17:01:58 +00:00
|
|
|
|
2012-01-17 15:40:08 +00:00
|
|
|
gboolean (* keycode_to_evdev) (ClutterInputDevice *device,
|
|
|
|
guint hardware_keycode,
|
|
|
|
guint *evdev_keycode);
|
2011-01-17 16:56:07 +00:00
|
|
|
};
|
|
|
|
|
2010-10-21 09:54:14 +00:00
|
|
|
/* device manager */
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
void _clutter_device_manager_add_device (ClutterDeviceManager *device_manager,
|
|
|
|
ClutterInputDevice *device);
|
|
|
|
void _clutter_device_manager_remove_device (ClutterDeviceManager *device_manager,
|
|
|
|
ClutterInputDevice *device);
|
|
|
|
void _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager);
|
|
|
|
void _clutter_device_manager_select_stage_events (ClutterDeviceManager *device_manager,
|
2013-07-10 20:34:48 +00:00
|
|
|
ClutterStage *stage);
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
ClutterBackend *_clutter_device_manager_get_backend (ClutterDeviceManager *device_manager);
|
2010-10-21 09:54:14 +00:00
|
|
|
|
|
|
|
/* input device */
|
2012-07-11 15:21:28 +00:00
|
|
|
gboolean _clutter_input_device_has_sequence (ClutterInputDevice *device,
|
|
|
|
ClutterEventSequence *sequence);
|
2012-08-21 14:26:30 +00:00
|
|
|
void _clutter_input_device_add_event_sequence (ClutterInputDevice *device,
|
|
|
|
ClutterEvent *event);
|
|
|
|
void _clutter_input_device_remove_event_sequence (ClutterInputDevice *device,
|
|
|
|
ClutterEvent *event);
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
void _clutter_input_device_set_coords (ClutterInputDevice *device,
|
2012-07-11 15:21:28 +00:00
|
|
|
ClutterEventSequence *sequence,
|
2014-09-14 11:58:11 +00:00
|
|
|
gfloat x,
|
|
|
|
gfloat y,
|
2012-08-21 14:26:30 +00:00
|
|
|
ClutterStage *stage);
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
void _clutter_input_device_set_state (ClutterInputDevice *device,
|
|
|
|
ClutterModifierType state);
|
|
|
|
void _clutter_input_device_set_time (ClutterInputDevice *device,
|
|
|
|
guint32 time_);
|
|
|
|
void _clutter_input_device_set_stage (ClutterInputDevice *device,
|
|
|
|
ClutterStage *stage);
|
2011-12-05 13:49:28 +00:00
|
|
|
ClutterStage * _clutter_input_device_get_stage (ClutterInputDevice *device);
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
void _clutter_input_device_set_actor (ClutterInputDevice *device,
|
2012-07-11 15:21:28 +00:00
|
|
|
ClutterEventSequence *sequence,
|
2011-01-27 17:26:16 +00:00
|
|
|
ClutterActor *actor,
|
|
|
|
gboolean emit_crossing);
|
|
|
|
ClutterActor * _clutter_input_device_update (ClutterInputDevice *device,
|
2012-07-11 15:21:28 +00:00
|
|
|
ClutterEventSequence *sequence,
|
2011-01-27 17:26:16 +00:00
|
|
|
gboolean emit_crossing);
|
2011-01-21 10:24:34 +00:00
|
|
|
void _clutter_input_device_set_n_keys (ClutterInputDevice *device,
|
|
|
|
guint n_keys);
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
guint _clutter_input_device_add_axis (ClutterInputDevice *device,
|
|
|
|
ClutterInputAxis axis,
|
|
|
|
gdouble min_value,
|
|
|
|
gdouble max_value,
|
|
|
|
gdouble resolution);
|
|
|
|
void _clutter_input_device_reset_axes (ClutterInputDevice *device);
|
|
|
|
|
|
|
|
void _clutter_input_device_set_associated_device (ClutterInputDevice *device,
|
|
|
|
ClutterInputDevice *associated);
|
|
|
|
void _clutter_input_device_add_slave (ClutterInputDevice *master,
|
|
|
|
ClutterInputDevice *slave);
|
|
|
|
void _clutter_input_device_remove_slave (ClutterInputDevice *master,
|
|
|
|
ClutterInputDevice *slave);
|
|
|
|
|
|
|
|
gboolean _clutter_input_device_translate_axis (ClutterInputDevice *device,
|
|
|
|
guint index_,
|
2011-01-19 13:53:20 +00:00
|
|
|
gdouble value,
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
gdouble *axis_value);
|
2010-10-21 09:54:14 +00:00
|
|
|
|
2012-03-19 12:16:53 +00:00
|
|
|
void _clutter_input_device_add_scroll_info (ClutterInputDevice *device,
|
|
|
|
guint index_,
|
|
|
|
ClutterScrollDirection direction,
|
|
|
|
gdouble increment);
|
|
|
|
void _clutter_input_device_reset_scroll_info (ClutterInputDevice *device);
|
|
|
|
gboolean _clutter_input_device_get_scroll_delta (ClutterInputDevice *device,
|
|
|
|
guint index_,
|
|
|
|
gdouble value,
|
|
|
|
ClutterScrollDirection *direction_p,
|
|
|
|
gdouble *delta_p);
|
|
|
|
|
2010-10-21 09:54:14 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __CLUTTER_DEVICE_MANAGER_PRIVATE_H__ */
|