Scriptel ScripTouch ProScript C Library This documentation contains information about the ScripTouch ProScript C Library.

Data Structures | Typedefs | Enumerations | Functions | Variables
scriptel-proscript.h File Reference

This file contains the headers for the core of the Scriptel ScripTouch ProScript library. More...

`#include "scriptel-list.h"`
`#include "scriptel-hid-reports.h"`
Include dependency graph for scriptel-proscript.h:

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

## Detailed Description

This file contains the headers for the core of the Scriptel ScripTouch ProScript library.

## Typedef Documentation

## ◆ scriptel_device

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.

## Enumeration Type Documentation

## ◆ scriptel_error_code

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_font_alignment

enum scriptel_font_alignment

This enumeration contains constants relating to the alignment of text.

Enumerator
SCRIPTEL_ALIGN_LEFT | Aligns text to the left.
SCRIPTEL_ALIGN_RIGHT | Aligns text to the right.
SCRIPTEL_ALIGN_CENTER | Aligns text to the center.

## ◆ scriptel_hotplug_type

enum 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.

Enumerator
SCRIPTEL_HOTPLUG_ATTACHED | The device was added to the system.
SCRIPTEL_HOTPLUG_DETACHED | The device was removed from the system.

## Function Documentation

## ◆ scriptel_add_region_to_screen()

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.

Parameters

  screen | screen to add the region to.
  region | the region being added.
  next | the region to move to.

## ◆ scriptel_clear_last_error()

scriptel_error_code scriptel_clear_last_error | ( | scriptel_device * | device | ) |

This function clears the error data from the device.

Parameters

  device | Device from which to obtain status.

## ◆ scriptel_clear_screen()

scriptel_error_code scriptel_clear_screen | ( | scriptel_device * | device | ) |

This function clears the screen of the device.

Parameters

  device | Device to clear.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_close_device()

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.

Parameters

  device | Device to close.

Returns
  Whether or not closing the device was successful.

Examples
  example-connecting.c, example-image-cairo.c, example-image-gdiplus.cpp, and example-reading.c.

## ◆ scriptel_count_device_list()

unsigned int scriptel_count_device_list | ( | scriptel_device * | list | ) |

This function counts the number of devices in a given device list.

Parameters

  list | List to count

Returns
  Number of devices in the list.

Examples
  example-connecting.c, example-image-cairo.c, example-image-gdiplus.cpp, example-reading.c, and example-screen-editing.c.

## ◆ scriptel_delete_device_region()

scriptel_error_code scriptel_delete_device_region | ( | scriptel_device * | device,
|  | unsigned char | region
| ) |  |

This function "deletes" a region, effectively removing it from the screen.

Parameters

  device | Device to update.
  region | Region ID to remove (1-indexed).

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_delete_region()

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.

Parameters

  device | Device to update.
  region | Region ID to remove (1-indexed).

Returns
  Error code indicating whether or not the call was successful.

Deprecated:
  This function is deprecated in favor of scriptel_delete_device_region().

## ◆ scriptel_delete_resource()

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.

Parameters

  device | Device to update
  resource_index | the resource to be deleted.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_delete_screen()

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.

Parameters

  device | Device to delete the screen of
  screen_index | the index of the screen that is to be deleted

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_destroy()

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_device_calibrate()

scriptel_error_code scriptel_device_calibrate | ( | scriptel_device * | device | ) |

This function forces the device into calibration mode.

Parameters

  device | Device to calibrate

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_device_cancel_calibrate()

scriptel_error_code scriptel_device_cancel_calibrate | ( | scriptel_device * | device | ) |

This function forces the device out of calibration mode.

Parameters

  device | Device to stop calibrating.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_device_draw_text()

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.

Parameters

  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.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_device_draw_text_encoded()

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.

Parameters

  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.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_device_read()

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.

Parameters

  device | Device to read from.

Returns
  Whether or not the last read was successful.

Examples
  example-image-cairo.c, example-image-gdiplus.cpp, and example-reading.c.

## ◆ scriptel_device_read_done()

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.

Parameters

  device | Device to close that is currently reading with scriptel_device_read_until_done()

## ◆ 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.

Parameters

  device | Device to read from.

## ◆ scriptel_free_device_list()

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.

Parameters

  device_list | List to free.

Examples
  example-connecting.c, example-image-cairo.c, example-image-gdiplus.cpp, and example-reading.c.

## ◆ scriptel_free_device_regions()

void scriptel_free_device_regions | ( | scriptel_hid_feature_region * | regions | ) |

This function frees a region array returned from scriptel_get_device_regions().

Parameters

  regions | Regions array to free.

## ◆ scriptel_free_device_uuid()

void scriptel_free_device_uuid | ( | unsigned char * | uuid | ) |

This function frees the UUID of a device.

Parameters

  uuid | variable to free.

## ◆ scriptel_free_regions()

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().

Parameters

  regions | Regions array to free.

## ◆ scriptel_genII_abort_tune()

scriptel_error_code scriptel_genII_abort_tune | ( | scriptel_device * | dev | ) |

Aborts pen tuning for genII asicless devices.

Parameters

  dev | Device that is connected

## ◆ scriptel_genII_get_hardware_GUID()

scriptel_hid_feature_guid scriptel_genII_get_hardware_GUID | ( | scriptel_device * | dev | ) |

Gets the guid that was burned into the device during production.

Parameters

  dev | Device that is connected

## ◆ scriptel_genII_get_tuning_status()

scriptel_hid_feature_tuning_status scriptel_genII_get_tuning_status | ( | scriptel_device * | dev | ) |

Gets the pen tuning status or genII asicless devices.

Parameters

  dev | Device that is connected

## ◆ scriptel_genII_query_hardware_configuration()

int scriptel_genII_query_hardware_configuration | ( | scriptel_device * | dev | ) |

This function returns the reported hardward configuration of a STGENII board.

Parameters

  dev | Device that is connected

## ◆ scriptel_genII_set_device_pid()

scriptel_error_code scriptel_genII_set_device_pid | ( | scriptel_device * | dev,
|  | unsigned short | pid
| ) |  |

This function sets the PID of the connected STGENII board.

Parameters

  dev | Device that is connected
  pid | Desired product id for the connected device

## ◆ scriptel_genII_set_hardware_GUID()

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.

Parameters

  dev | Device that is connected
  guid | a structure holding the guid

## ◆ scriptel_genII_tune()

scriptel_error_code scriptel_genII_tune | ( | scriptel_device * | dev | ) |

Initiates pen tuning for genII asicless devices.

Parameters

  dev | Device that is connected

## ◆ scriptel_get_active_screen()

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.

Parameters

  device | Device that is connected

Returns
  index of the active screen, -1 if error.

## ◆ scriptel_get_asic_register()

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.

Parameters

  device | Device to query.

Returns
  ASIC register.

## ◆ scriptel_get_asic_register_ref()

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.

Parameters

  device | Device to query.
  reg | reference to the get_register feature report

## ◆ scriptel_get_calibrate_state()

scriptel_hid_feature_calibrate scriptel_get_calibrate_state | ( | scriptel_device * | device | ) |

This function returns the current calibration state of a device.

Parameters

  device | Device to query.

Returns
  Current calibration state of the device.

## ◆ scriptel_get_calibrate_state_ref()

void scriptel_get_calibrate_state_ref | ( | scriptel_device * | device,
|  | scriptel_hid_feature_calibrate * | report
| ) |  |

This function returns the current calibration state of a device.

Parameters

  device | Device to query.
  report | reference to the report

## ◆ scriptel_get_calibration_data()

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

Parameters

  device | Device to get the data from.

Returns
  a copy of the calibration data structure

## ◆ scriptel_get_calibration_data_ref()

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

Parameters

  device | Device to get the data from.
  calibration_data | Pointer to a structure to output the calibration report to.

## ◆ scriptel_get_capabilities()

scriptel_hid_capabilities scriptel_get_capabilities | ( | scriptel_device * | device | ) |

This function gets device capabilities (if supported).

Parameters

  device | Device to query.

Returns
  Static capability information from the device.

## ◆ scriptel_get_capabilities_ref()

void scriptel_get_capabilities_ref | ( | scriptel_device * | device,
|  | scriptel_hid_capabilities * | report
| ) |  |

This function gets device capabilities (if supported).

Parameters

  device | Device to query.
  report | Reference to the report

