Commit e8c3fbf4 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

removed linux-fb backend files.

2008-03-11  Michael Natterer  <mitch@imendio.com>

	* gdk/linux-fb/*: removed linux-fb backend files.

	* acconfig.h
	* config.h.win32.in
	* docs/README.linux-fb
	* gtk/Makefile.am: remove remaining traces of linux-fb.

	* gtk/gtkwindow-decorate.c: same here. There is some code that
	calls into linux-fb to set window move/resize callbacks. I put it
	in #if 0 as a reminder because we did use decorated windows with
	the DirectFB backend and it did work, so I don't really know why
	this code is needed or how it could work with DirectFB back then.
	The file does actually compile now if DECORATE_WINDOWS is defined,
	but I didn't test with DirectFB to check if it does anything.


svn path=/trunk/; revision=19749
parent 1e1f49e0
2008-03-11 Michael Natterer <mitch@imendio.com>
* gdk/linux-fb/*: removed linux-fb backend files.
* acconfig.h
* config.h.win32.in
* docs/README.linux-fb
* gtk/Makefile.am: remove remaining traces of linux-fb.
* gtk/gtkwindow-decorate.c: same here. There is some code that
calls into linux-fb to set window move/resize callbacks. I put it
in #if 0 as a reminder because we did use decorated windows with
the DirectFB backend and it did work, so I don't really know why
this code is needed or how it could work with DirectFB back then.
The file does actually compile now if DECORATE_WINDOWS is defined,
but I didn't test with DirectFB to check if it does anything.
2008-03-11 Alberto Ruiz <aruiz@gnome.org> 2008-03-11 Alberto Ruiz <aruiz@gnome.org>
* gtk/gtkcombobox.c (gtk_combo_box_size_allocate): * gtk/gtkcombobox.c (gtk_combo_box_size_allocate):
......
...@@ -52,12 +52,6 @@ ...@@ -52,12 +52,6 @@
/* Define to use XKB extension */ /* Define to use XKB extension */
#undef HAVE_XKB #undef HAVE_XKB
/* Define to use shadowfb in the linux-fb port */
#undef ENABLE_SHADOW_FB
/* Define to use a fb manager in the linux-fb port */
#undef ENABLE_FB_MANAGER
#undef XINPUT_NONE #undef XINPUT_NONE
#undef XINPUT_GXI #undef XINPUT_GXI
#undef XINPUT_XFREE #undef XINPUT_XFREE
......
...@@ -57,12 +57,6 @@ ...@@ -57,12 +57,6 @@
/* Define to use XKB extension */ /* Define to use XKB extension */
/* #undef HAVE_XKB */ /* #undef HAVE_XKB */
/* Define to use shadowfb in the linux-fb port */
/* #undef ENABLE_SHADOW_FB */
/* Define to use a fb manager in the linux-fb port */
/* #undef ENABLE_FB_MANAGER */
/* #undef XINPUT_NONE */ /* #undef XINPUT_NONE */
/* #undef XINPUT_GXI */ /* #undef XINPUT_GXI */
/* #undef XINPUT_XFREE */ /* #undef XINPUT_XFREE */
......
THIS FILE IS OBSOLETE - use docs/reference/gtk/framebuffer.sgml
About GtkFB:
------------
The linux-fb port of Gtk+, also known as GtkFB is an implementation of
gdk (and therefor gtk) that runs on the linux framebuffer. It runs in
a single process that doesn't need X. It should run most Gtk+ programs
without any changes to the source.
Build requirements:
-------------------
To run GtkFB programs you will need glib, pango and gtk from cvs
HEAD. Make sure you update these at the same time, since changes to
glib and pango often forces changes in gtk+. Pango optionally depends
on libfribidi, but for normal GtkFB usage that can be ignored.
You also need freetype 2, I recommend that you use freetype 2.0.1 or
later, as there was some problems with freetype-config in 2.0.
Make sure that you install freetype before pango, since pango also
needs it.
Freetype can be found at ftp://ftp.freetype.org
Hardware requirements:
----------------------
You need a graphics card with an available framebuffer driver that can
run in 8, 16, 24 or 32 bpp. I use the matroxfb driver, but i.e. vesafb
should work too. You also need a supported mouse. Currently supported
is ps2 mouse, ms serial mouse and fidmour touchscreen.
Building and installing:
------------------------
First build and install glib and pango as usual, in that order.
Then configure Gtk by running configure (or autogen.sh if running from
cvs) with --with-gdktarget=linux-fb.
Then compile as usual: make; make install
Fonts:
------
Since GtkFB uses freetype 2 to render fonts it can render truetype and
postscript type 1 antialiased fonts.
At startup it scans some directories looking for fonts. By default
it looks in $prefix/lib/ft2fonts, and if you want to change this you
must add something like:
[PangoFT2]
FontPath = /usr/share/fonts/default/Type1:/usr/share/fonts/default/TrueType
To your $prefix/etc/pango/pangorc or ~/.pangorc.
You must also set up font aliases for the fonts Sans, Serif and Monotype.
This is done by creating a $prefix/etc/pango/pangoft2.aliases or
~/.pangoft2_aliases file. You can also set the name of this file using the
key AliasFiles in the PangoFT2 section in pangorc.
An example of a font alias file for the urw fontset is:
sans normal normal normal normal "urw gothic l"
serif normal normal normal normal "urw palladio l"
monospace normal normal normal normal "nimbus mono l"
And one using the Windows truetype fonts is:
sans normal normal normal normal "arial"
serif normal normal normal normal "times new roman"
monospace normal normal normal normal "courier new"
A more detailed example can be found in examples/pangoft2.aliases in the
pango distribution.
Running:
--------
To run a program you should only need to start it, but there are some
things that can cause problems, and some things that can be controlled
by environment variables. Try testgtk distributed with gtk+ to test
if things work.
If you use a ps2 mouse, make sure that /dev/psaux is readable and
writable.
Make sure gpm is not running.
If you don't specify anything GtkFB will start up in the current
virtual console in the current resolution and bit-depth. This can be
changed by specifying environment variables:
GDK_VT:
unset means open on the current VT.
0-9: open on the specified VT. Make sure you have read/write rights
there.
new: Allocate a new VT after the last currently used one.
GDK_DISPLAY_MODE:
Specifies the name of a mode in /etc/fb.modes that you want to use.
GDK_DISPLAY_DEPTH:
Specify the desired bit depth of the framebuffer.
GDK_DISPLAY_WIDTH:
Specify the desired width of the framebuffer.
GDK_DISPLAY_HEIGHT:
Specify the desired height of the framebuffer.
GDK_DISPLAY:
Specify the framebuffer device to use. Default is /dev/fb0
GDK_MOUSE_TYPE:
Specify mouse type. Currently supported is:
ps2 - PS/2 mouse
imps2 - PS/2 intellimouse (wheelmouse)
ms - Microsoft serial mouse
fidmour - touch screen
Default is ps2.
GDK_KEYBOARD_TYPE:
Specify keyboard type. Currently supported is
xlate - normal tty mode keyboard.
Quite limited, cannot detect key up/key down events. Doesn't
handle ctrl/alt/shift for all keys. This is the default driver,
but should not be used in "production" use.
raw - read from the tty in RAW mode.
Sets the keyboard in RAW mode and handles all the keycodes. This
gives correct handling of modifiers and key up/down events. You
must be root to use this. If you use this for development or
debugging it is recommended to enable magic sysrq handling in the
kernel. Then you can use ALT-SysRQ-r to turn the keyboard back to
normal mode.
Default is xlate.
HACKING:
--------
Pressing Ctrl-Alt-Return repaints the whole screen.
Unfortunately this cannot be pressed when using the xlate keyboard
driver, so instead you can use shift-F1 instead when using this
driver.
Pressing Ctrl-Alt-BackSpace kills the GtkFB program. (Can't be pressed
in the xlate driver.
More to be written.
- Alexander Larsson <alexl@redhat.com>
2000/12/06
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
bin_PROGRAMS =
if ENABLE_FB_MANAGER
bin_PROGRAMS += gdkfbmanager gdkfbswitch
endif
libgdkincludedir = $(includedir)/gtk-2.0/gdk
libgdkfbincludedir = $(includedir)/gtk-2.0/gdk/linux-fb
INCLUDES = \
-DG_LOG_DOMAIN=\"Gdk\" \
-DGDK_DATA_PREFIX=\"$(prefix)\" \
-I$(top_srcdir) \
-I$(top_srcdir)/gdk \
-I$(top_builddir)/gdk \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
$(GDK_DEP_CFLAGS) \
$(GTK_DEBUG_FLAGS)
noinst_LTLIBRARIES = libgdk-linux-fb.la
libgdkinclude_HEADERS= \
gdkfb.h
libgdk_linux_fb_la_SOURCES = \
gdkcolor-fb.c \
gdkcursor-fb.c \
gdkdisplay-fb.c \
gdkdnd-fb.c \
gdkdrawable-fb2.c \
gdkevents-fb.c \
gdkfbmanager.h \
gdkfont-fb.c \
gdkgc-fb.c \
gdkgeometry-fb.c \
gdkglobals-fb.c \
gdkim-fb.c \
gdkimage-fb.c \
gdkinput.c \
gdkinputprivate.h \
gdkkeyboard-fb.c \
gdkmain-fb.c \
gdkmouse-fb.c \
gdkpango-fb.c \
gdkpixmap-fb.c \
gdkprivate-fb.h \
gdkproperty-fb.c \
gdkrender-fb.c \
gdkscreen-fb.c \
gdkselection-fb.c \
gdkspawn-fb.c \
gdkvisual-fb.c \
gdkwindow-fb.c \
mi.h \
miarc.c \
midash.c \
mifillarc.c \
mifillarc.h \
mifpoly.h \
mifpolycon.c \
miline.h \
mipoly.c \
mipoly.h \
mipolygen.c \
mipolyutil.c \
miscanfill.h \
mispans.c \
mispans.h \
mistruct.h \
mitypes.h \
miwideline.c \
miwideline.h \
mizerclip.c \
mizerline.c
gdkfbmanager_sources = gdkfbmanager.c
gdkfbmanager_LDFLAGS = $(GLIB_LIBS)
gdkfbswitch_sources = gdkfbswitch.c
gdkfbswitch_LDFLAGS = $(GLIB_LIBS)
EXTRA_DIST += x-cursors.xbm
This diff is collapsed.
This diff is collapsed.
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include <config.h>
#include "gdk.h"
#include "gdkprivate-fb.h"
GdkDisplay *
gdk_display_open (const gchar *display_name)
{
if (gdk_display == NULL || _gdk_display != NULL)
return NULL; /* single display only */
_gdk_display = g_object_new (GDK_TYPE_DISPLAY, NULL);
_gdk_screen = g_object_new (GDK_TYPE_SCREEN, NULL);
_gdk_visual_init ();
gdk_screen_set_default_colormap (_gdk_screen,
gdk_screen_get_system_colormap (_gdk_screen));
_gdk_windowing_window_init ();
_gdk_windowing_image_init ();
_gdk_events_init ();
_gdk_input_init ();
_gdk_dnd_init ();
g_signal_emit_by_name (gdk_display_manager_get (),
"display_opened", _gdk_display);
return _gdk_display;
}
G_CONST_RETURN gchar *
gdk_display_get_name (GdkDisplay *display)
{
return gdk_get_display_arg_name ();
}
int
gdk_display_get_n_screens (GdkDisplay *display)
{
return 1;
}
GdkScreen *
gdk_display_get_screen (GdkDisplay *display,
gint screen_num)
{
return _gdk_screen;
}
GdkScreen *
gdk_display_get_default_screen (GdkDisplay *display)
{
return _gdk_screen;
}
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1999 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include <config.h>
#include "gdk.h" /* For gdk_flush() */
#include "gdkdnd.h"
#include "gdkproperty.h"
#include "gdkinternals.h"
#include "gdkprivate-fb.h"
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum {
GDK_DRAG_STATUS_DRAG,
GDK_DRAG_STATUS_MOTION_WAIT,
GDK_DRAG_STATUS_ACTION_WAIT,
GDK_DRAG_STATUS_DROP
} GtkDragStatus;
/* Structure that holds information about a drag in progress.
* this is used on both source and destination sides.
*/
struct _GdkDragContextPrivate {
GdkAtom local_selection;
guint16 last_x; /* Coordinates from last event */
guint16 last_y;
guint drag_status : 4; /* current status of drag */
};
/* Drag Contexts */
static GList *contexts;
static gpointer parent_class = NULL;
#define GDK_DRAG_CONTEXT_PRIVATE_DATA(ctx) ((GdkDragContextPrivate *) GDK_DRAG_CONTEXT (ctx)->windowing_data)
GdkDragContext *current_dest_drag = NULL;
static void
gdk_drag_context_init (GdkDragContext *dragcontext)
{
dragcontext->windowing_data = g_new0 (GdkDragContextPrivate, 1);
contexts = g_list_prepend (contexts, dragcontext);
}
static void
gdk_drag_context_finalize (GObject *object)
{
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
GdkDragContextPrivate *private = GDK_DRAG_CONTEXT_PRIVATE_DATA (object);
g_list_free (context->targets);
if (context->source_window)
gdk_window_unref (context->source_window);
if (context->dest_window)
gdk_window_unref (context->dest_window);
if (private)
{
g_free (private);
context->windowing_data = NULL;
}
contexts = g_list_remove (contexts, context);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gdk_drag_context_class_init (GdkDragContextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gdk_drag_context_finalize;
}
GType
gdk_drag_context_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
static const GTypeInfo object_info =
{
sizeof (GdkDragContextClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_drag_context_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkDragContext),
0, /* n_preallocs */
(GInstanceInitFunc) gdk_drag_context_init,
};
object_type = g_type_register_static (G_TYPE_OBJECT,
"GdkDragContext",
&object_info,
0);
}
return object_type;
}
GdkDragContext *
gdk_drag_context_new (void)
{
return (GdkDragContext *)g_object_new (gdk_drag_context_get_type (), NULL);
}
void
gdk_drag_context_ref (GdkDragContext *context)
{
g_object_ref (context);
}
void
gdk_drag_context_unref (GdkDragContext *context)
{
g_object_unref (context);
}
static GdkDragContext *
gdk_drag_context_find (gboolean is_source,
GdkWindow *source,
GdkWindow *dest)
{
GList *tmp_list = contexts;
GdkDragContext *context;
GdkDragContextPrivate *private;
while (tmp_list)
{
context = (GdkDragContext *)tmp_list->data;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
if ((!context->is_source == !is_source) &&
((source == NULL) || (context->source_window && (context->source_window == source))) &&
((dest == NULL) || (context->dest_window && (context->dest_window == dest))))
return context;
tmp_list = tmp_list->next;
}
return NULL;
}
/*************************************************************
************************** Public API ***********************
*************************************************************/
void
_gdk_dnd_init (void)
{
}
/* Source side */
static void
local_send_leave (GdkDragContext *context,
guint32 time)
{
GdkEvent tmp_event;
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
(current_dest_drag->source_window == context->source_window))
{
tmp_event.dnd.type = GDK_DRAG_LEAVE;
tmp_event.dnd.window = context->dest_window;
/* Pass ownership of context to the event */
tmp_event.dnd.context = current_dest_drag;
tmp_event.dnd.send_event = FALSE;
tmp_event.dnd.time = GDK_CURRENT_TIME; /* FIXME? */
current_dest_drag = NULL;
gdk_event_put (&tmp_event);
}
}
static void
local_send_enter (GdkDragContext *context,
guint32 time)
{
GdkEvent tmp_event;
GdkDragContextPrivate *private;
GdkDragContext *new_context;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
if (!private->local_selection)
private->local_selection = gdk_atom_intern ("LocalDndSelection", FALSE);
if (current_dest_drag != NULL)
{
gdk_drag_context_unref (current_dest_drag);
current_dest_drag = NULL;
}
new_context = gdk_drag_context_new ();
new_context->protocol = GDK_DRAG_PROTO_LOCAL;
new_context->is_source = FALSE;
new_context->source_window = context->source_window;
gdk_window_ref (new_context->source_window);
new_context->dest_window = context->dest_window;
gdk_window_ref (new_context->dest_window);
new_context->targets = g_list_copy (context->targets);
gdk_window_set_events (new_context->source_window,
gdk_window_get_events (new_context->source_window) |
GDK_PROPERTY_CHANGE_MASK);
new_context->actions = context->actions;
tmp_event.dnd.type = GDK_DRAG_ENTER;
tmp_event.dnd.window = context->dest_window;
tmp_event.dnd.send_event = FALSE;
tmp_event.dnd.context = new_context;
gdk_drag_context_ref (new_context);
tmp_event.dnd.time = GDK_CURRENT_TIME; /* FIXME? */
current_dest_drag = new_context;
(GDK_DRAG_CONTEXT_PRIVATE_DATA (new_context))->local_selection =
private->local_selection;
gdk_event_put (&tmp_event);
}
static void
local_send_motion (GdkDragContext *context,
gint x_root,
gint y_root,
GdkDragAction action,
guint32 time)
{
GdkEvent tmp_event;
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
(current_dest_drag->source_window == context->source_window))
{
tmp_event.dnd.type = GDK_DRAG_MOTION;
tmp_event.dnd.window = current_dest_drag->dest_window;
tmp_event.dnd.send_event = FALSE;
tmp_event.dnd.context = current_dest_drag;
gdk_drag_context_ref (current_dest_drag);
tmp_event.dnd.time = time;
current_dest_drag->suggested_action = action;
current_dest_drag->actions = current_dest_drag->suggested_action;
tmp_event.dnd.x_root = x_root;
tmp_event.dnd.y_root = y_root;
(GDK_DRAG_CONTEXT_PRIVATE_DATA (current_dest_drag))->last_x = x_root;
(GDK_DRAG_CONTEXT_PRIVATE_DATA (current_dest_drag))->last_y = y_root;
GDK_DRAG_CONTEXT_PRIVATE_DATA (context)->drag_status = GDK_DRAG_STATUS_MOTION_WAIT;
gdk_event_put (&tmp_event);
}
}
static void
local_send_drop (GdkDragContext *context, guint32 time)
{
GdkEvent tmp_event;
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
(current_dest_drag->source_window == context->source_window))
{