Rev 4364 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4364 | Rev 5043 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | #include "desktop/history_core.h" |
62 | #include "desktop/history_core.h" |
63 | #include "content/fetch.h" |
63 | #include "content/fetch.h" |
Line 64... | Line 64... | ||
64 | 64 | ||
Line -... | Line 65... | ||
- | 65 | #define NSFB_TOOLBAR_DEFAULT_LAYOUT "blfsrut" |
|
- | 66 | ||
- | 67 | #ifdef DBG |
|
- | 68 | #undef DBG |
|
- | 69 | #endif |
|
- | 70 | #define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */ |
|
65 | #define NSFB_TOOLBAR_DEFAULT_LAYOUT "blfsrut" |
71 | //#define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */ |
Line 66... | Line 72... | ||
66 | 72 | ||
67 | fbtk_widget_t *fbtk; |
73 | fbtk_widget_t *fbtk; |
68 | 74 | ||
Line 544... | Line 550... | ||
544 | char p[256]; |
550 | char p[256]; |
545 | char **z; |
551 | char **z; |
546 | z=0x20; |
552 | z=0x20; |
547 | strcpy(p, *z); |
553 | strcpy(p, *z); |
Line 548... | Line 554... | ||
548 | 554 | ||
549 | __menuet__debug_out("PATH1...\n"); |
555 | DBG("PATH1...\n"); |
550 | __menuet__debug_out(p); |
556 | DBG(p); |
Line 551... | Line 557... | ||
551 | __menuet__debug_out("PATH1...\n"); |
557 | DBG("PATH1...\n"); |
Line 552... | Line 558... | ||
552 | 558 | ||
Line 553... | Line 559... | ||
553 | *(strrchr(p, '/')+1)='\0'; |
559 | *(strrchr(p, '/')+1)='\0'; |
554 | 560 | ||
555 | strcpy(strrchr(p, '/')+1, "res/"); |
561 | strcpy(strrchr(p, '/')+1, "res/"); |
Line 556... | Line 562... | ||
556 | 562 | ||
Line 557... | Line 563... | ||
557 | __menuet__debug_out("PATH1...\n"); |
563 | DBG("PATH1...\n"); |
Line 576... | Line 582... | ||
576 | //respaths = fb_init_resource("/kolibrios/:/hd0/1/res/:/bd0/1/res/:/tmp9/1/netsurf/res/:res/:fonts/:"); |
582 | //respaths = fb_init_resource("/kolibrios/:/hd0/1/res/:/bd0/1/res/:/tmp9/1/netsurf/res/:res/:fonts/:"); |
577 | respaths = fb_init_resource(p); |
583 | respaths = fb_init_resource(p); |
Line 578... | Line 584... | ||
578 | 584 | ||
579 | options = filepath_find(respaths, "Choices"); |
585 | options = filepath_find(respaths, "Choices"); |
580 | messages = filepath_find(respaths, "messages"); |
- | |
- | 586 | messages = filepath_find(respaths, "messages"); |
|
581 | 587 | LOG(("gui.c : printing kolibri DEBUG messages for BOARD")); |
|
582 | __menuet__debug_out("===path to msg\n"); |
588 | DBG("====================START\n"); |
583 | __menuet__debug_out(messages); |
589 | DBG(messages); |
Line 584... | Line 590... | ||
584 | __menuet__debug_out("\n===path to msg\n"); |
590 | DBG("====================END\n"); |
- | 591 | ||
585 | 592 | //netsurf_init(&argc, &argv, options, "res/messages"); |
|
586 | //netsurf_init(&argc, &argv, options, "res/messages"); |
593 | LOG(("Calling netsurf_init")); |
- | 594 | netsurf_init(&argc, &argv, options, messages); |
|
587 | netsurf_init(&argc, &argv, options, messages); |
595 | extern HTTP_INIT(); |
- | 596 | DBG("Calling HTTP_INIT() for KolibriOS http lib.."); |
|
588 | extern HTTP_INIT(); |
597 | HTTP_INIT(); |
Line 589... | Line 598... | ||
589 | HTTP_INIT(); |
598 | DBG(("NS HTTP_INIT okay")); |
590 | LOG(("NS init okay")); |
599 | LOG(("NS init okay")); |
Line 610... | Line 619... | ||
610 | netsurf_exit(); |
619 | netsurf_exit(); |
Line 611... | Line 620... | ||
611 | 620 | ||
612 | return 0; |
621 | return 0; |
Line 613... | Line -... | ||
613 | } |
- | |
614 | 622 | } |
|
615 | 623 | ||
616 | void |
624 | void |
617 | gui_poll(bool active) |
625 | gui_poll(bool active) |
618 | { |
- | |
619 | LOG(("GUI poll in")); |
626 | { |
620 | 627 | /* LOG(("GUI poll in")); */ |
|
Line 621... | Line 628... | ||
621 | nsfb_event_t event; |
628 | nsfb_event_t event; |
622 | int timeout; /* timeout in miliseconds */ |
629 | int timeout; /* timeout in miliseconds */ |
623 | 630 | ||
Line 624... | Line 631... | ||
624 | LOG(("schedule run")); |
631 | /* LOG(("schedule run")); */ |
625 | /* run the scheduler and discover how long to wait for the next event */ |
632 | /* run the scheduler and discover how long to wait for the next event */ |
626 | timeout = schedule_run(); |
633 | timeout = schedule_run(); |
Line 627... | Line 634... | ||
627 | 634 | ||
628 | /* if active do not wait for event, return immediately */ |
635 | /* if active do not wait for event, return immediately */ |
629 | if (active) |
636 | if (active) |
630 | timeout = 0; |
637 | timeout = 0; |
Line 631... | Line -... | ||
631 | - | ||
632 | LOG(("redraw pending")); |
638 | |
633 | /* if redraws are pending do not wait for event, return immediately */ |
639 | /* LOG(("redraw pending")); */ |
634 | if (fbtk_get_redraw_pending(fbtk)) |
640 | /* if redraws are pending do not wait for event, return immediately */ |
635 | timeout = 0; |
641 | if (fbtk_get_redraw_pending(fbtk)) |
636 | 642 | timeout = 0; |
|
Line 637... | Line 643... | ||
637 | LOG(("fbtk event")); |
643 | |
638 | if (fbtk_event(fbtk, &event, timeout)) { |
644 | if (fbtk_event(fbtk, &event, timeout)) { |
Line 639... | Line 645... | ||
639 | if ((event.type == NSFB_EVENT_CONTROL) && |
645 | if ((event.type == NSFB_EVENT_CONTROL) && |
640 | (event.value.controlcode == NSFB_CONTROL_QUIT)) |
646 | (event.value.controlcode == NSFB_CONTROL_QUIT)) |
Line 641... | Line 647... | ||
641 | netsurf_quit = true; |
647 | netsurf_quit = true; |
642 | } |
648 | } |
643 | 649 |