## ◆ scriptel_get_contact_count_maximum()

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.

Parameters

  device | Device to query.

## ◆ scriptel_get_contact_count_maximum_ref()

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.

Parameters

  device | Device to query.
  report | reference to the report

## ◆ scriptel_get_coordinate_range()

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).

Parameters

  device | Device to query.

Returns
  Logical coordinate range of the device.

Examples
  example-image-cairo.c, example-image-gdiplus.cpp, and example-reading.c.

## ◆ scriptel_get_coordinate_range_ref()

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).

Parameters

  device | Device to query.
  report | reference to the report

## ◆ scriptel_get_default_regions()

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.

Parameters

  device | Device to query.

Returns
  Dynamically allocated array of regions from the device.

Deprecated:
  This function is deprecated as devices with firmware greater than 4.0.0 will no longer have default regions.

## ◆ scriptel_get_device_configure()

scriptel_hid_feature_device_configure scriptel_get_device_configure | ( | scriptel_device * | device | ) |

This function gets the active device configuration from a ScripTouch mouse device.

Parameters

  device | Device to query.

Returns
  Device configuration.

## ◆ scriptel_get_device_configure_ref()

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.

Parameters

  device | Device to query.
  report | reference to the report

## ◆ scriptel_get_device_regions()

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.

Parameters

  device | Device to query.

Returns
  Dynamically allocated array of regions from the device.

## ◆ scriptel_get_device_status()

scriptel_hid_feature_device_status scriptel_get_device_status | ( | scriptel_device * | device | ) |

This function gets the current status of the device.

Parameters

  device | Device from which to obtain status.

Returns
  A structure containing the current status of the device.

## ◆ scriptel_get_device_status_ref()

void scriptel_get_device_status_ref | ( | scriptel_device * | device,
|  | scriptel_hid_feature_device_status * | status
| ) |  |

This function gets the current status of the device.

Parameters

  device | Device from which to obtain status.
  status | A structure containing the current status of the device.

## ◆ scriptel_get_device_uuid()

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.

Parameters

  device | Device to query.

Returns
  Byte array containing the UUID of the device.

Examples
  example-connecting.c.

## ◆ scriptel_get_display_info()

scriptel_hid_feature_display_info scriptel_get_display_info | ( | scriptel_device * | device | ) |

This function gets static display information from the device.

Parameters

  device | Device to query.

Returns
  Static display information.

## ◆ scriptel_get_display_info_ref()

void scriptel_get_display_info_ref | ( | scriptel_device * | device,
|  | scriptel_hid_feature_display_info * | report
| ) |  |

This function gets static display information from the device.

Parameters

  device | Device to query.
  report | reference to the report

## ◆ scriptel_get_display_settings()

scriptel_hid_feature_display_settings scriptel_get_display_settings | ( | scriptel_device * | device | ) |

This function gets dynamic display settings from the device.

Parameters

  device | Device to query.

Returns
  Dynamic display settings.

## ◆ scriptel_get_display_settings_ref()

void scriptel_get_display_settings_ref | ( | scriptel_device * | device,
|  | scriptel_hid_feature_display_settings * | report
| ) |  |

This function gets dynamic display settings from the device.

Parameters

  device | Device to query.
  report | reference to the report

## ◆ scriptel_get_error_correction_table()

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.

Parameters

  device | Device to query.

Returns
  Error correction table.

## ◆ scriptel_get_error_correction_table_ref()

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.

Parameters

  device | Device to query.
  table | Error correction table reference to store the data.

## ◆ scriptel_get_frequency_amplitude()

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.

Parameters

  device | Device to query

Returns
  Frequency and amplitude information

## ◆ scriptel_get_frequency_amplitude_ref()

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.

Parameters

  device | Device to query
  fa | reference to the frequency_amplitude structure

## ◆ scriptel_get_general_parameters()

scriptel_hid_feature_general_parameters scriptel_get_general_parameters | ( | scriptel_device * | device | ) |

This function gets general operating parameters from a device.

Parameters

  device | Device to query.

Returns
  General parameters from the device.

## ◆ scriptel_get_general_parameters_ref()

void scriptel_get_general_parameters_ref | ( | scriptel_device * | device,
|  | scriptel_hid_feature_general_parameters * | gparams
| ) |  |

