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_infoscriptel_get_regions (scriptel_device *device)
 This function gets the current list of regions from the device as an array. More...
 
scriptel_device_region_infoscriptel_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_regionscriptel_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

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

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

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

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
screenscreen to add the region to.
regionthe region being added.
nextthe 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
deviceDevice 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
deviceDevice 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
deviceDevice 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
listList 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
deviceDevice to update.
regionRegion 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
deviceDevice to update.
regionRegion 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
deviceDevice to update
resource_indexthe 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
deviceDevice to delete the screen of
screen_indexthe 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
deviceDevice 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
deviceDevice 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
deviceDevice to draw the text upon.
textText to draw on the screen.
xThe horizontal coordinate where the text should be anchored.
yThe vertical coordinate where the text should be anchored.
alignmentThe position of the text anchor.
invertWhether 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
deviceDevice to draw the text upon.
dataEncoded text to draw on the screen in some encoding, must be null terminated.
dataLenThe length of the data buffer.
xThe horizontal coordinate where the text should be anchored.
yThe vertical coordinate where the text should be anchored.
alignmentThe position of the text anchor.
invertWhether or not to invert the text.
encodingThe 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
deviceDevice 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
deviceDevice 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
deviceDevice 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_listList 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
regionsRegions array to free.

◆ scriptel_free_device_uuid()

void scriptel_free_device_uuid ( unsigned char *  uuid)

This function frees the UUID of a device.

Parameters
uuidvariable 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
regionsRegions 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
devDevice 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
devDevice 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
devDevice 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
devDevice 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
devDevice that is connected
pidDesired 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
devDevice that is connected
guida structure holding the guid

◆ scriptel_genII_tune()

scriptel_error_code scriptel_genII_tune ( scriptel_device dev)

Initiates pen tuning for genII asicless devices.

Parameters
devDevice 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
deviceDevice 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
deviceDevice 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
deviceDevice to query.
regreference 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
deviceDevice 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
deviceDevice to query.
reportreference 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
deviceDevice 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
deviceDevice to get the data from.
calibration_dataPointer 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
deviceDevice 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
deviceDevice to query.
reportReference 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
deviceDevice 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
deviceDevice to query.
reportreference 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
deviceDevice 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
deviceDevice to query.
reportreference 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
deviceDevice 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
deviceDevice 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
deviceDevice to query.
reportreference 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
deviceDevice 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
deviceDevice 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
deviceDevice from which to obtain status.
statusA 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
deviceDevice 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
deviceDevice 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
deviceDevice to query.
reportreference 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
deviceDevice 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
deviceDevice to query.
reportreference 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
deviceDevice 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
deviceDevice to query.
tableError 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
deviceDevice 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
deviceDevice to query
fareference 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
deviceDevice 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
deviceDevice to query.
gparamsreference 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
deviceDevice 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
deviceDevice to query.
modesreference 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
deviceDevice 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
deviceDevice to query.
reportPointer 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
deviceDevice 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
deviceDevice to query.
reportreference 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
deviceDevice 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
deviceDevice to query.
reportPointer 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
deviceDevice that is connected
pixel_valuesis a pointer to a structure that gets filled in by the function that includes the pixel data and metadata
xthe x coordinate in terms of screen pixels to start reading from
ythe 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
deviceDevice 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
deviceDevice 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
deviceDevice 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
deviceDevice the region is on
regionhosts 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
deviceDevice 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
deviceDevice 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
deviceDevice 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
deviceDevice to view.

This function requires firmware 4.0.0 or greater.

Parameters
infohosts 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
deviceDevice 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
deviceDevice 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
deviceDevice to view.
infoResource 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
deviceDevice to view.
resourceResource 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
deviceDevice 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
deviceDevice 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
deviceDevice the screen is a part of
screenScreen 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
deviceDevice 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
deviceDevice that is connected
infoinformation 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
deviceDevice 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
deviceDevice to query.
snreference 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
deviceDevice 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
deviceDevice to query.
reportreference 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
deviceDevice 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
deviceDevice to query.
reportVersion 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
startAn 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
deviceDevice that is connected
textText 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
deviceDevice that is connected
dataText to measure.
dataLenByte length of the text to measure.
encodingEncoding 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
textText 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
deviceDevice that is connected
dataText to measure.
dataLenByte length of the text to measure.
encodingEncoding 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
deviceDevice 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
regRegister 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
stateCalibration 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_dataThe data to be printed.

◆ scriptel_print_capabilities()

void scriptel_print_capabilities ( scriptel_hid_capabilities caps)

This function prints the static device capabilities.

Parameters
capsCapabilities

◆ 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
contactContact 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
rangeStructure 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
configConfiguration 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
regionsRegions array to print.
countNumber 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
statusThe 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
uuidUUID 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
infoInformation 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
settingsSettings 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
tableTable 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
freqStructure 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
paramsParameters 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
modesModes 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
settingsThe 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
penStructure 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
settingsThe 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
stateState 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
regionsRegions array to print.
countNumber 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
serialStructure 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
touchTouch 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
versionStructure 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
callbackCallback 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
deviceDevice to associate the callback with.
callbackCallback 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
deviceDevice that is connected
deviceDevice 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
deviceDevice that is connected
screen_indexindex 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
deviceDevice to set register on.
regRegister 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
deviceDevice to reset.
resetReset 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
deviceDevice to send the calibration data to.
calibration_dataCalibration 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
deviceDevice to set the configuration on.
configureConfiguration 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
deviceDevice to receive raster.
chunkChunk 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
deviceDevice to update.
contentContent 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
deviceDevice to update.
settingsNew 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
devicedevice 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
deviceDevice to edit the screen of
screen_editthis 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
deviceDevice to update.
errcorError 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
deviceDevice to set the firmware page on.
firmwarePage 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
deviceDevice to notify.
statusDownload 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
deviceDevice to set the frequency and amplitude settings on.
freqFrequency 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
deviceDevice to update.
paramsParameters 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
legacyset 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
deviceDevice to set.
settingsThe 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
deviceDevice to set parameters for.
paramsParameters 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
deviceDevice to set.
settingsThe 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
deviceDevice to set the power state on.
statePower 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
devicedevice 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
deviceDevice to update.
regionRegion 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
deviceDevice to update.
commitCommit 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
deviceDevice the region is on
regionhosts 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
deviceDevice to set the region index on.
region_indexThe 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
deviceDevice to view.
resourceResource 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
deviceDevice to set the resource index on.
resource_indexThe 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
deviceDevice to set the run mode on.
run_modeThe 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
deviceDevice the screen is a part of
screenScreen 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
deviceDevice to set the screen index on.
screen_indexThe 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
deviceDevice to update.
commitCommit 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
deviceDevice to update.
serial_numberSerial number to write.
lenLength 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
deviceDevice to update.
modeDefault 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
deviceDevice to set parameters for.
paramsParameters 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
devDevice that is connected
coordThis 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
callbackCallback 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
deviceDevice to disassociate the callback from.
callbackCallback 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
deviceDevice to update.
regionRegion 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.