#include "flutter/shell/platform/linux/fl_touch_manager.h"#include "flutter/shell/platform/linux/fl_engine_private.h"Go to the source code of this file.
Classes | |
| struct | FlTouchPoint |
| struct | _FlTouchManager |
Functions | |
| G_DEFINE_TYPE (FlTouchManager, fl_touch_manager, G_TYPE_OBJECT) | |
| static void | fl_touch_manager_dispose (GObject *object) |
| static void | fl_touch_manager_class_init (FlTouchManagerClass *klass) |
| static void | fl_touch_manager_init (FlTouchManager *self) |
| FlTouchManager * | fl_touch_manager_new (FlEngine *engine, FlutterViewId view_id) |
| static void | ensure_touch_added (_FlTouchManager *self, guint event_time, gdouble x, gdouble y, uint32_t number, int32_t touch_id, int32_t device_id) |
| static uint32_t | get_generated_id (_FlTouchManager *self, uint32_t number) |
| static void | release_number (_FlTouchManager *self, uint32_t number) |
| static void | remove_touch_point (_FlTouchManager *self, uint32_t number, uint32_t touch_id) |
| void | fl_touch_manager_handle_touch_event (FlTouchManager *self, GdkEventTouch *touch_event, gint scale_factor) |
| void | fl_touch_manager_cancel_input (FlTouchManager *self, guint event_time) |
Variables | |
| static constexpr int | kMicrosecondsPerMillisecond = 1000 |
| static const int | kMinTouchDeviceId = 0 |
| static const int | kMaxTouchDeviceId = 128 |
|
static |
Definition at line 81 of file fl_touch_manager.cc.
References fl_engine_send_touch_add_event(), g_autoptr(), kMicrosecondsPerMillisecond, FlTouchPoint::number, FlTouchPoint::x, and FlTouchPoint::y.
Referenced by fl_touch_manager_handle_touch_event().
| void fl_touch_manager_cancel_input | ( | FlTouchManager * | manager, |
| guint | event_time | ||
| ) |
fl_touch_manager_cancel_input: @manager: an #FlTouchManager. @event_time: time event occurred in milliseconds.
Handle touch events no longer being delivered to this view, e.g. because the window system took the touch to move or resize the window, or the view was hidden. Any touch points in contact with the screen are cancelled, as their end events will never arrive.
Definition at line 233 of file fl_touch_manager.cc.
References fl_engine_send_touch_cancel_event(), fl_engine_send_touch_remove_event(), g_autoptr(), kMicrosecondsPerMillisecond, FlTouchPoint::number, release_number(), value, FlTouchPoint::x, and FlTouchPoint::y.
Referenced by cancel_input(), and TEST_F().
|
static |
Definition at line 53 of file fl_touch_manager.cc.
References fl_touch_manager_dispose().
|
static |
| void fl_touch_manager_handle_touch_event | ( | FlTouchManager * | manager, |
| GdkEventTouch * | event, | ||
| gint | scale_factor | ||
| ) |
fl_touch_manager_handle_touch_event: @manager: an #FlTouchManager. @event: the touch event. @scale_factor: the GTK scaling factor of the window.
Definition at line 161 of file fl_touch_manager.cc.
References ensure_touch_added(), fl_engine_send_touch_cancel_event(), fl_engine_send_touch_down_event(), fl_engine_send_touch_move_event(), fl_engine_send_touch_remove_event(), fl_engine_send_touch_up_event(), g_autoptr(), get_generated_id(), kMicrosecondsPerMillisecond, and remove_touch_point().
Referenced by TEST_F(), and touch_event_cb().
|
static |
Definition at line 57 of file fl_touch_manager.cc.
| FlTouchManager* fl_touch_manager_new | ( | FlEngine * | engine, |
| FlutterViewId | view_id | ||
| ) |
fl_touch_manager_new: @engine: an #FlEngine. @view_id: the view being managed.
Create a new #FlTouchManager.
Returns: a new #FlTouchManager.
Definition at line 59 of file fl_touch_manager.cc.
References kMinTouchDeviceId, and view_id.
Referenced by init_touch(), and TEST_F().
| G_DEFINE_TYPE | ( | FlTouchManager | , |
| fl_touch_manager | , | ||
| G_TYPE_OBJECT | |||
| ) |
|
static |
Definition at line 115 of file fl_touch_manager.cc.
References g_autoptr(), id, kMaxTouchDeviceId, kMinTouchDeviceId, and value.
Referenced by fl_touch_manager_handle_touch_event().
|
static |
Definition at line 143 of file fl_touch_manager.cc.
Referenced by fl_touch_manager_cancel_input(), and remove_touch_point().
|
static |
Definition at line 154 of file fl_touch_manager.cc.
References release_number().
Referenced by fl_touch_manager_handle_touch_event().
|
static |
Definition at line 10 of file fl_touch_manager.cc.
Referenced by get_generated_id().
|
staticconstexpr |
Definition at line 8 of file fl_touch_manager.cc.
Referenced by ensure_touch_added(), fl_touch_manager_cancel_input(), and fl_touch_manager_handle_touch_event().
|
static |
Definition at line 9 of file fl_touch_manager.cc.
Referenced by fl_touch_manager_new(), and get_generated_id().