Methods Summary |
---|
public byte[] | captureScreen()Capture the current contents of the physical display in the form of a
byte array. The byte array may be some reduced form of the display, such
as a checksum or hash, but must be guaranteed unique for the display
such that no two differing displays will have the same return value
|
public void | registerHotKey(int action, int keyCode)Establish a specific key code for the given action to serve as
a 'hotkey'. The action must be one of START_RECORDING, STOP_RECORDING,
or CAPTURE_SCREEN.
|
public void | registerSequenceHandler(SequenceHandler handler)Establish a SequenceHandler to handle the completion of EventSequences.
and screen captures which occur as a result of a 'hotkey' press.
If a sequence handler is set, that handler will be called when any
event sequence is completed, either as a result of stopEventSequence()
being called, or as a result of some "hot key" being pressed which
the event handler recognizes as a signal to stop event recording.
The EventSequence object passed to the handler will be the same as
the return result of the stopEventSequence() method. If a handler has
already been set, and this method is called again the old handler will
be discarded and the new handler will be used. If 'null' is passed,
any previous handler will be discarded.
|
public boolean | replayEventSequence(EventSequence sequence)Replay a given event sequence. This will replay a sequence of
events represented in the given EventSequence object. It will
then capture the contents of the screen at the end of the event
sequence and compare it to the screen capture that is included
in the EventSequence object.
|
public boolean | replayEventSequence(EventSequence sequence, int speed)Replay a given event sequence. This will replay a sequence of
events represented in the given EventSequence object. It will
then capture the contents of the screen at the end of the event
sequence and compare it to the screen capture that is included
in the EventSequence object.
|
public void | startEventSequence()Start recording an event sequence. Any event sequence currently
being recorded will be destroyed and a new event sequence will
be started.
|
public EventSequence | stopEventSequence()Stop recording an event sequence. This will stop recording the
current event sequence and capture the current contents of the
screen. It will then return an EventSequence object which is
the representation of the entire event sequence as well as the
screen capture resulting at the end of the sequence. If no events
occurred during the capture, the sequence will simply be a timed
delay with a screen capture. The timed delay will be the time delay
between the call to startEventSequence() and stopEventSequence().
If stopEventSequence() is called without previously calling
startEventSequence(), an EventSequence will be returned which is
essentially "empty" and only contains the current contents of
the captured screen.
|
public EventSequence | updateScreenForSequence(EventSequence sequence)Update the screen capture for this event sequence. Over time, the
screen captures in a stored event sequence may become out of date.
Calling this method will run the given event sequence, capture
the resulting screen, and return the same EventSequence object
with the updated screen value.
|