Update ScriptInstance.h
Fix capitalization, add some TODO comments, add newline
This commit is contained in:
parent
3c23dd77e2
commit
848f6bfdcf
|
@ -13,9 +13,9 @@
|
||||||
class CScriptSystem;
|
class CScriptSystem;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
STATE_STARTED, // initial evaluation & execution
|
STATE_STARTED, // Initial evaluation and execution
|
||||||
STATE_RUNNING, // event loop running with pending events
|
STATE_RUNNING, // Event loop running with pending events
|
||||||
STATE_STOPPED, // no pending events
|
STATE_STOPPED, // No pending events
|
||||||
STATE_INVALID
|
STATE_INVALID
|
||||||
} INSTANCE_STATE;
|
} INSTANCE_STATE;
|
||||||
|
|
||||||
|
@ -32,11 +32,11 @@ class CScriptInstance
|
||||||
OVERLAPPED ovl;
|
OVERLAPPED ovl;
|
||||||
IOEVENTTYPE eventType;
|
IOEVENTTYPE eventType;
|
||||||
HANDLE fd;
|
HANDLE fd;
|
||||||
HANDLE childFd; // accepted socket
|
HANDLE childFd; // Accepted socket
|
||||||
bool bSocket;
|
bool bSocket;
|
||||||
UINT id;
|
UINT id;
|
||||||
void* data;
|
void* data;
|
||||||
DWORD dataLen; // changed to bytes transferred after event is fired
|
DWORD dataLen; // Changed to bytes transferred after event is fired
|
||||||
void* callback;
|
void* callback;
|
||||||
} IOLISTENER;
|
} IOLISTENER;
|
||||||
|
|
||||||
|
@ -122,14 +122,15 @@ private:
|
||||||
|
|
||||||
//static void CALLBACK EvalAsyncCallback(ULONG_PTR evalWait);
|
//static void CALLBACK EvalAsyncCallback(ULONG_PTR evalWait);
|
||||||
|
|
||||||
bool AddFile(const char* path, const char* mode, int* fd); // return fd
|
bool AddFile(const char* path, const char* mode, int* fd); // Return FD
|
||||||
void CloseFile(int fd);
|
void CloseFile(int fd);
|
||||||
FILE* GetFilePointer(int fd);
|
FILE* GetFilePointer(int fd);
|
||||||
void CloseAllFiles();
|
void CloseAllFiles();
|
||||||
|
|
||||||
const char* EvalFile(const char* jsPath);
|
const char* EvalFile(const char* jsPath);
|
||||||
|
|
||||||
// Handle to to dynamically load CancelIoEx for Windows XP compatibility
|
// TODO: fix/remove?
|
||||||
|
// Handle dynamically loading CancelIoEx for Windows XP compatibility
|
||||||
HMODULE m_hKernel;
|
HMODULE m_hKernel;
|
||||||
Dynamic_CancelIoEx m_CancelIoEx;
|
Dynamic_CancelIoEx m_CancelIoEx;
|
||||||
|
|
||||||
|
@ -146,7 +147,7 @@ private:
|
||||||
static duk_ret_t js_ioSockConnect(duk_context*); // async
|
static duk_ret_t js_ioSockConnect(duk_context*); // async
|
||||||
static duk_ret_t js_ioRead(duk_context*); // async
|
static duk_ret_t js_ioRead(duk_context*); // async
|
||||||
static duk_ret_t js_ioWrite(duk_context*); // async
|
static duk_ret_t js_ioWrite(duk_context*); // async
|
||||||
static duk_ret_t js_ioClose(duk_context*); // (fd) ; file or socket
|
static duk_ret_t js_ioClose(duk_context*); // (FD) ; file or socket
|
||||||
static duk_ret_t js_MsgBox(duk_context*); // (message, caption)
|
static duk_ret_t js_MsgBox(duk_context*); // (message, caption)
|
||||||
static duk_ret_t js_AddCallback(duk_context*); // (hookId, callback, tag) ; external events
|
static duk_ret_t js_AddCallback(duk_context*); // (hookId, callback, tag) ; external events
|
||||||
static duk_ret_t js_RemoveCallback(duk_context*); // (callbackId)
|
static duk_ret_t js_RemoveCallback(duk_context*); // (callbackId)
|
||||||
|
@ -177,8 +178,8 @@ private:
|
||||||
static duk_ret_t js_ConsoleClear(duk_context*);
|
static duk_ret_t js_ConsoleClear(duk_context*);
|
||||||
|
|
||||||
static duk_ret_t js_BreakHere(duk_context*);
|
static duk_ret_t js_BreakHere(duk_context*);
|
||||||
static duk_ret_t js_Pause(duk_context*); // () ; pauses emulation
|
static duk_ret_t js_Pause(duk_context*); // () ; Pauses emulation
|
||||||
static duk_ret_t js_ShowCommands(duk_context*); // ([address]) ; shows commands window
|
static duk_ret_t js_ShowCommands(duk_context*); // ([address]) ; Shows commands window
|
||||||
|
|
||||||
static duk_ret_t js_ScreenPrint(duk_context*); // (x, y, text)
|
static duk_ret_t js_ScreenPrint(duk_context*); // (x, y, text)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue