#include "flutter/shell/platform/linux/fl_pointer_manager.h"#include "flutter/shell/platform/linux/fl_engine_private.h"Go to the source code of this file.
Classes | |
| struct | _FlPointerManager |
Functions | |
| G_DEFINE_TYPE (FlPointerManager, fl_pointer_manager, G_TYPE_OBJECT) | |
| static gboolean | get_mouse_button (guint gdk_button, int64_t *button) |
| static gboolean | get_button (FlutterPointerDeviceKind device_kind, guint gdk_button, int64_t *button) |
| static gboolean | has_buttons_pressed (guint gdk_state) |
| static void | record_pointer_state (FlPointerManager *self, FlutterPointerDeviceKind device_kind, gdouble x, gdouble y, gdouble rotation, gdouble pressure) |
| static void | ensure_pointer_added (FlPointerManager *self, guint event_time, FlutterPointerDeviceKind device_kind, gdouble x, gdouble y, gdouble rotation, gdouble pressure) |
| static void | fl_pointer_manager_dispose (GObject *object) |
| static void | fl_pointer_manager_class_init (FlPointerManagerClass *klass) |
| static void | fl_pointer_manager_init (FlPointerManager *self) |
| FlPointerManager * | fl_pointer_manager_new (FlutterViewId view_id, FlEngine *engine) |
| gboolean | fl_pointer_manager_handle_button_press (FlPointerManager *self, guint event_time, FlutterPointerDeviceKind device_kind, gdouble x, gdouble y, guint gdk_button, gdouble rotation, gdouble pressure) |
| gboolean | fl_pointer_manager_handle_button_release (FlPointerManager *self, guint event_time, FlutterPointerDeviceKind device_kind, gdouble x, gdouble y, guint gdk_button, gdouble rotation, gdouble pressure) |
| gboolean | fl_pointer_manager_handle_motion (FlPointerManager *self, guint event_time, FlutterPointerDeviceKind device_kind, gdouble x, gdouble y, gdouble rotation, gdouble pressure) |
| gboolean | fl_pointer_manager_handle_enter (FlPointerManager *self, guint event_time, FlutterPointerDeviceKind device_kind, gdouble x, gdouble y, guint gdk_state, gdouble rotation, gdouble pressure) |
| gboolean | fl_pointer_manager_handle_leave (FlPointerManager *self, guint event_time, FlutterPointerDeviceKind device_kind, gdouble x, gdouble y, gdouble rotation, gdouble pressure) |
| gboolean | fl_pointer_manager_cancel_input (FlPointerManager *self, guint event_time) |
Variables | |
| static constexpr int | kMicrosecondsPerMillisecond = 1000 |
| static constexpr guint | kMouseButtonBack = 8 |
| static constexpr guint | kMouseButtonForward = 9 |
|
static |
Definition at line 118 of file fl_pointer_manager.cc.
References fl_engine_send_mouse_pointer_event(), g_autoptr(), kMicrosecondsPerMillisecond, record_pointer_state(), and TRUE.
Referenced by fl_pointer_manager_handle_button_press(), fl_pointer_manager_handle_enter(), and fl_pointer_manager_handle_motion().
| gboolean fl_pointer_manager_cancel_input | ( | FlPointerManager * | manager, |
| guint | event_time | ||
| ) |
fl_pointer_manager_cancel_input: @manager: an #FlPointerManager. @event_time: time event occurred in milliseconds.
Handle the release of any buttons Flutter believes are pressed never being delivered, e.g. because the window system took the pointer to move or resize the window. Those buttons are cancelled.
Returns: TRUE if the event was handled.
Definition at line 345 of file fl_pointer_manager.cc.
References fl_engine_send_mouse_pointer_event(), g_autoptr(), kMicrosecondsPerMillisecond, and TRUE.
Referenced by cancel_input(), fl_pointer_manager_handle_button_press(), fl_pointer_manager_handle_enter(), and TEST_F().
|
static |
Definition at line 153 of file fl_pointer_manager.cc.
References fl_pointer_manager_dispose().
|
static |
Definition at line 145 of file fl_pointer_manager.cc.
Referenced by fl_pointer_manager_class_init().
| gboolean fl_pointer_manager_handle_button_press | ( | FlPointerManager * | manager, |
| guint | event_time, | ||
| FlutterPointerDeviceKind | device_kind, | ||
| gdouble | x, | ||
| gdouble | y, | ||
| guint | gdk_button, | ||
| gdouble | rotation, | ||
| gdouble | pressure | ||
| ) |
fl_pointer_manager_handle_button_press: @manager: an #FlPointerManager. @event_time: event time in milliseconds. @device_kind: kind of device generating the event. @x: x co-ordinate of event. @y: y co-ordinate of event. @gdk_button: button being pressed. @rotation: rotation of the pointer device in degrees. @pressure: pressure of the pointer device.
Returns TRUE if this event was handled.
Definition at line 172 of file fl_pointer_manager.cc.
References ensure_pointer_added(), fl_engine_send_mouse_pointer_event(), fl_pointer_manager_cancel_input(), g_autoptr(), get_button(), kMicrosecondsPerMillisecond, and TRUE.
Referenced by button_press_event_cb(), and TEST_F().
| gboolean fl_pointer_manager_handle_button_release | ( | FlPointerManager * | manager, |
| guint | event_time, | ||
| FlutterPointerDeviceKind | device_kind, | ||
| gdouble | x, | ||
| gdouble | y, | ||
| guint | gdk_button, | ||
| gdouble | rotation, | ||
| gdouble | pressure | ||
| ) |
fl_pointer_manager_handle_button_release: @manager: an #FlPointerManager. @event_time: event time in milliseconds. @device_kind: kind of device generating the event. @x: x co-ordinate of event. @y: y co-ordinate of event. @gdk_button: button being released. @rotation: rotation of the pointer device in degrees. @pressure: pressure of the pointer device.
Returns TRUE if this event was handled.
Definition at line 216 of file fl_pointer_manager.cc.
References fl_engine_send_mouse_pointer_event(), g_autoptr(), get_button(), kMicrosecondsPerMillisecond, record_pointer_state(), and TRUE.
Referenced by button_release_event_cb(), and TEST_F().
| gboolean fl_pointer_manager_handle_enter | ( | FlPointerManager * | manager, |
| guint | event_time, | ||
| FlutterPointerDeviceKind | device_kind, | ||
| gdouble | x, | ||
| gdouble | y, | ||
| guint | gdk_state, | ||
| gdouble | rotation, | ||
| gdouble | pressure | ||
| ) |
fl_pointer_manager_handle_enter: @manager: an #FlPointerManager. @event_time: event time in milliseconds. @device_kind: kind of device generating the event. @x: x co-ordinate of event. @y: y co-ordinate of event. @gdk_state: GDK state of buttons and modifiers when the event occurred. @rotation: rotation of the pointer device in degrees. @pressure: pressure of the pointer device.
Returns TRUE if this event was handled.
Definition at line 280 of file fl_pointer_manager.cc.
References ensure_pointer_added(), fl_pointer_manager_cancel_input(), g_autoptr(), has_buttons_pressed(), and TRUE.
Referenced by enter_notify_event_cb(), and TEST_F().
| gboolean fl_pointer_manager_handle_leave | ( | FlPointerManager * | manager, |
| guint | event_time, | ||
| FlutterPointerDeviceKind | device_kind, | ||
| gdouble | x, | ||
| gdouble | y, | ||
| gdouble | rotation, | ||
| gdouble | pressure | ||
| ) |
fl_pointer_manager_handle_leave: @manager: an #FlPointerManager. @event_time: event time in milliseconds. @device_kind: kind of device generating the event. @x: x co-ordinate of event. @y: y co-ordinate of event. @rotation: rotation of the pointer device in degrees. @pressure: pressure of the pointer device.
Returns TRUE if this event was handled.
Definition at line 307 of file fl_pointer_manager.cc.
References fl_engine_send_mouse_pointer_event(), g_autoptr(), kMicrosecondsPerMillisecond, record_pointer_state(), and TRUE.
Referenced by leave_notify_event_cb(), and TEST_F().
| gboolean fl_pointer_manager_handle_motion | ( | FlPointerManager * | manager, |
| guint | event_time, | ||
| FlutterPointerDeviceKind | device_kind, | ||
| gdouble | x, | ||
| gdouble | y, | ||
| gdouble | rotation, | ||
| gdouble | pressure | ||
| ) |
fl_pointer_manager_handle_motion: @manager: an #FlPointerManager. @event_time: event time in milliseconds. @device_kind: kind of device generating the event. @x: x co-ordinate of event. @y: y co-ordinate of event. @rotation: rotation of the pointer device in degrees. @pressure: pressure of the pointer device.
Returns TRUE if this event was handled.
Definition at line 256 of file fl_pointer_manager.cc.
References ensure_pointer_added(), fl_engine_send_mouse_pointer_event(), g_autoptr(), kMicrosecondsPerMillisecond, and TRUE.
Referenced by motion_notify_event_cb(), and TEST_F().
|
static |
Definition at line 157 of file fl_pointer_manager.cc.
| FlPointerManager* fl_pointer_manager_new | ( | FlutterViewId | view_id, |
| FlEngine * | engine | ||
| ) |
fl_pointer_manager_new: @view_id: view ID to report events for. @engine: an #FlEngine.
Create a new #FlPointerManager.
Returns: a new #FlPointerManager.
Definition at line 161 of file fl_pointer_manager.cc.
References view_id.
Referenced by setup_engine(), and TEST_F().
| G_DEFINE_TYPE | ( | FlPointerManager | , |
| fl_pointer_manager | , | ||
| G_TYPE_OBJECT | |||
| ) |
|
static |
Definition at line 70 of file fl_pointer_manager.cc.
References get_mouse_button(), and TRUE.
Referenced by fl_pointer_manager_handle_button_press(), and fl_pointer_manager_handle_button_release().
|
static |
Definition at line 48 of file fl_pointer_manager.cc.
References kMouseButtonBack, kMouseButtonForward, and TRUE.
Referenced by get_button().
|
static |
Definition at line 97 of file fl_pointer_manager.cc.
Referenced by fl_pointer_manager_handle_enter().
|
static |
Definition at line 104 of file fl_pointer_manager.cc.
Referenced by ensure_pointer_added(), fl_pointer_manager_handle_button_release(), and fl_pointer_manager_handle_leave().
|
staticconstexpr |
Definition at line 9 of file fl_pointer_manager.cc.
Referenced by ensure_pointer_added(), fl_pointer_manager_cancel_input(), fl_pointer_manager_handle_button_press(), fl_pointer_manager_handle_button_release(), fl_pointer_manager_handle_leave(), and fl_pointer_manager_handle_motion().
|
staticconstexpr |
Definition at line 42 of file fl_pointer_manager.cc.
Referenced by get_mouse_button().
|
staticconstexpr |
Definition at line 45 of file fl_pointer_manager.cc.
Referenced by get_mouse_button().