diff options
Diffstat (limited to 'xinput_ivy.e')
-rw-r--r-- | xinput_ivy.e | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/xinput_ivy.e b/xinput_ivy.e index d65c72b..de9be0f 100644 --- a/xinput_ivy.e +++ b/xinput_ivy.e @@ -25,9 +25,10 @@ feature {} ivy_bus := "" device_id := "default" screen := vision.root_window + decode_application_name_option + create ivy.make(application_name) ready := decode_options if ready then - create ivy.make(application_name) ivy.start(ivy_bus) vision.loop_stack.add_job(ivy) vision.start @@ -36,6 +37,24 @@ feature {} screen: ROOT_WINDOW + decode_application_name_option is + local + i, equal_index: INTEGER + do + from + i := 1 + until + i > argument_count + loop + if argument(i).has_prefix(once "-application=") then + application_name.copy(argument(i)) + equal_index := application_name.first_index_of('=') + application_name.remove_head(equal_index) + end + i := i + 1 + end + end + decode_options: BOOLEAN is local i: INTEGER @@ -96,7 +115,8 @@ feature {} %-b option.%N") end when "-application" then - application_name.copy(value) + -- already done application_name.copy(value) in + -- specific decoding function when "-identifier" then device_id.copy(value) when "-x_offset" then @@ -199,6 +219,7 @@ feature {} message_header := "_event device_id=" message_header.append(device_id) wacom_pointer.set_message_header(message_header) + wacom_pointer.crop_identifier(device_id) pointer.when_moved(screen, agent wacom_pointer.move) pointer.when_button_pressed(screen, agent wacom_pointer.button(True, ?)) pointer.when_button_released(screen, agent wacom_pointer.button(False, ?)) @@ -298,6 +319,9 @@ feature {} hires_y: pointer position (device coordinates, in range [0,1]). proximity: unchanged, in, out + Crop configuration can be changed dynamically sending a CHANGE_CROP message: + CHANGE_CROP device_id=radar_wacom crop=52320,14596,86600,38102 + ]") --*** calibration? --*** filtrage? |