This function gets general operating parameters from a device.

Parameters

  device | Device to query.
  gparams | reference to the general parameters structure

## ◆ scriptel_get_last_error()

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.

Returns
  Textual information about the last error.

Examples
  example-connecting.c, example-image-cairo.c, example-image-gdiplus.cpp, example-reading.c, and example-screen-editing.c.

## ◆ scriptel_get_operating_modes()

scriptel_hid_feature_operating_modes scriptel_get_operating_modes | ( | scriptel_device * | device | ) |

This function gets supported operating modes from the device.

Parameters

  device | Device to query.

Returns
  Supported operating modes.

## ◆ scriptel_get_operating_modes_ref()

void scriptel_get_operating_modes_ref | ( | scriptel_device * | device,
|  | scriptel_hid_feature_operating_modes * | modes
| ) |  |

This function gets supported operating modes from the device.

Parameters

  device | Device to query.
  modes | reference to operating modes structure

## ◆ scriptel_get_output_configuration()

scriptel_hid_feature_output_parameters scriptel_get_output_configuration | ( | scriptel_device * | device | ) |

This function gets the output configuration information from the device.

Parameters

  device | Device to query.

Returns
  Output configuration report.

## ◆ scriptel_get_output_configuration_ref()

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.

Parameters

  device | Device to query.
  report | Pointer to a structure to output the configuration report to.

## ◆ scriptel_get_pen_parameters()

scriptel_hid_feature_pen_parameters scriptel_get_pen_parameters | ( | scriptel_device * | device | ) |

This function gets operating parameters for pen input from the device.

Parameters

  device | Device to query.

Returns
  Pen parameters.

## ◆ scriptel_get_pen_parameters_ref()

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.

Parameters

  device | Device to query.
  report | reference to the report

## ◆ scriptel_get_peripheral_configuration()

scriptel_hid_feature_peripheral_configuration scriptel_get_peripheral_configuration | ( | scriptel_device * | device | ) |

This function gets the output configuration information from the device.

Parameters

  device | Device to query.

Returns
  Peripheral configuration report.

## ◆ scriptel_get_peripheral_configuration_ref()

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.

Parameters

  device | Device to query.
  report | Pointer to a structure to output the configuration report to.

## ◆ scriptel_get_pixels()

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.

Parameters

  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

Returns
  SCRIPTEL_CODE_SUCCESS or SCRIPTEL_CODE_ERROR

## ◆ scriptel_get_power_state()

scriptel_hid_feature_power_state scriptel_get_power_state | ( | scriptel_device * | device | ) |

This function gets the current power state of the device.

Parameters

  device | Device to query.

Returns
  Current power state of the device.

## ◆ scriptel_get_proscript_build_date()

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.

Returns
  Date the ProScript library was built.

## ◆ scriptel_get_proscript_version()

char* scriptel_get_proscript_version | ( | void |  | ) |

This function will return a string containing the version number.

Returns
  Version number.

## ◆ scriptel_get_proscript_version_major()

unsigned int scriptel_get_proscript_version_major | ( | void |  | ) |

This function will return the major version of the ProScript library.

Returns
  Major version of the ProScript library.

## ◆ scriptel_get_proscript_version_minor()

unsigned int scriptel_get_proscript_version_minor | ( | void |  | ) |

This function will return the minor version of the ProScript library.

Returns
  Minor version of the ProScript library.

## ◆ scriptel_get_proscript_version_release()

unsigned int scriptel_get_proscript_version_release | ( | void |  | ) |

This function will return the release version of the ProScript library.

Returns
  Release version of the ProScript library.

## ◆ scriptel_get_region()

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.

Parameters

  device | Device the region is on

Returns
  details about a region on the signature pad

## ◆ scriptel_get_region_idx()

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.

Parameters

  device | Device to view.

Returns
  index of the region

## ◆ scriptel_get_region_ref()

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.

Parameters

  device | Device the region is on
  region | hosts the details about a region on the signature pad

## ◆ scriptel_get_regions()

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.

Parameters

  device | Device to query.

Returns
  Dynamically allocated array of regions from the device.

Deprecated:
  This function is deprecated in favor of scriptel_get_device_regions().

