all repos — tint2 @ 8ec7f2dd9cfd871ac816e8b5383c8a140b7901a4

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

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
#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);

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