36 G_DEFINE_TYPE(FlKeyboardPendingEvent, fl_keyboard_pending_event, G_TYPE_OBJECT)
39 FlKeyboardPendingEvent*
self = FL_KEYBOARD_PENDING_EVENT(
object);
41 g_clear_object(&self->event);
43 G_OBJECT_CLASS(fl_keyboard_pending_event_parent_class)->dispose(
object);
47 FlKeyboardPendingEventClass* klass) {
58 FlKeyboardPendingEvent*
self = FL_KEYBOARD_PENDING_EVENT(
59 g_object_new(fl_keyboard_pending_event_get_type(),
nullptr));
61 self->event = FL_KEY_EVENT(g_object_ref(
event));
62 self->sequence_id = sequence_id;
63 self->unreplied = to_reply;
64 self->any_handled =
false;
71 g_return_val_if_fail(FL_IS_KEYBOARD_PENDING_EVENT(
self),
nullptr);
76 FlKeyboardPendingEvent*
self) {
77 g_return_val_if_fail(FL_IS_KEYBOARD_PENDING_EVENT(
self), 0);
78 return self->sequence_id;
82 g_return_val_if_fail(FL_IS_KEYBOARD_PENDING_EVENT(
self), 0);
88 g_return_if_fail(FL_IS_KEYBOARD_PENDING_EVENT(
self));
89 g_return_if_fail(self->unreplied > 0);
92 self->any_handled =
TRUE;
97 FlKeyboardPendingEvent*
self) {
98 g_return_val_if_fail(FL_IS_KEYBOARD_PENDING_EVENT(
self), FALSE);
99 return self->any_handled;
103 g_return_val_if_fail(FL_IS_KEYBOARD_PENDING_EVENT(
self), FALSE);
104 return self->unreplied == 0;