Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

2130 lines (1658 sloc) 53.891 kb
// This file is autogenerated from YapCodeGen. Do not Edit
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <glib.h>
#include <BrowserClientBase.h>
void BrowserClientBase::syncCmdRenderToFile(const char* filename, int32_t viewX, int32_t viewY, int32_t viewW, int32_t viewH, int32_t& result)
{
YapPacket* cmd = packetCommand();
YapPacket* reply = packetReply();
(*cmd) << (int16_t) 0x0014; // RenderToFile
(*cmd) << filename;
(*cmd) << viewX;
(*cmd) << viewY;
(*cmd) << viewW;
(*cmd) << viewH;
sendSyncCommand();
(*reply) >> result;
}
void BrowserClientBase::asyncCmdConnect(int32_t pageWidth, int32_t pageHeight, int32_t sharedBufferKey1, int32_t sharedBufferKey2, int32_t sharedBufferSize, int32_t identifier)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1000; // Connect
(*_cmd) << pageWidth;
(*_cmd) << pageHeight;
(*_cmd) << sharedBufferKey1;
(*_cmd) << sharedBufferKey2;
(*_cmd) << sharedBufferSize;
(*_cmd) << identifier;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetWindowSize(int32_t width, int32_t height)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1001; // SetWindowSize
(*_cmd) << width;
(*_cmd) << height;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetUserAgent(const char* userAgent)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1003; // SetUserAgent
(*_cmd) << userAgent;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdOpenUrl(const char* url)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1004; // OpenUrl
(*_cmd) << url;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetHtml(const char* url, const char* body)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1005; // SetHtml
(*_cmd) << url;
(*_cmd) << body;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdClickAt(int32_t contentX, int32_t contentY, int32_t numClicks, int32_t counter)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1007; // ClickAt
(*_cmd) << contentX;
(*_cmd) << contentY;
(*_cmd) << numClicks;
(*_cmd) << counter;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdKeyDown(int32_t key, int32_t modifiers, int32_t chr)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1008; // KeyDown
(*_cmd) << key;
(*_cmd) << modifiers;
(*_cmd) << chr;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdKeyUp(int32_t key, int32_t modifiers, int32_t chr)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1009; // KeyUp
(*_cmd) << key;
(*_cmd) << modifiers;
(*_cmd) << chr;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdForward()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x100A; // Forward
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdBack()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x100B; // Back
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdReload()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x100C; // Reload
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdStop()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x100D; // Stop
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdPageFocused(bool focused)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1010; // PageFocused
(*_cmd) << focused;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdExit()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1011; // Exit
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdCancelDownload(const char* url)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1015; // CancelDownload
(*_cmd) << url;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdInterrogateClicks(bool enable)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1016; // InterrogateClicks
(*_cmd) << enable;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdZoomSmartCalculateRequest(int32_t pointX, int32_t pointY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1017; // ZoomSmartCalculateRequest
(*_cmd) << pointX;
(*_cmd) << pointY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdDragStart(int32_t contentX, int32_t contentY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x101A; // DragStart
(*_cmd) << contentX;
(*_cmd) << contentY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdDragProcess(int32_t deltaX, int32_t deltaY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x101B; // DragProcess
(*_cmd) << deltaX;
(*_cmd) << deltaY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdDragEnd(int32_t contentX, int32_t contentY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x101C; // DragEnd
(*_cmd) << contentX;
(*_cmd) << contentY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetMinFontSize(int32_t minFontSizePt)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1103; // SetMinFontSize
(*_cmd) << minFontSizePt;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdFindString(const char* str, bool fwd)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1104; // FindString
(*_cmd) << str;
(*_cmd) << fwd;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdClearSelection()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1105; // ClearSelection
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdClearCache()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1106; // ClearCache
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdClearCookies()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1107; // ClearCookies
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdPopupMenuSelect(const char* identifier, int32_t selectedIdx)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1108; // PopupMenuSelect
(*_cmd) << identifier;
(*_cmd) << selectedIdx;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetEnableJavaScript(bool enable)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1109; // SetEnableJavaScript
(*_cmd) << enable;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetBlockPopups(bool enable)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x110A; // SetBlockPopups
(*_cmd) << enable;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetAcceptCookies(bool enable)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x110B; // SetAcceptCookies
(*_cmd) << enable;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdMouseEvent(int32_t type, int32_t contentX, int32_t contentY, int32_t detail)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x110C; // MouseEvent
(*_cmd) << type;
(*_cmd) << contentX;
(*_cmd) << contentY;
(*_cmd) << detail;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdGestureEvent(int32_t type, int32_t contentX, int32_t contentY, double scale, double rotate, int32_t centerX, int32_t centerY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x110D; // GestureEvent
(*_cmd) << type;
(*_cmd) << contentX;
(*_cmd) << contentY;
(*_cmd) << scale;
(*_cmd) << rotate;
(*_cmd) << centerX;
(*_cmd) << centerY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdDisconnect()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x110E; // Disconnect
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdInspectUrlAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x110F; // InspectUrlAtPoint
(*_cmd) << queryNum;
(*_cmd) << pointX;
(*_cmd) << pointY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdGetHistoryState(int32_t queryNum)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1111; // GetHistoryState
(*_cmd) << queryNum;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdClearHistory()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1112; // ClearHistory
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetAppIdentifier(const char* identifier)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1113; // SetAppIdentifier
(*_cmd) << identifier;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdAddUrlRedirect(const char* urlRe, int32_t type, bool redirect, const char* userData)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1114; // AddUrlRedirect
(*_cmd) << urlRe;
(*_cmd) << type;
(*_cmd) << redirect;
(*_cmd) << userData;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetShowClickedLink(bool enable)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1115; // SetShowClickedLink
(*_cmd) << enable;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdGetInteractiveNodeRects(int32_t pointX, int32_t pointY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1116; // GetInteractiveNodeRects
(*_cmd) << pointX;
(*_cmd) << pointY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdIsEditing(int32_t queryNum)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1117; // IsEditing
(*_cmd) << queryNum;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdInsertStringAtCursor(const char* text)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1118; // InsertStringAtCursor
(*_cmd) << text;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdEnableSelection(int32_t pointX, int32_t pointY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1119; // EnableSelection
(*_cmd) << pointX;
(*_cmd) << pointY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdDisableSelection()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x111A; // DisableSelection
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSaveImageAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY, const char* dstDir)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x111B; // SaveImageAtPoint
(*_cmd) << queryNum;
(*_cmd) << pointX;
(*_cmd) << pointY;
(*_cmd) << dstDir;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdGetImageInfoAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x111C; // GetImageInfoAtPoint
(*_cmd) << queryNum;
(*_cmd) << pointX;
(*_cmd) << pointY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdIsInteractiveAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x111D; // IsInteractiveAtPoint
(*_cmd) << queryNum;
(*_cmd) << pointX;
(*_cmd) << pointY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdGetElementInfoAtPoint(int32_t queryNum, int32_t pointX, int32_t pointY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x111E; // GetElementInfoAtPoint
(*_cmd) << queryNum;
(*_cmd) << pointX;
(*_cmd) << pointY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSelectAll()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x111F; // SelectAll
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdCopy(int32_t queryNum)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1120; // Copy
(*_cmd) << queryNum;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdPaste()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1121; // Paste
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdCut()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1122; // Cut
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetMouseMode(int32_t mode)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1123; // SetMouseMode
(*_cmd) << mode;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdDisableEnhancedViewport(bool disable)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1124; // DisableEnhancedViewport
(*_cmd) << disable;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdIgnoreMetaTags(bool ignore)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1125; // IgnoreMetaTags
(*_cmd) << ignore;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetScrollPosition(int32_t cx, int32_t cy, int32_t cw, int32_t ch)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1500; // SetScrollPosition
(*_cmd) << cx;
(*_cmd) << cy;
(*_cmd) << cw;
(*_cmd) << ch;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdPluginSpotlightStart(int32_t cx, int32_t cy, int32_t cw, int32_t ch)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1501; // PluginSpotlightStart
(*_cmd) << cx;
(*_cmd) << cy;
(*_cmd) << cw;
(*_cmd) << ch;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdPluginSpotlightEnd()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1502; // PluginSpotlightEnd
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdHideSpellingWidget()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1503; // HideSpellingWidget
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetNetworkInterface(const char* interfaceName)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1504; // SetNetworkInterface
(*_cmd) << interfaceName;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdHitTest(int32_t queryNum, int32_t cx, int32_t cy)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1505; // HitTest
(*_cmd) << queryNum;
(*_cmd) << cx;
(*_cmd) << cy;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetVirtualWindowSize(int32_t width, int32_t height)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1506; // SetVirtualWindowSize
(*_cmd) << width;
(*_cmd) << height;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdPrintFrame(const char* frameName, int32_t lpsJobId, int32_t width, int32_t height, int32_t dpi, bool landscape, bool reverseOrder)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1507; // PrintFrame
(*_cmd) << frameName;
(*_cmd) << lpsJobId;
(*_cmd) << width;
(*_cmd) << height;
(*_cmd) << dpi;
(*_cmd) << landscape;
(*_cmd) << reverseOrder;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdTouchEvent(int32_t type, int32_t touchCount, int32_t modifiers, const char* touchesJson)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1508; // TouchEvent
(*_cmd) << type;
(*_cmd) << touchCount;
(*_cmd) << modifiers;
(*_cmd) << touchesJson;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdHoldAt(int32_t contentX, int32_t contentY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1509; // HoldAt
(*_cmd) << contentX;
(*_cmd) << contentY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdGetTextCaretBounds(int32_t queryNum)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x150a; // GetTextCaretBounds
(*_cmd) << queryNum;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdFreeze()
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x150b; // Freeze
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdThaw(int32_t sharedBufferKey1, int32_t sharedBufferKey2, int32_t sharedBufferSize)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x150c; // Thaw
(*_cmd) << sharedBufferKey1;
(*_cmd) << sharedBufferKey2;
(*_cmd) << sharedBufferSize;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdReturnBuffer(int32_t sharedBufferKey)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x150d; // ReturnBuffer
(*_cmd) << sharedBufferKey;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetZoomAndScroll(double zoom, int32_t cx, int32_t cy)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x150e; // SetZoomAndScroll
(*_cmd) << zoom;
(*_cmd) << cx;
(*_cmd) << cy;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdScrollLayer(int32_t id, int32_t deltaX, int32_t deltaY)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x150f; // ScrollLayer
(*_cmd) << id;
(*_cmd) << deltaX;
(*_cmd) << deltaY;
sendAsyncCommand();
}
void BrowserClientBase::asyncCmdSetDNSServers(const char* servers)
{
YapPacket* _cmd = packetCommand();
(*_cmd) << (int16_t) 0x1510; // SetDNSServers
(*_cmd) << servers;
sendAsyncCommand();
}
bool BrowserClientBase::sendRawCmd(const char* rawCmd)
{
gchar** strSplit = g_strsplit(rawCmd, " ", 0);
int argCount = 0;
while (strSplit[argCount] != 0) argCount++;
if (argCount == 0) return false;
bool matched = false;
if (!matched && (strcmp(strSplit[0], "Connect") == 0)) {
if ((argCount - 1) < 6) return false;
matched = true;
int32_t pageWidth = atol(strSplit[1]);
int32_t pageHeight = atol(strSplit[2]);
int32_t sharedBufferKey1 = atol(strSplit[3]);
int32_t sharedBufferKey2 = atol(strSplit[4]);
int32_t sharedBufferSize = atol(strSplit[5]);
int32_t identifier = atol(strSplit[6]);
asyncCmdConnect(pageWidth, pageHeight, sharedBufferKey1, sharedBufferKey2, sharedBufferSize, identifier);
}
if (!matched && (strcmp(strSplit[0], "SetWindowSize") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
int32_t width = atol(strSplit[1]);
int32_t height = atol(strSplit[2]);
asyncCmdSetWindowSize(width, height);
}
if (!matched && (strcmp(strSplit[0], "SetUserAgent") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
char* userAgent = strSplit[1];
asyncCmdSetUserAgent(userAgent);
}
if (!matched && (strcmp(strSplit[0], "OpenUrl") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
char* url = strSplit[1];
asyncCmdOpenUrl(url);
}
if (!matched && (strcmp(strSplit[0], "SetHtml") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
char* url = strSplit[1];
char* body = strSplit[2];
asyncCmdSetHtml(url, body);
}
if (!matched && (strcmp(strSplit[0], "ClickAt") == 0)) {
if ((argCount - 1) < 4) return false;
matched = true;
int32_t contentX = atol(strSplit[1]);
int32_t contentY = atol(strSplit[2]);
int32_t numClicks = atol(strSplit[3]);
int32_t counter = atol(strSplit[4]);
asyncCmdClickAt(contentX, contentY, numClicks, counter);
}
if (!matched && (strcmp(strSplit[0], "KeyDown") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
int32_t key = strtoul(strSplit[1], NULL, 0);
int32_t modifiers = strtoul(strSplit[2], NULL, 0);
int32_t chr = strtoul(strSplit[3], NULL, 0);
asyncCmdKeyDown(key, modifiers, chr);
}
if (!matched && (strcmp(strSplit[0], "KeyUp") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
int32_t key = strtoul(strSplit[1], NULL, 0);
int32_t modifiers = strtoul(strSplit[2], NULL, 0);
int32_t chr = strtoul(strSplit[3], NULL, 0);
asyncCmdKeyUp(key, modifiers, chr);
}
if (!matched && (strcmp(strSplit[0], "Forward") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdForward();
}
if (!matched && (strcmp(strSplit[0], "Back") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdBack();
}
if (!matched && (strcmp(strSplit[0], "Reload") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdReload();
}
if (!matched && (strcmp(strSplit[0], "Stop") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdStop();
}
if (!matched && (strcmp(strSplit[0], "PageFocused") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
bool focused = (strcasecmp(strSplit[1], "true") == 0);
asyncCmdPageFocused(focused);
}
if (!matched && (strcmp(strSplit[0], "Exit") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdExit();
}
if (!matched && (strcmp(strSplit[0], "CancelDownload") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
char* url = strSplit[1];
asyncCmdCancelDownload(url);
}
if (!matched && (strcmp(strSplit[0], "InterrogateClicks") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
bool enable = (strcasecmp(strSplit[1], "true") == 0);
asyncCmdInterrogateClicks(enable);
}
if (!matched && (strcmp(strSplit[0], "ZoomSmartCalculateRequest") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
int32_t pointX = atol(strSplit[1]);
int32_t pointY = atol(strSplit[2]);
asyncCmdZoomSmartCalculateRequest(pointX, pointY);
}
if (!matched && (strcmp(strSplit[0], "DragStart") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
int32_t contentX = atol(strSplit[1]);
int32_t contentY = atol(strSplit[2]);
asyncCmdDragStart(contentX, contentY);
}
if (!matched && (strcmp(strSplit[0], "DragProcess") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
int32_t deltaX = atol(strSplit[1]);
int32_t deltaY = atol(strSplit[2]);
asyncCmdDragProcess(deltaX, deltaY);
}
if (!matched && (strcmp(strSplit[0], "DragEnd") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
int32_t contentX = atol(strSplit[1]);
int32_t contentY = atol(strSplit[2]);
asyncCmdDragEnd(contentX, contentY);
}
if (!matched && (strcmp(strSplit[0], "SetMinFontSize") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
int32_t minFontSizePt = atol(strSplit[1]);
asyncCmdSetMinFontSize(minFontSizePt);
}
if (!matched && (strcmp(strSplit[0], "FindString") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
char* str = strSplit[1];
bool fwd = (strcasecmp(strSplit[2], "true") == 0);
asyncCmdFindString(str, fwd);
}
if (!matched && (strcmp(strSplit[0], "ClearSelection") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdClearSelection();
}
if (!matched && (strcmp(strSplit[0], "ClearCache") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdClearCache();
}
if (!matched && (strcmp(strSplit[0], "ClearCookies") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdClearCookies();
}
if (!matched && (strcmp(strSplit[0], "PopupMenuSelect") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
char* identifier = strSplit[1];
int32_t selectedIdx = atol(strSplit[2]);
asyncCmdPopupMenuSelect(identifier, selectedIdx);
}
if (!matched && (strcmp(strSplit[0], "SetEnableJavaScript") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
bool enable = (strcasecmp(strSplit[1], "true") == 0);
asyncCmdSetEnableJavaScript(enable);
}
if (!matched && (strcmp(strSplit[0], "SetBlockPopups") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
bool enable = (strcasecmp(strSplit[1], "true") == 0);
asyncCmdSetBlockPopups(enable);
}
if (!matched && (strcmp(strSplit[0], "SetAcceptCookies") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
bool enable = (strcasecmp(strSplit[1], "true") == 0);
asyncCmdSetAcceptCookies(enable);
}
if (!matched && (strcmp(strSplit[0], "MouseEvent") == 0)) {
if ((argCount - 1) < 4) return false;
matched = true;
int32_t type = atol(strSplit[1]);
int32_t contentX = atol(strSplit[2]);
int32_t contentY = atol(strSplit[3]);
int32_t detail = atol(strSplit[4]);
asyncCmdMouseEvent(type, contentX, contentY, detail);
}
if (!matched && (strcmp(strSplit[0], "GestureEvent") == 0)) {
if ((argCount - 1) < 7) return false;
matched = true;
int32_t type = atol(strSplit[1]);
int32_t contentX = atol(strSplit[2]);
int32_t contentY = atol(strSplit[3]);
double scale = strtod(strSplit[4], NULL);
double rotate = strtod(strSplit[5], NULL);
int32_t centerX = atol(strSplit[6]);
int32_t centerY = atol(strSplit[7]);
asyncCmdGestureEvent(type, contentX, contentY, scale, rotate, centerX, centerY);
}
if (!matched && (strcmp(strSplit[0], "Disconnect") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdDisconnect();
}
if (!matched && (strcmp(strSplit[0], "InspectUrlAtPoint") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
int32_t pointX = atol(strSplit[2]);
int32_t pointY = atol(strSplit[3]);
asyncCmdInspectUrlAtPoint(queryNum, pointX, pointY);
}
if (!matched && (strcmp(strSplit[0], "GetHistoryState") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
asyncCmdGetHistoryState(queryNum);
}
if (!matched && (strcmp(strSplit[0], "ClearHistory") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdClearHistory();
}
if (!matched && (strcmp(strSplit[0], "SetAppIdentifier") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
char* identifier = strSplit[1];
asyncCmdSetAppIdentifier(identifier);
}
if (!matched && (strcmp(strSplit[0], "AddUrlRedirect") == 0)) {
if ((argCount - 1) < 4) return false;
matched = true;
char* urlRe = strSplit[1];
int32_t type = atol(strSplit[2]);
bool redirect = (strcasecmp(strSplit[3], "true") == 0);
char* userData = strSplit[4];
asyncCmdAddUrlRedirect(urlRe, type, redirect, userData);
}
if (!matched && (strcmp(strSplit[0], "SetShowClickedLink") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
bool enable = (strcasecmp(strSplit[1], "true") == 0);
asyncCmdSetShowClickedLink(enable);
}
if (!matched && (strcmp(strSplit[0], "GetInteractiveNodeRects") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
int32_t pointX = atol(strSplit[1]);
int32_t pointY = atol(strSplit[2]);
asyncCmdGetInteractiveNodeRects(pointX, pointY);
}
if (!matched && (strcmp(strSplit[0], "IsEditing") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
asyncCmdIsEditing(queryNum);
}
if (!matched && (strcmp(strSplit[0], "InsertStringAtCursor") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
char* text = strSplit[1];
asyncCmdInsertStringAtCursor(text);
}
if (!matched && (strcmp(strSplit[0], "EnableSelection") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
int32_t pointX = atol(strSplit[1]);
int32_t pointY = atol(strSplit[2]);
asyncCmdEnableSelection(pointX, pointY);
}
if (!matched && (strcmp(strSplit[0], "DisableSelection") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdDisableSelection();
}
if (!matched && (strcmp(strSplit[0], "SaveImageAtPoint") == 0)) {
if ((argCount - 1) < 4) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
int32_t pointX = atol(strSplit[2]);
int32_t pointY = atol(strSplit[3]);
char* dstDir = strSplit[4];
asyncCmdSaveImageAtPoint(queryNum, pointX, pointY, dstDir);
}
if (!matched && (strcmp(strSplit[0], "GetImageInfoAtPoint") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
int32_t pointX = atol(strSplit[2]);
int32_t pointY = atol(strSplit[3]);
asyncCmdGetImageInfoAtPoint(queryNum, pointX, pointY);
}
if (!matched && (strcmp(strSplit[0], "IsInteractiveAtPoint") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
int32_t pointX = atol(strSplit[2]);
int32_t pointY = atol(strSplit[3]);
asyncCmdIsInteractiveAtPoint(queryNum, pointX, pointY);
}
if (!matched && (strcmp(strSplit[0], "GetElementInfoAtPoint") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
int32_t pointX = atol(strSplit[2]);
int32_t pointY = atol(strSplit[3]);
asyncCmdGetElementInfoAtPoint(queryNum, pointX, pointY);
}
if (!matched && (strcmp(strSplit[0], "SelectAll") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdSelectAll();
}
if (!matched && (strcmp(strSplit[0], "Copy") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
asyncCmdCopy(queryNum);
}
if (!matched && (strcmp(strSplit[0], "Paste") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdPaste();
}
if (!matched && (strcmp(strSplit[0], "Cut") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdCut();
}
if (!matched && (strcmp(strSplit[0], "SetMouseMode") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
int32_t mode = atol(strSplit[1]);
asyncCmdSetMouseMode(mode);
}
if (!matched && (strcmp(strSplit[0], "DisableEnhancedViewport") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
bool disable = (strcasecmp(strSplit[1], "true") == 0);
asyncCmdDisableEnhancedViewport(disable);
}
if (!matched && (strcmp(strSplit[0], "IgnoreMetaTags") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
bool ignore = (strcasecmp(strSplit[1], "true") == 0);
asyncCmdIgnoreMetaTags(ignore);
}
if (!matched && (strcmp(strSplit[0], "SetScrollPosition") == 0)) {
if ((argCount - 1) < 4) return false;
matched = true;
int32_t cx = atol(strSplit[1]);
int32_t cy = atol(strSplit[2]);
int32_t cw = atol(strSplit[3]);
int32_t ch = atol(strSplit[4]);
asyncCmdSetScrollPosition(cx, cy, cw, ch);
}
if (!matched && (strcmp(strSplit[0], "PluginSpotlightStart") == 0)) {
if ((argCount - 1) < 4) return false;
matched = true;
int32_t cx = atol(strSplit[1]);
int32_t cy = atol(strSplit[2]);
int32_t cw = atol(strSplit[3]);
int32_t ch = atol(strSplit[4]);
asyncCmdPluginSpotlightStart(cx, cy, cw, ch);
}
if (!matched && (strcmp(strSplit[0], "PluginSpotlightEnd") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdPluginSpotlightEnd();
}
if (!matched && (strcmp(strSplit[0], "HideSpellingWidget") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdHideSpellingWidget();
}
if (!matched && (strcmp(strSplit[0], "SetNetworkInterface") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
char* interfaceName = strSplit[1];
asyncCmdSetNetworkInterface(interfaceName);
}
if (!matched && (strcmp(strSplit[0], "HitTest") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
int32_t cx = atol(strSplit[2]);
int32_t cy = atol(strSplit[3]);
asyncCmdHitTest(queryNum, cx, cy);
}
if (!matched && (strcmp(strSplit[0], "SetVirtualWindowSize") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
int32_t width = atol(strSplit[1]);
int32_t height = atol(strSplit[2]);
asyncCmdSetVirtualWindowSize(width, height);
}
if (!matched && (strcmp(strSplit[0], "PrintFrame") == 0)) {
if ((argCount - 1) < 7) return false;
matched = true;
char* frameName = strSplit[1];
int32_t lpsJobId = atol(strSplit[2]);
int32_t width = atol(strSplit[3]);
int32_t height = atol(strSplit[4]);
int32_t dpi = atol(strSplit[5]);
bool landscape = (strcasecmp(strSplit[6], "true") == 0);
bool reverseOrder = (strcasecmp(strSplit[7], "true") == 0);
asyncCmdPrintFrame(frameName, lpsJobId, width, height, dpi, landscape, reverseOrder);
}
if (!matched && (strcmp(strSplit[0], "TouchEvent") == 0)) {
if ((argCount - 1) < 4) return false;
matched = true;
int32_t type = atol(strSplit[1]);
int32_t touchCount = atol(strSplit[2]);
int32_t modifiers = atol(strSplit[3]);
char* touchesJson = strSplit[4];
asyncCmdTouchEvent(type, touchCount, modifiers, touchesJson);
}
if (!matched && (strcmp(strSplit[0], "HoldAt") == 0)) {
if ((argCount - 1) < 2) return false;
matched = true;
int32_t contentX = atol(strSplit[1]);
int32_t contentY = atol(strSplit[2]);
asyncCmdHoldAt(contentX, contentY);
}
if (!matched && (strcmp(strSplit[0], "GetTextCaretBounds") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
int32_t queryNum = atol(strSplit[1]);
asyncCmdGetTextCaretBounds(queryNum);
}
if (!matched && (strcmp(strSplit[0], "Freeze") == 0)) {
if ((argCount - 1) < 0) return false;
matched = true;
asyncCmdFreeze();
}
if (!matched && (strcmp(strSplit[0], "Thaw") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
int32_t sharedBufferKey1 = atol(strSplit[1]);
int32_t sharedBufferKey2 = atol(strSplit[2]);
int32_t sharedBufferSize = atol(strSplit[3]);
asyncCmdThaw(sharedBufferKey1, sharedBufferKey2, sharedBufferSize);
}
if (!matched && (strcmp(strSplit[0], "ReturnBuffer") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
int32_t sharedBufferKey = atol(strSplit[1]);
asyncCmdReturnBuffer(sharedBufferKey);
}
if (!matched && (strcmp(strSplit[0], "SetZoomAndScroll") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
double zoom = strtod(strSplit[1], NULL);
int32_t cx = atol(strSplit[2]);
int32_t cy = atol(strSplit[3]);
asyncCmdSetZoomAndScroll(zoom, cx, cy);
}
if (!matched && (strcmp(strSplit[0], "ScrollLayer") == 0)) {
if ((argCount - 1) < 3) return false;
matched = true;
int32_t id = atol(strSplit[1]);
int32_t deltaX = atol(strSplit[2]);
int32_t deltaY = atol(strSplit[3]);
asyncCmdScrollLayer(id, deltaX, deltaY);
}
if (!matched && (strcmp(strSplit[0], "SetDNSServers") == 0)) {
if ((argCount - 1) < 1) return false;
matched = true;
char* servers = strSplit[1];
asyncCmdSetDNSServers(servers);
}
if (!matched && (strcmp(strSplit[0], "RenderToFile") == 0)) {
if ((argCount - 1) < 5) return false;
matched = true;
char* filename = strSplit[1];
int32_t viewX = atol(strSplit[2]);
int32_t viewY = atol(strSplit[3]);
int32_t viewW = atol(strSplit[4]);
int32_t viewH = atol(strSplit[5]);
int32_t result = 0;
syncCmdRenderToFile(filename, viewX, viewY, viewW, viewH, result);
}
g_strfreev(strSplit);
return matched;
}
void BrowserClientBase::handleAsyncMessage(YapPacket* _msg)
{
int16_t msgValue;
(*_msg) >> msgValue;
switch (msgValue) {
case 0x2000: { // Painted
int32_t sharedBufferKey = 0;
(*_msg) >> sharedBufferKey;
msgPainted(sharedBufferKey);
break;
}
case 0x2001: { // ReportError
char* url = 0;
int32_t code = 0;
char* msg = 0;
(*_msg) >> url;
(*_msg) >> code;
(*_msg) >> msg;
msgReportError(url, code, msg);
free(url);
free(msg);
break;
}
case 0x2002: { // ContentsSizeChanged
int32_t width = 0;
int32_t height = 0;
(*_msg) >> width;
(*_msg) >> height;
msgContentsSizeChanged(width, height);
break;
}
case 0x2004: { // ScrolledTo
int32_t contentsX = 0;
int32_t contentsY = 0;
(*_msg) >> contentsX;
(*_msg) >> contentsY;
msgScrolledTo(contentsX, contentsY);
break;
}
case 0x2005: { // LoadStarted
msgLoadStarted();
break;
}
case 0x2006: { // LoadStopped
msgLoadStopped();
break;
}
case 0x2007: { // LoadProgress
int32_t progress = 0;
(*_msg) >> progress;
msgLoadProgress(progress);
break;
}
case 0x2008: { // LocationChanged
char* uri = 0;
bool canGoBack = 0;
bool canGoForward = 0;
(*_msg) >> uri;
(*_msg) >> canGoBack;
(*_msg) >> canGoForward;
msgLocationChanged(uri, canGoBack, canGoForward);
free(uri);
break;
}
case 0x2009: { // TitleChanged
char* title = 0;
(*_msg) >> title;
msgTitleChanged(title);
free(title);
break;
}
case 0x200A: { // TitleAndUrlChanged
char* title = 0;
char* url = 0;
bool canGoBack = 0;
bool canGoForward = 0;
(*_msg) >> title;
(*_msg) >> url;
(*_msg) >> canGoBack;
(*_msg) >> canGoForward;
msgTitleAndUrlChanged(title, url, canGoBack, canGoForward);
free(title);
free(url);
break;
}
case 0x200B: { // DialogAlert
char* syncPipePath = 0;
char* msg = 0;
(*_msg) >> syncPipePath;
(*_msg) >> msg;
msgDialogAlert(syncPipePath, msg);
free(syncPipePath);
free(msg);
break;
}
case 0x200C: { // DialogConfirm
char* syncPipePath = 0;
char* msg = 0;
(*_msg) >> syncPipePath;
(*_msg) >> msg;
msgDialogConfirm(syncPipePath, msg);
free(syncPipePath);
free(msg);
break;
}
case 0x200D: { // DialogPrompt
char* syncPipePath = 0;
char* msg = 0;
char* defaultValue = 0;
(*_msg) >> syncPipePath;
(*_msg) >> msg;
(*_msg) >> defaultValue;
msgDialogPrompt(syncPipePath, msg, defaultValue);
free(syncPipePath);
free(msg);
free(defaultValue);
break;
}
case 0x200E: { // DialogUserPassword
char* syncPipePath = 0;
char* msg = 0;
(*_msg) >> syncPipePath;
(*_msg) >> msg;
msgDialogUserPassword(syncPipePath, msg);
free(syncPipePath);
free(msg);
break;
}
case 0x200F: { // ActionData
char* dataType = 0;
char* data = 0;
(*_msg) >> dataType;
(*_msg) >> data;
msgActionData(dataType, data);
free(dataType);
free(data);
break;
}
case 0x2010: { // DownloadStart
char* url = 0;
(*_msg) >> url;
msgDownloadStart(url);
free(url);
break;
}
case 0x2011: { // DownloadProgress
char* url = 0;
int32_t totalSizeSoFar = 0;
int32_t totalSize = 0;
(*_msg) >> url;
(*_msg) >> totalSizeSoFar;
(*_msg) >> totalSize;
msgDownloadProgress(url, totalSizeSoFar, totalSize);
free(url);
break;
}
case 0x2012: { // DownloadError
char* url = 0;
char* errorMsg = 0;
(*_msg) >> url;
(*_msg) >> errorMsg;
msgDownloadError(url, errorMsg);
free(url);
free(errorMsg);
break;
}
case 0x2013: { // DownloadFinished
char* url = 0;
char* mimeType = 0;
char* tmpFilePath = 0;
(*_msg) >> url;
(*_msg) >> mimeType;
(*_msg) >> tmpFilePath;
msgDownloadFinished(url, mimeType, tmpFilePath);
free(url);
free(mimeType);
free(tmpFilePath);
break;
}
case 0x2014: { // LinkClicked
char* url = 0;
(*_msg) >> url;
msgLinkClicked(url);
free(url);
break;
}
case 0x2015: { // MimeHandoffUrl
char* mimeType = 0;
char* url = 0;
(*_msg) >> mimeType;
(*_msg) >> url;
msgMimeHandoffUrl(mimeType, url);
free(mimeType);
free(url);
break;
}
case 0x2016: { // MimeNotSupported
char* mimeType = 0;
char* url = 0;
(*_msg) >> mimeType;
(*_msg) >> url;
msgMimeNotSupported(mimeType, url);
free(mimeType);
free(url);
break;
}
case 0x2017: { // CreatePage
int32_t identifier = 0;
(*_msg) >> identifier;
msgCreatePage(identifier);
break;
}
case 0x2018: { // ClickRejected
int32_t counter = 0;
(*_msg) >> counter;
msgClickRejected(counter);
break;
}
case 0x2019: { // PopupMenuShow
char* identifier = 0;
char* menuDataFileName = 0;
(*_msg) >> identifier;
(*_msg) >> menuDataFileName;
msgPopupMenuShow(identifier, menuDataFileName);
free(identifier);
free(menuDataFileName);
break;
}
case 0x201A: { // PopupMenuHide
char* identifier = 0;
(*_msg) >> identifier;
msgPopupMenuHide(identifier);
free(identifier);
break;
}
case 0x201F: { // SmartZoomCalculateResponseSimple
int32_t pointX = 0;
int32_t pointY = 0;
int32_t left = 0;
int32_t top = 0;
int32_t right = 0;
int32_t bottom = 0;
int32_t fullscreenSpotlightHandle = 0;
(*_msg) >> pointX;
(*_msg) >> pointY;
(*_msg) >> left;
(*_msg) >> top;
(*_msg) >> right;
(*_msg) >> bottom;
(*_msg) >> fullscreenSpotlightHandle;
msgSmartZoomCalculateResponseSimple(pointX, pointY, left, top, right, bottom, fullscreenSpotlightHandle);
break;
}
case 0x201C: { // FailedLoad
char* domain = 0;
int32_t errorCode = 0;
char* failingURL = 0;
char* localizedDescription = 0;
(*_msg) >> domain;
(*_msg) >> errorCode;
(*_msg) >> failingURL;
(*_msg) >> localizedDescription;
msgFailedLoad(domain, errorCode, failingURL, localizedDescription);
free(domain);
free(failingURL);
free(localizedDescription);
break;
}
case 0x201D: { // EditorFocused
bool focused = 0;
int32_t fieldType = 0;
int32_t fieldActions = 0;
(*_msg) >> focused;
(*_msg) >> fieldType;
(*_msg) >> fieldActions;
msgEditorFocused(focused, fieldType, fieldActions);
break;
}
case 0x201E: { // DidFinishDocumentLoad
msgDidFinishDocumentLoad();
break;
}
case 0x2020: { // UpdateGlobalHistory
char* url = 0;
bool reload = 0;
(*_msg) >> url;
(*_msg) >> reload;
msgUpdateGlobalHistory(url, reload);
free(url);
break;
}
case 0x2021: { // SetMainDocumentError
char* domain = 0;
int32_t errorCode = 0;
char* failingURL = 0;
char* localizedDescription = 0;
(*_msg) >> domain;
(*_msg) >> errorCode;
(*_msg) >> failingURL;
(*_msg) >> localizedDescription;
msgSetMainDocumentError(domain, errorCode, failingURL, localizedDescription);
free(domain);
free(failingURL);
free(localizedDescription);
break;
}
case 0x2022: { // PurgePage
msgPurgePage();
break;
}
case 0x2023: { // InspectUrlAtPointResponse
int32_t queryNum = 0;
bool succeeded = 0;
char* url = 0;
char* desc = 0;
int32_t rectWidth = 0;
int32_t rectHeight = 0;
int32_t rectX = 0;
int32_t rectY = 0;
(*_msg) >> queryNum;
(*_msg) >> succeeded;
(*_msg) >> url;
(*_msg) >> desc;
(*_msg) >> rectWidth;
(*_msg) >> rectHeight;
(*_msg) >> rectX;
(*_msg) >> rectY;
msgInspectUrlAtPointResponse(queryNum, succeeded, url, desc, rectWidth, rectHeight, rectX, rectY);
free(url);
free(desc);
break;
}
case 0x2024: { // GetHistoryStateResponse
int32_t queryNum = 0;
bool canGoBack = 0;
bool canGoForward = 0;
(*_msg) >> queryNum;
(*_msg) >> canGoBack;
(*_msg) >> canGoForward;
msgGetHistoryStateResponse(queryNum, canGoBack, canGoForward);
break;
}
case 0x2025: { // UrlRedirected
char* url = 0;
char* userData = 0;
(*_msg) >> url;
(*_msg) >> userData;
msgUrlRedirected(url, userData);
free(url);
free(userData);
break;
}
case 0x2026: { // DialogSSLConfirm
char* syncPipePath = 0;
char* host = 0;
int32_t code = 0;
char* certFile = 0;
(*_msg) >> syncPipePath;
(*_msg) >> host;
(*_msg) >> code;
(*_msg) >> certFile;
msgDialogSSLConfirm(syncPipePath, host, code, certFile);
free(syncPipePath);
free(host);
free(certFile);
break;
}
case 0x2027: { // MetaViewportSet
double initialScale = 0;
double minimumScale = 0;
double maximumScale = 0;
int32_t width = 0;
int32_t height = 0;
bool userScalable = 0;
(*_msg) >> initialScale;
(*_msg) >> minimumScale;
(*_msg) >> maximumScale;
(*_msg) >> width;
(*_msg) >> height;
(*_msg) >> userScalable;
msgMetaViewportSet(initialScale, minimumScale, maximumScale, width, height, userScalable);
break;
}
case 0x2028: { // HighlightRects
char* rectsJson = 0;
(*_msg) >> rectsJson;
msgHighlightRects(rectsJson);
free(rectsJson);
break;
}
case 0x2029: { // IsEditing
int32_t queryNum = 0;
bool isEditing = 0;
(*_msg) >> queryNum;
(*_msg) >> isEditing;
msgIsEditing(queryNum, isEditing);
break;
}
case 0x202A: { // SaveImageAtPointResponse
int32_t queryNum = 0;
bool succeeded = 0;
char* filepath = 0;
(*_msg) >> queryNum;
(*_msg) >> succeeded;
(*_msg) >> filepath;
msgSaveImageAtPointResponse(queryNum, succeeded, filepath);
free(filepath);
break;
}
case 0x202B: { // GetImageInfoAtPointResponse
int32_t queryNum = 0;
bool succeeded = 0;
char* baseUri = 0;
char* src = 0;
char* title = 0;
char* altText = 0;
int32_t width = 0;
int32_t height = 0;
char* mimeType = 0;
(*_msg) >> queryNum;
(*_msg) >> succeeded;
(*_msg) >> baseUri;
(*_msg) >> src;
(*_msg) >> title;
(*_msg) >> altText;
(*_msg) >> width;
(*_msg) >> height;
(*_msg) >> mimeType;
msgGetImageInfoAtPointResponse(queryNum, succeeded, baseUri, src, title, altText, width, height, mimeType);
free(baseUri);
free(src);
free(title);
free(altText);
free(mimeType);
break;
}
case 0x202C: { // MakePointVisible
int32_t x = 0;
int32_t y = 0;
(*_msg) >> x;
(*_msg) >> y;
msgMakePointVisible(x, y);
break;
}
case 0x202D: { // IsInteractiveAtPointResponse
int32_t queryNum = 0;
bool interractive = 0;
(*_msg) >> queryNum;
(*_msg) >> interractive;
msgIsInteractiveAtPointResponse(queryNum, interractive);
break;
}
case 0x202E: { // GetElementInfoAtPointResponse
int32_t queryNum = 0;
bool succeeded = 0;
char* element = 0;
char* id = 0;
char* name = 0;
char* cname = 0;
char* type = 0;
int32_t left = 0;
int32_t top = 0;
int32_t right = 0;
int32_t bottom = 0;
bool isEditable = 0;
(*_msg) >> queryNum;
(*_msg) >> succeeded;
(*_msg) >> element;
(*_msg) >> id;
(*_msg) >> name;
(*_msg) >> cname;
(*_msg) >> type;
(*_msg) >> left;
(*_msg) >> top;
(*_msg) >> right;
(*_msg) >> bottom;
(*_msg) >> isEditable;
msgGetElementInfoAtPointResponse(queryNum, succeeded, element, id, name, cname, type, left, top, right, bottom, isEditable);
free(element);
free(id);
free(name);
free(cname);
free(type);
break;
}
case 0x202F: { // CopiedToClipboard
msgCopiedToClipboard();
break;
}
case 0x2030: { // PastedFromClipboard
msgPastedFromClipboard();
break;
}
case 0x2031: { // RemoveSelectionReticle
msgRemoveSelectionReticle();
break;
}
case 0x2032: { // CopySuccessResponse
int32_t queryNum = 0;
bool success = 0;
(*_msg) >> queryNum;
(*_msg) >> success;
msgCopySuccessResponse(queryNum, success);
break;
}
case 0x2033: { // PluginFullscreenSpotlightCreate
int32_t spotlightHandle = 0;
int32_t rectX = 0;
int32_t rectY = 0;
int32_t rectWidth = 0;
int32_t rectHeight = 0;
(*_msg) >> spotlightHandle;
(*_msg) >> rectX;
(*_msg) >> rectY;
(*_msg) >> rectWidth;
(*_msg) >> rectHeight;
msgPluginFullscreenSpotlightCreate(spotlightHandle, rectX, rectY, rectWidth, rectHeight);
break;
}
case 0x2034: { // PluginFullscreenSpotlightRemove
msgPluginFullscreenSpotlightRemove();
break;
}
case 0x2035: { // SpellingWidgetVisibleRectUpdate
int32_t rectX = 0;
int32_t rectY = 0;
int32_t rectWidth = 0;
int32_t rectHeight = 0;
(*_msg) >> rectX;
(*_msg) >> rectY;
(*_msg) >> rectWidth;
(*_msg) >> rectHeight;
msgSpellingWidgetVisibleRectUpdate(rectX, rectY, rectWidth, rectHeight);
break;
}
case 0x2036: { // HitTestResponse
int32_t queryNum = 0;
char* hitTestResultJson = 0;
(*_msg) >> queryNum;
(*_msg) >> hitTestResultJson;
msgHitTestResponse(queryNum, hitTestResultJson);
free(hitTestResultJson);
break;
}
case 0x2037: { // AddFlashRects
char* rectsJson = 0;
(*_msg) >> rectsJson;
msgAddFlashRects(rectsJson);
free(rectsJson);
break;
}
case 0x2038: { // RemoveFlashRects
char* rectsJson = 0;
(*_msg) >> rectsJson;
msgRemoveFlashRects(rectsJson);
free(rectsJson);
break;
}
case 0x2039: { // ShowPrintDialog
msgShowPrintDialog();
break;
}
case 0x203a: { // GetTextCaretBoundsResponse
int32_t queryNum = 0;
int32_t left = 0;
int32_t top = 0;
int32_t right = 0;
int32_t bottom = 0;
(*_msg) >> queryNum;
(*_msg) >> left;
(*_msg) >> top;
(*_msg) >> right;
(*_msg) >> bottom;
msgGetTextCaretBoundsResponse(queryNum, left, top, right, bottom);
break;
}
case 0x203b: { // UpdateScrollableLayers
char* json = 0;
(*_msg) >> json;
msgUpdateScrollableLayers(json);
free(json);
break;
}
default:
fprintf(stderr, "Unknown msg: 0x%04x\n", msgValue);
break;
}
}
Jump to Line
Something went wrong with that request. Please try again.