ข้อมูลอ้างอิงเกี่ยวกับโครงสร้าง input_host_callbacks

ข้อมูลอ้างอิงเกี่ยวกับโครงสร้าง input_host_callbacks

#include < input.h >

ฟิลด์ข้อมูล

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_device_definition_t *(*  create_device_definition )( input_host_t *host)
 
input_report_definition_t *(*  create_input_report_definition )( input_host_t *host)
 
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)
 
void(*  input_device_definition_add_report )( input_host_t *host, input_device_definition_t *d, input_report_definition_t *r)
 
void(*  input_report_definition_add_collection )( input_host_t *host, input_report_definition_t *report, input_collection_id_t id, int32_t arity)
 
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)
 
input_device_handle_t *(*  register_device )( input_host_t *host, input_device_identifier_t *id, input_device_definition_t *d)
 
void(*  unregister_device )( input_host_t *host, input_device_handle_t *handle)
 
input_report_t *(*  input_allocate_report )( input_host_t *host, input_report_definition_t *r)
 
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)
 
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(*  report_event )( input_host_t *host, input_device_handle_t *d, input_report_t *report)
 
input_property_map_t *(*  input_get_device_property_map )( input_host_t *host, input_device_identifier_t *id)
 
input_property_t *(*  input_get_device_property )( input_host_t *host, input_property_map_t *map, const char *key)
 
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_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)
 

คำอธิบายโดยละเอียด

คําจํากัดความที่บรรทัด 409 ของไฟล์ input.h .

เอกสารประกอบในสนาม

input_device_definition_t *(* create_device_definition)( input_host_t *host)

จัดสรรคําจํากัดความของอุปกรณ์ที่จะอธิบายความสามารถของอินพุตของอุปกรณ์ คุณใช้คําจํากัดความของอุปกรณ์เพื่อลงทะเบียนอุปกรณ์ได้มากเท่าที่ต้องการ

คําจํากัดความที่บรรทัด 424 ของไฟล์ input.h .

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)

สร้างตัวระบุอุปกรณ์ที่มีพร็อพเพอร์ตี้ที่ระบุ รหัสที่ไม่ซ้ำกันควรเป็นสตริงที่ระบุฮาร์ดแวร์หนึ่งๆ ได้อย่างแม่นยำ เช่น อุปกรณ์อินพุตที่เชื่อมต่อผ่านบลูทูธอาจใช้ที่อยู่ MAC เป็นรหัสที่ไม่ซ้ำกัน

คําจํากัดความที่บรรทัด 416 ของไฟล์ input.h .

input_report_definition_t *(* create_input_report_definition)( input_host_t *host)

กำหนดรายงานอินพุตซึ่ง HAL จะใช้เพื่อแจ้งโฮสต์เกี่ยวกับเหตุการณ์อินพุตขาเข้า หรือรายงานเอาต์พุตซึ่งโฮสต์จะใช้เพื่อแจ้ง HAL เกี่ยวกับการเปลี่ยนแปลงสถานะที่ต้องการ (เช่น การตั้งค่า LED)

คําจํากัดความที่บรรทัด 431 ของไฟล์ input.h .

input_report_definition_t *(* create_output_report_definition)( input_host_t *host)

คําจํากัดความที่บรรทัด 432 ของไฟล์ input.h .

void(* free_report_definition)( input_host_t *host, input_report_definition_t *report_def)

ยกเลิกการใช้คําจํากัดความรายงาน

คําจํากัดความที่บรรทัด 437 ของไฟล์ input.h .

จัดสรรรายงานที่จะมีสถานะทั้งหมดตามที่รายงานที่ระบุไว้อธิบาย

คําจํากัดความที่บรรทัด 488 ของไฟล์ input.h .

void(* input_device_definition_add_report)( input_host_t *host, input_device_definition_t *d, input_report_definition_t *r)

ต่อท้ายรายงานไปยังอุปกรณ์อินพุตที่ระบุ

คําจํากัดความที่บรรทัด 442 ของไฟล์ input.h .

void(* input_free_device_property)( input_host_t *host, input_property_t *property)

ยกเลิกการจัดสรร input_property_t*

คําจํากัดความที่บรรทั goof 535 ของไฟล์ input.h .

void(* input_free_device_property_map)( input_host_t *host, input_property_map_t *map)

ยกเลิกการจัดสรร input_property_map_t*

