summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish Gupta <ashmew2@gmail.com>2017-04-14 12:06:18 (GMT)
committer Ashish Gupta <ashmew2@gmail.com>2017-09-12 17:56:08 (GMT)
commit6ddc353ebeda3b21f8af1e49113c251a9eb77c2a (patch)
tree0d01e3b8f9406216f9c7c6d83ad8ec48cb031360
parent7be4aa692e242b00c9fafde3377671e3b062328f (diff)
downloadnetsurf-6ddc353ebeda3b21f8af1e49113c251a9eb77c2a.tar.gz
netsurf-6ddc353ebeda3b21f8af1e49113c251a9eb77c2a.tar.bz2
Steal framebuffer and reuse in kolibrios port
-rw-r--r--Makefile13
-rw-r--r--frontends/kolibrios/Makefile20
-rw-r--r--frontends/kolibrios/Makefile.defaults2
-rw-r--r--frontends/kolibrios/convert_image.c4
-rw-r--r--frontends/kolibrios/fb/bitmap.c8
-rw-r--r--frontends/kolibrios/fb/clipboard.c4
-rw-r--r--frontends/kolibrios/fb/convert_image.c4
-rw-r--r--frontends/kolibrios/fb/fbtk/bitmap.c6
-rw-r--r--frontends/kolibrios/fb/fbtk/event.c6
-rw-r--r--frontends/kolibrios/fb/fbtk/fbtk.c6
-rw-r--r--frontends/kolibrios/fb/fbtk/fill.c4
-rw-r--r--frontends/kolibrios/fb/fbtk/osk.c6
-rw-r--r--frontends/kolibrios/fb/fbtk/scroll.c6
-rw-r--r--frontends/kolibrios/fb/fbtk/text.c10
-rw-r--r--frontends/kolibrios/fb/fbtk/user.c4
-rw-r--r--frontends/kolibrios/fb/fbtk/window.c4
-rw-r--r--frontends/kolibrios/fb/fetch.c4
-rw-r--r--frontends/kolibrios/fb/findfile.c2
-rw-r--r--frontends/kolibrios/fb/font_freetype.c6
-rw-r--r--frontends/kolibrios/fb/font_internal.c4
-rw-r--r--frontends/kolibrios/fb/framebuffer.c15
-rw-r--r--frontends/kolibrios/fb/gui.c31
-rw-r--r--frontends/kolibrios/fb/image_data.h2
-rw-r--r--frontends/kolibrios/fb/localhistory.c6
-rw-r--r--frontends/kolibrios/fb/schedule.c2
25 files changed, 97 insertions, 82 deletions
diff --git a/Makefile b/Makefile
index b2ce3b6..65da22b 100644
--- a/Makefile
+++ b/Makefile
@@ -136,7 +136,11 @@ MESSAGES_TARGET=!NetSurf/Resources
PERL=perl
MKDIR=mkdir
TOUCH=touch
-STRIP?=strip
+ifneq ($(TARGET),kolibrios)
+ STRIP?=strip
+else
+ STRIP?=kos32-strip
+endif
SPLIT_MESSAGES=$(PERL) utils/split-messages.pl
# build verbosity
@@ -533,13 +537,13 @@ else
KOL_LIBC := $(HOME)/kolibrios/contrib/sdk/sources/newlib/libc/include/
KOL_LIB_DIR := $(HOME)/kolibrios/contrib/sdk/lib
LIB_LDFLAGS := -L$(KOL_LIB_DIR) -lfreetype
- OS_LDFLAGS := -static -Tapp-static.lds
+ OS_LDFLAGS := -static -S -Tapp-dynamic.lds --image-base 0
NS_INCLUDE := $(PREFIX)/include
NS_LIB_LDFLAGS := -L$(PREFIX)/lib/ -lnsbmp -lnsutils -lwapcaplet -lsvgtiny -lnsgif -lutf8proc -lcss -lnsfb -lparserutils -ldom -lhubbub -lz
CFLAGS += -c -fno-ident -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U__BSD_VISIBLE -I$(KOL_LIBC) -I$(NS_INCLUDE)
- LDFLAGS += $(OS_LDFLAGS) $(NS_LIB_LDFLAGS) $(LIB_LDFLAGS) -lc -lgcc -lc.dll
+ LDFLAGS += $(OS_LDFLAGS) $(NS_LIB_LDFLAGS) $(LIB_LDFLAGS) -lgcc -lc.dll
endif
# Common libraries without pkg-config support
@@ -726,7 +730,7 @@ OBJECTS := $(sort $(addprefix $(OBJROOT)/,$(subst /,_,$(patsubst %.c,%.o,$(patsu
IFLAGS = $(addprefix -I,$(INCLUDE_DIRS))
ifeq ($(TARGET),kolibrios)
- KOLOBJECTS = $(HOME)/kolibrios/programs/develop/libraries/iconv/iconv.o $(HOME)/kolibrios/programs/fs/unzip60/kolibri/dirent.o
+ KOLOBJECTS = $(HOME)/kolibrios/programs/develop/libraries/iconv/iconv.o $(HOME)/kolibrios/programs/fs/unzip60/kolibri/dirent.o $(HOME)/NETSURFLIBS/netsurf/font_internal.o
endif
$(EXETARGET): $(OBJECTS) $(RESOURCES) $(MESSAGES)
@@ -734,6 +738,7 @@ $(EXETARGET): $(OBJECTS) $(RESOURCES) $(MESSAGES)
ifeq ($(TARGET),kolibrios)
$(warning $(LD) -o $(EXETARGET) $(OBJECTS) $(KOLOBJECTS) $(LDFLAGS))
$(Q)$(LD) -o $(EXETARGET) $(OBJECTS) $(KOLOBJECTS) $(LDFLAGS)
+ objcopy -O binary nskolibrios
else ifneq ($(TARGET)$(SUBTARGET),riscos-elf)
$(Q)$(CC) -o $(EXETARGET) $(OBJECTS) $(LDFLAGS)
else
diff --git a/frontends/kolibrios/Makefile b/frontends/kolibrios/Makefile
index bed51a7..1d7b939 100644
--- a/frontends/kolibrios/Makefile
+++ b/frontends/kolibrios/Makefile
@@ -1,14 +1,13 @@
CWARNFLAGS += -Wno-error -Wno-redundant-decls -Wno-char-subscripts -Wno-undef -Wno-implicit-function-declaration -Wno-int-conversion -Wno-nested-externs -Wno-format-extra-args -Wno-format
DMACROS := -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -D_NETBSD_SOURCE -D_TARGET_IS_KOLIBRIOS
-KOL_OTHER_INCLUDES := -I$(HOME)/kolibrios/contrib/sdk/sources/libpng/ -I$(HOME)/kolibrios/contrib/sdk/sources/zlib -I$(HOME)/kolibrios/contrib/sdk/sources/freetype/include -I$(HOME)/kolibrios/contrib/sdk/sources/freetype/include -I$(HOME)/dev-netsurf/workspace/netsurf/libjpeg
+KOL_OTHER_INCLUDES := -I$(HOME)/kolibrios/contrib/sdk/sources/libpng/ -I$(HOME)/kolibrios/contrib/sdk/sources/zlib -I$(HOME)/kolibrios/contrib/sdk/sources/freetype/include -I$(HOME)/kolibrios/contrib/sdk/sources/freetype/include -I$(HOME)/kolibrios/contrib/sdk/sources/libjpeg
CFLAGS += $(KOL_OTHER_INCLUDES) $(DMACROS) -std=c99 -g
CFLAGS += '-DNETSURF_KOLIBRI_FONTPATH="$(NETSURF_KOLIBRI_FONTPATH)"'
-CFLAGS += '-DNETSURF_KOLIBRI_FONT_SANS_SERIF="$(NETSURF_KOLIBRI_FONT_SANS_SERIF)"'
-CFLAGS += '-DKOLIBRIOS_RESPATH="$(NETSURF_KOLIBRIOS_RESOURCES)"'
-CFLAGS += '-DKOLIBRI_USE_FREETYPE'
+CFLAGS += '-DKOLIBRIOS_RESPATH="$(NETSURF_KOLIBRI_RESPATH)"'
+#CFLAGS += '-DKOLIBRI_USE_FREETYPE'
##########################################################################
# Only for FB compat with kolibri. Get rid soon.
@@ -103,16 +102,16 @@ $(TOOLROOT)/convert_font: $(TOOLROOT)/created $(FRONTEND_SOURCE_DIR)/fb/convert_
define convert_font
S_FONTS += $(2)
-
+$(warning Adding to S_FONTS : $(2))
$(2): $(1) $(TOOLROOT)/convert_font
$(VQ)echo " FONT: $(1) ($(4))"
$(Q)$(TOOLROOT)/convert_font -H $(3) $(1) $(2)
-
endef
S_FONTS :=
$(eval $(foreach V,$(filter KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,$(.VARIABLES)),$(call convert_font,$($(V)),$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).c,$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).h,$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)))))
+$(warning $(foreach V,$(filter KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,$(.VARIABLES)),$(call convert_font,$($(V)),$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).c,$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).h,$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)))))
# non optional pkg-configed libs
#$(eval $(call pkg_config_find_and_add,libcurl,Curl ))
#$(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
@@ -130,18 +129,17 @@ $(eval $(foreach V,$(filter KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,$(.VARIABL
#S_KOLIBRIOS := main.c kolibri_misc.c kolibri_debug.c kolibri_filesystem.c kolibri_regex.c kolibri_http.c
S_KOLIBRIOS :=
-S_FRAMEBUFFER := gui.c framebuffer.c schedule.c bitmap.c fetch.c findfile.c localhistory.c clipboard.c
+S_FRAMEBUFFER := gui.c framebuffer.c schedule.c bitmap.c fetch.c findfile.c localhistory.c clipboard.c
S_FRAMEBUFFER_FBTK := fbtk.c event.c fill.c bitmap.c user.c window.c text.c scroll.c osk.c
-S_FRAMEBUFFER += font_$(NETSURF_KOLIBRI_FONTLIB).c
-S_FRAMEBUFFER := $(addprefix fb/,$(S_FRAMEBUFFER)) $(addprefix fb/fbtk/,$(S_FRAMEBUFFER_FBTK))
+S_FRAMEBUFFER := $(addprefix fb/,$(S_FRAMEBUFFER))
+S_FRAMEBUFFER += $(addprefix fb/fbtk/,$(S_FRAMEBUFFER_FBTK))
S_KOLIBRIOS += $(S_FRAMEBUFFER)
S_FRONTEND := $(S_KOLIBRIOS)
-SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_FRONTEND) $(S_IMAGES) $(S_FONTS)
+SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_FRONTEND) $(S_IMAGES) $(S_FONTS)
EXETARGET := nskolibrios
install-kolibri:
-
diff --git a/frontends/kolibrios/Makefile.defaults b/frontends/kolibrios/Makefile.defaults
index bada4565..033c5b3 100644
--- a/frontends/kolibrios/Makefile.defaults
+++ b/frontends/kolibrios/Makefile.defaults
@@ -39,4 +39,4 @@ NETSURF_FRAMEBUFFER_RESOURCES := $(PREFIX)/share/netsurf/
NETSURF_KOLIBRI_RESPATH := /usbhd0/1/res
#Where are the fonts in Kolibri?
-NETSURF_KOLIBRI_FONTPATH := $(FRONTEND_SOURCE_DIR)/res/
+NETSURF_KOLIBRI_FONTPATH := /usbhd0/1/res/
diff --git a/frontends/kolibrios/convert_image.c b/frontends/kolibrios/convert_image.c
index 838a907..637898d 100644
--- a/frontends/kolibrios/convert_image.c
+++ b/frontends/kolibrios/convert_image.c
@@ -180,8 +180,8 @@ main(int argc, char **argv)
fprintf(f, "#include <stdbool.h>\n\n");
fprintf(f, "#include <libnsfb.h>\n\n");
fprintf(f, "#include \"desktop/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/bitmap.c b/frontends/kolibrios/fb/bitmap.c
index 027e012..f844b96 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 1254c36..d99463f 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 de772fc..80dd2aa 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 759b626..ef49471 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 a48e638..b5db9e5 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 c63a6d8..5d1f25a 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 9377933..015febf 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 628fe9a..b582534 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 cc98fb2..8fb5a6b 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 31417c2..948c5ff 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 de547ab..9527dbd 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 b385e8e..020bfbe 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 801b87a..cbeefdb 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 67312f4..5be3312 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 e7c07f5..68a54a3 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 3b8a1c4..a217086 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 649862a..eae6a06 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 dd5ef71..ab2b981 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 cf349f5..a386838 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 3192f07..e305aad 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 72baa98..703c14d 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)