| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#ifndef GTH_CURVE_PRESET_H |
| 23 |
#define GTH_CURVE_PRESET_H |
| 24 |
|
| 25 |
#include <glib.h> |
| 26 |
#include <gtk/gtk.h> |
| 27 |
#include <gthumb.h> |
| 28 |
#include "gth-points.h" |
| 29 |
|
| 30 |
G_BEGIN_DECLS |
| 31 |
|
| 32 |
typedef enum { |
| 33 |
GTH_PRESET_ACTION_ADDED, |
| 34 |
GTH_PRESET_ACTION_RENAMED, |
| 35 |
GTH_PRESET_ACTION_REMOVED, |
| 36 |
GTH_PRESET_ACTION_CHANGED_ORDER |
| 37 |
} GthPresetAction; |
| 38 |
|
| 39 |
#define GTH_TYPE_CURVE_PRESET (gth_curve_preset_get_type ()) |
| 40 |
#define GTH_CURVE_PRESET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTH_TYPE_CURVE_PRESET, GthCurvePreset)) |
| 41 |
#define GTH_CURVE_PRESET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTH_TYPE_CURVE_PRESET, GthCurvePresetClass)) |
| 42 |
#define GTH_IS_CURVE_PRESET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTH_TYPE_CURVE_PRESET)) |
| 43 |
#define GTH_IS_CURVE_PRESET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTH_TYPE_CURVE_PRESET)) |
| 44 |
#define GTH_CURVE_PRESET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTH_TYPE_CURVE_PRESET, GthCurvePresetClass)) |
| 45 |
|
| 46 |
typedef struct _GthCurvePresetPrivate GthCurvePresetPrivate; |
| 47 |
|
| 48 |
typedef struct { |
| 49 |
GObject parent_instance; |
| 50 |
GthCurvePresetPrivate *priv; |
| 51 |
} GthCurvePreset; |
| 52 |
|
| 53 |
typedef struct { |
| 54 |
GObjectClass parent_class; |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
void (*changed) (GthCurvePreset *self); |
| 59 |
void (*preset_changed) (GthCurvePreset *self, |
| 60 |
int id, |
| 61 |
GthPresetAction action); |
| 62 |
} GthCurvePresetClass; |
| 63 |
|
| 64 |
GType gth_curve_preset_get_type (void); |
| 65 |
GthCurvePreset * gth_curve_preset_new_from_file (GFile *file); |
| 66 |
int gth_curve_preset_get_size (GthCurvePreset *self); |
| 67 |
gboolean gth_curve_preset_get_nth (GthCurvePreset *self, |
| 68 |
int n, |
| 69 |
int *id, |
| 70 |
const char **name, |
| 71 |
GthPoints **points); |
| 72 |
gboolean gth_curve_preset_get_by_id (GthCurvePreset *self, |
| 73 |
int id, |
| 74 |
const char **name, |
| 75 |
GthPoints **points); |
| 76 |
int gth_curve_preset_get_pos (GthCurvePreset *self, |
| 77 |
int id); |
| 78 |
int gth_curve_preset_add (GthCurvePreset *self, |
| 79 |
const char *name, |
| 80 |
GthPoints *points); |
| 81 |
void gth_curve_preset_remove (GthCurvePreset *self, |
| 82 |
int id); |
| 83 |
void gth_curve_preset_rename (GthCurvePreset *self, |
| 84 |
int id, |
| 85 |
const char *new_name); |
| 86 |
void gth_curve_preset_change_order (GthCurvePreset *self, |
| 87 |
GList *id_list); |
| 88 |
GList * gth_curve_preset_get_order (GthCurvePreset *self); |
| 89 |
gboolean gth_curve_preset_save (GthCurvePreset *self, |
| 90 |
GError **error); |
| 91 |
|
| 92 |
#endif |