]> git.cworth.org Git - grrobot/blob - src/grr_icon.h
* configure.in:
[grrobot] / src / grr_icon.h
1 /* grrobot - Ricochet Robot using GTK+ and Xr
2  *
3  * Copyright © 2003 Carl Worth
4  *
5  * Permission to use, copy, modify, distribute, and sell this software
6  * and its documentation for any purpose is hereby granted without
7  * fee, provided that the above copyright notice appear in all copies
8  * and that both that copyright notice and this permission notice
9  * appear in supporting documentation, and that the name of Carl Worth
10  * not be used in advertising or publicity pertaining to distribution
11  * of the software without specific, written prior permission.
12  * Carl Worth makes no representations about the suitability of this
13  * software for any purpose.  It is provided "as is" without express
14  * or implied warranty.
15  * 
16  * CARL WORTH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
18  * NO EVENT SHALL CARL WORTH BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
20  * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
21  * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
22  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23  *
24  * Author: Carl Worth <carl@theworths.org>
25  */
26
27 #ifndef GRR_ICON_H
28 #define GRR_ICON_H
29
30 #include <rr.h>
31 #include <svg-cairo.h>
32
33 typedef struct grr_icon {
34     svg_cairo_t *svg_cairo;
35
36     cairo_surface_t *surface;
37     int surface_width;
38     int surface_height;
39 } grr_icon_t;
40
41 grr_icon_t *
42 grr_icon_create (char *name);
43
44 void
45 grr_icon_destroy (grr_icon_t *icon);
46
47 void
48 grr_icon_draw (grr_icon_t *icon, cairo_t *xrs);
49
50 void
51 grr_icon_predraw (grr_icon_t *icon, cairo_t *xrs, int width, int height);
52
53 void
54 grr_icon_draw_predrawn (grr_icon_t *icon, cairo_t *xrs);
55
56 char *
57 grr_icon_robot_name (rr_robot_t robot);
58
59 char *
60 grr_icon_target_name (rr_target_t target);
61
62 #endif