summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-screenshot.h
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-03-12 20:02:46 +0000
committerRichard Hughes <richard@hughsie.com>2014-03-12 21:12:39 +0000
commitf4ae41b80d0c386c1afc869f68d62139f8709da9 (patch)
tree8a9e310f7f5d502bcbbd6d6f4ad4e7b25dd14325 /libappstream-glib/as-screenshot.h
parent30e0038b9b05a01396e7062f13ceadc410be3efb (diff)
downloadappstream-glib-f4ae41b80d0c386c1afc869f68d62139f8709da9.tar.gz
Add AsScreenshot
Diffstat (limited to 'libappstream-glib/as-screenshot.h')
-rw-r--r--libappstream-glib/as-screenshot.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/libappstream-glib/as-screenshot.h b/libappstream-glib/as-screenshot.h
new file mode 100644
index 0000000..ba603dc
--- /dev/null
+++ b/libappstream-glib/as-screenshot.h
@@ -0,0 +1,84 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2014 Richard Hughes <richard@hughsie.com>
+ *
+ * Licensed under the GNU Lesser General Public License Version 2.1
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION)
+#error "Only <appstream-glib.h> can be included directly."
+#endif
+
+#ifndef AS_SCREENSHOT_H
+#define AS_SCREENSHOT_H
+
+#include <glib-object.h>
+
+#include "as-image.h"
+
+#define AS_TYPE_SCREENSHOT (as_screenshot_get_type())
+#define AS_SCREENSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AS_TYPE_SCREENSHOT, AsScreenshot))
+#define AS_SCREENSHOT_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST((cls), AS_TYPE_SCREENSHOT, AsScreenshotClass))
+#define AS_IS_SCREENSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AS_TYPE_SCREENSHOT))
+#define AS_IS_SCREENSHOT_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE((cls), AS_TYPE_SCREENSHOT))
+#define AS_SCREENSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AS_TYPE_SCREENSHOT, AsScreenshotClass))
+
+G_BEGIN_DECLS
+
+typedef struct _AsScreenshot AsScreenshot;
+typedef struct _AsScreenshotClass AsScreenshotClass;
+
+struct _AsScreenshot
+{
+ GObject parent;
+};
+
+struct _AsScreenshotClass
+{
+ GObjectClass parent_class;
+};
+
+typedef enum {
+ AS_SCREENSHOT_KIND_NORMAL,
+ AS_SCREENSHOT_KIND_DEFAULT,
+ AS_SCREENSHOT_KIND_UNKNOWN,
+ AS_SCREENSHOT_KIND_LAST
+} AsScreenshotKind;
+
+GType as_screenshot_get_type (void);
+AsScreenshot *as_screenshot_new (void);
+
+AsScreenshotKind as_screenshot_kind_from_string (const gchar *kind);
+const gchar *as_screenshot_kind_to_string (AsScreenshotKind kind);
+
+AsScreenshotKind as_screenshot_get_kind (AsScreenshot *screenshot);
+const gchar *as_screenshot_get_caption (AsScreenshot *app,
+ const gchar *locale);
+GPtrArray *as_screenshot_get_images (AsScreenshot *screenshot);
+
+void as_screenshot_set_kind (AsScreenshot *screenshot,
+ AsScreenshotKind kind);
+void as_screenshot_set_caption (AsScreenshot *app,
+ const gchar *locale,
+ const gchar *caption,
+ gsize caption_length);
+void as_screenshot_add_image (AsScreenshot *screenshot,
+ AsImage *image);
+
+G_END_DECLS
+
+#endif /* AS_SCREENSHOT_H */