Commit b29eece8 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Added ENABLE_SHADOW_FB

2001-01-11  Alexander Larsson  <alexl@redhat.com>

	* acconfig.h:
	Added ENABLE_SHADOW_FB

	* configure.in:
	Added --disable-shadowfb

	* gdk/linux-fb/gdkcursor-fb.c:
	Update shadowfb when updating cursor

	* gdk/linux-fb/gdkdrawable-fb2.c:
	Added wrappers for shadowfb that calls 	the normal drawable
	methods, but calls gdk_shadow_fb_update(bounding box) when
	GdkWindows are drawed to.
	Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
	which also returns the bounding box.

	* gdk/linux-fb/gdkfb.h:
	Added GdkFBAngle type and gdk_fb_set_rotation declaration.

	* gdk/linux-fb/gdkgeometry-fb.c:
	Update shadowfb when scrolling window.

	* gdk/linux-fb/gdkglobals-fb.c:
	Add _gdk_fb_screen_angle.

	* gdk/linux-fb/gdkkeyboard-fb.c:
	Test code for screen rotation. Shift-F2 in the xlate driver
	rotates the screen.

	* gdk/linux-fb/gdkmain-fb.c:
	Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.

	* gdk/linux-fb/gdkmouse-fb.c:
	Use fb_width/height instead of modeinfo.xres/yres.

	* gdk/linux-fb/gdkprivate-fb.h:
	Added fb_men, fb_width, fb_height & fb_stride. When using
	shadow fb these can differ from the framebuffer stuff.
	Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
	gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
	_gdk_fb_screen_angle. Removed CM, RP.

	* gdk/linux-fb/gdkrender-fb.c:
	Added code for shadowfb handling and screen rotation using
	shadowfb.

	* gdk/linux-fb/gdkwindow-fb.c:
	Use fb_mem, fb_stride, fb_width, fb_height.
	Added recompute_rowstride to reset the rowstride of all windows.
	Added gdk_fb_recompute_all() which recomputes rootwindow size,
	window abs positions and window rowstrides. Usefull when the
	rotation has changed.
