[gnome-photos/wip/edit: 3/4] Add PhotosRotateLeft
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/edit: 3/4] Add PhotosRotateLeft
- Date: Tue, 4 Feb 2014 10:47:07 +0000 (UTC)
commit 43b8bffad90cbf06ffdc987833b6107be07cf910
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Feb 3 09:52:31 2014 +0100
Add PhotosRotateLeft
src/Makefile.am | 2 +
src/photos-rotate-left.c | 56 ++++++++++++++++++++++++++++++++++++
src/photos-rotate-left.h | 71 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 129 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index ebf2b8a..4969da2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -167,6 +167,8 @@ gnome_photos_SOURCES = \
photos-query-builder.c \
photos-remote-display-manager.c \
photos-remote-display-manager.h \
+ photos-rotate-left.c \
+ photos-rotate-left.h \
photos-search-controller.c \
photos-search-controller.h \
photos-search-match.c \
diff --git a/src/photos-rotate-left.c b/src/photos-rotate-left.c
new file mode 100644
index 0000000..11beb49
--- /dev/null
+++ b/src/photos-rotate-left.c
@@ -0,0 +1,56 @@
+/*
+ * Photos - access, organize and share your photos on GNOME
+ * Copyright © 2014 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+
+#include "config.h"
+
+#include "photos-rotate-left.h"
+
+
+G_DEFINE_TYPE (PhotosRotateLeft, photos_rotate_left, PHOTOS_TYPE_OPERATION);
+
+
+static GeglNode *
+photos_rotate_left_get_node (PhotosOperation *operation)
+{
+ return gegl_node_new_child (NULL, "operation", "gegl:rotate", "degrees", 90.0, NULL);
+}
+
+
+static void
+photos_rotate_left_init (PhotosRotateLeft *self)
+{
+}
+
+
+static void
+photos_rotate_left_class_init (PhotosRotateLeftClass *class)
+{
+ PhotosOperationClass *operation_class = PHOTOS_OPERATION_CLASS (class);
+
+ operation_class->get_node = photos_rotate_left_get_node;
+}
+
+
+PhotosOperation *
+photos_rotate_left_new (void)
+{
+ return g_object_new (PHOTOS_TYPE_ROTATE_LEFT, NULL);
+}
diff --git a/src/photos-rotate-left.h b/src/photos-rotate-left.h
new file mode 100644
index 0000000..f1dc787
--- /dev/null
+++ b/src/photos-rotate-left.h
@@ -0,0 +1,71 @@
+/*
+ * Photos - access, organize and share your photos on GNOME
+ * Copyright © 2014 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#ifndef PHOTOS_ROTATE_LEFT_H
+#define PHOTOS_ROTATE_LEFT_H
+
+#include "photos-operation.h"
+
+G_BEGIN_DECLS
+
+#define PHOTOS_TYPE_ROTATE_LEFT (photos_rotate_left_get_type ())
+
+#define PHOTOS_ROTATE_LEFT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ PHOTOS_TYPE_ROTATE_LEFT, PhotosRotateLeft))
+
+#define PHOTOS_ROTATE_LEFT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ PHOTOS_TYPE_ROTATE_LEFT, PhotosRotateLeftClass))
+
+#define PHOTOS_IS_ROTATE_LEFT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+ PHOTOS_TYPE_ROTATE_LEFT))
+
+#define PHOTOS_IS_ROTATE_LEFT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+ PHOTOS_TYPE_ROTATE_LEFT))
+
+#define PHOTOS_ROTATE_LEFT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ PHOTOS_TYPE_ROTATE_LEFT, PhotosRotateLeftClass))
+
+typedef struct _PhotosRotateLeft PhotosRotateLeft;
+typedef struct _PhotosRotateLeftClass PhotosRotateLeftClass;
+typedef struct _PhotosRotateLeftPrivate PhotosRotateLeftPrivate;
+
+struct _PhotosRotateLeft
+{
+ PhotosOperation parent_instance;
+ PhotosRotateLeftPrivate *priv;
+};
+
+struct _PhotosRotateLeftClass
+{
+ PhotosOperationClass parent_class;
+};
+
+GType photos_rotate_left_get_type (void) G_GNUC_CONST;
+
+PhotosOperation *photos_rotate_left_new (void);
+
+G_END_DECLS
+
+#endif /* PHOTOS_ROTATE_LEFT_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]