GdkNativeWindow (was Re: Bad portability by foreign_new_for_display)
- From: Hans Breuer <hans breuer org>
- To: Matthias Clasen <matthias clasen gmail com>
- Cc: gtk-devel-list gnome org
- Subject: GdkNativeWindow (was Re: Bad portability by foreign_new_for_display)
- Date: Sun, 30 Jan 2011 22:58:13 +0100
At 26.01.2011 23:36, Matthias Clasen wrote:
On Wed, Jan 26, 2011 at 5:32 PM, Hans Breuer<hans breuer org> wrote:
[...]
Correct, I've overlooked the suggested loss of GdkNativeWindow during the
creation of backend specific foreign_new_for_display(), but I think using a
gpointer and e.g. have the backend specifc delegates done _once_ in say
gdk_foreign_new_for_display(GdkDisplay *, gpointer native_window)
would be better than doing this #ifdef stuff three times in Gtk alone. And
also putting the burden on every other user of foreign_new_for_display()
From my perspective GdkNativeWindow was an attempt to abstract
something that is explicitly backend-specific. Just not a good idea.
If this "not good" idea is supposed to vanish for gtk-3.0 there is still
some work to be done. GdkNativeWindow is not only useful for
foreign_new_for_display(), but also still used in other public API:
GdkEventSelection::requestor
GdkEventOwnerChange::owner
gdk_event_send_client_message()
gdk_event_send_client_message_for_display()
GdkDisplay::send_client_message()
GdkDisplay::get_drag_protocol()
GdkDisplay::send_selection_notify()
gdk_drag_get_protocol_for_display()
gdk_selection_send_notify_for_display()
gtk_plug_construct_for_display()
gtk_plug_new_for_display()
gtk_socket_add_id()
gtk_socket_get_id()
At least I do not have a better idea than the implemented one with
GdkNativeWindow. To get rid of these uses the backend-specific way is
asking for quite some ifdefs in API clients.
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]