-
This commit is contained in:
57
rktwebview_qt/rktwebview.h
Normal file
57
rktwebview_qt/rktwebview.h
Normal file
@@ -0,0 +1,57 @@
|
||||
#ifndef RKTWEBVIEW_H
|
||||
#define RKTWEBVIEW_H
|
||||
|
||||
#include "rktwebview_qt_global.h"
|
||||
|
||||
#define CONTEXT_QUIT -2
|
||||
#define CONTEXT_NIL -1
|
||||
#define CONTEXT_INVALID 0
|
||||
#define CONTEXT_BOUND_EVENT 1
|
||||
#define CONTEXT_WINDOW_RESIZE 2
|
||||
#define CONTEXT_WINDOW_MOVE 3
|
||||
#define CONTEXT_WINDOW_CAN_CLOSE 4
|
||||
#define CONTEXT_WINDOW_CLOSED 5
|
||||
#define CONTEXT_SET_HTML 6
|
||||
#define CONTEXT_NAVIGATE 7
|
||||
#define CONTEXT_EVAL_JS 8
|
||||
#define CONTEXT_OPEN_DEVTOOLS 9
|
||||
#define CONTEXT_CALL_JS 10
|
||||
#define CONTEXT_CMD_CLOSE 11
|
||||
#define CONTEXT_CMD_CREATE_VIEW 12
|
||||
|
||||
extern "C" {
|
||||
|
||||
typedef int rktwebview_t;
|
||||
|
||||
typedef struct {
|
||||
rktwebview_t wv;
|
||||
int context;
|
||||
char *data;
|
||||
} item_t;
|
||||
|
||||
typedef enum {
|
||||
no_result_yet = -1,
|
||||
oke = 0,
|
||||
set_html_failed = 1,
|
||||
set_navigate_failed = 2,
|
||||
eval_js_failed = 3,
|
||||
no_devtools_on_platform = 4,
|
||||
no_delegate_for_context = 5,
|
||||
webview_missing_dependency = 6,
|
||||
webview_canceled = 7,
|
||||
webview_invalid_state = 8,
|
||||
webview_invalid_argument = 9,
|
||||
webview_unspecified = 10,
|
||||
webview_dispatch_failed = 11
|
||||
} result_t;
|
||||
|
||||
RKTWEBVIEW_QT_EXPORT void rkt_webview_init();
|
||||
RKTWEBVIEW_QT_EXPORT void rkt_webview_process_events(int for_ms);
|
||||
RKTWEBVIEW_QT_EXPORT int rkt_webview_create(int parent);
|
||||
RKTWEBVIEW_QT_EXPORT void rkt_webview_close(int wv);
|
||||
RKTWEBVIEW_QT_EXPORT result_t rkt_webview_set_url(int wv, const char *url);
|
||||
RKTWEBVIEW_QT_EXPORT result_t rkt_webview_set_html(int wv, const char *html);
|
||||
|
||||
}
|
||||
|
||||
#endif // RKTWEBVIEW_H
|
||||
Reference in New Issue
Block a user