## ◆ scriptel_get_resource()

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.

Parameters

  device | Device to view.

Returns
  Resource at the index.

## ◆ scriptel_get_resource_availability()

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.

Parameters

  device | Device to view.

Returns
  Resource availability for the device.

## ◆ scriptel_get_resource_availability_ref()

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.

Parameters

  device | Device to view.

This function requires firmware 4.0.0 or greater.

Parameters

  info | hosts the details about resource availability on the device.

Returns
  Resource availability for the device.

## ◆ scriptel_get_resource_idx()

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.

Parameters

  device | Device to view.

Returns
  index of the resource

## ◆ scriptel_get_resource_info()

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.

Parameters

  device | Device to view.

Returns
  Resource information about the resource at the index.

## ◆ scriptel_get_resource_info_ref()

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.

Parameters

  device | Device to view.
  info | Resource information about the resource at the index.

## ◆ scriptel_get_resource_ref()

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.

Parameters

  device | Device to view.
  resource | Resource at the index.

## ◆ scriptel_get_screen()

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.

Parameters

  device | Device the screen is a part of

Returns
  screen variable that holds all the information and number of regions in use.

## ◆ scriptel_get_screen_idx()

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.

Parameters

  device | Device to view.

Returns
  index of the screen

## ◆ scriptel_get_screen_ref()

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.

Parameters

  device | Device the screen is a part of
  screen | Screen variable that holds all the information and number of regions in use.

## ◆ scriptel_get_screen_region_info()

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.

Parameters

  device | Device that is connected

Returns
  information about screens and regions on the device

## ◆ scriptel_get_screen_region_info_ref()

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.

Parameters

  device | Device that is connected
  info | information about screens and regions on the device

## ◆ scriptel_get_serial_number()

scriptel_hid_feature_serial_number scriptel_get_serial_number | ( | scriptel_device * | device | ) |

This function gets the serial number of the device (if set).

Parameters

  device | Device to query.

Returns
  Serial number of the device.

## ◆ scriptel_get_serial_number_ref()

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).

Parameters

  device | Device to query.
  sn | reference to the serial number report to store the data

## ◆ scriptel_get_touch_parameters()

scriptel_hid_feature_touch_parameters scriptel_get_touch_parameters | ( | scriptel_device * | device | ) |

This function gets operating parameters for touch input from the device.

Parameters

  device | Device to query.

Returns
  Touch parameters

## ◆ scriptel_get_touch_parameters_ref()

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.

Parameters

  device | Device to query.
  report | reference to the report

## ◆ scriptel_get_version()

scriptel_hid_feature_version scriptel_get_version | ( | scriptel_device * | device | ) |

This function gets the current version of the device.

Parameters

  device | Device to query.

Returns
  Version information from the device.

## ◆ scriptel_get_version_ref()

void scriptel_get_version_ref | ( | scriptel_device * | device,
|  | scriptel_hid_feature_version * | report
| ) |  |

This function gets the current version of the device.

Parameters

  device | Device to query.
  report | Version information from the device.

## ◆ scriptel_init()

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.

Examples
  example-connecting.c, example-image-cairo.c, example-image-gdiplus.cpp, example-reading.c, and example-screen-editing.c.

## ◆ scriptel_list_devices()

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.

Parameters

  start | An over-writable pointer to redirect to the first element in the device list.

Returns
  The error code returned by the function.

Examples
  example-connecting.c, example-image-cairo.c, example-image-gdiplus.cpp, example-reading.c, and example-screen-editing.c.

## ◆ scriptel_measure_text_height()

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.

Parameters

  device | Device that is connected
  text | Text to measure vertically.

Returns
  The size of the string vertically.

## ◆ scriptel_measure_text_height_encoding()

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.

Parameters

  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_measure_text_width()

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.

Parameters

  text | Text to measure horizontally.

Returns
  The size of the string horizontally.

## ◆ scriptel_measure_text_width_encoding()

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.

Parameters

  device | Device that is connected
  data | Text to measure.
  dataLen | Byte length of the text to measure.
  encoding | Encoding to use to decode data.

Returns
  The size of the string horizontally.

## ◆ scriptel_open_device()