parent d2c34548
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
Added ENABLE_SHADOW_FB
* configure.in:
Added --disable-shadowfb
* gdk/linux-fb/gdkcursor-fb.c:
Update shadowfb when updating cursor
* gdk/linux-fb/gdkdrawable-fb2.c:
Added wrappers for shadowfb that calls the normal drawable
methods, but calls gdk_shadow_fb_update(bounding box) when
GdkWindows are drawed to.
Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
which also returns the bounding box.
* gdk/linux-fb/gdkfb.h:
Added GdkFBAngle type and gdk_fb_set_rotation declaration.
* gdk/linux-fb/gdkgeometry-fb.c:
Update shadowfb when scrolling window.
* gdk/linux-fb/gdkglobals-fb.c:
Add _gdk_fb_screen_angle.
* gdk/linux-fb/gdkkeyboard-fb.c:
Test code for screen rotation. Shift-F2 in the xlate driver
rotates the screen.
* gdk/linux-fb/gdkmain-fb.c:
Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.
* gdk/linux-fb/gdkmouse-fb.c:
Use fb_width/height instead of modeinfo.xres/yres.
* gdk/linux-fb/gdkprivate-fb.h:
Added fb_men, fb_width, fb_height & fb_stride. When using
shadow fb these can differ from the framebuffer stuff.
Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
_gdk_fb_screen_angle. Removed CM, RP.
* gdk/linux-fb/gdkrender-fb.c:
Added code for shadowfb handling and screen rotation using
shadowfb.
* gdk/linux-fb/gdkwindow-fb.c:
Use fb_mem, fb_stride, fb_width, fb_height.
Added recompute_rowstride to reset the rowstride of all windows.
Added gdk_fb_recompute_all() which recomputes rootwindow size,
window abs positions and window rowstrides. Usefull when the
rotation has changed.
Thu Jan 11 13:16:50 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: update to make web site updating easier
......
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
Added ENABLE_SHADOW_FB
* configure.in:
Added --disable-shadowfb
* gdk/linux-fb/gdkcursor-fb.c:
Update shadowfb when updating cursor
* gdk/linux-fb/gdkdrawable-fb2.c:
Added wrappers for shadowfb that calls the normal drawable
methods, but calls gdk_shadow_fb_update(bounding box) when
GdkWindows are drawed to.
Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
which also returns the bounding box.
* gdk/linux-fb/gdkfb.h:
Added GdkFBAngle type and gdk_fb_set_rotation declaration.
* gdk/linux-fb/gdkgeometry-fb.c:
Update shadowfb when scrolling window.
* gdk/linux-fb/gdkglobals-fb.c:
Add _gdk_fb_screen_angle.
* gdk/linux-fb/gdkkeyboard-fb.c:
Test code for screen rotation. Shift-F2 in the xlate driver
rotates the screen.
* gdk/linux-fb/gdkmain-fb.c:
Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.
* gdk/linux-fb/gdkmouse-fb.c:
Use fb_width/height instead of modeinfo.xres/yres.
* gdk/linux-fb/gdkprivate-fb.h:
Added fb_men, fb_width, fb_height & fb_stride. When using
shadow fb these can differ from the framebuffer stuff.
Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
_gdk_fb_screen_angle. Removed CM, RP.
* gdk/linux-fb/gdkrender-fb.c:
Added code for shadowfb handling and screen rotation using
shadowfb.
* gdk/linux-fb/gdkwindow-fb.c:
Use fb_mem, fb_stride, fb_width, fb_height.
Added recompute_rowstride to reset the rowstride of all windows.
Added gdk_fb_recompute_all() which recomputes rootwindow size,
window abs positions and window rowstrides. Usefull when the
rotation has changed.
Thu Jan 11 13:16:50 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: update to make web site updating easier
......
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
Added ENABLE_SHADOW_FB
* configure.in:
Added --disable-shadowfb
* gdk/linux-fb/gdkcursor-fb.c:
Update shadowfb when updating cursor
* gdk/linux-fb/gdkdrawable-fb2.c:
Added wrappers for shadowfb that calls the normal drawable
methods, but calls gdk_shadow_fb_update(bounding box) when
GdkWindows are drawed to.
Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
which also returns the bounding box.
* gdk/linux-fb/gdkfb.h:
Added GdkFBAngle type and gdk_fb_set_rotation declaration.
* gdk/linux-fb/gdkgeometry-fb.c:
Update shadowfb when scrolling window.
* gdk/linux-fb/gdkglobals-fb.c:
Add _gdk_fb_screen_angle.
* gdk/linux-fb/gdkkeyboard-fb.c:
Test code for screen rotation. Shift-F2 in the xlate driver
rotates the screen.
* gdk/linux-fb/gdkmain-fb.c:
Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.
* gdk/linux-fb/gdkmouse-fb.c:
Use fb_width/height instead of modeinfo.xres/yres.
* gdk/linux-fb/gdkprivate-fb.h:
Added fb_men, fb_width, fb_height & fb_stride. When using
shadow fb these can differ from the framebuffer stuff.
Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
_gdk_fb_screen_angle. Removed CM, RP.
* gdk/linux-fb/gdkrender-fb.c:
Added code for shadowfb handling and screen rotation using
shadowfb.
* gdk/linux-fb/gdkwindow-fb.c:
Use fb_mem, fb_stride, fb_width, fb_height.
Added recompute_rowstride to reset the rowstride of all windows.
Added gdk_fb_recompute_all() which recomputes rootwindow size,
window abs positions and window rowstrides. Usefull when the
rotation has changed.
Thu Jan 11 13:16:50 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: update to make web site updating easier
......
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
Added ENABLE_SHADOW_FB
* configure.in:
Added --disable-shadowfb
* gdk/linux-fb/gdkcursor-fb.c:
Update shadowfb when updating cursor
* gdk/linux-fb/gdkdrawable-fb2.c:
Added wrappers for shadowfb that calls the normal drawable
methods, but calls gdk_shadow_fb_update(bounding box) when
GdkWindows are drawed to.
Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
which also returns the bounding box.
* gdk/linux-fb/gdkfb.h:
Added GdkFBAngle type and gdk_fb_set_rotation declaration.
* gdk/linux-fb/gdkgeometry-fb.c:
Update shadowfb when scrolling window.
* gdk/linux-fb/gdkglobals-fb.c:
Add _gdk_fb_screen_angle.
* gdk/linux-fb/gdkkeyboard-fb.c:
Test code for screen rotation. Shift-F2 in the xlate driver
rotates the screen.
* gdk/linux-fb/gdkmain-fb.c:
Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.
* gdk/linux-fb/gdkmouse-fb.c:
Use fb_width/height instead of modeinfo.xres/yres.
* gdk/linux-fb/gdkprivate-fb.h:
Added fb_men, fb_width, fb_height & fb_stride. When using
shadow fb these can differ from the framebuffer stuff.
Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
_gdk_fb_screen_angle. Removed CM, RP.
* gdk/linux-fb/gdkrender-fb.c:
Added code for shadowfb handling and screen rotation using
shadowfb.
* gdk/linux-fb/gdkwindow-fb.c:
Use fb_mem, fb_stride, fb_width, fb_height.
Added recompute_rowstride to reset the rowstride of all windows.
Added gdk_fb_recompute_all() which recomputes rootwindow size,
window abs positions and window rowstrides. Usefull when the
rotation has changed.
Thu Jan 11 13:16:50 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: update to make web site updating easier
......
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
Added ENABLE_SHADOW_FB
* configure.in:
Added --disable-shadowfb
* gdk/linux-fb/gdkcursor-fb.c:
Update shadowfb when updating cursor
* gdk/linux-fb/gdkdrawable-fb2.c:
Added wrappers for shadowfb that calls the normal drawable
methods, but calls gdk_shadow_fb_update(bounding box) when
GdkWindows are drawed to.
Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
which also returns the bounding box.
* gdk/linux-fb/gdkfb.h:
Added GdkFBAngle type and gdk_fb_set_rotation declaration.
* gdk/linux-fb/gdkgeometry-fb.c:
Update shadowfb when scrolling window.
* gdk/linux-fb/gdkglobals-fb.c:
Add _gdk_fb_screen_angle.
* gdk/linux-fb/gdkkeyboard-fb.c:
Test code for screen rotation. Shift-F2 in the xlate driver
rotates the screen.
* gdk/linux-fb/gdkmain-fb.c:
Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.
* gdk/linux-fb/gdkmouse-fb.c:
Use fb_width/height instead of modeinfo.xres/yres.
* gdk/linux-fb/gdkprivate-fb.h:
Added fb_men, fb_width, fb_height & fb_stride. When using
shadow fb these can differ from the framebuffer stuff.
Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
_gdk_fb_screen_angle. Removed CM, RP.
* gdk/linux-fb/gdkrender-fb.c:
Added code for shadowfb handling and screen rotation using
shadowfb.
* gdk/linux-fb/gdkwindow-fb.c:
Use fb_mem, fb_stride, fb_width, fb_height.
Added recompute_rowstride to reset the rowstride of all windows.
Added gdk_fb_recompute_all() which recomputes rootwindow size,
window abs positions and window rowstrides. Usefull when the
rotation has changed.
Thu Jan 11 13:16:50 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: update to make web site updating easier
......
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
Added ENABLE_SHADOW_FB
* configure.in:
Added --disable-shadowfb
* gdk/linux-fb/gdkcursor-fb.c:
Update shadowfb when updating cursor
* gdk/linux-fb/gdkdrawable-fb2.c:
Added wrappers for shadowfb that calls the normal drawable
methods, but calls gdk_shadow_fb_update(bounding box) when
GdkWindows are drawed to.
Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
which also returns the bounding box.
* gdk/linux-fb/gdkfb.h:
Added GdkFBAngle type and gdk_fb_set_rotation declaration.
* gdk/linux-fb/gdkgeometry-fb.c:
Update shadowfb when scrolling window.
* gdk/linux-fb/gdkglobals-fb.c:
Add _gdk_fb_screen_angle.
* gdk/linux-fb/gdkkeyboard-fb.c:
Test code for screen rotation. Shift-F2 in the xlate driver
rotates the screen.
* gdk/linux-fb/gdkmain-fb.c:
Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.
* gdk/linux-fb/gdkmouse-fb.c:
Use fb_width/height instead of modeinfo.xres/yres.
* gdk/linux-fb/gdkprivate-fb.h:
Added fb_men, fb_width, fb_height & fb_stride. When using
shadow fb these can differ from the framebuffer stuff.
Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
_gdk_fb_screen_angle. Removed CM, RP.
* gdk/linux-fb/gdkrender-fb.c:
Added code for shadowfb handling and screen rotation using
shadowfb.
* gdk/linux-fb/gdkwindow-fb.c:
Use fb_mem, fb_stride, fb_width, fb_height.
Added recompute_rowstride to reset the rowstride of all windows.
Added gdk_fb_recompute_all() which recomputes rootwindow size,
window abs positions and window rowstrides. Usefull when the
rotation has changed.
Thu Jan 11 13:16:50 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: update to make web site updating easier
......
2001-01-11 Alexander Larsson <alexl@redhat.com>
* acconfig.h:
Added ENABLE_SHADOW_FB
* configure.in:
Added --disable-shadowfb
* gdk/linux-fb/gdkcursor-fb.c:
Update shadowfb when updating cursor
* gdk/linux-fb/gdkdrawable-fb2.c:
Added wrappers for shadowfb that calls the normal drawable
methods, but calls gdk_shadow_fb_update(bounding box) when
GdkWindows are drawed to.
Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
which also returns the bounding box.
* gdk/linux-fb/gdkfb.h:
Added GdkFBAngle type and gdk_fb_set_rotation declaration.
* gdk/linux-fb/gdkgeometry-fb.c:
Update shadowfb when scrolling window.
* gdk/linux-fb/gdkglobals-fb.c:
Add _gdk_fb_screen_angle.
* gdk/linux-fb/gdkkeyboard-fb.c:
Test code for screen rotation. Shift-F2 in the xlate driver
rotates the screen.
* gdk/linux-fb/gdkmain-fb.c:
Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.
* gdk/linux-fb/gdkmouse-fb.c:
Use fb_width/height instead of modeinfo.xres/yres.
* gdk/linux-fb/gdkprivate-fb.h:
Added fb_men, fb_width, fb_height & fb_stride. When using
shadow fb these can differ from the framebuffer stuff.
Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
_gdk_fb_screen_angle. Removed CM, RP.
* gdk/linux-fb/gdkrender-fb.c:
Added code for shadowfb handling and screen rotation using
shadowfb.
* gdk/linux-fb/gdkwindow-fb.c:
Use fb_mem, fb_stride, fb_width, fb_height.
Added recompute_rowstride to reset the rowstride of all windows.
Added gdk_fb_recompute_all() which recomputes rootwindow size,
window abs positions and window rowstrides. Usefull when the
rotation has changed.
Thu Jan 11 13:16:50 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: update to make web site updating easier
......
......@@ -47,6 +47,9 @@
/* Define to use XKB extension */
#undef HAVE_XKB
/* Define to use shadowfb in the linux-fb port */
#undef ENABLE_SHADOW_FB
#undef XINPUT_NONE
#undef XINPUT_GXI
#undef XINPUT_XFREE
......
......@@ -133,6 +133,8 @@ case $gdktarget in
*) AC_MSG_ERROR([Invalid target for GDK: use x11, nanox or linux-fb.]);;
esac
AC_ARG_ENABLE(shadowfb, [ --disable-shadowfb disable shadowfb support for linux-fb],,enable_shadowfb=yes)
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
......@@ -146,6 +148,7 @@ fi
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
# Build time sanity check...
AM_SANITY_CHECK
......@@ -591,11 +594,16 @@ if test "x$gdktarget" = "xlinux-fb"; then
FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
if test x$enable_shadowfb = xyes ; then
AC_DEFINE(ENABLE_SHADOW_FB)
fi
AM_CONDITIONAL(USE_LINUX_FB, true)
else
AM_CONDITIONAL(USE_LINUX_FB, false)
fi
AC_SUBST(ENABLE_SHADOW_FB)
AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_CFLAGS)
......
......@@ -337,6 +337,9 @@ gdk_fb_cursor_hide (void)
last_location.y,
last_contents_size.x,
last_contents_size.y);
gdk_shadow_fb_update (last_location.x, last_location.y,
last_location.x + last_contents_size.x,
last_location.y + last_contents_size.y);
}
}
......@@ -409,6 +412,9 @@ gdk_fb_cursor_unhide()
last_location.x, last_location.y,
pixmap_last->width,
pixmap_last->height);
gdk_shadow_fb_update (last_location.x, last_location.y,
last_location.x + pixmap_last->width,
last_location.y + pixmap_last->height);
}
else
gdk_fb_cursor_invalidate ();
......
#include "config.h"
#include "gdkprivate-fb.h"
#include "mi.h"
#include <string.h>
......@@ -76,6 +77,10 @@ static void gdk_fb_draw_segments (GdkDrawable *drawable,
GdkGC *gc,
GdkSegment *segs,
gint nsegs);
static void gdk_fb_draw_lines (GdkDrawable *drawable,
GdkGC *gc,
GdkPoint *points,
gint npoints);
static GdkColormap* gdk_fb_get_colormap (GdkDrawable *drawable);
static void gdk_fb_set_colormap (GdkDrawable *drawable,
GdkColormap *colormap);
......@@ -83,6 +88,81 @@ static gint gdk_fb_get_depth (GdkDrawable *drawable);
static GdkVisual* gdk_fb_get_visual (GdkDrawable *drawable);
static void gdk_fb_drawable_finalize (GObject *object);
#ifdef ENABLE_SHADOW_FB
static void gdk_shadow_fb_draw_rectangle (GdkDrawable *drawable,
GdkGC *gc,
gint filled,
gint x,
gint y,
gint width,
gint height);
static void gdk_shadow_fb_draw_arc (GdkDrawable *drawable,
GdkGC *gc,
gint filled,
gint x,
gint y,
gint width,
gint height,
gint angle1,
gint angle2);
static void gdk_shadow_fb_draw_polygon (GdkDrawable *drawable,
GdkGC *gc,
gint filled,
GdkPoint *points,
gint npoints);
static void gdk_shadow_fb_draw_text (GdkDrawable *drawable,
GdkFont *font,
GdkGC *gc,
gint x,
gint y,
const gchar *text,
gint text_length);
static void gdk_shadow_fb_draw_text_wc (GdkDrawable *drawable,
GdkFont *font,
GdkGC *gc,
gint x,
gint y,
const GdkWChar *text,
gint text_length);
static void gdk_shadow_fb_draw_glyphs (GdkDrawable *drawable,
GdkGC *gc,
PangoFont *font,
gint x,
gint y,
PangoGlyphString *glyphs);
static void gdk_shadow_fb_draw_drawable (GdkDrawable *drawable,
GdkGC *gc,
GdkPixmap *src,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height);
static void gdk_shadow_fb_draw_image (GdkDrawable *drawable,
GdkGC *gc,
GdkImage *image,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height);
static void gdk_shadow_fb_draw_points (GdkDrawable *drawable,
GdkGC *gc,
GdkPoint *points,
gint npoints);
static void gdk_shadow_fb_draw_segments (GdkDrawable *drawable,
GdkGC *gc,
GdkSegment *segs,
gint nsegs);
static void gdk_shadow_fb_draw_lines (GdkDrawable *drawable,
GdkGC *gc,
GdkPoint *points,
gint npoints);
#endif
static gpointer parent_class = NULL;
static void
......@@ -105,6 +185,20 @@ gdk_drawable_impl_fb_class_init (GdkDrawableFBClass *klass)
object_class->finalize = gdk_fb_drawable_finalize;
drawable_class->create_gc = _gdk_fb_gc_new;
#ifdef ENABLE_SHADOW_FB
drawable_class->draw_rectangle = gdk_shadow_fb_draw_rectangle;
drawable_class->draw_arc = gdk_shadow_fb_draw_arc;
drawable_class->draw_polygon = gdk_shadow_fb_draw_polygon;
drawable_class->draw_text = gdk_shadow_fb_draw_text;
drawable_class->draw_text_wc = gdk_shadow_fb_draw_text_wc;
drawable_class->draw_drawable = gdk_shadow_fb_draw_drawable;
drawable_class->draw_points = gdk_shadow_fb_draw_points;
drawable_class->draw_segments = gdk_shadow_fb_draw_segments;
drawable_class->draw_lines = gdk_shadow_fb_draw_lines;
drawable_class->draw_glyphs = gdk_shadow_fb_draw_glyphs;
drawable_class->draw_image = gdk_shadow_fb_draw_image;
#else
drawable_class->draw_rectangle = gdk_fb_draw_rectangle;
drawable_class->draw_arc = gdk_fb_draw_arc;
drawable_class->draw_polygon = gdk_fb_draw_polygon;
......@@ -116,6 +210,7 @@ gdk_drawable_impl_fb_class_init (GdkDrawableFBClass *klass)
drawable_class->draw_lines = gdk_fb_draw_lines;
drawable_class->draw_glyphs = gdk_fb_draw_glyphs;
drawable_class->draw_image = gdk_fb_draw_image;
#endif
drawable_class->set_colormap = gdk_fb_set_colormap;
drawable_class->get_colormap = gdk_fb_get_colormap;
......@@ -185,7 +280,6 @@ static void
gdk_fb_set_colormap (GdkDrawable *drawable,
GdkColormap *colormap)
{
GdkColormap *old_cmap;
GdkDrawableFBData *private;
private = GDK_DRAWABLE_FBDATA (drawable);
......@@ -854,7 +948,7 @@ gdk_fb_draw_polygon (GdkDrawable *drawable,
}
}
void
static void
gdk_fb_draw_lines (GdkDrawable *drawable,
GdkGC *gc,
GdkPoint *points,
......@@ -913,21 +1007,23 @@ gdk_fb_drawable_clear (GdkDrawable *d)
}
static void
gdk_fb_draw_glyphs (GdkDrawable *drawable,
GdkGC *gc,
PangoFont *font,
gint x,
gint y,
PangoGlyphString *glyphs)
_gdk_fb_draw_glyphs (GdkDrawable *drawable,
GdkGC *gc,
PangoFont *font,
gint x,
gint y,
PangoGlyphString *glyphs,
GdkRectangle *bbox)
{
GdkFBDrawingContext fbdc;
FT_Bitmap bitmap;
GdkPixmapFBData pixmap;
PangoFT2Subfont subfont_index;
PangoGlyphInfo *gi;
FT_Face face;
FT_UInt glyph_index;
int i, xpos;
int maxy, miny;
int topy;
g_return_if_fail (font);
......@@ -938,6 +1034,8 @@ gdk_fb_draw_glyphs (GdkDrawable *drawable,
pixmap.drawable_data.abs_x = 0;
pixmap.drawable_data.abs_y = 0;
pixmap.drawable_data.depth = 78;
maxy = miny = 0;
gi = glyphs->glyphs;
for (i = 0, xpos = 0; i < glyphs->num_glyphs; i++, gi++)
......@@ -959,12 +1057,15 @@ gdk_fb_draw_glyphs (GdkDrawable *drawable,
pixmap.drawable_data.rowstride = face->glyph->bitmap.pitch;
pixmap.drawable_data.width = face->glyph->bitmap.width;
pixmap.drawable_data.height = face->glyph->bitmap.rows;
topy = y - face->glyph->bitmap_top + 1;
miny = MIN (miny, topy);
maxy = MAX (maxy, topy + face->glyph->bitmap.rows);
gdk_fb_draw_drawable_3 (drawable, gc, (GdkPixmap *)&pixmap,
&fbdc,
0, 0,
x + PANGO_PIXELS (xpos) + face->glyph->bitmap_left,
y - face->glyph->bitmap_top + 1,
topy,
face->glyph->bitmap.width, face->glyph->bitmap.rows);
}
}
......@@ -972,8 +1073,26 @@ gdk_fb_draw_glyphs (GdkDrawable *drawable,
}
gdk_fb_drawing_context_finalize (&fbdc);
if (bbox)
{
bbox->x = x;
bbox->y = miny;
bbox->width = xpos;
bbox->height = maxy - miny;
}
}
static void
gdk_fb_draw_glyphs (GdkDrawable *drawable,
GdkGC *gc,
PangoFont *font,
gint x,
gint y,
PangoGlyphString *glyphs)
{
_gdk_fb_draw_glyphs (drawable, gc, font, x, y, glyphs, NULL);
}
static void
gdk_fb_draw_image (GdkDrawable *drawable,
......@@ -1021,3 +1140,328 @@ gdk_fb_get_visual (GdkDrawable *drawable)
{
return gdk_visual_get_system();
}
#ifdef ENABLE_SHADOW_FB
static void
gdk_shadow_fb_draw_rectangle (GdkDrawable *drawable,
GdkGC *gc,
gint filled,
gint x,
gint y,