NVDA Helper
In-process and lite high-speed utilities for NVDA
|
#include <adobeAcrobat.h>
Public Member Functions | |
AdobeAcrobatVBufBackend_t (int docHandle, int ID) | |
![]() | |
VBufBackend_t (int docHandle, int ID) | |
constructor | |
virtual void | initialize () |
Initializes the state of the backend and performs an initial rendering of content. | |
virtual bool | invalidateSubtree (VBufStorage_controlFieldNode_t *) |
marks a particular node as invalid, so that its content is re-rendered on next update. | |
virtual void | forceUpdate () |
Forces any invalidated nodes to be updated right now. | |
virtual void | terminate () |
Clears the content of the backend and terminates any code used for rendering. | |
virtual void | destroy () |
Destructs and deletes the backend. | |
VBufStorage_controlFieldNode_t * | reuseExistingNodeInRender (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, int docHandle, int ID) |
Fetches an existing node from this backend, so that it can be added to a temporary buffer as a reference node during a partial render. | |
![]() | |
VBufStorage_buffer_t () | |
~VBufStorage_buffer_t () | |
Destructor. | |
VBufStorage_controlFieldNode_t * | addControlFieldNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, int docHandle, int ID, bool isBlock) |
Adds a control field in to the buffer. | |
VBufStorage_controlFieldNode_t * | addControlFieldNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, VBufStorage_controlFieldNode_t *node) |
VBufStorage_textFieldNode_t * | addTextFieldNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, const std::wstring &text) |
Adds a text field in to the buffer. | |
VBufStorage_textFieldNode_t * | addTextFieldNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, VBufStorage_textFieldNode_t *node) |
virtual bool | isNodeInBuffer (VBufStorage_fieldNode_t *node) |
finds out if the given node exists in this buffer. | |
bool | replaceSubtrees (std::map< VBufStorage_fieldNode_t *, VBufStorage_buffer_t * > &m) |
Removes the given nodes from the buffer and then merges the content of the new buffers in the removed node's position. | |
bool | removeFieldNode (VBufStorage_fieldNode_t *node, bool removeDescendants=true) |
disassociates from this buffer, and deletes, the given field and its descendants. | |
void | clearBuffer () |
virtual bool | getFieldNodeOffsets (VBufStorage_fieldNode_t *node, int *startOffset, int *endOffset) |
Calculates the start and end character offsets of the given node in the buffer. | |
virtual bool | isFieldNodeAtOffset (VBufStorage_fieldNode_t *node, int offset) |
finds out if a given field is positioned at a given character offset in this buffer. | |
virtual VBufStorage_textFieldNode_t * | locateTextFieldNodeAtOffset (int offset, int *nodeStartOffset, int *nodeEndOffset) |
locates the text field node at the given offset | |
virtual VBufStorage_controlFieldNode_t * | locateControlFieldNodeAtOffset (int offset, int *startOffset, int *endOffset, int *docHandle, int *ID) |
locates the deepest control field node at the given offset | |
virtual VBufStorage_controlFieldNode_t * | getControlFieldNodeWithIdentifier (int docHandle, int ID) |
locates the controlFieldNode with the given identifier | |
virtual bool | getIdentifierFromControlFieldNode (VBufStorage_controlFieldNode_t *node, int *docHandle, int *ID) |
Retreaves the identifier for the given controlFieldNode. | |
virtual VBufStorage_fieldNode_t * | findNodeByAttributes (int offset, VBufStorage_findDirection_t direction, const std::wstring &attribs, const std::wstring ®exp, int *startOffset, int *endOffset) |
Finds a field node that contains particular attributes. | |
virtual bool | getSelectionOffsets (int *startOffset, int *endOffset) const |
Retreaves the current selection offsets for the buffer. | |
virtual bool | setSelectionOffsets (int startOffset, int endOffset) |
sets the selection offsets for the buffer. | |
virtual int | getTextLength () const |
retreaves the length of all the text in the buffer. | |
virtual bool | getTextInRange (int startOffset, int endOffset, std::wstring &text, bool useMarkup=false) |
Retreaves the text in the buffer between given offsets, optionally containing markup. | |
virtual bool | getLineOffsets (int offset, int maxLineLength, bool useScreenLayout, int *startOffset, int *endOffset) |
Expands the given offset to the start and end offsets of the containing line. | |
virtual bool | hasContent () |
Does this buffer have content? true if there is content, false otherwise. | |
virtual bool | isDescendantNode (VBufStorage_fieldNode_t *parent, VBufStorage_fieldNode_t *descendant) |
Is one node a descendant of another. | |
VBufStorage_referenceNode_t * | addReferenceNodeToBuffer (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, VBufStorage_controlFieldNode_t *node) |
Adds a reference node to the buffer at the location given by parent and previous, pointing to the given existing node in another buffer. | |
virtual std::wstring | getDebugInfo () const |
Protected Member Functions | |
virtual void | renderThread_initialize () |
Sets up any code in the render thread. | |
virtual void | renderThread_terminate () |
Terminates any code in the render thread. | |
virtual void | render (VBufStorage_buffer_t *buffer, int docHandle, int ID, VBufStorage_controlFieldNode_t *oldNode) |
Renders content starting from the given doc handle and ID, in to the given buffer. | |
virtual | ~AdobeAcrobatVBufBackend_t () |
![]() | |
void | requestUpdate () |
Requests that the backend should update any invalid nodes when it can in the next little while. | |
void | cancelPendingUpdate () |
Cancels any pending request to update invalid nodes. | |
void | update () |
Updates the content of the buffer. | |
virtual | ~VBufBackend_t () |
Destructor, (protected as you must use the destroy method). | |
![]() | |
bool | unlinkFieldNode (VBufStorage_fieldNode_t *node, bool removeDescendants=true) |
Unlinks this node from its parent and siblings. | |
void | forgetControlFieldNode (VBufStorage_controlFieldNode_t *node) |
removes the controlFieldNode from the buffer's controlFieldNodesByIdentifier set. | |
bool | insertNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, VBufStorage_fieldNode_t *node) |
Inserts the given fieldNode in to the buffer's tree of nodes. | |
void | deleteSubtree (VBufStorage_fieldNode_t *node) |
disassociates the given node and its descendants from this buffer and deletes the node and its descendants. | |
void | deleteNode (VBufStorage_fieldNode_t *node) |
disassociates the given node from this buffer and deletes the node. | |
Static Protected Member Functions | |
static void CALLBACK | renderThread_winEventProcHook (HWINEVENTHOOK hookID, DWORD eventID, HWND hwnd, long objectID, long childID, DWORD threadID, DWORD time) |
Additional Inherited Members | |
![]() | |
const int | rootDocHandle |
identifies the window or document where the backend starts rendering from | |
const int | rootID |
Represents the ID in the window or document where the backend starts rendering. | |
LockableObject | lock |
Useful for cerializing access to the buffer. | |
![]() | |
VBufStorage_controlFieldNodeList_t | pendingInvalidSubtreesList |
the list of control field nodes that should be re-rendered the next time the backend is updated. | |
VBufStorage_controlFieldNodeList_t | workingInvalidSubtreesList |
The list of invalid subtrees currently being re-rendered by update. | |
const int | renderThreadID |
The thread ID of the rendering thread. | |
![]() | |
std::list< VBufStorage_referenceNode_t * > | referenceNodes |
Holds all the reference nodes for this buffer. | |
VBufStorage_fieldNode_t * | rootNode |
points to the first node in the tree of nodes. | |
std::set< VBufStorage_fieldNode_t * > | nodes |
Holds pointers to all nodes in the buffer. | |
std::map< VBufStorage_controlFieldNodeIdentifier_t, VBufStorage_controlFieldNode_t * > | controlFieldNodesByIdentifier |
holds pointers to all control field nodes in this buffer, searchable by the control's unique identifier. | |
int | selectionStart |
the offset at where the current selection starts. | |
int | selectionLength |
The length of the selection. | |
![]() | |
static VBufBackendSet_t | runningBackends |
The set of currently running backends. | |
|
protectedvirtual |
References LOG_DEBUG.
References LOG_DEBUG.
Referenced by AdobeAcrobatVBufBackend_t_createInstance().
|
protectedvirtual |
Sets up any code in the render thread.
Reimplemented from VBufBackend_t.
References LOG_DEBUG, registerWinEventHook(), VBufBackend_t::renderThread_initialize(), and renderThread_winEventProcHook().
|
protectedvirtual |
Terminates any code in the render thread.
Reimplemented from VBufBackend_t.
References LOG_DEBUG, VBufBackend_t::renderThread_terminate(), renderThread_winEventProcHook(), and unregisterWinEventHook().
|
protectedvirtual |
Renders content starting from the given doc handle and ID, in to the given buffer.
The buffer will always start off empty as even for subtree re-rendering, a temp buffer is provided.
buffer | the buffer to render content in. |
docHandle | the doc handle to start from |
ID | the ID to start from. |
oldNode | an optional node that will be replaced by the rendered content (useful for retreaving cached data) |
Implements VBufBackend_t.
References checkIsXFA(), getDocPagination(), IAccessibleFromIdentifier(), LOG_DEBUG, and nhAssert.