821 const char*
const* origin_rules =
nullptr,
822 size_t num_origin_rules = 0) = 0;
850 void (*destroy_user_data)(
void*)) = 0;
895 const char*
const* origin_rules =
nullptr,
896 size_t num_origin_rules = 0) = 0;
986 const char*
const* origin_rules =
nullptr,
987 size_t num_origin_rules = 0) = 0;
1014 void (*destroy_user_data)(
void*)) = 0;
1341 virtual String RenderTreeAsString(uint32_t flags = 0) = 0;
1342 virtual String PageSource() = 0;
1343 virtual String DumpAsText(
bool dump_child_frames =
true) = 0;
1344 virtual uint32_t damage_verify_mismatches()
const = 0;
1345 virtual IntRect damage_verify_last_bounds()
const = 0;
1346 virtual RenderTarget damage_verify_render_target()
const = 0;
#define UExport
Definition Exports.h:22
#define ULTRALIGHT_USER_AGENT
Definition Defines.h:132
struct C_JSContext * ULJSContext
Opaque handle to a JavaScript execution context (one page's script world in one View).
Definition View.h:25
struct C_JSAPI * ULJSAPI
Opaque handle to a set of native JavaScript bindings.
Definition View.h:32
struct C_DOMTriggers * ULDOMTriggers
Opaque handle to a set of DOM event listeners and DOM-ready hooks.
Definition View.h:46
struct ULJSAPIInjectionRequest ULJSAPIInjectionRequest
The details an API injection filter decides on.
Definition View.h:60
struct C_DOMDataContext * ULDOMDataContext
Opaque handle to a data-binding context.
Definition View.h:53
struct C_DOMDocument * ULDOMDocument
Opaque handle to a page's DOM document.
Definition View.h:39
struct ULDOMTriggersInjectionRequest ULDOMTriggersInjectionRequest
The details a DOM triggers injection filter decides on.
Definition View.h:67
An RGBA color value in a certain color space (with CSS parsing helpers).
Definition Color.h:69
User-defined interface to handle downloads for a View.
Definition Listener.h:381
Text-editing interface for a View.
Definition Editor.h:332
User-defined interface to handle editing events for a View.
Definition Listener.h:501
Keyboard event representing a change in keyboard state.
Definition KeyEvent.h:25
User-defined interface to handle load-related events for a View.
Definition Listener.h:218
Mouse event representing a change in mouse state.
Definition MouseEvent.h:26
User-defined interface to handle network requests for a View.
Definition Listener.h:471
Interface for all ref-counted objects that will be managed using the RefPtr<> smart pointer.
Definition RefPtr.h:49
A nullable smart pointer.
Definition RefPtr.h:126
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition String.h:31
User-defined pixel buffer surface.
Definition Surface.h:44
Web-page container rendered to an offscreen surface.
Definition View.h:483
virtual String url()=0
Get the URL of the current page loaded into this View, if any.
virtual bool is_transparent() const =0
Whether or not the View supports transparent backgrounds.
virtual bool is_accelerated() const =0
Whether or not the View is GPU-accelerated.
virtual ColorScheme preferred_color_scheme() const =0
The color scheme this View reports to pages.
virtual String EvaluateScript(const String &script, String *exception=nullptr, const String &frame="")=0
Evaluate a string of JavaScript and return the result as a String.
virtual uint32_t height() const =0
Get the height of the View, in pixels.
virtual void LoadHTML(const String &html, const String &url="", bool add_to_history=false)=0
Load a raw string of HTML, the View will navigate to it as a new page.
virtual void Resize(uint32_t width, uint32_t height, double device_scale)=0
Resize View to a certain size and apply a new device scale in the same pass.
virtual void LoadURL(const String &url)=0
Load a URL, the View will navigate to it as a new page.
virtual void set_view_listener(ViewListener *listener)=0
Set a ViewListener to receive callbacks for View-related events.
virtual String title()=0
Get the title of the current page loaded into this View, if any.
virtual bool AttachJSAPI(ULJSAPI api, unsigned flags=0, const char *const *origin_rules=nullptr, size_t num_origin_rules=0)=0
Attach a JavaScript API to this View.
virtual bool is_visible() const =0
Whether or not this View is visible.
virtual bool needs_paint() const =0
Whether or not this View should be repainted during the next call to Renderer::Render().
virtual void Resize(uint32_t width, uint32_t height)=0
Resize View to a certain size.
virtual void SetDOMTriggersInjectionFilter(DOMTriggersInjectionFilter filter, void *user_data, void(*destroy_user_data)(void *))=0
Set a filter that decides whether an attached set of DOM listeners is applied to a page.
virtual void set_compositor_debug_info_enabled(bool enable)=0
Set whether or not to display compositor debug information, specifically:
virtual NetworkListener * network_listener() const =0
Get the active NetworkListener (can be nullptr).
virtual void * JavaScriptVM(const String &frame="")=0
Get a handle to the internal JavaScriptCore VM.
virtual void set_device_scale(double scale)=0
Set the device scale.
virtual RenderTarget render_target()=0
Get the RenderTarget for the View.
virtual void Stop()=0
Stop all page loads.
virtual ViewListener * view_listener() const =0
Get the active ViewListener (can be nullptr).
virtual uint32_t width() const =0
Get the width of the View, in pixels.
virtual void CreateLocalInspectorView()=0
Create an Inspector View to inspect / debug this View locally.
virtual void set_preferred_color_scheme(ColorScheme scheme)=0
Set the color scheme this View reports to pages via the prefers-color-scheme CSS media feature.
virtual EditorListener * editor_listener() const =0
Get the active EditorListener (can be nullptr).
virtual RefPtr< JSContext > LockJSContext(const String &frame="")=0
Acquire the page's JSContext for use with the JavaScriptCore API.
virtual ULJSContext GetJSContext()=0
Get a ULJS handle to the main frame's JavaScript context.
virtual void FireScrollEvent(const ScrollEvent &evt)=0
Fire a scroll event.
virtual void set_download_listener(DownloadListener *listener)=0
Set a DownloadListener to receive callbacks for download-related events.
virtual bool AttachDOMTriggers(ULDOMTriggers triggers, unsigned flags=0, const char *const *origin_rules=nullptr, size_t num_origin_rules=0)=0
Attach a set of DOM listeners to this View.
virtual bool CanGoBack()=0
Whether or not the View can navigate back in history.
virtual void DetachDOMDataContext(ULDOMDataContext context)=0
Detach a data-binding context from this View.
virtual Surface * surface()=0
Get the Surface for the View (native pixel buffer that the CPU renderer draws into).
virtual void set_network_listener(NetworkListener *listener)=0
Set a NetworkListener to receive callbacks for network-related events.
virtual Editor * editor()=0
Get the Editor for the View (executes editing commands against the focused frame).
virtual void FireKeyEvent(const KeyEvent &evt)=0
Fire a keyboard event.
virtual LoadListener * load_listener() const =0
Get the active LoadListener (can be nullptr).
virtual void FireMouseEvent(const MouseEvent &evt)=0
Fire a mouse event.
virtual ULDOMDocument GetDOMDocument()=0
Get a ULDOM handle to the current page's document (main frame).
bool(*)(void *user_data, const ULJSAPIInjectionRequest *request) JSAPIInjectionFilter
Callback that decides whether an attached API's bindings are added to a loading page.
Definition View.h:928
virtual double device_scale() const =0
Get the device scale, ie.
virtual bool CanGoForward()=0
Whether or not the View can navigate forward in history.
virtual bool HasInputFocus()=0
Whether or not the View has an input element with visible keyboard focus (indicated by a blinking car...
virtual bool HasFocus()=0
Whether or not the View has focus.
virtual void CancelDownload(DownloadId id)=0
Cancel an active download.
virtual void GoToHistoryOffset(int offset)=0
Navigate to an arbitrary offset in history.
virtual void DetachDOMTriggers(ULDOMTriggers triggers)=0
Detach a set of DOM listeners from this View.
virtual bool compositor_debug_info_enabled() const =0
Whether or not compositor debug information is enabled.
virtual void Focus()=0
Give focus to the View.
virtual bool AttachDOMDataContext(ULDOMDataContext context, unsigned flags=0, const char *const *origin_rules=nullptr, size_t num_origin_rules=0)=0
Attach a data-binding context to this View.
virtual void DetachJSAPI(ULJSAPI api)=0
Detach a JavaScript API from this View.
virtual bool is_loading()=0
Check if the main frame of the page is currently loading.
virtual void Unfocus()=0
Remove focus from the View.
virtual DownloadListener * download_listener() const =0
Get the active DownloadListener (can be nullptr).
virtual bool is_settled()=0
Check if the page has settled after loading.
virtual void set_max_render_fps(uint32_t fps)=0
Set the maximum rate, in frames per second, at which this View advances its animations and repaints.
virtual uint32_t max_render_fps() const =0
Get the frame-rate cap set for this View, or 0 if none is set.
bool(*)(void *user_data, const ULDOMTriggersInjectionRequest *request) DOMTriggersInjectionFilter
Callback that decides whether an attached set of DOM listeners is applied to a loading page.
Definition View.h:766
virtual void set_editor_listener(EditorListener *listener)=0
Set an EditorListener to receive callbacks for editing-related events.
virtual void GoForward()=0
Navigate forwards in history.
virtual void GoBack()=0
Navigate backwards in history.
virtual void set_display_id(uint32_t id)=0
Set the display id of the View.
virtual void set_visible(bool visible)=0
Set whether or not this View is visible.
virtual void set_needs_paint(bool needs_paint)=0
Set whether or not this View should be repainted during the next call to Renderer::Render().
virtual void set_load_listener(LoadListener *listener)=0
Set a LoadListener to receive callbacks for Load-related events.
virtual uint32_t display_id() const =0
Get the display id of the View.
virtual void SetJSAPIInjectionFilter(JSAPIInjectionFilter filter, void *user_data, void(*destroy_user_data)(void *))=0
Set a filter that decides whether an attached API's bindings are added to a page.
virtual void Reload()=0
Reload current page.
User-defined interface to handle general events for a View.
Definition Listener.h:76
Root namespace for every public Ultralight type, function, and enumeration.
@ Light
Always use the light look.
Definition Window.h:67
@ Dark
Always use the dark look.
Definition Window.h:68
uint32_t DownloadId
A unique ID for a download (see DownloadListener::NextDownloadId()).
Definition Listener.h:359
ClipboardReadPolicy
Which pages may read the clipboard from script.
Definition View.h:89
@ Deny
Refuse every script-initiated clipboard read.
Definition View.h:90
@ Allow
Grant reads from any page.
Definition View.h:92
@ AllowForAppContent
Grant reads from your application's own content only.
Definition View.h:91
ColorScheme
A page color scheme, as reported to pages via the prefers-color-scheme CSS media feature.
Definition View.h:78
@ Auto
Follow the system color scheme set on the Renderer.
Definition View.h:79
@ Auto
The library also hides it the way the OS closes a native menu.
Definition Options.h:29
Integer Rectangle Helper.
Definition Geometry.h:533
Offscreen render target, used when rendering Views via the GPU renderer.
Definition RenderTarget.h:31
View-specific configuration settings.
Definition View.h:100
String font_family_fixed
The default monospace font family (eg, for pre and code).
Definition View.h:357
ClipboardReadPolicy clipboard_read_policy
Policy governing script-initiated clipboard reads (eg, a page's own Paste button calling document....
Definition View.h:274
uint32_t display_id
A user-generated id for the display (monitor, TV, or screen) that this View will be shown on.
Definition View.h:114
String font_family_standard
The default font family (used for text that doesn't set one).
Definition View.h:352
bool match_native_editing_behavior
Whether or not text editing should follow the host OS's native conventions instead of the library's c...
Definition View.h:254
Color background_color
The base color the page renders on before any page styling applies.
Definition View.h:173
String font_family_serif
The default font family for the CSS serif generic.
Definition View.h:362
bool is_transparent
Whether or not this View should support transparency.
Definition View.h:160
uint32_t font_size_default
The default font size, in pixels.
Definition View.h:388
String font_family_fantasy
The default font family for the CSS fantasy generic.
Definition View.h:377
String user_agent
Custom user-agent string.
Definition View.h:400
bool is_accelerated
Whether to render using the GPU renderer (accelerated) or the CPU renderer (unaccelerated).
Definition View.h:135
bool enable_compositor
Whether or not compositing should be enabled.
Definition View.h:221
uint32_t font_size_fixed
The default font size for monospace text (eg, pre and code), in pixels.
Definition View.h:393
bool initial_focus
Whether or not the View should initially have input focus.
Definition View.h:202
bool enable_hidden_timer_throttling
Whether to throttle JavaScript timers (setTimeout / setInterval) while this View is hidden.
Definition View.h:291
bool enable_compositor_debug_info
Whether or not to enable extra compositor debug information, specifically:
Definition View.h:230
bool javascript_can_open_windows_automatically
Whether or not a script can open a window with window.open() without a user gesture.
Definition View.h:334
double initial_device_scale
The initial device scale, ie.
Definition View.h:149
String font_family_pictograph
The default font family for the CSS -webkit-pictograph generic.
Definition View.h:383
uint32_t max_render_fps
The maximum rate, in frames per second, at which this View advances its animations and repaints.
Definition View.h:319
ColorScheme preferred_color_scheme
The color scheme this View reports to pages via the prefers-color-scheme CSS media feature.
Definition View.h:195
bool allow_universal_access_from_file_urls
Whether or not pages loaded from file:/// URLs can access content from any origin.
Definition View.h:344
String font_family_sans_serif
The default font family for the CSS sans-serif generic.
Definition View.h:367
String font_family_cursive
The default font family for the CSS cursive generic.
Definition View.h:372
bool enable_canvas_filters
Whether or not the HTML5 Canvas Filters API (CanvasRenderingContext2D.filter) is enabled.
Definition View.h:238
bool enable_images
Whether or not images should be enabled.
Definition View.h:207
bool enable_javascript
Whether or not JavaScript should be enabled.
Definition View.h:212