htmlite.h File Reference

HTMLite - Windowless but still interactive HTML/CSS engine. More...

#include "htmlayout.h"

Defines

#define HLN_REFRESH_AREA   0xAFF + 0x20
 REFRESH_AREA notification.
#define HLN_SET_TIMER   0xAFF + 0x21
 HLN_SET_TIMER notification.
#define HLN_SET_CURSOR   0xAFF + 0x22
 HLN_SET_CURSOR notification.

Functions

EXTERN_C HTMLITE HLAPI HTMLiteCreateInstance ()
 Create instance of the engine.
EXTERN_C HPRESULT HLAPI HTMLiteDestroyInstance (HTMLITE hLite)
 Destroy instance of the engine.
EXTERN_C HPRESULT HLAPI HTMLiteSetTag (HTMLITE hLite, LPVOID tag)
 Set custom tag value to the instance of the engine.
EXTERN_C HPRESULT HLAPI HTMLiteGetTag (HTMLITE hLite, LPVOID *tag)
 Get custom tag value from the instance of the engine.
EXTERN_C HPRESULT HLAPI HTMLiteLoadHtmlFromFile (HTMLITE hLite, LPCWSTR path)
 Load HTML from file.
EXTERN_C HPRESULT HLAPI HTMLiteLoadHtmlFromMemory (HTMLITE hLite, LPCWSTR baseURI, LPCBYTE dataptr, DWORD datasize)
 Load HTML from memory buffer.
EXTERN_C HPRESULT HLAPI HTMLiteMeasure (HTMLITE hLite, INT viewWidth, INT viewHeight)
 Measure loaded HTML.
EXTERN_C HPRESULT HLAPI HTMLiteRender (HTMLITE hLite, HDC hdc, INT x, INT y, INT sx, INT sy)
 Render HTML.
EXTERN_C HPRESULT HLAPI HTMLiteRenderOnBitmap (HTMLITE hLite, HBITMAP hbmp, INT x, INT y, INT sx, INT sy)
 Render HTML on 24bpp or 32bpp dib.
EXTERN_C HPRESULT HLAPI HTMLiteSetDataReady (HTMLITE hLite, LPCSTR url, LPCBYTE data, DWORD dataSize)
 This function is used in response to HLN_LOAD_DATA request.
EXTERN_C HPRESULT HLAPI HTMLiteGetDocumentMinWidth (HTMLITE hLite, LPINT v)
 Get minimum width of loaded document.
EXTERN_C HPRESULT HLAPI HTMLiteGetDocumentMinHeight (HTMLITE hLite, LPINT v)
 Get minimum height of loaded document.
EXTERN_C HPRESULT HLAPI HTMLiteSetMediaType (HTMLITE hLite, LPCSTR mediatype)
 Set media type for CSS engine, use this before loading the document
See also:
: http://www.w3.org/TR/REC-CSS2/media.html.

EXTERN_C HPRESULT HLAPI HTMLiteGetRootElement (HTMLITE hLite, HELEMENT *phe)
 Get root DOM element of loaded HTML document.
EXTERN_C HPRESULT HLAPI HTMLiteFindElement (HTMLITE hLite, INT x, INT y, HELEMENT *phe)
 Find DOM element by point (x,y).
EXTERN_C HPRESULT HLAPI HTMLiteSetCallback (HTMLITE hLite, HTMLITE_CALLBACK *cb)
 Set callback function.


Detailed Description

HTMLite - Windowless but still interactive HTML/CSS engine.


Define Documentation

#define HLN_REFRESH_AREA   0xAFF + 0x20

REFRESH_AREA notification.

#define HLN_SET_CURSOR   0xAFF + 0x22

HLN_SET_CURSOR notification.

#define HLN_SET_TIMER   0xAFF + 0x21

HLN_SET_TIMER notification.


Function Documentation

EXTERN_C HTMLITE HLAPI HTMLiteCreateInstance (  ) 

Create instance of the engine.

Returns:
HTMLITE, instance handle of the engine.

