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)
فارغ(* free_report_definition ) ( input_host_t * host، input_report_definition_t * report_def)
فارغ(* input_device_definition_add_report ) ( input_host_t * host ، input_device_definition_t * d ، input_report_definition_t * r)
فارغ(* input_report_definition_add_collection ) ( input_host_t * host ، input_report_definition_t * report ، input_collection_id_t id ، int32_t arity)
فارغ(* 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)
فارغ(* input_report_definition_declare_usages_bool ) ( input_host_t * host ، input_report_definition_t * report ، input_collection_id_t id ، input_usage_t * use ، size_t Usage_count)
input_device_handle_t * (* register_device ) ( input_host_t * host، input_device_identifier_t * id، input_device_definition_t * d)
فارغ(* 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)
فارغ(* input_report_set_usage_int ) ( input_host_t * host ، input_report_t * r ، input_collection_id_t id ، input_usage_t use ، int32_t value ، int32_t arity_index)
فارغ(* 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)
فارغ(* 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)
الحرف الثابت * (* input_get_property_key ) ( input_host_t * host ، input_property_t * property)
الحرف الثابت * (* input_get_property_value ) ( input_host_t * host، input_property_t * property)
فارغ(* input_free_device_property ) ( input_host_t * host ، input_property_t * property)
فارغ(* input_free_device_property_map ) ( input_host_t * host ، input_property_map_t * map)

وصف مفصل

تعريف إدخال الملف في السطر 409. h .

التوثيق الميداني

input_device_definition_t * (* create_device_definition) ( input_host_t * host)

يخصص تعريف الجهاز الذي سيصف إمكانيات الإدخال للجهاز. يمكن استخدام تعريف الجهاز لتسجيل أكبر عدد ممكن من الأجهزة حسب الرغبة.

تعريف في السطر 424 لملف الإدخال. 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. h .

input_report_definition_t * (* create_input_report_definition) ( input_host_t * host)

قم بتخصيص إما تقرير إدخال ، والذي سيستخدمه HAL لإخبار المضيف بأحداث الإدخال الواردة ، أو تقرير الإخراج ، والذي سيستخدمه المضيف لإخبار HAL بتغييرات الحالة المطلوبة (مثل إعداد LED).

تعريف إدخال الملف في السطر 431. h .

input_report_definition_t * (* create_output_report_definition) ( input_host_t * host)

تعريف إدخال الملف في السطر 432. h .

باطل (* free_report_definition) ( input_host_t * host، input_report_definition_t * report_def)

يحرر تعريف التقرير.

تعريف إدخال الملف في السطر 437. h .

input_report_t * (* input_allocate_report) ( input_host_t * host ، input_report_definition_t * r)

قم بتخصيص تقرير يحتوي على كل الحالات كما هو موضح في التقرير المحدد.

تعريف إدخال الملف في السطر 488. h .

باطل (* input_device_definition_add_report) ( input_host_t * host ، input_device_definition_t * d ، input_report_definition_t * r)

إلحاق التقرير بجهاز الإدخال المحدد.

تعريف إدخال الملف في السطر 442. h .

باطل (* input_free_device_property) ( input_host_t * host ، input_property_t * property)

يحرر input_property_t *.

تعريف في السطر 535 لإدخال الملف. h .

باطل (* input_free_device_property_map) ( input_host_t * host ، input_property_map_t * map)

يحرر input_property_map_t *.

تعريف في السطر 540 لملف الإدخال. 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. 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. h .

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

احصل على مفتاح خاصية الإدخال. ترجع NULL إذا كانت الخاصية NULL. تعود ملكية الحرف الثابت الذي تم إرجاعه إلى input_property_t.

تعريف إدخال الملف في السطر 524. h .

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

احصل على قيمة خاصية الإدخال. ترجع NULL إذا كانت الخاصية NULL. تعود ملكية الحرف الثابت الذي تم إرجاعه إلى input_property_t.

تعريف في السطر 530 لإدخال الملف. h .

باطل (* input_report_definition_add_collection) ( input_host_t * host ، input_report_definition_t * report ، input_collection_id_t id ، int32_t arity)

إضافة مجموعة مع arity والمعرف المحدد. تصف المجموعة مجموعة من الخصائص المجمعة منطقيًا مثل إحداثيات X و Y بلمسة إصبع واحدة أو مجموعة المفاتيح الموجودة على لوحة المفاتيح. يوضح arity عدد الأمثلة المتكررة لهذه المجموعة التي ستظهر في أي تقرير مرفق به. يصف المعرف نوع التجميع الذي تمثله المجموعة. على سبيل المثال ، قد تحتوي شاشة تعمل باللمس قادرة على الإبلاغ عن ما يصل إلى إصبعين في وقت واحد على مجموعة بإحداثيات X و Y ، ومجموعة من 2 ، ومعرف INPUT_COLLECTION_USAGE_TOUCHSCREEN. قد لا يكون أي معرّف حاضرًا إلا مرة واحدة لتقرير معين.

تعريف في السطر 455 لملف الإدخال. h .

باطل (* 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. h .

باطل (* input_report_definition_declare_usages_bool) ( input_host_t * host ، input_report_definition_t * report ، input_collection_id_t id ، input_usage_t * use ، size_t Usage_count)

قم بتعريف مجموعة من الاستخدامات المنطقية بالخصائص المحددة. يحدد التقرير والمجموعة مكان إعلان الاستخدامات.

تعريف في السطر 470 لملف الإدخال. 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. 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. h .

قم بتسجيل تعريف جهاز إدخال محدد. يقوم هذا بإعلام المضيف بأنه تم توصيل جهاز إدخال ويعطي وصفًا لجميع إمكانياته.

تعريف إدخال الملف في السطر 479. h .

باطل (* report_event) ( input_host_t * host ، input_device_handle_t * d ، input_report_t * report)

تعريف إدخال الملف في السطر 502. h .

باطل (* unregister_device) ( input_host_t * host، input_device_handle_t * handle)

قم بإلغاء تسجيل الجهاز المحدد

تعريف إدخال الملف في السطر 483. h .


تم إنشاء وثائق هذه البنية من الملف التالي: