-
Notifications
You must be signed in to change notification settings - Fork 7
/
BrowserClientBase.h
162 lines (151 loc) · 10.1 KB
/
BrowserClientBase.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// This file is autogenerated from YapCodeGen. Do not Edit
#ifndef BROWSERCLIENTBASE_H
#define BROWSERCLIENTBASE_H
#include <YapClient.h>
#include <YapPacket.h>
class BrowserClientBase : public YapClient
{
public:
BrowserClientBase(const char* name) : YapClient(name) {}
BrowserClientBase(const char* name, GMainContext *ctxt) : YapClient(name, ctxt) {}
virtual ~BrowserClientBase() {}
// Async commands
void asyncCmdConnect(int32_t pageWidth, int32_t pageHeight, int32_t sharedBufferKey1, int32_t sharedBufferKey2, int32_t sharedBufferSize, int32_t identifier);
void asyncCmdSetWindowSize(int32_t width, int32_t height);
void asyncCmdSetUserAgent(const char* userAgent);
void asyncCmdOpenUrl(const char* url);
void asyncCmdSetHtml(const char* url, const char* body);
void asyncCmdClickAt(int32_t contentX, int32_t contentY, int32_t numClicks, int32_t counter);
void asyncCmdKeyDown(int32_t key, int32_t modifiers, int32_t chr);
void asyncCmdKeyUp(int32_t key, int32_t modifiers, int32_t chr);
void asyncCmdForward();
void asyncCmdBack();
void asyncCmdReload();
void asyncCmdStop();
void asyncCmdPageFocused(bool focused);
void asyncCmdExit();
void asyncCmdCancelDownload(const char* url);
void asyncCmdInterrogateClicks(bool enable);
void asyncCmdZoomSmartCalculateRequest(int32_t pointX, int32_t pointY);
void asyncCmdDragStart(int32_t contentX, int32_t contentY);
void asyncCmdDragProcess(int32_t deltaX, int32_t deltaY);
void asyncCmdDragEnd(int32_t contentX, int32_t contentY);
void asyncCmdSetMinFontSize(int32_t minFontSizePt);
void asyncCmdFindString(const char* str, bool fwd);
void asyncCmdClearSelection();
void asyncCmdClearCache();
void asyncCmdClearCookies();
void asyncCmdPopupMenuSelect(const char* identifier, int32_t selectedIdx);
void asyncCmdSetEnableJavaScript(bool enable);
void asyncCmdSetBlockPopups(bool enable);
void asyncCmdSetAcceptCookies(bool enable);
void asyncCmdMouseEvent(int32_t type, int32_t contentX, int32_t contentY, int32_t detail);
void asyncCmdGestureEvent(int32_t type, int32_t contentX, int32_t contentY, double scale, double rotate, int32_t centerX, int32_t centerY);
void asyncCmdDisconnect();
void asyncCmdInspectUrlAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY);
void asyncCmdGetHistoryState(int32_t queryNum);
void asyncCmdClearHistory();
void asyncCmdSetAppIdentifier(const char* identifier);
void asyncCmdAddUrlRedirect(const char* urlRe, int32_t type, bool redirect, const char* userData);
void asyncCmdSetShowClickedLink(bool enable);
void asyncCmdGetInteractiveNodeRects(int32_t pointX, int32_t pointY);
void asyncCmdIsEditing(int32_t queryNum);
void asyncCmdInsertStringAtCursor(const char* text);
void asyncCmdEnableSelection(int32_t pointX, int32_t pointY);
void asyncCmdDisableSelection();
void asyncCmdSaveImageAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY, const char* dstDir);
void asyncCmdGetImageInfoAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY);
void asyncCmdIsInteractiveAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY);
void asyncCmdGetElementInfoAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY);
void asyncCmdSelectAll();
void asyncCmdCopy(int32_t queryNum);
void asyncCmdPaste();
void asyncCmdCut();
void asyncCmdSetMouseMode(int32_t mode);
void asyncCmdDisableEnhancedViewport(bool disable);
void asyncCmdIgnoreMetaTags(bool ignore);
void asyncCmdSetScrollPosition(int32_t cx, int32_t cy, int32_t cw, int32_t ch);
void asyncCmdPluginSpotlightStart(int32_t cx, int32_t cy, int32_t cw, int32_t ch);
void asyncCmdPluginSpotlightEnd();
void asyncCmdHideSpellingWidget();
void asyncCmdSetNetworkInterface(const char* interfaceName);
void asyncCmdHitTest(int32_t queryNum, int32_t cx, int32_t cy);
void asyncCmdSetVirtualWindowSize(int32_t width, int32_t height);
void asyncCmdPrintFrame(const char* frameName, int32_t lpsJobId, int32_t width, int32_t height, int32_t dpi, bool landscape, bool reverseOrder);
void asyncCmdTouchEvent(int32_t type, int32_t touchCount, int32_t modifiers, const char* touchesJson);
void asyncCmdHoldAt(int32_t contentX, int32_t contentY);
void asyncCmdGetTextCaretBounds(int32_t queryNum);
void asyncCmdFreeze();
void asyncCmdThaw(int32_t sharedBufferKey1, int32_t sharedBufferKey2, int32_t sharedBufferSize);
void asyncCmdReturnBuffer(int32_t sharedBufferKey);
void asyncCmdSetZoomAndScroll(double zoom, int32_t cx, int32_t cy);
void asyncCmdScrollLayer(int32_t id, int32_t deltaX, int32_t deltaY);
void asyncCmdSetDNSServers(const char* servers);
// Sync commands
void syncCmdRenderToFile(const char* filename, int32_t viewX, int32_t viewY, int32_t viewW, int32_t viewH, int32_t& result);
// Raw command
bool sendRawCmd(const char* rawCmd);
protected:
// Async Messages
virtual void msgPainted(int32_t sharedBufferKey) = 0;
virtual void msgReportError(const char* url, int32_t code, const char* msg) = 0;
virtual void msgContentsSizeChanged(int32_t width, int32_t height) = 0;
virtual void msgScrolledTo(int32_t contentsX, int32_t contentsY) = 0;
virtual void msgLoadStarted() = 0;
virtual void msgLoadStopped() = 0;
virtual void msgLoadProgress(int32_t progress) = 0;
virtual void msgLocationChanged(const char* uri, bool canGoBack, bool canGoForward) = 0;
virtual void msgTitleChanged(const char* title) = 0;
virtual void msgTitleAndUrlChanged(const char* title, const char* url, bool canGoBack, bool canGoForward) = 0;
virtual void msgDialogAlert(const char* syncPipePath, const char* msg) = 0;
virtual void msgDialogConfirm(const char* syncPipePath, const char* msg) = 0;
virtual void msgDialogPrompt(const char* syncPipePath, const char* msg, const char* defaultValue) = 0;
virtual void msgDialogUserPassword(const char* syncPipePath, const char* msg) = 0;
virtual void msgActionData(const char* dataType, const char* data) = 0;
virtual void msgDownloadStart(const char* url) = 0;
virtual void msgDownloadProgress(const char* url, int32_t totalSizeSoFar, int32_t totalSize) = 0;
virtual void msgDownloadError(const char* url, const char* errorMsg) = 0;
virtual void msgDownloadFinished(const char* url, const char* mimeType, const char* tmpFilePath) = 0;
virtual void msgLinkClicked(const char* url) = 0;
virtual void msgMimeHandoffUrl(const char* mimeType, const char* url) = 0;
virtual void msgMimeNotSupported(const char* mimeType, const char* url) = 0;
virtual void msgCreatePage(int32_t identifier) = 0;
virtual void msgClickRejected(int32_t counter) = 0;
virtual void msgPopupMenuShow(const char* identifier, const char* menuDataFileName) = 0;
virtual void msgPopupMenuHide(const char* identifier) = 0;
virtual void msgSmartZoomCalculateResponseSimple(int32_t pointX, int32_t pointY, int32_t left, int32_t top, int32_t right, int32_t bottom, int32_t fullscreenSpotlightHandle) = 0;
virtual void msgFailedLoad(const char* domain, int32_t errorCode, const char* failingURL, const char* localizedDescription) = 0;
virtual void msgEditorFocused(bool focused, int32_t fieldType, int32_t fieldActions) = 0;
virtual void msgDidFinishDocumentLoad() = 0;
virtual void msgUpdateGlobalHistory(const char* url, bool reload) = 0;
virtual void msgSetMainDocumentError(const char* domain, int32_t errorCode, const char* failingURL, const char* localizedDescription) = 0;
virtual void msgPurgePage() = 0;
virtual void msgInspectUrlAtPointResponse(int32_t queryNum, bool succeeded, const char* url, const char* desc, int32_t rectWidth, int32_t rectHeight, int32_t rectX, int32_t rectY) = 0;
virtual void msgGetHistoryStateResponse(int32_t queryNum, bool canGoBack, bool canGoForward) = 0;
virtual void msgUrlRedirected(const char* url, const char* userData) = 0;
virtual void msgDialogSSLConfirm(const char* syncPipePath, const char* host, int32_t code, const char* certFile) = 0;
virtual void msgMetaViewportSet(double initialScale, double minimumScale, double maximumScale, int32_t width, int32_t height, bool userScalable) = 0;
virtual void msgHighlightRects(const char* rectsJson) = 0;
virtual void msgIsEditing(int32_t queryNum, bool isEditing) = 0;
virtual void msgSaveImageAtPointResponse(int32_t queryNum, bool succeeded, const char* filepath) = 0;
virtual void msgGetImageInfoAtPointResponse(int32_t queryNum, bool succeeded, const char* baseUri, const char* src, const char* title, const char* altText, int32_t width, int32_t height, const char* mimeType) = 0;
virtual void msgMakePointVisible(int32_t x, int32_t y) = 0;
virtual void msgIsInteractiveAtPointResponse(int32_t queryNum, bool interractive) = 0;
virtual void msgGetElementInfoAtPointResponse(int32_t queryNum, bool succeeded, const char* element, const char* id, const char* name, const char* cname, const char* type, int32_t left, int32_t top, int32_t right, int32_t bottom, bool isEditable) = 0;
virtual void msgCopiedToClipboard() = 0;
virtual void msgPastedFromClipboard() = 0;
virtual void msgRemoveSelectionReticle() = 0;
virtual void msgCopySuccessResponse(int32_t queryNum, bool success) = 0;
virtual void msgPluginFullscreenSpotlightCreate(int32_t spotlightHandle, int32_t rectX, int32_t rectY, int32_t rectWidth, int32_t rectHeight) = 0;
virtual void msgPluginFullscreenSpotlightRemove() = 0;
virtual void msgSpellingWidgetVisibleRectUpdate(int32_t rectX, int32_t rectY, int32_t rectWidth, int32_t rectHeight) = 0;
virtual void msgHitTestResponse(int32_t queryNum, const char* hitTestResultJson) = 0;
virtual void msgAddFlashRects(const char* rectsJson) = 0;
virtual void msgRemoveFlashRects(const char* rectsJson) = 0;
virtual void msgShowPrintDialog() = 0;
virtual void msgGetTextCaretBoundsResponse(int32_t queryNum, int32_t left, int32_t top, int32_t right, int32_t bottom) = 0;
virtual void msgUpdateScrollableLayers(const char* json) = 0;
// Overriden functions
virtual void handleAsyncMessage(YapPacket* msg);
};
#endif // BROWSERCLIENTBASE_H