libweston: add API to get serial number from weston head

Plugins need to get the serial number of the weston_head to match the
touch devices.

Signed-off-by: liang zhou <liang.zhou@gehealthcare.com>
This commit is contained in:
liang zhou 2026-05-15 13:12:47 +08:00 committed by liang zhou
parent d774dba68a
commit edce1fea4b
2 changed files with 16 additions and 0 deletions

View file

@ -2689,6 +2689,9 @@ weston_head_reset_device_changed(struct weston_head *head);
const char *
weston_head_get_name(struct weston_head *head);
const char *
weston_head_get_serial_number(struct weston_head *head);
struct weston_output *
weston_head_get_output(struct weston_head *head);

View file

@ -7306,6 +7306,19 @@ weston_head_get_name(struct weston_head *head)
return head->name;
}
/** Get the serial number of the head
*
* \param head The head to query.
* \return The serial number string, or NULL if not available.
*
* \ingroup head
*/
WL_EXPORT const char *
weston_head_get_serial_number(struct weston_head *head)
{
return head->serial_number;
}
/** Get the output the head is attached to
*
* \param head The head to query.