คําจํากัดความที่บรรทัด 540 ของไฟล์ input.h .

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_t หลังจากมีการปลด input_property_map_t ที่เกี่ยวข้องแล้วนั้นไม่มีคำจำกัดความ

คําจํากัดความที่บรรทัด 517 ของไฟล์ input.h .

input_property_map_t *(* input_get_device_property_map)( input_host_t *host, input_device_identifier_t *id)

เรียกชุดพร็อพเพอร์ตี้ของอุปกรณ์ ระบบอาจใช้ input_property_map_t* ที่แสดงผลเพื่อค้นหาพร็อพเพอร์ตี้ที่เฉพาะเจาะจงผ่านแบ็กคอล input_get_device_property

คําจํากัดความที่บรรทัด 509 ของไฟล์ input.h .

const char*(* input_get_property_key)( input_host_t *host, input_property_t *property)

รับคีย์สําหรับพร็อพเพอร์ตี้อินพุต แสดงผลเป็น NULL หากพร็อพเพอร์ตี้เป็น NULL const char* ที่แสดงผลเป็นของ input_property_t

คําจํากัดความที่บรรทัด 524 ของไฟล์ input.h .

const char*(* input_get_property_value)( input_host_t *host, input_property_t *property)

รับค่าสำหรับพร็อพเพอร์ตี้อินพุต แสดงผลเป็น NULL หากพร็อพเพอร์ตี้เป็น NULL const char* ที่แสดงผลเป็นของ input_property_t

คําจํากัดความที่บรรทัด 530 ของไฟล์ input.h .

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 ของการแตะด้วยนิ้วเดียวหรือชุดแป้นบนแป้นพิมพ์ arity จะประกาศจํานวนอินสแตนซ์ที่ซ้ำกันของคอลเล็กชันนี้จะปรากฏในรายงานใดก็ตามที่แนบอยู่ รหัสจะอธิบายประเภทการจัดกลุ่มที่คอลเล็กชันแสดง เช่น หน้าจอสัมผัสที่รายงานนิ้วได้สูงสุด 2 นิ้วพร้อมกันอาจมีคอลเล็กชันที่มีพิกัด X และ Y, อาร์ติตี 2 และรหัส INPUT_COLLECTION_USAGE_TOUCHSCREEN รหัสหนึ่งๆ ปรากฏในรายงานหนึ่งๆ ได้เพียงครั้งเดียว

คําจํากัดความที่บรรทัด 455 ของไฟล์ input.h .

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)

ประกาศการใช้งาน int ด้วยพร็อพเพอร์ตี้ที่ระบุ รายงานและการเก็บรวบรวมจะกำหนดว่ามีการประกาศการใช้งานที่ใด

คําจํากัดความที่บรรทัด 462 ของไฟล์ input.h .

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)

ประกาศชุดการใช้งานบูลีนที่มีพร็อพเพอร์ตี้ที่ระบุ รายงานและการเก็บรวบรวมจะกำหนดตำแหน่งที่จะประกาศการใช้งาน

คําจํากัดความที่บรรทัด 470 ของไฟล์ input.h .

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)

เพิ่มค่าการใช้งานบูลีนลงในรายงาน

คําจํากัดความที่บรรทัด 499 ของไฟล์ input.h .

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)

เพิ่มค่าการใช้งาน int ลงในรายงาน

คําจํากัดความที่บรรทัด 493 ของไฟล์ input.h .

ลงทะเบียนคําจํากัดความของอุปกรณ์อินพุตที่ระบุ ซึ่งจะแจ้งให้โฮสต์ทราบว่าอุปกรณ์อินพุตเชื่อมต่อแล้วและแสดงคำอธิบายความสามารถทั้งหมดของอุปกรณ์

คําจํากัดความที่บรรทัด 479 ของไฟล์ input.h .

void(* report_event)( input_host_t *host, input_device_handle_t *d, input_report_t *report)

คําจํากัดความที่บรรทัด 502 ของไฟล์ input.h .

void(* unregister_device)( input_host_t *host, input_device_handle_t *handle)

ยกเลิกการลงทะเบียนอุปกรณ์ที่ระบุ

คําจํากัดความที่บรรทัด 483 ของไฟล์ input.h .


เอกสารประกอบสำหรับโครงสร้างนี้สร้างขึ้นจากไฟล์ต่อไปนี้
  • hardware/libhardware/include/hardware/ input.h