diff options
author | David King <amigadave@amigadave.com> | 2015-04-13 21:44:49 +0100 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2015-04-13 21:44:49 +0100 |
commit | c32c9fcc5de035e388bec2704c8c754b375a4f40 (patch) | |
tree | 9517b8875d76a865bce995dce0a54c2166af9cb0 /libcheese/cheese-camera-device.h | |
parent | 2bc4e2293bf0251184f33ff4903a91938098abbf (diff) | |
download | cheese-c32c9fcc5de035e388bec2704c8c754b375a4f40.tar.gz |
Use G_DECLARE_FINAL_TYPE where possible
Diffstat (limited to 'libcheese/cheese-camera-device.h')
-rw-r--r-- | libcheese/cheese-camera-device.h | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/libcheese/cheese-camera-device.h b/libcheese/cheese-camera-device.h index 8249474f..071eb6b2 100644 --- a/libcheese/cheese-camera-device.h +++ b/libcheese/cheese-camera-device.h @@ -20,39 +20,14 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __CHEESE_CAMERA_DEVICE_H__ -#define __CHEESE_CAMERA_DEVICE_H__ +#ifndef CHEESE_CAMERA_DEVICE_H_ +#define CHEESE_CAMERA_DEVICE_H_ #include <glib-object.h> #include <gst/gst.h> G_BEGIN_DECLS -#define CHEESE_TYPE_CAMERA_DEVICE (cheese_camera_device_get_type ()) -#define CHEESE_CAMERA_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CHEESE_TYPE_CAMERA_DEVICE, \ - CheeseCameraDevice)) -#define CHEESE_CAMERA_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CHEESE_TYPE_CAMERA_DEVICE, \ - CheeseCameraDeviceClass)) -#define CHEESE_IS_CAMERA_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CHEESE_TYPE_CAMERA_DEVICE)) -#define CHEESE_IS_CAMERA_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CHEESE_TYPE_CAMERA_DEVICE)) -#define CHEESE_CAMERA_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CHEESE_TYPE_CAMERA_DEVICE, \ - CheeseCameraDeviceClass)) - -typedef struct _CheeseCameraDevicePrivate CheeseCameraDevicePrivate; -typedef struct _CheeseCameraDeviceClass CheeseCameraDeviceClass; -typedef struct _CheeseCameraDevice CheeseCameraDevice; - -/** - * CheeseCameraDeviceClass: - * - * Use the accessor functions below. - */ -struct _CheeseCameraDeviceClass -{ - /*< private >*/ - GObjectClass parent_class; -}; - /** * CheeseCameraDevice: * @@ -67,8 +42,6 @@ struct _CheeseCameraDevice #define CHEESE_TYPE_VIDEO_FORMAT (cheese_video_format_get_type ()) -typedef struct _CheeseVideoFormat CheeseVideoFormat; - /** * CheeseVideoFormat: * @width: the width of of the video, in pixels @@ -77,16 +50,17 @@ typedef struct _CheeseVideoFormat CheeseVideoFormat; * A description of the resolution, in pixels, of the format to capture with a * #CheeseCameraDevice. */ -struct _CheeseVideoFormat +typedef struct { /*< public >*/ gint width; gint height; -}; +} CheeseVideoFormat; GType cheese_video_format_get_type (void); -GType cheese_camera_device_get_type (void); +#define CHEESE_TYPE_CAMERA_DEVICE (cheese_camera_device_get_type ()) +G_DECLARE_FINAL_TYPE (CheeseCameraDevice, cheese_camera_device, CHEESE, CAMERA_DEVICE, GObject) CheeseCameraDevice *cheese_camera_device_new (const gchar *uuid, const gchar *device_node, @@ -104,8 +78,6 @@ const gchar *cheese_camera_device_get_src (CheeseCameraDevice *device); const gchar *cheese_camera_device_get_uuid (CheeseCameraDevice *device); const gchar *cheese_camera_device_get_device_node (CheeseCameraDevice *device); - - G_END_DECLS -#endif /* __CHEESE_CAMERA_DEVICE_H__ */ +#endif /* CHEESE_CAMERA_DEVICE_H_ */ |