EXTERN_C HPRESULT HLAPI HTMLiteDestroyInstance ( HTMLITE  hLite  ) 

Destroy instance of the engine.

Parameters:
[in] hLite HTMLITE, handle.
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteFindElement ( HTMLITE  hLite,
INT  x,
INT  y,
HELEMENT phe 
)

Find DOM element by point (x,y).

Parameters:
[in] hLite HTMLITE, handle.
[in] x INT, x coordinate of the point.
[in] y INT, y coordinate of the point.
[in] phe HELEMENT*, address of variable receiving handle of the element or 0 if there are no such element.
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteGetRootElement ( HTMLITE  hLite,
HELEMENT phe 
)

Get root DOM element of loaded HTML document.

Parameters:
[in] hLite HTMLITE, handle.
[out] phe HELEMENT*, address of variable receiving handle of the root element (<html>).
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteGetTag ( HTMLITE  hLite,
LPVOID *  tag 
)

Get custom tag value from the instance of the engine.

Parameters:
[in] hLite HTMLITE, handle.
[in] tag LPVOID*, pointer to value receiving tag value.
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteLoadHtmlFromFile ( HTMLITE  hLite,
LPCWSTR  path 
)

Load HTML from file.

Parameters:
[in] hLite HTMLITE, handle.
[out] path LPCWSTR, path or URL of the html file to load.
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteLoadHtmlFromMemory ( HTMLITE  hLite,
LPCWSTR  baseURI,
LPCBYTE  dataptr,
DWORD  datasize 
)

Load HTML from memory buffer.

Parameters:
[in] hLite HTMLITE, handle.
[in] baseURI LPCWSTR, base url.
[in] dataptr LPCBYTE, pointer to the buffer
[in] datasize DWORD, length of the data in the buffer
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteMeasure ( HTMLITE  hLite,
INT  viewWidth,
INT  viewHeight 
)

Measure loaded HTML.

Parameters:
[in] hLite HTMLITE, handle.
[in] viewWidth INT, width of the view area.
[in] viewHeight INT, height of the view area.
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteRender ( HTMLITE  hLite,
HDC  hdc,
INT  x,
INT  y,
INT  sx,
INT  sy 
)

Render HTML.

Parameters:
[in] hLite HTMLITE, handle.
[in] hdc HDC, device context
[in] x INT,
[in] y INT,
[in] sx INT,
[in] sy INT, "dirty" rectangle coordinates.
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteRenderOnBitmap ( HTMLITE  hLite,
HBITMAP  hbmp,
INT  x,
INT  y,
INT  sx,
INT  sy 
)

Render HTML on 24bpp or 32bpp dib.

Parameters:
[in] hLite HTMLITE, handle.
[in] hbmp HBITMAP, device context
[in] x INT,
[in] y INT,
[in] sx INT,
[in] sy INT, "dirty" rectangle coordinates.
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteSetCallback ( HTMLITE  hLite,
HTMLITE_CALLBACK *  cb 
)

Set callback function.

Parameters:
[in] hLite HTMLITE, handle.
[in] cb HTMLITE_CALLBACK, address of callback function.
Returns:
HPRESULT.

EXTERN_C HPRESULT HLAPI HTMLiteSetDataReady ( HTMLITE  hLite,
LPCSTR  url,
LPCBYTE  data,
DWORD  dataSize 
)

This function is used in response to HLN_LOAD_DATA request.

Parameters:
[in] hLite HTMLITE, handle.
[in] uri LPCWSTR, URI of the data requested by HTMLayout.
[in] data LPBYTE, pointer to data buffer.
[in] dataSize DWORD, length of the data in bytes.

EXTERN_C HPRESULT HLAPI HTMLiteSetTag ( HTMLITE  hLite,
LPVOID  tag 
)

Set custom tag value to the instance of the engine.

Parameters:
[in] hLite HTMLITE, handle.
[in] tag LPVOID, any pointer.
Returns:
HPRESULT.


Generated on Fri May 18 22:05:12 2007 for HTMLayout by  doxygen 1.5.1-p1