Go to the source code of this file.
Classes
Typedefs
Functions
BOOL SCAPI
SciterSetCSS (HWINDOW hWndSciter,
LPCBYTE utf8, UINT numBytes, LPCWSTR baseUrl, LPCWSTR mediaType)
VOID SCAPI
SciterGetPPI (HWINDOW hWndSciter, UINT *px, UINT *py)
HWINDOW SCAPI
SciterCreateWindow (UINT creationFlags, LPRECT frame, SciterWindowDelegate *delegate, LPVOID delegateParam, HWINDOW parent)
Typedef Documentation
Function Documentation
Marks DOM object as unused (a.k.a. Release). Get handle of every element's child element.
- Parameters
-
- Returns
- SCDOM_RESULT SCAPI
Application should call this function when it does not need element's handle anymore.
- See also
- Sciter_UseElement()
Definition at line 474 of file sciter-x-api.h.
BOOL SCAPI Sciter_v2V
(
HVM
vm,
BOOL
isolate
)
inline
BOOL SCAPI Sciter_V2v
(
HVM
vm,
)
inline
BOOL SCAPI SciterAppendMasterCSS
(
LPCBYTE
utf8,
UINT
numBytes
)
inline
Append Master style sheet.
- Parameters
-
[in] utf8 LPCBYTE, start of CSS buffer.
[in] numBytes UINT, number of bytes in utf8.
Definition at line 446 of file sciter-x-api.h.
Attach ElementEventProc to the element and subscribe it to events providede by subscription parameter See Sciter::attach_event_handler.
Definition at line 522 of file sciter-x-api.h.
Attach HWINDOW to the element.
- Parameters
-
[in] hwnd HWINDOW, window handle to attach
- Returns
- SCDOM_RESULT SCAPI
Definition at line 543 of file sciter-x-api.h.
BOOL SCAPI SciterCall
(
HWINDOW
hWnd,
LPCSTR
functionName,
UINT
argc,
)
inline
SciterCallMethod - calls behavior specific method.
- Parameters
-
[in] he HELEMENT, element - source of the event.
Definition at line 528 of file sciter-x-api.h.
LPCSTR
name,
UINT
argc,
)
inline
CallScriptingFunction - calls scripting function defined in the namespace of the element (a.k.a. global function).
- Parameters
-
[in] he HELEMENT, element which namespace will be used.
[in] name LPCSTR, name of the method to call.
[in] argv SCITER_VALUE[], vector of arguments.
[in] argc UINT, number of arguments.
[out] retval SCITER_VALUE*, pointer to SCITER_VALUE receiving returning value of the function.
SciterCallScriptingFunction allows to call functions defined on global level of main document or frame loaded in it.
Definition at line 541 of file sciter-x-api.h.
LPCSTR
name,
UINT
argc,
)
inline
CallScriptingMethod - calls scripting method defined for the element.
- Parameters
-
[in] he HELEMENT, element which method will be callled.
[in] name LPCSTR, name of the method to call.
[in] argv SCITER_VALUE[], vector of arguments.
[in] argc UINT, number of arguments.
[out] retval SCITER_VALUE*, pointer to SCITER_VALUE receiving returning value of the function.
Definition at line 540 of file sciter-x-api.h.
LPCWSTR SCAPI SciterClassName
(
)
inline
Get name of Sciter window class.
- Returns
- LPCWSTR, name of Sciter window class. NULL if initialization of the engine failed, Direct2D or DirectWrite are not supported on the OS.
Use this function if you wish to create unicode version of Sciter. The returned name can be used in CreateWindow(Ex)W function. You can use #SciterClassNameT macro.
Definition at line 434 of file sciter-x-api.h.
Create new element as copy of existing element, new element is a full (deep) copy of the element and is disconnected initially from the DOM. Element created with ref_count = 1 thus you must call Sciter_UnuseElement on returned handler.
- Parameters
-
[out] phe
HELEMENT*, variable to receive handle of the new element.
Definition at line 516 of file sciter-x-api.h.
LPWSTR
szUrlBuffer,
UINT
UrlBufferSize
)
inline
Combine given URL with URL of the document element belongs to.
- Parameters
-
[in,out] szUrlBuffer LPWSTR, at input this buffer contains zero-terminated URL to be combined, after function call it contains zero-terminated combined URL
[in] UrlBufferSize UINT, size of the buffer pointed by szUrlBuffer
- Returns
- SCDOM_RESULT SCAPI
This function is used for resolving relative references.
Definition at line 502 of file sciter-x-api.h.
SciterControlGetType - get type of control - type of behavior assigned to the element.
- Parameters
-
[in] he HELEMENT, element.
[out] pType UINT*, pointer to variable receiving control type, for list of values see CTL_TYPE.
Definition at line 544 of file sciter-x-api.h.
UINT
textLength,
)
inline
LPCWSTR
textOrNull,
)
inline
Create new element, the element is disconnected initially from the DOM. Element created with ref_count = 1 thus you must call Sciter_UnuseElement on returned handler.
- Parameters
-
[in] tagname LPCSTR, html tag of the element e.g. "div", "option", etc.
[in] textOrNull LPCWSTR, initial text of the element or NULL. text here is a plain text - method does no parsing.
[out] phe
HELEMENT*, variable to receive handle of the element
Definition at line 515 of file sciter-x-api.h.
UINT
textLength,
)
inline
HWINDOW SCAPI SciterCreateWindow
(
UINT
creationFlags,
LPRECT
frame,
SciterWindowDelegate *
delegate,
LPVOID
delegateParam,
HWINDOW
parent
)
inline
Create sciter window. On Windows returns HWND of either top-level or child window created. On OS X returns NSView* of either top-level window or child view .
- Parameters
-
[in] creationFlags SCITER_CREATE_WINDOW_FLAGS, creation flags.
[in] frame LPRECT, window frame position and size.
[in] delegate SciterWindowDelegate, either partial WinProc implementation or thing implementing NSWindowDelegate protocol.
[in] delegateParam LPVOID, optional param passed to SciterWindowDelegate.
[in] parent HWINDOW, optional parent window.
Definition at line 471 of file sciter-x-api.h.
BOOL SCAPI SciterDataReady
(
HWINDOW
hwnd,
LPCWSTR
uri,
UINT
dataLength
)
inline
This function is used in response to SCN_LOAD_DATA request.
- Parameters
-
[in] hwnd HWINDOW, Sciter window handle.
[in] uri LPCWSTR, URI of the data requested by Sciter.
[in] data LPBYTE, pointer to data buffer.
[in] dataLength UINT, length of the data in bytes.
- Returns
- BOOL, TRUE if Sciter accepts the data or
FALSE if error occured (for example this function was called outside of SCN_LOAD_DATA request).
- Warning
- If used, call of this function MUST be done ONLY while handling SCN_LOAD_DATA request and in the same thread. For asynchronous resource loading use SciterDataReadyAsync
Definition at line 436 of file sciter-x-api.h.
BOOL SCAPI SciterDataReadyAsync
(
HWINDOW
hwnd,
LPCWSTR
uri,
UINT
dataLength,
LPVOID
requestId
)
inline
Use this function outside of SCN_LOAD_DATA request. This function is needed when you you have your own http client implemented in your application.
- Parameters
-
[in] hwnd HWINDOW, Sciter window handle.
[in] uri LPCWSTR, URI of the data requested by Sciter.
[in] data LPBYTE, pointer to data buffer.
[in] dataLength UINT, length of the data in bytes.
- Returns
- BOOL, TRUE if Sciter accepts the data or
FALSE if error occured
Definition at line 437 of file sciter-x-api.h.
Take element out of its container (and DOM tree) and force destruction of all behaviors. Element will be destroyed when its reference counter will become zero
Definition at line 519 of file sciter-x-api.h.
Take element out of its container (and DOM tree). Element will be destroyed when its reference counter will become zero
Definition at line 518 of file sciter-x-api.h.
Attach/Detach ElementEventProc to the element See sciter::event_handler.
Definition at line 521 of file sciter-x-api.h.
BOOL SCAPI SciterEval
(
HWINDOW
hwnd,
LPCWSTR
script,
UINT
scriptLength,
)
inline
LPCWSTR
script,
UINT
scriptLength,
)
inline
Find DOM element by coordinate.
- Parameters
-
[in] hwnd HWINDOW, Sciter window for which you need to find elementz
[in] pt POINT, coordinates, window client area relative.
[out] phe
HELEMENT*, variable to receive found element handle.
- Returns
- SCDOM_RESULT SCAPI
If element was not found then *phe will be set to zero.
Definition at line 477 of file sciter-x-api.h.
BOOL
post,
BOOL *
handled
)
inline
LPCSTR
name,
LPVOID
rcv_param
)
inline
Get value of any element's attribute by name.
- Parameters
-
[in] name LPCSTR, attribute name
[out] p_value LPCWSTR*, will be set to address of the string containing attribute value
- Returns
- SCDOM_RESULT SCAPI
Definition at line 487 of file sciter-x-api.h.
Get number of element's attributes.
- Parameters
-
[out] p_count LPUINT, variable to receive number of element attributes.
- Returns
- SCDOM_RESULT SCAPI
Definition at line 484 of file sciter-x-api.h.
Get number of child elements.
- Parameters
-
[in] he
HELEMENT , element which child elements you need to count
[out] count UINT*, variable to receive number of child elements
- Returns
- SCDOM_RESULT SCAPI
- Example:
- for paragraph defined as
<p>Hello <b>wonderfull</b> world!</p>
count will be set to 1 as the paragraph has only one sub element: <b>wonderfull</b>
Definition at line 478 of file sciter-x-api.h.
Get Element handle by its UID.
- Parameters
-
[in] hwnd HWINDOW, HWINDOW of Sciter window
[in] uid UINT
[out] phe
HELEMENT*, variable to receive HELEMENT handle
- Returns
- SCDOM_RESULT SCAPI
This function retrieves element UID by its handle.
Definition at line 509 of file sciter-x-api.h.
BOOL
outer,
LPVOID
rcv_param
)
inline
Get html representation of the element.
- Parameters
-
[in] outer BOOL, if TRUE will retunr outer HTML otherwise inner.
[in] rcv pointer to function receiving UTF8 encoded HTML.
[in] rcv_param parameter that passed to rcv as it is.
- Returns
- SCDOM_RESULT SCAPI
Definition at line 481 of file sciter-x-api.h.
HWINDOW *
p_hwnd,
BOOL
rootWindow
)
inline
Get HWINDOW of containing window.
- Parameters
-
[out] p_hwnd HWINDOW*, variable to receive window handle
[in] rootWindow
BOOL, handle of which window to get:
- TRUE - Sciter window
- FALSE - nearest parent element having overflow:auto or :scroll
- Returns
- SCDOM_RESULT SCAPI
Definition at line 501 of file sciter-x-api.h.
Get element index.
- Parameters
-
[out] p_index LPUINT, variable to receive number of the element among parent element's subelements.
- Returns
- SCDOM_RESULT SCAPI
Definition at line 490 of file sciter-x-api.h.
INT
forWidth,
INT *
pHeight
)
inline
SciterGetElementIntrinsicHeight - get min-intrinsic height of the element calculated for forWidth.
- Parameters
-
[in] he HELEMENT, element.
[in] forWidth INT*, width to calculate intrinsic height for.
[out] pHeight INT*, calculated min-intrinsic height.
Definition at line 534 of file sciter-x-api.h.
INT *
pMinWidth,
INT *
pMaxWidth
)
inline
SciterGetElementIntrinsicWidths - get min-intrinsic and max-intrinsic widths of the element.
- Parameters
-
[in] he HELEMENT, element.
[out] pMinWidth INT*, calculated min-intrinsic width.
[out] pMaxWidth INT*, calculated max-intrinsic width.
Definition at line 533 of file sciter-x-api.h.
LPRECT
p_location,
UINT
areas
)
inline
SciterGetElementNamespace - get namespace of document of the DOM element.
- Parameters
-
[in] he HELEMENT, element which expando will be retrieved.
[out] pval tiscript::value*, pointer to tiscript::value that will get reference to the namespace scripting object.
ATTN!: if you plan to store the reference or use it inside code that calls script VM functions then you should use tiscript::pinned holder for the value.
Definition at line 549 of file sciter-x-api.h.
UINT *
pstateBits
)
inline
Get/set state bits, stateBits*** accept or'ed values above
Definition at line 513 of file sciter-x-api.h.
LPVOID
rcv_param
)
inline
Get inner text of the element as LPWSTR (utf16 words).
- Parameters
-
[out] utf16words pointer to byte address receiving UTF16 encoded plain text
- Returns
- SCDOM_RESULT SCAPI OBSOLETE! use SciterGetElementTextCB instead Get inner text of the element as LPCWSTR (utf16 words).
- Parameters
-
[in] rcv pointer to the function receiving UTF16 encoded plain text
[in] rcv_param param passed that passed to LPCWSTR_RECEIVER "as is"
- Returns
- SCDOM_RESULT SCAPI
Definition at line 482 of file sciter-x-api.h.
Get element's type.
- Parameters
-
[out] p_type LPCSTR*, receives name of the element type.
- Returns
- SCDOM_RESULT SCAPI
- Example:
- For <div> tag p_type will be set to "div".
Definition at line 491 of file sciter-x-api.h.
LPVOID
rcv_param
)
inline
Get element's type.
- Parameters
-
[out] rcv LPCSTR_RECEIVER, receives name of the element type.
[out] rcv_param LPVOID, parameter passed as it is to the receiver.
- Returns
- SCDOM_RESULT SCAPI
Definition at line 492 of file sciter-x-api.h.
Element UID support functions.
Element UID is unique identifier of the DOM element. UID is suitable for storing it in structures associated with the view/document. Access to the element using HELEMENT is more effective but table space of handles is limited. It is not recommended to store HELEMENT handles between function calls. Get Element UID.
- Parameters
-
[out] puid UINT*, variable to receive UID of the element.
- Returns
- SCDOM_RESULT SCAPI
This function retrieves element UID by its handle.
Definition at line 508 of file sciter-x-api.h.
BOOL
forceCreation
)
inline
SciterGetExpando - get 'expando' of the element. 'expando' is a scripting object (of class Element) that is assigned to the DOM element. 'expando' could be null as they are created on demand by script.
- Parameters
-
[in] he HELEMENT, element which expando will be retrieved.
[out] pval
VALUE*, pointer to
VALUE that will get value of type T_OBJECT/UT_OBJECT_NATIVE or null.
[in] forceCreation BOOL, if there is no expando then when forceCreation==TRUE the function will create it. ATTN: if you are not using json::value wrapper then you shall call ValueClear aginst the returned value otherwise it will leak memory.
Definition at line 547 of file sciter-x-api.h.
Get focused DOM element of HTML document.
- Parameters
-
[in] hwnd HWINDOW, Sciter window for which you need to get focus element
[out] phe
HELEMENT*, variable to receive focus element
- Returns
- SCDOM_RESULT SCAPI
phe can have null value (0).
COMMENT: To set focus on element use SciterSetElementState(STATE_FOCUS,0)
Definition at line 476 of file sciter-x-api.h.
SCDOM_RESULT SCAPI SciterGetHighlightedElement
(
HWINDOW
hwnd,
)
inline
UINT SCAPI SciterGetMinHeight
(
HWINDOW
hWndSciter,
UINT
width
)
inline
UINT SCAPI SciterGetMinWidth
(
HWINDOW
hWndSciter )
inline
UINT
n,
LPVOID
rcv_param
)
inline
Get value of any element's attribute by attribute's number.
- Parameters
-
[in] n UINT, number of desired attribute
[out] p_name LPCSTR*, will be set to address of the string containing attribute name
[out] p_value LPCWSTR*, will be set to address of the string containing attribute value
- Returns
- SCDOM_RESULT SCAPI
Definition at line 485 of file sciter-x-api.h.
UINT
n,
LPVOID
rcv_param
)
inline
Get handle of every element's child element.
- Parameters
-
[in] n UINT, number of the child element
[out] phe
HELEMENT*, variable to receive handle of the child element
- Returns
- SCDOM_RESULT SCAPI
- Example:
- for paragraph defined as
<p>Hello <b>wonderfull</b> world!</p>
*phe will be equal to handle of <b> element: <b>wonderfull</b>
Definition at line 479 of file sciter-x-api.h.
BOOL
forceCreation
)
inline
SciterGetObject - get 'expando' object of the element. 'expando' is a scripting object (of class Element) that is assigned to the DOM element. 'expando' could be null as they are created on demand by script.
- Parameters
-
[in] he HELEMENT, element which expando will be retrieved.
[out] pval tiscript::value*, pointer to tiscript::value that will get reference to the scripting object associated wuth the element or null.
[in] forceCreation BOOL, if there is no expando then when forceCreation==TRUE the function will create it.
ATTN!: if you plan to store the reference or use it inside code that calls script VM functions then you should use tiscript::pinned holder for the value.
Definition at line 548 of file sciter-x-api.h.
Get parent element.
- Parameters
-
[in] he
HELEMENT , element which parent you need
[out] p_parent_he
HELEMENT*, variable to recieve handle of the parent element
- Returns
- SCDOM_RESULT SCAPI
Definition at line 480 of file sciter-x-api.h.
VOID SCAPI SciterGetPPI
(
HWINDOW
hWndSciter,
UINT *
px,
UINT *
py
)
inline
Get current pixels-per-inch metrics of the Sciter window
- Parameters
-
[in] hWndSciter HWINDOW, Sciter window handle.
[out] px PUINT, get ppi in horizontal direction.
[out] py PUINT, get ppi in vertical direction.
Definition at line 459 of file sciter-x-api.h.
Get root DOM element of HTML document.
- Parameters
-
[in] hwnd HWINDOW, Sciter window for which you need to get root element
[out] phe
HELEMENT*, variable to receive root element
- Returns
- SCDOM_RESULT SCAPI
Root DOM object is always a 'HTML' element of the document.
Definition at line 475 of file sciter-x-api.h.
LPPOINT
scrollPos,
LPRECT
viewRect,
LPSIZE
contentSize
)
inline
SciterGetScrollInfo - get scroll info of element with overflow:scroll or auto.
- Parameters
-
[in] he HELEMENT, element.
[out] scrollPos LPPOINT, scroll position.
[out] viewRect LPRECT, position of element scrollable area, content box minus scrollbars.
[out] contentSize LPSIZE, size of scrollable element content.
Definition at line 531 of file sciter-x-api.h.
LPCSTR
name,
LPVOID
rcv_param
)
inline
Get element's style attribute.
- Parameters
-
[in] name LPCSTR, name of the style attribute
[in] rcv pointer to the function receiving UTF16 encoded plain text
[in] rcv_param param passed that passed to LPCWSTR_RECEIVER "as is"
Style attributes are those that are set using css. E.g. "font-face: arial" or "display: block".
- See also
- SciterSetStyleAttribute()
Definition at line 493 of file sciter-x-api.h.
SciterGetValue - get value of the element. 'value' is value of correspondent behavior attached to the element or its text.
- Parameters
-
[in] he HELEMENT, element which value will be retrieved.
[out] pval
VALUE*, pointer to
VALUE that will get elements value. ATTN: if you are not using json::value wrapper then you shall call ValueClear aginst the returned value otherwise memory will leak.
Definition at line 545 of file sciter-x-api.h.
BOOL SCAPI SciterGetViewExpando
(
HWINDOW
hwnd,
)
inline
Get "expando" of the view object
- Parameters
-
[in] hWndSciter HWINDOW, Sciter window handle.
Definition at line 460 of file sciter-x-api.h.
HVM SCAPI SciterGetVM
(
HWINDOW
hwnd )
inline
BOOL SCAPI SciterGraphicsCaps
(
LPUINT
pcaps )
inline
Get graphics capabilities of the system
[in] LPUINT pcaps, address of variable receiving: 0 - no compatible graphics found; 1 - compatible graphics found but Direct2D will use WARP driver (software emulation); 2 - Direct2D will use hardware backend (best performance);
- Returns
- BOOL,
TRUE if pcaps is valid pointer.
Definition at line 466 of file sciter-x-api.h.
Removes popup window.
- Parameters
-
[in] he HELEMENT, element which belongs to popup window or popup element itself
Definition at line 512 of file sciter-x-api.h.
LPCWSTR
url,
UINT
dataType,
UINT
requestType,
UINT
nParams
)
inline
Insert element at index position of parent. It is not an error to insert element which already has parent - it will be disconnected first, but you need to update elements parent in this case.
- Parameters
-
index UINT, position of the element in parent collection. It is not an error to provide index greater than elements count in parent - it will be appended.
Definition at line 517 of file sciter-x-api.h.
SciterIsElementEnabled - deep enable state, determines if element enabled - is not disabled by itself or no one of its parents is disabled.
- Parameters
-
[in] he HELEMENT, element.
[out] pEnabled LPBOOL, enabled state.
Definition at line 536 of file sciter-x-api.h.
SciterIsElementVisible - deep visibility, determines if element visible - has no visiblity:hidden and no display:none defined for itself or for any its parents.
- Parameters
-
[in] he HELEMENT, element.
[out] pVisible LPBOOL, visibility state.
Definition at line 535 of file sciter-x-api.h.
BOOL SCAPI SciterLoadFile
(
HWINDOW
hWndSciter,
LPCWSTR
filename
)
inline
Load HTML file.
- Parameters
-
[in] hWndSciter HWINDOW, Sciter window handle.
[in] filename LPCWSTR, File name of an HTML file.
- Returns
- BOOL,
TRUE if the text was parsed and loaded successfully, FALSE otherwise.
Definition at line 442 of file sciter-x-api.h.
BOOL SCAPI SciterLoadHtml
(
HWINDOW
hWndSciter,
UINT
htmlSize,
LPCWSTR
baseUrl
)
inline
Load HTML from in memory buffer with base.
- Parameters
-
[in] hWndSciter HWINDOW, Sciter window handle.
[in] html LPCBYTE, Address of HTML to load.
[in] htmlSize UINT, Length of the array pointed by html parameter.
[in] baseUrl LPCWSTR, base URL. All relative links will be resolved against this URL.
- Returns
- BOOL,
TRUE if the text was parsed and loaded successfully, FALSE otherwise.
Definition at line 443 of file sciter-x-api.h.
LPVOID
rcv_param
)
inline
LPCWSTR
text,
UINT
textLength
)
inline
UINT *
pNodeType
)
inline
UINT
appEventCode,
UINT
reason
)
inline
PostEvent - post sinking/bubbling event to the child/parent chain of he element. Function will return immediately posting event into input queue of the application.
- Parameters
-
[in] he HELEMENT, element to send this event to.
[in] heSource HELEMENT, optional handle of the source element, e.g. some list item
[in] reason UINT, notification specific event reason code
Definition at line 526 of file sciter-x-api.h.
refresh element area in its window.
- Parameters
-
[in] rc RECT, rect to refresh.
- Returns
- SCDOM_RESULT SCAPI
Definition at line 498 of file sciter-x-api.h.
LPCWSTR
url,
UINT
dataType,
)
inline
SciterRequestElementData - request data download for the element.
- Parameters
-
[in] he HELEMENT, element to deleiver data to.
[in] url LPCWSTR, url to download data from.
[in] dataType UINT, data type, see SciterResourceType.
[in] hInitiator HELEMENT, element - initiator, can be NULL.
event handler on the he element (if any) will be notified when data will be ready by receiving HANDLE_DATA_DELIVERY event.
Definition at line 529 of file sciter-x-api.h.
UINT
SciterScrollFlags
)
inline
LPCSTR
CSS_selectors,
LPVOID
param
)
inline
Call specified function for every element in a DOM that meets specified CSS selectors. See list of supported selectors: http://www.terrainformatica.com/sciter/css/selectors.htm
- Parameters
-
[in] selector LPCSTR, comma separated list of CSS selectors, e.g.: div, #id, div[align="right"].
[in] param LPVOID, additional parameter to be passed to callback function.
- Returns
- SCDOM_RESULT SCAPI
Definition at line 503 of file sciter-x-api.h.
LPCWSTR
CSS_selectors,
LPVOID
param
)
inline
LPCSTR
selector,
UINT
depth,
)
inline
Find parent of the element by CSS selector. ATTN: function will test first element itself. See list of supported selectors: http://www.terrainformatica.com/sciter/css/selectors.htm
- Parameters
-
[in] selector LPCSTR, comma separated list of CSS selectors, e.g.: div, #id, div[align="right"].
[out] heFound
HELEMENT*, address of result HELEMENT
[in] depth LPVOID, depth of search, if depth == 1 then it will test only element itself. Use depth = 1 if you just want to test he element for matching given CSS selector(s). depth = 0 will scan the whole child parent chain up to the root.
- Returns
- SCDOM_RESULT SCAPI
Definition at line 505 of file sciter-x-api.h.
LPCWSTR
selector,
UINT
depth,
)
inline
UINT
appEventCode,
UINT
reason,
BOOL *
handled
)
inline
SendEvent - sends sinking/bubbling event to the child/parent chain of he element. First event will be send in SINKING mode (with SINKING flag) - from root to he element itself. Then from he element to its root on parents chain without SINKING flag (bubbling phase).
- Parameters
-
[in] he HELEMENT, element to send this event to.
[in] heSource HELEMENT, optional handle of the source element, e.g. some list item
[in] reason UINT, notification specific event reason code
[out] handled BOOL*, variable to receive TRUE if any handler handled it, FALSE otherwise.
Definition at line 525 of file sciter-x-api.h.
LPCSTR
name,
LPCWSTR
value
)
inline
Set attribute's value.
- Parameters
-
[in] name LPCSTR, attribute name
[in] value LPCWSTR, new attribute value or 0 if you want to remove attribute.
- Returns
- SCDOM_RESULT SCAPI
Definition at line 488 of file sciter-x-api.h.
VOID SCAPI SciterSetCallback
(
HWINDOW
hWndSciter,
LPVOID
cbParam
)
inline
Set the mouse capture to the specified element.
- Parameters
-
- Returns
- SCDOM_RESULT SCAPI
After call to this function all mouse events will be targeted to the element. To remove mouse capture call ReleaseCapture() function.
Definition at line 499 of file sciter-x-api.h.
BOOL SCAPI SciterSetCSS
(
HWINDOW
hWndSciter,
UINT
numBytes,
LPCWSTR
baseUrl,
LPCWSTR
mediaType
)
inline
Set (reset) style sheet of current document. Will reset styles for all elements according to given CSS (utf8)
- Parameters
-
[in] hWndSciter HWINDOW, Sciter window handle.
[in] utf8 LPCBYTE, start of CSS buffer.
[in] numBytes UINT, number of bytes in utf8.
Definition at line 447 of file sciter-x-api.h.
const BYTE *
html,
UINT
htmlLength,
UINT
where
)
inline
Set inner or outer html of the element.
- Parameters
-
[in] html LPCBYTE, UTF-8 encoded string containing html text
[in] htmlLength UINT, length in bytes of html.
[in] where
UINT, possible values are:
- SIH_REPLACE_CONTENT - replace content of the element
- SIH_INSERT_AT_START - insert html before first child of the element
- SIH_APPEND_AFTER_LAST - insert html after last child of the element
- SOH_REPLACE - replace element by html, a.k.a. element.outerHtml = "something"
- SOH_INSERT_BEFORE - insert html before the element
- SOH_INSERT_AFTER - insert html after the element ATTN: SOH_*** operations do not work for inline elements like
- Returns
- /b SCDOM_RESULT SCAPI
Definition at line 507 of file sciter-x-api.h.
UINT
stateBitsToSet,
UINT
stateBitsToClear,
BOOL
updateView
)
inline
LPCWSTR
utf16,
UINT
length
)
inline
Set inner text of the element from LPCWSTR buffer (utf16 words).
- Parameters
-
[in] utf16words pointer, UTF16 encoded plain text
[in] length UINT, number of words in utf16words sequence
- Returns
- SCDOM_RESULT SCAPI
Definition at line 483 of file sciter-x-api.h.
SCDOM_RESULT SCAPI SciterSetHighlightedElement
(
HWINDOW
hwnd,
)
inline
BOOL SCAPI SciterSetHomeURL
(
HWINDOW
hWndSciter,
LPCWSTR
baseUrl
)
inline
Set sciter home url. home url is used for resolving sciter: urls If you will set it like SciterSetHomeURL(hwnd,"http://sciter.com/modules/") then <script src="sciter:lib/root-extender.tis"> will load root-extender.tis from http://sciter.com/modules/lib/root-extender.tis
- Parameters
-
[in] hWndSciter HWINDOW, Sciter window handle.
[in] baseUrl LPCWSTR, URL of sciter home.
Definition at line 467 of file sciter-x-api.h.
BOOL SCAPI SciterSetMasterCSS
(
LPCBYTE
utf8,
UINT
numBytes
)
inline
Set Master style sheet.
- Parameters
-
[in] utf8 LPCBYTE, start of CSS buffer.
[in] numBytes UINT, number of bytes in utf8.
Definition at line 445 of file sciter-x-api.h.
BOOL SCAPI SciterSetMediaType
(
HWINDOW
hWndSciter,
LPCWSTR
mediaType
)
inline
Set media type of this sciter instance.
- Parameters
-
[in] hWndSciter HWINDOW, Sciter window handle.
[in] mediaType LPCWSTR, media type name.
For example media type can be "handheld", "projection", "screen", "screen-hires", etc. By default sciter window has "screen" media type.
Media type name is used while loading and parsing style sheets in the engine so you should call this function before loading document in it.
Definition at line 448 of file sciter-x-api.h.
BOOL SCAPI SciterSetMediaVars
(
HWINDOW
hWndSciter,
)
inline
Set media variables of this sciter instance.
- Parameters
-
[in] hWndSciter HWINDOW, Sciter window handle.
[in] mediaVars SCITER_VALUE, map that contains name/value pairs - media variables to be set.
For example media type can be "handheld:true", "projection:true", "screen:true", etc. By default sciter window has "screen:true" and "desktop:true"/"handheld:true" media variables.
Media variables can be changed in runtime. This will cause styles of the document to be reset.
Definition at line 449 of file sciter-x-api.h.
BOOL SCAPI SciterSetOption
(
HWINDOW
hWnd,
UINT
option,
UINT_PTR
value
)
inline
POINT
scrollPos,
BOOL
smooth
)
inline
SciterSetScrollPos - set scroll position of element with overflow:scroll or auto.
- Parameters
-
[in] he HELEMENT, element.
[in] scrollPos POINT, new scroll position.
[in] smooth BOOL, TRUE - do smooth scroll.
Definition at line 532 of file sciter-x-api.h.
LPCSTR
name,
LPCWSTR
value
)
inline
Get element's style attribute.
- Parameters
-
[in] name LPCSTR, name of the style attribute
[out] value LPCWSTR, value of the style attribute.
Style attributes are those that are set using css. E.g. "font-face: arial" or "display: block".
- See also
- #SciterGetStyleAttribute()
Definition at line 494 of file sciter-x-api.h.
UINT
milliseconds,
UINT_PTR
timer_id
)
inline
Start Timer for the element. Element will receive on_timer event To stop timer call SciterSetTimer( he, 0 );
Definition at line 520 of file sciter-x-api.h.
SciterSetValue - set value of the element.
- Parameters
-
[in] he HELEMENT, element which value will be changed.
[in] pval
VALUE*, pointer to the
VALUE to set.
Definition at line 546 of file sciter-x-api.h.
Shows block element (DIV) in popup window.
- Parameters
-
[in] hePopup HELEMENT, element to show as popup
[in] heAnchor HELEMENT, anchor element - hePopup will be shown near this element
[in] placement UINT, values: 2 - popup element below of anchor 8 - popup element above of anchor 4 - popup element on left side of anchor 6 - popup element on right side of anchor ( see numpad on keyboard to get an idea of the numbers)
- Returns
- SCDOM_RESULT SCAPI
Definition at line 510 of file sciter-x-api.h.
POINT
pos,
BOOL
animate
)
inline
Shows block element (DIV) in popup window at given position.
- Parameters
-
[in] hePopup HELEMENT, element to show as popup
[in] pos POINT, popup element position, relative to origin of Sciter window.
[in] animate BOOL, true if animation is needed.
Definition at line 511 of file sciter-x-api.h.
UINT
firstIndex,
UINT
lastIndex,
LPVOID
cmpFuncParam
)
inline
SciterSortElements - sort children of the element.
- Parameters
-
[in] he HELEMENT, element which children to be sorted.
[in] firstIndex UINT, first child index to start sorting from.
[in] lastIndex UINT, last index of the sorting range, element with this index will not be included in the sorting.
[in] cmpFunc ELEMENT_COMPARATOR, comparator function.
[in] cmpFuncParam LPVOID, parameter to be passed in comparator function.
Definition at line 537 of file sciter-x-api.h.
SciterSwapElements - swap element positions. Function changes "insertion points" of two elements. So it swops indexes and parents of two elements.
- Parameters
-
[in] he1 HELEMENT, first element.
[in] he2 HELEMENT, second element.
Definition at line 538 of file sciter-x-api.h.
LPVOID
eventCtlStruct,
BOOL *
bOutProcessed
)
inline
SciterTraverseUIEvent - traverse (sink-and-bubble) MOUSE or KEY event.
- Parameters
-
[in] evt EVENT_GROUPS, either HANDLE_MOUSE or HANDLE_KEY code.
[out] bOutProcessed LPBOOL, pointer to BOOL receiving TRUE if event was processed by some element and FALSE otherwise.
Definition at line 539 of file sciter-x-api.h.
BOOL
andForceRender
)
inline
Apply changes and refresh element area in its window.
- Parameters
-
[in] andForceRender BOOL, TRUE to force UpdateWindow() call.
- Returns
- SCDOM_RESULT SCAPI
Definition at line 497 of file sciter-x-api.h.
VOID SCAPI SciterUpdateWindow
(
HWINDOW
hwnd )
inline
Update pending changes in Sciter window.
- Parameters
-
[in] hwnd HWINDOW, Sciter window handle.
Definition at line 454 of file sciter-x-api.h.
UINT SCAPI SciterVersion
(
BOOL
major )
inline
Returns major and minor version of Sciter engine.
- Returns
- UINT, hiword (16-bit) contains major number and loword contains minor number;
Definition at line 435 of file sciter-x-api.h.
SCDOM_RESULT SCAPI SciterWindowAttachEventHandler
(
HWINDOW
hwndLayout,
LPVOID
tag,
UINT
subscription
)
inline
Attach/Detach ElementEventProc to the Sciter window. All events will start first here (in SINKING phase) and if not consumed will end up here. You can install Window EventHandler only once - it will survive all document reloads.
Definition at line 523 of file sciter-x-api.h.
SCDOM_RESULT SCAPI SciterWindowDetachEventHandler
(
HWINDOW
hwndLayout,
LPVOID
tag
)
inline
UINT SCAPI ValueBinaryData
(
const
VALUE *
pval,
UINT *
pnBytes
)
inline
ValueBinaryData - retreive integer data of T_BYTES type
Definition at line 587 of file sciter-x-api.h.
UINT SCAPI ValueBinaryDataSet
(
VALUE *
pval,
UINT
nBytes,
UINT
type,
UINT
units
)
inline
ValueBinaryDataSet - sets VALUE to sequence of bytes of type T_BYTES 'type' here must be set to T_BYTES. Optionally sets units field too. The function creates local copy of bytes in its own storage.
Definition at line 588 of file sciter-x-api.h.
UINT SCAPI ValueClear
(
VALUE *
pval )
inline
ValueClear - clears the VALUE and deallocates all assosiated structures that are not used anywhere else.
Definition at line 574 of file sciter-x-api.h.
UINT SCAPI ValueCompare
(
const
VALUE *
pval1,
)
inline
ValueCompare - compares two values, returns HV_OK_TRUE if val1 == val2.
Definition at line 575 of file sciter-x-api.h.
UINT SCAPI ValueCopy
(
VALUE *
pdst,
)
inline
UINT SCAPI ValueElementsCount
(
const
VALUE *
pval,
INT *
pn
)
inline
ValueElementsCount - retreive number of sub-elements for:
- T_ARRAY - number of elements in the array;
- T_MAP - number of key/value pairs in the map;
- T_FUNCTION - number of arguments in the function;
Definition at line 589 of file sciter-x-api.h.
UINT SCAPI ValueEnumElements
(
const
VALUE *
pval,
LPVOID
param
)
inline
UINT SCAPI ValueFloatData
(
const
VALUE *
pval,
)
inline
ValueFloatData - retreive FLOAT_VALUE (double) data of T_FLOAT and T_LENGTH values.
Definition at line 585 of file sciter-x-api.h.
UINT SCAPI ValueFloatDataSet
(
VALUE *
pval,
UINT
type,
UINT
units
)
inline
ValueFloatDataSet - sets FLOAT_VALUE data of T_FLOAT and T_LENGTH values.
Definition at line 586 of file sciter-x-api.h.
UINT SCAPI ValueFromString
(
VALUE *
pval,
LPCWSTR
str,
UINT
strLength,
UINT
how
)
inline
ValueFromString - parses string into value:
- CVT_SIMPLE - parse/emit terminal values (T_INT, T_FLOAT, T_LENGTH, T_STRING), "guess" non-strict parsing
- CVT_JSON_LITERAL - parse/emit value using JSON literal rules: {}, [], "string", true, false, null
- CVT_JSON_MAP - parse/emit MAP value without enclosing '{' and '}' brackets. Returns: Number of non-parsed characters in case of errors. Thus if string was parsed in full it returns 0 (success)
Definition at line 597 of file sciter-x-api.h.
UINT SCAPI ValueGetValueOfKey
(
const
VALUE *
pval,
)
inline
ValueGetValueOfKey - retrieves value of sub-element by key:
- T_MAP - value of key/value pair with the key;
- T_FUNCTION - value of argument with the name key;
- T_OBJECT (tiscript) - value of property of the object Otherwise *pretval will have T_UNDEFINED value.
Definition at line 595 of file sciter-x-api.h.
UINT SCAPI ValueInit
(
VALUE *
pval )
inline
ValueInit - initialize VALUE storage This call has to be made before passing VALUE* to any other functions
Definition at line 573 of file sciter-x-api.h.
UINT SCAPI ValueInt64Data
(
const
VALUE *
pval,
INT64 *
pData
)
inline
ValueInt64Data - retreive 64bit integer data of T_CURRENCY and T_DATE values.
Definition at line 583 of file sciter-x-api.h.
UINT SCAPI ValueInt64DataSet
(
VALUE *
pval,
INT64
data,
UINT
type,
UINT
units
)
inline
ValueInt64DataSet - sets 64bit integer data of T_CURRENCY and T_DATE values.
Definition at line 584 of file sciter-x-api.h.
UINT SCAPI ValueIntData
(
const
VALUE *
pval,
INT *
pData
)
inline
ValueIntData - retreive integer data of T_INT, T_LENGTH and T_BOOL types
Definition at line 581 of file sciter-x-api.h.
UINT SCAPI ValueIntDataSet
(
VALUE *
pval,
INT
data,
UINT
type,
UINT
units
)
inline
ValueIntDataSet - sets VALUE integer data of T_INT and T_BOOL types Optionally sets units field too.
Definition at line 582 of file sciter-x-api.h.
UINT SCAPI ValueInvoke
(
const
VALUE *
pval,
UINT
argc,
LPCWSTR
url
)
inline
ValueInvoke - function invocation (Sciter/TIScript).
- VALUE* pval is a value of type T_OBJECT/UT_OBJECT_FUNCTION
- VALUE* pthis - object that will be known as 'this' inside that function.
- UINT argc, const VALUE* argv - vector of arguments to pass to the function.
- VALUE* pretval - parse/emit MAP value without enclosing '{' and '}' brackets.
- LPCWSTR url - url or name of the script - used for error reporting in the script. Returns: HV_OK, HV_BAD_PARAMETER or HV_INCOMPATIBLE_TYPE
Definition at line 598 of file sciter-x-api.h.
BOOL SCAPI ValueIsNativeFunctor
(
const
VALUE *
pval )
inline
UINT SCAPI ValueIsolate
(
VALUE *
pdst )
inline
ValueIsolate - converts T_OBJECT value types to T_MAP or T_ARRAY. use this method if you need to pass values between different threads. The fanction is applicable for the Sciter
Definition at line 577 of file sciter-x-api.h.
UINT SCAPI ValueNativeFunctorSet
(
VALUE *
pval,
VOID *
tag = NULL
)
inline
ValueNativeFunctorSet - set reference to native function
- VALUE* pval - value to be initialized
- NATIVE_FUNCTOR_INVOKE* pinvoke - reference to native functor implementation.
- NATIVE_FUNCTOR_RELEASE* prelease - reference to native functor dtor implementation.
- VOID* tag - optional tag, passed as it is to pinvoke and prelease Returns: HV_OK, HV_BAD_PARAMETER
Definition at line 599 of file sciter-x-api.h.
UINT SCAPI ValueNthElementKey
(
const
VALUE *
pval,
INT
n,
)
inline
ValueEnumElements - enumeartes key/value pairs of T_MAP, T_FUNCTION and T_OBJECT values
- T_MAP - key of nth key/value pair in the map;
- T_FUNCTION - name of nth argument of the function (if any);
Definition at line 592 of file sciter-x-api.h.
UINT SCAPI ValueNthElementValue
(
const
VALUE *
pval,
INT
n,
)
inline
ValueNthElementValue - retreive value of sub-element at index n for:
- T_ARRAY - nth element of the array;
- T_MAP - value of nth key/value pair in the map;
- T_FUNCTION - value of nth argument of the function;
Definition at line 590 of file sciter-x-api.h.
UINT SCAPI ValueNthElementValueSet
(
VALUE *
pval,
INT
n,
const
VALUE *
pval_to_set
)
inline
ValueNthElementValueSet - sets value of sub-element at index n for:
- T_ARRAY - nth element of the array;
- T_MAP - value of nth key/value pair in the map;
- T_FUNCTION - value of nth argument of the function; If the VALUE is not of one of types above then it makes it of type T_ARRAY with single element - 'val_to_set'.
Definition at line 591 of file sciter-x-api.h.
UINT SCAPI ValueSetValueToKey
(
VALUE *
pval,
const
VALUE *
pval_to_set
)
inline
ValueSetValueToKey - sets value of sub-element by key:
- T_MAP - value of key/value pair with the key;
- T_FUNCTION - value of argument with the name key;
- T_OBJECT (tiscript) - value of property of the object If the VALUE is not of one of types above then it makes it of type T_MAP with single pair - 'key'/'val_to_set'.
key usually is a value of type T_STRING
Definition at line 594 of file sciter-x-api.h.
UINT SCAPI ValueStringData
(
const
VALUE *
pval,
LPCWSTR *
pChars,
UINT *
pNumChars
)
inline
ValueStringData - returns string data for T_STRING type For T_FUNCTION returns name of the fuction.
Definition at line 579 of file sciter-x-api.h.
UINT SCAPI ValueStringDataSet
(
VALUE *
pval,
LPCWSTR
chars,
UINT
numChars,
UINT
units
)
inline
ValueStringDataSet - sets VALUE to T_STRING type and copies chars/numChars to internal refcounted buffer assosiated with the value.
Definition at line 580 of file sciter-x-api.h.
UINT SCAPI ValueToString
(
VALUE *
pval,
UINT
how
)
inline
ValueToString - converts value to T_STRING inplace:
- CVT_SIMPLE - parse/emit terminal values (T_INT, T_FLOAT, T_LENGTH, T_STRING)
- CVT_JSON_LITERAL - parse/emit value using JSON literal rules: {}, [], "string", true, false, null
- CVT_JSON_MAP - parse/emit MAP value without enclosing '{' and '}' brackets.
Definition at line 596 of file sciter-x-api.h.
UINT SCAPI ValueType
(
const
VALUE *
pval,
UINT *
pType,
UINT *
pUnits
)
inline
ValueType - returns VALUE_TYPE and VALUE_UNIT_TYPE flags of the VALUE
Definition at line 578 of file sciter-x-api.h.