#include "json-value.h"
Typedefs | |
| typedef int | HLDOM_RESULT |
| Type of the result value for HTMLayout DOM functions. | |
| typedef LPVOID | HELEMENT |
| DOM element handle. | |
| typedef LPVOID | HRANGE |
| DOM range handle. | |
| typedef BOOL CALLBACK | HTMLayoutElementCallback (HELEMENT he, LPVOID param) |
| Callback function used with HTMLayoutVisitElement(). | |
| typedef BOOL CALLBACK | ElementEventProc (LPVOID tag, HELEMENT he, UINT evtg, LPVOID prms) |
| Element callback function for all types of events. | |
| typedef INT CALLBACK | ELEMENT_COMPARATOR (HELEMENT he1, HELEMENT he2, LPVOID param) |
| Callback comparator function used with HTMLayoutSortElements(). | |
| typedef BOOL CALLBACK | HTMLayoutEnumerationCallback (LPVOID p, HELEMENT he, int pos, int postype, WCHAR code) |
| Callback function used with HTMLayoutEnumearate(). | |
Enumerations | |
| enum | REQUEST_TYPE |
| HTMLayoutSendRequest - send GET or POST request for the element. More... | |
| enum | CTL_TYPE { CTL_NO, CTL_UNKNOWN = 1, CTL_EDIT, CTL_NUMERIC, CTL_BUTTON, CTL_CHECKBOX, CTL_RADIO, CTL_SELECT_SINGLE, CTL_SELECT_MULTIPLE, CTL_DD_SELECT, CTL_TEXTAREA, CTL_HTMLAREA, CTL_PASSWORD, CTL_PROGRESS, CTL_SLIDER, CTL_DECIMAL, CTL_CURRENCY } |
| Control types. More... | |
| enum | ADVANCE_TO |
| HTMLayoutRange*** - range manipulation routines. More... | |
Functions | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayout_UseElement (HELEMENT he) |
| Marks DOM object as used (a.k.a. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayout_UnuseElement (HELEMENT he) |
| Marks DOM object as unused (a.k.a. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetRootElement (HWND hwnd, HELEMENT *phe) |
| Get root DOM element of HTML document. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetFocusElement (HWND hwnd, HELEMENT *phe) |
| Get focused DOM element of HTML document. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutFindElement (HWND hwnd, POINT pt, HELEMENT *phe) |
| Find DOM element by coordinate. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetChildrenCount (HELEMENT he, UINT *count) |
| Get number of child elements. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetNthChild (HELEMENT he, UINT n, HELEMENT *phe) |
| Get handle of every element's child element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetParentElement (HELEMENT he, HELEMENT *p_parent_he) |
| Get parent element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementText (HELEMENT he, LPWSTR characters, LPUINT length) |
| Get text of the element and information where child elements are placed. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementHtml (HELEMENT he, LPBYTE *utf8bytes, BOOL outer) |
| Get text of the element and information where child elements are placed. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementInnerText (HELEMENT he, LPBYTE *utf8bytes) |
| Get inner text of the element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSetElementInnerText (HELEMENT he, LPCBYTE utf8bytes, UINT length) |
| Set inner text of the element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementInnerText16 (HELEMENT he, LPWSTR *utf16words) |
| Get inner text of the element as LPWSTR (utf16 words). | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSetElementInnerText16 (HELEMENT he, LPCWSTR utf16words, UINT length) |
| Set inner text of the element from LPCWSTR buffer (utf16 words). | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetAttributeCount (HELEMENT he, LPUINT p_count) |
| Get number of element's attributes. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetNthAttribute (HELEMENT he, UINT n, LPCSTR *p_name, LPCWSTR *p_value) |
| Get value of any element's attribute by attribute's number. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetAttributeByName (HELEMENT he, LPCSTR name, LPCWSTR *p_value) |
| Get value of any element's attribute by name. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSetAttributeByName (HELEMENT he, LPCSTR name, LPCWSTR value) |
| Set attribute's value. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutClearAttributes (HELEMENT he) |
| Remove all attributes from the element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementIndex (HELEMENT he, LPUINT p_index) |
| Get element index. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementType (HELEMENT he, LPCSTR *p_type) |
| Get element's type. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetStyleAttribute (HELEMENT he, LPCSTR name, LPCWSTR *p_value) |
| Get element's style attribute. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSetStyleAttribute (HELEMENT he, LPCSTR name, LPCWSTR value) |
| Get element's style attribute. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutUpdateElement (HELEMENT he, BOOL renderNow) |
| Apply changes and refresh element area in its window. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutUpdateElementEx (HELEMENT he, UINT flags) |
| Apply changes and refresh element area in its window. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSetCapture (HELEMENT he) |
| Set the mouse capture to the specified element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementHwnd (HELEMENT he, HWND *p_hwnd, BOOL rootWindow) |
| Get HWND of containing window. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutCombineURL (HELEMENT he, LPWSTR szUrlBuffer, DWORD UrlBufferSize) |
| Combine given URL with URL of the document element belongs to. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutVisitElements (HELEMENT he, LPCSTR tagName, LPCSTR attributeName, LPCWSTR attributeValue, HTMLayoutElementCallback *callback, LPVOID param, DWORD depth) |
| Call specified function for every element in a DOM that meets specified criteria. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSelectElements (HELEMENT he, LPCSTR CSS_selectors, HTMLayoutElementCallback *callback, LPVOID param) |
| Call specified function for every element in a DOM that meets specified CSS selectors. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSelectParent (HELEMENT he, LPCSTR selector, UINT depth, HELEMENT *heFound) |
| Find parent of the element by CSS selector. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSetElementHtml (HELEMENT he, LPCBYTE html, DWORD htmlLength, UINT where) |
| Set inner or outer html of the element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutDeleteElement (HELEMENT he) |
| Delete element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementUID (HELEMENT he, UINT *puid) |
| Get Element UID. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementByUID (HWND hwnd, UINT uid, HELEMENT *phe) |
| Get Element handle by its UID. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutShowPopup (HELEMENT hePopup, HELEMENT heAnchor, UINT placement) |
| Shows block element (DIV) in popup window. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutShowPopupAt (HELEMENT hePopup, POINT pos, BOOL animate) |
| Shows block element (DIV) in popup window at given position. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutHidePopup (HELEMENT he) |
| Removes popup window. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetElementState (HELEMENT he, UINT *pstateBits) |
| Get/set state bits, stateBits*** accept or'ed values above. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutCreateElement (LPCSTR tagname, LPCWSTR textOrNull, HELEMENT *phe) |
| Create new element, the element is disconnected initially from the DOM. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutCloneElement (HELEMENT he, HELEMENT *phe) |
| 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. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutInsertElement (HELEMENT he, HELEMENT hparent, UINT index) |
| Insert element at index position of parent. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutDetachElement (HELEMENT he) |
| Take element out of its container (and DOM tree). | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSetTimer (HELEMENT he, UINT milliseconds) |
| Start Timer for the element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutAttachEventHandler (HELEMENT he, LPELEMENT_EVENT_PROC pep, LPVOID tag) |
| Attach/Detach ElementEventProc to the element See htmlayout::event_handler. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutAttachEventHandlerEx (HELEMENT he, LPELEMENT_EVENT_PROC pep, LPVOID tag, UINT subscription) |
| Attach ElementEventProc to the element and subscribe it to events providede by subscription parameter See htmlayout::attach_event_handler. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutWindowAttachEventHandler (HWND hwndLayout, LPELEMENT_EVENT_PROC pep, LPVOID tag, UINT subscription) |
| Attach/Detach ElementEventProc to the htmlayout window. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSendEvent (HELEMENT he, UINT appEventCode, HELEMENT heSource, UINT_PTR reason, BOOL *handled) |
| SendEvent - sends sinking/bubbling event to the child/parent chain of he element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutPostEvent (HELEMENT he, UINT appEventCode, HELEMENT heSource, UINT reason) |
| PostEvent - post sinking/bubbling event to the child/parent chain of he element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutCallBehaviorMethod (HELEMENT he, METHOD_PARAMS *params) |
| HTMLayoutCallMethod - calls behavior specific method. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutRequestElementData (HELEMENT he, LPCWSTR url, UINT dataType, HELEMENT initiator) |
| HTMLayoutRequestElementData - request data download for the element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetScrollInfo (HELEMENT he, LPPOINT scrollPos, LPRECT viewRect, LPSIZE contentSize) |
| HTMLayoutGetScrollInfo - get scroll info of element with overflow:scroll or auto. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSetScrollPos (HELEMENT he, POINT scrollPos, BOOL smooth) |
| HTMLayoutSetScrollPos - set scroll position of element with overflow:scroll or auto. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutIsElementVisible (HELEMENT he, BOOL *pVisible) |
| HTMLayoutIsElementVisible - deep visibility, determines if element visible - has no visiblity:hidden and no display:none defined for itself or for any its parents. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutIsElementEnabled (HELEMENT he, BOOL *pEnabled) |
| HTMLayoutIsElementEnabled - deep enable state, determines if element enabled - is not disabled by itself or no one of its parents is disabled. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSortElements (HELEMENT he, UINT firstIndex, UINT lastIndex, ELEMENT_COMPARATOR *cmpFunc, LPVOID cmpFuncParam) |
| HTMLayoutSortElements - sort children of the element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutSwapElements (HELEMENT he1, HELEMENT he2) |
| HTMLayoutSwapElements - swap element positions. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutTraverseUIEvent (UINT evt, LPVOID eventCtlStruct, LPBOOL bOutProcessed) |
| HTMLayoutTraverseUIEvent - traverse (sink-and-bubble) MOUSE or KEY event. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutControlGetType (HELEMENT he, UINT *pType) |
| HTMLayoutControlGetType - get type of control - type of behavior assigned to the element. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutControlGetValue (HELEMENT he, JSON_VALUE *pVal) |
| HTMLayoutControlGetValue - get value of the control. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutControlSetValue (HELEMENT he, const JSON_VALUE *pVal) |
| HTMLayoutControlSetValue - set value of the control and update UI. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutEnumerate (HELEMENT he, HTMLayoutEnumerationCallback *pcb, LPVOID p, BOOL forward) |
| HTMLayoutEnumerate - character by character enumeartion of the dom. | |
| EXTERN_C HLDOM_RESULT HLAPI | HTMLayoutGetCharacterRect (HELEMENT he, int pos, RECT *outRect) |
| HTMLayoutGetCharacterRect - position of single character on the screen. | |
| typedef INT CALLBACK ELEMENT_COMPARATOR(HELEMENT he1, HELEMENT he2, LPVOID param) |
Callback comparator function used with HTMLayoutSortElements().
Shall return -1,0,+1 values to indicate result of comparison of two elements
| typedef BOOL CALLBACK ElementEventProc(LPVOID tag, HELEMENT he, UINT evtg, LPVOID prms) |
Element callback function for all types of events.
Similar to WndProc
| tag | LPVOID, tag assigned by HTMLayoutAttachElementProc function (like GWL_USERDATA) | |
| he | HELEMENT, this element handle (like HWND) | |
| evtg | UINT, group identifier of the event, value is one of EVENT_GROUPS | |
| prms | LPVOID, pointer to group specific parameters structure. |
| typedef LPVOID HELEMENT |
DOM element handle.
| typedef int HLDOM_RESULT |
Type of the result value for HTMLayout DOM functions.
Possible values are:
| typedef LPVOID HRANGE |
DOM range handle.
| typedef BOOL CALLBACK HTMLayoutElementCallback(HELEMENT he, LPVOID param) |
Callback function used with HTMLayoutVisitElement().
| typedef BOOL CALLBACK HTMLayoutEnumerationCallback(LPVOID p, HELEMENT he, int pos, int postype, WCHAR code) |
Callback function used with HTMLayoutEnumearate().
| [in] | he | HELEMENT, element. |
| [in] | pos | int, position in the element. |
| [in] | postype | int, position type : 0 - he element head position. 1 - he element tail position. 2 - subblock insertion position 3 - character position. |
| [in] | code | int, UTF16 code unit value if postype == 3 |
| enum ADVANCE_TO |
HTMLayoutRange*** - range manipulation routines.
ATTN: Not completed yet
| enum CTL_TYPE |
Control types.
Control here is any dom element having appropriate behavior applied
| enum REQUEST_TYPE |
HTMLayoutSendRequest - send GET or POST request for the element.
event handler on the 'he' element (if any) will be notified when data will be ready by receiving HANDLE_DATA_DELIVERY event.
| EXTERN_C HLDOM_RESULT HLAPI HTMLayout_UnuseElement | ( | HELEMENT | he | ) |
Marks DOM object as unused (a.k.a.
Release). Get handle of every element's child element.
| [in] | he | HELEMENT |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayout_UseElement | ( | HELEMENT | he | ) |
Marks DOM object as used (a.k.a.
AddRef).
| [in] | he | HELEMENT |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutCallBehaviorMethod | ( | HELEMENT | he, | |
| METHOD_PARAMS * | params | |||
| ) |
HTMLayoutCallMethod - calls behavior specific method.
| [in] | he | HELEMENT, element - source of the event. |
| [in] | params | METHOD_PARAMS, pointer to method param block |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutClearAttributes | ( | HELEMENT | he | ) |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutCloneElement | ( | HELEMENT | he, | |
| HELEMENT * | phe | |||
| ) |
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 HTMLayout_UnuseElement on returned handler.
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutCombineURL | ( | HELEMENT | he, | |
| LPWSTR | szUrlBuffer, | |||
| DWORD | UrlBufferSize | |||
| ) |
Combine given URL with URL of the document element belongs to.
| [in] | he | HELEMENT |
| [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 | DWORD, size of the buffer pointed by szUrlBuffer |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutControlGetType | ( | HELEMENT | he, | |
| UINT * | pType | |||
| ) |
HTMLayoutControlGetType - get type of control - type of behavior assigned to the element.
| [in] | he | HELEMENT, element. |
| [out] | pType | UINT*, pointer to variable receiving control type, for list of values see CTL_TYPE. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutControlGetValue | ( | HELEMENT | he, | |
| JSON_VALUE * | pVal | |||
| ) |
HTMLayoutControlGetValue - get value of the control.
| [in] | he | HELEMENT, element. |
| [out] | pVal | JSON_VALUE*, pointer to variable receiving control value. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutControlSetValue | ( | HELEMENT | he, | |
| const JSON_VALUE * | pVal | |||
| ) |
HTMLayoutControlSetValue - set value of the control and update UI.
| [in] | he | HELEMENT, element. |
| [in] | pVal | const JSON_VALUE*, pointer to variable to set value from. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutCreateElement | ( | LPCSTR | tagname, | |
| LPCWSTR | textOrNull, | |||
| HELEMENT * | phe | |||
| ) |
Create new element, the element is disconnected initially from the DOM.
Element created with ref_count = 1 thus you must call HTMLayout_UnuseElement on returned handler.
| [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 |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutDeleteElement | ( | HELEMENT | he | ) |
Delete element.
| [in] | he | HELEMENT |
he will become invalid. | EXTERN_C HLDOM_RESULT HLAPI HTMLayoutDetachElement | ( | HELEMENT | he | ) |
Take element out of its container (and DOM tree).
Element will be destroyed when its reference counter will become zero
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutEnumerate | ( | HELEMENT | he, | |
| HTMLayoutEnumerationCallback * | pcb, | |||
| LPVOID | p, | |||
| BOOL | forward | |||
| ) |
HTMLayoutEnumerate - character by character enumeartion of the dom.
| [in] | he | HELEMENT, element. |
| [in] | pcb | HTMLayoutEnumearationCallback, pointer to function that is called on each character position. |
| [in] | forward | BOOL, direction of the enumeration, TRUE - forward. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutFindElement | ( | HWND | hwnd, | |
| POINT | pt, | |||
| HELEMENT * | phe | |||
| ) |
Find DOM element by coordinate.
| [in] | hwnd | HWND, HTMLayout 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. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetAttributeByName | ( | HELEMENT | he, | |
| LPCSTR | name, | |||
| LPCWSTR * | p_value | |||
| ) |
Get value of any element's attribute by name.
| [in] | he | HELEMENT |
| [in] | name | LPCSTR, attribute name |
| [out] | p_value | LPCWSTR*, will be set to address of the string containing attribute value |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetAttributeCount | ( | HELEMENT | he, | |
| LPUINT | p_count | |||
| ) |
Get number of element's attributes.
| [in] | he | HELEMENT |
| [out] | p_count | LPUINT, variable to receive number of element attributes. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetCharacterRect | ( | HELEMENT | he, | |
| int | pos, | |||
| RECT * | outRect | |||
| ) |
HTMLayoutGetCharacterRect - position of single character on the screen.
| [in] | he | HELEMENT, element. |
| [in] | pos | int, index of the character in the he element. |
| [out] | outRect | RECT, rectangle that will receive view relative coordinates of the character placeholder. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetChildrenCount | ( | HELEMENT | he, | |
| UINT * | count | |||
| ) |
Get number of child elements.
| [in] | he | HELEMENT, element which child elements you need to count |
| [out] | count | UINT*, variable to receive number of child elements |
<p>Hello <b>wonderfull</b> world!</p>
<b>wonderfull</b>
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetElementByUID | ( | HWND | hwnd, | |
| UINT | uid, | |||
| HELEMENT * | phe | |||
| ) |
Get Element handle by its UID.
| [in] | hwnd | HWND, HWND of HTMLayout window |
| [in] | uid | UINT |
| [out] | phe | HELEMENT*, variable to receive HELEMENT handle |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetElementHtml | ( | HELEMENT | he, | |
| LPBYTE * | utf8bytes, | |||
| BOOL | outer | |||
| ) |
Get text of the element and information where child elements are placed.
| [in] | he | HELEMENT |
| [out] | utf8bytes | pointer to byte address receiving UTF8 encoded HTML |
| [in] | outer | BOOL, if TRUE will retunr outer HTML otherwise inner. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetElementHwnd | ( | HELEMENT | he, | |
| HWND * | p_hwnd, | |||
| BOOL | rootWindow | |||
| ) |
Get HWND of containing window.
| [in] | he | HELEMENT |
| [out] | p_hwnd | HWND*, variable to receive window handle |
| [in] | rootWindow | BOOL, handle of which window to get:
|
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetElementIndex | ( | HELEMENT | he, | |
| LPUINT | p_index | |||
| ) |
Get element index.
| [in] | he | HELEMENT |
| [out] | p_index | LPUINT, variable to receive number of the element among parent element's subelements. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetElementInnerText | ( | HELEMENT | he, | |
| LPBYTE * | utf8bytes | |||
| ) |
Get inner text of the element.
| [in] | he | HELEMENT |
| [out] | utf8bytes | pointer to byte address receiving UTF8 encoded plain text |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetElementInnerText16 | ( | HELEMENT | he, | |
| LPWSTR * | utf16words | |||
| ) |
Get inner text of the element as LPWSTR (utf16 words).
| [in] | he | HELEMENT |
| [out] | utf16words | pointer to byte address receiving UTF16 encoded plain text |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetElementText | ( | HELEMENT | he, | |
| LPWSTR | characters, | |||
| LPUINT | length | |||
| ) |
Get text of the element and information where child elements are placed.
| [in] | he | HELEMENT |
| [out] | characters | LPWSTR, buffer to receive text. Zero characters '\0' will be inserted at places where subelements should be. |
| [in,out] | length | LPUINT, at input it is length of the characters array, after function call it is actual amount of characters written. |
characters can be NULL. In this case HTMEngine will just set length equal to number of characters in this element.
<p>Hello <b>wonderfull</b> <i>world</i>!</p>
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetElementType | ( | HELEMENT | he, | |
| LPCSTR * | p_type | |||
| ) |
Get element's type.
| [in] | he | HELEMENT |
| [out] | p_type | LPCSTR*, receives name of the element type. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetElementUID | ( | HELEMENT | he, | |
| UINT * | puid | |||
| ) |
Get Element UID.
| [in] | he | HELEMENT |
| [out] | puid | UINT*, variable to receive UID of the element. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetFocusElement | ( | HWND | hwnd, | |
| HELEMENT * | phe | |||
| ) |
Get focused DOM element of HTML document.
| [in] | hwnd | HWND, HTMLayout window for which you need to get focus element |
| [out] | phe | HELEMENT*, variable to receive focus element |
COMMENT: To set focus on element use HTMLayoutSetElementState(STATE_FOCUS,0)
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetNthAttribute | ( | HELEMENT | he, | |
| UINT | n, | |||
| LPCSTR * | p_name, | |||
| LPCWSTR * | p_value | |||
| ) |
Get value of any element's attribute by attribute's number.
| [in] | he | HELEMENT |
| [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 |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetNthChild | ( | HELEMENT | he, | |
| UINT | n, | |||
| HELEMENT * | phe | |||
| ) |
Get handle of every element's child element.
| [in] | he | HELEMENT |
| [in] | n | UINT, number of the child element |
| [out] | phe | HELEMENT*, variable to receive handle of the child element |
<p>Hello <b>wonderfull</b> world!</p>
<b>wonderfull</b>
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetParentElement | ( | HELEMENT | he, | |
| HELEMENT * | p_parent_he | |||
| ) |
Get parent element.
| [in] | he | HELEMENT, element which parent you need |
| [out] | p_parent_he | HELEMENT*, variable to recieve handle of the parent element |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetRootElement | ( | HWND | hwnd, | |
| HELEMENT * | phe | |||
| ) |
Get root DOM element of HTML document.
| [in] | hwnd | HWND, HTMLayout window for which you need to get root element |
| [out] | phe | HELEMENT*, variable to receive root element |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetScrollInfo | ( | HELEMENT | he, | |
| LPPOINT | scrollPos, | |||
| LPRECT | viewRect, | |||
| LPSIZE | contentSize | |||
| ) |
HTMLayoutGetScrollInfo - get scroll info of element with overflow:scroll or auto.
| [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. |
| EXTERN_C HLDOM_RESULT HLAPI HTMLayoutGetStyleAttribute | ( | HELEMENT | he, | |
| LPCSTR | name, | |||
| LPCWSTR * | p_value | |||
| ) |
Get element's style attribute.
| [in] |