98a5cb37d9
With the introduction of the input thread, we want to avoid modifying ClutterInputDevices from the main thread, since they're owned and updated by the thread. There's one part of ClutterInputDevice that's still modified from the main thread though, that is device-actors of pointer devices, and we're going to move that state-tracking into ClutterStage instead. So start that by adding the infrastructure to ClutterStage to keep track of those things. It consists of two hashtables which associate devices and touch sequences with actors, those hashtables get updated using clutter_stage_update_device_entry() and clutter_stage_remove_device_entry(), they can be queried by calling clutter_stage_get_device_actor(), which will replace clutter_input_device_get_actor(). clutter_stage_get_device_coords() is added and made available in clutter-mutter.h because we need to get the coordinates when repicking in meta_wayland_pointer_repick(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1633>
87 lines
2.9 KiB
C
87 lines
2.9 KiB
C
/*
|
|
* Clutter.
|
|
*
|
|
* An OpenGL based 'interactive canvas' library.
|
|
*
|
|
* Copyright (C) 2016 Red Hat Inc.
|
|
*
|
|
* 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/>.
|
|
*
|
|
*/
|
|
|
|
#ifndef __CLUTTER_MUTTER_H__
|
|
#define __CLUTTER_MUTTER_H__
|
|
|
|
#define __CLUTTER_H_INSIDE__
|
|
|
|
#include "clutter-backend.h"
|
|
#include "clutter-event-private.h"
|
|
#include "clutter-input-device-private.h"
|
|
#include "clutter-input-pointer-a11y-private.h"
|
|
#include "clutter-macros.h"
|
|
#include "clutter-private.h"
|
|
#include "clutter-stage-private.h"
|
|
#include "clutter-stage-view.h"
|
|
#include "cogl/clutter-stage-cogl.h"
|
|
#include "clutter/x11/clutter-backend-x11.h"
|
|
|
|
CLUTTER_EXPORT
|
|
GList * clutter_stage_peek_stage_views (ClutterStage *stage);
|
|
|
|
CLUTTER_EXPORT
|
|
gboolean clutter_actor_is_effectively_on_stage_view (ClutterActor *self,
|
|
ClutterStageView *view);
|
|
|
|
CLUTTER_EXPORT
|
|
void clutter_set_custom_backend_func (ClutterBackend *(* func) (void));
|
|
|
|
CLUTTER_EXPORT
|
|
int64_t clutter_stage_get_frame_counter (ClutterStage *stage);
|
|
|
|
CLUTTER_EXPORT
|
|
void clutter_stage_capture_into (ClutterStage *stage,
|
|
gboolean paint,
|
|
cairo_rectangle_int_t *rect,
|
|
uint8_t *data);
|
|
|
|
CLUTTER_EXPORT
|
|
void clutter_stage_clear_stage_views (ClutterStage *stage);
|
|
|
|
CLUTTER_EXPORT
|
|
void clutter_stage_view_assign_next_scanout (ClutterStageView *stage_view,
|
|
CoglScanout *scanout);
|
|
|
|
CLUTTER_EXPORT
|
|
gboolean clutter_actor_has_damage (ClutterActor *actor);
|
|
|
|
CLUTTER_EXPORT
|
|
gboolean clutter_actor_has_transitions (ClutterActor *actor);
|
|
|
|
CLUTTER_EXPORT
|
|
ClutterFrameClock * clutter_actor_pick_frame_clock (ClutterActor *self,
|
|
ClutterActor **out_actor);
|
|
CLUTTER_EXPORT
|
|
gboolean clutter_seat_handle_event_post (ClutterSeat *seat,
|
|
const ClutterEvent *event);
|
|
|
|
CLUTTER_EXPORT
|
|
void clutter_stage_get_device_coords (ClutterStage *stage,
|
|
ClutterInputDevice *device,
|
|
ClutterEventSequence *sequence,
|
|
graphene_point_t *coords);
|
|
|
|
#undef __CLUTTER_H_INSIDE__
|
|
|
|
#endif /* __CLUTTER_MUTTER_H__ */
|