gtkmm
3.91.0
|
Generated when a pointer or keyboard grab is broken. More...
#include <gdkmm/event.h>
Public Member Functions | |
EventGrabBroken () | |
Creates an invalid event object. More... | |
EventGrabBroken (GdkEventGrabBroken* gobject, bool make_a_copy=false) | |
Wraps a C event instance. More... | |
void | swap (EventGrabBroken& other) noexcept |
GdkEventGrabBroken* | gobj () |
Provides access to the underlying C instance. More... | |
const GdkEventGrabBroken* | gobj () const |
Provides access to the underlying C instance. More... | |
GdkEventGrabBroken* | gobj_copy () const |
Provides access to the underlying C instance. More... | |
bool | is_keyboard () const |
true if a keyboard grab was broken, false if a pointer grab was broken More... | |
bool | is_implicit () const |
true if the broken grab was implicit. More... | |
bool | has_grab_window () const |
Checks whether this event was caused by another grab in the same application. More... | |
Glib::RefPtr< Gdk::Window > | get_grab_window () |
Returns the new grab window. More... | |
Glib::RefPtr< const Gdk::Window > | get_grab_window () const |
![]() | |
Event () | |
Creates an invalid event object. More... | |
Event (GdkEvent* gobject, bool make_a_copy=false) | |
Wraps a C event instance. More... | |
Event (const Event& other) | |
Event& | operator= (const Event& other) |
Event (Event&& other) noexcept | |
Event& | operator= (Event&& other) noexcept |
~Event () noexcept | |
void | swap (Event& other) noexcept |
GdkEvent* | gobj () |
Provides access to the underlying C instance. More... | |
const GdkEvent* | gobj () const |
Provides access to the underlying C instance. More... | |
GdkEvent* | gobj_copy () const |
Provides access to the underlying C instance. More... | |
Event::Type | get_event_type () const |
Retrieves the type of the event. More... | |
Glib::RefPtr< Gdk::Window > | get_window () |
Returns the window which received the event. More... | |
Glib::RefPtr< const Gdk::Window > | get_window () const |
bool | is_send_event () const |
Returns true if the event was sent explicitly (e.g. More... | |
Glib::RefPtr< Screen > | get_screen () |
Returns the screen for the event. More... | |
Glib::RefPtr< const Screen > | get_screen () const |
Returns the screen for the event. More... | |
Glib::RefPtr< Seat > | get_seat () |
Returns the Gdk::Seat this event was generated for. More... | |
Glib::RefPtr< const Seat > | get_seat () const |
Returns the Gdk::Seat this event was generated for. More... | |
void | put () |
Appends a copy of the given event onto the front of the event queue for event->any.window’s display, or the default event queue if event->any.window is nullptr . More... | |
Related Functions | |
(Note that these are not member functions.) | |
void | swap (EventGrabBroken& lhs, EventGrabBroken& rhs) noexcept |
const EventGrabBroken& | wrap_event (const GdkEventGrabBroken*& event) |
Wraps a C event instance without making unnecessary copy when the ownership can not be acquired. More... | |
EventGrabBroken& | wrap_event (GdkEventGrabBroken*& event) |
See wrap_event(const GdkEventGrabBroken*& event). More... | |
Gdk::EventGrabBroken | wrap (GdkEventGrabBroken* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
![]() | |
void | swap (Event& lhs, Event& rhs) noexcept |
const Event& | wrap_event (const GdkEvent*& event) |
Wraps a C event instance without making unnecessary copy when the ownership can not be acquired. More... | |
Event& | wrap_event (GdkEvent*& event) |
See wrap_event(const GdkEvent*& event). More... | |
Gdk::Event | wrap (GdkEvent* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Generated when a pointer or keyboard grab is broken.
On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again. Note that implicit grabs (which are initiated by button presses) can also cause Gdk::EventGrabBroken events.
get_event_type() will return Gdk::Event::Type::GRAB_BROKEN.
Gdk::EventGrabBroken::EventGrabBroken | ( | ) |
Creates an invalid event object.
Calling any member functions is undefined behavior.
|
explicit |
Wraps a C event instance.
This constructor either acquires ownership of gobject, or copies it.
gobject | Event to wrap. |
make_a_copy | If false , the ownership of gobject is acquired, otherwise, a copy is made. |
Glib::RefPtr<Gdk::Window> Gdk::EventGrabBroken::get_grab_window | ( | ) |
Returns the new grab window.
The results are undefined if has_grab_window() would return false
before the call.
Glib::RefPtr<const Gdk::Window> Gdk::EventGrabBroken::get_grab_window | ( | ) | const |
|
inline |
Provides access to the underlying C instance.
|
inline |
Provides access to the underlying C instance.
GdkEventGrabBroken* Gdk::EventGrabBroken::gobj_copy | ( | ) | const |
Provides access to the underlying C instance.
The caller is responsible for freeing it with gdk_event_free(). Use when directly setting fields in structs.
bool Gdk::EventGrabBroken::has_grab_window | ( | ) | const |
Checks whether this event was caused by another grab in the same application.
In this case, get_grab_window() can be used to acquire the new grab window. The results are undefined if has_grab_window() returns false
and get_grab_window() is called.
bool Gdk::EventGrabBroken::is_implicit | ( | ) | const |
true
if the broken grab was implicit.
bool Gdk::EventGrabBroken::is_keyboard | ( | ) | const |
true
if a keyboard grab was broken, false
if a pointer grab was broken
|
noexcept |
|
related |
lhs | The left-hand side |
rhs | The right-hand side |
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy. |
|
related |
Wraps a C event instance without making unnecessary copy when the ownership can not be acquired.
The event pointer must not be deleted until last usage of the returned instance. Note, that this requirement applies to the pointer itself, in addition to the object it is pointing to.
|
related |