src/tint2conf/gradient_gui.h (raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
#ifndef GRADIENT_GUI_H #define GRADIENT_GUI_H #include "gui.h" int gradient_index_safe(int index); void create_gradient(GtkWidget *parent); GtkWidget *create_gradient_combo(); void gradient_duplicate(GtkWidget *widget, gpointer data); void gradient_delete(GtkWidget *widget, gpointer data); void gradient_update_image(int index); void gradient_update(GtkWidget *widget, gpointer data); void gradient_force_update(); void current_gradient_changed(GtkWidget *widget, gpointer data); void background_update_for_gradient(int gradient_id); GtkWidget *create_gradient_stop_combo(); void gradient_stop_duplicate(GtkWidget *widget, gpointer data); void gradient_stop_delete(GtkWidget *widget, gpointer data); void gradient_stop_update(GtkWidget *widget, gpointer data); void gradient_stop_update_image(int index); void current_gradient_stop_changed(GtkWidget *widget, gpointer data); typedef enum GradientConfigType { GRADIENT_CONFIG_VERTICAL = 0, GRADIENT_CONFIG_HORIZONTAL, GRADIENT_CONFIG_RADIAL } GradientConfigType; typedef struct GradientConfigColorStop { Color color; // offset in 0-1 double offset; } GradientConfigColorStop; typedef struct GradientConfig { GradientConfigType type; GradientConfigColorStop start_color; GradientConfigColorStop end_color; // Each element is a GradientConfigColorStop GList *extra_color_stops; } GradientConfig; void gradient_create_new(GradientConfigType t); void gradient_draw(cairo_t *c, GradientConfig *g, int w, int h, gboolean preserve); #endif |