forked from enlightenment/enlightenment
Change acpi event structure to be able to pass more info.
SVN revision: 48912
This commit is contained in:
parent
3ff8bf1651
commit
e828519e97
|
@ -100,9 +100,9 @@ _e_acpi_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
E_Event_Acpi *acpi_event;
|
||||
|
||||
acpi_event = E_NEW(E_Event_Acpi, 1);
|
||||
acpi_event->device = "battery";
|
||||
acpi_event->bus_id = "BAT0";
|
||||
acpi_event->event_type = "BATTERY_STATUS_CHANGED"; // make these standard E_ACPI enums
|
||||
acpi_event->device = eina_stringshare_add("battery");
|
||||
acpi_event->bus_id = eina_stringshare_add("BAT0");
|
||||
acpi_event->event_type = E_ACPI_BATTERY_STATUS_CHANGED; // make these standard E_ACPI enums
|
||||
acpi_event->event_data = 1; // change to something more meaningful
|
||||
ecore_event_add(E_EVENT_ACPI_LID, acpi_event, _e_acpi_cb_event_free, NULL);
|
||||
*/
|
||||
|
@ -113,7 +113,11 @@ _e_acpi_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
static void
|
||||
_e_acpi_cb_event_free(void *data __UNUSED__, void *event)
|
||||
{
|
||||
E_FREE(event);
|
||||
E_Event_Acpi *ev;
|
||||
|
||||
if (ev->device) eina_stringshare_del(ev->device);
|
||||
if (ev->bus_id) eina_stringshare_del(ev->bus_id);
|
||||
E_FREE(ev);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ typedef struct _E_Event_Acpi E_Event_Acpi;
|
|||
|
||||
struct _E_Event_Acpi
|
||||
{
|
||||
void *data;
|
||||
int size;
|
||||
const char *device, *bus_id;
|
||||
int type, data;
|
||||
};
|
||||
|
||||
EAPI int e_acpi_init(void);
|
||||
|
|
Loading…
Reference in New Issue