ApertureCamera

ApertureCamera — A camera device

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── ApertureCamera

Description

ApertureCamera represents a camera plugged into the device. It is used to query information about the camera or change its parameters.

Functions

aperture_camera_do_flash_async ()

void
aperture_camera_do_flash_async (ApertureCamera *self,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Activates the flash associated with this camera. When this is done, callback will be called.

The flash will be turned off automatically, usually after a few hundred milliseconds (depending on the model of the flash device). The callback is called while the flash is still on.

Parameters

self

an ApertureCamera

 

cancellable

a GCancellable.

[nullable]

callback

a GAsyncReadyCallback to execute upon completion

 

user_data

closure data for callback

 

Since: 0.1


aperture_camera_do_flash_finish ()

gboolean
aperture_camera_do_flash_finish (ApertureCamera *self,
                                 GAsyncResult *result,
                                 GError **error);

Gets the result of an operation started by aperture_camera_do_flash_async(). You should call this in your callback if you want to know whether the operation succeeded; if you don't care, there is no need to call this function.

Parameters

self

an ApertureCamera

 

result

a GAsyncResult provided to callback

 

error

a location for a GError, or NULL

 

Returns

TRUE if the flash was successfully enabled, otherwise FALSE

Since: 0.1


aperture_camera_set_torch ()

void
aperture_camera_set_torch (ApertureCamera *self,
                           gboolean state);

Turns the torch associated with this camera on or off.

Typically, flash bulbs have two modes: flash and torch. Flash is brighter, but only lasts for a few hundred milliseconds. Torch is not as bright but can be left on indefinitely.

Parameters

self

an ApertureCamera

 

state

TRUE to turn the torch on, or FALSE to turn it off

 

Since: 0.1

Types and Values

APERTURE_TYPE_CAMERA

#define APERTURE_TYPE_CAMERA (aperture_camera_get_type ())

ApertureCamera

typedef struct _ApertureCamera ApertureCamera;

ApertureCameraClass

typedef struct _ApertureCameraClass ApertureCameraClass;