2 * swindow.h - simple window handling functions header
4 * Copyright © 2008 Julien Danjou <julien@danjou.info>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef AWESOME_SWINDOW_H
23 #define AWESOME_SWINDOW_H
27 /** A simple window. */
28 typedef struct simple_window_t
30 /** The window object. */
32 /** The pixmap copied to the window object. */
34 /** The graphic context. */
36 /** The window geometry. */
40 /** Internal geometry (matching X11 protocol) */
43 /** The window border */
46 /** The window border width */
48 /** The window border color */
54 orientation_t orientation
;
57 void simplewindow_init(simple_window_t
*s
,
58 int, area_t
, uint16_t,
59 orientation_t
, const xcolor_t
*, const xcolor_t
*);
61 void simplewindow_wipe(simple_window_t
*);
63 void simplewindow_move(simple_window_t
*, int, int);
64 void simplewindow_resize(simple_window_t
*, int, int);
65 void simplewindow_moveresize(simple_window_t
*, area_t
);
66 void simplewindow_refresh_pixmap_partial(simple_window_t
*, int16_t, int16_t, uint16_t, uint16_t);
67 void simplewindow_border_width_set(simple_window_t
*, uint32_t);
68 void simplewindow_border_color_set(simple_window_t
*, const xcolor_t
*);
69 void simplewindow_orientation_set(simple_window_t
*, orientation_t
);
70 void simplewindow_cursor_set(simple_window_t
*, xcb_cursor_t
);
72 /** Refresh the window content by copying its pixmap data to its window.
73 * \param sw The simple window to refresh.
76 simplewindow_refresh_pixmap(simple_window_t
*sw
)
78 simplewindow_refresh_pixmap_partial(sw
, 0, 0, sw
->geometry
.width
, sw
->geometry
.height
);
82 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80