Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/abba455dd1656eab7ca79bdbeb40ec7ba1899261
...commit
http://git.netsurf-browser.org/netsurf.git/commit/abba455dd1656eab7ca79bdbeb40ec7ba1899261
...tree
http://git.netsurf-browser.org/netsurf.git/tree/abba455dd1656eab7ca79bdbeb40ec7ba1899261
The branch, ashmew2/nskolibrios has been updated
via abba455dd1656eab7ca79bdbeb40ec7ba1899261 (commit)
via 6788550896fb343887b908beabcf66d9050f47d8 (commit)
from 72c756ff154aa4b7b1e571e99f3130e4eab91607 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=abba455dd1656eab7ca79bdbeb40ec7ba1899261
commit abba455dd1656eab7ca79bdbeb40ec7ba1899261
Author: Ashish Gupta <[email protected]>
Commit: Ashish Gupta <[email protected]>
Remove bloat x3
diff --git a/content/fetchers/file.c b/content/fetchers/file.c
index f200eee..067d9be 100644
--- a/content/fetchers/file.c
+++ b/content/fetchers/file.c
@@ -42,7 +42,6 @@
#ifdef HAVE_MMAP
#include <sys/mman.h>
#endif
-
#include <libwapcaplet/libwapcaplet.h>
#include "netsurf/inttypes.h"
@@ -192,11 +191,6 @@ static void fetch_file_free(void *ctx)
/** callback to start a file fetch */
static bool fetch_file_start(void *ctx)
{
-#ifdef _TARGET_IS_KOLIBRIOS
- struct fetch_file_context *c = ctx;
- debug_board_printf("[%u] Starting file fetch : %s\n", sys_uptime(),
nsurl_access(c->url));
-#endif
-
return true;
}
@@ -256,9 +250,6 @@ static void fetch_file_process_error(struct
fetch_file_context *ctx, int code)
if (fetch_file_send_callback(&msg, ctx))
goto fetch_file_process_error_aborted;
-#ifdef _TARGET_IS_KOLIBRIOS
- debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(),
nsurl_access(ctx->url));
-#endif
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
@@ -341,9 +332,6 @@ static void fetch_file_process_plain(struct
fetch_file_context *ctx,
fetch_file_send_callback(&msg, ctx);
if (ctx->aborted == false) {
-#ifdef _TARGET_IS_KOLIBRIOS
- debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(),
nsurl_access(ctx->url));
-#endif
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
}
@@ -447,9 +435,6 @@ fetch_file_process_aborted:
}
if (ctx->aborted == false) {
-#ifdef _TARGET_IS_KOLIBRIOS
- debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(),
nsurl_access(ctx->url));
-#endif
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
}
@@ -756,10 +741,6 @@ static void fetch_file_process_dir(struct
fetch_file_context *ctx,
if (fetch_file_send_callback(&msg, ctx))
goto fetch_file_process_dir_aborted;
-#ifdef _TARGET_IS_KOLIBRIOS
- debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(),
nsurl_access(ctx->url));
-#endif
-
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
diff --git a/frontends/kolibrios/Makefile b/frontends/kolibrios/Makefile
index 5c1191a..9148cb6 100644
--- a/frontends/kolibrios/Makefile
+++ b/frontends/kolibrios/Makefile
@@ -112,7 +112,7 @@ $(eval $(foreach V,$(filter
KOLIBRI_IMAGE_%,$(.VARIABLES)),$(call convert_image,
# $(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
#S_KOLIBRIOS := main.c kolibri_misc.c kolibri_debug.c kolibri_filesystem.c
kolibri_regex.c
-S_KOLIBRIOS := kolibri_http.c kolibri_os.c
+S_KOLIBRIOS := kolibri_http.c
S_FRAMEBUFFER := gui.c framebuffer.c schedule.c bitmap.c fetch.c findfile.c
local_history.c corewindow.c clipboard.c font_freetype.c
S_FRAMEBUFFER_FBTK := fbtk.c event.c fill.c bitmap.c user.c window.c text.c
scroll.c osk.c
diff --git a/frontends/kolibrios/convert_image.c
b/frontends/kolibrios/convert_image.c
deleted file mode 100644
index 637898d..0000000
--- a/frontends/kolibrios/convert_image.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright 2009 Daniel Silverstone <[email protected]>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <stdbool.h>
-#include <errno.h>
-#include <stdio.h>
-#include <png.h>
-#include <stdlib.h>
-
-#if PNG_LIBPNG_VER < 10209
-#define png_set_expand_gray_1_2_4_to_8(png) png_set_gray_1_2_4_to_8(png)
-#endif
-
-static png_structp png;
-static png_infop info;
-static int interlace;
-static size_t rowbytes;
-static int raw_width, raw_height;
-static int rowstride;
-static unsigned char *bitmap_data;
-static bool is_cursor = true;
-static int raw_hot_x, raw_hot_y;
-
-#define WIDTH (is_cursor?raw_width-1:raw_width)
-#define HEIGHT (is_cursor?raw_height-1:raw_height)
-
-#define HOT_X (is_cursor?raw_hot_x-1:0)
-#define HOT_Y (is_cursor?raw_hot_y-1:0)
-
-#define REAL(v) (is_cursor?v+1:v)
-
-#define PPIX_AT(x,y) ((bitmap_data + (rowstride * y)) + (x * 4))
-
-#define R_OFF 2
-#define G_OFF 1
-#define B_OFF 0
-#define A_OFF 3
-
-#define R_AT(x,y) *(PPIX_AT(x,y) + R_OFF)
-#define G_AT(x,y) *(PPIX_AT(x,y) + G_OFF)
-#define B_AT(x,y) *(PPIX_AT(x,y) + B_OFF)
-#define A_AT(x,y) *(PPIX_AT(x,y) + A_OFF)
-
-static void info_callback(png_structp png, png_infop info);
-static void row_callback(png_structp png, png_bytep new_row,
- png_uint_32 row_num, int pass);
-static void end_callback(png_structp png, png_infop info);
-
-
-
-static void
-usage(void)
-{
- fprintf(stderr, "usage: fb_convert_image input.png output.inc
varname\n");
-}
-
-static void info_callback(png_structp png, png_infop info);
-static void row_callback(png_structp png, png_bytep new_row,
- png_uint_32 row_num, int pass);
-static void end_callback(png_structp png, png_infop info);
-
-
-static void
-detect_hotspot(void)
-{
- int i;
- int greenpixels = 0;
-
- for (i = 0; i < raw_width; ++i) {
- if (A_AT(i, 0) == 255) {
- if (G_AT(i, 0) == 255) {
- greenpixels++;
- raw_hot_x = i;
- }
- if ((B_AT(i, 0) != 0) || (R_AT(i, 0) != 0)) {
- is_cursor = false;
- return;
- }
- } else if (A_AT(i, 0) != 0) {
- is_cursor = false;
- return;
- }
- }
- if (greenpixels != 1) {
- is_cursor = false;
- return;
- }
-
- for (i = 0; i < raw_height; ++i) {
- if (A_AT(0, i) == 255) {
- if (G_AT(0, i) == 255) {
- greenpixels++;
- raw_hot_y = i;
- }
- if ((B_AT(0, i) != 0) || (R_AT(0, i) != 0)) {
- is_cursor = false;
- return;
- }
- } else if (A_AT(0, i) != 0) {
- is_cursor = false;
- return;
- }
- }
- if (greenpixels != 2) {
- is_cursor = false;
- return;
- }
- printf(" Pointer detected. Adjusted hotspot at %d, %d
(0-based)\n",
- raw_hot_x - 1, raw_hot_y - 1);
-}
-
-int
-main(int argc, char **argv)
-{
- FILE *f;
- unsigned char buffer[1024];
- int br;
- int x, y, c;
-
- if (argc != 4) {
- usage();
- return 1;
- }
-
- printf(" CONVERT: %s (%s)\n", argv[1], argv[3]);
-
- png = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
- info = png_create_info_struct(png);
-
- png_set_progressive_read_fn(png, NULL, info_callback, row_callback,
end_callback);
-
- f = fopen(argv[1], "rb");
- if (f == NULL) {
- printf(" Unable to open %s\n", argv[1]);
- return 1;
- }
-
- do {
- br = fread(buffer, 1, 1024, f);
- if (br > 0) {
- png_process_data(png, info, buffer, br);
- }
- } while (br > 0);
-
- if (br < 0) {
- printf("Error reading input: %s\n", strerror(errno));
- fclose(f);
- return 1;
- }
-
- fclose(f);
-
- detect_hotspot();
-
- f = fopen(argv[2], "w");
- if (f == NULL) {
- printf(" Unable to open %s\n", argv[2]);
- return 2;
- }
-
- fprintf(f, "/* This file is auto-generated from %s\n", argv[1]);
- fprintf(f, " *\n * Do not edit this file directly.\n */\n\n");
- fprintf(f, "#include <sys/types.h>\n\n");
- fprintf(f, "#include <stdint.h>\n\n");
- 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 \"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) {
- unsigned char *rowptr = bitmap_data + (rowstride * y);
- if (is_cursor) {
- /* If it's a cursor, skip one row and one column */
- rowptr += rowstride + 4;
- }
- fprintf(f, "\t");
- for (x = 0; x < WIDTH; ++x) {
- for (c = 0; c < 4; ++c) {
- unsigned char b = *rowptr++;
- fprintf(f, "0x%02x, ", b);
- }
- }
- fprintf(f, "\n");
- }
- fprintf(f, "};\n\n");
-
- fprintf(f, "struct fbtk_bitmap %s = {\n", argv[3]);
- fprintf(f, "\t.width\t\t= %d,\n", WIDTH);
- fprintf(f, "\t.height\t\t= %d,\n", HEIGHT);
- fprintf(f, "\t.hot_x\t\t= %d,\n", HOT_X);
- fprintf(f, "\t.hot_y\t\t= %d,\n", HOT_Y);
- fprintf(f, "\t.pixdata\t= %s_pixdata,\n", argv[3]);
-
- fprintf(f, "};\n\n");
- fclose(f);
-
- return 0;
-}
-
-static void
-info_callback(png_structp png, png_infop info)
-{
- int bit_depth, color_type, interlace, intent;
- double gamma;
- unsigned long width, height;
-
- /* Read the PNG details */
- png_get_IHDR(png, info, &width, &height, &bit_depth,
- &color_type, &interlace, 0, 0);
-
- /* Set up our transformations */
- if (color_type == PNG_COLOR_TYPE_PALETTE)
- png_set_palette_to_rgb(png);
- if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
- png_set_expand_gray_1_2_4_to_8(png);
- if (png_get_valid(png, info, PNG_INFO_tRNS))
- png_set_tRNS_to_alpha(png);
- if (bit_depth == 16)
- png_set_strip_16(png);
- if (color_type == PNG_COLOR_TYPE_GRAY ||
- color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_gray_to_rgb(png);
- if (!(color_type & PNG_COLOR_MASK_ALPHA))
- png_set_filler(png, 0xff, PNG_FILLER_AFTER);
- /* gamma correction - we use 2.2 as our screen gamma
- * this appears to be correct (at least in respect to !Browse)
- * see http://www.w3.org/Graphics/PNG/all_seven.html for a test case
- */
- if (png_get_sRGB(png, info, &intent))
- png_set_gamma(png, 2.2, 0.45455);
- else {
- if (png_get_gAMA(png, info, &gamma))
- png_set_gamma(png, 2.2, gamma);
- else
- png_set_gamma(png, 2.2, 0.45455);
- }
-
-
- png_read_update_info(png, info);
-
- rowbytes = png_get_rowbytes(png, info);
- interlace = (interlace == PNG_INTERLACE_ADAM7);
- raw_width = width;
- raw_height = height;
-
- rowstride = raw_width * 4;
- bitmap_data = malloc(rowstride * raw_height);
-}
-
-static unsigned int interlace_start[8] = {0, 16, 0, 8, 0, 4, 0};
-static unsigned int interlace_step[8] = {28, 28, 12, 12, 4, 4, 0};
-static unsigned int interlace_row_start[8] = {0, 0, 4, 0, 2, 0, 1};
-static unsigned int interlace_row_step[8] = {8, 8, 8, 4, 4, 2, 2};
-
-static void
-row_callback(png_structp png, png_bytep new_row,
- png_uint_32 row_num, int pass)
-{
- unsigned long i, j;
- unsigned int start, step;
- unsigned char *row = bitmap_data + (rowstride * row_num);
-
- if (new_row == 0)
- return;
-
- if (interlace) {
- start = interlace_start[pass];
- step = interlace_step[pass];
- row_num = interlace_row_start[pass] +
- interlace_row_step[pass] * row_num;
-
- /* Copy the data to our current row taking interlacing
- * into consideration */
- row = bitmap_data + (rowstride * row_num);
- for (j = 0, i = start; i < rowbytes; i += step) {
- row[i++] = new_row[j++];
- row[i++] = new_row[j++];
- row[i++] = new_row[j++];
- row[i++] = new_row[j++];
- }
- } else {
- memcpy(row, new_row, rowbytes);
- }
-}
-
-static void
-end_callback(png_structp png, png_infop info)
-{
-}
-
-
-
-/*
- * Local Variables:
- * c-basic-offset:8
- * End:
- */
-
diff --git a/frontends/kolibrios/kolibri_colors.h
b/frontends/kolibrios/kolibri_colors.h
deleted file mode 100644
index 7a16a40..0000000
--- a/frontends/kolibrios/kolibri_colors.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef KOLIBRI_COLORS_H
-#define KOLIBRI_COLORS_H
-struct kolibri_system_colors {
- unsigned int color_frame_area;
- unsigned int color_grab_bar;
- unsigned int color_grab_bar_button;
- unsigned int color_grab_button_text;
- unsigned int color_grab_text;
- unsigned int color_work_area;
- unsigned int color_work_button;
- unsigned int color_work_button_text;
- unsigned int color_work_text;
- unsigned int color_work_graph;
-};
-
-struct kolibri_system_colors kolibri_color_table;
-
-void kolibri_get_system_colors(struct kolibri_system_colors *color_table)
-{
- __asm__ volatile ("int $0x40"
- :
- :"a"(48),"b"(3),"c"(color_table),"d"(40)
- );
-
- /* color_table should point to the system color table */
-}
-
-#endif /* KOLIBRI_COLORS_H */
diff --git a/frontends/kolibrios/kolibri_debug.o
b/frontends/kolibrios/kolibri_debug.o
deleted file mode 100644
index 567b97c..0000000
Binary files a/frontends/kolibrios/kolibri_debug.o and /dev/null differ
diff --git a/frontends/kolibrios/kolibri_os.c b/frontends/kolibrios/kolibri_os.c
deleted file mode 100644
index 5297226..0000000
--- a/frontends/kolibrios/kolibri_os.c
+++ /dev/null
@@ -1,11 +0,0 @@
-unsigned int sys_uptime(void)
-{
- unsigned int uptime;
-
- __asm__ __volatile__(
- "int $0x40 \n\t"
- :"=a"(uptime)
- :"a"(26),"b"(9));
-
- return uptime / 100;
-}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=6788550896fb343887b908beabcf66d9050f47d8
commit 6788550896fb343887b908beabcf66d9050f47d8
Author: Ashish Gupta <[email protected]>
Commit: Ashish Gupta <[email protected]>
Remove bloat x2
diff --git a/frontends/kolibrios/bitmap_table.h
b/frontends/kolibrios/bitmap_table.h
deleted file mode 100644
index e11274c..0000000
--- a/frontends/kolibrios/bitmap_table.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* ------------------------------ */
-/* Part about GUI BITMAP TABLE. Will contain all functions required as well. */
-/* ------------------------------ */
-
-void *kolibri_create_bitmap(int width, int height, unsigned int state)
-{
-
-}
-
-
-void kolibri_destroy_bitmap(void *bitmap)
-{
-
-}
-
-
-void kolibri_set_bitmap_opaque(void *bitmap, bool opaque)
-{
-
-}
-
-
-void kolibri_get_bitmap_opaque(void *bitmap)
-{
-
-}
-
-
-bool kolibri_test_bitmap_opaque(void *bitmap)
-{
-
-}
-
-
-unsigned char *kolibri_get_imgbuffer_from_bitmap(void *bitmap)
-{
-
-}
-
-
-size_t kolibri_get_numbytes_row_image(void *bitmap)
-{
-
-}
-
-
-int kolibri_get_width_bitmap(void *bitmap)
-{
-
-}
-
-
-int kolibri_get_height_bitmap(void *bitmap)
-{
-
-}
-
-
-size_t kolibri_get_bpp(void *bitmap)
-{
-
-}
-
-
-bool kolibri_save_to_disk_bitmap(void *bitmap, const char *path, unsigned
flags)
-{
-
-}
-
-
-void kolibri_mark_modified(void *bitmap)
-{
-
-}
-
-
-nserror kolibri_render_content_bitmap(struct bitmap *bitmap, struct
hlcache_handle *content)
-{
-
-}
-
-struct gui_bitmap_table kolibri_bitmap_table = {
- .create = kolibri_create_bitmap,
- .destroy = kolibri_destroy_bitmap,
- .set_opaque = kolibri_set_bitmap_opaque,
- .get_opaque = kolibri_get_bitmap_opaque,
- .test_opaque = kolibri_test_bitmap_opaque,
- .get_buffer = kolibri_get_imgbuffer_from_bitmap,
- .get_rowstride = kolibri_get_numbytes_row_image,
- .get_width = kolibri_get_width_bitmap,
- .get_height = kolibri_get_height_bitmap,
- .get_bpp = kolibri_get_bpp,
- .save = kolibri_save_to_disk_bitmap,
- .modified = kolibri_mark_modified,
- .render = kolibri_render_content_bitmap,
- };
diff --git a/frontends/kolibrios/clipboard_table.h
b/frontends/kolibrios/clipboard_table.h
deleted file mode 100644
index 93f3704..0000000
--- a/frontends/kolibrios/clipboard_table.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ------------------------------ */
-/* Part about GUI CLIPBOARD table. Will contain all functions required as
well. */
-/* ------------------------------ */
-
-void kolibri_get_clipboard_contents(char **buffer, size_t *length)
-{
-
-}
-
-
-void kolibri_set_clipboard_contents(const char *buffer, size_t length,
nsclipboard_styles styles[], int n_styles)
-{
-
-}
-
-static struct gui_clipboard_table kolibri_clipboard_table = {
- .get = kolibri_get_clipboard_contents,
- .set = kolibri_set_clipboard_contents,
- };
-
diff --git a/frontends/kolibrios/download_table.h
b/frontends/kolibrios/download_table.h
deleted file mode 100644
index 58fcb54..0000000
--- a/frontends/kolibrios/download_table.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* ------------------------------ */
-/* Part about GUI DOWNLOAD table. Will contain all functions required as well.
*/
-/* ------------------------------ */
-
-struct gui_download_window *kolibri_create_download_window(struct
download_context *ctx, struct gui_window *parent)
-{
-
-}
-
-
-nserror kolibri_download_data(struct gui_download_window *dw, const char
*data, unsigned int size)
-{
-
-}
-
-
-void kolibri_download_error(struct gui_download_window *dw, const char
*error_msg)
-{
-
-}
-
-
-void kolibri_download_done(struct gui_download_window *dw)
-{
-
-}
-
-
-static struct gui_download_table kolibri_download_table = {
- .create = kolibri_create_download_window,
- .data = kolibri_download_data,
- .error = kolibri_download_error,
- .done = kolibri_download_done
-};
diff --git a/frontends/kolibrios/kolibri_boxlib.h
b/frontends/kolibrios/kolibri_boxlib.h
deleted file mode 100644
index b820788..0000000
--- a/frontends/kolibrios/kolibri_boxlib.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef KOLIBRI_BOXLIB_H
-#define KOLIBRI_BOXLIB_H
-
-extern int init_boxlib_asm(void);
-
-int kolibri_boxlib_init(void)
-{
- int asm_init_status = init_boxlib_asm();
-
- /* just return asm_init_status? or return init_boxlib_asm() ?*/
-
- if(asm_init_status == 0)
- return 0;
- else
- return 1;
-}
-
-#endif /* KOLIBRI_BOXLIB_H */
diff --git a/frontends/kolibrios/kolibri_button.h
b/frontends/kolibrios/kolibri_button.h
deleted file mode 100644
index fa5a868..0000000
--- a/frontends/kolibrios/kolibri_button.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef KOLIBRI_BUTTON_H
-#define KOLIBRI_BUTTON_H
-
-struct kolibri_button {
- unsigned int x65536sizex;
- unsigned int y65536sizey;
- unsigned int color;
- unsigned int identifier;
- unsigned int XY;
-};
-
-struct kolibri_button *kolibri_new_button(unsigned int tlx, unsigned int tly,
unsigned int sizex, unsigned int sizey,
- unsigned int identifier, unsigned int
color)
-{
- struct kolibri_button* new_button = (struct kolibri_button
*)malloc(sizeof(struct kolibri_button));
- new_button -> x65536sizex = (tlx << 16) + sizex;
- new_button -> y65536sizey = (tly << 16) + sizey;
- new_button -> color = color;
- new_button -> identifier = identifier;
- new_button -> XY = 0;
-}
-
-void draw_button(struct kolibri_button *some_button)
-{
- define_button(some_button -> x65536sizex, some_button -> y65536sizey,
some_button -> identifier, some_button -> color);
-}
-
-unsigned int kolibri_button_get_identifier(void)
-{
- unsigned int identifier;
-
- __asm__ __volatile__(
- "int $0x40"
- :"=a"(identifier)
- :"a"(17)
- );
- /* If no button pressed, returns 1 */
- /* Otherwise, returns identifier of button */
-
- if(identifier != 1) /* Button was detected indeed */
- return identifier>>8;
- else
- return identifier; /* No button detected */
-}
-
-#endif /* KOLIBRI_BUTTON_H */
diff --git a/frontends/kolibrios/kolibri_checkbox.h
b/frontends/kolibrios/kolibri_checkbox.h
deleted file mode 100644
index cc02481..0000000
--- a/frontends/kolibrios/kolibri_checkbox.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef KOLIBRI_CHECKBOX_H
-#define KOLIBRI_CHECKBOX_H
-
-#include "kolibri_colors.h"
-
-enum CHECKBOX_FLAGS {
- CHECKBOX_IS_SET = 0x00000002
- /* Add more flags later */
-};
-
-struct check_box {
- unsigned int left_s;
- unsigned int top_s;
- unsigned int ch_text_margin;
- unsigned int color;
- unsigned int border_color;
- unsigned int text_color;
- char *text;
- unsigned int flags;
-
- /* Users can use members above this */
- unsigned int size_of_str;
-};
-
-struct check_box* kolibri_new_check_box(unsigned int tlx, unsigned int tly,
unsigned int sizex, unsigned int sizey, char *label_text)
-{
- struct check_box* new_checkbox = (struct check_box *)malloc(sizeof(struct
check_box));
- new_checkbox -> left_s = (tlx << 16) + sizex;
- new_checkbox -> top_s = (tly << 16) + sizey;
- new_checkbox -> ch_text_margin = 10;
- new_checkbox -> color = 0xFFFFFFFF;
- new_checkbox -> border_color = kolibri_color_table.color_work_graph;
- new_checkbox -> text_color = kolibri_color_table.color_work_text;
- new_checkbox -> text = label_text;
- new_checkbox -> flags = 0x00000008;
-
- return new_checkbox;
-}
-
-extern void (*check_box_draw2)(struct check_box *)
__attribute__((__stdcall__));
-extern void (*check_box_mouse2)(struct check_box
*)__attribute__((__stdcall__));
-
-#endif /* KOLIBRI_CHECKBOX_H */
diff --git a/frontends/kolibrios/kolibri_editbox.h
b/frontends/kolibrios/kolibri_editbox.h
deleted file mode 100644
index a281ad7..0000000
--- a/frontends/kolibrios/kolibri_editbox.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef KOLIBRI_EDITBOX_H
-#define KOLIBRI_EDITBOX_H
-
-#include "kolibri_colors.h"
-
-struct edit_box {
- unsigned int width;
- unsigned int left;
- unsigned int top;
- unsigned int color;
- unsigned int shift_color;
- unsigned int focus_border_color;
- unsigned int blur_border_color;
- unsigned int text_color;
- unsigned int max;
- char *text;
- unsigned int mouse_variable;
- unsigned int flags;
-
-/* The following struct members are not used by the users of API */
- unsigned int size;
- unsigned int pos;
- unsigned int offset;
- unsigned int cl_curs_x;
- unsigned int cl_curs_y;
- unsigned int shift;
- unsigned int shift_old;
-};
-
-/* Initializes an Editbox with sane settings, sufficient for most use.
- This will let you create a box and position it somewhere on the screen.
- The text_buffer is a pointer to a character array and needs to be as long
as
- AT LEAST MAX_CHARS + 1.If the text_buffer is smaller, it will crash if user
- types more characters than what will fit into the text buffer.
-
- Allocating buffer space automatically so that programmer can be carefree
now.
- This also automatically adjusts the size of edit box so that it can hold
enough characters.
-
- All you need is :
-
- tlx,tly = Coordinates of the beginning of the edit box.
- max_chars = Limit of number of characters user can enter into edit box.
-*/
-
-struct edit_box* kolibri_new_edit_box(unsigned int tlx, unsigned int tly,
unsigned int max_chars)
-{
- unsigned int PIXELS_PER_CHAR = 7;
- struct edit_box *new_textbox = (struct edit_box *)malloc(sizeof(struct
edit_box));
- char *text_buffer = (char *)calloc(max_chars + 1, sizeof(char));
-
- /* Update blur_border_color and shift_color from box_lib.mac macro */
- /* edit_boxes_set_sys_color */
-
- new_textbox -> width = max_chars * PIXELS_PER_CHAR;
- new_textbox -> left = tlx;
- new_textbox -> top = tly;
- new_textbox -> color = 0xFFFFFF; /* Always make white edit boxes */
- new_textbox -> shift_color = 0x6a9480;
- new_textbox -> focus_border_color = kolibri_color_table.color_work_graph;
- new_textbox -> blur_border_color = 0x6a9480;
- new_textbox -> text_color = kolibri_color_table.color_work_text; /* Always
black text when typing */
- new_textbox -> max = max_chars;
- new_textbox -> text = text_buffer;
- new_textbox -> mouse_variable = 1; /* let the mouse take control? */
- new_textbox -> flags = 0x00004002; /*ed_focus + ed_always_focus */
-
- /* If these lines are uncommented, the executable will crash for no reason
at start */
- /* Even though these lines are not ever read it ALWAYS causes a crash,
even crashes MTDBG. What gives? */
-
- new_textbox -> size = 0;
- new_textbox -> pos = 0;
- new_textbox -> offset = 0;
- new_textbox -> cl_curs_x = 0;
- new_textbox -> cl_curs_y = 0;
- new_textbox -> shift = 0;
- new_textbox -> shift_old = 0;
-
- return new_textbox;
-}
-
-extern void (*edit_box_draw)(struct edit_box *) __attribute__((__stdcall__));
-
-/* editbox_key is a wrapper written in assembly to handle key press events for
editboxes */
-/* because inline assembly in GCC is a PITA and interferes with the EAX (AH)
register */
-/* which edit_box_key requires */
-extern void editbox_key(struct edit_box *) __attribute__((__stdcall__));
-
-extern void (*edit_box_mouse)(struct edit_box *) __attribute__((__stdcall__));
-
-#endif /* KOLIBRI_EDITBOX_H */
diff --git a/frontends/kolibrios/kolibri_filebrowser.h
b/frontends/kolibrios/kolibri_filebrowser.h
deleted file mode 100644
index 8eecf5f..0000000
--- a/frontends/kolibrios/kolibri_filebrowser.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef KOLIBRI_FILEBROWSER_H
-#define KOLIBRI_FILEBROWSER_H
-
-#endif /* KOLIBRI_FILEBROWSER_H */
diff --git a/frontends/kolibrios/kolibri_gui.h
b/frontends/kolibrios/kolibri_gui.h
deleted file mode 100644
index f2acc8b..0000000
--- a/frontends/kolibrios/kolibri_gui.h
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef KOLIBRI_GUI_H
-#define KOLIBRI_GUI_H
-
-#include "stdlib.h" /* for malloc() */
-#include "kos32sys.h"
-#include "kolibri_debug.h" /* work with debug board */
-
-/* boxlib loader */
-#include "kolibri_boxlib.h"
-
-/* All supported GUI elements included */
-#include "kolibri_gui_elements.h"
-
-enum KOLIBRI_GUI_EVENTS {
- KOLIBRI_EVENT_REDRAW = 1, /* Window and window elements should be redrawn
*/
- KOLIBRI_EVENT_KEY = 2, /* A key on the keyboard was pressed */
- KOLIBRI_EVENT_BUTTON = 3, /* A button was clicked with the mouse */
- KOLIBRI_EVENT_MOUSE = 6 /* Mouse activity (movement, button press) was
detected */
-};
-
-void kolibri_handle_event_redraw(struct kolibri_window* some_window)
-{
- /* Draw windows with system color table. */
-
- BeginDraw();
-
- DrawWindow(some_window->topleftx, some_window->toplefty,
- some_window->sizex, some_window->sizey,
- some_window->window_title,
- kolibri_color_table.color_work_area, some_window->XY);
-
- /* Enumerate and draw all window elements here */
- if(some_window->elements) /* Draw all elements added to window */
- {
- struct kolibri_window_element* current_element = some_window ->
elements;
-
- do
- {
- /* The redraw_fn serves as draw_fn on initial draw */
- if(kolibri_gui_op_table[current_element -> type].redraw_fn)
- kolibri_gui_op_table[current_element ->
type].redraw_fn(current_element -> element);
-
- switch(current_element -> type)
- {
- case KOLIBRI_EDIT_BOX:
- case KOLIBRI_CHECK_BOX:
- __asm__ volatile("push $0x13371337"::); /* Random value pushed to
balance stack */
- /* otherwise
edit_box_draw leaves stack unbalanced */
- /* and GCC jumps like a
crazy motha' fucka' */
- break;
- }
-
- current_element = current_element -> next;
-
- } while(current_element != some_window->elements); /* Have we covered
all elements? */
- }
-}
-
-void kolibri_handle_event_key(struct kolibri_window* some_window)
-{
- /* Enumerate and trigger key handling functions of window elements here */
- if(some_window->elements)
- {
- struct kolibri_window_element *current_element = some_window ->
elements;
-
- do
- {
- /* Only execute if the function pointer isn't NULL */
- if(kolibri_gui_op_table[current_element -> type].key_fn)
- kolibri_gui_op_table[current_element ->
type].key_fn(current_element -> element);
-
- current_element = current_element -> next;
- } while(current_element != some_window->elements); /* Have we covered
all elements? */
- }
-}
-
-void kolibri_handle_event_mouse(struct kolibri_window* some_window)
-{
- /* Enumerate and trigger mouse handling functions of window elements here */
- if(some_window->elements)
- {
- struct kolibri_window_element *current_element = some_window ->
elements;
-
- do
- {
-
- if(kolibri_gui_op_table[current_element -> type].mouse_fn)
- kolibri_gui_op_table[current_element ->
type].mouse_fn(current_element -> element);
-
- current_element = current_element -> next;
- } while(current_element != some_window->elements); /* Have we covered
all elements? */
- }
-}
-
-void kolibri_exit(void)
-{
- __asm__ volatile ("int $0x40"::"a"(-1));
-}
-
-int kolibri_gui_init(void)
-{
- int boxlib_init_status = kolibri_boxlib_init();
-
- if(boxlib_init_status == 0)
- debug_board_write_str("ashmew2 is happy: Kolibri GUI Successfully
Initialized.\n");
- else
- {
- debug_board_write_str("ashmew2 is sad: Kolibri GUI Failed to
initialize.\n");
- kolibri_exit();
- }
-
- /* Initialize the global operation table which handles event functions of */
- /* each individual element type */
- kolibri_init_gui_op_table();
-
- /* Get the current color table for Kolibri and store in global table*/
- kolibri_get_system_colors(&kolibri_color_table);
-
- /* Set up system events for buttons, mouse and keyboard and redraw */
- /* Also set filters so that window receives mouse events only when active
- and mouse inside window */
- __asm__ volatile("int $0x40"::"a"(40), "b"(0xC0000027));
-
- return 0;
-}
-
-/* Note: The current implementation tries to automatically colors
- GUI elements with system theme */
-
-#endif /* KOLIBRI_GUI_H */
diff --git a/frontends/kolibrios/kolibri_gui_elements.h
b/frontends/kolibrios/kolibri_gui_elements.h
deleted file mode 100644
index d82b734..0000000
--- a/frontends/kolibrios/kolibri_gui_elements.h
+++ /dev/null
@@ -1,126 +0,0 @@
-#ifndef KOLIBRI_GUI_ELEMENTS_H
-#define KOLIBRI_GUI_ELEMENTS_H
-
-/* GUI Elements being used */
-#include "kolibri_editbox.h"
-#include "kolibri_checkbox.h"
-#include "kolibri_button.h"
-
-/* enum KOLIBRI_GUI_ELEMENT_TYPE contains all available GUI items from box_lib
*/
-/* More elements can be added from other libraries as required */
-enum KOLIBRI_GUI_ELEMENT_TYPE {
- KOLIBRI_EDIT_BOX,
- KOLIBRI_CHECK_BOX,
- KOLIBRI_RADIO_BUTTON,
- KOLIBRI_SCROLL_BAR,
- KOLIBRI_DYNAMIC_BUTTON,
- KOLIBRI_MENU_BAR,
- KOLIBRI_FILE_BROWSER,
- KOLIBRI_TREE_LIST,
- KOLIBRI_PATH_SHOW,
- KOLIBRI_TEXT_EDITOR,
- KOLIBRI_FRAME,
- KOLIBRI_PROGRESS_BAR,
-
- KOLIBRI_BUTTON,
-
- /* Add elements above this element in order to let KOLIBRI_NUM_GUI_ELEMENTS
*/
- /* stay at correct value */
-
- KOLIBRI_NUM_GUI_ELEMENTS
-};
-
-/* Linked list which connects together all the elements drawn inside a GUI
window */
-struct kolibri_window_element {
- enum KOLIBRI_GUI_ELEMENT_TYPE type;
- void *element;
- struct kolibri_window_element *next, *prev;
-};
-
-/* Generic structure for supporting functions on various elements of Kolibri's
GUI */
-struct kolibri_element_operations {
- void (*redraw_fn)(void *);
- void (*mouse_fn)(void *);
- void (*key_fn)(void *);
-};
-
-/* Structure for a GUI Window on Kolibri. It also contains all the elements
drawn in window */
-struct kolibri_window {
- unsigned int topleftx, toplefty;
- unsigned int sizex, sizey;
- char *window_title;
-
- /* Refer to sysfuncs, value to be stored in EDX (Function 0) */
- unsigned int XY;
-
- struct kolibri_window_element *elements;
-};
-
-/*---------------------End of Structure and enum definitions---------------*/
-/*---------------------Define various functions for initializing GUI-------*/
-
-/* Master table containing operations for various GUI elements in one place */
-struct kolibri_element_operations
kolibri_gui_op_table[KOLIBRI_NUM_GUI_ELEMENTS];
-
-void kolibri_init_gui_op_table(void)
-{
-/* Setting up functions for edit box GUI elements*/
-kolibri_gui_op_table[KOLIBRI_EDIT_BOX].redraw_fn = edit_box_draw;
-kolibri_gui_op_table[KOLIBRI_EDIT_BOX].mouse_fn = edit_box_mouse;
-kolibri_gui_op_table[KOLIBRI_EDIT_BOX].key_fn = editbox_key;
-
-/* Setting up functions for check box GUI elements*/
-kolibri_gui_op_table[KOLIBRI_CHECK_BOX].redraw_fn = check_box_draw2;
-kolibri_gui_op_table[KOLIBRI_CHECK_BOX].mouse_fn = check_box_mouse2;
-kolibri_gui_op_table[KOLIBRI_CHECK_BOX].key_fn = NULL;
-
-/* Setting up functions for Kolibri Buttons ( SysFunc 8 )*/
-kolibri_gui_op_table[KOLIBRI_BUTTON].redraw_fn = draw_button;
-kolibri_gui_op_table[KOLIBRI_BUTTON].mouse_fn = NULL;
-kolibri_gui_op_table[KOLIBRI_BUTTON].key_fn = NULL;
-}
-
-/* Create a new main GUI window for KolibriOS */
-/* tl stands for TOP LEFT. x and y are coordinates. */
-
-struct kolibri_window * kolibri_new_window(int tlx, int tly, int sizex, int
sizey, char *title)
-{
- struct kolibri_window *new_win = (struct kolibri_window
*)malloc(sizeof(struct kolibri_window));
-
- new_win->topleftx = tlx;
- new_win->toplefty = tly;
- new_win->sizex = sizex;
- new_win->sizey = sizey;
- new_win->window_title = title;
- new_win->XY = 0x00000013; /* All windows are skinned windows with caption
for now */
- new_win->elements = NULL;
-
- return new_win;
-}
-
-/* Add an element to an existing window */
-void kolibri_window_add_element(struct kolibri_window *some_window, enum
KOLIBRI_GUI_ELEMENT_TYPE element_type, void *some_gui_element)
-{
- struct kolibri_window_element *new_element = (struct kolibri_window_element
*)malloc(sizeof(struct kolibri_window_element));
-
- new_element -> type = element_type;
- new_element -> element = some_gui_element;
-
- if(!(some_window->elements)) /* No elements in window yet */
- {
- some_window->elements = new_element;
- some_window->elements -> prev = some_window->elements;
- some_window->elements -> next = some_window->elements;
- }
- else
- {
- struct kolibri_window_element *last_element = some_window -> elements ->
prev;
-
- last_element -> next = new_element;
- new_element -> next = some_window -> elements; /* start of linked list
*/
- some_window -> elements -> prev = new_element;
- new_element -> prev = last_element;
- }
-}
-
-#endif /* KOLIBRI_GUI_ELEMENTS_H */
diff --git a/frontends/kolibrios/kolibri_iconv.c
b/frontends/kolibrios/kolibri_iconv.c
deleted file mode 100644
index cf5f2d3..0000000
--- a/frontends/kolibrios/kolibri_iconv.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/*The libiconv.a file that we have in built-libs defines these functions as
libiconv_*()
-Maybe best is to call the libiconv() functions from here rather than hacking
NS sources.
-As this is a KolibriOS dependent issue.
-*/
-#include<iconv.h>
-int iconv_close (iconv_t __cd)
-{
-
-}
-
-
-
diff --git a/frontends/kolibrios/kolibri_misc.c
b/frontends/kolibrios/kolibri_misc.c
deleted file mode 100644
index 56d2559..0000000
--- a/frontends/kolibrios/kolibri_misc.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "desktop/font.h"
-#include <time.h>
-
-static bool kolibrios_font_position_in_string(const plot_font_style_t *
fstyle,const char *string,
- size_t length,int x, size_t
*char_offset, int *actual_x )
-{
-}
-
-static bool kolibrios_font_split( const plot_font_style_t * fstyle, const char
*string,
- size_t length,int x, size_t
*char_offset, int *actual_x )
-{
-
-}
-
-static bool kolibrios_font_width( const plot_font_style_t *fstyle, const char
* str,
- size_t length, int * width )
-{
-
-}
-
-char *strptime(const char *s, const char *format, struct tm *tm) {
-
-}
-
-int atexit(void (*function)(void)) {
-
-}
diff --git a/frontends/kolibrios/kolibri_misc.o
b/frontends/kolibrios/kolibri_misc.o
deleted file mode 100644
index 4a7feee..0000000
Binary files a/frontends/kolibrios/kolibri_misc.o and /dev/null differ
diff --git a/frontends/kolibrios/options.h b/frontends/kolibrios/options.h
deleted file mode 100644
index eee6f4b..0000000
--- a/frontends/kolibrios/options.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2012 Vincent Sanders <[email protected]>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _NETSURF_FRAMEBUFFER_OPTIONS_H_
-#define _NETSURF_FRAMEBUFFER_OPTIONS_H_
-
-/* currently nothing here */
-
-#endif
-
-/***** surface options *****/
-
-NSOPTION_INTEGER(fb_depth, 32)
-NSOPTION_INTEGER(fb_refresh, 70)
-NSOPTION_STRING(fb_device, NULL)
-NSOPTION_STRING(fb_input_devpath, NULL)
-NSOPTION_STRING(fb_input_glob, NULL)
-
-/***** toolkit options *****/
-
-/** toolkit furniture size */
-NSOPTION_INTEGER(fb_furniture_size, 18)
-/** toolbar furniture size */
-NSOPTION_INTEGER(fb_toolbar_size, 30)
-/** toolbar layout */
-NSOPTION_STRING(fb_toolbar_layout, NULL)
-/** enable on screen keyboard */
-NSOPTION_BOOL(fb_osk, false)
-
-/***** font options *****/
-
-/** render all fonts monochrome */
-NSOPTION_BOOL(fb_font_monochrome, false)
-/** size of font glyph cache in kilobytes. */
-NSOPTION_INTEGER(fb_font_cachesize, 2048)
-
-/* Font face paths. These are treated as absolute paths if they start
- * with a / otherwise the compile time resource path is searched.
- */
-NSOPTION_STRING(fb_face_sans_serif, NULL)
-NSOPTION_STRING(fb_face_sans_serif_bold, NULL)
-NSOPTION_STRING(fb_face_sans_serif_italic, NULL)
-NSOPTION_STRING(fb_face_sans_serif_italic_bold, NULL)
-NSOPTION_STRING(fb_face_serif, NULL)
-NSOPTION_STRING(fb_face_serif_bold, NULL)
-NSOPTION_STRING(fb_face_monospace, NULL)
-NSOPTION_STRING(fb_face_monospace_bold, NULL)
-NSOPTION_STRING(fb_face_cursive, NULL)
-NSOPTION_STRING(fb_face_fantasy, NULL)
-
-/*
- * Local Variables:
- * c-basic-offset:8
- * End:
- */
diff --git a/frontends/kolibrios/window_table.h
b/frontends/kolibrios/window_table.h
deleted file mode 100644
index 3719267..0000000
--- a/frontends/kolibrios/window_table.h
+++ /dev/null
@@ -1,126 +0,0 @@
-//Refer ~/dev-netsurf/workspace/netsurf/desktop/gui_window.h
-
-/* ------------------------------ */
-/* Part about GUI WINDOW table. Will contain all functions required as well. */
-/* Only implement required functions right now. Optional later. */
-/* ------------------------------ */
-
-struct gui_window {
- struct browser_window *root;
-
- char *title;
- char *url;
- void *kobject; /* Kolibri GUI Window for now */
-
- struct gui_window *next, *prev;
-};
-
-struct gui_window *master_window;
-
-struct gui_window* kolibri_create_window(struct browser_window *bw, struct
gui_window *existing, gui_window_create_flags flags)
-{
- struct gui_window *new_window = (struct gui_window *)malloc(sizeof(struct
gui_window));
-
- unsigned int gui_event = KOLIBRI_EVENT_REDRAW;
- struct kolibri_window *main_window = kolibri_new_window(20, 20, 400, 400,
"Netsurf: Official Port for KolibriOS.");
- struct edit_box *textbox = kolibri_new_edit_box(30, 30, 40);
- kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox);
-
- debug_board_write_str("Creating New GUI window for Netsurf \n");
-
- new_window->root = bw;
- new_window->url = NULL;
- new_window->title = NULL;
- new_window->kobject = main_window;
-
- /* do /\* Start of main activity loop *\/ */
- /* { */
- /* if(gui_event == KOLIBRI_EVENT_REDRAW) */
- /* { */
- /* kolibri_handle_event_redraw(main_window); */
- /* } */
- /* else if(gui_event == KOLIBRI_EVENT_KEY) */
- /* { */
- /* kolibri_handle_event_key(main_window); */
- /* } */
- /* else if(gui_event == KOLIBRI_EVENT_BUTTON) */
- /* { */
-
- /* } */
- /* else if(gui_event == KOLIBRI_EVENT_MOUSE) */
- /* { */
- /* kolibri_handle_event_mouse(main_window); */
- /* } */
- /* } while(gui_event = get_os_event()); /\* End of main activity loop *\/
*/
-
- /* TODO:Fix this according to flags maybe> */
-
- if(existing)
- new_window->prev = existing;
- else
- new_window->prev = NULL;
-
- new_window->next = NULL;
- debug_board_write_str("Returning new GUI window to NS\n");
-
- master_window = new_window;
- return new_window;
-}
-
-void kolibri_destroy_window(struct gui_window *gw)
-{
- free(gw);
-}
-
-void kolibri_redraw(struct gui_window *g)
-{
- // SF 12,1
-}
-
-void kolibri_partial_redraw(struct gui_window *g, const struct rect *rect)
-{
- // SF 12,1 for now
-}
-
-bool kolibri_get_scroll(struct gui_window *g, int *sx, int *sy)
-{
- // SF 37,7
-}
-
-void kolibri_set_scroll(struct gui_window *g, int sx, int sy)
-{
-
-}
-
-void kolibri_get_content_dimensions(struct gui_window *g, int *width, int
*height, bool scaled)
-{
- /* Return some part of the browser area resolution.
- If the browser is ALWAYS MAXIMIZED, return the Length x Height minus
toolbar , url bar, tab area
- */
-}
-
-
-void kolibri_update_extent(struct gui_window *g)
-{
- /* Not sure what to do, but some libimg magic here */
-}
-
-
-void kolibri_reformat_contents(struct gui_window *g)
-{
- /* Not sure what to do, but some libimg magic here */
-}
-
- /* Invoke libimg and reformat stuff in the contents area here */
-
-static struct gui_window_table kolibri_window_table = {
- .create = kolibri_create_window,
- .destroy = kolibri_destroy_window,
- .redraw = kolibri_redraw,
- .update = kolibri_partial_redraw,
- .get_scroll = kolibri_get_scroll,
- .set_scroll = kolibri_set_scroll,
- .get_dimensions = kolibri_get_content_dimensions,
- .update_extent = kolibri_update_extent,
- .reformat = kolibri_reformat_contents,
- };
-----------------------------------------------------------------------
Summary of changes:
content/fetchers/file.c | 19 --
frontends/kolibrios/Makefile | 2 +-
frontends/kolibrios/bitmap_table.h | 96 ---------
frontends/kolibrios/clipboard_table.h | 20 --
frontends/kolibrios/convert_image.c | 315 ----------------------------
frontends/kolibrios/download_table.h | 34 ---
frontends/kolibrios/kolibri_boxlib.h | 18 --
frontends/kolibrios/kolibri_button.h | 46 ----
frontends/kolibrios/kolibri_checkbox.h | 43 ----
frontends/kolibrios/kolibri_colors.h | 28 ---
frontends/kolibrios/kolibri_debug.o | Bin 717056 -> 0 bytes
frontends/kolibrios/kolibri_editbox.h | 90 --------
frontends/kolibrios/kolibri_filebrowser.h | 4 -
frontends/kolibrios/kolibri_gui.h | 130 ------------
frontends/kolibrios/kolibri_gui_elements.h | 126 -----------
frontends/kolibrios/kolibri_iconv.c | 12 --
frontends/kolibrios/kolibri_misc.c | 27 ---
frontends/kolibrios/kolibri_misc.o | Bin 505 -> 0 bytes
frontends/kolibrios/kolibri_os.c | 11 -
frontends/kolibrios/options.h | 70 -------
frontends/kolibrios/window_table.h | 126 -----------
21 files changed, 1 insertion(+), 1216 deletions(-)
delete mode 100644 frontends/kolibrios/bitmap_table.h
delete mode 100644 frontends/kolibrios/clipboard_table.h
delete mode 100644 frontends/kolibrios/convert_image.c
delete mode 100644 frontends/kolibrios/download_table.h
delete mode 100644 frontends/kolibrios/kolibri_boxlib.h
delete mode 100644 frontends/kolibrios/kolibri_button.h
delete mode 100644 frontends/kolibrios/kolibri_checkbox.h
delete mode 100644 frontends/kolibrios/kolibri_colors.h
delete mode 100644 frontends/kolibrios/kolibri_debug.o
delete mode 100644 frontends/kolibrios/kolibri_editbox.h
delete mode 100644 frontends/kolibrios/kolibri_filebrowser.h
delete mode 100644 frontends/kolibrios/kolibri_gui.h
delete mode 100644 frontends/kolibrios/kolibri_gui_elements.h
delete mode 100644 frontends/kolibrios/kolibri_iconv.c
delete mode 100644 frontends/kolibrios/kolibri_misc.c
delete mode 100644 frontends/kolibrios/kolibri_misc.o
delete mode 100644 frontends/kolibrios/kolibri_os.c
delete mode 100644 frontends/kolibrios/options.h
delete mode 100644 frontends/kolibrios/window_table.h
diff --git a/content/fetchers/file.c b/content/fetchers/file.c
index f200eee..067d9be 100644
--- a/content/fetchers/file.c
+++ b/content/fetchers/file.c
@@ -42,7 +42,6 @@
#ifdef HAVE_MMAP
#include <sys/mman.h>
#endif
-
#include <libwapcaplet/libwapcaplet.h>
#include "netsurf/inttypes.h"
@@ -192,11 +191,6 @@ static void fetch_file_free(void *ctx)
/** callback to start a file fetch */
static bool fetch_file_start(void *ctx)
{
-#ifdef _TARGET_IS_KOLIBRIOS
- struct fetch_file_context *c = ctx;
- debug_board_printf("[%u] Starting file fetch : %s\n", sys_uptime(),
nsurl_access(c->url));
-#endif
-
return true;
}
@@ -256,9 +250,6 @@ static void fetch_file_process_error(struct
fetch_file_context *ctx, int code)
if (fetch_file_send_callback(&msg, ctx))
goto fetch_file_process_error_aborted;
-#ifdef _TARGET_IS_KOLIBRIOS
- debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(),
nsurl_access(ctx->url));
-#endif
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
@@ -341,9 +332,6 @@ static void fetch_file_process_plain(struct
fetch_file_context *ctx,
fetch_file_send_callback(&msg, ctx);
if (ctx->aborted == false) {
-#ifdef _TARGET_IS_KOLIBRIOS
- debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(),
nsurl_access(ctx->url));
-#endif
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
}
@@ -447,9 +435,6 @@ fetch_file_process_aborted:
}
if (ctx->aborted == false) {
-#ifdef _TARGET_IS_KOLIBRIOS
- debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(),
nsurl_access(ctx->url));
-#endif
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
}
@@ -756,10 +741,6 @@ static void fetch_file_process_dir(struct
fetch_file_context *ctx,
if (fetch_file_send_callback(&msg, ctx))
goto fetch_file_process_dir_aborted;
-#ifdef _TARGET_IS_KOLIBRIOS
- debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(),
nsurl_access(ctx->url));
-#endif
-
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
diff --git a/frontends/kolibrios/Makefile b/frontends/kolibrios/Makefile
index 5c1191a..9148cb6 100644
--- a/frontends/kolibrios/Makefile
+++ b/frontends/kolibrios/Makefile
@@ -112,7 +112,7 @@ $(eval $(foreach V,$(filter
KOLIBRI_IMAGE_%,$(.VARIABLES)),$(call convert_image,
# $(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
#S_KOLIBRIOS := main.c kolibri_misc.c kolibri_debug.c kolibri_filesystem.c
kolibri_regex.c
-S_KOLIBRIOS := kolibri_http.c kolibri_os.c
+S_KOLIBRIOS := kolibri_http.c
S_FRAMEBUFFER := gui.c framebuffer.c schedule.c bitmap.c fetch.c findfile.c
local_history.c corewindow.c clipboard.c font_freetype.c
S_FRAMEBUFFER_FBTK := fbtk.c event.c fill.c bitmap.c user.c window.c text.c
scroll.c osk.c
diff --git a/frontends/kolibrios/bitmap_table.h
b/frontends/kolibrios/bitmap_table.h
deleted file mode 100644
index e11274c..0000000
--- a/frontends/kolibrios/bitmap_table.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* ------------------------------ */
-/* Part about GUI BITMAP TABLE. Will contain all functions required as well. */
-/* ------------------------------ */
-
-void *kolibri_create_bitmap(int width, int height, unsigned int state)
-{
-
-}
-
-
-void kolibri_destroy_bitmap(void *bitmap)
-{
-
-}
-
-
-void kolibri_set_bitmap_opaque(void *bitmap, bool opaque)
-{
-
-}
-
-
-void kolibri_get_bitmap_opaque(void *bitmap)
-{
-
-}
-
-
-bool kolibri_test_bitmap_opaque(void *bitmap)
-{
-
-}
-
-
-unsigned char *kolibri_get_imgbuffer_from_bitmap(void *bitmap)
-{
-
-}
-
-
-size_t kolibri_get_numbytes_row_image(void *bitmap)
-{
-
-}
-
-
-int kolibri_get_width_bitmap(void *bitmap)
-{
-
-}
-
-
-int kolibri_get_height_bitmap(void *bitmap)
-{
-
-}
-
-
-size_t kolibri_get_bpp(void *bitmap)
-{
-
-}
-
-
-bool kolibri_save_to_disk_bitmap(void *bitmap, const char *path, unsigned
flags)
-{
-
-}
-
-
-void kolibri_mark_modified(void *bitmap)
-{
-
-}
-
-
-nserror kolibri_render_content_bitmap(struct bitmap *bitmap, struct
hlcache_handle *content)
-{
-
-}
-
-struct gui_bitmap_table kolibri_bitmap_table = {
- .create = kolibri_create_bitmap,
- .destroy = kolibri_destroy_bitmap,
- .set_opaque = kolibri_set_bitmap_opaque,
- .get_opaque = kolibri_get_bitmap_opaque,
- .test_opaque = kolibri_test_bitmap_opaque,
- .get_buffer = kolibri_get_imgbuffer_from_bitmap,
- .get_rowstride = kolibri_get_numbytes_row_image,
- .get_width = kolibri_get_width_bitmap,
- .get_height = kolibri_get_height_bitmap,
- .get_bpp = kolibri_get_bpp,
- .save = kolibri_save_to_disk_bitmap,
- .modified = kolibri_mark_modified,
- .render = kolibri_render_content_bitmap,
- };
diff --git a/frontends/kolibrios/clipboard_table.h
b/frontends/kolibrios/clipboard_table.h
deleted file mode 100644
index 93f3704..0000000
--- a/frontends/kolibrios/clipboard_table.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ------------------------------ */
-/* Part about GUI CLIPBOARD table. Will contain all functions required as
well. */
-/* ------------------------------ */
-
-void kolibri_get_clipboard_contents(char **buffer, size_t *length)
-{
-
-}
-
-
-void kolibri_set_clipboard_contents(const char *buffer, size_t length,
nsclipboard_styles styles[], int n_styles)
-{
-
-}
-
-static struct gui_clipboard_table kolibri_clipboard_table = {
- .get = kolibri_get_clipboard_contents,
- .set = kolibri_set_clipboard_contents,
- };
-
diff --git a/frontends/kolibrios/convert_image.c
b/frontends/kolibrios/convert_image.c
deleted file mode 100644
index 637898d..0000000
--- a/frontends/kolibrios/convert_image.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright 2009 Daniel Silverstone <[email protected]>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <stdbool.h>
-#include <errno.h>
-#include <stdio.h>
-#include <png.h>
-#include <stdlib.h>
-
-#if PNG_LIBPNG_VER < 10209
-#define png_set_expand_gray_1_2_4_to_8(png) png_set_gray_1_2_4_to_8(png)
-#endif
-
-static png_structp png;
-static png_infop info;
-static int interlace;
-static size_t rowbytes;
-static int raw_width, raw_height;
-static int rowstride;
-static unsigned char *bitmap_data;
-static bool is_cursor = true;
-static int raw_hot_x, raw_hot_y;
-
-#define WIDTH (is_cursor?raw_width-1:raw_width)
-#define HEIGHT (is_cursor?raw_height-1:raw_height)
-
-#define HOT_X (is_cursor?raw_hot_x-1:0)
-#define HOT_Y (is_cursor?raw_hot_y-1:0)
-
-#define REAL(v) (is_cursor?v+1:v)
-
-#define PPIX_AT(x,y) ((bitmap_data + (rowstride * y)) + (x * 4))
-
-#define R_OFF 2
-#define G_OFF 1
-#define B_OFF 0
-#define A_OFF 3
-
-#define R_AT(x,y) *(PPIX_AT(x,y) + R_OFF)
-#define G_AT(x,y) *(PPIX_AT(x,y) + G_OFF)
-#define B_AT(x,y) *(PPIX_AT(x,y) + B_OFF)
-#define A_AT(x,y) *(PPIX_AT(x,y) + A_OFF)
-
-static void info_callback(png_structp png, png_infop info);
-static void row_callback(png_structp png, png_bytep new_row,
- png_uint_32 row_num, int pass);
-static void end_callback(png_structp png, png_infop info);
-
-
-
-static void
-usage(void)
-{
- fprintf(stderr, "usage: fb_convert_image input.png output.inc
varname\n");
-}
-
-static void info_callback(png_structp png, png_infop info);
-static void row_callback(png_structp png, png_bytep new_row,
- png_uint_32 row_num, int pass);
-static void end_callback(png_structp png, png_infop info);
-
-
-static void
-detect_hotspot(void)
-{
- int i;
- int greenpixels = 0;
-
- for (i = 0; i < raw_width; ++i) {
- if (A_AT(i, 0) == 255) {
- if (G_AT(i, 0) == 255) {
- greenpixels++;
- raw_hot_x = i;
- }
- if ((B_AT(i, 0) != 0) || (R_AT(i, 0) != 0)) {
- is_cursor = false;
- return;
- }
- } else if (A_AT(i, 0) != 0) {
- is_cursor = false;
- return;
- }
- }
- if (greenpixels != 1) {
- is_cursor = false;
- return;
- }
-
- for (i = 0; i < raw_height; ++i) {
- if (A_AT(0, i) == 255) {
- if (G_AT(0, i) == 255) {
- greenpixels++;
- raw_hot_y = i;
- }
- if ((B_AT(0, i) != 0) || (R_AT(0, i) != 0)) {
- is_cursor = false;
- return;
- }
- } else if (A_AT(0, i) != 0) {
- is_cursor = false;
- return;
- }
- }
- if (greenpixels != 2) {
- is_cursor = false;
- return;
- }
- printf(" Pointer detected. Adjusted hotspot at %d, %d
(0-based)\n",
- raw_hot_x - 1, raw_hot_y - 1);
-}
-
-int
-main(int argc, char **argv)
-{
- FILE *f;
- unsigned char buffer[1024];
- int br;
- int x, y, c;
-
- if (argc != 4) {
- usage();
- return 1;
- }
-
- printf(" CONVERT: %s (%s)\n", argv[1], argv[3]);
-
- png = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
- info = png_create_info_struct(png);
-
- png_set_progressive_read_fn(png, NULL, info_callback, row_callback,
end_callback);
-
- f = fopen(argv[1], "rb");
- if (f == NULL) {
- printf(" Unable to open %s\n", argv[1]);
- return 1;
- }
-
- do {
- br = fread(buffer, 1, 1024, f);
- if (br > 0) {
- png_process_data(png, info, buffer, br);
- }
- } while (br > 0);
-
- if (br < 0) {
- printf("Error reading input: %s\n", strerror(errno));
- fclose(f);
- return 1;
- }
-
- fclose(f);
-
- detect_hotspot();
-
- f = fopen(argv[2], "w");
- if (f == NULL) {
- printf(" Unable to open %s\n", argv[2]);
- return 2;
- }
-
- fprintf(f, "/* This file is auto-generated from %s\n", argv[1]);
- fprintf(f, " *\n * Do not edit this file directly.\n */\n\n");
- fprintf(f, "#include <sys/types.h>\n\n");
- fprintf(f, "#include <stdint.h>\n\n");
- 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 \"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) {
- unsigned char *rowptr = bitmap_data + (rowstride * y);
- if (is_cursor) {
- /* If it's a cursor, skip one row and one column */
- rowptr += rowstride + 4;
- }
- fprintf(f, "\t");
- for (x = 0; x < WIDTH; ++x) {
- for (c = 0; c < 4; ++c) {
- unsigned char b = *rowptr++;
- fprintf(f, "0x%02x, ", b);
- }
- }
- fprintf(f, "\n");
- }
- fprintf(f, "};\n\n");
-
- fprintf(f, "struct fbtk_bitmap %s = {\n", argv[3]);
- fprintf(f, "\t.width\t\t= %d,\n", WIDTH);
- fprintf(f, "\t.height\t\t= %d,\n", HEIGHT);
- fprintf(f, "\t.hot_x\t\t= %d,\n", HOT_X);
- fprintf(f, "\t.hot_y\t\t= %d,\n", HOT_Y);
- fprintf(f, "\t.pixdata\t= %s_pixdata,\n", argv[3]);
-
- fprintf(f, "};\n\n");
- fclose(f);
-
- return 0;
-}
-
-static void
-info_callback(png_structp png, png_infop info)
-{
- int bit_depth, color_type, interlace, intent;
- double gamma;
- unsigned long width, height;
-
- /* Read the PNG details */
- png_get_IHDR(png, info, &width, &height, &bit_depth,
- &color_type, &interlace, 0, 0);
-
- /* Set up our transformations */
- if (color_type == PNG_COLOR_TYPE_PALETTE)
- png_set_palette_to_rgb(png);
- if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
- png_set_expand_gray_1_2_4_to_8(png);
- if (png_get_valid(png, info, PNG_INFO_tRNS))
- png_set_tRNS_to_alpha(png);
- if (bit_depth == 16)
- png_set_strip_16(png);
- if (color_type == PNG_COLOR_TYPE_GRAY ||
- color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_gray_to_rgb(png);
- if (!(color_type & PNG_COLOR_MASK_ALPHA))
- png_set_filler(png, 0xff, PNG_FILLER_AFTER);
- /* gamma correction - we use 2.2 as our screen gamma
- * this appears to be correct (at least in respect to !Browse)
- * see http://www.w3.org/Graphics/PNG/all_seven.html for a test case
- */
- if (png_get_sRGB(png, info, &intent))
- png_set_gamma(png, 2.2, 0.45455);
- else {
- if (png_get_gAMA(png, info, &gamma))
- png_set_gamma(png, 2.2, gamma);
- else
- png_set_gamma(png, 2.2, 0.45455);
- }
-
-
- png_read_update_info(png, info);
-
- rowbytes = png_get_rowbytes(png, info);
- interlace = (interlace == PNG_INTERLACE_ADAM7);
- raw_width = width;
- raw_height = height;
-
- rowstride = raw_width * 4;
- bitmap_data = malloc(rowstride * raw_height);
-}
-
-static unsigned int interlace_start[8] = {0, 16, 0, 8, 0, 4, 0};
-static unsigned int interlace_step[8] = {28, 28, 12, 12, 4, 4, 0};
-static unsigned int interlace_row_start[8] = {0, 0, 4, 0, 2, 0, 1};
-static unsigned int interlace_row_step[8] = {8, 8, 8, 4, 4, 2, 2};
-
-static void
-row_callback(png_structp png, png_bytep new_row,
- png_uint_32 row_num, int pass)
-{
- unsigned long i, j;
- unsigned int start, step;
- unsigned char *row = bitmap_data + (rowstride * row_num);
-
- if (new_row == 0)
- return;
-
- if (interlace) {
- start = interlace_start[pass];
- step = interlace_step[pass];
- row_num = interlace_row_start[pass] +
- interlace_row_step[pass] * row_num;
-
- /* Copy the data to our current row taking interlacing
- * into consideration */
- row = bitmap_data + (rowstride * row_num);
- for (j = 0, i = start; i < rowbytes; i += step) {
- row[i++] = new_row[j++];
- row[i++] = new_row[j++];
- row[i++] = new_row[j++];
- row[i++] = new_row[j++];
- }
- } else {
- memcpy(row, new_row, rowbytes);
- }
-}
-
-static void
-end_callback(png_structp png, png_infop info)
-{
-}
-
-
-
-/*
- * Local Variables:
- * c-basic-offset:8
- * End:
- */
-
diff --git a/frontends/kolibrios/download_table.h
b/frontends/kolibrios/download_table.h
deleted file mode 100644
index 58fcb54..0000000
--- a/frontends/kolibrios/download_table.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* ------------------------------ */
-/* Part about GUI DOWNLOAD table. Will contain all functions required as well.
*/
-/* ------------------------------ */
-
-struct gui_download_window *kolibri_create_download_window(struct
download_context *ctx, struct gui_window *parent)
-{
-
-}
-
-
-nserror kolibri_download_data(struct gui_download_window *dw, const char
*data, unsigned int size)
-{
-
-}
-
-
-void kolibri_download_error(struct gui_download_window *dw, const char
*error_msg)
-{
-
-}
-
-
-void kolibri_download_done(struct gui_download_window *dw)
-{
-
-}
-
-
-static struct gui_download_table kolibri_download_table = {
- .create = kolibri_create_download_window,
- .data = kolibri_download_data,
- .error = kolibri_download_error,
- .done = kolibri_download_done
-};
diff --git a/frontends/kolibrios/kolibri_boxlib.h
b/frontends/kolibrios/kolibri_boxlib.h
deleted file mode 100644
index b820788..0000000
--- a/frontends/kolibrios/kolibri_boxlib.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef KOLIBRI_BOXLIB_H
-#define KOLIBRI_BOXLIB_H
-
-extern int init_boxlib_asm(void);
-
-int kolibri_boxlib_init(void)
-{
- int asm_init_status = init_boxlib_asm();
-
- /* just return asm_init_status? or return init_boxlib_asm() ?*/
-
- if(asm_init_status == 0)
- return 0;
- else
- return 1;
-}
-
-#endif /* KOLIBRI_BOXLIB_H */
diff --git a/frontends/kolibrios/kolibri_button.h
b/frontends/kolibrios/kolibri_button.h
deleted file mode 100644
index fa5a868..0000000
--- a/frontends/kolibrios/kolibri_button.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef KOLIBRI_BUTTON_H
-#define KOLIBRI_BUTTON_H
-
-struct kolibri_button {
- unsigned int x65536sizex;
- unsigned int y65536sizey;
- unsigned int color;
- unsigned int identifier;
- unsigned int XY;
-};
-
-struct kolibri_button *kolibri_new_button(unsigned int tlx, unsigned int tly,
unsigned int sizex, unsigned int sizey,
- unsigned int identifier, unsigned int
color)
-{
- struct kolibri_button* new_button = (struct kolibri_button
*)malloc(sizeof(struct kolibri_button));
- new_button -> x65536sizex = (tlx << 16) + sizex;
- new_button -> y65536sizey = (tly << 16) + sizey;
- new_button -> color = color;
- new_button -> identifier = identifier;
- new_button -> XY = 0;
-}
-
-void draw_button(struct kolibri_button *some_button)
-{
- define_button(some_button -> x65536sizex, some_button -> y65536sizey,
some_button -> identifier, some_button -> color);
-}
-
-unsigned int kolibri_button_get_identifier(void)
-{
- unsigned int identifier;
-
- __asm__ __volatile__(
- "int $0x40"
- :"=a"(identifier)
- :"a"(17)
- );
- /* If no button pressed, returns 1 */
- /* Otherwise, returns identifier of button */
-
- if(identifier != 1) /* Button was detected indeed */
- return identifier>>8;
- else
- return identifier; /* No button detected */
-}
-
-#endif /* KOLIBRI_BUTTON_H */
diff --git a/frontends/kolibrios/kolibri_checkbox.h
b/frontends/kolibrios/kolibri_checkbox.h
deleted file mode 100644
index cc02481..0000000
--- a/frontends/kolibrios/kolibri_checkbox.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef KOLIBRI_CHECKBOX_H
-#define KOLIBRI_CHECKBOX_H
-
-#include "kolibri_colors.h"
-
-enum CHECKBOX_FLAGS {
- CHECKBOX_IS_SET = 0x00000002
- /* Add more flags later */
-};
-
-struct check_box {
- unsigned int left_s;
- unsigned int top_s;
- unsigned int ch_text_margin;
- unsigned int color;
- unsigned int border_color;
- unsigned int text_color;
- char *text;
- unsigned int flags;
-
- /* Users can use members above this */
- unsigned int size_of_str;
-};
-
-struct check_box* kolibri_new_check_box(unsigned int tlx, unsigned int tly,
unsigned int sizex, unsigned int sizey, char *label_text)
-{
- struct check_box* new_checkbox = (struct check_box *)malloc(sizeof(struct
check_box));
- new_checkbox -> left_s = (tlx << 16) + sizex;
- new_checkbox -> top_s = (tly << 16) + sizey;
- new_checkbox -> ch_text_margin = 10;
- new_checkbox -> color = 0xFFFFFFFF;
- new_checkbox -> border_color = kolibri_color_table.color_work_graph;
- new_checkbox -> text_color = kolibri_color_table.color_work_text;
- new_checkbox -> text = label_text;
- new_checkbox -> flags = 0x00000008;
-
- return new_checkbox;
-}
-
-extern void (*check_box_draw2)(struct check_box *)
__attribute__((__stdcall__));
-extern void (*check_box_mouse2)(struct check_box
*)__attribute__((__stdcall__));
-
-#endif /* KOLIBRI_CHECKBOX_H */
diff --git a/frontends/kolibrios/kolibri_colors.h
b/frontends/kolibrios/kolibri_colors.h
deleted file mode 100644
index 7a16a40..0000000
--- a/frontends/kolibrios/kolibri_colors.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef KOLIBRI_COLORS_H
-#define KOLIBRI_COLORS_H
-struct kolibri_system_colors {
- unsigned int color_frame_area;
- unsigned int color_grab_bar;
- unsigned int color_grab_bar_button;
- unsigned int color_grab_button_text;
- unsigned int color_grab_text;
- unsigned int color_work_area;
- unsigned int color_work_button;
- unsigned int color_work_button_text;
- unsigned int color_work_text;
- unsigned int color_work_graph;
-};
-
-struct kolibri_system_colors kolibri_color_table;
-
-void kolibri_get_system_colors(struct kolibri_system_colors *color_table)
-{
- __asm__ volatile ("int $0x40"
- :
- :"a"(48),"b"(3),"c"(color_table),"d"(40)
- );
-
- /* color_table should point to the system color table */
-}
-
-#endif /* KOLIBRI_COLORS_H */
diff --git a/frontends/kolibrios/kolibri_debug.o
b/frontends/kolibrios/kolibri_debug.o
deleted file mode 100644
index 567b97c..0000000
Binary files a/frontends/kolibrios/kolibri_debug.o and /dev/null differ
diff --git a/frontends/kolibrios/kolibri_editbox.h
b/frontends/kolibrios/kolibri_editbox.h
deleted file mode 100644
index a281ad7..0000000
--- a/frontends/kolibrios/kolibri_editbox.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef KOLIBRI_EDITBOX_H
-#define KOLIBRI_EDITBOX_H
-
-#include "kolibri_colors.h"
-
-struct edit_box {
- unsigned int width;
- unsigned int left;
- unsigned int top;
- unsigned int color;
- unsigned int shift_color;
- unsigned int focus_border_color;
- unsigned int blur_border_color;
- unsigned int text_color;
- unsigned int max;
- char *text;
- unsigned int mouse_variable;
- unsigned int flags;
-
-/* The following struct members are not used by the users of API */
- unsigned int size;
- unsigned int pos;
- unsigned int offset;
- unsigned int cl_curs_x;
- unsigned int cl_curs_y;
- unsigned int shift;
- unsigned int shift_old;
-};
-
-/* Initializes an Editbox with sane settings, sufficient for most use.
- This will let you create a box and position it somewhere on the screen.
- The text_buffer is a pointer to a character array and needs to be as long
as
- AT LEAST MAX_CHARS + 1.If the text_buffer is smaller, it will crash if user
- types more characters than what will fit into the text buffer.
-
- Allocating buffer space automatically so that programmer can be carefree
now.
- This also automatically adjusts the size of edit box so that it can hold
enough characters.
-
- All you need is :
-
- tlx,tly = Coordinates of the beginning of the edit box.
- max_chars = Limit of number of characters user can enter into edit box.
-*/
-
-struct edit_box* kolibri_new_edit_box(unsigned int tlx, unsigned int tly,
unsigned int max_chars)
-{
- unsigned int PIXELS_PER_CHAR = 7;
- struct edit_box *new_textbox = (struct edit_box *)malloc(sizeof(struct
edit_box));
- char *text_buffer = (char *)calloc(max_chars + 1, sizeof(char));
-
- /* Update blur_border_color and shift_color from box_lib.mac macro */
- /* edit_boxes_set_sys_color */
-
- new_textbox -> width = max_chars * PIXELS_PER_CHAR;
- new_textbox -> left = tlx;
- new_textbox -> top = tly;
- new_textbox -> color = 0xFFFFFF; /* Always make white edit boxes */
- new_textbox -> shift_color = 0x6a9480;
- new_textbox -> focus_border_color = kolibri_color_table.color_work_graph;
- new_textbox -> blur_border_color = 0x6a9480;
- new_textbox -> text_color = kolibri_color_table.color_work_text; /* Always
black text when typing */
- new_textbox -> max = max_chars;
- new_textbox -> text = text_buffer;
- new_textbox -> mouse_variable = 1; /* let the mouse take control? */
- new_textbox -> flags = 0x00004002; /*ed_focus + ed_always_focus */
-
- /* If these lines are uncommented, the executable will crash for no reason
at start */
- /* Even though these lines are not ever read it ALWAYS causes a crash,
even crashes MTDBG. What gives? */
-
- new_textbox -> size = 0;
- new_textbox -> pos = 0;
- new_textbox -> offset = 0;
- new_textbox -> cl_curs_x = 0;
- new_textbox -> cl_curs_y = 0;
- new_textbox -> shift = 0;
- new_textbox -> shift_old = 0;
-
- return new_textbox;
-}
-
-extern void (*edit_box_draw)(struct edit_box *) __attribute__((__stdcall__));
-
-/* editbox_key is a wrapper written in assembly to handle key press events for
editboxes */
-/* because inline assembly in GCC is a PITA and interferes with the EAX (AH)
register */
-/* which edit_box_key requires */
-extern void editbox_key(struct edit_box *) __attribute__((__stdcall__));
-
-extern void (*edit_box_mouse)(struct edit_box *) __attribute__((__stdcall__));
-
-#endif /* KOLIBRI_EDITBOX_H */
diff --git a/frontends/kolibrios/kolibri_filebrowser.h
b/frontends/kolibrios/kolibri_filebrowser.h
deleted file mode 100644
index 8eecf5f..0000000
--- a/frontends/kolibrios/kolibri_filebrowser.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef KOLIBRI_FILEBROWSER_H
-#define KOLIBRI_FILEBROWSER_H
-
-#endif /* KOLIBRI_FILEBROWSER_H */
diff --git a/frontends/kolibrios/kolibri_gui.h
b/frontends/kolibrios/kolibri_gui.h
deleted file mode 100644
index f2acc8b..0000000
--- a/frontends/kolibrios/kolibri_gui.h
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef KOLIBRI_GUI_H
-#define KOLIBRI_GUI_H
-
-#include "stdlib.h" /* for malloc() */
-#include "kos32sys.h"
-#include "kolibri_debug.h" /* work with debug board */
-
-/* boxlib loader */
-#include "kolibri_boxlib.h"
-
-/* All supported GUI elements included */
-#include "kolibri_gui_elements.h"
-
-enum KOLIBRI_GUI_EVENTS {
- KOLIBRI_EVENT_REDRAW = 1, /* Window and window elements should be redrawn
*/
- KOLIBRI_EVENT_KEY = 2, /* A key on the keyboard was pressed */
- KOLIBRI_EVENT_BUTTON = 3, /* A button was clicked with the mouse */
- KOLIBRI_EVENT_MOUSE = 6 /* Mouse activity (movement, button press) was
detected */
-};
-
-void kolibri_handle_event_redraw(struct kolibri_window* some_window)
-{
- /* Draw windows with system color table. */
-
- BeginDraw();
-
- DrawWindow(some_window->topleftx, some_window->toplefty,
- some_window->sizex, some_window->sizey,
- some_window->window_title,
- kolibri_color_table.color_work_area, some_window->XY);
-
- /* Enumerate and draw all window elements here */
- if(some_window->elements) /* Draw all elements added to window */
- {
- struct kolibri_window_element* current_element = some_window ->
elements;
-
- do
- {
- /* The redraw_fn serves as draw_fn on initial draw */
- if(kolibri_gui_op_table[current_element -> type].redraw_fn)
- kolibri_gui_op_table[current_element ->
type].redraw_fn(current_element -> element);
-
- switch(current_element -> type)
- {
- case KOLIBRI_EDIT_BOX:
- case KOLIBRI_CHECK_BOX:
- __asm__ volatile("push $0x13371337"::); /* Random value pushed to
balance stack */
- /* otherwise
edit_box_draw leaves stack unbalanced */
- /* and GCC jumps like a
crazy motha' fucka' */
- break;
- }
-
- current_element = current_element -> next;
-
- } while(current_element != some_window->elements); /* Have we covered
all elements? */
- }
-}
-
-void kolibri_handle_event_key(struct kolibri_window* some_window)
-{
- /* Enumerate and trigger key handling functions of window elements here */
- if(some_window->elements)
- {
- struct kolibri_window_element *current_element = some_window ->
elements;
-
- do
- {
- /* Only execute if the function pointer isn't NULL */
- if(kolibri_gui_op_table[current_element -> type].key_fn)
- kolibri_gui_op_table[current_element ->
type].key_fn(current_element -> element);
-
- current_element = current_element -> next;
- } while(current_element != some_window->elements); /* Have we covered
all elements? */
- }
-}
-
-void kolibri_handle_event_mouse(struct kolibri_window* some_window)
-{
- /* Enumerate and trigger mouse handling functions of window elements here */
- if(some_window->elements)
- {
- struct kolibri_window_element *current_element = some_window ->
elements;
-
- do
- {
-
- if(kolibri_gui_op_table[current_element -> type].mouse_fn)
- kolibri_gui_op_table[current_element ->
type].mouse_fn(current_element -> element);
-
- current_element = current_element -> next;
- } while(current_element != some_window->elements); /* Have we covered
all elements? */
- }
-}
-
-void kolibri_exit(void)
-{
- __asm__ volatile ("int $0x40"::"a"(-1));
-}
-
-int kolibri_gui_init(void)
-{
- int boxlib_init_status = kolibri_boxlib_init();
-
- if(boxlib_init_status == 0)
- debug_board_write_str("ashmew2 is happy: Kolibri GUI Successfully
Initialized.\n");
- else
- {
- debug_board_write_str("ashmew2 is sad: Kolibri GUI Failed to
initialize.\n");
- kolibri_exit();
- }
-
- /* Initialize the global operation table which handles event functions of */
- /* each individual element type */
- kolibri_init_gui_op_table();
-
- /* Get the current color table for Kolibri and store in global table*/
- kolibri_get_system_colors(&kolibri_color_table);
-
- /* Set up system events for buttons, mouse and keyboard and redraw */
- /* Also set filters so that window receives mouse events only when active
- and mouse inside window */
- __asm__ volatile("int $0x40"::"a"(40), "b"(0xC0000027));
-
- return 0;
-}
-
-/* Note: The current implementation tries to automatically colors
- GUI elements with system theme */
-
-#endif /* KOLIBRI_GUI_H */
diff --git a/frontends/kolibrios/kolibri_gui_elements.h
b/frontends/kolibrios/kolibri_gui_elements.h
deleted file mode 100644
index d82b734..0000000
--- a/frontends/kolibrios/kolibri_gui_elements.h
+++ /dev/null
@@ -1,126 +0,0 @@
-#ifndef KOLIBRI_GUI_ELEMENTS_H
-#define KOLIBRI_GUI_ELEMENTS_H
-
-/* GUI Elements being used */
-#include "kolibri_editbox.h"
-#include "kolibri_checkbox.h"
-#include "kolibri_button.h"
-
-/* enum KOLIBRI_GUI_ELEMENT_TYPE contains all available GUI items from box_lib
*/
-/* More elements can be added from other libraries as required */
-enum KOLIBRI_GUI_ELEMENT_TYPE {
- KOLIBRI_EDIT_BOX,
- KOLIBRI_CHECK_BOX,
- KOLIBRI_RADIO_BUTTON,
- KOLIBRI_SCROLL_BAR,
- KOLIBRI_DYNAMIC_BUTTON,
- KOLIBRI_MENU_BAR,
- KOLIBRI_FILE_BROWSER,
- KOLIBRI_TREE_LIST,
- KOLIBRI_PATH_SHOW,
- KOLIBRI_TEXT_EDITOR,
- KOLIBRI_FRAME,
- KOLIBRI_PROGRESS_BAR,
-
- KOLIBRI_BUTTON,
-
- /* Add elements above this element in order to let KOLIBRI_NUM_GUI_ELEMENTS
*/
- /* stay at correct value */
-
- KOLIBRI_NUM_GUI_ELEMENTS
-};
-
-/* Linked list which connects together all the elements drawn inside a GUI
window */
-struct kolibri_window_element {
- enum KOLIBRI_GUI_ELEMENT_TYPE type;
- void *element;
- struct kolibri_window_element *next, *prev;
-};
-
-/* Generic structure for supporting functions on various elements of Kolibri's
GUI */
-struct kolibri_element_operations {
- void (*redraw_fn)(void *);
- void (*mouse_fn)(void *);
- void (*key_fn)(void *);
-};
-
-/* Structure for a GUI Window on Kolibri. It also contains all the elements
drawn in window */
-struct kolibri_window {
- unsigned int topleftx, toplefty;
- unsigned int sizex, sizey;
- char *window_title;
-
- /* Refer to sysfuncs, value to be stored in EDX (Function 0) */
- unsigned int XY;
-
- struct kolibri_window_element *elements;
-};
-
-/*---------------------End of Structure and enum definitions---------------*/
-/*---------------------Define various functions for initializing GUI-------*/
-
-/* Master table containing operations for various GUI elements in one place */
-struct kolibri_element_operations
kolibri_gui_op_table[KOLIBRI_NUM_GUI_ELEMENTS];
-
-void kolibri_init_gui_op_table(void)
-{
-/* Setting up functions for edit box GUI elements*/
-kolibri_gui_op_table[KOLIBRI_EDIT_BOX].redraw_fn = edit_box_draw;
-kolibri_gui_op_table[KOLIBRI_EDIT_BOX].mouse_fn = edit_box_mouse;
-kolibri_gui_op_table[KOLIBRI_EDIT_BOX].key_fn = editbox_key;
-
-/* Setting up functions for check box GUI elements*/
-kolibri_gui_op_table[KOLIBRI_CHECK_BOX].redraw_fn = check_box_draw2;
-kolibri_gui_op_table[KOLIBRI_CHECK_BOX].mouse_fn = check_box_mouse2;
-kolibri_gui_op_table[KOLIBRI_CHECK_BOX].key_fn = NULL;
-
-/* Setting up functions for Kolibri Buttons ( SysFunc 8 )*/
-kolibri_gui_op_table[KOLIBRI_BUTTON].redraw_fn = draw_button;
-kolibri_gui_op_table[KOLIBRI_BUTTON].mouse_fn = NULL;
-kolibri_gui_op_table[KOLIBRI_BUTTON].key_fn = NULL;
-}
-
-/* Create a new main GUI window for KolibriOS */
-/* tl stands for TOP LEFT. x and y are coordinates. */
-
-struct kolibri_window * kolibri_new_window(int tlx, int tly, int sizex, int
sizey, char *title)
-{
- struct kolibri_window *new_win = (struct kolibri_window
*)malloc(sizeof(struct kolibri_window));
-
- new_win->topleftx = tlx;
- new_win->toplefty = tly;
- new_win->sizex = sizex;
- new_win->sizey = sizey;
- new_win->window_title = title;
- new_win->XY = 0x00000013; /* All windows are skinned windows with caption
for now */
- new_win->elements = NULL;
-
- return new_win;
-}
-
-/* Add an element to an existing window */
-void kolibri_window_add_element(struct kolibri_window *some_window, enum
KOLIBRI_GUI_ELEMENT_TYPE element_type, void *some_gui_element)
-{
- struct kolibri_window_element *new_element = (struct kolibri_window_element
*)malloc(sizeof(struct kolibri_window_element));
-
- new_element -> type = element_type;
- new_element -> element = some_gui_element;
-
- if(!(some_window->elements)) /* No elements in window yet */
- {
- some_window->elements = new_element;
- some_window->elements -> prev = some_window->elements;
- some_window->elements -> next = some_window->elements;
- }
- else
- {
- struct kolibri_window_element *last_element = some_window -> elements ->
prev;
-
- last_element -> next = new_element;
- new_element -> next = some_window -> elements; /* start of linked list
*/
- some_window -> elements -> prev = new_element;
- new_element -> prev = last_element;
- }
-}
-
-#endif /* KOLIBRI_GUI_ELEMENTS_H */
diff --git a/frontends/kolibrios/kolibri_iconv.c
b/frontends/kolibrios/kolibri_iconv.c
deleted file mode 100644
index cf5f2d3..0000000
--- a/frontends/kolibrios/kolibri_iconv.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/*The libiconv.a file that we have in built-libs defines these functions as
libiconv_*()
-Maybe best is to call the libiconv() functions from here rather than hacking
NS sources.
-As this is a KolibriOS dependent issue.
-*/
-#include<iconv.h>
-int iconv_close (iconv_t __cd)
-{
-
-}
-
-
-
diff --git a/frontends/kolibrios/kolibri_misc.c
b/frontends/kolibrios/kolibri_misc.c
deleted file mode 100644
index 56d2559..0000000
--- a/frontends/kolibrios/kolibri_misc.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "desktop/font.h"
-#include <time.h>
-
-static bool kolibrios_font_position_in_string(const plot_font_style_t *
fstyle,const char *string,
- size_t length,int x, size_t
*char_offset, int *actual_x )
-{
-}
-
-static bool kolibrios_font_split( const plot_font_style_t * fstyle, const char
*string,
- size_t length,int x, size_t
*char_offset, int *actual_x )
-{
-
-}
-
-static bool kolibrios_font_width( const plot_font_style_t *fstyle, const char
* str,
- size_t length, int * width )
-{
-
-}
-
-char *strptime(const char *s, const char *format, struct tm *tm) {
-
-}
-
-int atexit(void (*function)(void)) {
-
-}
diff --git a/frontends/kolibrios/kolibri_misc.o
b/frontends/kolibrios/kolibri_misc.o
deleted file mode 100644
index 4a7feee..0000000
Binary files a/frontends/kolibrios/kolibri_misc.o and /dev/null differ
diff --git a/frontends/kolibrios/kolibri_os.c b/frontends/kolibrios/kolibri_os.c
deleted file mode 100644
index 5297226..0000000
--- a/frontends/kolibrios/kolibri_os.c
+++ /dev/null
@@ -1,11 +0,0 @@
-unsigned int sys_uptime(void)
-{
- unsigned int uptime;
-
- __asm__ __volatile__(
- "int $0x40 \n\t"
- :"=a"(uptime)
- :"a"(26),"b"(9));
-
- return uptime / 100;
-}
diff --git a/frontends/kolibrios/options.h b/frontends/kolibrios/options.h
deleted file mode 100644
index eee6f4b..0000000
--- a/frontends/kolibrios/options.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2012 Vincent Sanders <[email protected]>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _NETSURF_FRAMEBUFFER_OPTIONS_H_
-#define _NETSURF_FRAMEBUFFER_OPTIONS_H_
-
-/* currently nothing here */
-
-#endif
-
-/***** surface options *****/
-
-NSOPTION_INTEGER(fb_depth, 32)
-NSOPTION_INTEGER(fb_refresh, 70)
-NSOPTION_STRING(fb_device, NULL)
-NSOPTION_STRING(fb_input_devpath, NULL)
-NSOPTION_STRING(fb_input_glob, NULL)
-
-/***** toolkit options *****/
-
-/** toolkit furniture size */
-NSOPTION_INTEGER(fb_furniture_size, 18)
-/** toolbar furniture size */
-NSOPTION_INTEGER(fb_toolbar_size, 30)
-/** toolbar layout */
-NSOPTION_STRING(fb_toolbar_layout, NULL)
-/** enable on screen keyboard */
-NSOPTION_BOOL(fb_osk, false)
-
-/***** font options *****/
-
-/** render all fonts monochrome */
-NSOPTION_BOOL(fb_font_monochrome, false)
-/** size of font glyph cache in kilobytes. */
-NSOPTION_INTEGER(fb_font_cachesize, 2048)
-
-/* Font face paths. These are treated as absolute paths if they start
- * with a / otherwise the compile time resource path is searched.
- */
-NSOPTION_STRING(fb_face_sans_serif, NULL)
-NSOPTION_STRING(fb_face_sans_serif_bold, NULL)
-NSOPTION_STRING(fb_face_sans_serif_italic, NULL)
-NSOPTION_STRING(fb_face_sans_serif_italic_bold, NULL)
-NSOPTION_STRING(fb_face_serif, NULL)
-NSOPTION_STRING(fb_face_serif_bold, NULL)
-NSOPTION_STRING(fb_face_monospace, NULL)
-NSOPTION_STRING(fb_face_monospace_bold, NULL)
-NSOPTION_STRING(fb_face_cursive, NULL)
-NSOPTION_STRING(fb_face_fantasy, NULL)
-
-/*
- * Local Variables:
- * c-basic-offset:8
- * End:
- */
diff --git a/frontends/kolibrios/window_table.h
b/frontends/kolibrios/window_table.h
deleted file mode 100644
index 3719267..0000000
--- a/frontends/kolibrios/window_table.h
+++ /dev/null
@@ -1,126 +0,0 @@
-//Refer ~/dev-netsurf/workspace/netsurf/desktop/gui_window.h
-
-/* ------------------------------ */
-/* Part about GUI WINDOW table. Will contain all functions required as well. */
-/* Only implement required functions right now. Optional later. */
-/* ------------------------------ */
-
-struct gui_window {
- struct browser_window *root;
-
- char *title;
- char *url;
- void *kobject; /* Kolibri GUI Window for now */
-
- struct gui_window *next, *prev;
-};
-
-struct gui_window *master_window;
-
-struct gui_window* kolibri_create_window(struct browser_window *bw, struct
gui_window *existing, gui_window_create_flags flags)
-{
- struct gui_window *new_window = (struct gui_window *)malloc(sizeof(struct
gui_window));
-
- unsigned int gui_event = KOLIBRI_EVENT_REDRAW;
- struct kolibri_window *main_window = kolibri_new_window(20, 20, 400, 400,
"Netsurf: Official Port for KolibriOS.");
- struct edit_box *textbox = kolibri_new_edit_box(30, 30, 40);
- kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox);
-
- debug_board_write_str("Creating New GUI window for Netsurf \n");
-
- new_window->root = bw;
- new_window->url = NULL;
- new_window->title = NULL;
- new_window->kobject = main_window;
-
- /* do /\* Start of main activity loop *\/ */
- /* { */
- /* if(gui_event == KOLIBRI_EVENT_REDRAW) */
- /* { */
- /* kolibri_handle_event_redraw(main_window); */
- /* } */
- /* else if(gui_event == KOLIBRI_EVENT_KEY) */
- /* { */
- /* kolibri_handle_event_key(main_window); */
- /* } */
- /* else if(gui_event == KOLIBRI_EVENT_BUTTON) */
- /* { */
-
- /* } */
- /* else if(gui_event == KOLIBRI_EVENT_MOUSE) */
- /* { */
- /* kolibri_handle_event_mouse(main_window); */
- /* } */
- /* } while(gui_event = get_os_event()); /\* End of main activity loop *\/
*/
-
- /* TODO:Fix this according to flags maybe> */
-
- if(existing)
- new_window->prev = existing;
- else
- new_window->prev = NULL;
-
- new_window->next = NULL;
- debug_board_write_str("Returning new GUI window to NS\n");
-
- master_window = new_window;
- return new_window;
-}
-
-void kolibri_destroy_window(struct gui_window *gw)
-{
- free(gw);
-}
-
-void kolibri_redraw(struct gui_window *g)
-{
- // SF 12,1
-}
-
-void kolibri_partial_redraw(struct gui_window *g, const struct rect *rect)
-{
- // SF 12,1 for now
-}
-
-bool kolibri_get_scroll(struct gui_window *g, int *sx, int *sy)
-{
- // SF 37,7
-}
-
-void kolibri_set_scroll(struct gui_window *g, int sx, int sy)
-{
-
-}
-
-void kolibri_get_content_dimensions(struct gui_window *g, int *width, int
*height, bool scaled)
-{
- /* Return some part of the browser area resolution.
- If the browser is ALWAYS MAXIMIZED, return the Length x Height minus
toolbar , url bar, tab area
- */
-}
-
-
-void kolibri_update_extent(struct gui_window *g)
-{
- /* Not sure what to do, but some libimg magic here */
-}
-
-
-void kolibri_reformat_contents(struct gui_window *g)
-{
- /* Not sure what to do, but some libimg magic here */
-}
-
- /* Invoke libimg and reformat stuff in the contents area here */
-
-static struct gui_window_table kolibri_window_table = {
- .create = kolibri_create_window,
- .destroy = kolibri_destroy_window,
- .redraw = kolibri_redraw,
- .update = kolibri_partial_redraw,
- .get_scroll = kolibri_get_scroll,
- .set_scroll = kolibri_set_scroll,
- .get_dimensions = kolibri_get_content_dimensions,
- .update_extent = kolibri_update_extent,
- .reformat = kolibri_reformat_contents,
- };
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org