NVDA Helper
In-process and lite high-speed utilities for NVDA
VBuf Interface Reference

Renders content in to a virtual buffer. More...

import <vbuf.idl;

Public Types

typedef voidVBufRemote_bufferHandle_t
 
typedef unsigned hyper VBufRemote_nodeHandle_t
 

Public Member Functions

VBufRemote_bufferHandle_t createBuffer ([in] handle_t bindingHandle, [in] int docHandle, [in] int ID, [in, string] const wchar_t *backendName)
 Creates a new virtualBuffer.
 
void destroyBuffer ([in, out] VBufRemote_bufferHandle_t *buffer)
 Destroies a virtual buffer.
 
int getFieldNodeOffsets ([in] VBufRemote_bufferHandle_t buffer, [in] VBufRemote_nodeHandle_t node, [out] int *startOffset, [out] int *endOffset)
 Calculates the start and end character offsets of the given node in the buffer.
 
int isFieldNodeAtOffset ([in] VBufRemote_bufferHandle_t buffer, [in] VBufRemote_nodeHandle_t node, [in] int offset)
 finds out if a given field is positioned at a given character offset in this buffer.
 
int locateTextFieldNodeAtOffset ([in] VBufRemote_bufferHandle_t buffer, [in] int offset, [out] int *nodeStartOffset, [out] int *nodeEndOffset, [out] VBufRemote_nodeHandle_t *foundNode)
 locates the text field node at the given offset
 
int locateControlFieldNodeAtOffset ([in] VBufRemote_bufferHandle_t buffer, [in] int offset, [out] int *startOffset, [out] int *endOffset, [out] int *docHandle, [out] int *ID, [out] VBufRemote_nodeHandle_t *foundNode)
 locates the deepest control field node at the given offset
 
int getControlFieldNodeWithIdentifier ([in] VBufRemote_bufferHandle_t buffer, [in] int docHandle, [in] int ID, [out] VBufRemote_nodeHandle_t *foundNode)
 locates the controlFieldNode with the given identifier
 
int getIdentifierFromControlFieldNode ([in] VBufRemote_bufferHandle_t buffer, [in] VBufRemote_nodeHandle_t node, [out] int *docHandle, [out] int *ID)
 Retreaves the identifier for the given controlFieldNode.
 
int findNodeByAttributes ([in] VBufRemote_bufferHandle_t buffer, [in] int offset, [in] int direction, [in, string] const wchar_t *attribs, [in, string] const wchar_t *regexp, [out] int *startOffset, [out] int *endOffset, [out] VBufRemote_nodeHandle_t *foundNode)
 Finds a field node that contains particular attributes.
 
int getSelectionOffsets ([in] VBufRemote_bufferHandle_t buffer, [out] int *startOffset, [out] int *endOffset)
 Retreaves the current selection offsets for the buffer.
 
int setSelectionOffsets ([in] VBufRemote_bufferHandle_t buffer, [in] int startOffset, [in] int endOffset)
 sets the selection offsets for the buffer.
 
int getTextLength ([in] VBufRemote_bufferHandle_t buffer) const
 retreaves the length of all the text in the buffer.
 
int getTextInRange ([in] VBufRemote_bufferHandle_t buffer, [in] int startOffset, [in] int endOffset, [out, string] BSTR *text, [in] boolean useMarkup)
 Retreaves the text in the buffer between given offsets, optionally containing markup.
 
int getLineOffsets ([in] VBufRemote_bufferHandle_t buffer, [in] int offset, [in] int maxLineLength, [in] boolean useScreenLayout, [out] int *startOffset, [out] int *endOffset)
 Expands the given offset to the start and end offsets of the containing line.
 

Detailed Description

Renders content in to a virtual buffer.

Member Typedef Documentation

◆ VBufRemote_bufferHandle_t

◆ VBufRemote_nodeHandle_t

Member Function Documentation

◆ createBuffer()

VBufRemote_bufferHandle_t VBuf::createBuffer ( [in] handle_t bindingHandle,
[in] int docHandle,
[in] int ID,
[in, string] const wchar_t * backendName )

Creates a new virtualBuffer.

Parameters
bindingHandlethe binding handle for the inproc worker's rpc server
docHandleuniquely identifies the document or window being virtualized
IDuniquely identifies the object with in the document or window where rendering should start from
backendNameThe name of the backend (the path to the correct dll will be calculated automatically)
Returns
a handle identifying the new virtual buffer.

◆ destroyBuffer()

void VBuf::destroyBuffer ( [in, out] VBufRemote_bufferHandle_t * buffer)

Destroies a virtual buffer.

Parameters
buffera pointer to the virtual buffer you want to destroy

◆ getFieldNodeOffsets()

int VBuf::getFieldNodeOffsets ( [in] VBufRemote_bufferHandle_t buffer,
[in] VBufRemote_nodeHandle_t node,
[out] int * startOffset,
[out] int * endOffset )

Calculates the start and end character offsets of the given node in the buffer.

Parameters
bufferthe virtual buffer to use
nodethe node you want the offsets of.
startOffsetmemory where this method can place the found start offset.
endOffsetmemory where this method can place the found end offset.
Returns
true if successful, false otherwize.

◆ isFieldNodeAtOffset()

int VBuf::isFieldNodeAtOffset ( [in] VBufRemote_bufferHandle_t buffer,
[in] VBufRemote_nodeHandle_t node,
[in] int offset )

finds out if a given field is positioned at a given character offset in this buffer.

Parameters
bufferthe virtual buffer you are interested in
nodethe field you are interested in.
offsetthe character offset you are interested in.
Returns
true if the field is at the offset, false otherwise.

