diff options
author | Ashish Gupta <ashmew2@gmail.com> | 2017-04-14 14:06:18 +0200 |
---|---|---|
committer | Ashish Gupta <ashmew2@gmail.com> | 2017-06-10 08:25:29 +0200 |
commit | ee95879c08bd807cfaac9ae59899d6c7f8772e0f (patch) | |
tree | 69bf37e8a92c4fa2c4f9ca6c236beaaf904025e7 /frontends/kolibrios/fb | |
parent | 6fed24e8948c1acaaeae002b9ee7ee44a7e2e0a5 (diff) | |
download | netsurf-ee95879c08bd807cfaac9ae59899d6c7f8772e0f.tar.gz netsurf-ee95879c08bd807cfaac9ae59899d6c7f8772e0f.tar.bz2 |
Steal framebuffer and reuse in kolibrios port
Diffstat (limited to 'frontends/kolibrios/fb')
-rw-r--r-- | frontends/kolibrios/fb/bitmap.c | 8 | ||||
-rw-r--r-- | frontends/kolibrios/fb/clipboard.c | 4 | ||||
-rw-r--r-- | frontends/kolibrios/fb/convert_image.c | 4 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fbtk/bitmap.c | 6 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fbtk/event.c | 6 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fbtk/fbtk.c | 6 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fbtk/fill.c | 4 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fbtk/osk.c | 6 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fbtk/scroll.c | 6 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fbtk/text.c | 10 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fbtk/user.c | 4 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fbtk/window.c | 4 | ||||
-rw-r--r-- | frontends/kolibrios/fb/fetch.c | 4 | ||||
-rw-r--r-- | frontends/kolibrios/fb/findfile.c | 2 | ||||
-rw-r--r-- | frontends/kolibrios/fb/font_freetype.c | 6 | ||||
-rw-r--r-- | frontends/kolibrios/fb/font_internal.c | 4 | ||||
-rw-r--r-- | frontends/kolibrios/fb/framebuffer.c | 15 | ||||
-rw-r--r-- | frontends/kolibrios/fb/gui.c | 31 | ||||
-rw-r--r-- | frontends/kolibrios/fb/image_data.h | 2 | ||||
-rw-r--r-- | frontends/kolibrios/fb/localhistory.c | 6 | ||||
-rw-r--r-- | frontends/kolibrios/fb/schedule.c | 2 |
21 files changed, 76 insertions, 64 deletions
diff --git a/frontends/kolibrios/fb/bitmap.c b/frontends/kolibrios/fb/bitmap.c index 027e0122b..f844b9697 100644 --- a/frontends/kolibrios/fb/bitmap.c +++ b/frontends/kolibrios/fb/bitmap.c @@ -34,10 +34,10 @@ #include "netsurf/plotters.h" #include "netsurf/content.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/framebuffer.h" -#include "framebuffer/bitmap.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/framebuffer.h" +#include "kolibrios/fb/bitmap.h" /** * Create a bitmap. diff --git a/frontends/kolibrios/fb/clipboard.c b/frontends/kolibrios/fb/clipboard.c index 1254c36f3..d99463f4e 100644 --- a/frontends/kolibrios/fb/clipboard.c +++ b/frontends/kolibrios/fb/clipboard.c @@ -29,8 +29,8 @@ #include "netsurf/browser_window.h" #include "netsurf/clipboard.h" -#include "framebuffer/gui.h" -#include "framebuffer/clipboard.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/clipboard.h" static struct gui_clipboard { diff --git a/frontends/kolibrios/fb/convert_image.c b/frontends/kolibrios/fb/convert_image.c index de772fc29..80dd2aa15 100644 --- a/frontends/kolibrios/fb/convert_image.c +++ b/frontends/kolibrios/fb/convert_image.c @@ -263,8 +263,8 @@ main(int argc, char **argv) fprintf(f, "#include <stdbool.h>\n\n"); fprintf(f, "#include <libnsfb.h>\n\n"); fprintf(f, "#include \"netsurf/plot_style.h\"\n"); - fprintf(f, "#include \"framebuffer/gui.h\"\n"); - fprintf(f, "#include \"framebuffer/fbtk.h\"\n\n"); + fprintf(f, "#include \"kolibrios/fb/gui.h\"\n"); + fprintf(f, "#include \"kolibrios/fb/fbtk.h\"\n\n"); fprintf(f, "static uint8_t %s_pixdata[] = {\n", argv[3]); for (y = 0; y < HEIGHT; ++y) { diff --git a/frontends/kolibrios/fb/fbtk/bitmap.c b/frontends/kolibrios/fb/fbtk/bitmap.c index 759b626d9..ef49471d4 100644 --- a/frontends/kolibrios/fb/fbtk/bitmap.c +++ b/frontends/kolibrios/fb/fbtk/bitmap.c @@ -26,9 +26,9 @@ #include "netsurf/browser_window.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/image_data.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/image_data.h" #include "widget.h" diff --git a/frontends/kolibrios/fb/fbtk/event.c b/frontends/kolibrios/fb/fbtk/event.c index a48e63809..b5db9e5bd 100644 --- a/frontends/kolibrios/fb/fbtk/event.c +++ b/frontends/kolibrios/fb/fbtk/event.c @@ -34,9 +34,9 @@ #include "netsurf/browser_window.h" #include "netsurf/keypress.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/image_data.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/image_data.h" #include "widget.h" diff --git a/frontends/kolibrios/fb/fbtk/fbtk.c b/frontends/kolibrios/fb/fbtk/fbtk.c index c63a6d8c9..5d1f25ac9 100644 --- a/frontends/kolibrios/fb/fbtk/fbtk.c +++ b/frontends/kolibrios/fb/fbtk/fbtk.c @@ -37,9 +37,9 @@ #include "netsurf/browser_window.h" #include "netsurf/plotters.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/image_data.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/image_data.h" #include "widget.h" diff --git a/frontends/kolibrios/fb/fbtk/fill.c b/frontends/kolibrios/fb/fbtk/fill.c index 9377933cc..015febf6d 100644 --- a/frontends/kolibrios/fb/fbtk/fill.c +++ b/frontends/kolibrios/fb/fbtk/fill.c @@ -26,8 +26,8 @@ #include "netsurf/browser_window.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" #include "widget.h" diff --git a/frontends/kolibrios/fb/fbtk/osk.c b/frontends/kolibrios/fb/fbtk/osk.c index 628fe9abd..b582534d7 100644 --- a/frontends/kolibrios/fb/fbtk/osk.c +++ b/frontends/kolibrios/fb/fbtk/osk.c @@ -29,9 +29,9 @@ #include "utils/log.h" #include "netsurf/browser_window.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/image_data.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/image_data.h" #include "widget.h" diff --git a/frontends/kolibrios/fb/fbtk/scroll.c b/frontends/kolibrios/fb/fbtk/scroll.c index cc98fb2dd..8fb5a6ba6 100644 --- a/frontends/kolibrios/fb/fbtk/scroll.c +++ b/frontends/kolibrios/fb/fbtk/scroll.c @@ -30,9 +30,9 @@ #include "utils/log.h" #include "netsurf/browser_window.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/image_data.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/image_data.h" #include "widget.h" diff --git a/frontends/kolibrios/fb/fbtk/text.c b/frontends/kolibrios/fb/fbtk/text.c index 31417c2e0..948c5ffd8 100644 --- a/frontends/kolibrios/fb/fbtk/text.c +++ b/frontends/kolibrios/fb/fbtk/text.c @@ -31,11 +31,11 @@ #include "netsurf/browser_window.h" #include "netsurf/plotters.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/font.h" -#include "framebuffer/framebuffer.h" -#include "framebuffer/image_data.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/font.h" +#include "kolibrios/fb/framebuffer.h" +#include "kolibrios/fb/image_data.h" #include "widget.h" diff --git a/frontends/kolibrios/fb/fbtk/user.c b/frontends/kolibrios/fb/fbtk/user.c index de547ab46..9527dbd75 100644 --- a/frontends/kolibrios/fb/fbtk/user.c +++ b/frontends/kolibrios/fb/fbtk/user.c @@ -22,8 +22,8 @@ #include <stdbool.h> #include <libnsfb.h> -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" #include "widget.h" diff --git a/frontends/kolibrios/fb/fbtk/window.c b/frontends/kolibrios/fb/fbtk/window.c index b385e8e3f..020bfbed8 100644 --- a/frontends/kolibrios/fb/fbtk/window.c +++ b/frontends/kolibrios/fb/fbtk/window.c @@ -26,8 +26,8 @@ #include "netsurf/browser_window.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" #include "widget.h" diff --git a/frontends/kolibrios/fb/fetch.c b/frontends/kolibrios/fb/fetch.c index 801b87a74..cbeefdb1c 100644 --- a/frontends/kolibrios/fb/fetch.c +++ b/frontends/kolibrios/fb/fetch.c @@ -31,8 +31,8 @@ #include "utils/file.h" #include "netsurf/fetch.h" -#include "framebuffer/findfile.h" -#include "framebuffer/fetch.h" +#include "kolibrios/fb/findfile.h" +#include "kolibrios/fb/fetch.h" /** diff --git a/frontends/kolibrios/fb/findfile.c b/frontends/kolibrios/fb/findfile.c index 67312f452..5be33123b 100644 --- a/frontends/kolibrios/fb/findfile.c +++ b/frontends/kolibrios/fb/findfile.c @@ -20,7 +20,7 @@ #include "utils/filepath.h" -#include "framebuffer/findfile.h" +#include "kolibrios/fb/findfile.h" char **respaths; /** resource search path vector */ diff --git a/frontends/kolibrios/fb/font_freetype.c b/frontends/kolibrios/fb/font_freetype.c index e7c07f5ff..68a54a384 100644 --- a/frontends/kolibrios/fb/font_freetype.c +++ b/frontends/kolibrios/fb/font_freetype.c @@ -32,9 +32,9 @@ #include "netsurf/browser_window.h" #include "netsurf/plot_style.h" -#include "framebuffer/gui.h" -#include "framebuffer/font.h" -#include "framebuffer/findfile.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/font.h" +#include "kolibrios/fb/findfile.h" /* glyph cache minimum size */ #define CACHE_MIN_SIZE (100 * 1024) diff --git a/frontends/kolibrios/fb/font_internal.c b/frontends/kolibrios/fb/font_internal.c index 3b8a1c43f..a217086e9 100644 --- a/frontends/kolibrios/fb/font_internal.c +++ b/frontends/kolibrios/fb/font_internal.c @@ -28,8 +28,8 @@ #include "netsurf/layout.h" #include "netsurf/plot_style.h" -#include "framebuffer/gui.h" -#include "framebuffer/font.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/font.h" #include <font-ns-sans.h> diff --git a/frontends/kolibrios/fb/framebuffer.c b/frontends/kolibrios/fb/framebuffer.c index 649862aa3..eae6a0605 100644 --- a/frontends/kolibrios/fb/framebuffer.c +++ b/frontends/kolibrios/fb/framebuffer.c @@ -35,11 +35,11 @@ #include "netsurf/plotters.h" #include "netsurf/bitmap.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/framebuffer.h" -#include "framebuffer/font.h" -#include "framebuffer/bitmap.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/framebuffer.h" +#include "kolibrios/fb/font.h" +#include "kolibrios/fb/bitmap.h" /* netsurf framebuffer library handle */ static nsfb_t *nsfb; @@ -581,8 +581,13 @@ framebuffer_initialise(const char *fename, int width, int height, int bpp) return NULL; } + fprintf(stderr, "Our: %s\n", fename); + + __asm__ __volatile__("int3"); + fbtype = nsfb_type_from_name(fename); if (fbtype == NSFB_SURFACE_NONE) { + fprintf(stderr, "Got fucked here because nsfb_type_from_name failed for : %s\n", fename); LOG("The %s surface is not available from libnsfb\n", fename); return NULL; } diff --git a/frontends/kolibrios/fb/gui.c b/frontends/kolibrios/fb/gui.c index dd5ef71ab..ab2b9812f 100644 --- a/frontends/kolibrios/fb/gui.c +++ b/frontends/kolibrios/fb/gui.c @@ -44,16 +44,16 @@ #include "netsurf/cookie_db.h" #include "content/fetch.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/framebuffer.h" -#include "framebuffer/schedule.h" -#include "framebuffer/findfile.h" -#include "framebuffer/image_data.h" -#include "framebuffer/font.h" -#include "framebuffer/clipboard.h" -#include "framebuffer/fetch.h" -#include "framebuffer/bitmap.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/framebuffer.h" +#include "kolibrios/fb/schedule.h" +#include "kolibrios/fb/findfile.h" +#include "kolibrios/fb/image_data.h" +#include "kolibrios/fb/font.h" +#include "kolibrios/fb/clipboard.h" +#include "kolibrios/fb/fetch.h" +#include "kolibrios/fb/bitmap.h" #define NSFB_TOOLBAR_DEFAULT_LAYOUT "blfsrutc" @@ -465,7 +465,7 @@ process_cmdline(int argc, char** argv) LOG("argc %d, argv %p", argc, argv); - fename = "sdl"; + fename = "kolibri"; febpp = 32; fewidth = nsoption_int(window_width); @@ -2142,7 +2142,14 @@ main(int argc, char** argv) if (process_cmdline(argc,argv) != true) die("unable to process command line.\n"); + extern struct nsfb_surface_rtns_t kolibri_rtns; + _nsfb_register_surface(NSFB_SURFACE_KOLIBRI, &kolibri_rtns, "kolibri"); + + extern struct nsfb_surface_rtns_t ram_rtns; + _nsfb_register_surface(NSFB_SURFACE_RAM, &ram_rtns, "ram"); + nsfb = framebuffer_initialise(fename, fewidth, feheight, febpp); + if (nsfb == NULL) die("Unable to initialise framebuffer"); @@ -2170,11 +2177,11 @@ main(int argc, char** argv) &bw); nsurl_unref(url); } + if (ret != NSERROR_OK) { fb_warn_user(messages_get_errorcode(ret), 0); } else { framebuffer_run(); - browser_window_destroy(bw); } diff --git a/frontends/kolibrios/fb/image_data.h b/frontends/kolibrios/fb/image_data.h index cf349f59a..a386838df 100644 --- a/frontends/kolibrios/fb/image_data.h +++ b/frontends/kolibrios/fb/image_data.h @@ -19,7 +19,7 @@ #ifndef FB_IMAGE_DATA #define FB_IMAGE_DATA -#include "framebuffer/fbtk.h" +#include "kolibrios/fb/fbtk.h" extern struct fbtk_bitmap left_arrow; extern struct fbtk_bitmap right_arrow; diff --git a/frontends/kolibrios/fb/localhistory.c b/frontends/kolibrios/fb/localhistory.c index 3192f0747..e305aad4e 100644 --- a/frontends/kolibrios/fb/localhistory.c +++ b/frontends/kolibrios/fb/localhistory.c @@ -27,9 +27,9 @@ #include "desktop/browser_history.h" #include "netsurf/plotters.h" -#include "framebuffer/gui.h" -#include "framebuffer/fbtk.h" -#include "framebuffer/framebuffer.h" +#include "kolibrios/fb/gui.h" +#include "kolibrios/fb/fbtk.h" +#include "kolibrios/fb/framebuffer.h" static int localhistory_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi) diff --git a/frontends/kolibrios/fb/schedule.c b/frontends/kolibrios/fb/schedule.c index 72baa988e..703c14d48 100644 --- a/frontends/kolibrios/fb/schedule.c +++ b/frontends/kolibrios/fb/schedule.c @@ -50,7 +50,7 @@ #include "utils/sys_time.h" #include "utils/log.h" -#include "framebuffer/schedule.h" +#include "kolibrios/fb/schedule.h" #ifdef DEBUG_SCHEDULER #define SRLOG(x...) LOG(x) |