forked from KolibriOS/kolibrios
Added netsurf files
git-svn-id: svn://kolibrios.org@5043 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
009c3b7c15
commit
8240a01a43
@ -55,6 +55,12 @@
|
|||||||
/* Define this to turn on verbose fetch logging */
|
/* Define this to turn on verbose fetch logging */
|
||||||
#undef DEBUG_FETCH_VERBOSE
|
#undef DEBUG_FETCH_VERBOSE
|
||||||
|
|
||||||
|
#ifdef DBG
|
||||||
|
#undef DBG
|
||||||
|
#endif
|
||||||
|
//#define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */
|
||||||
|
#define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */
|
||||||
|
|
||||||
bool fetch_active; /**< Fetches in progress, please call fetch_poll(). */
|
bool fetch_active; /**< Fetches in progress, please call fetch_poll(). */
|
||||||
|
|
||||||
/** Information about a fetcher for a given scheme. */
|
/** Information about a fetcher for a given scheme. */
|
||||||
@ -514,7 +520,6 @@ void fetch_poll(void)
|
|||||||
{
|
{
|
||||||
scheme_fetcher *fetcher = fetchers;
|
scheme_fetcher *fetcher = fetchers;
|
||||||
scheme_fetcher *next_fetcher;
|
scheme_fetcher *next_fetcher;
|
||||||
|
|
||||||
fetch_dispatch_jobs();
|
fetch_dispatch_jobs();
|
||||||
|
|
||||||
if (!fetch_active)
|
if (!fetch_active)
|
||||||
@ -528,6 +533,7 @@ void fetch_poll(void)
|
|||||||
}
|
}
|
||||||
fetcher = next_fetcher;
|
fetcher = next_fetcher;
|
||||||
}
|
}
|
||||||
|
/* LOG(("Returning from fetch_poll\n")); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -669,10 +675,9 @@ void fetch_multipart_data_destroy(struct fetch_multipart_data *list)
|
|||||||
void
|
void
|
||||||
fetch_send_callback(const fetch_msg *msg, struct fetch *fetch)
|
fetch_send_callback(const fetch_msg *msg, struct fetch *fetch)
|
||||||
{
|
{
|
||||||
__menuet__debug_out("Inside fetch_send_callback\n");
|
/* LOG(("Inside fetch_send_callback.\n")); */
|
||||||
|
|
||||||
fetch->callback(msg, fetch->p);
|
fetch->callback(msg, fetch->p);
|
||||||
__menuet__debug_out("After fetch->callback \n");
|
/* LOG(("After fetch->callback \n")); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,6 @@
|
|||||||
void fetch_curl_register(void);
|
void fetch_curl_register(void);
|
||||||
|
|
||||||
/** Global cURL multi handle. */
|
/** Global cURL multi handle. */
|
||||||
extern CURLM *fetch_curl_multi;
|
/* extern CURLM *fetch_curl_multi; */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
#include <curl/curl.h> /* for URL unescaping functions */
|
#include <curl/curl.h> /* for URL unescaping functions */
|
||||||
|
|
||||||
|
#include "http.h"
|
||||||
|
|
||||||
#include <libwapcaplet/libwapcaplet.h>
|
#include <libwapcaplet/libwapcaplet.h>
|
||||||
|
|
||||||
#include "utils/config.h"
|
#include "utils/config.h"
|
||||||
@ -202,8 +204,14 @@ static bool fetch_data_process(struct fetch_data_context *c)
|
|||||||
* decides to nest URL and base64 encoding. Like, say, Acid2.
|
* decides to nest URL and base64 encoding. Like, say, Acid2.
|
||||||
*/
|
*/
|
||||||
templen = c->datalen;
|
templen = c->datalen;
|
||||||
unescaped = curl_easy_unescape(curl, comma + 1, 0, &templen);
|
/* TODO: Replace unescaped = line with http.obj */
|
||||||
c->datalen = templen;
|
/* unescaped = curl_easy_unescape(curl, comma + 1, 0, &templen); */
|
||||||
|
LOG(("Calling http_unescape_url in data.c\n"));
|
||||||
|
unescaped = http_unescape_url(comma + 1);
|
||||||
|
c->datalen = strlen(unescaped);
|
||||||
|
|
||||||
|
/* c->datalen = templen; */
|
||||||
|
|
||||||
if (unescaped == NULL) {
|
if (unescaped == NULL) {
|
||||||
msg.type = FETCH_ERROR;
|
msg.type = FETCH_ERROR;
|
||||||
msg.data.error = "Unable to URL decode data: URL";
|
msg.data.error = "Unable to URL decode data: URL";
|
||||||
@ -218,7 +226,8 @@ static bool fetch_data_process(struct fetch_data_context *c)
|
|||||||
msg.type = FETCH_ERROR;
|
msg.type = FETCH_ERROR;
|
||||||
msg.data.error = "Unable to Base64 decode data: URL";
|
msg.data.error = "Unable to Base64 decode data: URL";
|
||||||
fetch_data_send_callback(&msg, c);
|
fetch_data_send_callback(&msg, c);
|
||||||
curl_free(unescaped);
|
/* curl_free(unescaped); */
|
||||||
|
free(unescaped);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -228,13 +237,15 @@ static bool fetch_data_process(struct fetch_data_context *c)
|
|||||||
msg.data.error =
|
msg.data.error =
|
||||||
"Unable to allocate memory for data: URL";
|
"Unable to allocate memory for data: URL";
|
||||||
fetch_data_send_callback(&msg, c);
|
fetch_data_send_callback(&msg, c);
|
||||||
curl_free(unescaped);
|
/* curl_free(unescaped); */
|
||||||
|
free(unescaped);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
memcpy(c->data, unescaped, c->datalen);
|
memcpy(c->data, unescaped, c->datalen);
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_free(unescaped);
|
/* curl_free(unescaped); */
|
||||||
|
free(unescaped);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,6 @@ fetch_file_setup(struct fetch *fetchh,
|
|||||||
ctx->fetchh = fetchh;
|
ctx->fetchh = fetchh;
|
||||||
|
|
||||||
RING_INSERT(ring, ctx);
|
RING_INSERT(ring, ctx);
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#include <menuet/os.h>
|
#include <menuet/os.h>
|
||||||
|
#include "http_msg.h"
|
||||||
|
//#include "http.h"
|
||||||
|
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
|
|
||||||
#define __stdcall __attribute__((stdcall))
|
#define __stdcall __attribute__((stdcall))
|
||||||
|
|
||||||
extern int dll_load();
|
extern int dll_load();
|
||||||
@ -7,39 +11,16 @@ extern int mem_Free();
|
|||||||
extern int mem_Alloc();
|
extern int mem_Alloc();
|
||||||
extern int mem_ReAlloc();
|
extern int mem_ReAlloc();
|
||||||
|
|
||||||
|
int (* __stdcall http_init)(void);
|
||||||
|
|
||||||
int kol_exit(){
|
|
||||||
__menuet__sys_exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct http_msg {
|
|
||||||
// internal used by library, dont mess with these.
|
|
||||||
unsigned int socket;
|
|
||||||
unsigned int flags;
|
|
||||||
unsigned int write_ptr;
|
|
||||||
unsigned int buffer_length;
|
|
||||||
unsigned int chunk_ptr;
|
|
||||||
unsigned int timestamp;
|
|
||||||
|
|
||||||
// available for use.
|
|
||||||
unsigned int status;
|
|
||||||
unsigned int header_length;
|
|
||||||
char *content_ptr;
|
|
||||||
unsigned int content_length;
|
|
||||||
unsigned int content_received;
|
|
||||||
char header; //unknown size (actually, it's size is defined in header_length)
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
int (* __stdcall http_init)();
|
|
||||||
// On the next line, we should tell the C compiler that this procedure actually returns a pointer. (to the http_msg struct)
|
// On the next line, we should tell the C compiler that this procedure actually returns a pointer. (to the http_msg struct)
|
||||||
unsigned int (* __stdcall http_get) (char * url, char * add_head); //yay, it's NOT uint, but hey, C is stubborn, and I'm dumb
|
unsigned int (* __stdcall http_get) (char * url, char * add_head); //yay, it's NOT uint, but hey, C is stubborn, and I'm dumb
|
||||||
int (* __stdcall http_process) (unsigned int identifier);
|
int (* __stdcall http_receive) (unsigned int identifier);
|
||||||
void (* __stdcall http_free) (unsigned int identifier);
|
void (* __stdcall http_free) (unsigned int identifier);
|
||||||
|
char * (* __stdcall http_find_header_field) (struct http_msg *http_ahoy, char *field_name); //This is crazzzzzzyyyyyy
|
||||||
|
char * (* __stdcall http_unescape_url) (char * url_asciiz);
|
||||||
|
char * (* __stdcall http_post) (char *url, char *headers, char *content_type, int content_length);
|
||||||
|
int (* __stdcall http_send) (struct http_msg *handle, char *data, unsigned int length);
|
||||||
|
void (* __stdcall http_disconnect) (struct http_msg *handle);
|
||||||
|
|
||||||
int HTTP_YAY(){
|
int HTTP_YAY(){
|
||||||
asm volatile ("pusha\n\
|
asm volatile ("pusha\n\
|
||||||
@ -52,11 +33,14 @@ int HTTP_YAY(){
|
|||||||
popa");
|
popa");
|
||||||
}
|
}
|
||||||
|
|
||||||
///===========================
|
int kol_exit(){
|
||||||
|
__menuet__debug_out("kol_exit()..Exiting..\n");
|
||||||
|
__menuet__sys_exit();
|
||||||
|
}
|
||||||
|
|
||||||
void HTTP_INIT()
|
void HTTP_INIT()
|
||||||
{
|
{
|
||||||
IMP_ENTRY *imp;
|
const IMP_ENTRY *imp;
|
||||||
|
|
||||||
imp = __kolibri__cofflib_load("/sys/lib/http.obj");
|
imp = __kolibri__cofflib_load("/sys/lib/http.obj");
|
||||||
if (imp == NULL)
|
if (imp == NULL)
|
||||||
@ -65,27 +49,87 @@ if (imp == NULL)
|
|||||||
http_init = ( __stdcall int(*)())
|
http_init = ( __stdcall int(*)())
|
||||||
__kolibri__cofflib_getproc (imp, "lib_init");
|
__kolibri__cofflib_getproc (imp, "lib_init");
|
||||||
if (http_init == NULL)
|
if (http_init == NULL)
|
||||||
|
{
|
||||||
|
__menuet__debug_out("http_init() is NULL. Exiting.\n");
|
||||||
kol_exit();
|
kol_exit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
__menuet__debug_out("\nhttp_init() initialised properly.\n");
|
||||||
|
|
||||||
http_get = ( __stdcall unsigned int (*)(char*))
|
|
||||||
|
http_get = ( __stdcall unsigned int (*)(char*, char*))
|
||||||
__kolibri__cofflib_getproc (imp, "get");
|
__kolibri__cofflib_getproc (imp, "get");
|
||||||
if (http_get == NULL)
|
if (http_get == NULL)
|
||||||
|
{
|
||||||
|
__menuet__debug_out("http_get() is NULL. Exiting.\n");
|
||||||
kol_exit();
|
kol_exit();
|
||||||
|
}
|
||||||
http_free = ( __stdcall void (*)(unsigned int))
|
http_free = ( __stdcall void (*)(unsigned int))
|
||||||
__kolibri__cofflib_getproc (imp, "free");
|
__kolibri__cofflib_getproc (imp, "free");
|
||||||
if (http_free == NULL)
|
if (http_free == NULL)
|
||||||
|
{
|
||||||
|
__menuet__debug_out("http_free() is NULL. Exiting.\n");
|
||||||
kol_exit();
|
kol_exit();
|
||||||
|
}
|
||||||
|
http_receive = ( __stdcall int (*)(unsigned int))
|
||||||
|
__kolibri__cofflib_getproc (imp, "receive");
|
||||||
|
|
||||||
|
if (http_receive == NULL)
|
||||||
|
{
|
||||||
|
__menuet__debug_out("http_receive() is NULL. Exiting.\n");
|
||||||
|
kol_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
http_find_header_field = ( __stdcall char *(*)(struct http_msg*, char *))
|
||||||
|
__kolibri__cofflib_getproc (imp, "find_header_field");
|
||||||
|
if (http_find_header_field == NULL)
|
||||||
|
{
|
||||||
|
__menuet__debug_out("http_find_header_field() is NULL. Exiting.\n");
|
||||||
|
kol_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
http_unescape_url = ( __stdcall char *(*)(char *))
|
||||||
|
__kolibri__cofflib_getproc (imp, "unescape");
|
||||||
|
|
||||||
|
if(http_unescape_url == NULL)
|
||||||
|
{
|
||||||
|
__menuet__debug_out("http_unescape_url() is NULL. Exiting.\n");
|
||||||
|
kol_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
http_post = ( __stdcall char *(*)(char *, char *, char *, int))
|
||||||
|
__kolibri__cofflib_getproc (imp, "post");
|
||||||
|
|
||||||
|
if(http_post == NULL)
|
||||||
|
{
|
||||||
|
__menuet__debug_out("http_post() is NULL. Exiting.\n");
|
||||||
|
kol_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
http_process = ( __stdcall int (*)(unsigned int))
|
http_send = ( __stdcall int (*)(struct http_msg *, char *, unsigned int))
|
||||||
__kolibri__cofflib_getproc (imp, "process");
|
__kolibri__cofflib_getproc (imp, "send");
|
||||||
if (http_process == NULL)
|
|
||||||
|
if(http_send == NULL)
|
||||||
|
{
|
||||||
|
__menuet__debug_out("http_send() is NULL. Exiting.\n");
|
||||||
kol_exit();
|
kol_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
http_disconnect = ( __stdcall void (*)(struct http_msg *))
|
||||||
|
__kolibri__cofflib_getproc (imp, "disconnect");
|
||||||
|
|
||||||
|
if(http_disconnect == NULL)
|
||||||
|
{
|
||||||
|
__menuet__debug_out("http_disconnect() is NULL. Exiting.\n");
|
||||||
|
kol_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__menuet__debug_out("HTTP init...\n");
|
__menuet__debug_out("HTTP init...\n");
|
||||||
HTTP_YAY();
|
HTTP_YAY();
|
||||||
|
|
||||||
__menuet__debug_out("ok...\n");
|
__menuet__debug_out("ok...\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
|
|||||||
# freetype compiled in font serch path
|
# freetype compiled in font serch path
|
||||||
NETSURF_FB_FONTPATH := /usr/share/fonts/truetype/ttf-dejavu:/usr/share/fonts/truetype/msttcorefonts
|
NETSURF_FB_FONTPATH := /usr/share/fonts/truetype/ttf-dejavu:/usr/share/fonts/truetype/msttcorefonts
|
||||||
|
|
||||||
OBJS := curl.o data.o file.o about.o resource.o
|
OBJS := curl.o data.o file.o about.o resource.o http.o
|
||||||
|
|
||||||
OUTFILE = TEST.o
|
OUTFILE = TEST.o
|
||||||
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libwapcaplet/include/ -I ../../../libcss/include/
|
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libwapcaplet/include/ -I ../../../libcss/include/
|
||||||
|
@ -220,7 +220,6 @@ void hlcache_finalise(void)
|
|||||||
/* See hlcache.h for documentation */
|
/* See hlcache.h for documentation */
|
||||||
nserror hlcache_poll(void)
|
nserror hlcache_poll(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
llcache_poll();
|
llcache_poll();
|
||||||
|
|
||||||
return NSERROR_OK;
|
return NSERROR_OK;
|
||||||
@ -515,11 +514,13 @@ nserror hlcache_llcache_callback(llcache_handle *handle,
|
|||||||
hlcache_retrieval_ctx *ctx = pw;
|
hlcache_retrieval_ctx *ctx = pw;
|
||||||
lwc_string *effective_type = NULL;
|
lwc_string *effective_type = NULL;
|
||||||
nserror error;
|
nserror error;
|
||||||
|
/* LOG(("Asserting ctx->llcache == handle")); */
|
||||||
assert(ctx->llcache == handle);
|
assert(ctx->llcache == handle);
|
||||||
|
/* LOG(("After Asserting ctx->llcache == handle")); */
|
||||||
|
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case LLCACHE_EVENT_HAD_HEADERS:
|
case LLCACHE_EVENT_HAD_HEADERS:
|
||||||
|
/* LOG(("LLCACHE_EVENT_HAD_HEADERS")); */
|
||||||
error = mimesniff_compute_effective_type(handle, NULL, 0,
|
error = mimesniff_compute_effective_type(handle, NULL, 0,
|
||||||
ctx->flags & HLCACHE_RETRIEVE_SNIFF_TYPE,
|
ctx->flags & HLCACHE_RETRIEVE_SNIFF_TYPE,
|
||||||
ctx->accepted_types == CONTENT_IMAGE,
|
ctx->accepted_types == CONTENT_IMAGE,
|
||||||
@ -528,6 +529,7 @@ nserror hlcache_llcache_callback(llcache_handle *handle,
|
|||||||
/* If the sniffer was successful or failed to find
|
/* If the sniffer was successful or failed to find
|
||||||
* a Content-Type header when sniffing was
|
* a Content-Type header when sniffing was
|
||||||
* prohibited, we must migrate the retrieval context. */
|
* prohibited, we must migrate the retrieval context. */
|
||||||
|
/* LOG(("hlcache_migraet_ctx from LLCACHE_HAD_HEADERS")); */
|
||||||
error = hlcache_migrate_ctx(ctx, effective_type);
|
error = hlcache_migrate_ctx(ctx, effective_type);
|
||||||
|
|
||||||
if (effective_type != NULL)
|
if (effective_type != NULL)
|
||||||
@ -543,6 +545,7 @@ nserror hlcache_llcache_callback(llcache_handle *handle,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case LLCACHE_EVENT_HAD_DATA:
|
case LLCACHE_EVENT_HAD_DATA:
|
||||||
|
/* LOG(("LLCACHE_EVENT_HAD_DATA")); */
|
||||||
error = mimesniff_compute_effective_type(handle,
|
error = mimesniff_compute_effective_type(handle,
|
||||||
event->data.data.buf, event->data.data.len,
|
event->data.data.buf, event->data.data.len,
|
||||||
ctx->flags & HLCACHE_RETRIEVE_SNIFF_TYPE,
|
ctx->flags & HLCACHE_RETRIEVE_SNIFF_TYPE,
|
||||||
@ -551,7 +554,7 @@ nserror hlcache_llcache_callback(llcache_handle *handle,
|
|||||||
if (error != NSERROR_OK) {
|
if (error != NSERROR_OK) {
|
||||||
assert(0 && "MIME sniff failed with data");
|
assert(0 && "MIME sniff failed with data");
|
||||||
}
|
}
|
||||||
|
/* LOG(("hlcache_migraet_ctx from LLCACHE_HAD_DATA")); */
|
||||||
error = hlcache_migrate_ctx(ctx, effective_type);
|
error = hlcache_migrate_ctx(ctx, effective_type);
|
||||||
|
|
||||||
lwc_string_unref(effective_type);
|
lwc_string_unref(effective_type);
|
||||||
@ -560,11 +563,13 @@ nserror hlcache_llcache_callback(llcache_handle *handle,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case LLCACHE_EVENT_DONE:
|
case LLCACHE_EVENT_DONE:
|
||||||
|
/* LOG(("LLCACHE_EVENT_DONE")); */
|
||||||
/* DONE event before we could determine the effective MIME type.
|
/* DONE event before we could determine the effective MIME type.
|
||||||
*/
|
*/
|
||||||
error = mimesniff_compute_effective_type(handle,
|
error = mimesniff_compute_effective_type(handle,
|
||||||
NULL, 0, false, false, &effective_type);
|
NULL, 0, false, false, &effective_type);
|
||||||
if (error == NSERROR_OK) {
|
if (error == NSERROR_OK) {
|
||||||
|
/* LOG(("hlcache_migrate_ctx in LLCACHE_EVENT_DONE")); */
|
||||||
error = hlcache_migrate_ctx(ctx, effective_type);
|
error = hlcache_migrate_ctx(ctx, effective_type);
|
||||||
|
|
||||||
lwc_string_unref(effective_type);
|
lwc_string_unref(effective_type);
|
||||||
@ -577,11 +582,11 @@ nserror hlcache_llcache_callback(llcache_handle *handle,
|
|||||||
|
|
||||||
hlevent.type = CONTENT_MSG_ERROR;
|
hlevent.type = CONTENT_MSG_ERROR;
|
||||||
hlevent.data.error = messages_get("BadType");
|
hlevent.data.error = messages_get("BadType");
|
||||||
|
|
||||||
ctx->handle->cb(ctx->handle, &hlevent, ctx->handle->pw);
|
ctx->handle->cb(ctx->handle, &hlevent, ctx->handle->pw);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LLCACHE_EVENT_ERROR:
|
case LLCACHE_EVENT_ERROR:
|
||||||
|
/* LOG(("LLCACHE_EVENT_ERROR")); */
|
||||||
if (ctx->handle->cb != NULL) {
|
if (ctx->handle->cb != NULL) {
|
||||||
hlcache_event hlevent;
|
hlcache_event hlevent;
|
||||||
|
|
||||||
@ -592,9 +597,10 @@ nserror hlcache_llcache_callback(llcache_handle *handle,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LLCACHE_EVENT_PROGRESS:
|
case LLCACHE_EVENT_PROGRESS:
|
||||||
|
/* LOG(("LLCACHE_EVENT_PROGRESS")); */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* LOG(("Returning OK from hlcache_llcache_callback")); */
|
||||||
return NSERROR_OK;
|
return NSERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -654,7 +660,7 @@ nserror hlcache_migrate_ctx(hlcache_retrieval_ctx *ctx,
|
|||||||
/* Unacceptable type: report error */
|
/* Unacceptable type: report error */
|
||||||
if (ctx->handle->cb != NULL) {
|
if (ctx->handle->cb != NULL) {
|
||||||
hlcache_event hlevent;
|
hlcache_event hlevent;
|
||||||
|
/* LOG(("Unacceptable Type! CONTENT_MSG_ERROR set")); */
|
||||||
hlevent.type = CONTENT_MSG_ERROR;
|
hlevent.type = CONTENT_MSG_ERROR;
|
||||||
hlevent.data.error = messages_get("UnacceptableType");
|
hlevent.data.error = messages_get("UnacceptableType");
|
||||||
|
|
||||||
@ -814,13 +820,14 @@ nserror hlcache_find_content(hlcache_retrieval_ctx *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->handle->cb != NULL) {
|
if (ctx->handle->cb != NULL) {
|
||||||
|
/* LOG(("Calling with CONTENT_MSG_DONE")); */
|
||||||
event.type = CONTENT_MSG_DONE;
|
event.type = CONTENT_MSG_DONE;
|
||||||
ctx->handle->cb(ctx->handle, &event,
|
ctx->handle->cb(ctx->handle, &event,
|
||||||
ctx->handle->pw);
|
ctx->handle->pw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* LOG(("Returning from ")); */
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,13 @@
|
|||||||
/** Define to enable tracing of llcache operations. */
|
/** Define to enable tracing of llcache operations. */
|
||||||
#undef LLCACHE_TRACE
|
#undef LLCACHE_TRACE
|
||||||
|
|
||||||
|
#ifdef DBG
|
||||||
|
#undef DBG
|
||||||
|
#endif
|
||||||
|
//#define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */
|
||||||
|
#define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */
|
||||||
|
|
||||||
|
|
||||||
/** State of a low-level cache object fetch */
|
/** State of a low-level cache object fetch */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LLCACHE_FETCH_INIT, /**< Initial state, before fetch */
|
LLCACHE_FETCH_INIT, /**< Initial state, before fetch */
|
||||||
@ -486,14 +493,17 @@ static nserror llcache_fetch_parse_header(llcache_object *object,
|
|||||||
|
|
||||||
if (5 < len && strcasecmp(*name, "Date") == 0) {
|
if (5 < len && strcasecmp(*name, "Date") == 0) {
|
||||||
/* extract Date header */
|
/* extract Date header */
|
||||||
object->cache.date = curl_getdate(*value, NULL);
|
/* TODO: object->cache.date = curl_getdate(*value, NULL); */
|
||||||
|
object->cache.date = (time_t) 12341234;
|
||||||
|
|
||||||
} else if (4 < len && strcasecmp(*name, "Age") == 0) {
|
} else if (4 < len && strcasecmp(*name, "Age") == 0) {
|
||||||
/* extract Age header */
|
/* extract Age header */
|
||||||
if ('0' <= **value && **value <= '9')
|
if ('0' <= **value && **value <= '9')
|
||||||
object->cache.age = atoi(*value);
|
object->cache.age = atoi(*value);
|
||||||
} else if (8 < len && strcasecmp(*name, "Expires") == 0) {
|
} else if (8 < len && strcasecmp(*name, "Expires") == 0) {
|
||||||
/* extract Expires header */
|
/* extract Expires header */
|
||||||
object->cache.expires = curl_getdate(*value, NULL);
|
/* TODO: object->cache.expires = curl_getdate(*value, NULL); */
|
||||||
|
object->cache.expires = (time_t) 123412399;
|
||||||
} else if (14 < len && strcasecmp(*name, "Cache-Control") == 0) {
|
} else if (14 < len && strcasecmp(*name, "Cache-Control") == 0) {
|
||||||
/* extract and parse Cache-Control header */
|
/* extract and parse Cache-Control header */
|
||||||
const char *start = *value;
|
const char *start = *value;
|
||||||
@ -543,7 +553,8 @@ static nserror llcache_fetch_parse_header(llcache_object *object,
|
|||||||
return NSERROR_NOMEM;
|
return NSERROR_NOMEM;
|
||||||
} else if (14 < len && strcasecmp(*name, "Last-Modified") == 0) {
|
} else if (14 < len && strcasecmp(*name, "Last-Modified") == 0) {
|
||||||
/* extract Last-Modified header */
|
/* extract Last-Modified header */
|
||||||
object->cache.last_modified = curl_getdate(*value, NULL);
|
/* TODO object->cache.last_modified = curl_getdate(*value, NULL); */
|
||||||
|
object->cache.last_modified = (time_t) 12341230;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef SKIP_ST
|
#undef SKIP_ST
|
||||||
@ -1623,14 +1634,17 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
nserror error = NSERROR_OK;
|
nserror error = NSERROR_OK;
|
||||||
llcache_object *object = p;
|
llcache_object *object = p;
|
||||||
llcache_event event;
|
llcache_event event;
|
||||||
__menuet__debug_out("Inside llcache_fetch_callback\n");
|
/* DBG("Inside llcache_fetch_callback\n"); */
|
||||||
|
|
||||||
#ifdef LLCACHE_TRACE
|
#ifdef LLCACHE_TRACE
|
||||||
LOG(("Fetch event %d for %p", msg->type, object));
|
LOG(("Fetch event %d for %p", msg->type, object));
|
||||||
#endif
|
#endif
|
||||||
|
if(!msg)
|
||||||
|
LOG(("msg is NULL in llcache_fetch_callback\n"));
|
||||||
|
|
||||||
switch (msg->type) {
|
switch (msg->type) {
|
||||||
case FETCH_HEADER:
|
case FETCH_HEADER:
|
||||||
|
/* DBG("FETCH_HEADER in llcache\n"); */
|
||||||
/* Received a fetch header */
|
/* Received a fetch header */
|
||||||
object->fetch.state = LLCACHE_FETCH_HEADERS;
|
object->fetch.state = LLCACHE_FETCH_HEADERS;
|
||||||
|
|
||||||
@ -1642,7 +1656,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
/* 3xx responses */
|
/* 3xx responses */
|
||||||
case FETCH_REDIRECT:
|
case FETCH_REDIRECT:
|
||||||
/* Request resulted in a redirect */
|
/* Request resulted in a redirect */
|
||||||
|
/* DBG("FETCH_REDIRECT in llcache\n"); */
|
||||||
/* Release candidate, if any */
|
/* Release candidate, if any */
|
||||||
if (object->candidate != NULL) {
|
if (object->candidate != NULL) {
|
||||||
object->candidate->candidate_count--;
|
object->candidate->candidate_count--;
|
||||||
@ -1654,11 +1668,13 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
break;
|
break;
|
||||||
case FETCH_NOTMODIFIED:
|
case FETCH_NOTMODIFIED:
|
||||||
/* Conditional request determined that cached object is fresh */
|
/* Conditional request determined that cached object is fresh */
|
||||||
|
/* DBG("FETCH_NOTMODIFIED in llcache\n"); */
|
||||||
error = llcache_fetch_notmodified(object, &object);
|
error = llcache_fetch_notmodified(object, &object);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Normal 2xx state machine */
|
/* Normal 2xx state machine */
|
||||||
case FETCH_DATA:
|
case FETCH_DATA:
|
||||||
|
/* DBG("FETCH_DATA in llcache\n"); */
|
||||||
/* Received some data */
|
/* Received some data */
|
||||||
if (object->fetch.state != LLCACHE_FETCH_DATA) {
|
if (object->fetch.state != LLCACHE_FETCH_DATA) {
|
||||||
/* On entry into this state, check if we need to
|
/* On entry into this state, check if we need to
|
||||||
@ -1701,6 +1717,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
{
|
{
|
||||||
uint8_t *temp;
|
uint8_t *temp;
|
||||||
|
|
||||||
|
/* DBG("FETCH_FINISHED in llcache\n"); */
|
||||||
object->fetch.state = LLCACHE_FETCH_COMPLETE;
|
object->fetch.state = LLCACHE_FETCH_COMPLETE;
|
||||||
object->fetch.fetch = NULL;
|
object->fetch.fetch = NULL;
|
||||||
|
|
||||||
@ -1721,6 +1738,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
case FETCH_ERROR:
|
case FETCH_ERROR:
|
||||||
/* An error occurred while fetching */
|
/* An error occurred while fetching */
|
||||||
/* The fetch has has already been cleaned up by the fetcher */
|
/* The fetch has has already been cleaned up by the fetcher */
|
||||||
|
/* DBG("FETCH_ERROR in llcache\n"); */
|
||||||
object->fetch.state = LLCACHE_FETCH_COMPLETE;
|
object->fetch.state = LLCACHE_FETCH_COMPLETE;
|
||||||
object->fetch.fetch = NULL;
|
object->fetch.fetch = NULL;
|
||||||
|
|
||||||
@ -1742,6 +1760,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case FETCH_PROGRESS:
|
case FETCH_PROGRESS:
|
||||||
|
/* DBG("FETCH_PROGRESS in llcache\n"); */
|
||||||
/* Progress update */
|
/* Progress update */
|
||||||
event.type = LLCACHE_EVENT_PROGRESS;
|
event.type = LLCACHE_EVENT_PROGRESS;
|
||||||
event.data.msg = msg->data.progress;
|
event.data.msg = msg->data.progress;
|
||||||
@ -1752,6 +1771,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
|
|
||||||
/* Events requiring action */
|
/* Events requiring action */
|
||||||
case FETCH_AUTH:
|
case FETCH_AUTH:
|
||||||
|
/* DBG("FETCH_AUTH\n"); */
|
||||||
/* Need Authentication */
|
/* Need Authentication */
|
||||||
|
|
||||||
/* Release candidate, if any */
|
/* Release candidate, if any */
|
||||||
@ -1764,7 +1784,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
break;
|
break;
|
||||||
case FETCH_CERT_ERR:
|
case FETCH_CERT_ERR:
|
||||||
/* Something went wrong when validating TLS certificates */
|
/* Something went wrong when validating TLS certificates */
|
||||||
|
/* DBG("FETCH_CERT_ERR\n"); */
|
||||||
/* Release candidate, if any */
|
/* Release candidate, if any */
|
||||||
if (object->candidate != NULL) {
|
if (object->candidate != NULL) {
|
||||||
object->candidate->candidate_count--;
|
object->candidate->candidate_count--;
|
||||||
@ -1777,7 +1797,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
break;
|
break;
|
||||||
case FETCH_SSL_ERR:
|
case FETCH_SSL_ERR:
|
||||||
/* TLS connection setup failed */
|
/* TLS connection setup failed */
|
||||||
|
/* DBG("FETCH_SSL_ERR\n"); */
|
||||||
/* Release candidate, if any */
|
/* Release candidate, if any */
|
||||||
if (object->candidate != NULL) {
|
if (object->candidate != NULL) {
|
||||||
object->candidate->candidate_count--;
|
object->candidate->candidate_count--;
|
||||||
@ -1790,6 +1810,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
|
|
||||||
/* Deal with any errors reported by event handlers */
|
/* Deal with any errors reported by event handlers */
|
||||||
if (error != NSERROR_OK) {
|
if (error != NSERROR_OK) {
|
||||||
|
/* DBG("Error is not NSERROR_OK!\n"); */
|
||||||
if (object->fetch.fetch != NULL) {
|
if (object->fetch.fetch != NULL) {
|
||||||
fetch_abort(object->fetch.fetch);
|
fetch_abort(object->fetch.fetch);
|
||||||
object->fetch.fetch = NULL;
|
object->fetch.fetch = NULL;
|
||||||
@ -1799,10 +1820,10 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
|
|
||||||
object->fetch.state = LLCACHE_FETCH_COMPLETE;
|
object->fetch.state = LLCACHE_FETCH_COMPLETE;
|
||||||
}
|
}
|
||||||
__menuet__debug_out("Returning from llcache_fetch_callback. (err != NS_OK)\n");
|
/* DBG("Returning llc_f_cb. (err != NS_OK)\n"); */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
__menuet__debug_out("Returning from llcache_fetch_callback.(err = NS_OK)\n");
|
/* DBG("Returning from llc_f_cb.(err = NS_OK)\n"); */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2352,7 +2373,6 @@ void llcache_finalise(void)
|
|||||||
nserror llcache_poll(void)
|
nserror llcache_poll(void)
|
||||||
{
|
{
|
||||||
llcache_object *object;
|
llcache_object *object;
|
||||||
|
|
||||||
fetch_poll();
|
fetch_poll();
|
||||||
|
|
||||||
/* Catch new users up with state of objects */
|
/* Catch new users up with state of objects */
|
||||||
|
@ -3268,7 +3268,9 @@ bool urldb_parse_avpair(struct cookie_internal_data *c, char *n, char *v,
|
|||||||
datenoday++)
|
datenoday++)
|
||||||
; /* do nothing */
|
; /* do nothing */
|
||||||
|
|
||||||
expires = curl_getdate(datenoday, NULL);
|
/* TODO: expires = curl_getdate(datenoday, NULL); */
|
||||||
|
expires = (time_t) 100123123;
|
||||||
|
|
||||||
if (expires == -1) {
|
if (expires == -1) {
|
||||||
/* assume we have an unrepresentable
|
/* assume we have an unrepresentable
|
||||||
* date => force it to the maximum
|
* date => force it to the maximum
|
||||||
|
@ -17,5 +17,5 @@ OBJS := css.o dump.o internal.o select.o utils.o
|
|||||||
|
|
||||||
|
|
||||||
OUTFILE = TEST.o
|
OUTFILE = TEST.o
|
||||||
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include
|
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include -I ../../libwapcaplet/include/ -I ../../libdom/include/ -I ../../libcss/include/ -I ../../libhubbub/include/
|
||||||
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -341,7 +341,7 @@ css_error nscss_compute_font_size(void *pw, const css_hint *parent,
|
|||||||
parent_size = parent->data.length;
|
parent_size = parent->data.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(size->status != CSS_FONT_SIZE_INHERIT);
|
/* assert(size->status != CSS_FONT_SIZE_INHERIT); */
|
||||||
|
|
||||||
if (size->status < CSS_FONT_SIZE_LARGER) {
|
if (size->status < CSS_FONT_SIZE_LARGER) {
|
||||||
/* Keyword -- simple */
|
/* Keyword -- simple */
|
||||||
|
@ -73,7 +73,7 @@ css_fixed nscss_len2pt(css_fixed length, css_unit unit)
|
|||||||
css_fixed nscss_len2px(css_fixed length, css_unit unit,
|
css_fixed nscss_len2px(css_fixed length, css_unit unit,
|
||||||
const css_computed_style *style)
|
const css_computed_style *style)
|
||||||
{
|
{
|
||||||
/* We assume the screen and any other output has the same dpi */
|
/* We assume the screen and ay other output has the same dpi */
|
||||||
css_fixed px_per_unit;
|
css_fixed px_per_unit;
|
||||||
|
|
||||||
assert(style != NULL || (unit != CSS_UNIT_EM && unit != CSS_UNIT_EX));
|
assert(style != NULL || (unit != CSS_UNIT_EM && unit != CSS_UNIT_EX));
|
||||||
|
@ -18,5 +18,6 @@ OBJS := browser.o download.o frames.o history_core.o netsurf.o \
|
|||||||
|
|
||||||
|
|
||||||
OUTFILE = TEST.o
|
OUTFILE = TEST.o
|
||||||
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include
|
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include -I ../../libwapcaplet/include/ -I ../../libcss/include/ -I ../../libdom/include/ -I ../../libhubbub/include/
|
||||||
|
|
||||||
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -20,5 +20,6 @@ OBJS := cookies.o history_global_core.o hotlist.o knockout.o \
|
|||||||
|
|
||||||
|
|
||||||
OUTFILE = TEST.o
|
OUTFILE = TEST.o
|
||||||
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include
|
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include -I ../../libwapcaplet/include/ -I../../libcss/include -I ../../libdom/include/ -I ../../libhubbub/include/ -I ../../include/
|
||||||
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
|
||||||
|
@ -236,6 +236,7 @@ nserror netsurf_init(int *pargc,
|
|||||||
|
|
||||||
js_initialise();
|
js_initialise();
|
||||||
|
|
||||||
|
LOG(("Returning from netsurf_init()"));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,12 +247,13 @@ nserror netsurf_init(int *pargc,
|
|||||||
int netsurf_main_loop(void)
|
int netsurf_main_loop(void)
|
||||||
{
|
{
|
||||||
while (!netsurf_quit) {
|
while (!netsurf_quit) {
|
||||||
LOG(("GUI POLL"));
|
/* LOG(("GUI POLL")); */
|
||||||
gui_poll(fetch_active);
|
gui_poll(fetch_active);
|
||||||
LOG(("CACHE POLL"));
|
/* LOG(("CACHE POLL")); */
|
||||||
hlcache_poll();
|
hlcache_poll();
|
||||||
}
|
}
|
||||||
|
fflush(stdout);
|
||||||
|
fflush(stderr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,60 +35,67 @@
|
|||||||
|
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
|
|
||||||
|
#ifdef DBG
|
||||||
|
#undef DBG
|
||||||
|
#endif
|
||||||
|
//#define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */
|
||||||
|
#define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fb_redraw_bitmap(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
fb_redraw_bitmap(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
||||||
{
|
{
|
||||||
LOG(("REDRAW BITMAP"));
|
/* LOG(("REDRAW BITMAP")); */
|
||||||
//__menuet__debug_out("REDRAW BITMAP");
|
//DBG("REDRAW BITMAP");
|
||||||
nsfb_bbox_t bbox;
|
nsfb_bbox_t bbox;
|
||||||
nsfb_bbox_t rect;
|
nsfb_bbox_t rect;
|
||||||
nsfb_t *nsfb;
|
nsfb_t *nsfb;
|
||||||
|
|
||||||
LOG(("REDRAW BITMAP 1 "));
|
/* LOG(("REDRAW BITMAP 1 ")); */
|
||||||
//__menuet__debug_out("REDRAW BITMAP 1");
|
//DBG("REDRAW BITMAP 1");
|
||||||
|
|
||||||
|
|
||||||
nsfb = fbtk_get_nsfb(widget);
|
nsfb = fbtk_get_nsfb(widget);
|
||||||
|
|
||||||
LOG(("REDRAW BITMAP 2"));
|
/* LOG(("REDRAW BITMAP 2")); */
|
||||||
//__menuet__debug_out("REDRAW BITMAP 2");
|
//DBG("REDRAW BITMAP 2");
|
||||||
|
|
||||||
|
|
||||||
fbtk_get_bbox(widget, &bbox);
|
fbtk_get_bbox(widget, &bbox);
|
||||||
|
|
||||||
rect = bbox;
|
rect = bbox;
|
||||||
|
|
||||||
LOG(("REDRAW BITMAP 3 "));
|
/* LOG(("REDRAW BITMAP 3 ")); */
|
||||||
//__menuet__debug_out("REDRAW BITMAP 3");
|
//DBG("REDRAW BITMAP 3");
|
||||||
|
|
||||||
|
|
||||||
nsfb_claim(nsfb, &bbox);
|
nsfb_claim(nsfb, &bbox);
|
||||||
|
|
||||||
LOG(("REDRAW BITMAP 4"));
|
/* LOG(("REDRAW BITMAP 4")); */
|
||||||
//__menuet__debug_out("REDRAW BITMAP 4");
|
//DBG("REDRAW BITMAP 4");
|
||||||
|
|
||||||
/* clear background */
|
/* clear background */
|
||||||
if ((widget->bg & 0xFF000000) != 0) {
|
if ((widget->bg & 0xFF000000) != 0) {
|
||||||
/* transparent polygon filling isnt working so fake it */
|
/* transparent polygon filling isnt working so fake it */
|
||||||
|
|
||||||
LOG(("REDRAW BITMAP 5"));
|
/* LOG(("REDRAW BITMAP 5")); */
|
||||||
//__menuet__debug_out("REDRAW BITMAP 5");
|
//DBG("REDRAW BITMAP 5");
|
||||||
|
|
||||||
nsfb_plot_rectangle_fill(nsfb, &bbox, widget->bg);
|
nsfb_plot_rectangle_fill(nsfb, &bbox, widget->bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(("REDRAW BITMAP 6"));
|
/* LOG(("REDRAW BITMAP 6")); */
|
||||||
//__menuet__debug_out("REDRAW BITMAP 6\n");
|
//DBG("REDRAW BITMAP 6\n");
|
||||||
|
|
||||||
/* plot the image */
|
/* plot the image */
|
||||||
|
|
||||||
LOG(("STUB: DON'T REAL DRAW"));
|
/* LOG(("STUB: DON'T REAL DRAW")); */
|
||||||
//__menuet__debug_out("STUB: DON'T REAL DRAW\n");
|
//DBG("STUB: DON'T REAL DRAW\n");
|
||||||
|
|
||||||
|
|
||||||
LOG(("pixdata is %x", (nsfb_colour_t *)widget->u.bitmap.bitmap->pixdata));
|
/* LOG(("pixdata is %x", (nsfb_colour_t *)widget->u.bitmap.bitmap->pixdata)); */
|
||||||
LOG(("pixdata is w:%d h:%d",widget->u.bitmap.bitmap->width,
|
/* LOG(("pixdata is w:%d h:%d",widget->u.bitmap.bitmap->width, */
|
||||||
widget->u.bitmap.bitmap->height));
|
/* widget->u.bitmap.bitmap->height)); */
|
||||||
|
|
||||||
//hmm
|
//hmm
|
||||||
|
|
||||||
@ -112,13 +119,13 @@ fb_redraw_bitmap(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
LOG(("REDRAW BITMAP 7"));
|
/* LOG(("REDRAW BITMAP 7")); */
|
||||||
//__menuet__debug_out("REDRAW BITMAP 7\n");
|
//DBG("REDRAW BITMAP 7\n");
|
||||||
|
|
||||||
nsfb_update(nsfb, &bbox);
|
nsfb_update(nsfb, &bbox);
|
||||||
|
|
||||||
LOG(("REDRAW BITMAP OK\n"));
|
/* LOG(("REDRAW BITMAP OK\n")); */
|
||||||
//__menuet__debug_out("REDRAW BITMAP OK\n");
|
//DBG("REDRAW BITMAP OK\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -127,8 +134,8 @@ fb_redraw_bitmap(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
void
|
void
|
||||||
fbtk_set_bitmap(fbtk_widget_t *widget, struct fbtk_bitmap *image)
|
fbtk_set_bitmap(fbtk_widget_t *widget, struct fbtk_bitmap *image)
|
||||||
{
|
{
|
||||||
LOG(("SET BITMAP"));
|
/* LOG(("SET BITMAP")); */
|
||||||
//__menuet__debug_out("set BITMAP");
|
//DBG("set BITMAP");
|
||||||
if ((widget == NULL) || (widget->type != FB_WIDGET_TYPE_BITMAP))
|
if ((widget == NULL) || (widget->type != FB_WIDGET_TYPE_BITMAP))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -147,8 +154,8 @@ fbtk_create_bitmap(fbtk_widget_t *parent,
|
|||||||
colour c,
|
colour c,
|
||||||
struct fbtk_bitmap *image)
|
struct fbtk_bitmap *image)
|
||||||
{
|
{
|
||||||
LOG(("CREATE BITMAP"));
|
/* LOG(("CREATE BITMAP")); */
|
||||||
//__menuet__debug_out("cr BITMAP");
|
//DBG("cr BITMAP");
|
||||||
fbtk_widget_t *neww;
|
fbtk_widget_t *neww;
|
||||||
|
|
||||||
neww = fbtk_widget_new(parent, FB_WIDGET_TYPE_BITMAP, x, y, width, height);
|
neww = fbtk_widget_new(parent, FB_WIDGET_TYPE_BITMAP, x, y, width, height);
|
||||||
@ -176,8 +183,8 @@ fbtk_create_button(fbtk_widget_t *parent,
|
|||||||
{
|
{
|
||||||
fbtk_widget_t *neww;
|
fbtk_widget_t *neww;
|
||||||
|
|
||||||
LOG(("CREATE BUTTON BITMAP"));
|
/* LOG(("CREATE BUTTON BITMAP")); */
|
||||||
//__menuet__debug_out("cr bb BITMAP");
|
//DBG("cr bb BITMAP");
|
||||||
neww = fbtk_widget_new(parent, FB_WIDGET_TYPE_BITMAP, x, y, width, height);
|
neww = fbtk_widget_new(parent, FB_WIDGET_TYPE_BITMAP, x, y, width, height);
|
||||||
|
|
||||||
neww->bg = c;
|
neww->bg = c;
|
||||||
|
@ -43,6 +43,13 @@
|
|||||||
|
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
|
|
||||||
|
#ifdef DBG
|
||||||
|
#undef DBG
|
||||||
|
#endif
|
||||||
|
//#define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */
|
||||||
|
#define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */
|
||||||
|
|
||||||
|
|
||||||
#ifdef FBTK_LOGGING
|
#ifdef FBTK_LOGGING
|
||||||
|
|
||||||
/* tree dump debug, also example of depth first tree walk */
|
/* tree dump debug, also example of depth first tree walk */
|
||||||
@ -53,7 +60,7 @@ dump_tk_tree(fbtk_widget_t *widget)
|
|||||||
int indent = 0;
|
int indent = 0;
|
||||||
|
|
||||||
while (widget != NULL) {
|
while (widget != NULL) {
|
||||||
LOG(("%*s%p", indent, "", widget));
|
/* LOG(("%*s%p", indent, "", widget)); */
|
||||||
if (widget->first_child != NULL) {
|
if (widget->first_child != NULL) {
|
||||||
widget = widget->first_child;
|
widget = widget->first_child;
|
||||||
indent += 6;
|
indent += 6;
|
||||||
@ -100,12 +107,12 @@ fbtk_request_redraw(fbtk_widget_t *widget)
|
|||||||
widget->redraw.width = widget->width;
|
widget->redraw.width = widget->width;
|
||||||
widget->redraw.height = widget->height;
|
widget->redraw.height = widget->height;
|
||||||
|
|
||||||
LOG(("redrawing %p %d,%d %d,%d",
|
/* LOG(("redrawing %p %d,%d %d,%d", */
|
||||||
widget,
|
/* widget, */
|
||||||
widget->redraw.x,
|
/* widget->redraw.x, */
|
||||||
widget->redraw.y,
|
/* widget->redraw.y, */
|
||||||
widget->redraw.width,
|
/* widget->redraw.width, */
|
||||||
widget->redraw.height));
|
/* widget->redraw.height)); */
|
||||||
|
|
||||||
cwidget = widget->last_child;
|
cwidget = widget->last_child;
|
||||||
while (cwidget != NULL) {
|
while (cwidget != NULL) {
|
||||||
@ -125,7 +132,7 @@ fbtk_request_redraw(fbtk_widget_t *widget)
|
|||||||
int
|
int
|
||||||
fbtk_set_mapping(fbtk_widget_t *widget, bool map)
|
fbtk_set_mapping(fbtk_widget_t *widget, bool map)
|
||||||
{
|
{
|
||||||
LOG(("setting mapping on %p to %d", widget, map));
|
/* LOG(("setting mapping on %p to %d", widget, map)); */
|
||||||
widget->mapped = map;
|
widget->mapped = map;
|
||||||
if (map) {
|
if (map) {
|
||||||
fbtk_request_redraw(widget);
|
fbtk_request_redraw(widget);
|
||||||
@ -147,7 +154,7 @@ swap_siblings(fbtk_widget_t *lw)
|
|||||||
fbtk_widget_t *after;
|
fbtk_widget_t *after;
|
||||||
|
|
||||||
rw = lw->next;
|
rw = lw->next;
|
||||||
LOG(("Swapping %p with %p", lw, rw));
|
/* LOG(("Swapping %p with %p", lw, rw)); */
|
||||||
before = lw->prev;
|
before = lw->prev;
|
||||||
after = rw->next;
|
after = rw->next;
|
||||||
|
|
||||||
@ -394,7 +401,7 @@ fbtk_get_root_widget(fbtk_widget_t *widget)
|
|||||||
|
|
||||||
/* check root widget was found */
|
/* check root widget was found */
|
||||||
if (widget->type != FB_WIDGET_TYPE_ROOT) {
|
if (widget->type != FB_WIDGET_TYPE_ROOT) {
|
||||||
LOG(("Widget with null parent that is not the root widget!"));
|
/* LOG(("Widget with null parent that is not the root widget!")); */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -525,21 +532,21 @@ fbtk_widget_new(fbtk_widget_t *parent,
|
|||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
LOG(("New widget..."));
|
/* LOG(("New widget...")); */
|
||||||
|
|
||||||
fbtk_widget_t *neww; /* new widget */
|
fbtk_widget_t *neww; /* new widget */
|
||||||
|
|
||||||
if (parent == NULL)
|
if (parent == NULL)
|
||||||
{LOG(("parent null..."));
|
{/* LOG(("parent null...")); */
|
||||||
return NULL;}
|
return NULL;}
|
||||||
|
|
||||||
LOG(("calloc..."));
|
/* LOG(("calloc...")); */
|
||||||
neww = calloc(1, sizeof(fbtk_widget_t));
|
neww = calloc(1, sizeof(fbtk_widget_t));
|
||||||
if (neww == NULL)
|
if (neww == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
LOG(("super!..."));
|
/* LOG(("super!...")); */
|
||||||
LOG(("creating %p %d,%d %d,%d", neww, x, y, width, height));
|
/* LOG(("creating %p %d,%d %d,%d", neww, x, y, width, height)); */
|
||||||
|
|
||||||
/* make new window fit inside parent */
|
/* make new window fit inside parent */
|
||||||
if (width == 0) {
|
if (width == 0) {
|
||||||
@ -561,7 +568,7 @@ fbtk_widget_new(fbtk_widget_t *parent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOG(("using %p %d,%d %d,%d", neww, x, y, width, height));
|
/* LOG(("using %p %d,%d %d,%d", neww, x, y, width, height)); */
|
||||||
/* set values */
|
/* set values */
|
||||||
neww->type = type;
|
neww->type = type;
|
||||||
neww->x = x;
|
neww->x = x;
|
||||||
@ -571,23 +578,23 @@ fbtk_widget_new(fbtk_widget_t *parent,
|
|||||||
|
|
||||||
/* insert into widget heiarchy */
|
/* insert into widget heiarchy */
|
||||||
|
|
||||||
LOG(("into hierarchy..."));
|
/* LOG(("into hierarchy...")); */
|
||||||
neww->parent = parent;
|
neww->parent = parent;
|
||||||
|
|
||||||
if (parent->first_child == NULL) {
|
if (parent->first_child == NULL) {
|
||||||
/* no child widgets yet */
|
/* no child widgets yet */
|
||||||
LOG(("no childs yet..."));
|
/* LOG(("no childs yet...")); */
|
||||||
parent->last_child = neww;
|
parent->last_child = neww;
|
||||||
} else {
|
} else {
|
||||||
/* add new widget to front of sibling chain */
|
/* add new widget to front of sibling chain */
|
||||||
neww->next = parent->first_child;
|
neww->next = parent->first_child;
|
||||||
neww->next->prev = neww;
|
neww->next->prev = neww;
|
||||||
LOG(("n front of sibling..."));
|
/* LOG(("n front of sibling...")); */
|
||||||
}
|
}
|
||||||
parent->first_child = neww;
|
parent->first_child = neww;
|
||||||
|
|
||||||
|
|
||||||
LOG(("Widget OK..."));
|
/* LOG(("Widget OK...")); */
|
||||||
return neww;
|
return neww;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -620,8 +627,8 @@ do_redraw(nsfb_t *nsfb, fbtk_widget_t *widget)
|
|||||||
fbtk_widget_t *cwidget; /* child widget */
|
fbtk_widget_t *cwidget; /* child widget */
|
||||||
|
|
||||||
|
|
||||||
LOG(("DO REDRAW"));
|
/* LOG(("DO REDRAW")); */
|
||||||
//__menuet__debug_out("\n***********\nDO REDRAW\n********\n");
|
//DBG("\n***********\nDO REDRAW\n********\n");
|
||||||
/* check if the widget requires redrawing */
|
/* check if the widget requires redrawing */
|
||||||
if (widget->redraw.needed == true) {
|
if (widget->redraw.needed == true) {
|
||||||
plot_ctx.x0 = fbtk_get_absx(widget) + widget->redraw.x;
|
plot_ctx.x0 = fbtk_get_absx(widget) + widget->redraw.x;
|
||||||
@ -629,13 +636,13 @@ do_redraw(nsfb_t *nsfb, fbtk_widget_t *widget)
|
|||||||
plot_ctx.x1 = plot_ctx.x0 + widget->redraw.width;
|
plot_ctx.x1 = plot_ctx.x0 + widget->redraw.width;
|
||||||
plot_ctx.y1 = plot_ctx.y0 + widget->redraw.height;
|
plot_ctx.y1 = plot_ctx.y0 + widget->redraw.height;
|
||||||
|
|
||||||
LOG(("clipping %p %d,%d %d,%d",
|
/* LOG(("clipping %p %d,%d %d,%d", */
|
||||||
widget, plot_ctx.x0, plot_ctx.y0,
|
/* widget, plot_ctx.x0, plot_ctx.y0, */
|
||||||
plot_ctx.x1, plot_ctx.y1));
|
/* plot_ctx.x1, plot_ctx.y1)); */
|
||||||
if (nsfb_plot_set_clip(nsfb, &plot_ctx) == true) {
|
if (nsfb_plot_set_clip(nsfb, &plot_ctx) == true) {
|
||||||
|
|
||||||
LOG(("POST CALLBACK"));
|
/* LOG(("POST CALLBACK")); */
|
||||||
//__menuet__debug_out("\n***********\nPOST CALLBACK\n********\n");
|
//DBG("\n***********\nPOST CALLBACK\n********\n");
|
||||||
|
|
||||||
fbtk_post_callback(widget, FBTK_CBT_REDRAW);
|
fbtk_post_callback(widget, FBTK_CBT_REDRAW);
|
||||||
}
|
}
|
||||||
@ -643,28 +650,28 @@ do_redraw(nsfb_t *nsfb, fbtk_widget_t *widget)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOG(("DO CHILD"));
|
/* LOG(("DO CHILD")); */
|
||||||
//__menuet__debug_out("\n***********\nDO CHILD\n********\n");
|
//DBG("\n***********\nDO CHILD\n********\n");
|
||||||
|
|
||||||
/* walk the widgets children if child flag is set */
|
/* walk the widgets children if child flag is set */
|
||||||
if (widget->redraw.child) {
|
if (widget->redraw.child) {
|
||||||
LOG(("DO CHILD 2"));
|
/* LOG(("DO CHILD 2")); */
|
||||||
//__menuet__debug_out("\n***********\nDO CHILD 2\n********\n");
|
//DBG("\n***********\nDO CHILD 2\n********\n");
|
||||||
cwidget = widget->last_child;
|
cwidget = widget->last_child;
|
||||||
while (cwidget != NULL) {
|
while (cwidget != NULL) {
|
||||||
LOG(("DO CHILD 3 ZZZ"));
|
/* LOG(("DO CHILD 3 ZZZ")); */
|
||||||
//__menuet__debug_out("\n***********\nDO CHILD 3 ZZZ\n********\n");
|
//DBG("\n***********\nDO CHILD 3 ZZZ\n********\n");
|
||||||
do_redraw(nsfb, cwidget);
|
do_redraw(nsfb, cwidget);
|
||||||
cwidget = cwidget->prev;
|
cwidget = cwidget->prev;
|
||||||
}
|
}
|
||||||
LOG(("DO CHILD 4"));
|
/* LOG(("DO CHILD 4")); */
|
||||||
//__menuet__debug_out("\n***********\nDO CHILD 4\n********\n");
|
//DBG("\n***********\nDO CHILD 4\n********\n");
|
||||||
widget->redraw.child = false;
|
widget->redraw.child = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOG(("SUP"));
|
/* LOG(("SUP")); */
|
||||||
//__menuet__debug_out("\n***********\nFIN REDRAW\n********\n");
|
//DBG("\n***********\nFIN REDRAW\n********\n");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -720,8 +727,8 @@ int
|
|||||||
fbtk_post_callback(fbtk_widget_t *widget, fbtk_callback_type cbt, ...)
|
fbtk_post_callback(fbtk_widget_t *widget, fbtk_callback_type cbt, ...)
|
||||||
{
|
{
|
||||||
|
|
||||||
LOG(("DO POST CALLBACK"));
|
/* LOG(("DO POST CALLBACK")); */
|
||||||
//__menuet__debug_out("\n***********\nDO POST CALLBACK\n********\n");
|
//DBG("\n***********\nDO POST CALLBACK\n********\n");
|
||||||
|
|
||||||
fbtk_callback_info cbi;
|
fbtk_callback_info cbi;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -735,84 +742,84 @@ fbtk_post_callback(fbtk_widget_t *widget, fbtk_callback_type cbt, ...)
|
|||||||
if (widget->mapped == false)
|
if (widget->mapped == false)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
LOG(("DO POST CALLBACK 2"));
|
/* LOG(("DO POST CALLBACK 2")); */
|
||||||
//__menuet__debug_out("\n***********\nDO POST CALLBACK 2\n********\n");
|
//DBG("\n***********\nDO POST CALLBACK 2\n********\n");
|
||||||
|
|
||||||
if (widget->callback[cbt] != NULL) {
|
if (widget->callback[cbt] != NULL) {
|
||||||
cbi.type = cbt;
|
cbi.type = cbt;
|
||||||
cbi.context = widget->callback_context[cbt];
|
cbi.context = widget->callback_context[cbt];
|
||||||
|
|
||||||
LOG(("DO POST CALLBACK 3 - VA"));
|
/* LOG(("DO POST CALLBACK 3 - VA")); */
|
||||||
//__menuet__debug_out("\n***********\nDO POST CALLBACK 3 - VA\n********\n");
|
//DBG("\n***********\nDO POST CALLBACK 3 - VA\n********\n");
|
||||||
|
|
||||||
va_start(ap, cbt);
|
va_start(ap, cbt);
|
||||||
|
|
||||||
switch (cbt) {
|
switch (cbt) {
|
||||||
case FBTK_CBT_SCROLLX:
|
case FBTK_CBT_SCROLLX:
|
||||||
//__menuet__debug_out("\n***********\n scroll x - VA\n********\n");
|
//DBG("\n***********\n scroll x - VA\n********\n");
|
||||||
cbi.x = va_arg(ap,int);
|
cbi.x = va_arg(ap,int);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FBTK_CBT_SCROLLY:
|
case FBTK_CBT_SCROLLY:
|
||||||
//__menuet__debug_out("\n***********\n scroll y - VA\n********\n");
|
//DBG("\n***********\n scroll y - VA\n********\n");
|
||||||
cbi.y = va_arg(ap,int);
|
cbi.y = va_arg(ap,int);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FBTK_CBT_CLICK:
|
case FBTK_CBT_CLICK:
|
||||||
//__menuet__debug_out("\n***********\n click - VA\n********\n");
|
//DBG("\n***********\n click - VA\n********\n");
|
||||||
cbi.event = va_arg(ap, void *);
|
cbi.event = va_arg(ap, void *);
|
||||||
cbi.x = va_arg(ap, int);
|
cbi.x = va_arg(ap, int);
|
||||||
cbi.y = va_arg(ap, int);
|
cbi.y = va_arg(ap, int);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FBTK_CBT_INPUT:
|
case FBTK_CBT_INPUT:
|
||||||
//__menuet__debug_out("\n***********\n input - VA\n********\n");
|
//DBG("\n***********\n input - VA\n********\n");
|
||||||
cbi.event = va_arg(ap, void *);
|
cbi.event = va_arg(ap, void *);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FBTK_CBT_POINTERMOVE:
|
case FBTK_CBT_POINTERMOVE:
|
||||||
//__menuet__debug_out("\n***********\n mouse move - VA\n********\n");
|
//DBG("\n***********\n mouse move - VA\n********\n");
|
||||||
cbi.x = va_arg(ap, int);
|
cbi.x = va_arg(ap, int);
|
||||||
cbi.y = va_arg(ap, int);
|
cbi.y = va_arg(ap, int);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FBTK_CBT_REDRAW:
|
case FBTK_CBT_REDRAW:
|
||||||
//__menuet__debug_out("\n***********\n red - VA\n********\n");
|
//DBG("\n***********\n red - VA\n********\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FBTK_CBT_USER:
|
case FBTK_CBT_USER:
|
||||||
//__menuet__debug_out("\n***********\n user - VA\n********\n");
|
//DBG("\n***********\n user - VA\n********\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FBTK_CBT_STRIP_FOCUS:
|
case FBTK_CBT_STRIP_FOCUS:
|
||||||
//__menuet__debug_out("\n***********\n focus - VA\n********\n");
|
//DBG("\n***********\n focus - VA\n********\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
//__menuet__debug_out("\n***********\n wtf - VA\n********\n");
|
//DBG("\n***********\n wtf - VA\n********\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(("DO POST CALLBACK free"));
|
/* LOG(("DO POST CALLBACK free")); */
|
||||||
//__menuet__debug_out("\n***********\nDO POST CALLBACK free\n********\n");
|
//DBG("\n***********\nDO POST CALLBACK free\n********\n");
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
|
|
||||||
LOG(("DO CALLBACK YEAH"));
|
/* LOG(("DO CALLBACK YEAH")); */
|
||||||
//__menuet__debug_out("\n***********\nWTF IS THIS\n********\n");
|
//DBG("\n***********\nWTF IS THIS\n********\n");
|
||||||
char zupa[64];
|
char zupa[64];
|
||||||
|
|
||||||
sprintf (zupa, "ADDRESS of callback is %x \n",(widget->callback[cbt]));
|
sprintf (zupa, "ADDRESS of callback is %x \n",(widget->callback[cbt]));
|
||||||
//__menuet__debug_out(zupa);
|
//DBG(zupa);
|
||||||
LOG(("ADDRESS of callback is %x \n",(widget->callback[cbt])));
|
/* LOG(("ADDRESS of callback is %x \n",(widget->callback[cbt]))); */
|
||||||
|
|
||||||
ret = (widget->callback[cbt])(widget, &cbi);
|
ret = (widget->callback[cbt])(widget, &cbi);
|
||||||
LOG(("DO CALLBACK YEAH 2"));
|
/* LOG(("DO CALLBACK YEAH 2")); */
|
||||||
//__menuet__debug_out("\n***********\nWTF IS THIS!!!12121\n********\n");
|
//DBG("\n***********\nWTF IS THIS!!!12121\n********\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(("DO POST CALLBACK OK"));
|
/* LOG(("DO POST CALLBACK OK")); */
|
||||||
//__menuet__debug_out("\n***********\nDO POST CALLBACK OK\n********\n");
|
//DBG("\n***********\nDO POST CALLBACK OK\n********\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@ OBJS = fbtk.o event.o fill.o bitmap.o user.o window.o \
|
|||||||
text.o scroll.o osk.o
|
text.o scroll.o osk.o
|
||||||
|
|
||||||
OUTFILE = TEST.o
|
OUTFILE = TEST.o
|
||||||
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include
|
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include -I../../../libnsfb/include/ -I ../../../libcss/include/ -I ../../../libwapcaplet/include/
|
||||||
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
|
||||||
|
@ -40,13 +40,19 @@
|
|||||||
|
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
|
|
||||||
|
#ifdef DBG
|
||||||
|
#undef DBG
|
||||||
|
#endif
|
||||||
|
//#define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */
|
||||||
|
#define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */
|
||||||
|
|
||||||
/* Vertical scroll widget */
|
/* Vertical scroll widget */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
vscroll_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
vscroll_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
||||||
{
|
{
|
||||||
LOG(("REDRAW SCROLL"));
|
LOG(("REDRAW SCROLL"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL");
|
//DBG("REDRAW SCROLL");
|
||||||
int vscroll;
|
int vscroll;
|
||||||
int vpos;
|
int vpos;
|
||||||
|
|
||||||
@ -54,16 +60,16 @@ vscroll_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
nsfb_bbox_t rect;
|
nsfb_bbox_t rect;
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL get rooot"));
|
LOG(("REDRAW SCROLL get rooot"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL get root");
|
//DBG("REDRAW SCROLL get root");
|
||||||
fbtk_widget_t *root = fbtk_get_root_widget(widget);
|
fbtk_widget_t *root = fbtk_get_root_widget(widget);
|
||||||
|
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL get bbox"));
|
LOG(("REDRAW SCROLL get bbox"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL get bbox");
|
//DBG("REDRAW SCROLL get bbox");
|
||||||
fbtk_get_bbox(widget, &bbox);
|
fbtk_get_bbox(widget, &bbox);
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL claim"));
|
LOG(("REDRAW SCROLL claim"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL claim");
|
//DBG("REDRAW SCROLL claim");
|
||||||
nsfb_claim(root->u.root.fb, &bbox);
|
nsfb_claim(root->u.root.fb, &bbox);
|
||||||
|
|
||||||
rect = bbox;
|
rect = bbox;
|
||||||
@ -85,7 +91,7 @@ vscroll_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
nsfb_plot_rectangle(root->u.root.fb, &rect, 1, 0xFF999999, false, false);
|
nsfb_plot_rectangle(root->u.root.fb, &rect, 1, 0xFF999999, false, false);
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL widg"));
|
LOG(("REDRAW SCROLL widg"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL widg");
|
//DBG("REDRAW SCROLL widg");
|
||||||
|
|
||||||
/* scroll bar */
|
/* scroll bar */
|
||||||
if ((widget->u.scroll.maximum - widget->u.scroll.minimum) > 0) {
|
if ((widget->u.scroll.maximum - widget->u.scroll.minimum) > 0) {
|
||||||
@ -107,7 +113,7 @@ vscroll_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
nsfb_plot_rectangle_fill(root->u.root.fb, &rect, widget->bg);
|
nsfb_plot_rectangle_fill(root->u.root.fb, &rect, widget->bg);
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL upd"));
|
LOG(("REDRAW SCROLL upd"));
|
||||||
//__menuet__debug_out("RED upd");
|
//DBG("RED upd");
|
||||||
|
|
||||||
//STUB
|
//STUB
|
||||||
nsfb_update(root->u.root.fb, &bbox); //&bbox
|
nsfb_update(root->u.root.fb, &bbox); //&bbox
|
||||||
@ -120,7 +126,7 @@ vscroll_drag(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAG SCROLL"));
|
LOG(("REDRAG SCROLL"));
|
||||||
//__menuet__debug_out("REDRAG SCROLL");
|
//DBG("REDRAG SCROLL");
|
||||||
int newpos;
|
int newpos;
|
||||||
fbtk_widget_t *scrollw = cbi->context;
|
fbtk_widget_t *scrollw = cbi->context;
|
||||||
|
|
||||||
@ -146,7 +152,7 @@ vscrollu_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAW Ck SCROLL"));
|
LOG(("REDRAW Ck SCROLL"));
|
||||||
//__menuet__debug_out("REDRAW Ck SCROLL");
|
//DBG("REDRAW Ck SCROLL");
|
||||||
int newpos;
|
int newpos;
|
||||||
fbtk_widget_t *scrollw = cbi->context;
|
fbtk_widget_t *scrollw = cbi->context;
|
||||||
|
|
||||||
@ -168,7 +174,7 @@ vscrolld_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL 2"));
|
LOG(("REDRAW SCROLL 2"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 2");
|
//DBG("REDRAW SCROLL 2");
|
||||||
int newpos;
|
int newpos;
|
||||||
fbtk_widget_t *scrollw = cbi->context;
|
fbtk_widget_t *scrollw = cbi->context;
|
||||||
|
|
||||||
@ -189,7 +195,7 @@ static int
|
|||||||
vscrollarea_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
vscrollarea_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
||||||
{
|
{
|
||||||
LOG(("REDRAW SCROLL 3"));
|
LOG(("REDRAW SCROLL 3"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 3");
|
//DBG("REDRAW SCROLL 3");
|
||||||
int vscroll;
|
int vscroll;
|
||||||
int vpos;
|
int vpos;
|
||||||
int newpos;
|
int newpos;
|
||||||
@ -270,7 +276,7 @@ fbtk_create_vscroll(fbtk_widget_t *parent,
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL 4"));
|
LOG(("REDRAW SCROLL 4"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 4");
|
//DBG("REDRAW SCROLL 4");
|
||||||
fbtk_widget_t *neww;
|
fbtk_widget_t *neww;
|
||||||
|
|
||||||
neww = fbtk_widget_new(parent,
|
neww = fbtk_widget_new(parent,
|
||||||
@ -321,7 +327,7 @@ hscroll_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL 5"));
|
LOG(("REDRAW SCROLL 5"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 5");
|
//DBG("REDRAW SCROLL 5");
|
||||||
int hscroll;
|
int hscroll;
|
||||||
int hpos;
|
int hpos;
|
||||||
nsfb_bbox_t bbox;
|
nsfb_bbox_t bbox;
|
||||||
@ -383,7 +389,7 @@ hscrolll_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL 6"));
|
LOG(("REDRAW SCROLL 6"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 6");
|
//DBG("REDRAW SCROLL 6");
|
||||||
int newpos;
|
int newpos;
|
||||||
fbtk_widget_t *scrollw = cbi->context;
|
fbtk_widget_t *scrollw = cbi->context;
|
||||||
|
|
||||||
@ -407,7 +413,7 @@ hscrollr_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL 7"));
|
LOG(("REDRAW SCROLL 7"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 7");
|
//DBG("REDRAW SCROLL 7");
|
||||||
int newpos;
|
int newpos;
|
||||||
fbtk_widget_t *scrollw = cbi->context;
|
fbtk_widget_t *scrollw = cbi->context;
|
||||||
|
|
||||||
@ -429,7 +435,7 @@ hscroll_drag(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL 8"));
|
LOG(("REDRAW SCROLL 8"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 8");
|
//DBG("REDRAW SCROLL 8");
|
||||||
int newpos;
|
int newpos;
|
||||||
fbtk_widget_t *scrollw = cbi->context;
|
fbtk_widget_t *scrollw = cbi->context;
|
||||||
|
|
||||||
@ -455,7 +461,7 @@ hscrollarea_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL 9"));
|
LOG(("REDRAW SCROLL 9"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 9");
|
//DBG("REDRAW SCROLL 9");
|
||||||
int hscroll;
|
int hscroll;
|
||||||
int hpos;
|
int hpos;
|
||||||
int newpos;
|
int newpos;
|
||||||
@ -514,7 +520,7 @@ fbtk_create_hscroll(fbtk_widget_t *parent,
|
|||||||
{
|
{
|
||||||
|
|
||||||
LOG(("REDRAW SCROLL 10"));
|
LOG(("REDRAW SCROLL 10"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 10");
|
//DBG("REDRAW SCROLL 10");
|
||||||
fbtk_widget_t *neww;
|
fbtk_widget_t *neww;
|
||||||
|
|
||||||
neww = fbtk_widget_new(parent,
|
neww = fbtk_widget_new(parent,
|
||||||
@ -565,7 +571,7 @@ fbtk_set_scroll_parameters(fbtk_widget_t *widget,
|
|||||||
int page)
|
int page)
|
||||||
{
|
{
|
||||||
LOG(("REDRAW SCROLL 11"));
|
LOG(("REDRAW SCROLL 11"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 11");
|
//DBG("REDRAW SCROLL 11");
|
||||||
if (widget == NULL)
|
if (widget == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -593,7 +599,7 @@ bool
|
|||||||
fbtk_set_scroll_position(fbtk_widget_t *widget, int position)
|
fbtk_set_scroll_position(fbtk_widget_t *widget, int position)
|
||||||
{
|
{
|
||||||
LOG(("REDRAW SCROLL 12"));
|
LOG(("REDRAW SCROLL 12"));
|
||||||
//__menuet__debug_out("REDRAW SCROLL 12");
|
//DBG("REDRAW SCROLL 12");
|
||||||
if (widget == NULL)
|
if (widget == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ char *url_to_path(const char *url)
|
|||||||
if (res != URL_FUNC_OK) {
|
if (res != URL_FUNC_OK) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
__menuet__debug_out("Calling url_unescape from findfile.c");
|
||||||
res = url_unescape(path, &respath);
|
res = url_unescape(path, &respath);
|
||||||
free(path);
|
free(path);
|
||||||
if (res != URL_FUNC_OK) {
|
if (res != URL_FUNC_OK) {
|
||||||
@ -99,6 +99,7 @@ char *url_to_path(const char *url)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOG(("Findfile url2path: %s", respath));
|
LOG(("Findfile url2path: %s", respath));
|
||||||
|
__menuet__debug_out("returning from url_to_path in findfile.c\n");
|
||||||
return respath;
|
return respath;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +114,7 @@ nsurl *gui_get_resource_url(const char *path)
|
|||||||
|
|
||||||
raw = path_to_url(filepath_sfind(respaths, buf, path));
|
raw = path_to_url(filepath_sfind(respaths, buf, path));
|
||||||
|
|
||||||
LOG(("Findfile gui: %s", raw));
|
LOG(("Findfile gui: path is %s, raw is %s", path, raw));
|
||||||
if (raw != NULL) {
|
if (raw != NULL) {
|
||||||
nsurl_create(raw, &url);
|
nsurl_create(raw, &url);
|
||||||
free(raw);
|
free(raw);
|
||||||
|
@ -41,6 +41,12 @@
|
|||||||
|
|
||||||
#define BOLD_WEIGHT 700
|
#define BOLD_WEIGHT 700
|
||||||
|
|
||||||
|
#ifdef DBG
|
||||||
|
#undef DBG
|
||||||
|
#endif
|
||||||
|
//#define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */
|
||||||
|
#define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */
|
||||||
|
|
||||||
static FT_Library library;
|
static FT_Library library;
|
||||||
static FTC_Manager ft_cmanager;
|
static FTC_Manager ft_cmanager;
|
||||||
static FTC_CMapCache ft_cmap_cache ;
|
static FTC_CMapCache ft_cmap_cache ;
|
||||||
@ -197,7 +203,7 @@ LOG(("Freetype init..."));
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOG(("Freetype cache..."));
|
LOG(("Freetype cache..."));
|
||||||
__menuet__debug_out("Ft cache\n");
|
DBG("Ft cache\n");
|
||||||
/* cache manager initialise */
|
/* cache manager initialise */
|
||||||
error = FTC_Manager_New(library,
|
error = FTC_Manager_New(library,
|
||||||
max_faces,
|
max_faces,
|
||||||
@ -214,7 +220,7 @@ __menuet__debug_out("Ft cache\n");
|
|||||||
|
|
||||||
|
|
||||||
LOG(("Freetype map cache..."));
|
LOG(("Freetype map cache..."));
|
||||||
__menuet__debug_out("Ft map cache\n");
|
DBG("Ft map cache\n");
|
||||||
error = FTC_CMapCache_New(ft_cmanager, &ft_cmap_cache);
|
error = FTC_CMapCache_New(ft_cmanager, &ft_cmap_cache);
|
||||||
|
|
||||||
error = FTC_ImageCache_New(ft_cmanager, &ft_image_cache);
|
error = FTC_ImageCache_New(ft_cmanager, &ft_image_cache);
|
||||||
@ -223,7 +229,7 @@ __menuet__debug_out("Ft map cache\n");
|
|||||||
|
|
||||||
|
|
||||||
LOG(("Freetype load fonts..."));
|
LOG(("Freetype load fonts..."));
|
||||||
__menuet__debug_out("Ft load fonts\n");
|
DBG("Ft load fonts\n");
|
||||||
|
|
||||||
/* Start with the sans serif font */
|
/* Start with the sans serif font */
|
||||||
fb_face = fb_new_face(nsoption_charp(fb_face_sans_serif),
|
fb_face = fb_new_face(nsoption_charp(fb_face_sans_serif),
|
||||||
@ -232,7 +238,7 @@ __menuet__debug_out("Ft load fonts\n");
|
|||||||
if (fb_face == NULL) {
|
if (fb_face == NULL) {
|
||||||
|
|
||||||
LOG(("Freetype load fonts failed due SANS unavailable :(..."));
|
LOG(("Freetype load fonts failed due SANS unavailable :(..."));
|
||||||
__menuet__debug_out("Ft Z:(((\n");
|
DBG("Ft Z:(((\n");
|
||||||
/* The sans serif font is the default and must be found. */
|
/* The sans serif font is the default and must be found. */
|
||||||
LOG(("Could not find the default font\n"));
|
LOG(("Could not find the default font\n"));
|
||||||
FTC_Manager_Done(ft_cmanager);
|
FTC_Manager_Done(ft_cmanager);
|
||||||
@ -243,7 +249,7 @@ __menuet__debug_out("Ft Z:(((\n");
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOG(("Freetype loaded sans.."));
|
LOG(("Freetype loaded sans.."));
|
||||||
__menuet__debug_out("Ft sans loaded:)\n");
|
DBG("Ft sans loaded:)\n");
|
||||||
|
|
||||||
/* Bold sans serif face */
|
/* Bold sans serif face */
|
||||||
fb_face = fb_new_face(nsoption_charp(fb_face_sans_serif_bold),
|
fb_face = fb_new_face(nsoption_charp(fb_face_sans_serif_bold),
|
||||||
@ -346,7 +352,7 @@ __menuet__debug_out("Ft sans loaded:)\n");
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOG(("Freetype fonts ready..."));
|
LOG(("Freetype fonts ready..."));
|
||||||
__menuet__debug_out("Ft ready :)\n");
|
DBG("Ft ready :)\n");
|
||||||
|
|
||||||
/* set the default render mode */
|
/* set the default render mode */
|
||||||
if (nsoption_bool(fb_font_monochrome) == true)
|
if (nsoption_bool(fb_font_monochrome) == true)
|
||||||
|
@ -64,6 +64,12 @@
|
|||||||
|
|
||||||
#define NSFB_TOOLBAR_DEFAULT_LAYOUT "blfsrut"
|
#define NSFB_TOOLBAR_DEFAULT_LAYOUT "blfsrut"
|
||||||
|
|
||||||
|
#ifdef DBG
|
||||||
|
#undef DBG
|
||||||
|
#endif
|
||||||
|
#define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */
|
||||||
|
//#define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */
|
||||||
|
|
||||||
fbtk_widget_t *fbtk;
|
fbtk_widget_t *fbtk;
|
||||||
|
|
||||||
struct gui_window *input_window = NULL;
|
struct gui_window *input_window = NULL;
|
||||||
@ -546,17 +552,17 @@ main(int argc, char** argv)
|
|||||||
z=0x20;
|
z=0x20;
|
||||||
strcpy(p, *z);
|
strcpy(p, *z);
|
||||||
|
|
||||||
__menuet__debug_out("PATH1...\n");
|
DBG("PATH1...\n");
|
||||||
__menuet__debug_out(p);
|
DBG(p);
|
||||||
__menuet__debug_out("PATH1...\n");
|
DBG("PATH1...\n");
|
||||||
|
|
||||||
*(strrchr(p, '/')+1)='\0';
|
*(strrchr(p, '/')+1)='\0';
|
||||||
|
|
||||||
strcpy(strrchr(p, '/')+1, "res/");
|
strcpy(strrchr(p, '/')+1, "res/");
|
||||||
|
|
||||||
__menuet__debug_out("PATH1...\n");
|
DBG("PATH1...\n");
|
||||||
__menuet__debug_out(p);
|
DBG(p);
|
||||||
__menuet__debug_out("PATH1...\n");
|
DBG("PATH1...\n");
|
||||||
|
|
||||||
asm volatile ("int $0x40"::"a"(30), "b"(1), "c"(p));
|
asm volatile ("int $0x40"::"a"(30), "b"(1), "c"(p));
|
||||||
|
|
||||||
@ -578,15 +584,18 @@ main(int argc, char** argv)
|
|||||||
|
|
||||||
options = filepath_find(respaths, "Choices");
|
options = filepath_find(respaths, "Choices");
|
||||||
messages = filepath_find(respaths, "messages");
|
messages = filepath_find(respaths, "messages");
|
||||||
|
LOG(("gui.c : printing kolibri DEBUG messages for BOARD"));
|
||||||
__menuet__debug_out("===path to msg\n");
|
DBG("====================START\n");
|
||||||
__menuet__debug_out(messages);
|
DBG(messages);
|
||||||
__menuet__debug_out("\n===path to msg\n");
|
DBG("====================END\n");
|
||||||
|
|
||||||
//netsurf_init(&argc, &argv, options, "res/messages");
|
//netsurf_init(&argc, &argv, options, "res/messages");
|
||||||
|
LOG(("Calling netsurf_init"));
|
||||||
netsurf_init(&argc, &argv, options, messages);
|
netsurf_init(&argc, &argv, options, messages);
|
||||||
extern HTTP_INIT();
|
extern HTTP_INIT();
|
||||||
|
DBG("Calling HTTP_INIT() for KolibriOS http lib..");
|
||||||
HTTP_INIT();
|
HTTP_INIT();
|
||||||
|
DBG(("NS HTTP_INIT okay"));
|
||||||
LOG(("NS init okay"));
|
LOG(("NS init okay"));
|
||||||
|
|
||||||
free(messages);
|
free(messages);
|
||||||
@ -612,16 +621,14 @@ main(int argc, char** argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_poll(bool active)
|
gui_poll(bool active)
|
||||||
{
|
{
|
||||||
LOG(("GUI poll in"));
|
/* LOG(("GUI poll in")); */
|
||||||
|
|
||||||
nsfb_event_t event;
|
nsfb_event_t event;
|
||||||
int timeout; /* timeout in miliseconds */
|
int timeout; /* timeout in miliseconds */
|
||||||
|
|
||||||
LOG(("schedule run"));
|
/* LOG(("schedule run")); */
|
||||||
/* run the scheduler and discover how long to wait for the next event */
|
/* run the scheduler and discover how long to wait for the next event */
|
||||||
timeout = schedule_run();
|
timeout = schedule_run();
|
||||||
|
|
||||||
@ -629,22 +636,21 @@ LOG(("schedule run"));
|
|||||||
if (active)
|
if (active)
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
|
|
||||||
LOG(("redraw pending"));
|
/* LOG(("redraw pending")); */
|
||||||
/* if redraws are pending do not wait for event, return immediately */
|
/* if redraws are pending do not wait for event, return immediately */
|
||||||
if (fbtk_get_redraw_pending(fbtk))
|
if (fbtk_get_redraw_pending(fbtk))
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
|
|
||||||
LOG(("fbtk event"));
|
|
||||||
if (fbtk_event(fbtk, &event, timeout)) {
|
if (fbtk_event(fbtk, &event, timeout)) {
|
||||||
if ((event.type == NSFB_EVENT_CONTROL) &&
|
if ((event.type == NSFB_EVENT_CONTROL) &&
|
||||||
(event.value.controlcode == NSFB_CONTROL_QUIT))
|
(event.value.controlcode == NSFB_CONTROL_QUIT))
|
||||||
netsurf_quit = true;
|
netsurf_quit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(("fbtk redraw"));
|
/* LOG(("fbtk redraw")); */
|
||||||
fbtk_redraw(fbtk);
|
fbtk_redraw(fbtk);
|
||||||
|
|
||||||
LOG(("GUI poll out success"));
|
/* LOG(("GUI poll out success")); */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -25,6 +25,6 @@ OBJS := gui.o framebuffer.o tree.o schedule.o \
|
|||||||
|
|
||||||
|
|
||||||
OUTFILE = TEST.o
|
OUTFILE = TEST.o
|
||||||
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include
|
CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include -I ../../libnsfb/include/ -I ../../libwapcaplet/include/ -I ../../libcss/include/
|
||||||
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
|
||||||
|
BIN
contrib/network/netsurf/netsurf/objs/_netsurf
Normal file
BIN
contrib/network/netsurf/netsurf/objs/_netsurf
Normal file
Binary file not shown.
8971
contrib/network/netsurf/netsurf/objs/_netsurf.map
Normal file
8971
contrib/network/netsurf/netsurf/objs/_netsurf.map
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -7,7 +7,7 @@ OBJS = about.o base64.o bitmap_fbtk.o bitmap.o bmp.o box_construct.o \
|
|||||||
generics.o gif.o gui.o hand_image.o hashtable.o history_core.o \
|
generics.o gif.o gui.o hand_image.o hashtable.o history_core.o \
|
||||||
history_global_core.o history_image_g.o history_image.o hlcache.o \
|
history_global_core.o history_image_g.o history_image.o hlcache.o \
|
||||||
hotlist.o html_forms.o html_interaction.o html.o html_redraw.o \
|
hotlist.o html_forms.o html_interaction.o html.o html_redraw.o \
|
||||||
html_script.o ico.o image_cache.o imagemap.o image.o internal.o \
|
html_script.o http.o ico.o image_cache.o imagemap.o image.o internal.o \
|
||||||
jpeg.o knockout.o layout.o left_arrow_g.o left_arrow.o libdom.o \
|
jpeg.o knockout.o layout.o left_arrow_g.o left_arrow.o libdom.o \
|
||||||
list.o llcache.o locale.o localhistory.o login.o log.o menu_image.o \
|
list.o llcache.o locale.o localhistory.o login.o log.o menu_image.o \
|
||||||
messages.o mimesniff.o misc.o mouse.o move_image.o netsurf.o none.o \
|
messages.o mimesniff.o misc.o mouse.o move_image.o netsurf.o none.o \
|
||||||
@ -22,10 +22,10 @@ OBJS = about.o base64.o bitmap_fbtk.o bitmap.o bmp.o box_construct.o \
|
|||||||
textplain.o throbber0.o throbber1.o throbber2.o throbber3.o \
|
textplain.o throbber0.o throbber1.o throbber2.o throbber3.o \
|
||||||
throbber4.o throbber5.o throbber6.o throbber7.o throbber8.o \
|
throbber4.o throbber5.o throbber6.o throbber7.o throbber8.o \
|
||||||
thumb_ddesk.o thumbnail.o tree_ddesk.o tree.o tree_url_node.o \
|
thumb_ddesk.o thumbnail.o tree_ddesk.o tree.o tree_url_node.o \
|
||||||
urldb.o url.o useragent.o user.o utf8.o utils.o utils_utils.o \
|
urldb.o url.o useragent.o user.o utf8.o utils.o utils_utils.o\
|
||||||
version.o window.o www-authenticate.o snprintf.o stubs.o divdi3.o
|
version.o window.o www-authenticate.o snprintf.o stubs.o divdi3.o
|
||||||
|
|
||||||
LIBS += -lm -lcurl -liconv -lnsbmp -lnsgif -lpng -ljpeg -lz -lnsfb -lwapcaplet -lcss -ldom -lhubbub -lparserutils -lfreetype2
|
LIBS += -lm -liconv -lnsbmp -lnsgif -lpng -ljpeg -lz -lnsfb -lwapcaplet -lcss -ldom -lhubbub -lparserutils -lfreetype2
|
||||||
|
|
||||||
OUTFILE = _netsurf
|
OUTFILE = _netsurf
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user