◆ locateTextFieldNodeAtOffset()

int VBuf::locateTextFieldNodeAtOffset ( [in] VBufRemote_bufferHandle_t buffer,
[in] int offset,
[out] int * nodeStartOffset,
[out] int * nodeEndOffset,
[out] VBufRemote_nodeHandle_t * foundNode )

locates the text field node at the given offset

Parameters
bufferthe virtual buffer to use
offsetthe offset to use
nodeStartOffsetmemory where the found text field's start offset will be placed.
nodeEndOffsetmemory where the found text field's end offset will be placed.
foundNodethe located text field node.
Returns
non-zero if the node is found.

◆ locateControlFieldNodeAtOffset()

int VBuf::locateControlFieldNodeAtOffset ( [in] VBufRemote_bufferHandle_t buffer,
[in] int offset,
[out] int * startOffset,
[out] int * endOffset,
[out] int * docHandle,
[out] int * ID,
[out] VBufRemote_nodeHandle_t * foundNode )

locates the deepest control field node at the given offset

Parameters
bufferthe virtual buffer to use
offsetthe offset to use
startOffsetmemory where the found text field's start offset will be placed.
endOffsetmemory where the found text field's end offset will be placed.
docHandlememory where the docHandle of the found control field node will be placed.
IDmemory where the ID of the found control field node will be placed.
foundNodethe located control field node.
Returns
non-zero if the node is found.

◆ getControlFieldNodeWithIdentifier()

int VBuf::getControlFieldNodeWithIdentifier ( [in] VBufRemote_bufferHandle_t buffer,
[in] int docHandle,
[in] int ID,
[out] VBufRemote_nodeHandle_t * foundNode )

locates the controlFieldNode with the given identifier

Parameters
bufferthe virtual buffer to use
docHandlethe docHandle of the control field node you wish to find
IDthe ID of the control field node you wish to find
foundNodethe controlFieldNode with the given identifier
Returns
non-zero if the node is found.

◆ getIdentifierFromControlFieldNode()

int VBuf::getIdentifierFromControlFieldNode ( [in] VBufRemote_bufferHandle_t buffer,
[in] VBufRemote_nodeHandle_t node,
[out] int * docHandle,
[out] int * ID )

Retreaves the identifier for the given controlFieldNode.

Parameters
bufferthe virtual buffer to use
nodethe controlFieldNode who's identifier should be retreaved.
docHandlea memory address where the docHandle should be placed.
IDa memory address where the ID should be placed.
Returns
non-0 if successfull.

◆ findNodeByAttributes()

int VBuf::findNodeByAttributes ( [in] VBufRemote_bufferHandle_t buffer,
[in] int offset,
[in] int direction,
[in, string] const wchar_t * attribs,
[in, string] const wchar_t * regexp,
[out] int * startOffset,
[out] int * endOffset,
[out] VBufRemote_nodeHandle_t * foundNode )

Finds a field node that contains particular attributes.

Parameters
bufferthe virtual buffer to use
offsetoffset in the buffer to start searching from
directionwhich direction to search
attribsthe attributes to search
regexpregular expression the requested attributes must match
startOffsetmemory where the start offset of the found node can be placed
endOffsetmemory where the end offset of the found node will be placed
foundNodethe found field node
Returns
non-zero if the node is found.

◆ getSelectionOffsets()

int VBuf::getSelectionOffsets ( [in] VBufRemote_bufferHandle_t buffer,
[out] int * startOffset,
[out] int * endOffset )

Retreaves the current selection offsets for the buffer.

Parameters
bufferthe virtual buffer to use
startOffsetmemory where the start offset of the selection will be placed
endOffsetmemory where the end offset of the selection will be placed
Returns
true if successfull, false otherwize.

◆ setSelectionOffsets()

int VBuf::setSelectionOffsets ( [in] VBufRemote_bufferHandle_t buffer,
[in] int startOffset,
[in] int endOffset )

sets the selection offsets for the buffer.

Parameters
bufferthe virtual buffer to use
startOffsetthe offset the start of the selection should be set to.
endOffsetthe offset the end of the selection should be set to.
Returns
true if successfull, false otherwize.

◆ getTextLength()

int VBuf::getTextLength ( [in] VBufRemote_bufferHandle_t buffer) const

retreaves the length of all the text in the buffer.

Parameters
bufferthe virtual buffer to use
Returns
the length in characters of the text

◆ getTextInRange()

int VBuf::getTextInRange ( [in] VBufRemote_bufferHandle_t buffer,
[in] int startOffset,
[in] int endOffset,
[out, string] BSTR * text,
[in] boolean useMarkup )

Retreaves the text in the buffer between given offsets, optionally containing markup.

Parameters
bufferthe virtual buffer to use
startOffsetthe offset to start from
endOffsetthe offset to end at. Use -1 to mean end of buffer.
textreceives a pointer to the text in the given range
useMarkupif true then markup is included in the text denoting field starts and ends.
Returns
the text.

◆ getLineOffsets()

int VBuf::getLineOffsets ( [in] VBufRemote_bufferHandle_t buffer,
[in] int offset,
[in] int maxLineLength,
[in] boolean useScreenLayout,
[out] int * startOffset,
[out] int * endOffset )

Expands the given offset to the start and end offsets of the containing line.

Parameters
bufferthe virtual buffer to use
offsetthe offset to expand.
maxLineLengththe maximum length of a line.
useScreenLayoutif true then lines will only break on block controls or line feed characters, if false then lines will break on all field nodes.
startOffsetmemory to place the calculated line start offset
endOffsetmemory to place the calculated line end offset
Returns
true if successfull, false otherwize.

The documentation for this interface was generated from the following file: