mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
try that again
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4571 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2a030268c5
commit
1f4a0cb80a
2 changed files with 40 additions and 40 deletions
|
@ -1,38 +1,38 @@
|
|||
|
||||
void emscriptenfte_async_wget_data2(const char *url, void *ctx, void (*onload)(void*ctx,void*buf,int sz), void (*onerror)(void*ctx,int code), void (*onprogress)(void*ctx,int prog,int total));
|
||||
|
||||
//filesystem buffers are implemented in javascript so that we are not bound by power-of-two heap limitations quite so much.
|
||||
//also, we can't use emscripten's stdio because it reserves 16m file handles or something.
|
||||
int emscriptenfte_buf_create(void);
|
||||
int emscriptenfte_buf_open(const char *name, int createifneeded);
|
||||
int emscriptenfte_buf_rename(const char *oldname, const char *newname);
|
||||
int emscriptenfte_buf_delete(const char *fname);
|
||||
void emscriptenfte_buf_release(int handle);
|
||||
unsigned int emscriptenfte_buf_getsize(int handle);
|
||||
int emscriptenfte_buf_read(int handle, int offset, void *data, int len);
|
||||
int emscriptenfte_buf_write(int handle, int offset, const void *data, int len);
|
||||
|
||||
//websocket is implemented in javascript because there is no usable C api (emscripten's javascript implementation is shite).
|
||||
int emscriptenfte_ws_connect(const char *url);
|
||||
void emscriptenfte_ws_close(int sockid);
|
||||
int emscriptenfte_ws_cansend(int sockid, int extra, int maxpending);
|
||||
int emscriptenfte_ws_send(int sockid, const void *data, int len);
|
||||
int emscriptenfte_ws_recv(int sockid, void *data, int len);
|
||||
|
||||
//misc stuff for printf replacements
|
||||
void emscriptenfte_alert(const char *msg);
|
||||
void emscriptenfte_print(const char *msg);
|
||||
void emscriptenfte_abortmainloop(const char *caller);
|
||||
|
||||
//avoid all of emscripten's sdl emulation.
|
||||
//this resolves input etc issues.
|
||||
unsigned long emscriptenfte_ticks_ms(void);
|
||||
int emscriptenfte_setupcanvas(
|
||||
int width,
|
||||
int height,
|
||||
void(*Resized)(int newwidth, int newheight),
|
||||
void(*Mouse)(int devid,int abs,float x,float y,float z,float size),
|
||||
void(*Button)(int devid, int down, int mbutton),
|
||||
void(*Keyboard)(int devid, int down, int keycode, int unicode)
|
||||
);
|
||||
|
||||
|
||||
void emscriptenfte_async_wget_data2(const char *url, void *ctx, void (*onload)(void*ctx,void*buf,int sz), void (*onerror)(void*ctx,int code), void (*onprogress)(void*ctx,int prog,int total));
|
||||
|
||||
//filesystem buffers are implemented in javascript so that we are not bound by power-of-two heap limitations quite so much.
|
||||
//also, we can't use emscripten's stdio because it reserves 16m file handles or something.
|
||||
int emscriptenfte_buf_create(void);
|
||||
int emscriptenfte_buf_open(const char *name, int createifneeded);
|
||||
int emscriptenfte_buf_rename(const char *oldname, const char *newname);
|
||||
int emscriptenfte_buf_delete(const char *fname);
|
||||
void emscriptenfte_buf_release(int handle);
|
||||
unsigned int emscriptenfte_buf_getsize(int handle);
|
||||
int emscriptenfte_buf_read(int handle, int offset, void *data, int len);
|
||||
int emscriptenfte_buf_write(int handle, int offset, const void *data, int len);
|
||||
|
||||
//websocket is implemented in javascript because there is no usable C api (emscripten's javascript implementation is shite).
|
||||
int emscriptenfte_ws_connect(const char *url);
|
||||
void emscriptenfte_ws_close(int sockid);
|
||||
int emscriptenfte_ws_cansend(int sockid, int extra, int maxpending);
|
||||
int emscriptenfte_ws_send(int sockid, const void *data, int len);
|
||||
int emscriptenfte_ws_recv(int sockid, void *data, int len);
|
||||
|
||||
//misc stuff for printf replacements
|
||||
void emscriptenfte_alert(const char *msg);
|
||||
void emscriptenfte_print(const char *msg);
|
||||
void emscriptenfte_abortmainloop(const char *caller);
|
||||
|
||||
//avoid all of emscripten's sdl emulation.
|
||||
//this resolves input etc issues.
|
||||
unsigned long emscriptenfte_ticks_ms(void);
|
||||
int emscriptenfte_setupcanvas(
|
||||
int width,
|
||||
int height,
|
||||
void(*Resized)(int newwidth, int newheight),
|
||||
void(*Mouse)(int devid,int abs,float x,float y,float z,float size),
|
||||
void(*Button)(int devid, int down, int mbutton),
|
||||
int(*Keyboard)(int devid, int down, int keycode, int unicode)
|
||||
);
|
||||
|
||||
|
|
|
@ -73,8 +73,8 @@ static int DOM_KeyEvent(int devid, int down, int scan, int uni)
|
|||
//Preventing the browser from leaving the page etc should NOT mean I can no longer get ascii/unicode values, only that the browser stops trying to do something random due to the event.
|
||||
//If you are the person that decreed that this is the holy way, then please castrate yourself now.
|
||||
if (scan < ' ' || scan >= 127)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
static void DOM_ButtonEvent(int devid, int down, int button)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue