Commit 6d7a643f authored by Elliot Lee's avatar Elliot Lee

(Part 2) Remove gdk_*_lookup() defines, since they are defined by the



(Part 2)
	* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
	individual backends already.
	* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
	again. Yes, there really is a good reason for this, if you are using the gdkregion
	internals, and if you're not, why do you care?
	* gdk/gdkwindow.c: Fix inverted condition
	* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
	* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
	* gtk/gtkrange.c: Redraw trough when moving.
	* gtk/gtktypeutils.c: Fix warning by adding const cast.
	* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
parent 72aa0d66
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
again. Yes, there really is a good reason for this, if you are using the gdkregion
internals, and if you're not, why do you care?
* gdk/gdkwindow.c: Fix inverted condition
* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
* gtk/gtkrange.c: Redraw trough when moving.
* gtk/gtktypeutils.c: Fix warning by adding const cast.
* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
2000-07-23 Tor Lillqvist <tml@iki.fi>
* configure.in: Check for mkstemp and sigsetjmp. Output
......
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
again. Yes, there really is a good reason for this, if you are using the gdkregion
internals, and if you're not, why do you care?
* gdk/gdkwindow.c: Fix inverted condition
* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
* gtk/gtkrange.c: Redraw trough when moving.
* gtk/gtktypeutils.c: Fix warning by adding const cast.
* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
2000-07-23 Tor Lillqvist <tml@iki.fi>
* configure.in: Check for mkstemp and sigsetjmp. Output
......
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
again. Yes, there really is a good reason for this, if you are using the gdkregion
internals, and if you're not, why do you care?
* gdk/gdkwindow.c: Fix inverted condition
* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
* gtk/gtkrange.c: Redraw trough when moving.
* gtk/gtktypeutils.c: Fix warning by adding const cast.
* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
2000-07-23 Tor Lillqvist <tml@iki.fi>
* configure.in: Check for mkstemp and sigsetjmp. Output
......
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
again. Yes, there really is a good reason for this, if you are using the gdkregion
internals, and if you're not, why do you care?
* gdk/gdkwindow.c: Fix inverted condition
* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
* gtk/gtkrange.c: Redraw trough when moving.
* gtk/gtktypeutils.c: Fix warning by adding const cast.
* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
2000-07-23 Tor Lillqvist <tml@iki.fi>
* configure.in: Check for mkstemp and sigsetjmp. Output
......
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
again. Yes, there really is a good reason for this, if you are using the gdkregion
internals, and if you're not, why do you care?
* gdk/gdkwindow.c: Fix inverted condition
* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
* gtk/gtkrange.c: Redraw trough when moving.
* gtk/gtktypeutils.c: Fix warning by adding const cast.
* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
2000-07-23 Tor Lillqvist <tml@iki.fi>
* configure.in: Check for mkstemp and sigsetjmp. Output
......
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
again. Yes, there really is a good reason for this, if you are using the gdkregion
internals, and if you're not, why do you care?
* gdk/gdkwindow.c: Fix inverted condition
* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
* gtk/gtkrange.c: Redraw trough when moving.
* gtk/gtktypeutils.c: Fix warning by adding const cast.
* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
2000-07-23 Tor Lillqvist <tml@iki.fi>
* configure.in: Check for mkstemp and sigsetjmp. Output
......
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
again. Yes, there really is a good reason for this, if you are using the gdkregion
internals, and if you're not, why do you care?
* gdk/gdkwindow.c: Fix inverted condition
* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
* gtk/gtkrange.c: Redraw trough when moving.
* gtk/gtktypeutils.c: Fix warning by adding const cast.
* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
2000-07-23 Tor Lillqvist <tml@iki.fi>
* configure.in: Check for mkstemp and sigsetjmp. Output
......
......@@ -32,6 +32,7 @@ LDFLAGS = @STRIP_BEGIN@ \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-dynamic \
-rpath @prefix@/lib \
-L../gdk-pixbuf/.libs -lgdk_pixbuf \
@PANGO_LIBS@ \
@GLIB_DEPLIBS@ \
@more_ldflags@ \
......
......@@ -47,10 +47,6 @@ extern "C" {
#define GDK_WINDOW_TYPE(d) (((GdkWindowObject*)(GDK_WINDOW (d)))->window_type)
#define GDK_WINDOW_DESTROYED(d) (((GdkWindowObject*)(GDK_WINDOW (d)))->destroyed)
#define gdk_window_lookup(xid) ((GdkWindow*) gdk_xid_table_lookup (xid))
#define gdk_pixmap_lookup(xid) ((GdkPixmap*) gdk_xid_table_lookup (xid))
#define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid))
typedef struct _GdkColorInfo GdkColorInfo;
typedef struct _GdkFontPrivate GdkFontPrivate;
typedef struct _GdkEventFilter GdkEventFilter;
......
......@@ -45,12 +45,7 @@ SOFTWARE.
#ifndef __GDK_REGION_GENERIC_H__
#define __GDK_REGION_GENERIC_H__
typedef struct _GdkRegionBox GdkRegionBox;
struct _GdkRegionBox
{
int x1, x2, y1, y2;
};
typedef GdkSegment GdkRegionBox;
/*
* clip region
......
......@@ -1631,7 +1631,7 @@ gdk_window_invalidate_region (GdkWindow *window,
GdkWindowObject *child = tmp_list->data;
tmp_list = tmp_list->next;
if (child->input_only)
if (!child->input_only)
{
gint width, height;
......
......@@ -155,12 +155,12 @@ struct _GdkWindowObject
{
GdkDrawable parent_instance;
gpointer user_data;
GdkDrawable *impl; /* window-system-specific delegate object */
GdkWindowObject *parent;
gpointer user_data;
gint x;
gint y;
......
. Fix CTree
. DnD?
. All the standard X cursors
. Fix xbm cursors (almost done, need to figure out edges thingie).
. When cursor is changed on active window, really change the cursor
. Faster
......@@ -35,6 +35,71 @@
static gint gdk_colormap_match_color (GdkColormap *cmap,
GdkColor *color,
const gchar *available);
static gpointer parent_class;
static void
gdk_colormap_finalize (GObject *object)
{
GdkColormap *colormap = GDK_COLORMAP(object);
GdkColormapPrivateFB *private = (GdkColormapPrivateFB*) colormap;
if (private->hash)
g_hash_table_destroy (private->hash);
g_free (private->info);
g_free (colormap->colors);
G_OBJECT_CLASS(parent_class)->finalize(object);
}
static void
gdk_colormap_init (GdkColormap *colormap)
{
colormap->windowing_data = NULL;
colormap->size = 0;
colormap->colors = NULL;
}
static void
gdk_colormap_class_init (GdkColormapClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gdk_colormap_finalize;
}
GType
gdk_colormap_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
static const GTypeInfo object_info =
{
sizeof (GdkColormapFBClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_colormap_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkColormapPrivateFB),
0, /* n_preallocs */
(GInstanceInitFunc) gdk_colormap_init,
};
object_type = g_type_register_static (G_TYPE_OBJECT,
"GdkColormap",
&object_info);
}
return object_type;
}
GdkColormap*
gdk_colormap_new (GdkVisual *visual,
gint private_cmap)
......@@ -46,11 +111,10 @@ gdk_colormap_new (GdkVisual *visual,
g_return_val_if_fail (visual != NULL, NULL);
private = g_new (GdkColormapPrivateFB, 1);
private = (GdkColormapPrivateFB *)g_type_create_instance(gdk_colormap_get_type());
colormap = (GdkColormap*) private;
private->base.visual = visual;
private->base.ref_count = 1;
fbd = gdk_display;
private->hash = NULL;
......@@ -125,19 +189,6 @@ gdk_colormap_new (GdkVisual *visual,
return colormap;
}
void
_gdk_colormap_real_destroy (GdkColormap *colormap)
{
GdkColormapPrivateFB *private = (GdkColormapPrivateFB*) colormap;
if (private->hash)
g_hash_table_destroy (private->hash);
g_free (private->info);
g_free (colormap->colors);
g_free (colormap);
}
#define MIN_SYNC_TIME 2
void
......
This diff is collapsed.
......@@ -53,67 +53,92 @@ struct _GdkDragContextPrivate {
/* Drag Contexts */
static GList *contexts;
static gpointer parent_class = NULL;
GdkDragContext *
gdk_drag_context_new (void)
static void
gdk_drag_context_init (GdkDragContext *dragcontext)
{
GdkDragContextPrivate *result;
dragcontext->windowing_data = NULL;
result = g_new0 (GdkDragContextPrivate, 1);
contexts = g_list_prepend (contexts, dragcontext);
}
result->ref_count = 1;
static void
gdk_drag_context_finalize (GObject *object)
{
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
g_list_free (context->targets);
contexts = g_list_prepend (contexts, result);
if (context->source_window)
{
gdk_window_unref (context->source_window);
}
if (context->dest_window)
gdk_window_unref (context->dest_window);
contexts = g_list_remove (contexts, context);
return (GdkDragContext *)result;
G_OBJECT_CLASS (parent_class)->finalize (object);
}
void
gdk_drag_context_ref (GdkDragContext *context)
static void
gdk_drag_context_class_init (GdkDragContextClass *klass)
{
g_return_if_fail (context != NULL);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
((GdkDragContextPrivate *)context)->ref_count++;
object_class->finalize = gdk_drag_context_finalize;
}
void
gdk_drag_context_unref (GdkDragContext *context)
{
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
g_return_if_fail (context != NULL);
g_return_if_fail (private->ref_count > 0);
GType
gdk_drag_context_get_type (void)
{
static GType object_type = 0;
private->ref_count--;
if (private->ref_count == 0)
if (!object_type)
{
g_dataset_destroy (private);
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,
};
g_list_free (context->targets);
if (context->source_window)
{
#if 0
if ((context->protocol == GDK_DRAG_PROTO_XDND) &&
!context->is_source)
xdnd_manage_source_filter (context, context->source_window, FALSE);
#endif
gdk_window_unref (context->source_window);
}
object_type = g_type_register_static (G_TYPE_OBJECT,
"GdkDragContext",
&object_info);
}
return object_type;
}
if (context->dest_window)
gdk_window_unref (context->dest_window);
GdkDragContext *
gdk_drag_context_new (void)
{
return (GdkDragContext *)g_type_create_instance(gdk_drag_context_get_type());
}
#if 0
if (private->window_cache)
gdk_window_cache_destroy (private->window_cache);
#endif
void
gdk_drag_context_ref (GdkDragContext *context)
{
g_object_ref(G_OBJECT(context));
}
contexts = g_list_remove (contexts, private);
g_free (private);
}
void
gdk_drag_context_unref (GdkDragContext *context)
{
g_object_unref(G_OBJECT(context));
}
/*************************************************************
......
This diff is collapsed.
......@@ -110,7 +110,7 @@ gdk_events_init (void)
NULL
};
g_source_add(G_PRIORITY_HIGH_IDLE, TRUE, &fb_events_funcs, NULL, NULL, NULL);
g_source_add(GDK_PRIORITY_EVENTS, TRUE, &fb_events_funcs, NULL, NULL, NULL);
}
/*
......@@ -205,7 +205,9 @@ fb_events_dispatch(gpointer source_data, GTimeVal *dispatch_time, gpointer user_
{
if(event->type == GDK_EXPOSE
&& event->expose.window == gdk_parent_root)
gdk_fb_drawable_clear(event->expose.window);
gdk_window_clear_area(event->expose.window, event->expose.area.x, event->expose.area.y, event->expose.area.width,
event->expose.area.height);
else if(gdk_event_func)
(*gdk_event_func)(event, gdk_event_data);
......
......@@ -15,9 +15,10 @@ extern GdkFBDisplay *gdk_display;
extern const char *gdk_progclass;
#define gdk_window_lookup(xid) (xid)
#define gdk_pixmap_lookup(xid) (xid)
#define gdk_font_lookup(xid) (xid)
#define gdk_window_foreign_new(xid) gdk_window_ref(xid)
#define gdk_window_lookup(xid) ((GdkWindow*) (xid))
#define gdk_pixmap_lookup(xid) ((GdkPixmap*) (xid))
#define gdk_font_lookup(xid) ((GdkFont*) (xid))
#endif /* GDKFB_H */
......@@ -8,7 +8,7 @@ typedef enum {
GDK_GC_DIRTY_TS = 1 << 1
} GdkGCDirtyValues;
static void gdk_fb_gc_destroy (GdkGC *gc);
static void gdk_fb_gc_finalize (GObject *obj);
static void gdk_fb_gc_get_values (GdkGC *gc,
GdkGCValues *values);
static void gdk_fb_gc_set_values (GdkGC *gc,
......@@ -16,15 +16,52 @@ static void gdk_fb_gc_set_values (GdkGC *gc,
GdkGCValuesMask values_mask);
static void gdk_fb_gc_set_dashes (GdkGC *gc,
gint dash_offset,
gchar dash_list[],
gint8 dash_list[],
gint n);
static GdkGCClass gdk_fb_gc_class = {
gdk_fb_gc_destroy,
gdk_fb_gc_get_values,
gdk_fb_gc_set_values,
gdk_fb_gc_set_dashes
};
static gpointer parent_class = NULL;
static void
gdk_gc_fb_class_init (GdkGCFBClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkGCClass *gc_class = GDK_GC_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gdk_fb_gc_finalize;
gc_class->get_values = gdk_fb_gc_get_values;
gc_class->set_values = gdk_fb_gc_set_values;
gc_class->set_dashes = gdk_fb_gc_set_dashes;
}
GType gdk_gc_fb_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
static const GTypeInfo object_info =
{
sizeof (GdkGCFBClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_gc_fb_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkGCFBData),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
};
object_type = g_type_register_static (GDK_TYPE_GC,
"GdkGCFB",
&object_info);
}
return object_type;
}
GdkGC *
_gdk_fb_gc_new (GdkDrawable *drawable,
......@@ -32,14 +69,13 @@ _gdk_fb_gc_new (GdkDrawable *drawable,
GdkGCValuesMask values_mask)
{
GdkGC *gc;
GdkGCPrivate *private;
GdkGC *private;
GdkGCFBData *data;
gc = gdk_gc_alloc ();
private = (GdkGCPrivate *)gc;
gc = GDK_GC(g_type_create_instance(gdk_gc_fb_get_type()));
private = (GdkGC *)gc;
private->klass = &gdk_fb_gc_class;
private->klass_data = data = g_new0 (GdkGCFBData, 1);
data = (GdkGCFBData *)gc;
data->values.foreground.pixel = 255;
data->values.foreground.red = data->values.foreground.green = data->values.foreground.blue = 65535;
......@@ -49,12 +85,18 @@ _gdk_fb_gc_new (GdkDrawable *drawable,
}
static void
gdk_fb_gc_destroy (GdkGC *gc)
gdk_fb_gc_finalize (GObject *obj)
{
GdkGC *gc = GDK_GC_P(obj);
if (GDK_GC_FBDATA (gc)->clip_region)
gdk_region_destroy (GDK_GC_FBDATA (gc)->clip_region);
g_free (GDK_GC_FBDATA (gc));
if (GDK_GC_FBDATA (gc)->values.clip_mask)
gdk_pixmap_unref(GDK_GC_FBDATA (gc)->values.clip_mask);
if (GDK_GC_FBDATA (gc)->values.stipple)
gdk_pixmap_unref(GDK_GC_FBDATA (gc)->values.stipple);
if (GDK_GC_FBDATA (gc)->values.tile)
gdk_pixmap_unref(GDK_GC_FBDATA (gc)->values.tile);
}
static void
......@@ -110,7 +152,7 @@ gdk_fb_gc_set_values (GdkGC *gc,
{
oldpm = GDK_GC_FBDATA(gc)->values.tile;
if(values->tile)
g_assert(GDK_DRAWABLE_P(values->tile)->depth >= 8);
g_assert(GDK_DRAWABLE_IMPL_FBDATA(values->tile)->depth >= 8);
GDK_GC_FBDATA(gc)->values.tile = values->tile?gdk_pixmap_ref(values->tile):NULL;
GDK_GC_FBDATA(gc)->values_mask |= GDK_GC_TILE;
......@@ -122,7 +164,7 @@ gdk_fb_gc_set_values (GdkGC *gc,
{
oldpm = GDK_GC_FBDATA(gc)->values.stipple;
if(values->stipple)
g_assert(GDK_DRAWABLE_P(values->stipple)->depth == 1);
g_assert(GDK_DRAWABLE_IMPL_FBDATA(values->stipple)->depth == 1);
GDK_GC_FBDATA(gc)->values.stipple = values->stipple?gdk_pixmap_ref(values->stipple):NULL;
GDK_GC_FBDATA(gc)->values_mask |= GDK_GC_STIPPLE;
if(oldpm)
......@@ -209,7 +251,7 @@ gdk_fb_gc_set_values (GdkGC *gc,
static void
gdk_fb_gc_set_dashes (GdkGC *gc,
gint dash_offset,
gchar dash_list[],
gint8 dash_list[],
gint n)
{
GDK_GC_FBDATA(gc)->dash_offset = dash_offset;
......@@ -229,7 +271,6 @@ gdk_fb_gc_set_dashes (GdkGC *gc,
static void
gc_unset_cmask(GdkGC *gc)
{
GdkGCPrivate *private = (GdkGCPrivate *)gc;
GdkGCFBData *data;
data = GDK_GC_FBDATA (gc);
if(data->values.clip_mask)
......@@ -243,7 +284,7 @@ void
gdk_gc_set_clip_rectangle (GdkGC *gc,
GdkRectangle *rectangle)
{
GdkGCPrivate *private = (GdkGCPrivate *)gc;
GdkGC *private = (GdkGC *)gc;
GdkGCFBData *data;
g_return_if_fail (gc != NULL);
......@@ -271,7 +312,7 @@ void
gdk_gc_set_clip_region (GdkGC *gc,
GdkRegion *region)
{
GdkGCPrivate *private = (GdkGCPrivate *)gc;
GdkGC *private = (GdkGC *)gc;
GdkGCFBData *data;
g_return_if_fail (gc != NULL);
......
......@@ -5,22 +5,23 @@ gdk_window_scroll (GdkWindow *window,
gint dx,
gint dy)
{
GdkWindowPrivate *private = GDK_WINDOW_P(window);
GdkWindowObject *private = GDK_WINDOW_P(window);
GdkRegion *invalidate_region;
GdkRectangle dest_rect;
GdkRectangle clip_rect;
GList *tmp_list;
gboolean handle_cursor;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
if (GDK_DRAWABLE_DESTROYED (window))
return;
clip_rect.x = GDK_DRAWABLE_FBDATA(window)->llim_x - GDK_DRAWABLE_FBDATA(window)->abs_x;
clip_rect.y = GDK_DRAWABLE_FBDATA(window)->llim_y - GDK_DRAWABLE_FBDATA(window)->abs_y;
clip_rect.width = GDK_DRAWABLE_FBDATA(window)->lim_x - GDK_DRAWABLE_FBDATA(window)->llim_x;
clip_rect.height = GDK_DRAWABLE_FBDATA(window)->lim_y - GDK_DRAWABLE_FBDATA(window)->llim_y;
clip_rect.x = GDK_DRAWABLE_IMPL_FBDATA(window)->llim_x;
clip_rect.y = GDK_DRAWABLE_IMPL_FBDATA(window)->llim_y;
clip_rect.width = GDK_DRAWABLE_IMPL_FBDATA(window)->lim_x - GDK_DRAWABLE_IMPL_FBDATA(window)->llim_x;
clip_rect.height = GDK_DRAWABLE_IMPL_FBDATA(window)->lim_y - GDK_DRAWABLE_IMPL_FBDATA(window)->llim_y;
handle_cursor = gdk_fb_cursor_need_hide(&clip_rect);
clip_rect.x -= GDK_DRAWABLE_IMPL_FBDATA(window)->abs_x;
clip_rect.y -= GDK_DRAWABLE_IMPL_FBDATA(window)->abs_y;
invalidate_region = gdk_region_rectangle (&clip_rect);
dest_rect = clip_rect;
......@@ -28,6 +29,9 @@ gdk_window_scroll (GdkWindow *window,
dest_rect.y += dy;
gdk_rectangle_intersect (&dest_rect, &clip_rect, &dest_rect);
if(handle_cursor)
gdk_fb_cursor_hide();
if (dest_rect.width > 0 && dest_rect.height > 0)
{
GdkRegion *tmp_region;
......@@ -35,15 +39,21 @@ gdk_window_scroll (GdkWindow *window,
tmp_region = gdk_region_rectangle (&dest_rect);
gdk_region_subtract (invalidate_region, tmp_region);
gdk_region_destroy (tmp_region);
gdk_fb_draw_drawable_2(window, NULL, window, dest_rect.x - dx, dest_rect.y - dy, dest_rect.x, dest_rect.y,
gdk_fb_draw_drawable_2(GDK_DRAWABLE_IMPL(window), NULL, GDK_DRAWABLE_IMPL(window), dest_rect.x - dx, dest_rect.y - dy, dest_rect.x, dest_rect.y,
dest_rect.width, dest_rect.height,
FALSE, FALSE);
}
gdk_window_invalidate_region (window, invalidate_region, TRUE);
gdk_region_destroy (invalidate_region);
for(tmp_list = private->children; tmp_list; tmp_list = tmp_list->next)
gdk_window_move (tmp_list->data, GDK_WINDOW_P(tmp_list->data)->x + dx, GDK_WINDOW_P(tmp_list->data)->y + dy);
gdk_fb_window_move_resize (tmp_list->data,
GDK_WINDOW_OBJECT(tmp_list->data)->x + dx, GDK_WINDOW_OBJECT(tmp_list->data)->y + dy,
GDK_DRAWABLE_IMPL_FBDATA(tmp_list->data)->width,
GDK_DRAWABLE_IMPL_FBDATA(tmp_list->data)->height,
FALSE);
if(handle_cursor)
gdk_fb_cursor_unhide();
}
......@@ -39,26 +39,68 @@
#include "gdkprivate.h"
#include "gdkprivate-fb.h"
struct _GdkImagePrivateFB
static gpointer parent_class = NULL;
void _gdk_windowing_image_init(void)
{
}
static void
gdk_image_init (GdkImage *image)
{
}
static void
gdk_image_finalize (GObject *object)
{
GdkImagePrivate base;
};
static void gdk_fb_image_destroy (GdkImage *image);
static void gdk_image_put_normal (GdkImage *image,
GdkDrawable *drawable,
GdkGC *gc,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height);
static GdkImageClass image_class_normal = {
gdk_fb_image_destroy,
gdk_image_put_normal
};
GdkImage *image = GDK_IMAGE (object);
GdkImagePrivateFB *private;