![]() |
![]() |
![]() |
UPower Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define UP_CLIENT_ERROR #define UP_CLIENT_TYPE_ERROR void (*device_added) (UpClient *client
,UpDevice *device
); void (*device_removed) (UpClient *client
,const gchar *object_path
); void (*_up_client_reserved1) (void
); void (*_up_client_reserved2) (void
); void (*_up_client_reserved3) (void
); void (*_up_client_reserved4) (void
); void (*_up_client_reserved5) (void
); void (*_up_client_reserved6) (void
); void (*_up_client_reserved7) (void
); void (*_up_client_reserved8) (void
); UpClient * up_client_new (void
); UpDevice * up_client_get_display_device (UpClient *client
); char * up_client_get_critical_action (UpClient *client
); GPtrArray * up_client_get_devices (UpClient *client
); const gchar * up_client_get_daemon_version (UpClient *client
); gboolean up_client_get_lid_is_closed (UpClient *client
); gboolean up_client_get_lid_is_present (UpClient *client
); gboolean up_client_get_on_battery (UpClient *client
);
A helper GObject to use for accessing UPower information, and to be notified when it is changed.
See also: UpDevice
UpClient * up_client_new (void
);
Creates a new UpClient object.
Returns : |
a new UpClient object. |
Since 0.9.0
UpDevice * up_client_get_display_device (UpClient *client
);
Get the composite display device.
|
a UpClient instance. |
Returns : |
a UpClient object, or NULL on error. [transfer full]
|
Since 1.0
char * up_client_get_critical_action (UpClient *client
);
Gets a string representing the configured critical action, depending on availability.
|
a UpClient instance. |
Returns : |
the action name, or NULL on error. |
Since 1.0
GPtrArray * up_client_get_devices (UpClient *client
);
Get a copy of the device objects.
|
a UpClient instance. |
Returns : |
an array of UpDevice objects, free with g_ptr_array_unref() . [element-type UpDevice][transfer full]
|
Since 0.9.0
const gchar * up_client_get_daemon_version (UpClient *client
);
Get UPower daemon version.
|
a UpClient instance. |
Returns : |
string containing the daemon version, e.g. 008 |
Since 0.9.0
gboolean up_client_get_lid_is_closed (UpClient *client
);
Get whether the laptop lid is closed.
|
a UpClient instance. |
Returns : |
TRUE if lid is closed or FALSE otherwise. |
Since 0.9.0
gboolean up_client_get_lid_is_present (UpClient *client
);
Get whether a laptop lid is present on this machine.
|
a UpClient instance. |
Returns : |
TRUE if the machine has a laptop lid |
Since 0.9.2