Scriptel ScripTouch ProScript C Library
This documentation contains information about the ScripTouch ProScript C Library.
scriptel-proscript.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * scriptel-proscript.h - Copyright 2014 - Scriptel Corporation
3 * ----
4 * This header contains the definitions for all of the public structures and
5 * functions for this library.
6 ******************************************************************************/
7 #ifndef _SCRIPTEL_PROSCRIPT_H_
8 #define _SCRIPTEL_PROSCRIPT_H_
63 #include "scriptel-list.h"
64 
65 //Include the hid report structures.
66 #include "scriptel-hid-reports.h"
67 
73 typedef enum scriptel_hotplug_type {
83 
88 typedef enum scriptel_error_code {
98 
117 
118 //Forward declaration of scriptel_device.
119 typedef struct scriptel_device scriptel_device;
148 typedef scriptel_error_code(*scriptel_set_output_report_func)(scriptel_device* device, unsigned char* buffer, unsigned int length);
152 typedef scriptel_error_code(*scriptel_set_feature_report_func)(scriptel_device* device, unsigned char* buffer, unsigned int length);
156 typedef scriptel_error_code(*scriptel_get_feature_report_func)(scriptel_device* device, unsigned char* buffer, unsigned int length);
160 typedef unsigned char(*scriptel_driver_thread_func)(void);
164 typedef void(*scriptel_driver_thread_wait_func)(void);
168 typedef char* (*scriptel_get_driver_name_func)(void);
172 typedef void(*scriptel_driver_shutdown_func)(void);
173 
174 typedef scriptel_list*(*get_hotplug_callbacks_func)(void);
175 
176 typedef scriptel_error_code(*scriptel_driver_device_free_func)(scriptel_device* device);
177 
178 typedef void(*scriptel_report_error_func)(char* fmt, ...);
179 
180 typedef void(*scriptel_debug_func)(const char* function, const char* file, int line_num, int level, char* message, ...);
181 
182 typedef void(*scriptel_deliver_input_report_func)(scriptel_device* device, unsigned char* report, unsigned int len);
183 
188 typedef struct scriptel_device_driver {
240  unsigned char initialized;
248  get_hotplug_callbacks_func get_hotplug_callbacks;
252  scriptel_driver_device_free_func free_device;
256  scriptel_report_error_func report_error;
260  scriptel_debug_func debug;
264  scriptel_deliver_input_report_func input_report;
266 
267 //Include the platform specific components.
268 #ifdef __linux__
269 //We're compiling on Linux, require the Linux header.
270 #include "scriptel-proscript-linux.h"
271 #elif _WIN32
272 //We're compiling on Windows, require the Windows header.
273 #include "scriptel-proscript-windows.h"
274 #elif __MACH__
275 //We're compiling on Mac, require the Mac header.
276 #include "scriptel-proscript-mac.h"
277 #endif
278 
284 typedef struct scriptel_device {
290  char* path;
295  unsigned short product_id;
300  unsigned short vendor_id;
305  char* model;
315  unsigned char* uuid;
319  unsigned char open;
324  unsigned char button_down;
329  unsigned char last_button;
346  scriptel_list* input_callbacks;
369  void* font;
376  scriptel_device_os_params parameters;
377 
379 
384 typedef void(
385 #ifdef SCRIPTEL_EXPORT_VB_DLL
386  __stdcall
387 #endif
388  *scriptel_input_callback)(scriptel_device* device, scriptel_input_report* report, unsigned char report_id, unsigned char* report_buffer, unsigned int report_len
389  );
390 
395 typedef void(
396 #ifdef SCRIPTEL_EXPORT_VB_DLL
397  __stdcall
398 #endif
399  *scriptel_hotplug_callback)(scriptel_hotplug_type type, char* device_path);
400 
417 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_free_device_list(scriptel_device* device_list);
423 SCRIPTEL_SYMBOL_LINKAGE(unsigned int) scriptel_count_device_list(scriptel_device* list);
429 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_init(void);
436 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_destroy(void);
442 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_open_device(scriptel_device* device);
457 SCRIPTEL_SYMBOL_LINKAGE(char*) scriptel_get_last_error(void);
465 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_device_read(scriptel_device* device);
475 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_device_read_until_done(scriptel_device* device);
483 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_device_read_done(scriptel_device* device);
490 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_register_input_callback(scriptel_device* device, scriptel_input_callback callback);
497 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_unregister_input_callback(scriptel_device* device, scriptel_input_callback callback);
503 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_register_hotplug_callback(scriptel_hotplug_callback callback);
508 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_unregister_hotplug_callback(scriptel_hotplug_callback callback);
509 
577 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_get_calibration_data_ref(scriptel_device* device, scriptel_hid_feature_calibration_data* calibration_data);
599 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_print_calibration_data(scriptel_hid_feature_calibration_data* calibration_data);
644 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_get_capabilities_ref(scriptel_device* device, scriptel_hid_capabilities* report);
649 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_print_capabilities(scriptel_hid_capabilities* caps);
701 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_add_region_to_screen(scriptel_hid_feature_screen *screen, int region, int next);
706 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_set_easyscript_mode(scriptel_device* device, char commit_changes);
711 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_set_proscript_mode(scriptel_device* device, char commit_changes);
758 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_print_power_state(scriptel_hid_feature_power_state* state);
770 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_get_version_ref(scriptel_device* device, scriptel_hid_feature_version* report);
775 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_print_version(scriptel_hid_feature_version* version);
981 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_print_regions(scriptel_device_region_info* regions, unsigned int count);
1002 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_print_device_regions(scriptel_hid_feature_region* regions, unsigned int count);
1026 SCRIPTEL_SYMBOL_LINKAGE(unsigned char*) scriptel_get_device_uuid(scriptel_device* device);
1031 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_free_device_uuid(unsigned char* uuid);
1036 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_print_device_uuid(unsigned char* uuid);
1118 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_set_serial_number(scriptel_device* device, char* serial_number, unsigned int len);
1275 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_delete_region(scriptel_device* device, unsigned char region);
1288 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_delete_resource(scriptel_device* device, unsigned char resource_index);
1295 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_delete_device_region(scriptel_device* device, unsigned char region);
1319 SCRIPTEL_SYMBOL_LINKAGE(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);
1334 SCRIPTEL_SYMBOL_LINKAGE(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);
1341 SCRIPTEL_SYMBOL_LINKAGE(unsigned int) scriptel_measure_text_width(scriptel_device* device, char* text);
1349 SCRIPTEL_SYMBOL_LINKAGE(unsigned int) scriptel_measure_text_height(scriptel_device* device, char* text);
1359 SCRIPTEL_SYMBOL_LINKAGE(unsigned int) scriptel_measure_text_width_encoding(scriptel_device* device, char* data, unsigned int dataLen, char* encoding);
1368 SCRIPTEL_SYMBOL_LINKAGE(unsigned int) scriptel_measure_text_height_encoding(scriptel_device* device, char* data, unsigned int dataLen, char* encoding);
1381 SCRIPTEL_SYMBOL_LINKAGE(char*) scriptel_get_proscript_version(void);
1386 SCRIPTEL_SYMBOL_LINKAGE(unsigned int) scriptel_get_proscript_version_major(void);
1391 SCRIPTEL_SYMBOL_LINKAGE(unsigned int) scriptel_get_proscript_version_minor(void);
1396 SCRIPTEL_SYMBOL_LINKAGE(unsigned int) scriptel_get_proscript_version_release(void);
1401 SCRIPTEL_SYMBOL_LINKAGE(char*) scriptel_get_proscript_build_date(void);
1410 SCRIPTEL_SYMBOL_LINKAGE(int) scriptel_get_region_idx(scriptel_device* device);
1420 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_set_region_idx(scriptel_device* device, unsigned char region_index);
1438 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_get_region_ref(scriptel_device* device, scriptel_hid_feature_region* region);
1476 SCRIPTEL_SYMBOL_LINKAGE(int) scriptel_get_resource_idx(scriptel_device* device);
1486 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_set_resource_idx(scriptel_device* device, unsigned char resource_index);
1524 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_get_resource_ref(scriptel_device* device, scriptel_hid_feature_resource* resource);
1570 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_get_screen_ref(scriptel_device* device, scriptel_hid_feature_screen* screen);
1589 SCRIPTEL_SYMBOL_LINKAGE(int) scriptel_get_screen_idx(scriptel_device* device);
1599 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_set_screen_idx(scriptel_device* device, unsigned char screen_index);
1609 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_delete_screen(scriptel_device* device, unsigned char screen_index);
1646 SCRIPTEL_SYMBOL_LINKAGE(int) scriptel_get_active_screen(scriptel_device* device);
1656 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_set_active_screen(scriptel_device* device, unsigned char screen_index);
1662 SCRIPTEL_SYMBOL_LINKAGE(void) scriptel_set_legacy_firmware(int version, char legacy);
1663 
1680 
1691 SCRIPTEL_SYMBOL_LINKAGE(scriptel_error_code) scriptel_genII_set_device_pid(scriptel_device* dev, unsigned short pid);
1707 
1713 
1720 
1721 extern scriptel_device_driver scriptel_real_driver;
1722 #endif
This file contains the headers required for lower level communication with ScripTouch devices.
scriptel_region_save_changes
This enumeration contains the valid options for region edit complete.
Definition: scriptel-hid-reports.h:2697
scriptel_screen_region_save_changes
Definition: scriptel-hid-reports.h:2708
scriptel_device_run_mode
This enumeration contains all of the valid run modes for ScripTouch firmware.
Definition: scriptel-hid-reports.h:572
scriptel_device_acquisition_mode
This enumeration contains all supported acquisition modes.
Definition: scriptel-hid-reports.h:616
scriptel_error_code scriptel_delete_device_region(scriptel_device *device, unsigned char region)
This function "deletes" a region, effectively removing it from the screen.
void scriptel_init(void)
This function should be called prior to using any other library functions.
scriptel_hotplug_type
This enumeration contains a list of codes indicating whether or not a device has been added to or rem...
Definition: scriptel-proscript.h:73
@ SCRIPTEL_HOTPLUG_ATTACHED
The device was added to the system.
Definition: scriptel-proscript.h:77
@ SCRIPTEL_HOTPLUG_DETACHED
The device was removed from the system.
Definition: scriptel-proscript.h:81
void scriptel_get_display_settings_ref(scriptel_device *device, scriptel_hid_feature_display_settings *report)
This function gets dynamic display settings from the device.
unsigned int scriptel_count_device_list(scriptel_device *list)
This function counts the number of devices in a given device list.
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 connect...
Definition: scriptel-proscript.h:399
scriptel_font_alignment
This enumeration contains constants relating to the alignment of text.
Definition: scriptel-proscript.h:103
@ SCRIPTEL_ALIGN_LEFT
Aligns text to the left.
Definition: scriptel-proscript.h:107
@ SCRIPTEL_ALIGN_CENTER
Aligns text to the center.
Definition: scriptel-proscript.h:115
@ SCRIPTEL_ALIGN_RIGHT
Aligns text to the right.
Definition: scriptel-proscript.h:111
scriptel_error_code scriptel_set_easyscript_mode(scriptel_device *device, char commit_changes)
This function sets the device to easyscript mode if possible.
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.
scriptel_hid_feature_general_parameters scriptel_get_general_parameters(scriptel_device *device)
This function gets general operating parameters from a device.
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.
scriptel_hid_feature_power_state scriptel_get_power_state(scriptel_device *device)
This function gets the current power state of the device.
unsigned char(* scriptel_driver_thread_func)(void)
This typedef should return whether or not there's a thread running for this driver.
Definition: scriptel-proscript.h:160
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...
scriptel_error_code(* scriptel_read_device_func)(scriptel_device *device)
This typedef should read from an abstract ScripTouch device.
Definition: scriptel-proscript.h:144
void scriptel_print_version(scriptel_hid_feature_version *version)
This function prints a version information structure to standard out.
scriptel_error_code scriptel_delete_screen(scriptel_device *device, unsigned char screen_index)
This function deletes a screen that is set on the device.
scriptel_error_code(* scriptel_open_device_func)(scriptel_device *)
This typdef should open an abstract ScripTouch device.
Definition: scriptel-proscript.h:132
int scriptel_genII_query_hardware_configuration(scriptel_device *dev)
This function returns the reported hardward configuration of a STGENII board.
void scriptel_print_display_info(scriptel_hid_feature_display_info *info)
This function prints the information from a display information structure to standard out.
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.
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.
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.
scriptel_hid_feature_display_settings scriptel_get_display_settings(scriptel_device *device)
This function gets dynamic display settings from the device.
unsigned char * scriptel_get_device_uuid(scriptel_device *device)
This function returns the UUID of a device as a byte array.
void scriptel_print_peripheral_configuration(scriptel_hid_feature_peripheral_configuration *settings)
This function prints the information from a peripheral configuration structure to standard out.
void scriptel_print_output_configuration(scriptel_hid_feature_output_parameters *settings)
This function prints the information from an output parameters structure to standard out.
void scriptel_get_calibration_data_ref(scriptel_device *device, scriptel_hid_feature_calibration_data *calibration_data)
This function gets data about calibration.
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.
void scriptel_register_hotplug_callback(scriptel_hotplug_callback callback)
This function registers a hot-plug callback for the system.
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...
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.
scriptel_hid_feature_device_status scriptel_get_device_status(scriptel_device *device)
This function gets the current status of the device.
void scriptel_free_regions(scriptel_device_region_info *regions)
This function frees a region array returned from scriptel_get_regions() or scriptel_get_default_regio...
int scriptel_get_active_screen(scriptel_device *device)
This function returns the index of the active screen on the signature pad.
scriptel_hid_feature_version scriptel_get_version(scriptel_device *device)
This function gets the current version of the device.
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 info...
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.
scriptel_error_code scriptel_list_devices(scriptel_device **start)
This function takes a pointer and will attempt to enumerate any attached ScripTouch devices.
scriptel_hid_feature_serial_number scriptel_get_serial_number(scriptel_device *device)
This function gets the serial number of the device (if set).
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.
scriptel_hid_feature_peripheral_configuration scriptel_get_peripheral_configuration(scriptel_device *device)
This function gets the output configuration information from the device.
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.
void scriptel_get_capabilities_ref(scriptel_device *device, scriptel_hid_capabilities *report)
This function gets device capabilities (if supported).
scriptel_hid_feature_calibrate scriptel_get_calibrate_state(scriptel_device *device)
This function returns the current calibration state of a device.
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.
void scriptel_print_asic_register(scriptel_hid_feature_register_get *reg)
This function prints an ASIC register structure to standard out.
scriptel_error_code scriptel_close_device(scriptel_device *device)
This function attempts to close a local device that was previously opened.
scriptel_hid_capabilities scriptel_get_capabilities(scriptel_device *device)
This function gets device capabilities (if supported).
scriptel_hid_feature_device_configure scriptel_get_device_configure(scriptel_device *device)
This function gets the active device configuration from a ScripTouch mouse device.
scriptel_error_code scriptel_set_screen(scriptel_device *device, scriptel_hid_feature_screen *screen)
This function sets the information about a screen that can be displayed on the device based off the s...
void scriptel_get_calibrate_state_ref(scriptel_device *device, scriptel_hid_feature_calibrate *report)
This function returns the current calibration state of a device.
void scriptel_get_operating_modes_ref(scriptel_device *device, scriptel_hid_feature_operating_modes *modes)
This function gets supported operating modes from the device.
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.
void scriptel_get_general_parameters_ref(scriptel_device *device, scriptel_hid_feature_general_parameters *gparams)
This function gets general operating parameters from a device.
void scriptel_print_general_parameters(scriptel_hid_feature_general_parameters *params)
This function prints a general operating parameters structure to standard out.
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 info...
scriptel_error_code scriptel_open_device(scriptel_device *device)
This function attempts to open a local device returned by scriptel_list_devices().
scriptel_error_code(* scriptel_driver_init_func)(void)
This typedef should initialize an abstract ScripTouch driver.
Definition: scriptel-proscript.h:124
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.
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.
scriptel_hid_feature_operating_modes scriptel_get_operating_modes(scriptel_device *device)
This function gets supported operating modes from the device.
char * scriptel_get_last_error(void)
This function gets the last error message generated by the library.
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.
scriptel_hid_feature_touch_parameters scriptel_get_touch_parameters(scriptel_device *device)
This function gets operating parameters for touch input from the device.
scriptel_error_code scriptel_genII_set_device_pid(scriptel_device *dev, unsigned short pid)
This function sets the PID of the connected STGENII board.
scriptel_hid_feature_pen_parameters scriptel_get_pen_parameters(scriptel_device *device)
This function gets operating parameters for pen input from the device.
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).
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.
scriptel_hid_feature_guid scriptel_genII_get_hardware_GUID(scriptel_device *dev)
Gets the guid that was burned into the device during production.
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.
void scriptel_print_contact_count_maximum(scriptel_hid_feature_contact_count_maximum *contact)
This function prints the contact count maximum information to standard out.
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.
struct scriptel_device_driver scriptel_device_driver
This structure contains function pointers to the functions required to interact with a device.
Definition: scriptel-proscript.h:120
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.
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.
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.
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.
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.
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.
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.
scriptel_error_code scriptel_delete_region(scriptel_device *device, unsigned char region)
This function "deletes" a region, effectively removing it from the screen.
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 ...
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.
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.
scriptel_hid_feature_error_correction_table scriptel_get_error_correction_table(scriptel_device *device)
This function gets the error correction table from the device.
void scriptel_print_display_settings(scriptel_hid_feature_display_settings *settings)
This function prints the information from a display settings structure to standard out.
void scriptel_device_read_done(scriptel_device *device)
This function will signal the reading thread created by calling scriptel_device_read_until_done() tha...
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.
unsigned int scriptel_get_proscript_version_release(void)
This function will return the release version of the ProScript library.
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_...
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.
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.
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...
scriptel_error_code scriptel_set_display_content(scriptel_device *device, scriptel_hid_feature_display_content content)
This function sets display content.
void scriptel_print_touch_parameters(scriptel_hid_feature_touch_parameters *touch)
This function prints a touch parameters structure to standard out.
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.
void scriptel_print_operating_modes(scriptel_hid_feature_operating_modes *modes)
This function prints a supported operating modes structure to standard out.
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.
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.
void scriptel_print_error_correction_table(scriptel_hid_feature_error_correction_table *table)
This function prints the error correction table to standard out.
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.
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...
Definition: scriptel-proscript.h:388
scriptel_error_code(* scriptel_close_device_func)(scriptel_device *device)
This typedef should close an abstract ScripTouch device.
Definition: scriptel-proscript.h:136
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.
scriptel_error_code scriptel_set_firmware(scriptel_device *device, scriptel_hid_feature_firmware_download firmware)
This function sets a firmware page on the device.
scriptel_hid_feature_calibration_data scriptel_get_calibration_data(scriptel_device *device)
This function gets data about calibration.
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.
Definition: scriptel-proscript.h:152
void scriptel_print_capabilities(scriptel_hid_capabilities *caps)
This function prints the static device capabilities.
void scriptel_print_pen_parameters(scriptel_hid_feature_pen_parameters *pen)
This function prints a pen parameters structure to standard out.
void scriptel_print_device_configure(scriptel_hid_feature_device_configure *config)
This function prints the device configuration to standard out.
scriptel_hid_feature_output_parameters scriptel_get_output_configuration(scriptel_device *device)
This function gets the output configuration information from the device.
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.
scriptel_error_code(* scriptel_driver_destroy_func)(scriptel_device_driver *driver)
This typedef should destroy an abstract ScripTouch driver.
Definition: scriptel-proscript.h:128
scriptel_error_code scriptel_device_cancel_calibrate(scriptel_device *device)
This function forces the device out of calibration mode.
void scriptel_free_device_list(scriptel_device *device_list)
This function crawls a scriptel_device list and attempts to free any library managed memory associate...
void scriptel_get_device_status_ref(scriptel_device *device, scriptel_hid_feature_device_status *status)
This function gets the current status of the device.
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.
void scriptel_free_device_uuid(unsigned char *uuid)
This function frees the UUID of a device.
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.
scriptel_hid_feature_resource_availability scriptel_get_resource_availability(scriptel_device *device)
This function retrieves the available space on the device for resources.
scriptel_error_code scriptel_simulate_pen_input(scriptel_device *dev, scriptel_pen_coordinate *coord)
This function is used for unit testing.
scriptel_error_code
This enumeration contains all of the return codes that functions in this library can return.
Definition: scriptel-proscript.h:88
@ SCRIPTEL_CODE_ERROR
This code indicates that the function did not succeed.
Definition: scriptel-proscript.h:92
@ SCRIPTEL_CODE_SUCCESS
This code indicates that the function did succeed.
Definition: scriptel-proscript.h:96
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.
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(makin...
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.
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.
Definition: scriptel-proscript.h:156
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.
scriptel_error_code scriptel_genII_abort_tune(scriptel_device *dev)
Aborts pen tuning for genII asicless devices.
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.
void scriptel_get_version_ref(scriptel_device *device, scriptel_hid_feature_version *report)
This function gets the current version of the device.
void scriptel_print_device_status(scriptel_hid_feature_device_status *status)
This function prints out the status structure in human readable format.
void(* scriptel_driver_thread_wait_func)(void)
This typedef should return wait for the device's thread to exit.
Definition: scriptel-proscript.h:164
void scriptel_destroy(void)
This function should be called when you're done with the library and no longer want to interact with ...
void scriptel_print_calibrate_state(scriptel_hid_feature_calibrate *state)
This function prints a calibration state structure to standard out.
int scriptel_get_region_idx(scriptel_device *device)
This function returns the index of a region on the signature pad.
struct scriptel_device scriptel_device
This structure represents a physically attached Scriptel ScripTouch device.
Definition: scriptel-proscript.h:119
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.
scriptel_error_code scriptel_restore_default_regions(scriptel_device *device)
This function will attempt to restore the default region configuration to the device.
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...
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.
unsigned int scriptel_get_proscript_version_minor(void)
This function will return the minor version of the ProScript library.
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.
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.
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.
scriptel_error_code scriptel_device_read(scriptel_device *device)
This function attempts to read from the passed in device.
void scriptel_print_power_state(scriptel_hid_feature_power_state *state)
This function prints a power state structure to standard out.
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.
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.
void scriptel_print_coordinate_range(scriptel_hid_feature_coordinate_range *range)
This function prints the logical coordinate range from the device to standard out.
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.
void scriptel_print_device_uuid(unsigned char *uuid)
This function prints a UUID byte array to standard out.
void scriptel_print_frequency_amplitude(scriptel_hid_feature_frequency_amplitude *freq)
This function prints the a frequency and amplitude settings structure to standard out.
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.
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.
Definition: scriptel-proscript.h:148
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 ...
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.
void scriptel_unregister_hotplug_callback(scriptel_hotplug_callback callback)
This function unregisters a hot-plug callback from the system.
void scriptel_register_input_callback(scriptel_device *device, scriptel_input_callback callback)
This function registers an input callback for a device.
void scriptel_get_display_info_ref(scriptel_device *device, scriptel_hid_feature_display_info *report)
This function gets static display information from the device.
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.
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.
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 t...
void scriptel_print_regions(scriptel_device_region_info *regions, unsigned int count)
This function prints a set (1 or more) regions to standard out.
scriptel_hid_feature_display_info scriptel_get_display_info(scriptel_device *device)
This function gets static display information from the device.
scriptel_device_region_info * scriptel_get_regions(scriptel_device *device)
This function gets the current list of regions from the device as an array.
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.
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.
void(* scriptel_driver_shutdown_func)(void)
This typedef gets called when ProScript is getting destroyed.
Definition: scriptel-proscript.h:172
int scriptel_get_screen_idx(scriptel_device *device)
This function returns the index of a screen on the signature pad.
char * scriptel_get_proscript_build_date(void)
This function will return date that the ProScript library was built in format: yyyy-MM-dd HH:mm:ssZ.
char * scriptel_get_proscript_version(void)
This function will return a string containing the version number.
scriptel_error_code scriptel_device_calibrate(scriptel_device *device)
This function forces the device into calibration mode.
scriptel_error_code scriptel_clear_screen(scriptel_device *device)
This function clears the screen of the device.
scriptel_error_code scriptel_set_proscript_mode(scriptel_device *device, char commit_changes)
This function sets the device to proscript mode if possible.
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.
scriptel_error_code scriptel_clear_last_error(scriptel_device *device)
This function clears the error data from the device.
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...
scriptel_error_code scriptel_genII_set_hardware_GUID(scriptel_device *dev, scriptel_hid_feature_guid guid)
Sets the guid in the genII device.
scriptel_hid_feature_tuning_status scriptel_genII_get_tuning_status(scriptel_device *dev)
Gets the pen tuning status or genII asicless devices.
scriptel_error_code scriptel_genII_tune(scriptel_device *dev)
Initiates pen tuning for genII asicless devices.
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.
void scriptel_free_device_regions(scriptel_hid_feature_region *regions)
This function frees a region array returned from scriptel_get_device_regions().
scriptel_error_code(* scriptel_list_devices_func)(scriptel_device_driver *driver, scriptel_device **start)
This typdef should list a set of abstract ScripTouch devices.
Definition: scriptel-proscript.h:140
void scriptel_print_serial_number(scriptel_hid_feature_serial_number *serial)
This function prints a serial number structure to standard out.
unsigned int scriptel_get_proscript_version_major(void)
This function will return the major version of the ProScript library.
char *(* scriptel_get_driver_name_func)(void)
This typedef should get a driver name from an abstract driver.
Definition: scriptel-proscript.h:168
scriptel_error_code scriptel_set_asic_reset(scriptel_device *device, scriptel_hid_feature_asic_reset reset)
This function resets the internal digitizer ASIC.
This structure contains function pointers to the functions required to interact with a device.
Definition: scriptel-proscript.h:188
scriptel_driver_init_func driver_init
Function pointer to driver initializer.
Definition: scriptel-proscript.h:192
scriptel_open_device_func open_device
Function pointer to open this device.
Definition: scriptel-proscript.h:200
scriptel_set_output_report_func set_output_report
Function pointer to set output report.
Definition: scriptel-proscript.h:216
scriptel_driver_thread_wait_func wait_thread
Wait for the thread to finish.
Definition: scriptel-proscript.h:236
scriptel_driver_shutdown_func shutdown
This function gets called when proscript is getting destroyed.
Definition: scriptel-proscript.h:244
scriptel_debug_func debug
Function for the driver to call to do debugging.
Definition: scriptel-proscript.h:260
scriptel_read_device_func device_read
Function pointer to read from a device.
Definition: scriptel-proscript.h:212
scriptel_set_feature_report_func set_feature_report
Function pointer to set feature report.
Definition: scriptel-proscript.h:220
get_hotplug_callbacks_func get_hotplug_callbacks
function pointer to get the list of hotplug callbacks.
Definition: scriptel-proscript.h:248
scriptel_driver_destroy_func driver_destroy
Function pointer to driver destructor.
Definition: scriptel-proscript.h:196
scriptel_driver_device_free_func free_device
Function to call to free a device.
Definition: scriptel-proscript.h:252
scriptel_report_error_func report_error
Function for the driver to call to report a problem.
Definition: scriptel-proscript.h:256
scriptel_get_driver_name_func get_name
Function pointer to get name function.
Definition: scriptel-proscript.h:228
unsigned char initialized
Whether or not this driver has been initialized or not.
Definition: scriptel-proscript.h:240
scriptel_list_devices_func list_devices
Function pointer to list devices for this driver.
Definition: scriptel-proscript.h:208
scriptel_close_device_func close_device
Function pointer to close this device.
Definition: scriptel-proscript.h:204
scriptel_get_feature_report_func get_feature_report
Function pointer to get feature report.
Definition: scriptel-proscript.h:224
scriptel_deliver_input_report_func input_report
Function for the driver to call to report an input report.
Definition: scriptel-proscript.h:264
scriptel_driver_thread_func thread_running
Whether or not this driver has a thread running.
Definition: scriptel-proscript.h:232
This structure represents a physically attached Scriptel ScripTouch device.
Definition: scriptel-proscript.h:284
scriptel_device_region_info * regions
Pointer to cached region information from the device at open time.
Definition: scriptel-proscript.h:341
void * font
A pointer to the font used when displaying text on the device.
Definition: scriptel-proscript.h:369
struct scriptel_device * next
A pointer to the next device if there is one.
Definition: scriptel-proscript.h:355
unsigned char last_button
Stores the last button that was depressed.
Definition: scriptel-proscript.h:329
unsigned char button_down
Indicates whether or not a button is currently depressed.
Definition: scriptel-proscript.h:324
char * path
The path to the device.
Definition: scriptel-proscript.h:290
void * user_defined
A null pointer that can be used by libraries to attach information to the device as it's passed aroun...
Definition: scriptel-proscript.h:351
unsigned char open
Indicates whether or not the device is in the open state.
Definition: scriptel-proscript.h:319
scriptel_hid_feature_display_info display_info
Cached display information from the device at open time.
Definition: scriptel-proscript.h:333
scriptel_list * input_callbacks
A list of input callbacks, these will be called when input is received from the device.
Definition: scriptel-proscript.h:346
scriptel_hid_feature_version version_info
Cached version information from the device at open time.
Definition: scriptel-proscript.h:337
unsigned short product_id
The product id of this device as returned by the operating system's HID driver.
Definition: scriptel-proscript.h:295
unsigned short vendor_id
The vendor id of this device as returned by the operating system's HID driver.
Definition: scriptel-proscript.h:300
unsigned char * uuid
The 16-byte universally unique identifier of this device.
Definition: scriptel-proscript.h:315
scriptel_device_os_params parameters
Operating system specific parameters required to interact with the device.
Definition: scriptel-proscript.h:376
scriptel_device_driver * driver
The driver that can be used to talk to this device.
Definition: scriptel-proscript.h:359
char * model
The textual name of the device as returned by the operating system's HID driver.
Definition: scriptel-proscript.h:305
void * driver_defined
A pointer to anything that a specific driver/plugin may need to manage a device.
Definition: scriptel-proscript.h:365
char * manufacturer
The textual name of the manufacturer as returned by the operating system's HID driver.
Definition: scriptel-proscript.h:310
This structure describes the capabilities report of a ScripTouch device.
Definition: scriptel-hid-reports.h:1329
This structure allows the reset of a device ASIC.
Definition: scriptel-hid-reports.h:1810
This structure contains information about whether or not the device is currently calibrating.
Definition: scriptel-hid-reports.h:2757
This report contains information about the current calibration state of a ScripTouch device.
Definition: scriptel-hid-reports.h:2230
This report is capable of retrieving the maximum number of track-able contacts in a multi-touch digit...
Definition: scriptel-hid-reports.h:1483
This report is capable of getting the coordinate range from the device.
Definition: scriptel-hid-reports.h:1582
This report is capable of getting the device configuration.
Definition: scriptel-hid-reports.h:1464
This report contains information about a ScripTouch device's current running state.
Definition: scriptel-hid-reports.h:2163
This structure contains information about a raster that should be displayed on the screen of a device...
Definition: scriptel-hid-reports.h:2425
This structure contains information related to display content.
Definition: scriptel-hid-reports.h:2373
This structure contains static information about a device's display and capabilities.
Definition: scriptel-hid-reports.h:2331
This structure contains information about dynamic display settings.
Definition: scriptel-hid-reports.h:2387
This report indicates to the device that a firmware update session has been completed.
Definition: scriptel-hid-reports.h:1708
Structure that can be used to modify a screen.
Definition: scriptel-hid-reports.h:3435
This report is capable of getting and setting the internal error correction table on the device.
Definition: scriptel-hid-reports.h:1639
This report is capable of uploading a new page of firmware to the device.
Definition: scriptel-hid-reports.h:1608
This report contains ASIC frequency and amplitude settings.
Definition: scriptel-hid-reports.h:1497
This report gets and sets general digitizer parameters for the device.
Definition: scriptel-hid-reports.h:1752
16 byte char array holding the guid value for the device.
Definition: scriptel-hid-reports.h:1653
This report gets the supported operating modes of the device.
Definition: scriptel-hid-reports.h:1722
This structure contains information about output configuration.
Definition: scriptel-hid-reports.h:2052
This structure contains information about pen parameters.
Definition: scriptel-hid-reports.h:1860
This structure contains information about peripheral configuration.
Definition: scriptel-hid-reports.h:2085
This structure contains pixel information for getting or setting a portion of the screen.
Definition: scriptel-hid-reports.h:1954
This report is capable of getting and setting the ASIC power state.
Definition: scriptel-hid-reports.h:1546
This structure describes an update to a region.
Definition: scriptel-hid-reports.h:2649
This structure contains information from an ASIC register.
Definition: scriptel-hid-reports.h:1828
This structure allows setting of ASIC registers.
Definition: scriptel-hid-reports.h:1842
Defines a structure that represents the amount of open resources on the device.
Definition: scriptel-hid-reports.h:2936
Definition: scriptel-hid-reports.h:2790
Defines a structure for a resource on the device.
Definition: scriptel-hid-reports.h:2855
Describes a structure that gets the screen and region limitations of the current device.
Definition: scriptel-hid-reports.h:3501
Structure that can be used to get or set a screen on the device.
Definition: scriptel-hid-reports.h:3329
This report is capable of getting and setting the internal serial number on the device.
Definition: scriptel-hid-reports.h:1668
This structure contains information about touch parameters.
Definition: scriptel-hid-reports.h:1986
Definition: scriptel-hid-reports.h:1516
This report is capable of getting the device version information.
Definition: scriptel-hid-reports.h:1560
Definition: scriptel-hid-reports.h:3604
This union contains all types of regions.
Definition: scriptel-hid-reports.h:2613
This union contains all region information.
Definition: scriptel-hid-reports.h:3299
This union contains all valid input report types.
Definition: scriptel-hid-reports.h:3728