This repository was archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathultralight.h
41 lines (40 loc) · 2.02 KB
/
ultralight.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <Ultralight/CAPI.h>
#include <AppCore/CAPI.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
extern void appUpdateFunction(void*);
extern void viewChangeTitleFunction(void*, ULView, ULString);
extern void viewChangeURLFunction(void*, ULView, ULString);
extern void viewChangeTooltipFunction(void*, ULView, ULString);
extern void viewChangeCursorFunction(void*, ULView, ULCursor);
extern void viewAddConsoleMessageFunction(void*, ULView, ULMessageSource, ULMessageLevel, ULString, unsigned int, unsigned int, ULString);
extern void viewBeginLoadingFunction(void*, ULView);
extern void viewFinishLoadingFunction(void*, ULView);
extern void viewUpdateHistoryFunction(void*, ULView);
extern void viewDOMReadyFunction(void*, ULView);
extern void winCloseFunction(void*);
extern void winResizeFunction(void*, unsigned int, unsigned int);
extern JSValueRef objFunctionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject,
size_t argumentCount, JSValueRef *arguments, JSValueRef* exception);
char * printParams(JSContextRef ctx, JSValueRef *params, size_t count);
void setAppUpdateCallback(ULApp app);
void setViewChangeTitleCallback(ULView view);
void setViewChangeURLCallback(ULView view);
void setViewChangeTooltipCallback(ULView view);
void setViewChangeCursorCallback(ULView view);
void setViewAddConsoleMessageCallback(ULView view);
void setViewBeginLoadingCallback(ULView view);
void setViewFinishLoadingCallback(ULView view);
void setViewUpdateHistoryCallback(ULView view);
void setViewDOMReadyCallback(ULView view);
void setWinCloseCallback(ULWindow win);
void setWinResizeCallback(ULWindow win);
char * strconv(ULString str);
char * evaluateScript(ULView view, ULString script);
JSObjectRef bindScript(ULView view, char* name);
// Supported return types for JS Callback functions
JSValueRef makeJSValueString(ULView view, char * str);
JSValueRef makeJSValueBool(ULView view, bool val);
JSValueRef makeJSValueNum(ULView view, double val);
JSValueRef makeJSValueJSON(ULView view, char * val);