konaclient-gtk/libkonaclient/konaimage.h

40 lines
1.3 KiB
C
Raw Normal View History

2016-06-04 13:15:38 +02:00
#ifndef KONAIMAGE_H
#define KONAIMAGE_H
#include <glib-object.h>
G_BEGIN_DECLS
#define KONA_TYPE_IMAGE (kona_image_get_type())
G_DECLARE_FINAL_TYPE (KonaImage, kona_image, KONA, IMAGE, GObject) // Struct name, function prefix, Namespace, name, inherits
KonaImage *kona_image_new (void);
2016-06-04 20:55:28 +02:00
struct kona_image_meta_struct {
int id;
GList *tags;
gchar* preview_url;
gchar* image_url;
2016-06-04 20:55:28 +02:00
int width;
int height;
};
typedef struct kona_image_meta_struct kona_image_meta;
2016-06-04 13:15:38 +02:00
/*** GObject functions ***/
KonaImage *kona_image_new();
static void kona_image_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); // WARN: This returns pointers to the actual data. Do not edit.
static void kona_image_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); // Every value will be copied (with subelements), so make sure to clear your variables after sending them here.
static void kona_image_class_init(KonaImageClass *klass);
static void kona_image_init (KonaImage *self);
static void kona_image_dispose(GObject *self);
static void kona_image_finalize(GObject *self);
2016-06-06 22:01:29 +02:00
// Access functions for parameters (read only)
kona_image_meta* kona_image_get_meta_from_konaimage(KonaImage *ki);
2016-06-04 13:15:38 +02:00
G_END_DECLS
#endif // KONAIMAGE_H