1 /*
2 *
3 * Author: Giacomo Lozito <james@develia.org>, (C) 2005-2007
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18 *
19 */
20 
21 #ifndef _I_AOSD_STYLE_PRIVATE_H
22 #define _I_AOSD_STYLE_PRIVATE_H 1
23 
24 #include "aosd_cfg.h"
25 #include <cairo/cairo.h>
26 #include <pango/pangocairo.h>
27 #include "ghosd.h"
28 
29 
30 /* decoration render function parameter object
31    ----------------------------------------------------------
32    layout         pango layout that contains OSD text
33    text           user-defined options for OSD text
34    decoration     user-defined options for OSD decorations
35 */
36 typedef struct
37 {
38   PangoLayout * layout;
39   aosd_cfg_osd_text_t * text;
40   aosd_cfg_osd_decoration_t * decoration;
41 }
42 aosd_deco_style_data_t;
43 
44 
45 /* decoration object
46    ----------------------------------------------------------
47    desc           description
48    render_func    render function used to draw the decoration
49    colors_num     number of user-definable colors (no more than AOSD_DECO_STYLE_MAX_COLORS)
50    padding        drawable space available around the text
51 */
52 typedef struct
53 {
54   const char * desc;
55   void (*render_func)( Ghosd * , cairo_t * , aosd_deco_style_data_t * );
56   int colors_num;
57   struct
58   {
59     int top;
60     int bottom;
61     int left;
62     int right;
63   }
64   padding;
65 }
66 aosd_deco_style_t;
67 
68 #endif /* !_I_AOSD_STYLE_PRIVATE_H */
69