fix crash when copy'ing latent plugins
[ardour.git] / libs / clearlooks-older / support.h
1 #include <gtk/gtk.h>
2 #include <math.h>
3 #include <string.h>
4
5 /* GTK 2.2 compatibility */
6 #ifndef GTK_IS_COMBO_BOX_ENTRY
7         #define GTK_IS_COMBO_BOX_ENTRY(x) 0
8 #endif
9 #ifndef GTK_IS_COMBO_BOX
10         #define GTK_IS_COMBO_BOX(x) 0
11 #endif
12
13 #define RADIO_SIZE 13
14 #define CHECK_SIZE 13
15
16 GtkTextDirection
17 get_direction (GtkWidget *widget);
18
19 GdkPixbuf *
20 generate_bit (unsigned char alpha[],
21               GdkColor *color,
22               double mult);
23
24 GdkPixbuf *
25 colorize_bit (unsigned char *bit,
26               unsigned char *alpha,
27               GdkColor  *new_color);
28
29 GdkPixmap *
30 pixbuf_to_pixmap (GtkStyle  *style,
31                   GdkPixbuf *pixbuf,
32                   GdkScreen *screen);
33
34 gboolean
35 sanitize_size (GdkWindow      *window,
36                gint           *width,
37                gint           *height);
38
39 void
40 rgb_to_hls (gdouble *r,
41             gdouble *g,
42             gdouble *b);
43
44 void
45 hls_to_rgb (gdouble *h,
46             gdouble *l,
47             gdouble *s);
48
49 void
50 shade (GdkColor * a, GdkColor * b, float k);
51
52 void
53 draw_hgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
54                 int x, int y, int width, int height,
55                 GdkColor *top_color, GdkColor *bottom_color);
56
57 void
58 draw_vgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
59                 int x, int y, int width, int height,
60                 GdkColor *left_color, GdkColor *right_color);
61
62 void
63 arrow_draw_hline (GdkWindow     *window,
64                   GdkGC         *gc,
65                   int            x1,
66                   int            x2,
67                   int            y,
68                   gboolean       last);
69
70 void
71 arrow_draw_vline (GdkWindow     *window,
72                   GdkGC         *gc,
73                   int            y1,
74                   int            y2,
75                   int            x,
76                   gboolean       last);
77
78 void
79 draw_arrow (GdkWindow     *window,
80             GdkGC         *gc,
81             GdkRectangle  *area,
82             GtkArrowType   arrow_type,
83             gint           x,
84             gint           y,
85             gint           width,
86             gint           height);
87
88 void
89 calculate_arrow_geometry (GtkArrowType  arrow_type,
90                           gint         *x,
91                           gint         *y,
92                           gint         *width,
93                           gint         *height);
94
95 GtkWidget *special_get_ancestor(GtkWidget * widget,
96                                        GType widget_type);
97
98 void blend (GdkColormap *colormap,
99             GdkColor *a, GdkColor *b, GdkColor *c, int alpha);
100
101 GtkWidget *get_parent_window (GtkWidget *widget);
102
103 GdkColor *get_parent_bgcolor (GtkWidget *widget);
104
105 gboolean is_combo_box (GtkWidget * widget);
106
107 GtkWidget *find_combo_box_widget (GtkWidget * widget);
108
109 void gtk_clist_get_header_index (GtkCList *clist, GtkWidget *button,
110                                  gint *column_index, gint *columns);