gtk_plug_* and gtk_socket_* family for non X11 builds
- From: Raul Dias <chaos swi com br>
- To: Gtk Perl List <gtk-perl-list gnome org>
- Subject: gtk_plug_* and gtk_socket_* family for non X11 builds
- Date: Fri, 11 Feb 2005 00:22:54 -0200
I am almost done building Gtk2 for linux-framebuffer.
I found a problem regarding the gtk_plug and gtk_socket families.
AFAIK, gtk_plug and gtk_socket are X11 specific and does not work in
the FB (as it is a single process interface) or even on Win32.
I don't know where the problem is (gtk2-perl) or gtk+ 2.x.
However other bindings deal with thisby either checking it in configure
(ruby) or by creating a fake stub (python).
Here is the python solution:
----------------------------->8--------------------------------------------
--- pygtk-2.4.0/gtk/gtk-fake-linuxfb.c 1970-01-01 01:00:00.000000000
+0100
+++ pygtk-2.4.0-OK1/gtk/gtk-fake-linuxfb.c 2004-10-21 15:39:40.516258056 +0200
@@ -0,0 +1,26 @@
+#include <gtk/gtksocket.h>
+#include <gtk/gtkplug.h>
+
+GtkType
+gtk_plug_get_type ()
+{
+ static int n = 0;
+
+ if (n > 0) /* first call causes no harm */
+ g_warning ("GtkPlug not yet available for linux framebuffer!");
+ n++;
+
+ return 0;
+}
+
+GtkType
+gtk_socket_get_type ()
+{
+ static int n = 0;
+
+ if (n > 0)
+ g_warning ("GtkSocket not yet available for linux framebuffer!");
+ n++;
+
+ return 0;
+}
-----------------------------8<--------------------------------------
As gtk2-perl almost have FB support out of the box this is what is missing to make it work.
BTW, only gtk+ 2.4.x works on FB, 2.6.x is/seems to be broken.
As I am not familiar with gtk2-perl api "finder/generator", any tips where can I start patching it?
Raul Dias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]