1 diff -uraN ../links-2.1pre9/Makefile.am ./Makefile.am
2 --- ../links-2.1pre9/Makefile.am 2002-06-08 15:11:51.000000000 +0200
3 +++ ./Makefile.am 2003-03-13 15:06:00.000000000 +0100
8 -links_SOURCES=af_unix.c beos.c bfu.c bookmarks.c builtin.c cache.c charsets.c connect.c context.c cookies.c default.c dip.c dither.c dns.c drivers.c error.c file.c finger.c font_include.c framebuffer.c ftp.c gif.c html.c html_gr.c html_r.c html_tbl.c http.c https.c img.c imgcache.c ipret.c javascr.c javascript.c jpeg.c jsint.c kbd.c language.c links_icon.c listedit.c lru.c mailto.c main.c menu.c memory.c md5.c md5hl.c ns.c objreq.c os_dep.c pmshell.c png.c pomocny.c sched.c select.c session.c svgalib.c terminal.c tiff.c types.c url.c view.c view_gr.c win32.c x.c xbm.c links.h cfg.h os_dep.h os_depx.h setup.h codepage.h language.h codepage.inc entity.inc uni_7b.inc language.inc arrow.inc md5.h ns.h struct.h tree.h typy.h ipret.h javascript.h builtin.h builtin_keys.h bits.h
9 +links_SOURCES=af_unix.c beos.c bfu.c bookmarks.c builtin.c cache.c charsets.c connect.c context.c cookies.c default.c dip.c directfb.c directfb_cursors.h dither.c dns.c drivers.c error.c file.c finger.c font_include.c framebuffer.c ftp.c gif.c html.c html_gr.c html_r.c html_tbl.c http.c https.c img.c imgcache.c ipret.c javascr.c javascript.c jpeg.c jsint.c kbd.c language.c links_icon.c listedit.c lru.c mailto.c main.c menu.c memory.c md5.c md5hl.c ns.c objreq.c os_dep.c pmshell.c png.c pomocny.c sched.c select.c session.c svgalib.c terminal.c tiff.c types.c url.c view.c view_gr.c win32.c x.c xbm.c links.h cfg.h os_dep.h os_depx.h setup.h codepage.h language.h codepage.inc entity.inc uni_7b.inc language.inc arrow.inc md5.h ns.h struct.h tree.h typy.h ipret.h javascript.h builtin.h builtin_keys.h bits.h
13 diff -uraN ../links-2.1pre9/acconfig.h ./acconfig.h
14 --- ../links-2.1pre9/acconfig.h 2002-05-02 22:40:11.000000000 +0200
15 +++ ./acconfig.h 2003-03-13 15:06:00.000000000 +0100
20 +#undef GRDRV_DIRECTFB
26 diff -uraN ../links-2.1pre9/configure.in ./configure.in
27 --- ../links-2.1pre9/configure.in 2003-02-26 19:43:43.000000000 +0100
28 +++ ./configure.in 2003-03-13 15:13:22.000000000 +0100
30 AC_ARG_WITH(svgalib, [ --without-svgalib compile without svgalib graphics driver],[if test "$withval" = no; then disable_svgalib=yes; else disable_svgalib=no; fi])
31 AC_ARG_WITH(x, [ --without-x compile without X Window System graphics driver],[if test "$withval" = no; then disable_x=yes; else disable_x=no; fi])
32 AC_ARG_WITH(fb, [ --without-fb compile without Linux Framebuffer graphics driver],[if test "$withval" = no; then disable_fb=yes; else disable_fb=no; fi])
33 +AC_ARG_WITH(directfb, [ --without-directfb compile without DirectFB graphics driver],[if test "$withval" = no; then disable_directfb=yes; else disable_directfb=no; fi])
34 AC_ARG_WITH(pmshell, [ --without-pmshell compile without PMShell graphics driver],[if test "$withval" = no; then disable_pmshell=yes; else disable_pmshell=no; fi])
35 AC_ARG_WITH(atheos, [ --without-atheos compile without Atheos graphics driver],[if test "$withval" = no; then disable_atheos=yes; else disable_atheos; fi])
41 +if test "$disable_directfb" != yes ; then
42 + AC_PATH_PROG(DIRECTFB_CONFIG, directfb-config, no)
43 + if test "$DIRECTFB_CONFIG" != "no"; then
44 + AC_MSG_CHECKING(for DirectFB >= 0.9.17)
45 + directfb_version=`$DIRECTFB_CONFIG --version`
46 + if expr $directfb_version \>= 0.9.17 >/dev/null; then
48 + DIRECTFB_CFLAGS=`$DIRECTFB_CONFIG --cflags`
49 + DIRECTFB_LIBS=`$DIRECTFB_CONFIG --libs`
50 + AC_DEFINE(GRDRV_DIRECTFB)
51 + drivers="$drivers DIRECTFB"
52 + CPPFLAGS="$CPPFLAGS $DIRECTFB_CFLAGS"
53 + LIBS="$LIBS $DIRECTFB_LIBS"
62 if test "$have_x" = yes; then
63 diff -uraN ../links-2.1pre9/default.c ./default.c
64 --- ../links-2.1pre9/default.c 2003-02-11 22:55:00.000000000 +0100
65 +++ ./default.c 2003-03-13 15:06:00.000000000 +0100
70 +#ifdef GRDRV_DIRECTFB
71 + if (!strncmp(argv[-1], "--dfb:", 6))
74 fprintf(stderr, "Unknown option %s\n", argv[-1]);
76 } else if (!u) u = argv[-1];
77 diff -uraN ../links-2.1pre9/directfb.c ./directfb.c
78 --- ../links-2.1pre9/directfb.c 1970-01-01 01:00:00.000000000 +0100
79 +++ ./directfb.c 2003-03-13 15:10:53.000000000 +0100
82 + * DirectFB graphics driver
83 + * (c) 2002 Sven Neumann <sven@directfb.org>
85 + * This file is a part of the Links program, released under GPL.
89 + * - Store window size as driver params (?)
90 + * - Fix wrong colors on big-endian systems (fixed?)
91 + * - Make everything work correctly ;-)
94 + * - If mouse drags don't work for you, update DirectFB
95 + * (the upcoming 0.9.14 release fixes this).
101 +#ifdef GRDRV_DIRECTFB
107 +#include <netinet/in.h> /* for htons */
109 +#include <directfb.h>
112 +#include "directfb_cursors.h"
115 +#define FOCUSED_OPACITY 0xFF
116 +#define UNFOCUSED_OPACITY 0xC0
118 +#define DIRECTFB_HASH_TABLE_SIZE 23
119 +struct graphics_device **directfb_hash_table[DIRECTFB_HASH_TABLE_SIZE];
121 +typedef struct _DFBDeviceData DFBDeviceData;
122 +struct _DFBDeviceData
125 + IDirectFBWindow *window;
126 + IDirectFBSurface *surface;
128 + DFBRegion flip_region;
133 +extern struct graphics_driver directfb_driver;
135 +static IDirectFB *dfb = NULL;
136 +static IDirectFBDisplayLayer *layer = NULL;
137 +static IDirectFBSurface *arrow = NULL;
138 +static IDirectFBEventBuffer *events = NULL;
139 +static DFBSurfacePixelFormat pixelformat = DSPF_UNKNOWN;
140 +static int event_timer = 0;
143 +static inline void directfb_set_color (IDirectFBSurface *surface, long color);
144 +static void directfb_register_flip (DFBDeviceData *data,
145 + int x, int y, int w, int h);
146 +static void directfb_flip_surface (void *pointer);
147 +static void directfb_check_events (void *pointer);
148 +static void directfb_translate_key (DFBWindowEvent *event,
149 + int *key, int *flag);
150 +static void directfb_add_to_table (struct graphics_device *gd);
151 +static void directfb_remove_from_table (struct graphics_device *gd);
152 +static struct graphics_device * directfb_lookup_in_table (DFBWindowID id);
155 +static unsigned char *
156 +directfb_fb_init_driver (unsigned char *param, unsigned char *display)
158 + DFBDisplayLayerConfig config;
164 + DirectFBInit (&g_argc, (char ***) &g_argv);
165 + ret = DirectFBCreate (&dfb);
171 + snprintf (message, sizeof (message), "%s\n", DirectFBErrorString (ret));
172 + return stracpy (message);
175 + dfb->GetDisplayLayer (dfb, DLID_PRIMARY, &layer);
177 + layer->GetConfiguration (layer, &config);
179 + pixelformat = config.pixelformat;
181 + directfb_driver.depth = (((DFB_BYTES_PER_PIXEL (pixelformat) & 0x7)) |
182 + ((DFB_BITS_PER_PIXEL (pixelformat) & 0x1F) << 3));
185 + if (htons (0x1234) == 0x1234)
186 + directfb_driver.depth |= 0x100;
188 + directfb_driver.x = config.width;
189 + directfb_driver.y = config.height;
191 + memset (directfb_hash_table, 0, sizeof (directfb_hash_table));
193 + if (dfb->CreateSurface (dfb, &arrow_desc, &arrow) != DFB_OK)
199 +static struct graphics_device *
200 +directfb_init_device (void)
202 + struct graphics_device *gd;
203 + DFBDeviceData *data;
204 + IDirectFBWindow *window;
205 + DFBWindowDescription desc;
207 + if (!dfb || !layer)
210 + desc.flags = DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY;
211 + desc.width = directfb_driver.x;
212 + desc.height = directfb_driver.y;
216 + if (layer->CreateWindow (layer, &desc, &window) != DFB_OK)
219 + gd = mem_alloc (sizeof (struct graphics_device));
223 + window->GetSize (window, &gd->size.x2, &gd->size.y2);
225 + gd->clip = gd->size;
227 + data = mem_alloc (sizeof (DFBDeviceData));
229 + data->window = window;
231 + data->flip_pending = 0;
234 + window->SetCursorShape (window, arrow, arrow_hot_x, arrow_hot_y);
236 + window->GetSurface (window, &data->surface);
237 + window->GetID (window, &data->id);
239 + gd->drv = &directfb_driver;
240 + gd->driver_data = data;
241 + gd->user_data = NULL;
243 + directfb_add_to_table (gd);
247 + window->CreateEventBuffer (window, &events);
248 + event_timer = install_timer (20, directfb_check_events, events);
252 + window->AttachEventBuffer (window, events);
259 +directfb_shutdown_device (struct graphics_device *gd)
261 + DFBDeviceData *data;
266 + data = gd->driver_data;
268 + unregister_bottom_half (directfb_flip_surface, data);
269 + directfb_remove_from_table (gd);
271 + data->surface->Release (data->surface);
272 + data->window->Release (data->window);
279 +directfb_shutdown_driver (void)
288 + kill_timer (event_timer);
289 + events->Release (events);
294 + arrow->Release (arrow);
296 + layer->Release (layer);
297 + dfb->Release (dfb);
299 + for (i = 0; i < DIRECTFB_HASH_TABLE_SIZE; i++)
300 + if (directfb_hash_table[i])
301 + mem_free (directfb_hash_table[i]);
306 +static unsigned char *
307 +directfb_get_driver_param (void)
313 +directfb_get_empty_bitmap (struct bitmap *bmp)
315 + IDirectFBSurface *surface;
316 + DFBSurfaceDescription desc;
318 + bmp->data = bmp->flags = NULL;
320 + desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT;
321 + desc.width = bmp->x;
322 + desc.height = bmp->y;
324 + if (dfb->CreateSurface (dfb, &desc, &surface) != DFB_OK)
327 + surface->Lock (surface, DSLF_READ | DSLF_WRITE, &bmp->data, &bmp->skip);
329 + bmp->flags = surface;
335 +directfb_get_filled_bitmap (struct bitmap *bmp, long color)
337 + IDirectFBSurface *surface;
338 + DFBSurfaceDescription desc;
340 + bmp->data = bmp->flags = NULL;
342 + desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT;
343 + desc.width = bmp->x;
344 + desc.height = bmp->y;
346 + if (dfb->CreateSurface (dfb, &desc, &surface) != DFB_OK)
349 + directfb_set_color (surface, color);
350 + surface->FillRectangle (surface, 0, 0, bmp->x, bmp->y);
351 + surface->Lock (surface, DSLF_READ | DSLF_WRITE, &bmp->data, &bmp->skip);
353 + bmp->flags = surface;
359 +directfb_register_bitmap (struct bitmap *bmp)
361 + IDirectFBSurface *surface = bmp->flags;
363 + surface->Unlock (surface);
368 +directfb_prepare_strip (struct bitmap *bmp, int top, int lines)
370 + IDirectFBSurface *surface = bmp->flags;
372 + surface->Lock (surface, DSLF_READ | DSLF_WRITE, &bmp->data, &bmp->skip);
374 + return ((unsigned char *) bmp->data + top * bmp->skip);
378 +directfb_commit_strip (struct bitmap *bmp, int top, int lines)
380 + IDirectFBSurface *surface = bmp->flags;
382 + surface->Unlock (surface);
387 +directfb_unregister_bitmap (struct bitmap *bmp)
389 + IDirectFBSurface *surface = bmp->flags;
391 + surface->Release (surface);
395 +directfb_draw_bitmap (struct graphics_device *gd, struct bitmap *bmp,
398 + DFBDeviceData *data = gd->driver_data;
399 + IDirectFBSurface *src = bmp->flags;
401 + data->surface->Blit (data->surface, src, NULL, x, y);
403 + directfb_register_flip (data, x, y, bmp->x, bmp->y);
407 +directfb_draw_bitmaps (struct graphics_device *gd, struct bitmap **bmps,
408 + int n, int x, int y)
410 + DFBDeviceData *data = gd->driver_data;
411 + struct bitmap *bmp = *bmps;
420 + IDirectFBSurface *src = bmp->flags;
422 + data->surface->Blit (data->surface, src, NULL, x, y);
432 + directfb_register_flip (data, x1, y, x - x1, h);
436 +directfb_get_color (int rgb)
443 +directfb_fill_area (struct graphics_device *gd,
444 + int x1, int y1, int x2, int y2, long color)
446 + DFBDeviceData *data = gd->driver_data;
450 + directfb_set_color (data->surface, color);
451 + data->surface->FillRectangle (data->surface, x1, y1, w, h);
453 + directfb_register_flip (data, x1, y1, w, h);
457 +directfb_draw_hline (struct graphics_device *gd,
458 + int left, int y, int right, long color)
460 + DFBDeviceData *data = gd->driver_data;
464 + directfb_set_color (data->surface, color);
465 + data->surface->DrawLine (data->surface, left, y, right, y);
467 + directfb_register_flip (data, left, y, right - left, 1);
471 +directfb_draw_vline (struct graphics_device *gd,
472 + int x, int top, int bottom, long color)
474 + DFBDeviceData *data = gd->driver_data;
478 + directfb_set_color (data->surface, color);
479 + data->surface->DrawLine (data->surface, x, top, x, bottom);
481 + directfb_register_flip (data, x, top, 1, bottom - top);
485 +directfb_set_clip_area (struct graphics_device *gd, struct rect *r)
487 + DFBDeviceData *data = gd->driver_data;
488 + DFBRegion region = { r->x1, r->y1, r->x2 - 1, r->y2 - 1};
492 + data->surface->SetClip (data->surface, ®ion);
496 +directfb_hscroll (struct graphics_device *gd, struct rect_set **set, int sc)
498 + DFBDeviceData *data = gd->driver_data;
505 + rect.x = gd->clip.x1;
506 + rect.y = gd->clip.y1;
507 + rect.w = gd->clip.x2 - rect.x;
508 + rect.h = gd->clip.y2 - rect.y;
510 + data->surface->Blit (data->surface,
511 + data->surface, &rect, rect.x + sc, rect.y);
513 + directfb_register_flip (data, rect.x, rect.y, rect.w, rect.h);
519 +directfb_vscroll (struct graphics_device *gd, struct rect_set **set, int sc)
521 + DFBDeviceData *data = gd->driver_data;
528 + rect.x = gd->clip.x1;
529 + rect.y = gd->clip.y1;
530 + rect.w = gd->clip.x2 - rect.x;
531 + rect.h = gd->clip.y2 - rect.y;
533 + data->surface->Blit (data->surface,
534 + data->surface, &rect, rect.x, rect.y + sc);
536 + directfb_register_flip (data, rect.x, rect.y, rect.w, rect.h);
541 +struct graphics_driver directfb_driver =
544 + directfb_fb_init_driver,
545 + directfb_init_device,
546 + directfb_shutdown_device,
547 + directfb_shutdown_driver,
548 + directfb_get_driver_param,
549 + directfb_get_empty_bitmap,
550 + directfb_get_filled_bitmap,
551 + directfb_register_bitmap,
552 + directfb_prepare_strip,
553 + directfb_commit_strip,
554 + directfb_unregister_bitmap,
555 + directfb_draw_bitmap,
556 + directfb_draw_bitmaps,
557 + directfb_get_color,
558 + directfb_fill_area,
559 + directfb_draw_hline,
560 + directfb_draw_vline,
563 + directfb_set_clip_area,
566 + NULL, /* set_title */
574 +static inline void directfb_set_color (IDirectFBSurface *surface, long color)
576 + surface->SetColor (surface,
577 + (color & 0xFF0000) >> 16,
578 + (color & 0xFF00) >> 8,
583 +static void directfb_register_flip (DFBDeviceData *data,
584 + int x, int y, int w, int h)
586 + if (x < 0 || y < 0 || w < 1 || h < 1)
592 + if (data->flip_pending)
594 + if (data->flip_region.x1 > x) data->flip_region.x1 = x;
595 + if (data->flip_region.y1 > y) data->flip_region.y1 = y;
596 + if (data->flip_region.x2 < w) data->flip_region.x2 = w;
597 + if (data->flip_region.y2 < h) data->flip_region.y2 = h;
601 + data->flip_region.x1 = x;
602 + data->flip_region.y1 = y;
603 + data->flip_region.x2 = w;
604 + data->flip_region.y2 = h;
606 + data->flip_pending = 1;
608 + register_bottom_half (directfb_flip_surface, data);
613 +directfb_flip_surface (void *pointer)
615 + DFBDeviceData *data = pointer;
617 + if (!data->flip_pending)
620 + data->surface->Flip (data->surface, &data->flip_region, 0);
622 + data->flip_pending = 0;
626 +directfb_check_events (void *pointer)
628 + struct graphics_device *gd = NULL;
629 + DFBDeviceData *data = NULL;
630 + DFBWindowEvent event;
631 + DFBWindowEvent next;
636 + while (events->GetEvent (events, DFB_EVENT (&event)) == DFB_OK)
638 + switch (event.type)
640 + case DWET_GOTFOCUS:
641 + case DWET_LOSTFOCUS:
642 + case DWET_POSITION_SIZE:
645 + case DWET_BUTTONDOWN:
646 + case DWET_BUTTONUP:
654 + if (!data || data->id != event.window_id)
656 + gd = directfb_lookup_in_table (event.window_id);
661 + data = gd->driver_data;
663 + switch (event.type)
665 + case DWET_GOTFOCUS:
666 + data->window->SetOpacity (data->window, FOCUSED_OPACITY);
669 + case DWET_LOSTFOCUS:
670 + data->window->SetOpacity (data->window, UNFOCUSED_OPACITY);
673 + case DWET_POSITION_SIZE:
676 + struct rect r = { 0, 0, event.w, event.h };
678 + gd->redraw_handler (gd, &r);
679 + data->window->SetOpacity (data->window, FOCUSED_OPACITY);
685 + while ((events->PeekEvent (events, DFB_EVENT (&next)) == DFB_OK) &&
686 + (next.type == DWET_SIZE || next.type == DWET_POSITION_SIZE) &&
687 + (next.window_id == data->id))
688 + events->GetEvent (events, DFB_EVENT (&event));
690 + gd->size.x2 = event.w;
691 + gd->size.y2 = event.h;
692 + gd->resize_handler (gd);
699 + directfb_translate_key (&event, &key, &flag);
701 + gd->keyboard_handler (gd, key, flag);
705 + case DWET_BUTTONDOWN:
706 + case DWET_BUTTONUP:
710 + if (event.type == DWET_BUTTONUP)
713 + data->window->UngrabPointer (data->window);
718 + data->window->GrabPointer (data->window);
721 + switch (event.button)
736 + gd->mouse_handler (gd, event.x, event.y, flags);
741 + gd->mouse_handler (gd, event.x, event.y,
743 + (event.step > 0 ? B_WHEELUP : B_WHEELDOWN));
749 + while ((events->PeekEvent (events, DFB_EVENT (&next)) == DFB_OK) &&
750 + (next.type == DWET_MOTION) &&
751 + (next.window_id == data->id))
752 + events->GetEvent (events, DFB_EVENT (&event));
754 + switch (event.buttons)
757 + flags = B_DRAG | B_LEFT;
760 + flags = B_DRAG | B_RIGHT;
763 + flags = B_DRAG | B_MIDDLE;
770 + gd->mouse_handler (gd, event.x, event.y, flags);
775 + gd->keyboard_handler (gd, KBD_CLOSE, 0);
783 + event_timer = install_timer (20, directfb_check_events, events);
787 +directfb_translate_key (DFBWindowEvent *event, int *key, int *flag)
792 + if (event->modifiers & DIMM_CONTROL && event->key_id == DIKI_C)
798 + /* setting Shift seems to break things
800 + * if (event->modifiers & DIMM_SHIFT)
801 + * *flag |= KBD_SHIFT;
803 + if (event->modifiers & DIMM_CONTROL)
805 + if (event->modifiers & DIMM_ALT)
808 + switch (event->key_symbol)
810 + case DIKS_ENTER: *key = KBD_ENTER; break;
811 + case DIKS_BACKSPACE: *key = KBD_BS; break;
812 + case DIKS_TAB: *key = KBD_TAB; break;
813 + case DIKS_ESCAPE: *key = KBD_ESC; break;
814 + case DIKS_CURSOR_UP: *key = KBD_UP; break;
815 + case DIKS_CURSOR_DOWN: *key = KBD_DOWN; break;
816 + case DIKS_CURSOR_LEFT: *key = KBD_LEFT; break;
817 + case DIKS_CURSOR_RIGHT: *key = KBD_RIGHT; break;
818 + case DIKS_INSERT: *key = KBD_INS; break;
819 + case DIKS_DELETE: *key = KBD_DEL; break;
820 + case DIKS_HOME: *key = KBD_HOME; break;
821 + case DIKS_END: *key = KBD_END; break;
822 + case DIKS_PAGE_UP: *key = KBD_PAGE_UP; break;
823 + case DIKS_PAGE_DOWN: *key = KBD_PAGE_DOWN; break;
824 + case DIKS_F1: *key = KBD_F1; break;
825 + case DIKS_F2: *key = KBD_F2; break;
826 + case DIKS_F3: *key = KBD_F3; break;
827 + case DIKS_F4: *key = KBD_F4; break;
828 + case DIKS_F5: *key = KBD_F5; break;
829 + case DIKS_F6: *key = KBD_F6; break;
830 + case DIKS_F7: *key = KBD_F7; break;
831 + case DIKS_F8: *key = KBD_F8; break;
832 + case DIKS_F9: *key = KBD_F9; break;
833 + case DIKS_F10: *key = KBD_F10; break;
834 + case DIKS_F11: *key = KBD_F11; break;
835 + case DIKS_F12: *key = KBD_F12; break;
838 + if (DFB_KEY_TYPE (event->key_symbol) == DIKT_UNICODE)
839 + *key = event->key_symbol;
845 +directfb_add_to_table (struct graphics_device *gd)
847 + DFBDeviceData *data = gd->driver_data;
848 + struct graphics_device **devices;
851 + i = data->id % DIRECTFB_HASH_TABLE_SIZE;
853 + devices = directfb_hash_table[i];
859 + while (devices[c++])
862 + devices = mem_realloc (devices, (c + 1) * sizeof (void *));
868 + devices = mem_alloc (2 * sizeof (void *));
873 + directfb_hash_table[i] = devices;
877 +directfb_remove_from_table (struct graphics_device *gd)
879 + DFBDeviceData *data = gd->driver_data;
880 + struct graphics_device **devices;
883 + i = data->id % DIRECTFB_HASH_TABLE_SIZE;
885 + devices = directfb_hash_table[i];
889 + for (j = 0, c = -1; devices[j]; j++)
890 + if (devices[j] == gd)
896 + memmove (devices + c, devices + c + 1, (j - c) * sizeof (void *));
897 + devices = mem_realloc (devices, j * sizeof (void *));
899 + directfb_hash_table[i] = devices;
902 +static struct graphics_device *
903 +directfb_lookup_in_table (DFBWindowID id)
905 + struct graphics_device **devices;
908 + i = id % DIRECTFB_HASH_TABLE_SIZE;
910 + devices = directfb_hash_table[i];
916 + DFBDeviceData *data = (*devices)->driver_data;
918 + if (data->id == id)
927 +#endif /* GRDRV_DIRECTFB */
928 diff -uraN ../links-2.1pre9/directfb_cursors.h ./directfb_cursors.h
929 --- ../links-2.1pre9/directfb_cursors.h 1970-01-01 01:00:00.000000000 +0100
930 +++ ./directfb_cursors.h 2003-03-13 15:06:00.000000000 +0100
932 +/* DirectFB surface dump created by directfb-csource 0.9.14 */
934 +/* This arrow cursor surface is based on a cursor drawn by Ville Pätsi. */
935 +static unsigned char arrow_data[] =
936 + "\0\0\0\0\0\0\0#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
937 + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
938 + "\0\0\0\0\0\0/\253\253\253\320\0\0\0N\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0"
939 + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
940 + "\0\0\0\0\0\0\0\0\0\0\0\0\0H\306\306\306\363\200\200\200\320\0\0\0Y\0"
941 + "\0\0\21\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
942 + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Z\377\377\377\377\301"
943 + "\301\301\372\223\223\223\347\0\0\0k\0\0\0\30\0\0\0\6\0\0\0\2\0\0\0\1"
944 + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
945 + "\0\0\0\0\0]\377\377\377\377\377\377\377\377\264\264\264\373\213\213\213"
946 + "\352\0\0\0u\0\0\0\36\0\0\0\10\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0"
947 + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\377\377\377\377\375\375"
948 + "\375\377\356\356\356\377\254\254\254\374\206\206\206\354\0\0\0y\0\0\0"
949 + "!\0\0\0\10\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
950 + "\0\0\0\0\0\0\0\0\0\0`\377\377\377\377\372\372\372\377\355\355\355\377"
951 + "\343\343\343\377\247\247\247\374\203\203\203\354\0\0\0z\0\0\0\"\0\0\0"
952 + "\11\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
953 + "\0\0`\377\377\377\377\365\365\365\377\351\351\351\377\341\341\341\377"
954 + "\335\335\335\377\243\243\243\374\177\177\177\355\0\0\0{\0\0\0\"\0\0\0"
955 + "\11\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\371"
956 + "\371\371\377\360\360\360\377\346\346\346\377\337\337\337\377\333\333"
957 + "\333\377\327\327\327\377\236\236\236\374{{{\355\0\0\0{\0\0\0\"\0\0\0"
958 + "\11\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\365\365\365"
959 + "\377\355\355\355\377\342\342\342\377\333\333\333\377\330\330\330\377"
960 + "\325\325\325\377\317\317\317\377\227\227\227\374vvv\355\0\0\0{\0\0\0"
961 + "\"\0\0\0\11\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\361\361\361"
962 + "\377\350\350\350\377\335\335\335\377\326\326\326\377\324\324\324\377"
963 + "\317\317\317\377\307\307\307\377\277\277\277\377\216\216\216\374qqq\352"
964 + "\0\0\0r\0\0\0\33\0\0\0\11\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0`\353"
965 + "\353\353\377\340\340\340\377\324\324\324\377\317\317\317\377\315\315"
966 + "\315\377\307\307\307\377\274\274\274\377\257\257\257\377\212\212\212"
967 + "\375ggg\357\\\\\\\313\0\0\0F\0\0\0\24\0\0\0\11\0\0\0\3\0\0\0\1\0\0\0"
968 + "\0\0\0\0`\340\340\340\377\321\321\321\377\305\305\305\377\304\304\304"
969 + "\377\307\307\307\377\302\302\302\377\242\242\242\376HHH\361\0\0\0\267"
970 + "\0\0\0\224\0\0\0t\0\0\0?\0\0\0\"\0\0\0\22\0\0\0\7\0\0\0\2\0\0\0\0\0\0"
971 + "\0]\321\321\321\377\277\277\277\377\207\207\207\374jjj\367\302\302\302"
972 + "\377\301\301\301\377\263\263\263\377!!!\334\0\0\0\215\0\0\0d\0\0\0Q\0"
973 + "\0\0>\0\0\0-\0\0\0\33\0\0\0\14\0\0\0\4\0\0\0\1\0\0\0E\230\230\230\363"
974 + "kkk\353\0\0\0\243\0\0\0\254\200\200\200\370\304\304\304\377\271\271\271"
975 + "\377ttt\371\0\0\0\233\0\0\0Y\0\0\0F\0\0\0<\0\0\0.\0\0\0\36\0\0\0\16\0"
976 + "\0\0\4\0\0\0\1\0\0\0\7\0\0\0M\0\0\0]\0\0\0O\0\0\0f'''\305\304\304\304"
977 + "\377\274\274\274\377\253\253\253\377\22\22\22\277\0\0\0e\0\0\0A\0\0\0"
978 + "3\0\0\0%\0\0\0\27\0\0\0\13\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\3\0\0\0\24\0"
979 + "\0\0)\0\0\0<\0\0\0\207\223\223\223\373\267\267\267\377\252\252\252\377"
980 + "YYY\360\0\0\0\203\0\0\0@\0\0\0+\0\0\0\32\0\0\0\15\0\0\0\6\0\0\0\2\0\0"
981 + "\0\0\0\0\0\0\0\0\0\2\0\0\0\11\0\0\0\27\0\0\0'\0\0\0N===\312\257\257\257"
982 + "\377\242\242\242\377lll\370\0\0\0\221\0\0\0E\0\0\0)\0\0\0\26\0\0\0\11"
983 + "\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\15\0\0\0\26\0"
984 + "\0\0\33\0\0\0\\CCC\322ppp\366MMM\345\0\0\0\204\0\0\0I\0\0\0-\0\0\0\31"
985 + "\0\0\0\12\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0"
986 + "\0\11\0\0\0\13\0\0\0\20\0\0\0E\0\0\0s\0\0\0w\0\0\0Z\0\0\0E\0\0\0""2\0"
987 + "\0\0\35\0\0\0\14\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
988 + "\0\1\0\0\0\2\0\0\0\3\0\0\0\4\0\0\0\12\0\0\0\36\0\0\0""4\0\0\0>\0\0\0"
989 + "<\0\0\0""1\0\0\0\36\0\0\0\15\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0"
990 + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\4\0\0\0\15\0\0\0\33\0"
991 + "\0\0)\0\0\0.\0\0\0(\0\0\0\31\0\0\0\13\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0"
992 + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\6\0\0"
993 + "\0\15\0\0\0\26\0\0\0\33\0\0\0\30\0\0\0\17\0\0\0\7\0\0\0\2\0\0\0\0\0\0"
994 + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
995 + "\0\0\0\1\0\0\0\4\0\0\0\10\0\0\0\13\0\0\0\12\0\0\0\6\0\0\0\3\0\0\0\1\0"
996 + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
997 + "\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\3\0\0\0\3\0\0\0\1\0\0\0\1\0"
998 + "\0\0\0\0\0\0\0\0\0\0\0";
1000 +static DFBSurfaceDescription arrow_desc = {
1001 + flags : DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT |
1002 + DSDESC_PREALLOCATED,
1005 + pixelformat : DSPF_ARGB,
1006 + preallocated : {{ data : (void *) arrow_data,
1010 +#define arrow_hot_x 1
1011 +#define arrow_hot_y 1
1012 diff -uraN ../links-2.1pre9/drivers.c ./drivers.c
1013 --- ../links-2.1pre9/drivers.c 2002-10-12 21:46:24.000000000 +0200
1014 +++ ./drivers.c 2003-03-13 15:06:01.000000000 +0100
1017 extern struct graphics_driver fb_driver;
1019 +#ifdef GRDRV_DIRECTFB
1020 +extern struct graphics_driver directfb_driver;
1022 #ifdef GRDRV_PMSHELL
1023 extern struct graphics_driver pmshell_driver;
1029 +#ifdef GRDRV_DIRECTFB
1032 #ifdef GRDRV_SVGALIB
1035 diff -uraN ../links-2.1pre9/img.c ./img.c
1036 --- ../links-2.1pre9/img.c 2003-02-20 14:01:12.000000000 +0100
1037 +++ ./img.c 2003-03-13 15:06:01.000000000 +0100
1038 @@ -514,11 +514,11 @@
1039 tmpbmp.data=(unsigned char *)cimg->bmp.data+cimg->bmp.skip*yoff;
1040 add1=cimg->bmp.skip*max_height;
1042 - tmpbmp.skip=cimg->bmp.skip;
1043 add2=cimg->buffer_bytes_per_pixel*cimg->width*max_height;
1045 tmpbmp.y=height<max_height?height:max_height;
1046 if (use_strip) tmpbmp.data=drv->prepare_strip(&(cimg->bmp),yoff,tmpbmp.y);
1047 + tmpbmp.skip=cimg->bmp.skip;
1048 buffer_to_16(tmp, cimg, buffer, tmpbmp.y);
1050 dither_restart(tmp, &tmpbmp, dregs);
1051 diff -uraN ../links-2.1pre9/os_dep.c ./os_dep.c
1052 --- ../links-2.1pre9/os_dep.c 2003-01-10 23:13:49.000000000 +0100
1053 +++ ./os_dep.c 2003-03-13 15:06:01.000000000 +0100
1054 @@ -1182,7 +1182,7 @@
1056 write(p[1], "x", 1);