scriptel_error_code scriptel_open_device | ( | scriptel_device * | device | ) |

This function attempts to open a local device returned by scriptel_list_devices().

Parameters

  device | Device to open.

Returns
  Whether or not opening the device was successful.

Examples
  example-connecting.c, example-image-cairo.c, example-image-gdiplus.cpp, example-reading.c, and example-screen-editing.c.

## ◆ scriptel_print_asic_register()

void scriptel_print_asic_register | ( | scriptel_hid_feature_register_get * | reg | ) |

This function prints an ASIC register structure to standard out.

Parameters

  reg | Register to print.

## ◆ scriptel_print_calibrate_state()

void scriptel_print_calibrate_state | ( | scriptel_hid_feature_calibrate * | state | ) |

This function prints a calibration state structure to standard out.

Parameters

  state | Calibration state structure to print.

## ◆ scriptel_print_calibration_data()

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.

Parameters

  calibration_data | The data to be printed.

## ◆ scriptel_print_capabilities()

void scriptel_print_capabilities | ( | scriptel_hid_capabilities * | caps | ) |

This function prints the static device capabilities.

Parameters

  caps | Capabilities

## ◆ scriptel_print_contact_count_maximum()

void scriptel_print_contact_count_maximum | ( | scriptel_hid_feature_contact_count_maximum * | contact | ) |

This function prints the contact count maximum information to standard out.

Parameters

  contact | Contact information to print.

## ◆ scriptel_print_coordinate_range()

void scriptel_print_coordinate_range | ( | scriptel_hid_feature_coordinate_range * | range | ) |

This function prints the logical coordinate range from the device to standard out.

Parameters

  range | Structure to print.

## ◆ scriptel_print_device_configure()

void scriptel_print_device_configure | ( | scriptel_hid_feature_device_configure * | config | ) |

This function prints the device configuration to standard out.

Parameters

  config | Configuration to print.

## ◆ scriptel_print_device_regions()

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.

Parameters

  regions | Regions array to print.
  count | Number of elements in the array.

## ◆ scriptel_print_device_status()

void scriptel_print_device_status | ( | scriptel_hid_feature_device_status * | status | ) |

This function prints out the status structure in human readable format.

Parameters

  status | The data to be printed.

## ◆ scriptel_print_device_uuid()

void scriptel_print_device_uuid | ( | unsigned char * | uuid | ) |

This function prints a UUID byte array to standard out.

Parameters

  uuid | UUID to display.

Examples
  example-connecting.c.

## ◆ scriptel_print_display_info()

void scriptel_print_display_info | ( | scriptel_hid_feature_display_info * | info | ) |

This function prints the information from a display information structure to standard out.

Parameters

  info | Information to print.

## ◆ scriptel_print_display_settings()

void scriptel_print_display_settings | ( | scriptel_hid_feature_display_settings * | settings | ) |

This function prints the information from a display settings structure to standard out.

Parameters

  settings | Settings to print.

## ◆ scriptel_print_error_correction_table()

void scriptel_print_error_correction_table | ( | scriptel_hid_feature_error_correction_table * | table | ) |

This function prints the error correction table to standard out.

Parameters

  table | Table to print.

## ◆ scriptel_print_frequency_amplitude()

void scriptel_print_frequency_amplitude | ( | scriptel_hid_feature_frequency_amplitude * | freq | ) |

This function prints the a frequency and amplitude settings structure to standard out.

Parameters

  freq | Structure to print.

## ◆ scriptel_print_general_parameters()

void scriptel_print_general_parameters | ( | scriptel_hid_feature_general_parameters * | params | ) |

This function prints a general operating parameters structure to standard out.

Parameters

  params | Parameters to print.

## ◆ scriptel_print_operating_modes()

void scriptel_print_operating_modes | ( | scriptel_hid_feature_operating_modes * | modes | ) |

This function prints a supported operating modes structure to standard out.

Parameters

  modes | Modes structure to print.

## ◆ scriptel_print_output_configuration()

void scriptel_print_output_configuration | ( | scriptel_hid_feature_output_parameters * | settings | ) |

This function prints the information from an output parameters structure to standard out.

Parameters

  settings | The structure to print in human readable form.

## ◆ scriptel_print_pen_parameters()

