forked from AuroraMiddleware/gtk
*** empty log message ***
This commit is contained in:
parent
2eb7985b0b
commit
dd7510dccb
@ -27,7 +27,8 @@ typedef enum
|
||||
* drags */
|
||||
GDK_DRAG_PROTO_NONE, /* Not a valid drag window */
|
||||
GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
|
||||
GDK_DRAG_PROTO_OLE2 /* The complex OLE2 dnd (not implemented) */
|
||||
GDK_DRAG_PROTO_OLE2, /* The complex OLE2 dnd (not implemented) */
|
||||
GDK_DRAG_PROTO_LOCAL /* Intra-app */
|
||||
} GdkDragProtocol;
|
||||
|
||||
/* Structure that holds information about a drag in progress.
|
||||
|
@ -375,7 +375,6 @@ gdk_draw_image (GdkDrawable *drawable,
|
||||
if (height == -1)
|
||||
height = image->height;
|
||||
|
||||
|
||||
if (GDK_IS_WINDOW (drawable))
|
||||
_gdk_window_draw_image (drawable, gc, image, xsrc, ysrc,
|
||||
xdest, ydest, width, height);
|
||||
|
@ -135,7 +135,6 @@ gdk_event_queue_remove_link (GList *node)
|
||||
node->next->prev = node->prev;
|
||||
else
|
||||
gdk_queued_tail = node->prev;
|
||||
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
|
@ -342,8 +342,8 @@ struct _GdkEventSelection
|
||||
GdkAtom selection;
|
||||
GdkAtom target;
|
||||
GdkAtom property;
|
||||
guint32 requestor;
|
||||
guint32 time;
|
||||
GdkNativeWindow requestor;
|
||||
};
|
||||
|
||||
/* This event type will be used pretty rarely. It only is important
|
||||
|
@ -73,6 +73,7 @@ typedef enum
|
||||
GDK_COPY_INVERT,
|
||||
GDK_OR_INVERT,
|
||||
GDK_NAND,
|
||||
GDK_NOR,
|
||||
GDK_SET
|
||||
} GdkFunction;
|
||||
|
||||
|
@ -49,10 +49,9 @@ extern "C" {
|
||||
GDK_DRAWABLE_TYPE(d) == GDK_WINDOW_FOREIGN)
|
||||
#define GDK_IS_PIXMAP(d) (GDK_DRAWABLE_TYPE(d) == GDK_DRAWABLE_PIXMAP)
|
||||
#define GDK_DRAWABLE_DESTROYED(d) (((GdkDrawablePrivate *)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))
|
||||
#define GDK_DRAWABLE_P(d) ((GdkDrawablePrivate*)d)
|
||||
#define GDK_WINDOW_P(d) ((GdkWindowPrivate*)d)
|
||||
#define GDK_GC_P(d) ((GdkGCPrivate*)d)
|
||||
|
||||
typedef struct _GdkDrawablePrivate GdkDrawablePrivate;
|
||||
typedef struct _GdkWindowPrivate GdkWindowPrivate;
|
||||
|
@ -45,12 +45,9 @@ SOFTWARE.
|
||||
#ifndef __GDK_REGION_GENERIC_H__
|
||||
#define __GDK_REGION_GENERIC_H__
|
||||
|
||||
typedef struct _GdkRegionBox GdkRegionBox;
|
||||
#include "gdktypes.h"
|
||||
|
||||
struct _GdkRegionBox
|
||||
{
|
||||
int x1, x2, y1, y2;
|
||||
};
|
||||
typedef GdkSegment GdkRegionBox;
|
||||
|
||||
/*
|
||||
* clip region
|
||||
|
@ -76,6 +76,12 @@ typedef struct _GdkSegment GdkSegment;
|
||||
*/
|
||||
typedef guint32 GdkWChar;
|
||||
typedef gulong GdkAtom;
|
||||
|
||||
#ifdef GDK_NATIVE_WINDOW_POINTER
|
||||
typedef gpointer GdkNativeWindow;
|
||||
#else
|
||||
typedef guint32 GdkNativeWindow;
|
||||
#endif
|
||||
|
||||
/* Forward declarations of commonly used types
|
||||
*/
|
||||
|
@ -657,7 +657,7 @@ gdk_window_begin_paint_region (GdkWindow *window,
|
||||
{
|
||||
tmp_paint = private->paint_stack->data;
|
||||
gdk_region_subtract (init_region, tmp_paint->region);
|
||||
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
}
|
||||
@ -745,6 +745,7 @@ gdk_window_free_paint_stack (GdkWindow *window)
|
||||
while (tmp_list)
|
||||
{
|
||||
GdkWindowPaint *paint = tmp_list->data;
|
||||
|
||||
if (tmp_list == private->paint_stack)
|
||||
gdk_drawable_unref (paint->pixmap);
|
||||
|
||||
@ -1119,6 +1120,7 @@ gdk_window_draw_glyphs (GdkDrawable *drawable,
|
||||
if (private->paint_stack)
|
||||
{
|
||||
GdkWindowPaint *paint = private->paint_stack->data;
|
||||
|
||||
gdk_draw_glyphs (paint->pixmap, gc, font, x - x_offset, y - y_offset, glyphs);
|
||||
}
|
||||
else
|
||||
|
@ -9,23 +9,22 @@ INCLUDES = @STRIP_BEGIN@ \
|
||||
@GTK_XIM_FLAGS@ \
|
||||
@GTK_LOCALE_FLAGS@ \
|
||||
@GLIB_CFLAGS@ \
|
||||
@PANGO_CFLAGS@ \
|
||||
@STRIP_END@
|
||||
|
||||
LDFLAGS = @STRIP_BEGIN@ \
|
||||
@GLIB_LIBS@ \
|
||||
-L/gnome2/lib \
|
||||
-lt1 \
|
||||
@PANGO_CFLAGS@ \
|
||||
-lfreetype \
|
||||
-lm \
|
||||
@STRIP_END@
|
||||
|
||||
if USE_LINUX_FB
|
||||
noinst_LTLIBRARIES = libgdk-linux-fb.la
|
||||
noinst_PROGRAMS=#test-fb
|
||||
|
||||
lib_LTLIBRARIES = libgdk-fb.la
|
||||
noinst_PROGRAMS=test-fb
|
||||
#test_fb_LDFLAGS=../libgdk.la libgdk-linux-fb.la
|
||||
|
||||
test_fb_LDFLAGS=../libgdk.la libgdk-fb.la
|
||||
|
||||
libgdk_fb_la_SOURCES = \
|
||||
libgdk_linux_fb_la_SOURCES = \
|
||||
gdkcolor-fb.c \
|
||||
gdkcursor-fb.c \
|
||||
gdkdnd-fb.c \
|
||||
@ -57,10 +56,6 @@ libgdk_fb_la_SOURCES = \
|
||||
miwideline.c \
|
||||
mizerclip.c \
|
||||
mizerline.c \
|
||||
mispans.c \
|
||||
gdkpango-fb.c
|
||||
mispans.c
|
||||
else
|
||||
lib_LTLIBRARIES =
|
||||
noinst_PROGRAMS=
|
||||
|
||||
endif
|
||||
|
||||
|
@ -28,20 +28,199 @@
|
||||
#include "gdkprivate-fb.h"
|
||||
#include "gdkcursor.h"
|
||||
|
||||
#include "/home/sopwith/bin/t.xbm"
|
||||
|
||||
static struct {
|
||||
const guchar *bits;
|
||||
int width, height, hotx, hoty;
|
||||
GdkPixmap *pm;
|
||||
} stock_cursors[] = {
|
||||
{X_cursor_bits, 14, 14, 6, 8},
|
||||
{X_cursor_mask_bits, 16, 16, 7, 9},
|
||||
{arrow_bits, 14, 14, 13, 14},
|
||||
{arrow_mask_bits, 16, 16, 14, 15},
|
||||
{based_arrow_down_bits, 8, 10, 3, 1},
|
||||
{based_arrow_down_mask_bits, 10, 12, 4, 2},
|
||||
{based_arrow_up_bits, 8, 10, 3, 1},
|
||||
{based_arrow_up_mask_bits, 10, 12, 4, 2},
|
||||
{boat_bits, 16, 8, 14, 5},
|
||||
{boat_mask_bits, 16, 9, 14, 5},
|
||||
{bogosity_bits, 13, 14, 6, 8},
|
||||
{bogosity_mask_bits, 15, 16, 7, 9},
|
||||
{bottom_left_corner_bits, 14, 14, 0, 1},
|
||||
{bottom_left_corner_mask_bits, 16, 16, 1, 2},
|
||||
{bottom_right_corner_bits, 14, 14, 13, 1},
|
||||
{bottom_right_corner_mask_bits, 16, 16, 14, 2},
|
||||
{bottom_side_bits, 13, 14, 6, 1},
|
||||
{bottom_side_mask_bits, 15, 16, 7, 2},
|
||||
{bottom_tee_bits, 14, 10, 7, 1},
|
||||
{bottom_tee_mask_bits, 16, 12, 8, 2},
|
||||
{box_spiral_bits, 15, 16, 8, 8},
|
||||
{box_spiral_mask_bits, 16, 16, 8, 8},
|
||||
{center_ptr_bits, 10, 14, 4, 14},
|
||||
{center_ptr_mask_bits, 12, 16, 5, 15},
|
||||
{circle_bits, 14, 14, 7, 7},
|
||||
{circle_mask_bits, 16, 16, 8, 8},
|
||||
{clock_bits, 14, 16, 6, 13},
|
||||
{clock_mask_bits, 15, 16, 6, 13},
|
||||
{coffee_mug_bits, 15, 16, 7, 7},
|
||||
{coffee_mug_mask_bits, 16, 16, 7, 7},
|
||||
{cross_bits, 16, 15, 7, 8},
|
||||
{cross_mask_bits, 16, 16, 7, 9},
|
||||
{cross_reverse_bits, 16, 15, 7, 8},
|
||||
{cross_reverse_mask_bits, 16, 15, 7, 8},
|
||||
{crosshair_bits, 16, 15, 7, 8},
|
||||
{crosshair_mask_bits, 16, 16, 7, 9},
|
||||
{diamond_cross_bits, 15, 15, 7, 8},
|
||||
{diamond_cross_mask_bits, 16, 16, 7, 9},
|
||||
{dot_bits, 10, 10, 5, 5},
|
||||
{dot_mask_bits, 12, 12, 6, 6},
|
||||
{dotbox_bits, 12, 12, 6, 7},
|
||||
{dotbox_mask_bits, 14, 14, 7, 8},
|
||||
{double_arrow_bits, 10, 14, 5, 7},
|
||||
{double_arrow_mask_bits, 12, 16, 6, 8},
|
||||
{draft_large_bits, 15, 15, 14, 15},
|
||||
{draft_large_mask_bits, 15, 16, 14, 16},
|
||||
{draft_small_bits, 15, 15, 14, 15},
|
||||
{draft_small_mask_bits, 15, 15, 14, 15},
|
||||
{draped_box_bits, 12, 12, 6, 7},
|
||||
{draped_box_mask_bits, 14, 14, 7, 8},
|
||||
{exchange_bits, 14, 14, 6, 8},
|
||||
{exchange_mask_bits, 16, 16, 7, 9},
|
||||
{fleur_bits, 14, 14, 7, 7},
|
||||
{fleur_mask_bits, 16, 16, 8, 8},
|
||||
{gobbler_bits, 16, 15, 14, 13},
|
||||
{gobbler_mask_bits, 16, 16, 14, 13},
|
||||
{gumby_bits, 16, 16, 2, 16},
|
||||
{gumby_mask_bits, 16, 16, 2, 16},
|
||||
{hand1_bits, 13, 16, 12, 16},
|
||||
{hand1_mask_bits, 13, 16, 12, 16},
|
||||
{hand2_bits, 15, 14, 0, 14},
|
||||
{hand2_mask_bits, 16, 16, 0, 15},
|
||||
{heart_bits, 15, 14, 6, 6},
|
||||
{heart_mask_bits, 15, 14, 6, 6},
|
||||
{icon_bits, 16, 16, 8, 8},
|
||||
{icon_mask_bits, 16, 16, 8, 8},
|
||||
{iron_cross_bits, 14, 14, 7, 8},
|
||||
{iron_cross_mask_bits, 16, 16, 8, 9},
|
||||
{left_ptr_bits, 8, 14, 0, 14},
|
||||
{left_ptr_mask_bits, 10, 16, 1, 15},
|
||||
{left_side_bits, 14, 13, 0, 7},
|
||||
{left_side_mask_bits, 16, 15, 1, 8},
|
||||
{left_tee_bits, 10, 14, 0, 7},
|
||||
{left_tee_mask_bits, 12, 16, 1, 8},
|
||||
{leftbutton_bits, 16, 16, 8, 8},
|
||||
{leftbutton_mask_bits, 15, 16, 8, 8},
|
||||
{ll_angle_bits, 10, 10, 0, 1},
|
||||
{ll_angle_mask_bits, 12, 12, 1, 2},
|
||||
{lr_angle_bits, 10, 10, 9, 1},
|
||||
{lr_angle_mask_bits, 12, 12, 10, 2},
|
||||
{man_bits, 16, 16, 14, 11},
|
||||
{man_mask_bits, 16, 16, 14, 11},
|
||||
{middlebutton_bits, 16, 16, 8, 8},
|
||||
{middlebutton_mask_bits, 15, 16, 8, 8},
|
||||
{mouse_bits, 15, 14, 4, 13},
|
||||
{mouse_mask_bits, 16, 16, 4, 15},
|
||||
{pencil_bits, 11, 16, 10, 1},
|
||||
{pencil_mask_bits, 13, 16, 11, 1},
|
||||
{pirate_bits, 15, 16, 7, 4},
|
||||
{pirate_mask_bits, 16, 16, 7, 4},
|
||||
{plus_bits, 10, 10, 4, 5},
|
||||
{plus_mask_bits, 12, 12, 5, 6},
|
||||
{question_arrow_bits, 9, 15, 4, 8},
|
||||
{question_arrow_mask_bits, 11, 16, 5, 8},
|
||||
{right_ptr_bits, 8, 14, 7, 14},
|
||||
{right_ptr_mask_bits, 10, 16, 8, 15},
|
||||
{right_side_bits, 14, 13, 13, 7},
|
||||
{right_side_mask_bits, 16, 15, 14, 8},
|
||||
{right_tee_bits, 10, 14, 9, 7},
|
||||
{right_tee_mask_bits, 12, 16, 10, 8},
|
||||
{rightbutton_bits, 16, 16, 8, 8},
|
||||
{rightbutton_mask_bits, 15, 16, 8, 8},
|
||||
{rtl_logo_bits, 14, 14, 6, 8},
|
||||
{rtl_logo_mask_bits, 16, 16, 7, 9},
|
||||
{sailboat_bits, 12, 13, 6, 14},
|
||||
{sailboat_mask_bits, 16, 16, 8, 16},
|
||||
{sb_down_arrow_bits, 7, 15, 3, 0},
|
||||
{sb_down_arrow_mask_bits, 9, 16, 4, 1},
|
||||
{sb_h_double_arrow_bits, 15, 7, 7, 4},
|
||||
{sb_h_double_arrow_mask_bits, 15, 9, 7, 5},
|
||||
{sb_left_arrow_bits, 15, 7, -1, 4},
|
||||
{sb_left_arrow_mask_bits, 16, 9, 0, 5},
|
||||
{sb_right_arrow_bits, 15, 7, 15, 4},
|
||||
{sb_right_arrow_mask_bits, 16, 9, 15, 5},
|
||||
{sb_up_arrow_bits, 7, 15, 3, 16},
|
||||
{sb_up_arrow_mask_bits, 9, 16, 4, 16},
|
||||
{sb_v_double_arrow_bits, 7, 15, 3, 8},
|
||||
{sb_v_double_arrow_mask_bits, 9, 15, 4, 8},
|
||||
{shuttle_bits, 15, 16, 10, 16},
|
||||
{shuttle_mask_bits, 16, 16, 11, 16},
|
||||
{sizing_bits, 14, 14, 7, 7},
|
||||
{sizing_mask_bits, 16, 16, 8, 8},
|
||||
{spider_bits, 16, 16, 6, 9},
|
||||
{spider_mask_bits, 16, 16, 6, 9},
|
||||
{spraycan_bits, 11, 16, 9, 14},
|
||||
{spraycan_mask_bits, 12, 16, 10, 14},
|
||||
{star_bits, 15, 16, 7, 9},
|
||||
{star_mask_bits, 16, 16, 7, 9},
|
||||
{target_bits, 15, 13, 7, 7},
|
||||
{target_mask_bits, 16, 14, 7, 7},
|
||||
{tcross_bits, 13, 13, 6, 7},
|
||||
{tcross_mask_bits, 15, 15, 7, 8},
|
||||
{top_left_arrow_bits, 14, 14, 0, 14},
|
||||
{top_left_arrow_mask_bits, 16, 16, 1, 15},
|
||||
{top_left_corner_bits, 14, 14, 0, 14},
|
||||
{top_left_corner_mask_bits, 16, 16, 1, 15},
|
||||
{top_right_corner_bits, 14, 14, 13, 14},
|
||||
{top_right_corner_mask_bits, 16, 16, 14, 15},
|
||||
{top_side_bits, 13, 14, 6, 14},
|
||||
{top_side_mask_bits, 15, 16, 7, 15},
|
||||
{top_tee_bits, 14, 10, 7, 10},
|
||||
{top_tee_mask_bits, 16, 12, 8, 11},
|
||||
{trek_bits, 7, 16, 3, 16},
|
||||
{trek_mask_bits, 9, 16, 4, 16},
|
||||
{ul_angle_bits, 10, 10, 0, 10},
|
||||
{ul_angle_mask_bits, 12, 12, 1, 11},
|
||||
{umbrella_bits, 14, 14, 7, 12},
|
||||
{umbrella_mask_bits, 16, 16, 8, 14},
|
||||
{ur_angle_bits, 10, 10, 9, 10},
|
||||
{ur_angle_mask_bits, 12, 12, 10, 11},
|
||||
{watch_bits, 16, 16, 15, 7},
|
||||
{watch_mask_bits, 16, 16, 15, 7},
|
||||
{xterm_bits, 7, 14, 3, 7},
|
||||
{xterm_mask_bits, 9, 16, 4, 8}
|
||||
};
|
||||
|
||||
GdkCursor*
|
||||
gdk_cursor_new (GdkCursorType cursor_type)
|
||||
{
|
||||
GdkCursorPrivateFB *private;
|
||||
GdkCursor *cursor;
|
||||
GdkPixmap *pm, *mask;
|
||||
|
||||
return NULL;
|
||||
if(cursor_type >= sizeof(stock_cursors)/sizeof(stock_cursors[0]))
|
||||
return NULL;
|
||||
|
||||
private = g_new0(GdkCursorPrivateFB, 1);
|
||||
cursor = (GdkCursor*) private;
|
||||
cursor->type = cursor_type;
|
||||
cursor->ref_count = 1;
|
||||
|
||||
return cursor;
|
||||
pm = stock_cursors[cursor_type].pm;
|
||||
if(!pm)
|
||||
{
|
||||
pm = stock_cursors[cursor_type].pm = gdk_bitmap_create_from_data(gdk_parent_root,
|
||||
stock_cursors[cursor_type].bits,
|
||||
stock_cursors[cursor_type].width,
|
||||
stock_cursors[cursor_type].height);
|
||||
gdk_pixmap_ref(pm);
|
||||
}
|
||||
mask = stock_cursors[cursor_type+1].pm;
|
||||
if(!mask)
|
||||
{
|
||||
mask = stock_cursors[cursor_type+1].pm = gdk_bitmap_create_from_data(gdk_parent_root,
|
||||
stock_cursors[cursor_type+1].bits,
|
||||
stock_cursors[cursor_type+1].width,
|
||||
stock_cursors[cursor_type+1].height);
|
||||
gdk_pixmap_ref(mask);
|
||||
}
|
||||
|
||||
return gdk_cursor_new_from_pixmap(pm, mask, NULL, NULL,
|
||||
stock_cursors[cursor_type].hotx,
|
||||
stock_cursors[cursor_type].hoty);
|
||||
}
|
||||
|
||||
GdkCursor*
|
||||
@ -63,6 +242,8 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
cursor->ref_count = 1;
|
||||
private->cursor = gdk_pixmap_ref(source);
|
||||
private->mask = gdk_pixmap_ref(mask);
|
||||
private->hot_x = x;
|
||||
private->hot_y = y;
|
||||
|
||||
return cursor;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -90,10 +90,27 @@ static GSourceFuncs event_funcs = {
|
||||
* Functions for maintaining the event queue *
|
||||
*********************************************/
|
||||
|
||||
static gboolean fb_events_prepare(gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gint *timeout,
|
||||
gpointer user_data);
|
||||
static gboolean fb_events_check(gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gpointer user_data);
|
||||
static gboolean fb_events_dispatch(gpointer source_data,
|
||||
GTimeVal *dispatch_time,
|
||||
gpointer user_data);
|
||||
void
|
||||
gdk_events_init (void)
|
||||
{
|
||||
|
||||
static GSourceFuncs fb_events_funcs = {
|
||||
fb_events_prepare,
|
||||
fb_events_check,
|
||||
fb_events_dispatch,
|
||||
NULL
|
||||
};
|
||||
|
||||
g_source_add(G_PRIORITY_HIGH_IDLE, TRUE, &fb_events_funcs, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -121,21 +138,64 @@ gdk_events_pending (void)
|
||||
GdkEvent*
|
||||
gdk_event_get_graphics_expose (GdkWindow *window)
|
||||
{
|
||||
GList *ltmp;
|
||||
g_return_val_if_fail (window != NULL, NULL);
|
||||
|
||||
return NULL;
|
||||
for(ltmp = gdk_queued_events; ltmp; ltmp = ltmp->next)
|
||||
{
|
||||
GdkEvent *event = ltmp->data;
|
||||
if(event->type == GDK_EXPOSE
|
||||
&& event->expose.window == window)
|
||||
break;
|
||||
}
|
||||
|
||||
if(ltmp)
|
||||
{
|
||||
GdkEvent *retval = ltmp->data;
|
||||
|
||||
gdk_event_queue_remove_link(ltmp);
|
||||
g_list_free_1(ltmp);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_events_queue (void)
|
||||
{
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
static gint handler_tag = 0;
|
||||
static gboolean
|
||||
fb_events_prepare(gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gint *timeout,
|
||||
gpointer user_data)
|
||||
{
|
||||
*timeout = -1;
|
||||
|
||||
return fb_events_check(source_data, current_time, user_data);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
dispatch_events(gpointer data)
|
||||
fb_events_check(gpointer source_data,
|
||||
GTimeVal *current_time,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean retval;
|
||||
|
||||
GDK_THREADS_ENTER();
|
||||
|
||||
retval = (gdk_event_queue_find_first () != NULL);
|
||||
|
||||
GDK_THREADS_LEAVE();
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fb_events_dispatch(gpointer source_data, GTimeVal *dispatch_time, gpointer user_data)
|
||||
{
|
||||
GdkEvent *event;
|
||||
|
||||
@ -148,31 +208,13 @@ dispatch_events(gpointer data)
|
||||
gdk_fb_drawable_clear(event->expose.window);
|
||||
else if(gdk_event_func)
|
||||
(*gdk_event_func)(event, gdk_event_data);
|
||||
|
||||
gdk_event_free(event);
|
||||
}
|
||||
|
||||
GDK_THREADS_LEAVE();
|
||||
if(event && !handler_tag)
|
||||
handler_tag = g_idle_add_full(G_PRIORITY_HIGH_IDLE, dispatch_events, NULL, NULL);
|
||||
else if(!event && handler_tag)
|
||||
{
|
||||
g_source_remove(handler_tag);
|
||||
handler_tag = 0;
|
||||
}
|
||||
|
||||
return handler_tag?TRUE:FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_event_queue_changed(GList *queue)
|
||||
{
|
||||
if(queue && !handler_tag)
|
||||
handler_tag = g_idle_add_full(G_PRIORITY_HIGH_IDLE, dispatch_events, NULL, NULL);
|
||||
else if(!queue && handler_tag)
|
||||
{
|
||||
g_source_remove(handler_tag);
|
||||
handler_tag = 0;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -15,4 +15,9 @@ 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)
|
||||
|
||||
#endif /* GDKFB_H */
|
||||
|
@ -24,12 +24,36 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include <t1lib.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include "gdkfont.h"
|
||||
#include "gdkprivate-fb.h"
|
||||
#include "gdkpango.h"
|
||||
|
||||
#include <pango/pango.h>
|
||||
|
||||
#include <freetype/freetype.h>
|
||||
#if !defined(FREETYPE_MAJOR) || FREETYPE_MAJOR != 2
|
||||
#error "We need Freetype 2.0 (beta?)"
|
||||
#endif
|
||||
|
||||
GdkFont*
|
||||
gdk_font_from_description (PangoFontDescription *font_desc)
|
||||
{
|
||||
GdkFont *font;
|
||||
GdkFontPrivateFB *private;
|
||||
|
||||
g_return_val_if_fail(font_desc, NULL);
|
||||
|
||||
private = g_new0(GdkFontPrivateFB, 1);
|
||||
font = (GdkFont *)private;
|
||||
private->base.ref_count = 1;
|
||||
|
||||
return font;
|
||||
}
|
||||
|
||||
/* ********************* */
|
||||
#if 0
|
||||
static GHashTable *font_name_hash = NULL;
|
||||
static GHashTable *fontset_name_hash = NULL;
|
||||
|
||||
@ -139,11 +163,14 @@ gdk_fontset_load (const gchar *fontset_name)
|
||||
{
|
||||
return gdk_font_load(fontset_name);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
_gdk_font_destroy (GdkFont *font)
|
||||
{
|
||||
#if 0
|
||||
gdk_font_hash_remove (font->type, font);
|
||||
#endif
|
||||
|
||||
switch (font->type)
|
||||
{
|
||||
@ -221,9 +248,11 @@ gdk_font_equal (const GdkFont *fonta,
|
||||
|
||||
if(fonta == fontb)
|
||||
return TRUE;
|
||||
#if 0
|
||||
if(privatea->t1_font_id == privateb->t1_font_id
|
||||
&& privatea->size == privateb->size)
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -233,6 +262,7 @@ gdk_text_width (GdkFont *font,
|
||||
const gchar *text,
|
||||
gint text_length)
|
||||
{
|
||||
#if 0
|
||||
GdkFontPrivateFB *private;
|
||||
gint width;
|
||||
double n;
|
||||
@ -256,6 +286,9 @@ gdk_text_width (GdkFont *font,
|
||||
}
|
||||
|
||||
return width;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
gint
|
||||
@ -263,6 +296,7 @@ gdk_text_width_wc (GdkFont *font,
|
||||
const GdkWChar *text,
|
||||
gint text_length)
|
||||
{
|
||||
#if 0
|
||||
char *realstr;
|
||||
int i;
|
||||
|
||||
@ -272,6 +306,9 @@ gdk_text_width_wc (GdkFont *font,
|
||||
realstr[i] = '\0';
|
||||
|
||||
return gdk_text_width(font, realstr, text_length);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -284,6 +321,7 @@ gdk_text_extents (GdkFont *font,
|
||||
gint *ascent,
|
||||
gint *descent)
|
||||
{
|
||||
#if 0
|
||||
GdkFontPrivateFB *private;
|
||||
METRICSINFO mi;
|
||||
|
||||
@ -304,6 +342,18 @@ gdk_text_extents (GdkFont *font,
|
||||
*lbearing = ((double)mi.bbox.llx) / 1000.0 * private->size;
|
||||
if(rbearing)
|
||||
*rbearing = ((double)mi.bbox.urx) / 1000.0 * private->size;
|
||||
#else
|
||||
if(ascent)
|
||||
*ascent = 0;
|
||||
if(descent)
|
||||
*descent = 0;
|
||||
if(width)
|
||||
*width = 0;
|
||||
if(lbearing)
|
||||
*lbearing = 0;
|
||||
if(rbearing)
|
||||
*rbearing = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -110,7 +110,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_P(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;
|
||||
@ -137,6 +137,12 @@ gdk_fb_gc_set_values (GdkGC *gc,
|
||||
GDK_GC_FBDATA(gc)->values_mask |= GDK_GC_CLIP_MASK;
|
||||
if(oldpm)
|
||||
gdk_pixmap_unref(oldpm);
|
||||
|
||||
if(GDK_GC_FBDATA(gc)->clip_region)
|
||||
{
|
||||
gdk_region_destroy(GDK_GC_FBDATA(gc)->clip_region);
|
||||
GDK_GC_FBDATA(gc)->clip_region = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if(values_mask & GDK_GC_SUBWINDOW)
|
||||
@ -220,6 +226,19 @@ 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)
|
||||
{
|
||||
gdk_pixmap_unref(data->values.clip_mask);
|
||||
data->values.clip_mask = NULL;
|
||||
data->values_mask &= ~ GDK_GC_CLIP_MASK;
|
||||
}
|
||||
}
|
||||
void
|
||||
gdk_gc_set_clip_rectangle (GdkGC *gc,
|
||||
GdkRectangle *rectangle)
|
||||
@ -244,6 +263,8 @@ gdk_gc_set_clip_rectangle (GdkGC *gc,
|
||||
private->clip_y_origin = 0;
|
||||
data->values.clip_x_origin = 0;
|
||||
data->values.clip_y_origin = 0;
|
||||
|
||||
gc_unset_cmask(gc);
|
||||
}
|
||||
|
||||
void
|
||||
@ -273,6 +294,8 @@ gdk_gc_set_clip_region (GdkGC *gc,
|
||||
private->clip_y_origin = 0;
|
||||
data->values.clip_x_origin = 0;
|
||||
data->values.clip_y_origin = 0;
|
||||
|
||||
gc_unset_cmask(gc);
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,49 @@
|
||||
#include "gdkprivate-fb.h"
|
||||
|
||||
void
|
||||
gdk_window_scroll (GdkWindow *window,
|
||||
gint dx,
|
||||
gint dy)
|
||||
{
|
||||
GdkWindowPrivate *private = GDK_WINDOW_P(window);
|
||||
GdkRegion *invalidate_region;
|
||||
GdkRectangle dest_rect;
|
||||
GdkRectangle clip_rect;
|
||||
GList *tmp_list;
|
||||
|
||||
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;
|
||||
invalidate_region = gdk_region_rectangle (&clip_rect);
|
||||
|
||||
dest_rect = clip_rect;
|
||||
dest_rect.x += dx;
|
||||
dest_rect.y += dy;
|
||||
gdk_rectangle_intersect (&dest_rect, &clip_rect, &dest_rect);
|
||||
|
||||
if (dest_rect.width > 0 && dest_rect.height > 0)
|
||||
{
|
||||
GdkRegion *tmp_region;
|
||||
|
||||
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,
|
||||
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);
|
||||
}
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <endian.h>
|
||||
#ifndef __BYTE_ORDER
|
||||
#error "endian.h needs to #define __BYTE_ORDER"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
@ -111,7 +115,7 @@ gdk_image_new (GdkImageType type,
|
||||
{
|
||||
image->byte_order = 0;
|
||||
image->mem = g_malloc(width * height * (image->depth >> 3));
|
||||
image->bpp = image->depth;
|
||||
image->bpp = image->depth/8;
|
||||
image->bpl = (width * image->depth + 7)/8;
|
||||
}
|
||||
|
||||
@ -128,7 +132,7 @@ gdk_image_get (GdkWindow *window,
|
||||
GdkImage *image;
|
||||
GdkImagePrivateFB *private;
|
||||
gint bits_per_pixel = GDK_DRAWABLE_P(gdk_parent_root)->depth;
|
||||
GdkDrawableFBData fbd;
|
||||
GdkPixmapFBData fbd;
|
||||
GdkDrawablePrivate tmp_foo;
|
||||
|
||||
g_return_val_if_fail (window != NULL, NULL);
|
||||
@ -157,7 +161,7 @@ gdk_image_get (GdkWindow *window,
|
||||
else
|
||||
image->bpp = 4;
|
||||
image->byte_order = 1;
|
||||
image->bpl = (image->width * image->bpp + 7)/8;
|
||||
image->bpl = (image->width * image->depth + 7)/8;
|
||||
image->mem = g_malloc(image->bpl * image->height);
|
||||
|
||||
/* Fake its existence as a pixmap */
|
||||
@ -165,11 +169,12 @@ gdk_image_get (GdkWindow *window,
|
||||
memset(&fbd, 0, sizeof(fbd));
|
||||
tmp_foo.klass = &_gdk_fb_drawable_class;
|
||||
tmp_foo.klass_data = &fbd;
|
||||
fbd.mem = image->mem;
|
||||
fbd.rowstride = image->bpl;
|
||||
tmp_foo.width = fbd.lim_x = image->width;
|
||||
tmp_foo.height = fbd.lim_y = image->height;
|
||||
fbd.drawable_data.mem = image->mem;
|
||||
fbd.drawable_data.rowstride = image->bpl;
|
||||
tmp_foo.width = fbd.drawable_data.lim_x = image->width;
|
||||
tmp_foo.height = fbd.drawable_data.lim_y = image->height;
|
||||
tmp_foo.depth = image->depth;
|
||||
tmp_foo.window_type = GDK_DRAWABLE_PIXMAP;
|
||||
|
||||
gdk_fb_draw_drawable((GdkPixmap *)&tmp_foo, NULL, window, x, y, 0, 0, width, height);
|
||||
|
||||
@ -187,9 +192,24 @@ gdk_image_get_pixel (GdkImage *image,
|
||||
|
||||
private = (GdkImagePrivateFB *) image;
|
||||
|
||||
g_assert(image->depth == 8);
|
||||
switch(image->depth)
|
||||
{
|
||||
case 8:
|
||||
return ((guchar *)image->mem)[x + y * image->bpl];
|
||||
break;
|
||||
case 16:
|
||||
return *((guint16 *)&((guchar *)image->mem)[x*2 + y*image->bpl]);
|
||||
break;
|
||||
case 24:
|
||||
case 32:
|
||||
{
|
||||
guchar *smem = &(((guchar *)image->mem)[x*image->bpp + y*image->bpl]);
|
||||
return smem[0]|(smem[1]<<8)|(smem[2]<<16);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return ((guchar *)image->mem)[x + y * image->bpl];
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
@ -198,14 +218,39 @@ gdk_image_put_pixel (GdkImage *image,
|
||||
gint y,
|
||||
guint32 pixel)
|
||||
{
|
||||
GdkImagePrivateFB *private;
|
||||
guchar *ptr = image->mem;
|
||||
|
||||
g_return_if_fail (image != NULL);
|
||||
|
||||
private = (GdkImagePrivateFB *) image;
|
||||
g_assert(image->depth == 8);
|
||||
|
||||
((guchar *)image->mem)[x + y * image->bpl] = pixel;
|
||||
switch(image->depth)
|
||||
{
|
||||
case 8:
|
||||
ptr[x + y * image->bpl] = pixel;
|
||||
break;
|
||||
case 16:
|
||||
{
|
||||
guint16 *p16 = (guint16 *)&ptr[x*2 + y*image->bpl];
|
||||
*p16 = pixel;
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
{
|
||||
guchar *smem = &ptr[x*3 + y*image->bpl];
|
||||
smem[0] = (pixel & 0xFF);
|
||||
smem[1] = (pixel & 0xFF00) >> 8;
|
||||
smem[2] = (pixel & 0xFF0000) >> 16;
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
{
|
||||
guint32 *smem = (guint32 *)&ptr[x*4 + y*image->bpl];
|
||||
*smem = pixel;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -234,7 +279,7 @@ gdk_image_put_normal (GdkImage *image,
|
||||
gint height)
|
||||
{
|
||||
GdkImagePrivateFB *image_private;
|
||||
GdkDrawableFBData fbd;
|
||||
GdkPixmapFBData fbd;
|
||||
GdkDrawablePrivate tmp_foo;
|
||||
|
||||
g_return_if_fail (drawable != NULL);
|
||||
@ -253,11 +298,12 @@ gdk_image_put_normal (GdkImage *image,
|
||||
memset(&fbd, 0, sizeof(fbd));
|
||||
tmp_foo.klass = &_gdk_fb_drawable_class;
|
||||
tmp_foo.klass_data = &fbd;
|
||||
fbd.mem = image->mem;
|
||||
fbd.rowstride = image->bpl;
|
||||
tmp_foo.width = fbd.lim_x = image->width;
|
||||
tmp_foo.height = fbd.lim_y = image->height;
|
||||
fbd.drawable_data.mem = image->mem;
|
||||
fbd.drawable_data.rowstride = image->bpl;
|
||||
tmp_foo.width = fbd.drawable_data.lim_x = image->width;
|
||||
tmp_foo.height = fbd.drawable_data.lim_y = image->height;
|
||||
tmp_foo.depth = image->depth;
|
||||
tmp_foo.window_type = GDK_DRAWABLE_PIXMAP;
|
||||
|
||||
gdk_fb_draw_drawable(drawable, gc, (GdkPixmap *)&tmp_foo, xsrc, ysrc, xdest, ydest, width, height);
|
||||
}
|
||||
|
@ -208,20 +208,43 @@ send_button_event(PS2Mouse *mouse, guint button, gboolean press_event, time_t th
|
||||
}
|
||||
|
||||
static GdkPixmap *last_contents = NULL;
|
||||
static GdkPoint last_location;
|
||||
static GdkPoint last_location, last_contents_size;
|
||||
static GdkCursor *last_cursor = NULL;
|
||||
GdkFBDrawingContext *gdk_fb_cursor_dc = NULL;
|
||||
static GdkFBDrawingContext cursor_dc_dat;
|
||||
static GdkGC *cursor_gc;
|
||||
|
||||
static GdkFBDrawingContext *
|
||||
gdk_fb_cursor_dc_reset(void)
|
||||
{
|
||||
if(gdk_fb_cursor_dc)
|
||||
gdk_fb_drawing_context_finalize(gdk_fb_cursor_dc);
|
||||
|
||||
gdk_fb_cursor_dc = &cursor_dc_dat;
|
||||
gdk_fb_drawing_context_init(gdk_fb_cursor_dc, gdk_parent_root, cursor_gc, TRUE, FALSE);
|
||||
|
||||
return gdk_fb_cursor_dc;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_fb_cursor_hide(void)
|
||||
{
|
||||
GdkFBDrawingContext *mydc = gdk_fb_cursor_dc;
|
||||
|
||||
if(!mydc)
|
||||
mydc = gdk_fb_cursor_dc_reset();
|
||||
|
||||
if(last_contents)
|
||||
{
|
||||
gdk_gc_set_clip_mask(cursor_gc, NULL);
|
||||
/* Restore old picture */
|
||||
gdk_fb_draw_drawable_2(gdk_parent_root, cursor_gc, last_contents, 0, 0, last_location.x, last_location.y,
|
||||
GDK_DRAWABLE_P(last_contents)->width,
|
||||
GDK_DRAWABLE_P(last_contents)->height, TRUE, FALSE);
|
||||
gdk_fb_draw_drawable_3(gdk_parent_root, cursor_gc, last_contents,
|
||||
mydc,
|
||||
0, 0,
|
||||
last_location.x,
|
||||
last_location.y,
|
||||
last_contents_size.x,
|
||||
last_contents_size.y);
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,13 +256,18 @@ gdk_fb_cursor_invalidate(void)
|
||||
}
|
||||
|
||||
void
|
||||
gdk_fb_cursor_unhide(void)
|
||||
gdk_fb_cursor_unhide()
|
||||
{
|
||||
GdkFBDrawingContext *mydc = gdk_fb_cursor_dc;
|
||||
|
||||
if(!mydc)
|
||||
mydc = gdk_fb_cursor_dc_reset();
|
||||
|
||||
if(last_cursor)
|
||||
{
|
||||
if(!last_contents
|
||||
|| GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->width != GDK_DRAWABLE_P(last_contents)->width
|
||||
|| GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->height != GDK_DRAWABLE_P(last_contents)->height)
|
||||
|| GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->width > GDK_DRAWABLE_P(last_contents)->width
|
||||
|| GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->height > GDK_DRAWABLE_P(last_contents)->height)
|
||||
{
|
||||
if(last_contents)
|
||||
gdk_pixmap_unref(last_contents);
|
||||
@ -251,15 +279,20 @@ gdk_fb_cursor_unhide(void)
|
||||
}
|
||||
|
||||
gdk_gc_set_clip_mask(cursor_gc, NULL);
|
||||
gdk_fb_draw_drawable_2(last_contents, cursor_gc, gdk_parent_root, last_location.x, last_location.y, 0, 0,
|
||||
gdk_fb_draw_drawable_2(last_contents, cursor_gc, gdk_parent_root, last_location.x,
|
||||
last_location.y, 0, 0,
|
||||
GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->width,
|
||||
GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->height, TRUE, FALSE);
|
||||
last_contents_size.x = GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->width;
|
||||
last_contents_size.y = GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->height;
|
||||
gdk_gc_set_clip_mask(cursor_gc, GDK_CURSOR_FB(last_cursor)->mask);
|
||||
gdk_gc_set_clip_origin(cursor_gc, last_location.x, last_location.y);
|
||||
gdk_fb_draw_drawable_2(gdk_parent_root, cursor_gc, GDK_CURSOR_FB(last_cursor)->cursor,
|
||||
|
||||
gdk_fb_cursor_dc_reset();
|
||||
gdk_fb_draw_drawable_3(gdk_parent_root, cursor_gc, GDK_CURSOR_FB(last_cursor)->cursor, mydc,
|
||||
0, 0, last_location.x, last_location.y,
|
||||
GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->width,
|
||||
GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->height, TRUE, FALSE);
|
||||
GDK_DRAWABLE_P(GDK_CURSOR_FB(last_cursor)->cursor)->height);
|
||||
}
|
||||
else
|
||||
gdk_fb_cursor_invalidate();
|
||||
@ -299,9 +332,6 @@ move_pointer(PS2Mouse *mouse, GdkWindow *in_window)
|
||||
|
||||
gdk_fb_cursor_hide();
|
||||
|
||||
last_location.x = mouse->x;
|
||||
last_location.y = mouse->y;
|
||||
|
||||
if(_gdk_fb_pointer_grab_cursor)
|
||||
the_cursor = _gdk_fb_pointer_grab_cursor;
|
||||
else
|
||||
@ -311,6 +341,9 @@ move_pointer(PS2Mouse *mouse, GdkWindow *in_window)
|
||||
the_cursor = GDK_WINDOW_FBDATA(in_window)->cursor;
|
||||
}
|
||||
|
||||
last_location.x = mouse->x - GDK_CURSOR_FB(the_cursor)->hot_x;
|
||||
last_location.y = mouse->y - GDK_CURSOR_FB(the_cursor)->hot_y;
|
||||
|
||||
if(the_cursor)
|
||||
gdk_cursor_ref(the_cursor);
|
||||
if(last_cursor)
|
||||
@ -386,7 +419,7 @@ handle_input(GIOChannel *gioc, GIOCondition cond, gpointer data)
|
||||
|
||||
if(dx || dy) {
|
||||
GdkEvent *event;
|
||||
gint x, y, rx, ry;
|
||||
gint x, y;
|
||||
GdkWindow *win;
|
||||
guint state;
|
||||
|
||||
@ -582,9 +615,18 @@ gdk_window_find_focus(void)
|
||||
if(_gdk_fb_keyboard_grab_window)
|
||||
return _gdk_fb_keyboard_grab_window;
|
||||
else if(GDK_WINDOW_P(gdk_parent_root)->children)
|
||||
return GDK_WINDOW_P(gdk_parent_root)->children->data;
|
||||
else
|
||||
return gdk_parent_root;
|
||||
{
|
||||
GList *item;
|
||||
for(item = GDK_WINDOW_P(gdk_parent_root)->children; item; item = item->next)
|
||||
{
|
||||
GdkWindowPrivate *priv = item->data;
|
||||
|
||||
if(priv->mapped)
|
||||
return item->data;
|
||||
}
|
||||
}
|
||||
|
||||
return gdk_parent_root;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -623,6 +665,7 @@ handle_keyboard_input(GIOChannel *gioc, GIOCondition cond, gpointer data)
|
||||
{'=', '+', 0},
|
||||
{GDK_BackSpace, 0, 0},
|
||||
{GDK_Tab, 0, 0},
|
||||
|
||||
/* 0x10 */
|
||||
{'q', 'Q', 0},
|
||||
{'w', 'W', 0},
|
||||
@ -652,15 +695,15 @@ handle_keyboard_input(GIOChannel *gioc, GIOCondition cond, gpointer data)
|
||||
{';', ':', 0},
|
||||
{'\'', '"', 0},
|
||||
{'`', '~', 0},
|
||||
{0, 0, 0},
|
||||
{GDK_Shift_L, 0, 0}, /* mod */
|
||||
{'\\', 0, 0},
|
||||
{'z', 0, 0},
|
||||
{'x', 0, 0},
|
||||
{'c', 0, 0},
|
||||
|
||||
/* 0x30 */
|
||||
{'v', 'V', 0},
|
||||
|
||||
/* 0x30 */
|
||||
{'b', 'B', 0},
|
||||
{'n', 'N', 0},
|
||||
{'m', 'M', 0},
|
||||
@ -669,7 +712,8 @@ handle_keyboard_input(GIOChannel *gioc, GIOCondition cond, gpointer data)
|
||||
{'/', 0, 0},
|
||||
{GDK_Shift_R, 0, 0}, /* mod */
|
||||
{GDK_KP_Multiply, 0, 0},
|
||||
{' ', 0, 0},
|
||||
{0, 0, 0},
|
||||
{GDK_space, 0, 0},
|
||||
{0, 0, 0},
|
||||
{GDK_F1, 0, 0},
|
||||
{GDK_F2, 0, 0},
|
||||
|
@ -30,10 +30,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <t1lib.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gdk.h"
|
||||
|
||||
@ -65,8 +65,6 @@ gdk_fb_display_new(const char *filename)
|
||||
{
|
||||
int fd, n;
|
||||
GdkFBDisplay *retval;
|
||||
guint16 red[256], green[256], blue[256];
|
||||
struct fb_cmap cmap;
|
||||
|
||||
fd = open(filename, O_RDWR);
|
||||
if(fd < 0)
|
||||
@ -78,15 +76,29 @@ gdk_fb_display_new(const char *filename)
|
||||
n |= ioctl(fd, FBIOGET_VSCREENINFO, &retval->modeinfo);
|
||||
g_assert(!n);
|
||||
|
||||
retval->fbmem = mmap(NULL, retval->sinfo.smem_len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
/* We used to use sinfo.smem_len, but that seemed to be broken in many cases */
|
||||
retval->fbmem = mmap(NULL, retval->modeinfo.yres * retval->sinfo.line_length,
|
||||
PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
g_assert(retval->fbmem != MAP_FAILED);
|
||||
|
||||
for(n = 0; n < 16; n++)
|
||||
red[n] = green[n] = blue[n] = n << 12;
|
||||
for(n = 16; n < 256; n++)
|
||||
red[n] = green[n] = blue[n] = n << 8;
|
||||
cmap.red = red; cmap.green = green; cmap.blue = blue; cmap.len = 256; cmap.start = 0;
|
||||
ioctl(fd, FBIOPUTCMAP, &cmap);
|
||||
if(retval->sinfo.visual == FB_VISUAL_PSEUDOCOLOR)
|
||||
{
|
||||
guint16 red[256], green[256], blue[256];
|
||||
struct fb_cmap cmap;
|
||||
for(n = 0; n < 16; n++)
|
||||
red[n] = green[n] = blue[n] = n << 12;
|
||||
for(n = 16; n < 256; n++)
|
||||
red[n] = green[n] = blue[n] = n << 8;
|
||||
cmap.red = red; cmap.green = green; cmap.blue = blue; cmap.len = 256; cmap.start = 0;
|
||||
ioctl(fd, FBIOPUTCMAP, &cmap);
|
||||
}
|
||||
|
||||
if(retval->sinfo.visual == FB_VISUAL_TRUECOLOR)
|
||||
{
|
||||
retval->red_byte = retval->modeinfo.red.offset >> 3;
|
||||
retval->green_byte = retval->modeinfo.green.offset >> 3;
|
||||
retval->blue_byte = retval->modeinfo.blue.offset >> 3;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
@ -94,7 +106,8 @@ gdk_fb_display_new(const char *filename)
|
||||
static void
|
||||
gdk_fb_display_destroy(GdkFBDisplay *fbd)
|
||||
{
|
||||
munmap(fbd->fbmem, fbd->sinfo.smem_len);
|
||||
munmap(fbd->fbmem, fbd->modeinfo.yres * fbd->sinfo.line_length);
|
||||
close(fbd->fd);
|
||||
g_free(fbd);
|
||||
}
|
||||
|
||||
@ -112,8 +125,7 @@ _gdk_windowing_init_check (int argc, char **argv)
|
||||
if(!gdk_display)
|
||||
return FALSE;
|
||||
|
||||
T1_InitLib(NO_LOGFILE|IGNORE_FONTDATABASE);
|
||||
T1_AASetBitsPerPixel(gdk_display->modeinfo.bits_per_pixel);
|
||||
gdk_fb_font_init();
|
||||
|
||||
gdk_initialized = TRUE;
|
||||
|
||||
@ -156,14 +168,20 @@ gdk_pointer_grab (GdkWindow * window,
|
||||
g_return_val_if_fail (confine_to == NULL || GDK_IS_WINDOW (confine_to), 0);
|
||||
|
||||
if(_gdk_fb_pointer_grab_window)
|
||||
return 1;
|
||||
gdk_pointer_ungrab(time);
|
||||
|
||||
if(!owner_events)
|
||||
_gdk_fb_pointer_grab_window = gdk_window_ref(window);
|
||||
|
||||
if(cursor)
|
||||
gdk_fb_cursor_hide();
|
||||
|
||||
_gdk_fb_pointer_grab_confine = confine_to?gdk_window_ref(confine_to):NULL;
|
||||
_gdk_fb_pointer_grab_events = event_mask;
|
||||
_gdk_fb_pointer_grab_cursor = cursor?gdk_cursor_ref(cursor):NULL;
|
||||
|
||||
if(cursor)
|
||||
gdk_fb_cursor_unhide();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -186,6 +204,11 @@ gdk_pointer_grab (GdkWindow * window,
|
||||
void
|
||||
gdk_pointer_ungrab (guint32 time)
|
||||
{
|
||||
gboolean have_grab_cursor = _gdk_fb_pointer_grab_cursor && 1;
|
||||
|
||||
if(have_grab_cursor)
|
||||
gdk_fb_cursor_hide();
|
||||
|
||||
if(_gdk_fb_pointer_grab_window)
|
||||
gdk_window_unref(_gdk_fb_pointer_grab_window);
|
||||
_gdk_fb_pointer_grab_window = NULL;
|
||||
@ -197,6 +220,9 @@ gdk_pointer_ungrab (guint32 time)
|
||||
if(_gdk_fb_pointer_grab_cursor)
|
||||
gdk_cursor_unref(_gdk_fb_pointer_grab_cursor);
|
||||
_gdk_fb_pointer_grab_cursor = NULL;
|
||||
|
||||
if(have_grab_cursor)
|
||||
gdk_fb_cursor_unhide();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -414,7 +440,7 @@ gdk_windowing_exit (void)
|
||||
{
|
||||
gdk_fb_display_destroy(gdk_display); gdk_display = NULL;
|
||||
|
||||
T1_CloseLib();
|
||||
gdk_fb_font_fini();
|
||||
|
||||
keyboard_shutdown();
|
||||
}
|
||||
@ -431,20 +457,6 @@ gdk_keyval_from_name (const gchar *keyval_name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void gdk_keyval_convert_case (guint symbol,
|
||||
guint *lower,
|
||||
guint *upper)
|
||||
{
|
||||
if(symbol >= 'a' && symbol <= 'z')
|
||||
symbol = toupper(symbol);
|
||||
|
||||
if(upper)
|
||||
*upper = symbol;
|
||||
|
||||
if(lower)
|
||||
*lower = symbol;
|
||||
}
|
||||
|
||||
gchar *
|
||||
gdk_get_display(void)
|
||||
{
|
||||
@ -562,3 +574,57 @@ gdk_event_make(GdkWindow *window, GdkEventType type, gboolean append_to_queue)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CM(void)
|
||||
{
|
||||
static gpointer mymem = NULL;
|
||||
gpointer arry[256];
|
||||
int i;
|
||||
|
||||
free(mymem);
|
||||
|
||||
for(i = 0; i < sizeof(arry)/sizeof(arry[0]); i++)
|
||||
arry[i] = malloc(i+1);
|
||||
for(i = 0; i < sizeof(arry)/sizeof(arry[0]); i++)
|
||||
free(arry[i]);
|
||||
|
||||
mymem = malloc(256);
|
||||
}
|
||||
|
||||
/* XXX badhack */
|
||||
typedef struct _GdkWindowPaint GdkWindowPaint;
|
||||
|
||||
struct _GdkWindowPaint
|
||||
{
|
||||
GdkRegion *region;
|
||||
GdkPixmap *pixmap;
|
||||
gint x_offset;
|
||||
gint y_offset;
|
||||
};
|
||||
|
||||
void RP(GdkDrawable *d)
|
||||
{
|
||||
#if 0
|
||||
if(GDK_DRAWABLE_TYPE(d) == GDK_DRAWABLE_PIXMAP)
|
||||
{
|
||||
if(!GDK_PIXMAP_FBDATA(d)->no_free_mem)
|
||||
{
|
||||
guchar *oldmem = GDK_DRAWABLE_FBDATA(d)->mem;
|
||||
guint len = ((GDK_DRAWABLE_P(d)->width * GDK_DRAWABLE_P(d)->depth + 7) / 8) * GDK_DRAWABLE_P(d)->height;
|
||||
GDK_DRAWABLE_FBDATA(d)->mem = g_malloc(len);
|
||||
memcpy(GDK_DRAWABLE_FBDATA(d)->mem, oldmem, len);
|
||||
g_free(oldmem);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GSList *priv = GDK_WINDOW_P(d)->paint_stack;
|
||||
for(; priv; priv = priv->next)
|
||||
{
|
||||
GdkWindowPaint *p = priv->data;
|
||||
|
||||
RP(p->pixmap);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -80,6 +80,7 @@ gdk_fb_pixmap_alloc (void)
|
||||
private->klass_data = g_new0 (GdkDrawableFBData, 1);
|
||||
private->window_type = GDK_DRAWABLE_PIXMAP;
|
||||
private->colormap = gdk_colormap_ref(gdk_colormap_get_system());
|
||||
GDK_DRAWABLE_FBDATA(private)->mem = NULL;
|
||||
|
||||
return drawable;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "gdkregion-generic.h"
|
||||
#include <linux/fb.h>
|
||||
#include <stdio.h>
|
||||
#include <freetype/freetype.h>
|
||||
|
||||
#define GDK_DRAWABLE_FBDATA(win) ((GdkDrawableFBData *)(((GdkDrawablePrivate*)(win))->klass_data))
|
||||
#define GDK_PIXMAP_FBDATA(win) ((GdkPixmapFBData *)(((GdkDrawablePrivate*)(win))->klass_data))
|
||||
@ -46,6 +47,7 @@
|
||||
|
||||
typedef struct _GdkDrawableFBData GdkDrawableFBData;
|
||||
typedef struct _GdkWindowFBData GdkWindowFBData;
|
||||
typedef struct _GdkPixmapFBData GdkPixmapFBData;
|
||||
|
||||
struct _GdkDrawableFBData
|
||||
{
|
||||
@ -87,6 +89,7 @@ struct _GdkFBDisplay
|
||||
gulong mem_len;
|
||||
struct fb_fix_screeninfo sinfo;
|
||||
struct fb_var_screeninfo modeinfo;
|
||||
int red_byte, green_byte, blue_byte; /* For truecolor */
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@ -104,16 +107,19 @@ typedef struct {
|
||||
typedef struct {
|
||||
GdkCursor base;
|
||||
GdkPixmap *cursor, *mask;
|
||||
int hot_x, hot_y;
|
||||
} GdkCursorPrivateFB;
|
||||
|
||||
typedef struct {
|
||||
GdkFontPrivate base;
|
||||
|
||||
int t1_font_id;
|
||||
FT_Face face;
|
||||
double size;
|
||||
GSList *names;
|
||||
} GdkFontPrivateFB;
|
||||
|
||||
void gdk_fb_font_init(void);
|
||||
void gdk_fb_font_fini(void);
|
||||
|
||||
typedef struct {
|
||||
GdkImagePrivate base;
|
||||
} GdkImagePrivateFB;
|
||||
@ -156,6 +162,39 @@ void gdk_fb_draw_drawable (GdkDrawable *drawable,
|
||||
gint ydest,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
typedef struct {
|
||||
GdkWindow *bg_relto;
|
||||
GdkPixmap *bgpm;
|
||||
|
||||
GdkRegion *real_clip_region;
|
||||
|
||||
guchar *mem, *clipmem;
|
||||
gpointer cursor_dc;
|
||||
|
||||
guint rowstride, clip_rowstride;
|
||||
int clipxoff, clipyoff;
|
||||
|
||||
gboolean draw_bg : 1;
|
||||
gboolean copy_region : 1;
|
||||
gboolean handle_cursor : 1;
|
||||
} GdkFBDrawingContext;
|
||||
|
||||
void gdk_fb_drawing_context_init(GdkFBDrawingContext *dc, GdkDrawable *drawable,
|
||||
GdkGC *gc, gboolean draw_bg, gboolean do_clipping);
|
||||
void gdk_fb_drawing_context_finalize(GdkFBDrawingContext *dc);
|
||||
|
||||
void gdk_fb_draw_drawable_3 (GdkDrawable *drawable,
|
||||
GdkGC *gc,
|
||||
GdkPixmap *src,
|
||||
GdkFBDrawingContext *dc,
|
||||
gint xsrc,
|
||||
gint ysrc,
|
||||
gint xdest,
|
||||
gint ydest,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
void gdk_fb_draw_drawable_2 (GdkDrawable *drawable,
|
||||
GdkGC *gc,
|
||||
GdkPixmap *src,
|
||||
@ -191,4 +230,23 @@ void gdk_fb_redraw_all(void);
|
||||
|
||||
void gdk_input_ps2_get_mouseinfo(gint *x, gint *y, GdkModifierType *mask);
|
||||
|
||||
#define PANGO_TYPE_FB_FONT (pango_fb_font_get_type ())
|
||||
#define PANGO_FB_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FB_FONT, PangoFBFont))
|
||||
typedef struct _PangoFBFont PangoFBFont;
|
||||
struct _PangoFBFont
|
||||
{
|
||||
PangoFont parent;
|
||||
|
||||
FT_Face ftf;
|
||||
PangoFontDescription desc;
|
||||
PangoCoverage *coverage;
|
||||
GHashTable *extents;
|
||||
};
|
||||
GType pango_fb_font_get_type (void);
|
||||
gboolean pango_fb_has_glyph(PangoFont *font, PangoGlyph glyph);
|
||||
PangoGlyph pango_fb_get_unknown_glyph(PangoFont *font);
|
||||
|
||||
extern void CM(void); /* Check for general mem corruption */
|
||||
extern void RP(GdkDrawable *drawable); /* Same, for pixmaps */
|
||||
|
||||
#endif /* __GDK_PRIVATE_FB_H__ */
|
||||
|
@ -66,20 +66,20 @@ gdk_visual_init (void)
|
||||
system_visual->colormap_size = 1 << gdk_display->modeinfo.bits_per_pixel;
|
||||
system_visual->type = GDK_VISUAL_DIRECT_COLOR;
|
||||
case FB_VISUAL_TRUECOLOR:
|
||||
if(gdk_display->sinfo.visual == GDK_VISUAL_TRUE_COLOR)
|
||||
if(gdk_display->sinfo.visual == FB_VISUAL_TRUECOLOR)
|
||||
system_visual->type = GDK_VISUAL_TRUE_COLOR;
|
||||
|
||||
system_visual->red_prec = MIN(system_visual->depth / 3, 8);
|
||||
system_visual->red_shift = 0;
|
||||
system_visual->red_mask = ((1 << (system_visual->red_prec + 1)) - 1) << system_visual->red_shift;
|
||||
system_visual->red_prec = gdk_display->modeinfo.red.length;
|
||||
system_visual->red_shift = gdk_display->modeinfo.red.offset;
|
||||
system_visual->red_mask = ((1 << (system_visual->red_prec)) - 1) << system_visual->red_shift;
|
||||
|
||||
system_visual->green_shift = system_visual->red_prec;
|
||||
system_visual->green_prec = MIN(system_visual->depth / 3, 8);
|
||||
system_visual->green_mask = ((1 << (system_visual->green_prec + 1)) - 1) << system_visual->green_shift;
|
||||
system_visual->green_prec = gdk_display->modeinfo.green.length;
|
||||
system_visual->green_shift = gdk_display->modeinfo.green.offset;
|
||||
system_visual->green_mask = ((1 << (system_visual->green_prec)) - 1) << system_visual->green_shift;
|
||||
|
||||
system_visual->blue_shift = system_visual->green_prec + system_visual->green_shift;
|
||||
system_visual->blue_prec = MIN(system_visual->depth / 3, 8);
|
||||
system_visual->blue_mask = ((1 << (system_visual->blue_prec + 1)) - 1) << system_visual->blue_shift;
|
||||
system_visual->blue_prec = gdk_display->modeinfo.blue.length;
|
||||
system_visual->blue_shift = gdk_display->modeinfo.blue.offset;
|
||||
system_visual->blue_mask = ((1 << (system_visual->blue_prec)) - 1) << system_visual->blue_shift;
|
||||
break;
|
||||
case FB_VISUAL_STATIC_PSEUDOCOLOR:
|
||||
system_visual->type = GDK_VISUAL_STATIC_COLOR;
|
||||
|
@ -116,7 +116,11 @@ gdk_window_init (void)
|
||||
private->y = 0;
|
||||
|
||||
GDK_DRAWABLE_FBDATA(private)->mem = gdk_display->fbmem;
|
||||
#if 0
|
||||
GDK_DRAWABLE_FBDATA(private)->rowstride = gdk_display->modeinfo.xres * (gdk_display->modeinfo.bits_per_pixel >> 3);
|
||||
#else
|
||||
GDK_DRAWABLE_FBDATA(private)->rowstride = gdk_display->sinfo.line_length;
|
||||
#endif
|
||||
GDK_DRAWABLE_FBDATA(private)->lim_x = gdk_display->modeinfo.xres;
|
||||
GDK_DRAWABLE_FBDATA(private)->lim_y = gdk_display->modeinfo.yres;
|
||||
GDK_WINDOW_FBDATA(private)->event_mask = GDK_EXPOSURE_MASK;
|
||||
@ -177,7 +181,7 @@ gdk_window_new (GdkWindow *parent,
|
||||
private->drawable.height = (attributes->height > 1) ? (attributes->height) : (1);
|
||||
private->drawable.window_type = attributes->window_type;
|
||||
GDK_DRAWABLE_FBDATA(private)->mem = gdk_display->fbmem;
|
||||
GDK_DRAWABLE_FBDATA(private)->rowstride = gdk_display->modeinfo.xres * (gdk_display->modeinfo.bits_per_pixel >> 3);
|
||||
GDK_DRAWABLE_FBDATA(private)->rowstride = GDK_DRAWABLE_FBDATA(gdk_parent_root)->rowstride;
|
||||
gdk_window_move_resize (window, x, y,
|
||||
private->drawable.width, private->drawable.height);
|
||||
|
||||
|
@ -200,6 +200,9 @@ gdk_x11_gc_get_values (GdkGC *gc,
|
||||
case GXset:
|
||||
values->function = GDK_SET;
|
||||
break;
|
||||
case GXnor:
|
||||
values->function = GDK_NOR;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (xvalues.fill_style)
|
||||
@ -404,6 +407,9 @@ gdk_x11_gc_values_to_xvalues (GdkGCValues *values,
|
||||
case GDK_SET:
|
||||
xvalues->function = GXset;
|
||||
break;
|
||||
case GDK_NOR:
|
||||
xvalues->function = GXnor;
|
||||
break;
|
||||
}
|
||||
*xvalues_mask |= GCFunction;
|
||||
}
|
||||
|
@ -776,7 +776,7 @@ gdk_pixmap_create_from_xpm_d (GdkWindow *window,
|
||||
}
|
||||
|
||||
GdkPixmap*
|
||||
gdk_pixmap_foreign_new (guint32 anid)
|
||||
gdk_pixmap_foreign_new (GdkNativeWindow anid)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
GdkDrawablePrivate *private;
|
||||
|
@ -435,7 +435,7 @@ gdk_window_new (GdkWindow *parent,
|
||||
}
|
||||
|
||||
GdkWindow *
|
||||
gdk_window_foreign_new (guint32 anid)
|
||||
gdk_window_foreign_new (GdkNativeWindow anid)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkWindowPrivate *private;
|
||||
|
@ -184,12 +184,16 @@ Window gdk_get_client_window (Display *dpy,
|
||||
Window win);
|
||||
|
||||
/* Functions to create pixmaps and windows from their X equivalents */
|
||||
GdkPixmap *gdk_pixmap_foreign_new (guint32 anid);
|
||||
GdkWindow *gdk_window_foreign_new (guint32 anid);
|
||||
GdkPixmap *gdk_pixmap_foreign_new (GdkNativeWindow anid);
|
||||
GdkWindow *gdk_window_foreign_new (GdkNativeWindow anid);
|
||||
|
||||
/* Return the Gdk* for a particular XID */
|
||||
gpointer gdk_xid_table_lookup (XID xid);
|
||||
|
||||
#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))
|
||||
|
||||
GC _gdk_x11_gc_flush (GdkGC *gc);
|
||||
|
||||
#endif /* __GDK_X_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user