#include <windows.h>
#include "htmlayout_dom.h"
#include "htmlayout_behavior.h"
Data Structures | |
| struct | tagNMHL_CREATE_CONTROL |
| This structure is used by HLN_CREATE_CONTROL and HLN_CONTROL_CREATED notifications. More... | |
| struct | tagNMHL_DESTROY_CONTROL |
| This structure is used by HLN_DESTROY_CONTROL notification. More... | |
| struct | tagNMHL_LOAD_DATA |
| This structure is used by HLN_LOAD_DATA notification. More... | |
| struct | tagNMHL_DATA_LOADED |
| This structure is used by HLN_DATA_LOADED notification. More... | |
| struct | tagNMHL_ATTACH_BEHAVIOR |
| This structure is used by HLN_ATTACH_BEHAVIOR notification. More... | |
| struct | tagNMHL_DIALOG_CLOSE_RQ |
| This structure is used by HLN_DIALOG_CLOSE_RQ notification. More... | |
Defines | |
| #define | HTMLayoutClassNameT HTMLayoutClassNameA |
| Returns name of HTMLayout window class. | |
| #define | HLN_CREATE_CONTROL 0xAFF + 0x01 |
| This notification is sent on parsing the document and while handling <INPUT>, <TEXTAREA>, <SELECT> and <WIDGET> tags. | |
| #define | HLN_LOAD_DATA 0xAFF + 0x02 |
| Notifies that HtmLayout is about to download a referred resource. | |
| #define | HLN_CONTROL_CREATED 0xAFF + 0x03 |
| This notification is sent when control creation process has completed. | |
| #define | HLN_DATA_LOADED 0xAFF + 0x04 |
| This notification indicates that external data (for example image) download process completed. | |
| #define | HLN_DOCUMENT_COMPLETE 0xAFF + 0x05 |
| This notification is sent when all external data (for example image) has been downloaded. | |
| #define | HLN_UPDATE_UI 0xAFF + 0x06 |
| This notification instructs host application to update its UI. | |
| #define | HLN_DESTROY_CONTROL 0xAFF + 0x07 |
| This notification is sent when HTMLayout destroys its controls. | |
| #define | HLN_ATTACH_BEHAVIOR 0xAFF + 0x08 |
| This notification is sent on parsing the document and while processing elements having non empty style.behavior attribute value. | |
| #define | HLN_DIALOG_CREATED 0xAFF + 0x10 |
| This notification is sent when dialog window created but document is not loaded. | |
| #define | HLN_DIALOG_CLOSE_RQ 0xAFF + 0x11 |
This notification is sent when dialog window is about to be closed
| |
| #define | HWND_TRY_DEFAULT ((HWND)0) |
| Create "default HTML control", used by HLN_CREATE_CONTROL notification as value for NMHL_CREATE_CONTROL::outControlHwnd. | |
| #define | HWND_DISCARD_CREATION ((HWND)1) |
| Do not create any controls, used by HLN_CREATE_CONTROL notification as value for NMHL_CREATE_CONTROL::outControlHwnd. | |
| #define | LOAD_OK 0 |
| Use default loader or outData/outDataSize if they are set, used as return value for HLN_CREATE_CONTROL notification. | |
| #define | LOAD_DISCARD 1 |
| Do not load resource at all, Used as return value for HLN_CREATE_CONTROL notification. | |
Typedefs | |
| typedef LRESULT CALLBACK | HTMLAYOUT_NOTIFY (UINT uMsg, WPARAM wParam, LPARAM lParam, LPVOID vParam) |
| Notification callback function. | |
| typedef tagNMHL_CREATE_CONTROL | NMHL_CREATE_CONTROL |
| This structure is used by HLN_CREATE_CONTROL and HLN_CONTROL_CREATED notifications. | |
| typedef tagNMHL_CREATE_CONTROL * | LPNMHL_CREATE_CONTROL |
| This structure is used by HLN_CREATE_CONTROL and HLN_CONTROL_CREATED notifications. | |
| typedef tagNMHL_DESTROY_CONTROL | NMHL_DESTROY_CONTROL |
| This structure is used by HLN_DESTROY_CONTROL notification. | |
| typedef tagNMHL_DESTROY_CONTROL * | LPNMHL_DESTROY_CONTROL |
| This structure is used by HLN_DESTROY_CONTROL notification. | |
| typedef tagNMHL_LOAD_DATA | NMHL_LOAD_DATA |
| This structure is used by HLN_LOAD_DATA notification. | |
| typedef tagNMHL_LOAD_DATA * | LPNMHL_LOAD_DATA |
| This structure is used by HLN_LOAD_DATA notification. | |
| typedef tagNMHL_DATA_LOADED | NMHL_DATA_LOADED |
| This structure is used by HLN_DATA_LOADED notification. | |
| typedef tagNMHL_DATA_LOADED * | LPNMHL_DATA_LOADED |
| This structure is used by HLN_DATA_LOADED notification. | |
| typedef tagNMHL_ATTACH_BEHAVIOR | NMHL_ATTACH_BEHAVIOR |
| This structure is used by HLN_ATTACH_BEHAVIOR notification. | |
| typedef tagNMHL_ATTACH_BEHAVIOR * | LPNMHL_ATTACH_BEHAVIOR |
| This structure is used by HLN_ATTACH_BEHAVIOR notification. | |
| typedef tagNMHL_DIALOG_CLOSE_RQ | NMHL_DIALOG_CLOSE_RQ |
| This structure is used by HLN_DIALOG_CLOSE_RQ notification. | |
| typedef tagNMHL_DIALOG_CLOSE_RQ * | LPNMHL_DIALOG_CLOSE_RQ |
| This structure is used by HLN_DIALOG_CLOSE_RQ notification. | |
| typedef BOOL CALLBACK | HTMLAYOUT_CALLBACK_RES (LPCWSTR resourceUri, LPCSTR resourceType, LPCBYTE imageData, DWORD imageDataSize) |
| Callback function used with HTMLayoutEnumResources(). | |
| typedef VOID(CALLBACK *) | DEBUG_OUTPUT_PROC (LPVOID param, INT character) |
| HTMLayoutSetupDebugOutput - setup debug output function. | |
Enumerations | |
| enum | HTMLayoutResourceType |
| Resource data type. More... | |
| enum | HTMLayoutModes { HLM_LAYOUT_ONLY = 0, HLM_SHOW_SELECTION = 1 } |
| HTMLayout operational modes. More... | |
| enum | HTMLAYOUT_OPTIONS |
| Set various options. More... | |
Functions | |
| EXTERN_C LPCSTR HLAPI | HTMLayoutClassNameA () |
| Get name of HTMLayout window class. | |
| EXTERN_C LPCWSTR HLAPI | HTMLayoutClassNameW () |
| Get name of HTMLayout window class. | |
| EXTERN_C BOOL HLAPI | HTMLayoutDataReady (HWND hwnd, LPCWSTR uri, LPBYTE data, DWORD dataLength) |
| This function is used in response to HLN_LOAD_DATA request. | |
| EXTERN_C BOOL HLAPI | HTMLayoutDataReadyAsync (HWND hwnd, LPCWSTR uri, LPBYTE data, DWORD dataLength, UINT dataType) |
| Use this function outside of HLN_LOAD_DATA request. | |
| EXTERN_C LRESULT HLAPI | HTMLayoutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) |
| HTMLayout Window Proc. | |
| EXTERN_C LRESULT HLAPI | HTMLayoutProcND (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL *pbHandled) |
| HTMLayout Window Proc without call of DefWindowProc. | |
| EXTERN_C UINT HLAPI | HTMLayoutGetMinWidth (HWND hWndHTMLayout) |
| Returns minimal width of the document. | |
| EXTERN_C UINT HLAPI | HTMLayoutGetMinHeight (HWND hWndHTMLayout, UINT width) |
| Returns minimal height of the document. | |
| EXTERN_C BOOL HLAPI | HTMLayoutLoadFile (HWND hWndHTMLayout, LPCWSTR filename) |
| Load HTML file. | |
| EXTERN_C BOOL HLAPI | HTMLayoutLoadHtml (HWND hWndHTMLayout, LPCBYTE html, UINT htmlSize) |
| Load HTML from in memory buffer. | |
| EXTERN_C BOOL HLAPI | HTMLayoutLoadHtmlEx (HWND hWndHTMLayout, LPCBYTE html, UINT htmlSize, LPCWSTR baseUrl) |
| Load HTML from in memory buffer with base. | |
| EXTERN_C VOID HLAPI | HTMLayoutSetMode (HWND hWndHTMLayout, int HTMLayoutMode) |
| Sets the HTMLayout operational mode . | |
| EXTERN_C VOID HLAPI | HTMLayoutSetCallback (HWND hWndHTMLayout, LPHTMLAYOUT_NOTIFY cb, LPVOID cbParam) |
| Set notification callback function . | |
| EXTERN_C BOOL HLAPI | HTMLayoutSelectionExist (HWND hWndHTMLayout) |
| Query whether user have selected some HTML text. | |
| EXTERN_C LPCBYTE HLAPI | HTMLayoutGetSelectedHTML (HWND hWndHTMLayout, LPUINT pSize) |
| Get selected HTML. | |
| EXTERN_C BOOL HLAPI | HTMLayoutClipboardCopy (HWND hWndHTMLayout) |
| Copies selection to clipboard. | |
| EXTERN_C UINT HLAPI | HTMLayoutEnumResources (HWND hWndHTMLayout, HTMLAYOUT_CALLBACK_RES *cb) |
| Enumerates resources loaded with current document. | |
| EXTERN_C BOOL HLAPI | HTMLayoutSetMasterCSS (LPCBYTE utf8, UINT numBytes) |
| Set Master style sheet. | |
| EXTERN_C BOOL HLAPI | HTMLayoutSetCSS (HWND hWndHTMLayout, LPCBYTE utf8, UINT numBytes, LPCWSTR baseUrl, LPCWSTR mediaType) |
| Set (reset) style sheet of current document. | |
| EXTERN_C BOOL HLAPI | HTMLayoutSetMediaType (HWND hWndHTMLayout, LPCWSTR mediaType) |
| Set media type of this htmlayout instance. | |
| EXTERN_C BOOL HLAPI | HTMLayoutSetHttpHeaders (HWND hWndHTMLayout, LPCSTR httpHeaders, UINT httpHeadersLength) |
| Set additional http headers that will be sent with each http request by this instance of the engine. | |
| EXTERN_C BOOL HLAPI | HTMLayoutRender (HWND hWndHTMLayout, HBITMAP hBmp, RECT area) |
| Render document to 24bpp or 32bpp bitmap (with alpha). | |
| EXTERN_C INT_PTR HLAPI | HTMLayoutDialog (HWND hWndParent, POINT position, INT alignment, UINT style, UINT styleEx, LPHTMLAYOUT_NOTIFY notificationCallback, LPELEMENT_EVENT_PROC eventsCallback, LPVOID callbackParam, LPCBYTE html, UINT htmlLength) |
| Show HTML based dialog. | |
| #define HLN_ATTACH_BEHAVIOR 0xAFF + 0x08 |
This notification is sent on parsing the document and while processing elements having non empty style.behavior attribute value.
| lParam | LPNMHL_ATTACH_BEHAVIOR |
| #define HLN_CONTROL_CREATED 0xAFF + 0x03 |
This notification is sent when control creation process has completed.
| lParam | LPNMHL_CREATE_CONTROL. |
SetWindowLong(((LPNMHL_CREATECONTROL)lParam)->outControlHwnd, GWL_ID, controlId)
| #define HLN_CREATE_CONTROL 0xAFF + 0x01 |
This notification is sent on parsing the document and while handling <INPUT>, <TEXTAREA>, <SELECT> and <WIDGET> tags.
| lParam | LPNMHL_CREATE_CONTROL. |
| #define HLN_DATA_LOADED 0xAFF + 0x04 |
This notification indicates that external data (for example image) download process completed.
| lParam | LPNMHL_DATA_LOADED |
| #define HLN_DESTROY_CONTROL 0xAFF + 0x07 |
This notification is sent when HTMLayout destroys its controls.
| lParam | LPNMHL_DESTROY_CONTROL Before loading new document HTMLayout destroys all controls belonging to previous document. Host application can reject deletion of the control by setting NMHL_DESTROY_CONTROL::inoutControlHwnd to zero. |
| #define HLN_DIALOG_CLOSE_RQ 0xAFF + 0x11 |
This notification is sent when dialog window is about to be closed
| lParam | LPNMHL_DIALOG_CLOSE_RQ |
| #define HLN_DIALOG_CREATED 0xAFF + 0x10 |
This notification is sent when dialog window created but document is not loaded.
| lParam | is a pointer to statndard NMHDR |
| #define HLN_DOCUMENT_COMPLETE 0xAFF + 0x05 |
This notification is sent when all external data (for example image) has been downloaded.
This notification is sent when all external resources required by document have been completely downloaded. HTMLayout will send this notification asynchronously.
| #define HLN_LOAD_DATA 0xAFF + 0x02 |
Notifies that HtmLayout is about to download a referred resource.
| lParam | LPNMHL_LOAD_DATA. |
| #define HLN_UPDATE_UI 0xAFF + 0x06 |
This notification instructs host application to update its UI.
This notification is sent on changes in HTMLayout formatting registers. If application indicates their state on toolbars or using other controls it should update them.
| #define HTMLayoutClassNameT HTMLayoutClassNameA |
Returns name of HTMLayout window class.
| typedef VOID(CALLBACK*) DEBUG_OUTPUT_PROC(LPVOID param, INT character) |
HTMLayoutSetupDebugOutput - setup debug output function.
This output function will be used for reprting problems found while loading html and css documents.
| typedef BOOL CALLBACK HTMLAYOUT_CALLBACK_RES(LPCWSTR resourceUri, LPCSTR resourceType, LPCBYTE imageData, DWORD imageDataSize) |
Callback function used with HTMLayoutEnumResources().
| [in] | resourceUri | LPCWSTR, uri used to download resource. |
| [in] | resourceType | LPCSTR, type of the resources. |
| [in] | imageData | LPCBYTE, address of resource data. |
| [in] | imageDataSize | DWORD, resource data size. |
TRUE - continue enumeration, FALSE - stop| typedef LRESULT CALLBACK HTMLAYOUT_NOTIFY(UINT uMsg, WPARAM wParam, LPARAM lParam, LPVOID vParam) |
Notification callback function.
| uMsg | UINT, WM_NOTIFY. | |
| wParam | WPARAM, control Id. | |
| lParam | LPARAM, depends on notification. | |
| vParam | LPVOID, value of cbParam parameter passed to HTMLayoutSetCallback function. |
| typedef struct tagNMHL_ATTACH_BEHAVIOR* LPNMHL_ATTACH_BEHAVIOR |
This structure is used by HLN_ATTACH_BEHAVIOR notification.
This notification is sent on parsing the document and while processing elements having non empty style.behavior attribute value.
| lParam | LPNMHL_ATTACH_BEHAVIOR |
| typedef struct tagNMHL_CREATE_CONTROL* LPNMHL_CREATE_CONTROL |
This structure is used by HLN_CREATE_CONTROL and HLN_CONTROL_CREATED notifications.
| lParam | LPNMHL_CREATE_CONTROL. |
| lParam | LPNMHL_CREATE_CONTROL. |
SetWindowLong(((LPNMHL_CREATECONTROL)lParam)->outControlHwnd, GWL_ID, controlId)
| typedef struct tagNMHL_DATA_LOADED* LPNMHL_DATA_LOADED |
This structure is used by HLN_DATA_LOADED notification.
This notification indicates that external data (for example image) download process completed.
| lParam | LPNMHL_DATA_LOADED |
| typedef struct tagNMHL_DESTROY_CONTROL* LPNMHL_DESTROY_CONTROL |
This structure is used by HLN_DESTROY_CONTROL notification.
This notification is sent when HTMLayout destroys its controls.
| lParam | LPNMHL_DESTROY_CONTROL Before loading new document HTMLayout destroys all controls belonging to previous document. Host application can reject deletion of the control by setting NMHL_DESTROY_CONTROL::inoutControlHwnd to zero. |
| typedef struct tagNMHL_DIALOG_CLOSE_RQ* LPNMHL_DIALOG_CLOSE_RQ |
This structure is used by HLN_DIALOG_CLOSE_RQ notification.
Notifies that HtmLayout is about to download a referred resource.
| lParam | LPNMHL_LOAD_DATA. |
| typedef struct tagNMHL_LOAD_DATA* LPNMHL_LOAD_DATA |
This structure is used by HLN_LOAD_DATA notification.
Notifies that HtmLayout is about to download a referred resource.
| lParam | LPNMHL_LOAD_DATA. |
| typedef struct tagNMHL_ATTACH_BEHAVIOR NMHL_ATTACH_BEHAVIOR |
This structure is used by HLN_ATTACH_BEHAVIOR notification.
This notification is sent on parsing the document and while processing elements having non empty style.behavior attribute value.
| lParam | LPNMHL_ATTACH_BEHAVIOR |
| typedef struct tagNMHL_CREATE_CONTROL NMHL_CREATE_CONTROL |
This structure is used by HLN_CREATE_CONTROL and HLN_CONTROL_CREATED notifications.
| lParam | LPNMHL_CREATE_CONTROL. |
| lParam | LPNMHL_CREATE_CONTROL. |
SetWindowLong(((LPNMHL_CREATECONTROL)lParam)->outControlHwnd, GWL_ID, controlId)
| typedef struct tagNMHL_DATA_LOADED NMHL_DATA_LOADED |
This structure is used by HLN_DATA_LOADED notification.
This notification indicates that external data (for example image) download process completed.
| lParam | LPNMHL_DATA_LOADED |
| typedef struct tagNMHL_DESTROY_CONTROL NMHL_DESTROY_CONTROL |
This structure is used by HLN_DESTROY_CONTROL notification.
This notification is sent when HTMLayout destroys its controls.
| lParam | LPNMHL_DESTROY_CONTROL Before loading new document HTMLayout destroys all controls belonging to previous document. Host application can reject deletion of the control by setting NMHL_DESTROY_CONTROL::inoutControlHwnd to zero. |
| typedef struct tagNMHL_DIALOG_CLOSE_RQ NMHL_DIALOG_CLOSE_RQ |
This structure is used by HLN_DIALOG_CLOSE_RQ notification.
Notifies that HtmLayout is about to download a referred resource.
| lParam | LPNMHL_LOAD_DATA. |
| typedef struct tagNMHL_LOAD_DATA NMHL_LOAD_DATA |
This structure is used by HLN_LOAD_DATA notification.
Notifies that HtmLayout is about to download a referred resource.
| lParam | LPNMHL_LOAD_DATA. |
| enum HTMLAYOUT_OPTIONS |
Set various options.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | option | UINT, id of the option, one of HTMLAYOUT_OPTIONS |
| [in] | option | UINT, value of the option. |
| enum HTMLayoutModes |
HTMLayout operational modes.
Used by HTMLayoutSetMode() function.
Resource data type.
Used by HTMLayoutDataReadyAsync() function.
| EXTERN_C LPCSTR HLAPI HTMLayoutClassNameA | ( | ) |
Get name of HTMLayout window class.
| EXTERN_C LPCWSTR HLAPI HTMLayoutClassNameW | ( | ) |
Get name of HTMLayout window class.
| EXTERN_C BOOL HLAPI HTMLayoutClipboardCopy | ( | HWND | hWndHTMLayout | ) |
Copies selection to clipboard.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| EXTERN_C BOOL HLAPI HTMLayoutDataReady | ( | HWND | hwnd, | |
| LPCWSTR | uri, | |||
| LPBYTE | data, | |||
| DWORD | dataLength | |||
| ) |
This function is used in response to HLN_LOAD_DATA request.
| [in] | hwnd | HWND, HTMLayout window handle. |
| [in] | uri | LPCWSTR, URI of the data requested by HTMLayout. |
| [in] | data | LPBYTE, pointer to data buffer. |
| [in] | dataLength | DWORD, length of the data in bytes. |
FALSE if error occured (for example this function was called outside of HLN_LOAD_DATA request).| EXTERN_C BOOL HLAPI HTMLayoutDataReadyAsync | ( | HWND | hwnd, | |
| LPCWSTR | uri, | |||
| LPBYTE | data, | |||
| DWORD | dataLength, | |||
| UINT | dataType | |||
| ) |
Use this function outside of HLN_LOAD_DATA request.
This function is needed when you you have your own http client implemented in your application.
| [in] | hwnd | HWND, HTMLayout window handle. |
| [in] | uri | LPCWSTR, URI of the data requested by HTMLayout. |
| [in] | data | LPBYTE, pointer to data buffer. |
| [in] | dataLength | DWORD, length of the data in bytes. |
| [in] | dataType | UINT, type of resource to load. See HTMLayoutResourceType. |
FALSE if error occured | EXTERN_C INT_PTR HLAPI HTMLayoutDialog | ( | HWND | hWndParent, | |
| POINT | position, | |||
| INT | alignment, | |||
| UINT | style, | |||
| UINT | styleEx, | |||
| LPHTMLAYOUT_NOTIFY | notificationCallback, | |||
| LPELEMENT_EVENT_PROC | eventsCallback, | |||
| LPVOID | callbackParam, | |||
| LPCBYTE | html, | |||
| UINT | htmlLength | |||
| ) |
Show HTML based dialog.
| [in] | hWndParent | HWND, parent window, can be NULL. |
| [in] | position | POINT, anchor point. |
| [in] | alignment | UINT, alignment of the window, defines corner of the dialog window 'position' points to: Values: 0 - center of the dialog in the center of the screen 1-9 - see NUMPAD digits for what 'position' defines. -1..-9 correspondent corner of the dilaog will be placed to the correspondent corner of window rectangle of hWndParent. Example: -9 dialog will be aligned to top/right corner of the parent window. |
| [in] | style | UINT, style of the dialog window. WS_***. |
| [in] | styleEx | UINT, extended style of the dialog window, WS_EX_***. |
| [in] | notificationCallback | LPHTMLAYOUT_NOTIFY, notifaction callback function, see HTMLayoutSetCallback. |
| [in] | eventsCallback | LPELEMENT_EVENT_PROC, event callback function, see HTMLayoutAttachEventHandler. |
| [in] | callbackParam | LPVOID, notifaction callback function, see HTMLayoutSetCallback. |
| [in] | html | either file name or pointer to buffer containing HTML |
| [in] | htmlLength | UINT, number of bytes in 'html'. If it is zero then 'html' points to LPCWSTR string - URL of the document to load. If it is not zero than it shall contain number of bytes in 'html' buffer. |
| EXTERN_C UINT HLAPI HTMLayoutEnumResources | ( | HWND | hWndHTMLayout, | |
| HTMLAYOUT_CALLBACK_RES * | cb | |||
| ) |
Enumerates resources loaded with current document.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | cb | HTMLAYOUT_CALLBACK_RES*, callback function. |
| EXTERN_C UINT HLAPI HTMLayoutGetMinHeight | ( | HWND | hWndHTMLayout, | |
| UINT | width | |||
| ) |
Returns minimal height of the document.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | width | UINT, desired width of the document. |
| EXTERN_C UINT HLAPI HTMLayoutGetMinWidth | ( | HWND | hWndHTMLayout | ) |
Returns minimal width of the document.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| EXTERN_C LPCBYTE HLAPI HTMLayoutGetSelectedHTML | ( | HWND | hWndHTMLayout, | |
| LPUINT | pSize | |||
| ) |
Get selected HTML.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [out] | pSize | LPUINT*, variable to recieve size of the returned buffer. |
| EXTERN_C BOOL HLAPI HTMLayoutLoadFile | ( | HWND | hWndHTMLayout, | |
| LPCWSTR | filename | |||
| ) |
Load HTML file.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | filename | LPCWSTR, File name of an HTML file. |
TRUE if the text was parsed and loaded successfully, FALSE otherwise. | EXTERN_C BOOL HLAPI HTMLayoutLoadHtml | ( | HWND | hWndHTMLayout, | |
| LPCBYTE | html, | |||
| UINT | htmlSize | |||
| ) |
Load HTML from in memory buffer.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | html | LPCBYTE, Address of HTML to load. |
| [in] | htmlSize | UINT, Length of the array pointed by html parameter. |
TRUE if the text was parsed and loaded successfully, FALSE otherwise. | EXTERN_C BOOL HLAPI HTMLayoutLoadHtmlEx | ( | HWND | hWndHTMLayout, | |
| LPCBYTE | html, | |||
| UINT | htmlSize, | |||
| LPCWSTR | baseUrl | |||
| ) |
Load HTML from in memory buffer with base.
| [in] | hWndHTMLayout | HWND, HTMLayout 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. |
TRUE if the text was parsed and loaded successfully, FALSE otherwise. | EXTERN_C LRESULT HLAPI HTMLayoutProc | ( | HWND | hwnd, | |
| UINT | msg, | |||
| WPARAM | wParam, | |||
| LPARAM | lParam | |||
| ) |
HTMLayout Window Proc.
| EXTERN_C LRESULT HLAPI HTMLayoutProcND | ( | HWND | hwnd, | |
| UINT | msg, | |||
| WPARAM | wParam, | |||
| LPARAM | lParam, | |||
| BOOL * | pbHandled | |||
| ) |
HTMLayout Window Proc without call of DefWindowProc.
| EXTERN_C BOOL HLAPI HTMLayoutRender | ( | HWND | hWndHTMLayout, | |
| HBITMAP | hBmp, | |||
| RECT | area | |||
| ) |
Render document to 24bpp or 32bpp bitmap (with alpha).
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | hBmp | hBmp, handle of DIB where to render HTML. DIB expected to be 24bpp or 32bpp |
| [in] | area | RECT, area on the bitmap to update. |
TRUE if hBmp is 24bpp or 32bpp, FALSE otherwise.| EXTERN_C BOOL HLAPI HTMLayoutSelectionExist | ( | HWND | hWndHTMLayout | ) |
Query whether user have selected some HTML text.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| EXTERN_C VOID HLAPI HTMLayoutSetCallback | ( | HWND | hWndHTMLayout, | |
| LPHTMLAYOUT_NOTIFY | cb, | |||
| LPVOID | cbParam | |||
| ) |
Set notification callback function .
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | cb | HTMLAYOUT_NOTIFY*, callback function . |
| [in] | cbParam | LPVOID, parameter that will be passed to callback function as vParam paramter. |
| EXTERN_C BOOL HLAPI HTMLayoutSetCSS | ( | HWND | hWndHTMLayout, | |
| LPCBYTE | utf8, | |||
| UINT | numBytes, | |||
| LPCWSTR | baseUrl, | |||
| LPCWSTR | mediaType | |||
| ) |
Set (reset) style sheet of current document.
Will reset styles for all elements according to given CSS (utf8)
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | utf8 | LPCBYTE, start of CSS buffer. |
| [in] | numBytes | UINT, number of bytes in utf8. |
| EXTERN_C BOOL HLAPI HTMLayoutSetHttpHeaders | ( | HWND | hWndHTMLayout, | |
| LPCSTR | httpHeaders, | |||
| UINT | httpHeadersLength | |||
| ) |
Set additional http headers that will be sent with each http request by this instance of the engine.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | httpHeaders | LPCSTR, headers. |
TRUE if headers were set successfully, FALSE otherwise - e.g. if hWndHTMLayout is not valid htmlayout window.Accept-Language: en
Multiple headers must be separated by CRLF pairs.
| EXTERN_C BOOL HLAPI HTMLayoutSetMasterCSS | ( | LPCBYTE | utf8, | |
| UINT | numBytes | |||
| ) |
Set Master style sheet.
See: http://www.terrainformatica.com/htmlayout/master_ss.css.txt Or resource section of the library for "master-css" HTML resource.
| [in] | utf8 | LPCBYTE, start of CSS buffer. |
| [in] | numBytes | UINT, number of bytes in utf8. |
| EXTERN_C BOOL HLAPI HTMLayoutSetMediaType | ( | HWND | hWndHTMLayout, | |
| LPCWSTR | mediaType | |||
| ) |
Set media type of this htmlayout instance.
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | mediaType | LPCWSTR, media type name. |
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.
| EXTERN_C VOID HLAPI HTMLayoutSetMode | ( | HWND | hWndHTMLayout, | |
| int | HTMLayoutMode | |||
| ) |
Sets the HTMLayout operational mode .
| [in] | hWndHTMLayout | HWND, HTMLayout window handle. |
| [in] | HTMLayoutMode | int, desired operational mode . |
1.5.1-p1