Scriptel ScripTouch ProScript C Library
This documentation contains information about the ScripTouch ProScript C Library.
|
This file contains the headers for the core of the Scriptel ScripTouch ProScript library. More...
Go to the source code of this file.
Data Structures | |
struct | scriptel_device_driver |
This structure contains function pointers to the functions required to interact with a device. More... | |
struct | scriptel_device |
This structure represents a physically attached Scriptel ScripTouch device. More... | |
Typedefs | |
typedef enum scriptel_hotplug_type | scriptel_hotplug_type |
This enumeration contains a list of codes indicating whether or not a device has been added to or removed from the system. | |
typedef enum scriptel_error_code | scriptel_error_code |
This enumeration contains all of the return codes that functions in this library can return. | |
typedef enum scriptel_font_alignment | scriptel_font_alignment |
This enumeration contains constants relating to the alignment of text. | |
typedef struct scriptel_device | scriptel_device |
This structure represents a physically attached Scriptel ScripTouch device. More... | |
typedef struct scriptel_device_driver | scriptel_device_driver |
This structure contains function pointers to the functions required to interact with a device. | |
typedef scriptel_error_code(* | scriptel_driver_init_func) (void) |
This typedef should initialize an abstract ScripTouch driver. | |
typedef scriptel_error_code(* | scriptel_driver_destroy_func) (scriptel_device_driver *driver) |
This typedef should destroy an abstract ScripTouch driver. | |
typedef scriptel_error_code(* | scriptel_open_device_func) (scriptel_device *) |
This typdef should open an abstract ScripTouch device. | |
typedef scriptel_error_code(* | scriptel_close_device_func) (scriptel_device *device) |
This typedef should close an abstract ScripTouch device. | |
typedef scriptel_error_code(* | scriptel_list_devices_func) (scriptel_device_driver *driver, scriptel_device **start) |
This typdef should list a set of abstract ScripTouch devices. | |
typedef scriptel_error_code(* | scriptel_read_device_func) (scriptel_device *device) |
This typedef should read from an abstract ScripTouch device. | |
typedef scriptel_error_code(* | scriptel_set_output_report_func) (scriptel_device *device, unsigned char *buffer, unsigned int length) |
This typedef should send an output report to an abstract ScripTouch device. | |
typedef scriptel_error_code(* | scriptel_set_feature_report_func) (scriptel_device *device, unsigned char *buffer, unsigned int length) |
This typedef should send a feature report to an abstract ScripTouch device. | |
typedef scriptel_error_code(* | scriptel_get_feature_report_func) (scriptel_device *device, unsigned char *buffer, unsigned int length) |
This typedef should get a feature report from an abstract ScripTouch device. | |
typedef unsigned char(* | scriptel_driver_thread_func) (void) |
This typedef should return whether or not there's a thread running for this driver. | |
typedef void(* | scriptel_driver_thread_wait_func) (void) |
This typedef should return wait for the device's thread to exit. | |
typedef char *(* | scriptel_get_driver_name_func) (void) |
This typedef should get a driver name from an abstract driver. | |
typedef void(* | scriptel_driver_shutdown_func) (void) |
This typedef gets called when ProScript is getting destroyed. | |
typedef scriptel_list *(* | get_hotplug_callbacks_func) (void) |
typedef scriptel_error_code(* | scriptel_driver_device_free_func) (scriptel_device *device) |
typedef void(* | scriptel_report_error_func) (char *fmt,...) |
typedef void(* | scriptel_debug_func) (const char *function, const char *file, int line_num, int level, char *message,...) |
typedef void(* | scriptel_deliver_input_report_func) (scriptel_device *device, unsigned char *report, unsigned int len) |
typedef void(* | scriptel_input_callback) (scriptel_device *device, scriptel_input_report *report, unsigned char report_id, unsigned char *report_buffer, unsigned int report_len) |
This function pointer type implements a function that can be called to pass information received from the device back to the client application. | |
typedef void(* | scriptel_hotplug_callback) (scriptel_hotplug_type type, char *device_path) |
This function pointer type implements a function that can be called to pass information about connected and disconnected devices back to the client application. | |
Enumerations | |
enum | scriptel_hotplug_type { SCRIPTEL_HOTPLUG_ATTACHED = 0 , SCRIPTEL_HOTPLUG_DETACHED = 1 } |
This enumeration contains a list of codes indicating whether or not a device has been added to or removed from the system. More... | |
enum | scriptel_error_code { SCRIPTEL_CODE_ERROR = 0 , SCRIPTEL_CODE_SUCCESS = 1 } |
This enumeration contains all of the return codes that functions in this library can return. More... | |
enum | scriptel_font_alignment { SCRIPTEL_ALIGN_LEFT = 0 , SCRIPTEL_ALIGN_RIGHT = 1 , SCRIPTEL_ALIGN_CENTER = 2 } |
This enumeration contains constants relating to the alignment of text. More... | |
Functions | |
scriptel_error_code | scriptel_list_devices (scriptel_device **start) |
This function takes a pointer and will attempt to enumerate any attached ScripTouch devices. More... | |
void | scriptel_free_device_list (scriptel_device *device_list) |
This function crawls a scriptel_device list and attempts to free any library managed memory associated with the list. More... | |
unsigned int | scriptel_count_device_list (scriptel_device *list) |
This function counts the number of devices in a given device list. More... | |
void | scriptel_init (void) |
This function should be called prior to using any other library functions. More... | |
void | scriptel_destroy (void) |
This function should be called when you're done with the library and no longer want to interact with any functionality in this library. More... | |
scriptel_error_code | scriptel_open_device (scriptel_device *device) |
This function attempts to open a local device returned by scriptel_list_devices(). More... | |
scriptel_error_code | scriptel_close_device (scriptel_device *device) |
This function attempts to close a local device that was previously opened. More... | |
char * | scriptel_get_last_error (void) |
This function gets the last error message generated by the library. More... | |
scriptel_error_code | scriptel_device_read (scriptel_device *device) |
This function attempts to read from the passed in device. More... | |
void | scriptel_device_read_until_done (scriptel_device *device) |
This function will start a new thread that will call scriptel_device_read() in a loop. More... | |
void | scriptel_device_read_done (scriptel_device *device) |
This function will signal the reading thread created by calling scriptel_device_read_until_done() that it should end and close the device. More... | |
void | scriptel_register_input_callback (scriptel_device *device, scriptel_input_callback callback) |
This function registers an input callback for a device. More... | |
void | scriptel_unregister_input_callback (scriptel_device *device, scriptel_input_callback callback) |
This function unregisters an input callback so that it will no longer be called when scriptel_device_read() receives input from a device. More... | |
void | scriptel_register_hotplug_callback (scriptel_hotplug_callback callback) |
This function registers a hot-plug callback for the system. More... | |
void | scriptel_unregister_hotplug_callback (scriptel_hotplug_callback callback) |
This function unregisters a hot-plug callback from the system. More... | |
scriptel_hid_feature_display_info | scriptel_get_display_info (scriptel_device *device) |
This function gets static display information from the device. More... | |
void | scriptel_get_output_configuration_ref (scriptel_device *device, scriptel_hid_feature_output_parameters *report) |
This function gets the output configuration information from the device. More... | |
scriptel_hid_feature_output_parameters | scriptel_get_output_configuration (scriptel_device *device) |
This function gets the output configuration information from the device. More... | |
scriptel_error_code | scriptel_set_output_configuration (scriptel_device *device, scriptel_hid_feature_output_parameters settings) |
This function sends the output configuration to the device. More... | |
void | scriptel_print_output_configuration (scriptel_hid_feature_output_parameters *settings) |
This function prints the information from an output parameters structure to standard out. More... | |
void | scriptel_get_peripheral_configuration_ref (scriptel_device *device, scriptel_hid_feature_peripheral_configuration *report) |
This function gets the peripheral configuration information from the device. More... | |
scriptel_hid_feature_peripheral_configuration | scriptel_get_peripheral_configuration (scriptel_device *device) |
This function gets the output configuration information from the device. More... | |
scriptel_error_code | scriptel_set_peripheral_configuration (scriptel_device *device, scriptel_hid_feature_peripheral_configuration settings) |
This function sends the output configuration to the device. More... | |
void | scriptel_print_peripheral_configuration (scriptel_hid_feature_peripheral_configuration *settings) |
This function prints the information from a peripheral configuration structure to standard out. More... | |
void | scriptel_get_calibration_data_ref (scriptel_device *device, scriptel_hid_feature_calibration_data *calibration_data) |
This function gets data about calibration. More... | |
scriptel_hid_feature_calibration_data | scriptel_get_calibration_data (scriptel_device *device) |
This function gets data about calibration. More... | |
scriptel_error_code | scriptel_set_calibration_data (scriptel_device *device, scriptel_hid_feature_calibration_data calibration_data) |
This function sends the calibration data to the device. More... | |
void | scriptel_print_calibration_data (scriptel_hid_feature_calibration_data *calibration_data) |
This function prints out the contents of the calibration data in human readable format. More... | |
void | scriptel_get_device_status_ref (scriptel_device *device, scriptel_hid_feature_device_status *status) |
This function gets the current status of the device. More... | |
scriptel_hid_feature_device_status | scriptel_get_device_status (scriptel_device *device) |
This function gets the current status of the device. More... | |
scriptel_error_code | scriptel_clear_last_error (scriptel_device *device) |
This function clears the error data from the device. More... | |
void | scriptel_print_device_status (scriptel_hid_feature_device_status *status) |
This function prints out the status structure in human readable format. More... | |
void | scriptel_get_display_info_ref (scriptel_device *device, scriptel_hid_feature_display_info *report) |
This function gets static display information from the device. More... | |
void | scriptel_print_display_info (scriptel_hid_feature_display_info *info) |
This function prints the information from a display information structure to standard out. More... | |
scriptel_hid_capabilities | scriptel_get_capabilities (scriptel_device *device) |
This function gets device capabilities (if supported). More... | |
void | scriptel_get_capabilities_ref (scriptel_device *device, scriptel_hid_capabilities *report) |
This function gets device capabilities (if supported). More... | |
void | scriptel_print_capabilities (scriptel_hid_capabilities *caps) |
This function prints the static device capabilities. More... | |
scriptel_hid_feature_display_settings | scriptel_get_display_settings (scriptel_device *device) |
This function gets dynamic display settings from the device. More... | |
void | scriptel_get_display_settings_ref (scriptel_device *device, scriptel_hid_feature_display_settings *report) |
This function gets dynamic display settings from the device. More... | |
void | scriptel_print_display_settings (scriptel_hid_feature_display_settings *settings) |
This function prints the information from a display settings structure to standard out. More... | |
scriptel_hid_feature_device_configure | scriptel_get_device_configure (scriptel_device *device) |
This function gets the active device configuration from a ScripTouch mouse device. More... | |
void | scriptel_get_device_configure_ref (scriptel_device *device, scriptel_hid_feature_device_configure *report) |
This function gets the active device configuration from a ScripTouch mouse device. More... | |
void | scriptel_print_device_configure (scriptel_hid_feature_device_configure *config) |
This function prints the device configuration to standard out. More... | |
scriptel_hid_feature_contact_count_maximum | scriptel_get_contact_count_maximum (scriptel_device *device) |
This function gets the maximum number of multi-touch contacts supported from a ScripTouch multi-touch device. More... | |
scriptel_error_code | scriptel_add_region_to_screen (scriptel_hid_feature_screen *screen, int region, int next) |
This function adds a region to the specified screen. More... | |
scriptel_error_code | scriptel_set_easyscript_mode (scriptel_device *device, char commit_changes) |
This function sets the device to easyscript mode if possible. More... | |
scriptel_error_code | scriptel_set_proscript_mode (scriptel_device *device, char commit_changes) |
This function sets the device to proscript mode if possible. More... | |
void | scriptel_get_contact_count_maximum_ref (scriptel_device *device, scriptel_hid_feature_contact_count_maximum *report) |
This function gets the maximum number of multi-touch contacts supported from a ScripTouch multi-touch device. More... | |
void | scriptel_print_contact_count_maximum (scriptel_hid_feature_contact_count_maximum *contact) |
This function prints the contact count maximum information to standard out. More... | |
scriptel_hid_feature_frequency_amplitude | scriptel_get_frequency_amplitude (scriptel_device *device) |
This function gets the current frequency and amplitude settings being used for the digitizer. More... | |
void | scriptel_get_frequency_amplitude_ref (scriptel_device *device, scriptel_hid_feature_frequency_amplitude *fa) |
This function gets the current frequency and amplitude settings being used for the digitizer. More... | |
void | scriptel_print_frequency_amplitude (scriptel_hid_feature_frequency_amplitude *freq) |
This function prints the a frequency and amplitude settings structure to standard out. More... | |
scriptel_hid_feature_power_state | scriptel_get_power_state (scriptel_device *device) |
This function gets the current power state of the device. More... | |
void | scriptel_print_power_state (scriptel_hid_feature_power_state *state) |
This function prints a power state structure to standard out. More... | |
scriptel_hid_feature_version | scriptel_get_version (scriptel_device *device) |
This function gets the current version of the device. More... | |
void | scriptel_get_version_ref (scriptel_device *device, scriptel_hid_feature_version *report) |
This function gets the current version of the device. More... | |
void | scriptel_print_version (scriptel_hid_feature_version *version) |
This function prints a version information structure to standard out. More... | |
scriptel_hid_feature_coordinate_range | scriptel_get_coordinate_range (scriptel_device *device) |
This function gets the logical coordinate range that will be returned from the device when points are delivered. More... | |
void | scriptel_get_coordinate_range_ref (scriptel_device *device, scriptel_hid_feature_coordinate_range *report) |
This function gets the logical coordinate range that will be returned from the device when points are delivered. More... | |
void | scriptel_print_coordinate_range (scriptel_hid_feature_coordinate_range *range) |
This function prints the logical coordinate range from the device to standard out. More... | |
scriptel_hid_feature_error_correction_table | scriptel_get_error_correction_table (scriptel_device *device) |
This function gets the error correction table from the device. More... | |
void | scriptel_get_error_correction_table_ref (scriptel_device *device, scriptel_hid_feature_error_correction_table *table) |
This function gets the error correction table from the device. More... | |
void | scriptel_print_error_correction_table (scriptel_hid_feature_error_correction_table *table) |
This function prints the error correction table to standard out. More... | |
scriptel_hid_feature_serial_number | scriptel_get_serial_number (scriptel_device *device) |
This function gets the serial number of the device (if set). More... | |
void | scriptel_get_serial_number_ref (scriptel_device *device, scriptel_hid_feature_serial_number *sn) |
This function gets the serial number of the device (if set). More... | |
void | scriptel_print_serial_number (scriptel_hid_feature_serial_number *serial) |
This function prints a serial number structure to standard out. More... | |
scriptel_hid_feature_operating_modes | scriptel_get_operating_modes (scriptel_device *device) |
This function gets supported operating modes from the device. More... | |
void | scriptel_get_operating_modes_ref (scriptel_device *device, scriptel_hid_feature_operating_modes *modes) |
This function gets supported operating modes from the device. More... | |
void | scriptel_print_operating_modes (scriptel_hid_feature_operating_modes *modes) |
This function prints a supported operating modes structure to standard out. More... | |
scriptel_hid_feature_general_parameters | scriptel_get_general_parameters (scriptel_device *device) |
This function gets general operating parameters from a device. More... | |
void | scriptel_get_general_parameters_ref (scriptel_device *device, scriptel_hid_feature_general_parameters *gparams) |
This function gets general operating parameters from a device. More... | |
void | scriptel_print_general_parameters (scriptel_hid_feature_general_parameters *params) |
This function prints a general operating parameters structure to standard out. More... | |
scriptel_hid_feature_register_get | scriptel_get_asic_register (scriptel_device *device) |
This function can be used to get the ASIC register from a device. More... | |
void | scriptel_get_asic_register_ref (scriptel_device *device, scriptel_hid_feature_register_get *reg) |
This function can be used to get the ASIC register from a device. More... | |
void | scriptel_print_asic_register (scriptel_hid_feature_register_get *reg) |
This function prints an ASIC register structure to standard out. More... | |
scriptel_hid_feature_pen_parameters | scriptel_get_pen_parameters (scriptel_device *device) |
This function gets operating parameters for pen input from the device. More... | |
void | scriptel_get_pen_parameters_ref (scriptel_device *device, scriptel_hid_feature_pen_parameters *report) |
This function gets operating parameters for pen input from the device. More... | |
void | scriptel_print_pen_parameters (scriptel_hid_feature_pen_parameters *pen) |
This function prints a pen parameters structure to standard out. More... | |
scriptel_hid_feature_touch_parameters | scriptel_get_touch_parameters (scriptel_device *device) |
This function gets operating parameters for touch input from the device. More... | |
void | scriptel_get_touch_parameters_ref (scriptel_device *device, scriptel_hid_feature_touch_parameters *report) |
This function gets operating parameters for touch input from the device. More... | |
void | scriptel_print_touch_parameters (scriptel_hid_feature_touch_parameters *touch) |
This function prints a touch parameters structure to standard out. More... | |
scriptel_device_region_info * | scriptel_get_regions (scriptel_device *device) |
This function gets the current list of regions from the device as an array. More... | |
scriptel_device_region_info * | scriptel_get_default_regions (scriptel_device *device) |
This function gets the default list of regions from the device as an array. More... | |
void | scriptel_free_regions (scriptel_device_region_info *regions) |
This function frees a region array returned from scriptel_get_regions() or scriptel_get_default_regions(). More... | |
void | scriptel_print_regions (scriptel_device_region_info *regions, unsigned int count) |
This function prints a set (1 or more) regions to standard out. More... | |
scriptel_hid_feature_region * | scriptel_get_device_regions (scriptel_device *device) |
This function gets the current list of regions from the device as an array. More... | |
void | scriptel_free_device_regions (scriptel_hid_feature_region *regions) |
This function frees a region array returned from scriptel_get_device_regions(). More... | |
void | scriptel_print_device_regions (scriptel_hid_feature_region *regions, unsigned int count) |
This function prints a set (1 or more) regions to standard out. More... | |
scriptel_hid_feature_calibrate | scriptel_get_calibrate_state (scriptel_device *device) |
This function returns the current calibration state of a device. More... | |
void | scriptel_get_calibrate_state_ref (scriptel_device *device, scriptel_hid_feature_calibrate *report) |
This function returns the current calibration state of a device. More... | |
void | scriptel_print_calibrate_state (scriptel_hid_feature_calibrate *state) |
This function prints a calibration state structure to standard out. More... | |
unsigned char * | scriptel_get_device_uuid (scriptel_device *device) |
This function returns the UUID of a device as a byte array. More... | |
void | scriptel_free_device_uuid (unsigned char *uuid) |
This function frees the UUID of a device. More... | |
void | scriptel_print_device_uuid (unsigned char *uuid) |
This function prints a UUID byte array to standard out. More... | |
scriptel_error_code | scriptel_set_run_mode (scriptel_device *device, scriptel_device_run_mode run_mode) |
This function sets the run mode of the device. More... | |
scriptel_error_code | scriptel_set_device_configure (scriptel_device *device, scriptel_hid_feature_device_configure configure) |
This function sets the device configuration on ScripTouch mouse devices. More... | |
scriptel_error_code | scriptel_set_frequency_amplitude (scriptel_device *device, scriptel_hid_feature_frequency_amplitude freq) |
This function sets the frequency and amplitude settings for a device. More... | |
scriptel_error_code | scriptel_set_power_state (scriptel_device *device, scriptel_hid_feature_power_state state) |
This function sets the power state of the device. More... | |
scriptel_error_code | scriptel_set_firmware (scriptel_device *device, scriptel_hid_feature_firmware_download firmware) |
This function sets a firmware page on the device. More... | |
scriptel_error_code | scriptel_set_firmware_download_status (scriptel_device *device, scriptel_hid_feature_download_command_status status) |
This function is used to indicate to a device that the firmware download is complete. More... | |
scriptel_error_code | scriptel_set_error_correction (scriptel_device *device, scriptel_hid_feature_error_correction_table errcor) |
This function can be used to set the sensor error correction table on the device. More... | |
scriptel_error_code | scriptel_set_serial_number (scriptel_device *device, char *serial_number, unsigned int len) |
This function can be used to set the serial number on a device. More... | |
scriptel_error_code | scriptel_set_startup_mode (scriptel_device *device, scriptel_device_acquisition_mode mode) |
This function can be used to set the default start up mode of a device. More... | |
scriptel_error_code | scriptel_set_general_parameters (scriptel_device *device, scriptel_hid_feature_general_parameters params) |
This function can be used to update general operating parameters. More... | |
scriptel_error_code | scriptel_set_asic_reset (scriptel_device *device, scriptel_hid_feature_asic_reset reset) |
This function resets the internal digitizer ASIC. More... | |
scriptel_error_code | scriptel_set_asic_register (scriptel_device *device, scriptel_hid_feature_register_set reg) |
This function sets a register in the digitizer ASIC. More... | |
scriptel_error_code | scriptel_set_pen_parameters (scriptel_device *device, scriptel_hid_feature_pen_parameters params) |
This function sets the operating parameters for pen input. More... | |
scriptel_error_code | scriptel_set_touch_parameters (scriptel_device *device, scriptel_hid_feature_touch_parameters params) |
This function sets the operating parameters for touch input. More... | |
scriptel_error_code | scriptel_set_display_content (scriptel_device *device, scriptel_hid_feature_display_content content) |
This function sets display content. More... | |
scriptel_error_code | scriptel_set_display_settings (scriptel_device *device, scriptel_hid_feature_display_settings settings) |
This function pushes new values for the dynamic display settings to a device. More... | |
scriptel_error_code | scriptel_set_display_chunk (scriptel_device *device, scriptel_hid_feature_display_chunk chunk) |
This function pushes a raster "chunk" to the display of the target device. More... | |
scriptel_error_code | scriptel_set_region (scriptel_device *device, scriptel_device_region_info *region) |
This function overwrites a region in the device replacing it in memory. More... | |
scriptel_error_code | scriptel_clear_screen (scriptel_device *device) |
This function clears the screen of the device. More... | |
scriptel_error_code | scriptel_update_region (scriptel_device *device, scriptel_hid_feature_region_update *region) |
This function can be used to update the settings for a single region. More... | |
scriptel_error_code | scriptel_set_region_commit (scriptel_device *device, scriptel_region_save_changes commit) |
This function can be used to either commit the current set of regions to the device (making them the new defaults) or it can be used to discard the current set of regions. More... | |
scriptel_error_code | scriptel_delete_region (scriptel_device *device, unsigned char region) |
This function "deletes" a region, effectively removing it from the screen. More... | |
scriptel_error_code | scriptel_delete_resource (scriptel_device *device, unsigned char resource_index) |
This function "deletes" a resource which will flag it for garbage collection. More... | |
scriptel_error_code | scriptel_delete_device_region (scriptel_device *device, unsigned char region) |
This function "deletes" a region, effectively removing it from the screen. More... | |
scriptel_error_code | scriptel_device_calibrate (scriptel_device *device) |
This function forces the device into calibration mode. More... | |
scriptel_error_code | scriptel_device_cancel_calibrate (scriptel_device *device) |
This function forces the device out of calibration mode. More... | |
scriptel_error_code | scriptel_device_draw_text (scriptel_device *device, char *text, unsigned int x, unsigned int y, scriptel_font_alignment alignment, unsigned char invert) |
This function draws text on the display of the device (if equipped) using a built in font. More... | |
scriptel_error_code | scriptel_device_draw_text_encoded (scriptel_device *device, char *data, unsigned int dataLen, unsigned int x, unsigned int y, scriptel_font_alignment alignment, unsigned char invert, const char *encoding) |
This function draws text on the display of the device (if equipped) using a built in font. More... | |
unsigned int | scriptel_measure_text_width (scriptel_device *device, char *text) |
This function measures the width of a particular string using the built in font. More... | |
unsigned int | scriptel_measure_text_height (scriptel_device *device, char *text) |
This function measures the height of a particular string using the built in font. More... | |
unsigned int | scriptel_measure_text_width_encoding (scriptel_device *device, char *data, unsigned int dataLen, char *encoding) |
This function measures the width of a particular string using the built in font. More... | |
unsigned int | scriptel_measure_text_height_encoding (scriptel_device *device, char *data, unsigned int dataLen, char *encoding) |
This function measures the height of a particular string using the built in font. More... | |
scriptel_error_code | scriptel_restore_default_regions (scriptel_device *device) |
This function will attempt to restore the default region configuration to the device. More... | |
char * | scriptel_get_proscript_version (void) |
This function will return a string containing the version number. More... | |
unsigned int | scriptel_get_proscript_version_major (void) |
This function will return the major version of the ProScript library. More... | |
unsigned int | scriptel_get_proscript_version_minor (void) |
This function will return the minor version of the ProScript library. More... | |
unsigned int | scriptel_get_proscript_version_release (void) |
This function will return the release version of the ProScript library. More... | |
char * | scriptel_get_proscript_build_date (void) |
This function will return date that the ProScript library was built in format: yyyy-MM-dd HH:mm:ssZ. More... | |
int | scriptel_get_region_idx (scriptel_device *device) |
This function returns the index of a region on the signature pad. More... | |
scriptel_error_code | scriptel_set_region_idx (scriptel_device *device, unsigned char region_index) |
This function sets the region index for use with scriptel_get_region. More... | |
scriptel_hid_feature_region | scriptel_get_region (scriptel_device *device) |
This function retrives the information about a region on the device based off the region index. More... | |
void | scriptel_get_region_ref (scriptel_device *device, scriptel_hid_feature_region *region) |
This function retrives the information about a region on the device based off the region index. More... | |
scriptel_error_code | scriptel_set_region_contents (scriptel_device *device, scriptel_hid_feature_region *region) |
This function sets the information about a region on the device. More... | |
scriptel_hid_feature_resource_availability | scriptel_get_resource_availability (scriptel_device *device) |
This function retrieves the available space on the device for resources. More... | |
void | scriptel_get_resource_availability_ref (scriptel_device *device, scriptel_hid_feature_resource_availability *info) |
This function retrieves the available space on the device for resources. More... | |
int | scriptel_get_resource_idx (scriptel_device *device) |
This function returns the index of a resource on the signature pad based off the resource index. More... | |
scriptel_error_code | scriptel_set_resource_idx (scriptel_device *device, unsigned char resource_index) |
This function sets the screen index for use with scriptel_get_resource and scriptel_get_resource_info. More... | |
scriptel_hid_feature_resource_info | scriptel_get_resource_info (scriptel_device *device) |
This function gets the information of a resource on the device based off the resource index. More... | |
void | scriptel_get_resource_info_ref (scriptel_device *device, scriptel_hid_feature_resource_info *info) |
This function gets the information of a resource on the device based off the resource index. More... | |
scriptel_hid_feature_resource | scriptel_get_resource (scriptel_device *device) |
This function gets the information of a resource on the device based off the resource index. More... | |
void | scriptel_get_resource_ref (scriptel_device *device, scriptel_hid_feature_resource *resource) |
This function gets the information of a resource on the device based off the resource index. More... | |
scriptel_error_code | scriptel_set_resource (scriptel_device *device, scriptel_hid_feature_resource *resource) |
This function sets the information of a resource on the device. More... | |
scriptel_error_code | scriptel_set_screen_region_commit (scriptel_device *device, scriptel_screen_region_save_changes commit) |
This function can be used to either commit the current set of screens and regions to the device(making them the new defaults) or it can be used to discard the current set of screens and regions. More... | |
scriptel_hid_feature_screen | scriptel_get_screen (scriptel_device *device) |
This function retrives the information about a screen that can be displayed on the device. More... | |
void | scriptel_get_screen_ref (scriptel_device *device, scriptel_hid_feature_screen *screen) |
This function retrives the information about a screen that can be displayed on the device based off the screen index. More... | |
scriptel_error_code | scriptel_set_screen (scriptel_device *device, scriptel_hid_feature_screen *screen) |
This function sets the information about a screen that can be displayed on the device based off the screen index. More... | |
int | scriptel_get_screen_idx (scriptel_device *device) |
This function returns the index of a screen on the signature pad. More... | |
scriptel_error_code | scriptel_set_screen_idx (scriptel_device *device, unsigned char screen_index) |
This function sets the screen index for use with scriptel_get_screen. More... | |
scriptel_error_code | scriptel_delete_screen (scriptel_device *device, unsigned char screen_index) |
This function deletes a screen that is set on the device. More... | |
scriptel_error_code | scriptel_set_edit_screen (scriptel_device *device, scriptel_hid_feature_edit_screen *screen_edit) |
This function edits a screen that is set on the device. More... | |
scriptel_hid_feature_screen_region_info | scriptel_get_screen_region_info (scriptel_device *device) |
This function recieves the overall information about the number of screens and regions and other information. More... | |
void | scriptel_get_screen_region_info_ref (scriptel_device *device, scriptel_hid_feature_screen_region_info *info) |
This function recieves the overall information about the number of screens and regions and other information. More... | |
int | scriptel_get_active_screen (scriptel_device *device) |
This function returns the index of the active screen on the signature pad. More... | |
scriptel_error_code | scriptel_set_active_screen (scriptel_device *device, unsigned char screen_index) |
This function sets the index of the active screen on the signature pad. More... | |
void | scriptel_set_legacy_firmware (int version, char legacy) |
This function is used for unit testing older firmware which does not check the device status locking flags before setting regions, modes, display, or before doing calibration. More... | |
scriptel_error_code | scriptel_simulate_pen_input (scriptel_device *dev, scriptel_pen_coordinate *coord) |
This function is used for unit testing. More... | |
scriptel_error_code | scriptel_get_pixels (scriptel_device *device, scriptel_hid_feature_pixel_values *pixel_values) |
This function reads the pixels on the screen for testing purposes. More... | |
int | scriptel_genII_query_hardware_configuration (scriptel_device *dev) |
This function returns the reported hardward configuration of a STGENII board. More... | |
scriptel_error_code | scriptel_genII_set_device_pid (scriptel_device *dev, unsigned short pid) |
This function sets the PID of the connected STGENII board. More... | |
scriptel_error_code | scriptel_genII_tune (scriptel_device *dev) |
Initiates pen tuning for genII asicless devices. More... | |
scriptel_error_code | scriptel_genII_abort_tune (scriptel_device *dev) |
Aborts pen tuning for genII asicless devices. More... | |
scriptel_hid_feature_tuning_status | scriptel_genII_get_tuning_status (scriptel_device *dev) |
Gets the pen tuning status or genII asicless devices. More... | |
scriptel_hid_feature_guid | scriptel_genII_get_hardware_GUID (scriptel_device *dev) |
Gets the guid that was burned into the device during production. More... | |
scriptel_error_code | scriptel_genII_set_hardware_GUID (scriptel_device *dev, scriptel_hid_feature_guid guid) |
Sets the guid in the genII device. More... | |
Variables | |
scriptel_device_driver | scriptel_real_driver |
This file contains the headers for the core of the Scriptel ScripTouch ProScript library.
typedef struct scriptel_device scriptel_device |
This structure represents a physically attached Scriptel ScripTouch device.
This structure is the primary means of interacting with devices through library functions.
enum scriptel_error_code |
This enumeration contains all of the return codes that functions in this library can return.
Enumerator | |
---|---|
SCRIPTEL_CODE_ERROR | This code indicates that the function did not succeed. Check the last error with scriptel_get_last_error() for more details. |
SCRIPTEL_CODE_SUCCESS | This code indicates that the function did succeed. |
scriptel_error_code scriptel_add_region_to_screen | ( | scriptel_hid_feature_screen * | screen, |
int | region, | ||
int | next | ||
) |
This function adds a region to the specified screen.
screen | screen to add the region to. |
region | the region being added. |
next | the region to move to. |
scriptel_error_code scriptel_clear_last_error | ( | scriptel_device * | device | ) |
This function clears the error data from the device.
device | Device from which to obtain status. |
scriptel_error_code scriptel_clear_screen | ( | scriptel_device * | device | ) |
This function clears the screen of the device.
device | Device to clear. |
scriptel_error_code scriptel_close_device | ( | scriptel_device * | device | ) |
This function attempts to close a local device that was previously opened.
This does not free the memory associated with the device structure, use scriptel_free_device_list() for this after closing the device.
device | Device to close. |
unsigned int scriptel_count_device_list | ( | scriptel_device * | list | ) |
This function counts the number of devices in a given device list.
list | List to count |
scriptel_error_code scriptel_delete_device_region | ( | scriptel_device * | device, |
unsigned char | region | ||
) |
This function "deletes" a region, effectively removing it from the screen.
device | Device to update. |
region | Region ID to remove (1-indexed). |
scriptel_error_code scriptel_delete_region | ( | scriptel_device * | device, |
unsigned char | region | ||
) |
This function "deletes" a region, effectively removing it from the screen.
This function is deprecated for firmware greater than or equal to version 4.0.0. Do not use this function for new development.
device | Device to update. |
region | Region ID to remove (1-indexed). |
scriptel_error_code scriptel_delete_resource | ( | scriptel_device * | device, |
unsigned char | resource_index | ||
) |
This function "deletes" a resource which will flag it for garbage collection.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
This function requires firmware 4.0.0 or greater.
device | Device to update |
resource_index | the resource to be deleted. |
scriptel_error_code scriptel_delete_screen | ( | scriptel_device * | device, |
unsigned char | screen_index | ||
) |
This function deletes a screen that is set on the device.
This function requires firmware 4.0.0 or greater.
device | Device to delete the screen of |
screen_index | the index of the screen that is to be deleted |
void scriptel_destroy | ( | void | ) |
This function should be called when you're done with the library and no longer want to interact with any functionality in this library.
This will tear down the library and any associated operating system hooks. You're still responsible for closing resources and freeing memory prior to performing this operation.
scriptel_error_code scriptel_device_calibrate | ( | scriptel_device * | device | ) |
This function forces the device into calibration mode.
device | Device to calibrate |
scriptel_error_code scriptel_device_cancel_calibrate | ( | scriptel_device * | device | ) |
This function forces the device out of calibration mode.
device | Device to stop calibrating. |
scriptel_error_code scriptel_device_draw_text | ( | scriptel_device * | device, |
char * | text, | ||
unsigned int | x, | ||
unsigned int | y, | ||
scriptel_font_alignment | alignment, | ||
unsigned char | invert | ||
) |
This function draws text on the display of the device (if equipped) using a built in font.
This function assumes UTF-8 encoded text.
device | Device to draw the text upon. |
text | Text to draw on the screen. |
x | The horizontal coordinate where the text should be anchored. |
y | The vertical coordinate where the text should be anchored. |
alignment | The position of the text anchor. |
invert | Whether or not to invert the text. |
scriptel_error_code scriptel_device_draw_text_encoded | ( | scriptel_device * | device, |
char * | data, | ||
unsigned int | dataLen, | ||
unsigned int | x, | ||
unsigned int | y, | ||
scriptel_font_alignment | alignment, | ||
unsigned char | invert, | ||
const char * | encoding | ||
) |
This function draws text on the display of the device (if equipped) using a built in font.
This function allows you to specify the character encoding.
device | Device to draw the text upon. |
data | Encoded text to draw on the screen in some encoding, must be null terminated. |
dataLen | The length of the data buffer. |
x | The horizontal coordinate where the text should be anchored. |
y | The vertical coordinate where the text should be anchored. |
alignment | The position of the text anchor. |
invert | Whether or not to invert the text. |
encoding | The string format that text is in. |
scriptel_error_code scriptel_device_read | ( | scriptel_device * | device | ) |
This function attempts to read from the passed in device.
Received information will be passed back through callbacks registered with scriptel_register_input_callback(). This function blocks until data is received.
device | Device to read from. |
void scriptel_device_read_done | ( | scriptel_device * | device | ) |
This function will signal the reading thread created by calling scriptel_device_read_until_done() that it should end and close the device.
This function will block until the thread has been completely destroyed. After calling this function it is safe to call scriptel_free_device_list() on the device.
device | Device to close that is currently reading with scriptel_device_read_until_done() |
void scriptel_device_read_until_done | ( | scriptel_device * | device | ) |
This function will start a new thread that will call scriptel_device_read() in a loop.
Use this function if you want a thread to read from the device and you don't care about implementing the details yourself. If you use this make sure to close the device with scriptel_device_read_done() and NOT scriptel_close_device(). The former will ensure the thread gets cleaned up properly. This function does not block.
device | Device to read from. |
void scriptel_free_device_list | ( | scriptel_device * | device_list | ) |
This function crawls a scriptel_device list and attempts to free any library managed memory associated with the list.
Make sure if any of the devices are open that they are closed prior to being freed.
device_list | List to free. |
void scriptel_free_device_regions | ( | scriptel_hid_feature_region * | regions | ) |
This function frees a region array returned from scriptel_get_device_regions().
regions | Regions array to free. |
void scriptel_free_device_uuid | ( | unsigned char * | uuid | ) |
This function frees the UUID of a device.
uuid | variable to free. |
void scriptel_free_regions | ( | scriptel_device_region_info * | regions | ) |
This function frees a region array returned from scriptel_get_regions() or scriptel_get_default_regions().
regions | Regions array to free. |
scriptel_error_code scriptel_genII_abort_tune | ( | scriptel_device * | dev | ) |
Aborts pen tuning for genII asicless devices.
dev | Device that is connected |
scriptel_hid_feature_guid scriptel_genII_get_hardware_GUID | ( | scriptel_device * | dev | ) |
Gets the guid that was burned into the device during production.
dev | Device that is connected |
scriptel_hid_feature_tuning_status scriptel_genII_get_tuning_status | ( | scriptel_device * | dev | ) |
Gets the pen tuning status or genII asicless devices.
dev | Device that is connected |
int scriptel_genII_query_hardware_configuration | ( | scriptel_device * | dev | ) |
This function returns the reported hardward configuration of a STGENII board.
dev | Device that is connected |
scriptel_error_code scriptel_genII_set_device_pid | ( | scriptel_device * | dev, |
unsigned short | pid | ||
) |
This function sets the PID of the connected STGENII board.
dev | Device that is connected |
pid | Desired product id for the connected device |
scriptel_error_code scriptel_genII_set_hardware_GUID | ( | scriptel_device * | dev, |
scriptel_hid_feature_guid | guid | ||
) |
Sets the guid in the genII device.
This is the not uuid based on the glass.
dev | Device that is connected |
guid | a structure holding the guid |
scriptel_error_code scriptel_genII_tune | ( | scriptel_device * | dev | ) |
Initiates pen tuning for genII asicless devices.
dev | Device that is connected |
int scriptel_get_active_screen | ( | scriptel_device * | device | ) |
This function returns the index of the active screen on the signature pad.
This function requires firmware 4.0.0 or greater.
device | Device that is connected |
scriptel_hid_feature_register_get scriptel_get_asic_register | ( | scriptel_device * | device | ) |
This function can be used to get the ASIC register from a device.
device | Device to query. |
void scriptel_get_asic_register_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_register_get * | reg | ||
) |
This function can be used to get the ASIC register from a device.
device | Device to query. |
reg | reference to the get_register feature report |
scriptel_hid_feature_calibrate scriptel_get_calibrate_state | ( | scriptel_device * | device | ) |
This function returns the current calibration state of a device.
device | Device to query. |
void scriptel_get_calibrate_state_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_calibrate * | report | ||
) |
This function returns the current calibration state of a device.
device | Device to query. |
report | reference to the report |
scriptel_hid_feature_calibration_data scriptel_get_calibration_data | ( | scriptel_device * | device | ) |
This function gets data about calibration.
It can be used as part of save and restore calibration
device | Device to get the data from. |
void scriptel_get_calibration_data_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_calibration_data * | calibration_data | ||
) |
This function gets data about calibration.
It can be used as part of save and restore calibration
device | Device to get the data from. |
calibration_data | Pointer to a structure to output the calibration report to. |
scriptel_hid_capabilities scriptel_get_capabilities | ( | scriptel_device * | device | ) |
This function gets device capabilities (if supported).
device | Device to query. |
void scriptel_get_capabilities_ref | ( | scriptel_device * | device, |
scriptel_hid_capabilities * | report | ||
) |
This function gets device capabilities (if supported).
device | Device to query. |
report | Reference to the report |
scriptel_hid_feature_contact_count_maximum scriptel_get_contact_count_maximum | ( | scriptel_device * | device | ) |
This function gets the maximum number of multi-touch contacts supported from a ScripTouch multi-touch device.
device | Device to query. |
void scriptel_get_contact_count_maximum_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_contact_count_maximum * | report | ||
) |
This function gets the maximum number of multi-touch contacts supported from a ScripTouch multi-touch device.
device | Device to query. |
report | reference to the report |
scriptel_hid_feature_coordinate_range scriptel_get_coordinate_range | ( | scriptel_device * | device | ) |
This function gets the logical coordinate range that will be returned from the device when points are delivered.
The logical coordinate space may not be the same aspect as the physical space. You can use the display information to get the physical aspect ratio of the device (see scriptel_hid_feature_display_info).
device | Device to query. |
void scriptel_get_coordinate_range_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_coordinate_range * | report | ||
) |
This function gets the logical coordinate range that will be returned from the device when points are delivered.
The logical coordinate space may not be the same aspect as the physical space. You can use the display information to get the physical aspect ratio of the device (see scriptel_hid_feature_display_info).
device | Device to query. |
report | reference to the report |
scriptel_device_region_info* scriptel_get_default_regions | ( | scriptel_device * | device | ) |
This function gets the default list of regions from the device as an array.
Default regions are the regions that will be restored on a power cycle or reboot. The number of regions can be retrieved by calling scriptel_get_display_info and looking at the region_count member. Unlike all of the other get functions this method uses dynamically allocated memory (since each device can have a different number of regions). Be sure to call scriptel_free_regions() on the array when you're done. This method uses report 110 to obtain Regions.
This function is deprecated for firmware greater than or equal to version 4.0.0. Do not use this function for new development.
device | Device to query. |
scriptel_hid_feature_device_configure scriptel_get_device_configure | ( | scriptel_device * | device | ) |
This function gets the active device configuration from a ScripTouch mouse device.
device | Device to query. |
void scriptel_get_device_configure_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_device_configure * | report | ||
) |
This function gets the active device configuration from a ScripTouch mouse device.
device | Device to query. |
report | reference to the report |
scriptel_hid_feature_region* scriptel_get_device_regions | ( | scriptel_device * | device | ) |
This function gets the current list of regions from the device as an array.
The number of regions can be retrieved by calling scriptel_get_display_info and looking at the region_count member. Unlike all of the other get functions this method uses dynamically allocated memory (since each device can have a different number of regions). Be sure to call scriptel_free_regions() on the array when you're done. This method uses report 152 to obtain Regions.
device | Device to query. |
scriptel_hid_feature_device_status scriptel_get_device_status | ( | scriptel_device * | device | ) |
This function gets the current status of the device.
device | Device from which to obtain status. |
void scriptel_get_device_status_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_device_status * | status | ||
) |
This function gets the current status of the device.
device | Device from which to obtain status. |
status | A structure containing the current status of the device. |
unsigned char* scriptel_get_device_uuid | ( | scriptel_device * | device | ) |
This function returns the UUID of a device as a byte array.
It is the responsibility of the caller to free the character buffer returned.
device | Device to query. |
scriptel_hid_feature_display_info scriptel_get_display_info | ( | scriptel_device * | device | ) |
This function gets static display information from the device.
device | Device to query. |
void scriptel_get_display_info_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_display_info * | report | ||
) |
This function gets static display information from the device.
device | Device to query. |
report | reference to the report |
scriptel_hid_feature_display_settings scriptel_get_display_settings | ( | scriptel_device * | device | ) |
This function gets dynamic display settings from the device.
device | Device to query. |
void scriptel_get_display_settings_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_display_settings * | report | ||
) |
This function gets dynamic display settings from the device.
device | Device to query. |
report | reference to the report |
scriptel_hid_feature_error_correction_table scriptel_get_error_correction_table | ( | scriptel_device * | device | ) |
This function gets the error correction table from the device.
This table is used to correct for natural imperfections in the digitizer's sensor.
device | Device to query. |
void scriptel_get_error_correction_table_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_error_correction_table * | table | ||
) |
This function gets the error correction table from the device.
This table is used to correct for natural imperfections in the digitizer's sensor.
device | Device to query. |
table | Error correction table reference to store the data. |
scriptel_hid_feature_frequency_amplitude scriptel_get_frequency_amplitude | ( | scriptel_device * | device | ) |
This function gets the current frequency and amplitude settings being used for the digitizer.
device | Device to query |
void scriptel_get_frequency_amplitude_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_frequency_amplitude * | fa | ||
) |
This function gets the current frequency and amplitude settings being used for the digitizer.
device | Device to query |
fa | reference to the frequency_amplitude structure |
scriptel_hid_feature_general_parameters scriptel_get_general_parameters | ( | scriptel_device * | device | ) |
This function gets general operating parameters from a device.
device | Device to query. |
void scriptel_get_general_parameters_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_general_parameters * | gparams | ||
) |
This function gets general operating parameters from a device.
device | Device to query. |
gparams | reference to the general parameters structure |
char* scriptel_get_last_error | ( | void | ) |
This function gets the last error message generated by the library.
This can be called immediately after a non-successful function call to get more information about the failure.
scriptel_hid_feature_operating_modes scriptel_get_operating_modes | ( | scriptel_device * | device | ) |
This function gets supported operating modes from the device.
device | Device to query. |
void scriptel_get_operating_modes_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_operating_modes * | modes | ||
) |
This function gets supported operating modes from the device.
device | Device to query. |
modes | reference to operating modes structure |
scriptel_hid_feature_output_parameters scriptel_get_output_configuration | ( | scriptel_device * | device | ) |
This function gets the output configuration information from the device.
device | Device to query. |
void scriptel_get_output_configuration_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_output_parameters * | report | ||
) |
This function gets the output configuration information from the device.
device | Device to query. |
report | Pointer to a structure to output the configuration report to. |
scriptel_hid_feature_pen_parameters scriptel_get_pen_parameters | ( | scriptel_device * | device | ) |
This function gets operating parameters for pen input from the device.
device | Device to query. |
void scriptel_get_pen_parameters_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_pen_parameters * | report | ||
) |
This function gets operating parameters for pen input from the device.
device | Device to query. |
report | reference to the report |
scriptel_hid_feature_peripheral_configuration scriptel_get_peripheral_configuration | ( | scriptel_device * | device | ) |
This function gets the output configuration information from the device.
device | Device to query. |
void scriptel_get_peripheral_configuration_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_peripheral_configuration * | report | ||
) |
This function gets the peripheral configuration information from the device.
device | Device to query. |
report | Pointer to a structure to output the configuration report to. |
scriptel_error_code scriptel_get_pixels | ( | scriptel_device * | device, |
scriptel_hid_feature_pixel_values * | pixel_values | ||
) |
This function reads the pixels on the screen for testing purposes.
Given a starting position (x,y) the function reads 256 pixels, wrapping When it reaches the end of a raster. The number of pixels read may be less than 256 if the end of the screen is found first.
device | Device that is connected |
pixel_values | is a pointer to a structure that gets filled in by the function that includes the pixel data and metadata |
x | the x coordinate in terms of screen pixels to start reading from |
y | the y coordinate in terms of screen rasters to start reading from |
scriptel_hid_feature_power_state scriptel_get_power_state | ( | scriptel_device * | device | ) |
This function gets the current power state of the device.
device | Device to query. |
char* scriptel_get_proscript_build_date | ( | void | ) |
This function will return date that the ProScript library was built in format: yyyy-MM-dd HH:mm:ssZ.
char* scriptel_get_proscript_version | ( | void | ) |
This function will return a string containing the version number.
unsigned int scriptel_get_proscript_version_major | ( | void | ) |
This function will return the major version of the ProScript library.
unsigned int scriptel_get_proscript_version_minor | ( | void | ) |
This function will return the minor version of the ProScript library.
unsigned int scriptel_get_proscript_version_release | ( | void | ) |
This function will return the release version of the ProScript library.
scriptel_hid_feature_region scriptel_get_region | ( | scriptel_device * | device | ) |
This function retrives the information about a region on the device based off the region index.
This function requires firmware 4.0.0 or greater.
device | Device the region is on |
int scriptel_get_region_idx | ( | scriptel_device * | device | ) |
This function returns the index of a region on the signature pad.
This function requires firmware 4.0.0 or greater.
device | Device to view. |
void scriptel_get_region_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_region * | region | ||
) |
This function retrives the information about a region on the device based off the region index.
This function requires firmware 4.0.0 or greater.
device | Device the region is on |
region | hosts the details about a region on the signature pad |
scriptel_device_region_info* scriptel_get_regions | ( | scriptel_device * | device | ) |
This function gets the current list of regions from the device as an array.
The number of regions can be retrieved by calling scriptel_get_display_info and looking at the region_count member. Unlike all of the other get functions this method uses dynamically allocated memory (since each device can have a different number of regions). Be sure to call scriptel_free_regions() on the array when you're done.
This function is deprecated for firmware greater than or equal to version 4.0.0. Do not use this function for new development.
device | Device to query. |
scriptel_hid_feature_resource scriptel_get_resource | ( | scriptel_device * | device | ) |
This function gets the information of a resource on the device based off the resource index.
If resource size is greater than 1024, this will return a portion of the resource. Continue calling for the rest.
This function requires firmware 4.0.0 or greater.
device | Device to view. |
scriptel_hid_feature_resource_availability scriptel_get_resource_availability | ( | scriptel_device * | device | ) |
This function retrieves the available space on the device for resources.
This function requires firmware 4.0.0 or greater.
device | Device to view. |
void scriptel_get_resource_availability_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_resource_availability * | info | ||
) |
This function retrieves the available space on the device for resources.
device | Device to view. |
This function requires firmware 4.0.0 or greater.
info | hosts the details about resource availability on the device. |
int scriptel_get_resource_idx | ( | scriptel_device * | device | ) |
This function returns the index of a resource on the signature pad based off the resource index.
This function requires firmware 4.0.0 or greater.
device | Device to view. |
scriptel_hid_feature_resource_info scriptel_get_resource_info | ( | scriptel_device * | device | ) |
This function gets the information of a resource on the device based off the resource index.
This function requires firmware 4.0.0 or greater.
device | Device to view. |
void scriptel_get_resource_info_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_resource_info * | info | ||
) |
This function gets the information of a resource on the device based off the resource index.
This function requires firmware 4.0.0 or greater.
device | Device to view. |
info | Resource information about the resource at the index. |
void scriptel_get_resource_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_resource * | resource | ||
) |
This function gets the information of a resource on the device based off the resource index.
If resource size is greater than 1024, this will return a portion of the resource. Continue calling for the rest.
This function requires firmware 4.0.0 or greater.
device | Device to view. |
resource | Resource at the index. |
scriptel_hid_feature_screen scriptel_get_screen | ( | scriptel_device * | device | ) |
This function retrives the information about a screen that can be displayed on the device.
This function requires firmware 4.0.0 or greater.
device | Device the screen is a part of |
int scriptel_get_screen_idx | ( | scriptel_device * | device | ) |
This function returns the index of a screen on the signature pad.
This function requires firmware 4.0.0 or greater.
device | Device to view. |
void scriptel_get_screen_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_screen * | screen | ||
) |
This function retrives the information about a screen that can be displayed on the device based off the screen index.
This function requires firmware 4.0.0 or greater.
device | Device the screen is a part of |
screen | Screen variable that holds all the information and number of regions in use. |
scriptel_hid_feature_screen_region_info scriptel_get_screen_region_info | ( | scriptel_device * | device | ) |
This function recieves the overall information about the number of screens and regions and other information.
This function requires firmware 4.0.0 or greater.
device | Device that is connected |
void scriptel_get_screen_region_info_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_screen_region_info * | info | ||
) |
This function recieves the overall information about the number of screens and regions and other information.
This function requires firmware 4.0.0 or greater.
device | Device that is connected |
info | information about screens and regions on the device |
scriptel_hid_feature_serial_number scriptel_get_serial_number | ( | scriptel_device * | device | ) |
This function gets the serial number of the device (if set).
device | Device to query. |
void scriptel_get_serial_number_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_serial_number * | sn | ||
) |
This function gets the serial number of the device (if set).
device | Device to query. |
sn | reference to the serial number report to store the data |
scriptel_hid_feature_touch_parameters scriptel_get_touch_parameters | ( | scriptel_device * | device | ) |
This function gets operating parameters for touch input from the device.
device | Device to query. |
void scriptel_get_touch_parameters_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_touch_parameters * | report | ||
) |
This function gets operating parameters for touch input from the device.
device | Device to query. |
report | reference to the report |
scriptel_hid_feature_version scriptel_get_version | ( | scriptel_device * | device | ) |
This function gets the current version of the device.
device | Device to query. |
void scriptel_get_version_ref | ( | scriptel_device * | device, |
scriptel_hid_feature_version * | report | ||
) |
This function gets the current version of the device.
device | Device to query. |
report | Version information from the device. |
void scriptel_init | ( | void | ) |
This function should be called prior to using any other library functions.
It should only be called once. This initializes the library and any required operating system hooks.
scriptel_error_code scriptel_list_devices | ( | scriptel_device ** | start | ) |
This function takes a pointer and will attempt to enumerate any attached ScripTouch devices.
If any are found the pointer will be overwritten with the address of the first device in the list. The list can be walked through with scriptouch_device->next. Don't forget to call scriptel_free_device_list on the first element of the list when you're done with the list.
start | An over-writable pointer to redirect to the first element in the device list. |
unsigned int scriptel_measure_text_height | ( | scriptel_device * | device, |
char * | text | ||
) |
This function measures the height of a particular string using the built in font.
device | Device that is connected |
text | Text to measure vertically. |
unsigned int scriptel_measure_text_height_encoding | ( | scriptel_device * | device, |
char * | data, | ||
unsigned int | dataLen, | ||
char * | encoding | ||
) |
This function measures the height of a particular string using the built in font.
device | Device that is connected |
data | Text to measure. |
dataLen | Byte length of the text to measure. |
encoding | Encoding to use to decode data. |
unsigned int scriptel_measure_text_width | ( | scriptel_device * | device, |
char * | text | ||
) |
This function measures the width of a particular string using the built in font.
text | Text to measure horizontally. |
unsigned int scriptel_measure_text_width_encoding | ( | scriptel_device * | device, |
char * | data, | ||
unsigned int | dataLen, | ||
char * | encoding | ||
) |
This function measures the width of a particular string using the built in font.
device | Device that is connected |
data | Text to measure. |
dataLen | Byte length of the text to measure. |
encoding | Encoding to use to decode data. |
scriptel_error_code scriptel_open_device | ( | scriptel_device * | device | ) |
This function attempts to open a local device returned by scriptel_list_devices().
device | Device to open. |
void scriptel_print_asic_register | ( | scriptel_hid_feature_register_get * | reg | ) |
This function prints an ASIC register structure to standard out.
reg | Register to print. |
void scriptel_print_calibrate_state | ( | scriptel_hid_feature_calibrate * | state | ) |
This function prints a calibration state structure to standard out.
state | Calibration state structure to print. |
void scriptel_print_calibration_data | ( | scriptel_hid_feature_calibration_data * | calibration_data | ) |
This function prints out the contents of the calibration data in human readable format.
calibration_data | The data to be printed. |
void scriptel_print_capabilities | ( | scriptel_hid_capabilities * | caps | ) |
This function prints the static device capabilities.
caps | Capabilities |
void scriptel_print_contact_count_maximum | ( | scriptel_hid_feature_contact_count_maximum * | contact | ) |
This function prints the contact count maximum information to standard out.
contact | Contact information to print. |
void scriptel_print_coordinate_range | ( | scriptel_hid_feature_coordinate_range * | range | ) |
This function prints the logical coordinate range from the device to standard out.
range | Structure to print. |
void scriptel_print_device_configure | ( | scriptel_hid_feature_device_configure * | config | ) |
This function prints the device configuration to standard out.
config | Configuration to print. |
void scriptel_print_device_regions | ( | scriptel_hid_feature_region * | regions, |
unsigned int | count | ||
) |
This function prints a set (1 or more) regions to standard out.
regions | Regions array to print. |
count | Number of elements in the array. |
void scriptel_print_device_status | ( | scriptel_hid_feature_device_status * | status | ) |
This function prints out the status structure in human readable format.
status | The data to be printed. |
void scriptel_print_device_uuid | ( | unsigned char * | uuid | ) |
This function prints a UUID byte array to standard out.
uuid | UUID to display. |
void scriptel_print_display_info | ( | scriptel_hid_feature_display_info * | info | ) |
This function prints the information from a display information structure to standard out.
info | Information to print. |
void scriptel_print_display_settings | ( | scriptel_hid_feature_display_settings * | settings | ) |
This function prints the information from a display settings structure to standard out.
settings | Settings to print. |
void scriptel_print_error_correction_table | ( | scriptel_hid_feature_error_correction_table * | table | ) |
This function prints the error correction table to standard out.
table | Table to print. |
void scriptel_print_frequency_amplitude | ( | scriptel_hid_feature_frequency_amplitude * | freq | ) |
This function prints the a frequency and amplitude settings structure to standard out.
freq | Structure to print. |
void scriptel_print_general_parameters | ( | scriptel_hid_feature_general_parameters * | params | ) |
This function prints a general operating parameters structure to standard out.
params | Parameters to print. |
void scriptel_print_operating_modes | ( | scriptel_hid_feature_operating_modes * | modes | ) |
This function prints a supported operating modes structure to standard out.
modes | Modes structure to print. |
void scriptel_print_output_configuration | ( | scriptel_hid_feature_output_parameters * | settings | ) |
This function prints the information from an output parameters structure to standard out.
settings | The structure to print in human readable form. |
void scriptel_print_pen_parameters | ( | scriptel_hid_feature_pen_parameters * | pen | ) |
This function prints a pen parameters structure to standard out.
pen | Structure to print. |
void scriptel_print_peripheral_configuration | ( | scriptel_hid_feature_peripheral_configuration * | settings | ) |
This function prints the information from a peripheral configuration structure to standard out.
settings | The structure to print in human readable form. |
void scriptel_print_power_state | ( | scriptel_hid_feature_power_state * | state | ) |
This function prints a power state structure to standard out.
state | State to print. |
void scriptel_print_regions | ( | scriptel_device_region_info * | regions, |
unsigned int | count | ||
) |
This function prints a set (1 or more) regions to standard out.
regions | Regions array to print. |
count | Number of elements in the array. |
void scriptel_print_serial_number | ( | scriptel_hid_feature_serial_number * | serial | ) |
This function prints a serial number structure to standard out.
serial | Structure to print. |
void scriptel_print_touch_parameters | ( | scriptel_hid_feature_touch_parameters * | touch | ) |
This function prints a touch parameters structure to standard out.
touch | Touch parameters to print. |
void scriptel_print_version | ( | scriptel_hid_feature_version * | version | ) |
This function prints a version information structure to standard out.
version | Structure to print. |
void scriptel_register_hotplug_callback | ( | scriptel_hotplug_callback | callback | ) |
This function registers a hot-plug callback for the system.
Callbacks will be called when ScripTouch devices are added to or removed from the system.
callback | Callback to register. |
void scriptel_register_input_callback | ( | scriptel_device * | device, |
scriptel_input_callback | callback | ||
) |
This function registers an input callback for a device.
Callbacks will be called when scriptel_device_read() receives input from a device.
device | Device to associate the callback with. |
callback | Callback to call upon getting data. |
scriptel_error_code scriptel_restore_default_regions | ( | scriptel_device * | device | ) |
This function will attempt to restore the default region configuration to the device.
device | Device that is connected |
device | Device to restore default regions on. |
scriptel_error_code scriptel_set_active_screen | ( | scriptel_device * | device, |
unsigned char | screen_index | ||
) |
This function sets the index of the active screen on the signature pad.
This function requires firmware 4.0.0 or greater.
device | Device that is connected |
screen_index | index of the target active screen |
scriptel_error_code scriptel_set_asic_register | ( | scriptel_device * | device, |
scriptel_hid_feature_register_set | reg | ||
) |
This function sets a register in the digitizer ASIC.
This should not be used by third party applications.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to set register on. |
reg | Register to set. |
scriptel_error_code scriptel_set_asic_reset | ( | scriptel_device * | device, |
scriptel_hid_feature_asic_reset | reset | ||
) |
This function resets the internal digitizer ASIC.
This should not be used by third party applications.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to reset. |
reset | Reset parameters. |
scriptel_error_code scriptel_set_calibration_data | ( | scriptel_device * | device, |
scriptel_hid_feature_calibration_data | calibration_data | ||
) |
This function sends the calibration data to the device.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to send the calibration data to. |
calibration_data | Calibration data to send. |
scriptel_error_code scriptel_set_device_configure | ( | scriptel_device * | device, |
scriptel_hid_feature_device_configure | configure | ||
) |
This function sets the device configuration on ScripTouch mouse devices.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to set the configuration on. |
configure | Configuration to set. |
scriptel_error_code scriptel_set_display_chunk | ( | scriptel_device * | device, |
scriptel_hid_feature_display_chunk | chunk | ||
) |
This function pushes a raster "chunk" to the display of the target device.
device | Device to receive raster. |
chunk | Chunk to push. |
scriptel_error_code scriptel_set_display_content | ( | scriptel_device * | device, |
scriptel_hid_feature_display_content | content | ||
) |
This function sets display content.
device | Device to update. |
content | Content to update. |
scriptel_error_code scriptel_set_display_settings | ( | scriptel_device * | device, |
scriptel_hid_feature_display_settings | settings | ||
) |
This function pushes new values for the dynamic display settings to a device.
device | Device to update. |
settings | New values for settings. |
scriptel_error_code scriptel_set_easyscript_mode | ( | scriptel_device * | device, |
char | commit_changes | ||
) |
This function sets the device to easyscript mode if possible.
device | device to set to easyscript mode. |
scriptel_error_code scriptel_set_edit_screen | ( | scriptel_device * | device, |
scriptel_hid_feature_edit_screen * | screen_edit | ||
) |
This function edits a screen that is set on the device.
This function requires firmware 4.0.0 or greater.
device | Device to edit the screen of |
screen_edit | this variable holds all the information about the edited screen, including the index |
scriptel_error_code scriptel_set_error_correction | ( | scriptel_device * | device, |
scriptel_hid_feature_error_correction_table | errcor | ||
) |
This function can be used to set the sensor error correction table on the device.
This function should not be used by third party applications as improper use of this function can render a device inoperable.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to update. |
errcor | Error correction table to write. |
scriptel_error_code scriptel_set_firmware | ( | scriptel_device * | device, |
scriptel_hid_feature_firmware_download | firmware | ||
) |
This function sets a firmware page on the device.
This function should not be used by third party applications as improper use of this function can render a device inoperable.
device | Device to set the firmware page on. |
firmware | Page to set. |
scriptel_error_code scriptel_set_firmware_download_status | ( | scriptel_device * | device, |
scriptel_hid_feature_download_command_status | status | ||
) |
This function is used to indicate to a device that the firmware download is complete.
This function should not be used by third party applications as improper use of this function can render a device inoperable.
device | Device to notify. |
status | Download status to set. |
scriptel_error_code scriptel_set_frequency_amplitude | ( | scriptel_device * | device, |
scriptel_hid_feature_frequency_amplitude | freq | ||
) |
This function sets the frequency and amplitude settings for a device.
device | Device to set the frequency and amplitude settings on. |
freq | Frequency and amplitude settings to set. |
scriptel_error_code scriptel_set_general_parameters | ( | scriptel_device * | device, |
scriptel_hid_feature_general_parameters | params | ||
) |
This function can be used to update general operating parameters.
This function should not be used by third party applications as it could negatively impact the operating of the digitizer.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to update. |
params | Parameters to set. |
void scriptel_set_legacy_firmware | ( | int | version, |
char | legacy | ||
) |
This function is used for unit testing older firmware which does not check the device status locking flags before setting regions, modes, display, or before doing calibration.
legacy | set to true (non-zero) for legacy (no wait) behavior |
scriptel_error_code scriptel_set_output_configuration | ( | scriptel_device * | device, |
scriptel_hid_feature_output_parameters | settings | ||
) |
This function sends the output configuration to the device.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to set. |
settings | The output configuration settings. |
scriptel_error_code scriptel_set_pen_parameters | ( | scriptel_device * | device, |
scriptel_hid_feature_pen_parameters | params | ||
) |
This function sets the operating parameters for pen input.
This function should not be used by third party applications.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to set parameters for. |
params | Parameters to set. |
scriptel_error_code scriptel_set_peripheral_configuration | ( | scriptel_device * | device, |
scriptel_hid_feature_peripheral_configuration | settings | ||
) |
This function sends the output configuration to the device.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to set. |
settings | The peripheral configuration settings. |
scriptel_error_code scriptel_set_power_state | ( | scriptel_device * | device, |
scriptel_hid_feature_power_state | state | ||
) |
This function sets the power state of the device.
device | Device to set the power state on. |
state | Power state to set. |
scriptel_error_code scriptel_set_proscript_mode | ( | scriptel_device * | device, |
char | commit_changes | ||
) |
This function sets the device to proscript mode if possible.
device | device to set to proscript mode. |
scriptel_error_code scriptel_set_region | ( | scriptel_device * | device, |
scriptel_device_region_info * | region | ||
) |
This function overwrites a region in the device replacing it in memory.
Unless scriptel_set_region_commit is used any updates made by this function will be lost after a power cycle or device reset.
This function is deprecated for firmware greater than or equal to version 4.0.0. Do not use this function for new development.
device | Device to update. |
region | Region to overwrite. |
scriptel_error_code scriptel_set_region_commit | ( | scriptel_device * | device, |
scriptel_region_save_changes | commit | ||
) |
This function can be used to either commit the current set of regions to the device (making them the new defaults) or it can be used to discard the current set of regions.
This function is deprecated for firmware greater than or equal to version 4.0.0. Do not use this function for new development.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to update. |
commit | Commit settings. |
scriptel_error_code scriptel_set_region_contents | ( | scriptel_device * | device, |
scriptel_hid_feature_region * | region | ||
) |
This function sets the information about a region on the device.
This function requires firmware 4.0.0 or greater.
device | Device the region is on |
region | hosts the details about a region on the signature pad |
scriptel_error_code scriptel_set_region_idx | ( | scriptel_device * | device, |
unsigned char | region_index | ||
) |
This function sets the region index for use with scriptel_get_region.
This function requires firmware 4.0.0 or greater.
device | Device to set the region index on. |
region_index | The index of the region. |
scriptel_error_code scriptel_set_resource | ( | scriptel_device * | device, |
scriptel_hid_feature_resource * | resource | ||
) |
This function sets the information of a resource on the device.
If resource size is greater than 1024, this will set a portion of the resource. Continue calling until all data is set.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
This function requires firmware 4.0.0 or greater.
device | Device to view. |
resource | Resource or portion of resource to set. |
scriptel_error_code scriptel_set_resource_idx | ( | scriptel_device * | device, |
unsigned char | resource_index | ||
) |
This function sets the screen index for use with scriptel_get_resource and scriptel_get_resource_info.
This function requires firmware 4.0.0 or greater.
device | Device to set the resource index on. |
resource_index | The resource of the screen. |
scriptel_error_code scriptel_set_run_mode | ( | scriptel_device * | device, |
scriptel_device_run_mode | run_mode | ||
) |
This function sets the run mode of the device.
device | Device to set the run mode on. |
run_mode | The run mode to set on the device. |
scriptel_error_code scriptel_set_screen | ( | scriptel_device * | device, |
scriptel_hid_feature_screen * | screen | ||
) |
This function sets the information about a screen that can be displayed on the device based off the screen index.
This function requires firmware 4.0.0 or greater.
device | Device the screen is a part of |
screen | Screen variable that holds all the information and number of regions in use. |
scriptel_error_code scriptel_set_screen_idx | ( | scriptel_device * | device, |
unsigned char | screen_index | ||
) |
This function sets the screen index for use with scriptel_get_screen.
This function requires firmware 4.0.0 or greater.
device | Device to set the screen index on. |
screen_index | The index of the screen. |
scriptel_error_code scriptel_set_screen_region_commit | ( | scriptel_device * | device, |
scriptel_screen_region_save_changes | commit | ||
) |
This function can be used to either commit the current set of screens and regions to the device(making them the new defaults) or it can be used to discard the current set of screens and regions.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
This function requires firmware 4.0.0 or greater.
device | Device to update. |
commit | Commit settings. |
scriptel_error_code scriptel_set_serial_number | ( | scriptel_device * | device, |
char * | serial_number, | ||
unsigned int | len | ||
) |
This function can be used to set the serial number on a device.
This function should not be used by third party applications as it could interfere with warranty claims.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to update. |
serial_number | Serial number to write. |
len | Length of the serial number. |
scriptel_error_code scriptel_set_startup_mode | ( | scriptel_device * | device, |
scriptel_device_acquisition_mode | mode | ||
) |
This function can be used to set the default start up mode of a device.
device | Device to update. |
mode | Default mode to start in. |
scriptel_error_code scriptel_set_touch_parameters | ( | scriptel_device * | device, |
scriptel_hid_feature_touch_parameters | params | ||
) |
This function sets the operating parameters for touch input.
This function should not be used by third party applications.
This function requires that the firmware be placed in command mode prior to use. Please see scriptel_set_run_mode() for details.
device | Device to set parameters for. |
params | Parameters to set. |
scriptel_error_code scriptel_simulate_pen_input | ( | scriptel_device * | dev, |
scriptel_pen_coordinate * | coord | ||
) |
This function is used for unit testing.
It simulates putting a pen on the screen (or lifting the pen off).
dev | Device that is connected |
coord | This variable holds all of the info for setting a pen coordinate. |
void scriptel_unregister_hotplug_callback | ( | scriptel_hotplug_callback | callback | ) |
This function unregisters a hot-plug callback from the system.
callback | Callback to unregister. |
void scriptel_unregister_input_callback | ( | scriptel_device * | device, |
scriptel_input_callback | callback | ||
) |
This function unregisters an input callback so that it will no longer be called when scriptel_device_read() receives input from a device.
device | Device to disassociate the callback from. |
callback | Callback to unregister. |
scriptel_error_code scriptel_update_region | ( | scriptel_device * | device, |
scriptel_hid_feature_region_update * | region | ||
) |
This function can be used to update the settings for a single region.
This should not be confused with scriptel_set_region which overwrites a region completely (not just settings).
This function is deprecated for firmware greater than or equal to version 4.0.0. Do not use this function for new development.
device | Device to update. |
region | Region settings to update with. |