void scriptel_print_pen_parameters | ( | scriptel_hid_feature_pen_parameters * | pen | ) |

This function prints a pen parameters structure to standard out.

Parameters

  pen | Structure to print.

## ◆ scriptel_print_peripheral_configuration()

void scriptel_print_peripheral_configuration | ( | scriptel_hid_feature_peripheral_configuration * | settings | ) |

This function prints the information from a peripheral configuration structure to standard out.

Parameters

  settings | The structure to print in human readable form.

## ◆ scriptel_print_power_state()

void scriptel_print_power_state | ( | scriptel_hid_feature_power_state * | state | ) |

This function prints a power state structure to standard out.

Parameters

  state | State to print.

## ◆ scriptel_print_regions()

void scriptel_print_regions | ( | scriptel_device_region_info * | regions,
|  | unsigned int | count
| ) |  |

This function prints a set (1 or more) regions to standard out.

Parameters

  regions | Regions array to print.
  count | Number of elements in the array.

## ◆ scriptel_print_serial_number()

void scriptel_print_serial_number | ( | scriptel_hid_feature_serial_number * | serial | ) |

This function prints a serial number structure to standard out.

Parameters

  serial | Structure to print.

## ◆ scriptel_print_touch_parameters()

void scriptel_print_touch_parameters | ( | scriptel_hid_feature_touch_parameters * | touch | ) |

This function prints a touch parameters structure to standard out.

Parameters

  touch | Touch parameters to print.

## ◆ scriptel_print_version()

void scriptel_print_version | ( | scriptel_hid_feature_version * | version | ) |

This function prints a version information structure to standard out.

Parameters

  version | Structure to print.

## ◆ scriptel_register_hotplug_callback()

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.

Parameters

  callback | Callback to register.

## ◆ scriptel_register_input_callback()

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.

Parameters

  device | Device to associate the callback with.
  callback | Callback to call upon getting data.

Examples
  example-image-cairo.c, example-image-gdiplus.cpp, and example-reading.c.

## ◆ scriptel_restore_default_regions()

scriptel_error_code scriptel_restore_default_regions | ( | scriptel_device * | device | ) |

This function will attempt to restore the default region configuration to the device.

Parameters

  device | Device that is connected
  device | Device to restore default regions on.

Returns
  Whether or not the operation completed successfully.

## ◆ scriptel_set_active_screen()

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.

Parameters

  device | Device that is connected
  screen_index | index of the target active screen

Returns
  Error code indicating whether or not the call was successful.

Examples
  example-screen-editing.c.

## ◆ scriptel_set_asic_register()

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.

Parameters

  device | Device to set register on.
  reg | Register to set.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_asic_reset()

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.

Parameters

  device | Device to reset.
  reset | Reset parameters.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_calibration_data()

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.

Parameters

  device | Device to send the calibration data to.
  calibration_data | Calibration data to send.

Returns
  an error code. 0 is good.

## ◆ scriptel_set_device_configure()

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.

Parameters

  device | Device to set the configuration on.
  configure | Configuration to set.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_display_chunk()

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.

Parameters

  device | Device to receive raster.
  chunk | Chunk to push.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_display_content()

scriptel_error_code scriptel_set_display_content | ( | scriptel_device * | device,
|  | scriptel_hid_feature_display_content | content
| ) |  |

This function sets display content.

Parameters

  device | Device to update.
  content | Content to update.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_display_settings()

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.

Parameters

  device | Device to update.
  settings | New values for settings.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_easyscript_mode()

scriptel_error_code scriptel_set_easyscript_mode | ( | scriptel_device * | device,
|  | char | commit_changes
| ) |  |

This function sets the device to easyscript mode if possible.

Parameters

  device | device to set to easyscript mode.

## ◆ scriptel_set_edit_screen()

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.

Parameters

  device | Device to edit the screen of
  screen_edit | this variable holds all the information about the edited screen, including the index

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_error_correction()

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.

Parameters

  device | Device to update.
  errcor | Error correction table to write.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_firmware()

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.

Parameters

  device | Device to set the firmware page on.
  firmware | Page to set.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_firmware_download_status()

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.

Parameters

  device | Device to notify.
  status | Download status to set.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_frequency_amplitude()

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.

