21#ifndef ULTRALIGHT_CAPI_VIEW_H
22#define ULTRALIGHT_CAPI_VIEW_H
377 unsigned int line_number,
unsigned int column_number,
437 ULString error_domain,
int error_code);
446 unsigned long long frame_id,
bool is_main_frame,
ULMessageSource
Definition CAPI_Defines.h:66
struct C_View * ULView
Definition CAPI_Defines.h:52
struct C_String * ULString
Definition CAPI_Defines.h:54
struct C_Session * ULSession
Definition CAPI_Defines.h:50
#define ULExport
Definition CAPI_Defines.h:27
struct C_Surface * ULSurface
Definition CAPI_Defines.h:62
ULMessageLevel
Definition CAPI_Defines.h:80
ULCursor
Definition CAPI_Defines.h:88
struct C_MouseEvent * ULMouseEvent
Definition CAPI_Defines.h:57
struct C_ViewConfig * ULViewConfig
Definition CAPI_Defines.h:51
struct C_ScrollEvent * ULScrollEvent
Definition CAPI_Defines.h:58
struct C_Renderer * ULRenderer
Definition CAPI_Defines.h:49
struct C_KeyEvent * ULKeyEvent
Definition CAPI_Defines.h:56
ULExport unsigned int ulViewGetWidth(ULView view)
Get the width, in pixels.
ULExport void ulViewSetDeviceScale(ULView view, double scale)
Set the device scale.
ULExport void ulViewSetChangeCursorCallback(ULView view, ULChangeCursorCallback callback, void *user_data)
Set callback for when the mouse cursor changes.
ULExport bool ulViewHasFocus(ULView view)
Whether or not the View has focus.
ULExport void ulViewLoadURL(ULView view, ULString url_string)
Load a URL into main frame.
ULExport void ulViewGoBack(ULView view)
Navigate backwards in history.
ULExport void ulViewSetBeginLoadingCallback(ULView view, ULBeginLoadingCallback callback, void *user_data)
Set callback for when the page begins loading a new URL into a frame.
ULExport unsigned int ulViewGetHeight(ULView view)
Get the height, in pixels.
void(* ULBeginLoadingCallback)(void *user_data, ULView caller, unsigned long long frame_id, bool is_main_frame, ULString url)
Definition CAPI_View.h:417
ULExport void ulViewGoForward(ULView view)
Navigate forwards in history.
ULExport void ulViewReload(ULView view)
Reload current page.
ULExport ULString ulViewGetTitle(ULView view)
Get current title.
void(* ULChangeCursorCallback)(void *user_data, ULView caller, ULCursor cursor)
Definition CAPI_View.h:367
ULExport void ulViewLoadHTML(ULView view, ULString html_string)
Load a raw string of HTML.
ULExport JSContextRef ulViewLockJSContext(ULView view)
Acquire the page's JSContext for use with JavaScriptCore API.
void(* ULChangeTitleCallback)(void *user_data, ULView caller, ULString title)
Definition CAPI_View.h:343
ULExport void ulViewConfigSetFontFamilyFixed(ULViewConfig config, ULString font_name)
Set default font-family to use for fixed fonts, eg.
ULExport void ulViewFireMouseEvent(ULView view, ULMouseEvent mouse_event)
Fire a mouse event.
ULExport void ulViewGoToHistoryOffset(ULView view, int offset)
Navigate to arbitrary offset in history.
ULExport ULViewConfig ulCreateViewConfig()
Create view configuration with default values (see <Ultralight/platform/View.h>).
ULExport void ulViewSetFinishLoadingCallback(ULView view, ULFinishLoadingCallback callback, void *user_data)
Set callback for when the page finishes loading a URL into a frame.
ULExport void ulViewFireKeyEvent(ULView view, ULKeyEvent key_event)
Fire a keyboard event.
ULExport void ulDestroyView(ULView view)
Destroy a View.
void(* ULFinishLoadingCallback)(void *user_data, ULView caller, unsigned long long frame_id, bool is_main_frame, ULString url)
Definition CAPI_View.h:426
ULExport bool ulViewCanGoBack(ULView view)
Check if can navigate backwards in history.
ULExport ULView ulCreateView(ULRenderer renderer, unsigned int width, unsigned int height, ULViewConfig view_config, ULSession session)
Create a View with certain size (in pixels).
ULExport void ulViewConfigSetEnableImages(ULViewConfig config, bool enabled)
Set whether images should be enabled (Default = True).
ULExport void ulViewSetNeedsPaint(ULView view, bool needs_paint)
Set whether or not a view should be repainted during the next call to ulRender.
ULExport void ulViewSetChangeURLCallback(ULView view, ULChangeURLCallback callback, void *user_data)
Set callback for when the page URL changes.
ULExport bool ulViewIsTransparent(ULView view)
Whether or not the View supports transparent backgrounds.
ULExport void ulDestroyViewConfig(ULViewConfig config)
Destroy view configuration.
ULExport void ulViewFireScrollEvent(ULView view, ULScrollEvent scroll_event)
Fire a scroll event.
ULExport bool ulViewHasInputFocus(ULView view)
Whether or not the View has an input element with visible keyboard focus (indicated by a blinking car...
ULExport void ulViewSetCreateChildViewCallback(ULView view, ULCreateChildViewCallback callback, void *user_data)
Set callback for when the page wants to create a new View.
ULExport void ulViewSetWindowObjectReadyCallback(ULView view, ULWindowObjectReadyCallback callback, void *user_data)
Set callback for when the JavaScript window object is reset for a new page load.
ULExport void ulViewUnfocus(ULView view)
Remove focus from the View and unfocus any focused input elements.
ULExport void ulViewResize(ULView view, unsigned int width, unsigned int height)
Resize view to a certain width and height (in pixels).
ULExport void ulViewSetFailLoadingCallback(ULView view, ULFailLoadingCallback callback, void *user_data)
Set callback for when an error occurs while loading a URL into a frame.
void(* ULWindowObjectReadyCallback)(void *user_data, ULView caller, unsigned long long frame_id, bool is_main_frame, ULString url)
Definition CAPI_View.h:445
ULExport void ulViewSetChangeTitleCallback(ULView view, ULChangeTitleCallback callback, void *user_data)
Set callback for when the page title changes.
ULExport void ulViewSetCreateInspectorViewCallback(ULView view, ULCreateInspectorViewCallback callback, void *user_data)
Set callback for when the page wants to create a new View to display the local inspector in.
ULExport void ulViewConfigSetFontFamilyStandard(ULViewConfig config, ULString font_name)
Set default font-family to use (Default = Times New Roman).
ULExport bool ulViewGetNeedsPaint(ULView view)
Whether or not a view should be painted during the next call to ulRender.
ULExport void ulViewFocus(ULView view)
Give focus to the View.
void(* ULUpdateHistoryCallback)(void *user_data, ULView caller)
Definition CAPI_View.h:475
ULExport ULSurface ulViewGetSurface(ULView view)
Get the Surface for the View (native pixel buffer that the CPU renderer draws into).
ULExport void ulViewConfigSetUserAgent(ULViewConfig config, ULString agent_string)
Set user agent string (See <Ultralight/platform/Config.h> for the default).
ULExport void ulViewConfigSetInitialFocus(ULViewConfig config, bool is_focused)
Whether or not the View should initially have input focus.
ULExport void ulViewSetUpdateHistoryCallback(ULView view, ULUpdateHistoryCallback callback, void *user_data)
Set callback for when the history (back/forward state) is modified.
ULExport double ulViewGetDeviceScale(ULView view)
Get the device scale, ie.
void(* ULAddConsoleMessageCallback)(void *user_data, ULView caller, ULMessageSource source, ULMessageLevel level, ULString message, unsigned int line_number, unsigned int column_number, ULString source_id)
Definition CAPI_View.h:375
ULExport bool ulViewIsAccelerated(ULView view)
Whether or not the View is GPU-accelerated.
ULExport void ulViewSetChangeTooltipCallback(ULView view, ULChangeTooltipCallback callback, void *user_data)
Set callback for when the tooltip changes (usually result of a mouse hover).
ULExport void ulViewConfigSetEnableJavaScript(ULViewConfig config, bool enabled)
Set whether JavaScript should be enabled (Default = True).
ULExport void ulViewCreateLocalInspectorView(ULView view)
Create an Inspector View to inspect / debug this View locally.
ULExport void ulViewUnlockJSContext(ULView view)
Unlock the page's JSContext after a previous call to ulViewLockJSContext().
ULExport void ulViewConfigSetInitialDeviceScale(ULViewConfig config, double initial_device_scale)
The initial device scale, ie.
ULExport void ulViewSetAddConsoleMessageCallback(ULView view, ULAddConsoleMessageCallback callback, void *user_data)
Set callback for when a message is added to the console (useful for JavaScript / network errors and d...
void(* ULChangeURLCallback)(void *user_data, ULView caller, ULString url)
Definition CAPI_View.h:351
ULExport void ulViewConfigSetIsAccelerated(ULViewConfig config, bool is_accelerated)
Whether to render using the GPU renderer (accelerated) or the CPU renderer (unaccelerated).
ULExport void ulViewConfigSetIsTransparent(ULViewConfig config, bool is_transparent)
Set whether images should be enabled (Default = True).
ULExport void ulViewStop(ULView view)
Stop all page loads.
ULExport bool ulViewIsLoading(ULView view)
Check if the main frame of the page is currrently loading.
ULExport ULString ulViewGetURL(ULView view)
Get current URL.
ULExport ULRenderTarget ulViewGetRenderTarget(ULView view)
Get the RenderTarget for the View.
ULExport void ulViewSetDOMReadyCallback(ULView view, ULDOMReadyCallback callback, void *user_data)
Set callback for when all JavaScript has been parsed and the document is ready.
ULExport void ulViewConfigSetFontFamilySansSerif(ULViewConfig config, ULString font_name)
Set default font-family to use for sans-serif fonts (Default = Arial).
ULView(* ULCreateInspectorViewCallback)(void *user_data, ULView caller, bool is_local, ULString inspected_url)
Definition CAPI_View.h:405
ULExport ULString ulViewEvaluateScript(ULView view, ULString js_string, ULString *exception)
Evaluate a string of JavaScript and return result.
void(* ULChangeTooltipCallback)(void *user_data, ULView caller, ULString tooltip)
Definition CAPI_View.h:359
ULExport bool ulViewCanGoForward(ULView view)
Check if can navigate forwards in history.
ULExport void ulViewConfigSetFontFamilySerif(ULViewConfig config, ULString font_name)
Set default font-family to use for serif fonts (Default = Times New Roman).
void(* ULFailLoadingCallback)(void *user_data, ULView caller, unsigned long long frame_id, bool is_main_frame, ULString url, ULString description, ULString error_domain, int error_code)
Definition CAPI_View.h:435
ULView(* ULCreateChildViewCallback)(void *user_data, ULView caller, ULString opener_url, ULString target_url, bool is_popup, ULIntRect popup_rect)
Definition CAPI_View.h:387
void(* ULDOMReadyCallback)(void *user_data, ULView caller, unsigned long long frame_id, bool is_main_frame, ULString url)
Definition CAPI_View.h:464
const struct OpaqueJSContext * JSContextRef
Definition JSBase.h:43
Definition CAPI_Defines.h:242
Definition CAPI_Defines.h:249