2 * drawable.h - drawable functions header
4 * Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
5 * Copyright © 2010-2012 Uli Schlachter <psychon@znc.in>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (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
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef AWESOME_OBJECTS_DRAWABLE_H
24 #define AWESOME_OBJECTS_DRAWABLE_H
26 #include "common/luaclass.h"
29 typedef void drawable_refresh_callback(void *);
35 /** The pixmap we are drawing to. */
37 /** Surface for drawing. */
38 cairo_surface_t
*surface
;
39 /** The geometry of the drawable (in root window coordinates). */
41 /** Surface contents are undefined if this is false. */
43 /** Callback for refreshing. */
44 drawable_refresh_callback
*refresh_callback
;
45 /** Data for refresh callback. */
48 typedef struct drawable_t drawable_t
;
50 drawable_t
*drawable_allocator(lua_State
*, drawable_refresh_callback
*, void *);
51 void drawable_set_geometry(drawable_t
*, int, area_t
);
52 void drawable_class_setup(lua_State
*);
55 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80