Parameters

  device | Device to set the frequency and amplitude settings on.
  freq | Frequency and amplitude settings to set.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_general_parameters()

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.

Parameters

  device | Device to update.
  params | Parameters to set.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_legacy_firmware()

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.

Parameters

  legacy | set to true (non-zero) for legacy (no wait) behavior

## ◆ scriptel_set_output_configuration()

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.

Parameters

  device | Device to set.
  settings | The output configuration settings.

Returns
  Success of error code

## ◆ scriptel_set_pen_parameters()

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.

Parameters

  device | Device to set parameters for.
  params | Parameters to set.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_peripheral_configuration()

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.

Parameters

  device | Device to set.
  settings | The peripheral configuration settings.

Returns
  Success of error code

## ◆ scriptel_set_power_state()

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.

Parameters

  device | Device to set the power state on.
  state | Power state to set.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_proscript_mode()

scriptel_error_code scriptel_set_proscript_mode | ( | scriptel_device * | device,
|  | char | commit_changes
| ) |  |

This function sets the device to proscript mode if possible.

Parameters

  device | device to set to proscript mode.

## ◆ scriptel_set_region()

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.

Parameters

  device | Device to update.
  region | Region to overwrite.

Returns
  Error code indicating whether or not the call was successful.

Deprecated:
  This function is deprecated in favor of scriptel_set_region_contents().

## ◆ scriptel_set_region_commit()

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.

Parameters

  device | Device to update.
  commit | Commit settings.

Returns
  Error code indicating whether or not the call was successful.

Deprecated:
  This function is deprecated in favor of scriptel_set_screen_region_commit().

## ◆ scriptel_set_region_contents()

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.

Parameters

  device | Device the region is on
  region | hosts the details about a region on the signature pad

Returns
  Error code indicating whether or not the call was successful.

Examples
  example-screen-editing.c.

## ◆ scriptel_set_region_idx()

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.

Parameters

  device | Device to set the region index on.
  region_index | The index of the region.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_resource()

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.

Parameters

  device | Device to view.
  resource | Resource or portion of resource to set.

Returns
  Error code indicating whether or not the call was successful.

Examples
  example-screen-editing.c.

## ◆ scriptel_set_resource_idx()

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.

Parameters

  device | Device to set the resource index on.
  resource_index | The resource of the screen.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_run_mode()

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.

Parameters

  device | Device to set the run mode on.
  run_mode | The run mode to set on the device.

Returns
  Error code indicating whether or not the call was successful.

Examples
  example-screen-editing.c.

## ◆ scriptel_set_screen()

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.

Parameters

  device | Device the screen is a part of
  screen | Screen variable that holds all the information and number of regions in use.

Returns
  Error code indicating whether or not the call was successful.

Examples
  example-screen-editing.c.

## ◆ scriptel_set_screen_idx()

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.

Parameters

  device | Device to set the screen index on.
  screen_index | The index of the screen.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_screen_region_commit()

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.

Parameters

  device | Device to update.
  commit | Commit settings.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_serial_number()

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.

Parameters

  device | Device to update.
  serial_number | Serial number to write.
  len | Length of the serial number.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_startup_mode()

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.

Parameters

  device | Device to update.
  mode | Default mode to start in.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_set_touch_parameters()

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.

Parameters

  device | Device to set parameters for.
  params | Parameters to set.

Returns
  Error code indicating whether or not the call was successful.

## ◆ scriptel_simulate_pen_input()

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).

Parameters

  dev | Device that is connected
  coord | This variable holds all of the info for setting a pen coordinate.

## ◆ scriptel_unregister_hotplug_callback()

void scriptel_unregister_hotplug_callback | ( | scriptel_hotplug_callback | callback | ) |

This function unregisters a hot-plug callback from the system.

Parameters

  callback | Callback to unregister.

## ◆ scriptel_unregister_input_callback()

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.

Parameters

  device | Device to disassociate the callback from.
  callback | Callback to unregister.

## ◆ scriptel_update_region()

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.

Parameters

  device | Device to update.
  region | Region settings to update with.

Returns
  Error code indicating whether or not the call was successful.

Deprecated:
  This function is deprecated as it isn't much smaller than calling scriptel_set_region_contents() and doesn't do as much.