WSCLib SDK 1.0.0
GPU-accelerated video output framework for Windows
Loading...
Searching...
No Matches
wscweb.h
Go to the documentation of this file.
1
11#pragma once
12
13#ifdef WSCWEB_EXPORTS
14#define WSCW_API extern "C" __declspec(dllexport)
15#else
16#define WSCW_API extern "C" __declspec(dllimport)
17#endif
18
19#include <windows.h>
20
23
24#define WSCW_VERSION_MAJOR 1
25#define WSCW_VERSION_MINOR 0
26#define WSCW_VERSION_PATCH 0
27#define WSCW_VERSION_STRING "1.0.0"
28
30typedef struct WSCWVersion
31{
32 int major;
33 int minor;
34 int patch;
35 const char *string;
37
43
45
49
61
63
66
76
83
92
94
97
106WSCW_API int WSCW_CreateBrowser(const char *url, int width, int height);
107
114
116
119
126WSCW_API WSCWResult WSCW_Navigate(int browserId, const char *url);
127
134
141
148
150
153
161WSCW_API WSCWResult WSCW_Resize(int browserId, int width, int height);
162
169WSCW_API WSCWResult WSCW_ExecuteJS(int browserId, const char *code);
170
180WSCW_API WSCWResult WSCW_SetFrameRate(int browserId, int fps);
181
183
186
194
202WSCW_API WSCWResult WSCW_SendMouseMove(int browserId, int x, int y);
203
212WSCW_API WSCWResult WSCW_SendMouseDown(int browserId, WSCWMouseButton button, int x, int y);
213
222WSCW_API WSCWResult WSCW_SendMouseUp(int browserId, WSCWMouseButton button, int x, int y);
223
233WSCW_API WSCWResult WSCW_SendMouseWheel(int browserId, int x, int y, int deltaX, int deltaY);
234
243WSCW_API WSCWResult WSCW_SendKeyEvent(int browserId, int keyCode, int isKeyUp, int modifiers);
244
251WSCW_API WSCWResult WSCW_SendChar(int browserId, int character);
252
254
257
268WSCW_API WSCWResult WSCW_AttachOutput(int browserId, int outputId);
269
276WSCW_API WSCWResult WSCW_DetachOutput(int browserId, int outputId);
277
int WSCW_CreateBrowser(const char *url, int width, int height)
Create an off-screen browser and navigate to a URL.
WSCWResult WSCW_DestroyBrowser(int browserId)
Destroy a browser and free resources.
WSCWResult WSCW_SetFrameRate(int browserId, int fps)
Set the frame rate for off-screen rendering.
WSCWResult WSCW_Resize(int browserId, int width, int height)
Resize the virtual viewport.
WSCWResult WSCW_ExecuteJS(int browserId, const char *code)
Execute JavaScript code in the browser's main frame.
WSCWResult WSCW_Init()
Initialize CEF engine.
void WSCW_DoMessageLoopWork()
Pump CEF message loop.
void WSCW_Shutdown()
Shut down CEF engine and destroy all browsers.
WSCWResult WSCW_SendMouseDown(int browserId, WSCWMouseButton button, int x, int y)
Send a mouse button down event.
WSCWMouseButton
Mouse button identifiers.
Definition wscweb.h:189
WSCWResult WSCW_SendMouseWheel(int browserId, int x, int y, int deltaX, int deltaY)
Send a mouse scroll event.
WSCWResult WSCW_SendMouseMove(int browserId, int x, int y)
Send a mouse move event.
WSCWResult WSCW_SendChar(int browserId, int character)
Send a character input event (for text input).
WSCWResult WSCW_SendKeyEvent(int browserId, int keyCode, int isKeyUp, int modifiers)
Send a key event.
WSCWResult WSCW_SendMouseUp(int browserId, WSCWMouseButton button, int x, int y)
Send a mouse button up event.
@ WSCW_MOUSE_LEFT
Definition wscweb.h:190
@ WSCW_MOUSE_MIDDLE
Definition wscweb.h:191
@ WSCW_MOUSE_RIGHT
Definition wscweb.h:192
WSCWResult WSCW_Navigate(int browserId, const char *url)
Navigate to a new URL.
WSCWResult WSCW_Reload(int browserId)
Reload the current page.
WSCWResult WSCW_GoBack(int browserId)
Navigate back.
WSCWResult WSCW_GoForward(int browserId)
Navigate forward.
WSCWResult WSCW_AttachOutput(int browserId, int outputId)
Attach a WSCLib output to this browser.
WSCWResult WSCW_DetachOutput(int browserId, int outputId)
Detach a WSCLib output from this browser.
WSCWResult
Result codes returned by WSCLibWeb functions.
Definition wscweb.h:52
@ WSCW_ERROR_ALLOC_FAIL
Definition wscweb.h:59
@ WSCW_ERROR_INVALID_ID
Definition wscweb.h:57
@ WSCW_ERROR_INVALID_PARAM
Definition wscweb.h:55
@ WSCW_ERROR_CEF_FAIL
Definition wscweb.h:56
@ WSCW_OK
Definition wscweb.h:53
@ WSCW_ERROR_ALREADY_INIT
Definition wscweb.h:58
@ WSCW_ERROR_NOT_INIT
Definition wscweb.h:54
WSCWVersion WSCW_GetVersion()
Get WSCLibWeb version info.
Version information structure.
Definition wscweb.h:31
const char * string
Definition wscweb.h:35
int patch
Definition wscweb.h:34
int minor
Definition wscweb.h:33
int major
Definition wscweb.h:32
#define WSCW_API
Definition wscweb.h:14