* New: selectable styles
[calf.git] / src / calf / drawingutils.h
blobf1711243eff737fe616860c770fd62eed03b0905
1 /* Calf DSP Library
2 * A few useful drawing functions
4 * Copyright (C) 2008-2015 Krzysztof Foltman, Torben Hohn, Markus
5 * Schmidt and others
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this program; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02111-1307, USA.
24 #ifndef CALF_DRAWINGUTILS_H
25 #define CALF_DRAWINGUTILS_H
27 #include <gtk/gtk.h>
29 void display_background(GtkWidget *widget, cairo_t* c, int x, int y, int sx, int sy, int ox, int oy, float radius = 0, float bevel = 0.2, float brightness = 1, int shadow = 7, float lights = 0.9, float dull = 0.15) ;
31 void draw_rect(GtkWidget * widget, const gchar * type, GtkStateType * state, gint x, gint y, gint width, gint height, float rad, float bevel);
32 void draw_inset(GtkWidget *widget, gint x, gint y, gint width, gint height, float rad, gint depth);
33 void draw_glass(GtkWidget *widget, gint x, gint y, gint width, gint height, float rad);
34 void _draw_inset(cairo_t *cr, gint x, gint y, gint width, gint height, float rad, gint depth);
35 void _draw_glass(cairo_t *cr, gint x, gint y, gint width, gint height, float rad);
37 void get_bg_color(GtkWidget * widget, GtkStateType * state, float * r, float * g, float * b);
38 void get_fg_color(GtkWidget * widget, GtkStateType * state, float * r, float * g, float * b);
39 void get_base_color(GtkWidget * widget, GtkStateType * state, float * r, float * g, float * b);
40 void get_text_color(GtkWidget * widget, GtkStateType * state, float * r, float * g, float * b);
41 void get_color(GtkWidget * widget, const gchar * type, GtkStateType * state, float * r, float * g, float * b);
43 void clip_context(GtkWidget * widget, cairo_t * cr, GdkRegion *region);
44 void create_rectangle(cairo_t * cr, gint x, gint y, gint width, gint height, float rad);
45 void draw_bevel(cairo_t * cr, gint x, gint y, gint width, gint height, float rad, float bevel);
47 #endif /* CALF_DRAWINGUTILS_H */