diff options
Diffstat (limited to 'frontends/kolibrios/gui.c')
-rw-r--r-- | frontends/kolibrios/gui.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/frontends/kolibrios/gui.c b/frontends/kolibrios/gui.c index be5d2cc9b..7be596fcc 100644 --- a/frontends/kolibrios/gui.c +++ b/frontends/kolibrios/gui.c @@ -121,7 +121,7 @@ static void die(const char *error) */ static nserror fb_warn_user(const char *warning, const char *detail) { - LOG("%s %s", warning, detail); + NSLOG(netsurf, INFO, "%s %s", warning, detail); return NSERROR_OK; } @@ -154,7 +154,7 @@ widget_scroll_y(struct gui_window *gw, int y, bool abs) int content_width, content_height; int height; - LOG("window scroll"); + NSLOG(netsurf, INFO, "window scroll"); if (abs) { bwidget->pany = y - bwidget->scrolly; } else { @@ -238,7 +238,7 @@ fb_pan(fbtk_widget_t *widget, height = fbtk_get_height(widget); width = fbtk_get_width(widget); - LOG("panning %d, %d", bwidget->panx, bwidget->pany); + NSLOG(netsurf, INFO, "panning %d, %d", bwidget->panx, bwidget->pany); x = fbtk_get_absx(widget); y = fbtk_get_absy(widget); @@ -414,7 +414,8 @@ fb_browser_window_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi) bwidget = fbtk_get_userpw(widget); if (bwidget == NULL) { - LOG("browser widget from widget %p was null", widget); + NSLOG(netsurf, INFO, + "browser widget from widget %p was null", widget); return -1; } @@ -541,7 +542,7 @@ static nserror set_defaults(struct nsoption_s *defaults) if (nsoption_charp(cookie_file) == NULL || nsoption_charp(cookie_jar) == NULL) { - LOG("Failed initialising cookie options"); + NSLOG(netsurf, INFO, "Failed initialising cookie options"); return NSERROR_BAD_PARAMETER; } @@ -621,7 +622,7 @@ static void framebuffer_run(void) static void gui_quit(void) { - LOG("gui_quit"); + NSLOG(netsurf, INFO, "gui_quit"); urldb_save_cookies(nsoption_charp(cookie_jar)); @@ -648,7 +649,8 @@ fb_browser_window_click(fbtk_widget_t *widget, fbtk_callback_info *cbi) cbi->event->type != NSFB_EVENT_KEY_UP) return 0; - LOG("browser window clicked at %d,%d", cbi->x, cbi->y); + NSLOG(netsurf, INFO, "browser window clicked at %d,%d", cbi->x, + cbi->y); switch (cbi->event->type) { case NSFB_EVENT_KEY_DOWN: @@ -833,7 +835,7 @@ fb_browser_window_input(fbtk_widget_t *widget, fbtk_callback_info *cbi) static fbtk_modifier_type modifier = FBTK_MOD_CLEAR; int ucs4 = -1; - LOG("got value %d", cbi->event->value.keycode); + NSLOG(netsurf, INFO, "got value %d", cbi->event->value.keycode); switch (cbi->event->type) { case NSFB_EVENT_KEY_DOWN: @@ -1385,7 +1387,9 @@ create_toolbar(struct gui_window *gw, default: widget = NULL; xdir = 0; - LOG("Unknown element %c in toolbar layout", *itmtype); + NSLOG(netsurf, INFO, + "Unknown element %c in toolbar layout", + *itmtype); break; } @@ -1394,6 +1398,8 @@ create_toolbar(struct gui_window *gw, xpos += (xdir * (fbtk_get_width(widget) + padding)); } + NSLOG(netsurf, INFO, "xpos is %d", xpos); + itmtype += xdir; } @@ -1602,7 +1608,7 @@ create_normal_browser_window(struct gui_window *gw, int furniture_width) int statusbar_width = 0; int toolbar_height = nsoption_int(fb_toolbar_size); - LOG("Normal window"); + NSLOG(netsurf, INFO, "Normal window"); gw->window = fbtk_create_window(fbtk, 0, 0, 0, 0, 0); @@ -1633,7 +1639,8 @@ create_normal_browser_window(struct gui_window *gw, int furniture_width) false); fbtk_set_handler(gw->status, FBTK_CBT_POINTERENTER, set_ptr_default_move, NULL); - LOG("status bar %p at %d,%d", gw->status, fbtk_get_absx(gw->status), fbtk_get_absy(gw->status)); + NSLOG(netsurf, INFO, "status bar %p at %d,%d", gw->status, + fbtk_get_absx(gw->status), fbtk_get_absy(gw->status)); /* create horizontal scrollbar */ gw->hscroll = fbtk_create_hscroll(gw->window, @@ -1791,7 +1798,6 @@ gui_window_create(struct browser_window *bw, create_normal_browser_window(gw, nsoption_int(fb_furniture_size)); - /* map and request redraw of gui window */ fbtk_set_mapping(gw->window, true); @@ -1815,7 +1821,7 @@ gui_window_destroy(struct gui_window *gw) /** * Invalidates an area of a framebuffer browser window * - * \param gw The netsurf window being invalidated. + * \param g The netsurf window being invalidated. * \param rect area to redraw or NULL for the entire window area * \return NSERROR_OK on success or appropriate error code */ @@ -2113,7 +2119,8 @@ static struct gui_misc_table framebuffer_misc_table = { * /param argv The argument string vector. * /return The return code to the OS */ -int main(int argc, char** argv) +int +main(int argc, char** argv) { debug_board_printf("--- [NETSURF] Starting Netsurf for KolibriOS.\n"); @@ -2123,7 +2130,6 @@ int main(int argc, char** argv) nsurl *url; nserror ret; nsfb_t *nsfb; - struct netsurf_table framebuffer_table = { .misc = &framebuffer_misc_table, .window = &framebuffer_window_table, @@ -2229,8 +2235,7 @@ int main(int argc, char** argv) ret = nsurl_create(feurl, &url); if (ret == NSERROR_OK) { - - ret = browser_window_create(BW_CREATE_HISTORY, + ret = browser_window_create(BW_CREATE_HISTORY, url, NULL, NULL, |