[wing/get_hwnd] eventwindow: add method to get the event window hwnd
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wing/get_hwnd] eventwindow: add method to get the event window hwnd
- Date: Wed, 22 Apr 2020 14:17:50 +0000 (UTC)
commit 04aea37759deee494198a2a66c12e76ad1f8af2c
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Wed Apr 22 16:17:04 2020 +0200
eventwindow: add method to get the event window hwnd
This is needed to understand which one is the owner of the clipboard.
wing/wingeventwindow.c | 18 +++++++++++++-----
wing/wingeventwindow.h | 3 +++
2 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/wing/wingeventwindow.c b/wing/wingeventwindow.c
index 6223909..909a68d 100644
--- a/wing/wingeventwindow.c
+++ b/wing/wingeventwindow.c
@@ -367,6 +367,14 @@ wing_event_window_new (const gchar *name,
NULL);
}
+HWND
+wing_event_window_get_hwnd (WingEventWindow *window)
+{
+ g_return_val_if_fail (WING_IS_EVENT_WINDOW (window), NULL);
+
+ return window->hwnd;
+}
+
void
wing_event_window_connect (WingEventWindow *window,
guint message,
@@ -375,11 +383,11 @@ wing_event_window_connect (WingEventWindow *window,
{
Message *m;
- g_return_if_fail(WING_IS_EVENT_WINDOW(window));
- g_return_if_fail(callback != NULL);
+ g_return_if_fail (WING_IS_EVENT_WINDOW (window));
+ g_return_if_fail (callback != NULL);
- m = create_message(callback, user_data);
- g_hash_table_insert(window->messages, GUINT_TO_POINTER(message), m);
+ m = create_message (callback, user_data);
+ g_hash_table_insert (window->messages, GUINT_TO_POINTER (message), m);
}
-/* ex:set ts=4 et: */
+/* ex:set ts=2 et: */
diff --git a/wing/wingeventwindow.h b/wing/wingeventwindow.h
index dcfc858..5125a91 100644
--- a/wing/wingeventwindow.h
+++ b/wing/wingeventwindow.h
@@ -42,6 +42,9 @@ WingEventWindow *wing_event_window_new (const gchar *n
gboolean track_clipboard,
GError **error);
+WING_AVAILABLE_IN_ALL
+HWND wing_event_window_get_hwnd (WingEventWindow *window);
+
WING_AVAILABLE_IN_ALL
void wing_event_window_connect (WingEventWindow *window,
guint message,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]