forked from enlightenment/enlightenment
e_acpi: Add function to get lid status
So we can know lid status without waiting for a lid event.
This commit is contained in:
parent
7656e10f04
commit
ed520d31a1
|
@ -174,6 +174,23 @@ e_acpi_shutdown(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EINTERN E_Acpi_Lid_Status
|
||||||
|
e_acpi_lid_status_get(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; _devices_simple[i].name; i++)
|
||||||
|
{
|
||||||
|
if (_devices_simple[i].type == E_ACPI_TYPE_LID)
|
||||||
|
{
|
||||||
|
/* TODO: Can bus be anything other than LID? */
|
||||||
|
return _e_acpi_lid_status_get(_devices_simple[i].name, "LID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return E_ACPI_LID_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_acpi_events_freeze(void)
|
e_acpi_events_freeze(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,6 +71,8 @@ struct _E_Event_Acpi
|
||||||
EINTERN int e_acpi_init(void);
|
EINTERN int e_acpi_init(void);
|
||||||
EINTERN int e_acpi_shutdown(void);
|
EINTERN int e_acpi_shutdown(void);
|
||||||
|
|
||||||
|
EINTERN E_Acpi_Lid_Status e_acpi_lid_status_get(void);
|
||||||
|
|
||||||
EAPI void e_acpi_events_freeze(void);
|
EAPI void e_acpi_events_freeze(void);
|
||||||
EAPI void e_acpi_events_thaw(void);
|
EAPI void e_acpi_events_thaw(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue