input_host_callbacks स्ट्रक्चर का रेफ़रंस
#include <
input.h
>
पूरी जानकारी
फ़ील्ड का दस्तावेज़
| input_device_definition_t *(* create_device_definition)( input_host_t *host) |
| input_device_identifier_t *(* create_device_identifier)( input_host_t *host, const char *name, int32_t product_id, int32_t vendor_id, input_bus_t bus, const char *unique_id) |
दी गई प्रॉपर्टी की मदद से, डिवाइस आइडेंटिफ़ायर बनाता है. यूनीक आईडी, एक ऐसी स्ट्रिंग होनी चाहिए जिससे किसी हार्डवेयर की सटीक पहचान की जा सके. उदाहरण के लिए, ब्लूटूथ से कनेक्ट किया गया कोई इनपुट डिवाइस, अपने मैक पते का इस्तेमाल अपने यूनीक आईडी के तौर पर कर सकता है.
| input_report_definition_t *(* create_input_report_definition)( input_host_t *host) |
इनपुट रिपोर्ट या आउटपुट रिपोर्ट में से किसी एक को असाइन करें. इनपुट रिपोर्ट का इस्तेमाल, HAL इनकमिंग इनपुट इवेंट के बारे में होस्ट को बताने के लिए करेगा. वहीं, आउटपुट रिपोर्ट का इस्तेमाल, होस्ट HAL को अपनी पसंद के स्टेटस में बदलाव करने के लिए करेगा. जैसे, एलईडी सेट करना.
| input_report_definition_t *(* create_output_report_definition)( input_host_t *host) |
| void(* free_report_definition)( input_host_t *host, input_report_definition_t *report_def) |
| input_report_t *(* input_allocate_report)( input_host_t *host, input_report_definition_t *r) |
| void(* input_device_definition_add_report)( input_host_t *host, input_device_definition_t *d, input_report_definition_t *r) |
| void(* input_free_device_property)( input_host_t *host, input_property_t *property) |
| void(* input_free_device_property_map)( input_host_t *host, input_property_map_t *map) |
| input_property_t *(* input_get_device_property)( input_host_t *host, input_property_map_t *map, const char *key) |
दी गई कुंजी की मदद से, डिवाइस की प्रॉपर्टी वापस पाएं. अगर कुंजी मौजूद नहीं है, तो यह NULL दिखाता है. इसके अलावा, यह एक input_property_t* दिखाता है, जिसे input_free_device_property() का इस्तेमाल करके, रिलीज़ करना ज़रूरी है . input_property_map_t को खाली करने के बाद, input_property_t का इस्तेमाल करना तय नहीं है.
| input_property_map_t *(* input_get_device_property_map)( input_host_t *host, input_device_identifier_t *id) |
| const char*(* input_get_property_key)( input_host_t *host, input_property_t *property) |
| const char*(* input_get_property_value)( input_host_t *host, input_property_t *property) |
| void(* input_report_definition_add_collection)( input_host_t *host, input_report_definition_t *report, input_collection_id_t id, int32_t arity) |
दिए गए आर्टिटी और आईडी वाला कलेक्शन जोड़ें. कलेक्शन, लॉजिक के हिसाब से ग्रुप की गई प्रॉपर्टी के सेट के बारे में बताता है. जैसे, एक उंगली से टच करने पर मिलने वाले X और Y निर्देशांक या कीबोर्ड पर मौजूद बटन का सेट. आर्टिटी से पता चलता है कि इस कलेक्शन के कितने इंस्टेंस, उस रिपोर्ट में दिखेंगे जिससे इसे अटैच किया गया है. आईडी से पता चलता है कि कलेक्शन में किस तरह के प्रॉडक्ट को ग्रुप किया गया है. उदाहरण के लिए, एक साथ दो उंगलियों से टच करने पर रिपोर्ट करने वाले टचस्क्रीन में, X और Y निर्देशांक वाला कलेक्शन हो सकता है. साथ ही, इस कलेक्शन में दो एरिटी और INPUT_COLLECTION_USAGE_TOUCHSCREEN आईडी हो सकता है. किसी रिपोर्ट में, कोई भी आईडी सिर्फ़ एक बार मौजूद हो सकता है.
| void(* input_report_definition_declare_usage_int)( input_host_t *host, input_report_definition_t *report, input_collection_id_t id, input_usage_t usage, int32_t min, int32_t max, float resolution) |
| void(* input_report_definition_declare_usages_bool)( input_host_t *host, input_report_definition_t *report, input_collection_id_t id, input_usage_t *usage, size_t usage_count) |
| void(* input_report_set_usage_bool)( input_host_t *host, input_report_t *r, input_collection_id_t id, input_usage_t usage, bool value, int32_t arity_index) |
| void(* input_report_set_usage_int)( input_host_t *host, input_report_t *r, input_collection_id_t id, input_usage_t usage, int32_t value, int32_t arity_index) |
| input_device_handle_t *(* register_device)( input_host_t *host, input_device_identifier_t *id, input_device_definition_t *d) |
| void(* report_event)( input_host_t *host, input_device_handle_t *d, input_report_t *report) |
| void(* unregister_device)( input_host_t *host, input_device_handle_t *handle) |
इस स्ट्रक्चर का दस्तावेज़, इस फ़ाइल से जनरेट किया गया था:
- hardware/libhardware/include/hardware/ input.h