Add functions for managing a simple_window's opacity
Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8d30ef7d43
commit
56fae6ede1
19
swindow.h
19
swindow.h
|
@ -23,6 +23,7 @@
|
|||
#define AWESOME_SWINDOW_H
|
||||
|
||||
#include "draw.h"
|
||||
#include "window.h"
|
||||
|
||||
/** A simple window. */
|
||||
typedef struct simple_window_t
|
||||
|
@ -78,5 +79,23 @@ simplewindow_refresh_pixmap(simple_window_t *sw)
|
|||
simplewindow_refresh_pixmap_partial(sw, 0, 0, sw->geometry.width, sw->geometry.height);
|
||||
}
|
||||
|
||||
/** Set a simplewindow's opacity.
|
||||
* \param opacity A value between 0 and 1 which describes the opacity.
|
||||
*/
|
||||
static inline void
|
||||
simplewindow_opacity_set(simple_window_t *sw, double opacity)
|
||||
{
|
||||
window_opacity_set(sw->window, opacity);
|
||||
}
|
||||
|
||||
/** Get a simplewindow's opacity.
|
||||
* \return The opacity as a value between 0 and 1, or -1 if unset.
|
||||
*/
|
||||
static inline double
|
||||
simplewindow_opacity_get(simple_window_t *sw)
|
||||
{
|
||||
return window_opacity_get(sw->window);
|
||||
}
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
Loading…
Reference in New Issue