#include <stdio.h>
int main() {
if(device != NULL) {
memcpy(text->
resource_data,
"Please select which screen you would like to appear.", 53);
free(text);
free(textPrompt);
memcpy(splashButton->
button.
caption,
"Splash",
sizeof(
"Splash"));
free(splashButton);
memcpy(sigButton->
button.
caption,
"Signature",
sizeof(
"Signature"));
free(sigButton);
memcpy(testScreen->
region_list, (
char[3]){ 10, 11, 12 }, 3);
} else {
return 1;
}
} else {
printf("No devices found!\n");
return 2;
}
} else {
return 3;
}
}
@ SCRIPTEL_RUNMODE_PEN
Pen mode, configures the digitizer to accept pen input.
Definition: scriptel-hid-reports.h:585
@ SCRIPTEL_RUNMODE_COMMAND
Command mode, turns off the ASIC and accepts commands.
Definition: scriptel-hid-reports.h:576
@ SCRIPTEL_JUSTIFICATION_CENTER
Justifies the resouce to the center.
Definition: scriptel-hid-reports.h:3221
@ SCRIPTEL_JUSTIFICATION_TOP
Justifies the resouce to the top.
Definition: scriptel-hid-reports.h:3209
@ SCRIPTEL_REGION_TYPE_BUTTON
Type for buttons.
Definition: scriptel-hid-reports.h:672
@ SCRIPTEL_REGION_TYPE_TEXT
Type for text.
Definition: scriptel-hid-reports.h:684
@ SCRIPTEL_RESOURCE_TYPE_TEXT
Rext resource.
Definition: scriptel-hid-reports.h:2779
This file contains the headers for the core of the Scriptel ScripTouch ProScript library.
void scriptel_init(void)
This function should be called prior to using any other library functions.
unsigned int scriptel_count_device_list(scriptel_device *list)
This function counts the number of devices in a given device list.
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.
scriptel_error_code scriptel_list_devices(scriptel_device **start)
This function takes a pointer and will attempt to enumerate any attached ScripTouch devices.
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.
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...
scriptel_error_code scriptel_open_device(scriptel_device *device)
This function attempts to open a local device returned by scriptel_list_devices().
char * scriptel_get_last_error(void)
This function gets the last error message generated by the library.
@ SCRIPTEL_CODE_SUCCESS
This code indicates that the function did succeed.
Definition: scriptel-proscript.h:96
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.
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.
This structure describes a particular color in 32-bit space.
Definition: scriptel-hid-reports.h:2308
unsigned char red
The red channel of this color.
Definition: scriptel-hid-reports.h:2324
unsigned char green
The green channel of this color.
Definition: scriptel-hid-reports.h:2320
unsigned char blue
The blue channel of this color.
Definition: scriptel-hid-reports.h:2316
unsigned char alpha
The alpha channel of this color.
Definition: scriptel-hid-reports.h:2312
This structure represents a physically attached Scriptel ScripTouch device.
Definition: scriptel-proscript.h:284
char * path
The path to the device.
Definition: scriptel-proscript.h:290
char * model
The textual name of the device as returned by the operating system's HID driver.
Definition: scriptel-proscript.h:305
char * manufacturer
The textual name of the manufacturer as returned by the operating system's HID driver.
Definition: scriptel-proscript.h:310
scriptel_color background_color
Background color of the region.
Definition: scriptel-hid-reports.h:3092
unsigned short x1
X minimum of the region.
Definition: scriptel-hid-reports.h:3072
scriptel_region_type region_type
The type of region this represents.
Definition: scriptel-hid-reports.h:3014
unsigned char decode_region
Whether or not this region gets decoded.
Definition: scriptel-hid-reports.h:3024
unsigned short y1
Y minimum of the region.
Definition: scriptel-hid-reports.h:3080
unsigned short x2
X maximum of the region.
Definition: scriptel-hid-reports.h:3076
unsigned char has_frame
Whether or not there is a frame around the region.
Definition: scriptel-hid-reports.h:3028
unsigned char region_index
The region index on the device.
Definition: scriptel-hid-reports.h:3010
scriptel_color foreground_color
Foreground color of the region.
Definition: scriptel-hid-reports.h:3088
unsigned char accepts_touch
Whether or not this region accepts touch.
Definition: scriptel-hid-reports.h:3018
unsigned short y2
Y maximum of the region.
Definition: scriptel-hid-reports.h:3084
unsigned char resource_number
Resource number where the text is stored.
Definition: scriptel-hid-reports.h:3282
scriptel_resource_justification vertical_justification
Vertical justification of the text in this region.
Definition: scriptel-hid-reports.h:3294
scriptel_resource_justification horizontal_justification
Horizontal justification of the text in this region.
Definition: scriptel-hid-reports.h:3290
Defines a structure for a resource on the device.
Definition: scriptel-hid-reports.h:2855
unsigned long resource_size
The total size of the resource in bytes.
Definition: scriptel-hid-reports.h:2881
unsigned char resource_number
index of the resource on the device.
Definition: scriptel-hid-reports.h:2863
scriptel_resource_type resource_type
Defines what kind of resource this currently represents.
Definition: scriptel-hid-reports.h:2867
unsigned char resource_data[1024]
The data, in bytes.
Definition: scriptel-hid-reports.h:2917
unsigned short bytes_valid
Number of valid bytes incoming or outgoing in this structure.
Definition: scriptel-hid-reports.h:2913
Structure that can be used to get or set a screen on the device.
Definition: scriptel-hid-reports.h:3329
unsigned char timeout_screen_next
The screen index that the device moves to when this screen times out.
Definition: scriptel-hid-reports.h:3405
unsigned char screen_next_list[100]
Corresponds to region_list, determines the next screen for each region interaction.
Definition: scriptel-hid-reports.h:3417
unsigned char screen_number
Index of the screen these variables represent.
Definition: scriptel-hid-reports.h:3337
unsigned char region_count
Number of regions on this screen.
Definition: scriptel-hid-reports.h:3409
unsigned char region_list[100]
List of regions featured on this screen in draw order.
Definition: scriptel-hid-reports.h:3413
This union contains all region information.
Definition: scriptel-hid-reports.h:3299
scriptel_hid_feature_region_text text
Text region.
Definition: scriptel-hid-reports.h:3323
scriptel_hid_feature_region_common common
Common, the foundation of all regions.
Definition: scriptel-hid-reports.h:3303
scriptel_hid_feature_region_button button
Button region.
Definition: scriptel-hid-reports.h:3311