From 5530ce6450d0d96f504d000a0cfe4fb29c6c323c Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 7 Jun 2004 20:24:38 +0000 Subject: alpha access function --- src/FbTk/FbWindow.cc | 9 ++++++++- src/FbTk/FbWindow.hh | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index e7649d7..8bd0ced 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWindow.cc,v 1.34 2004/05/24 13:09:32 rathnor Exp $ +// $Id: FbWindow.cc,v 1.35 2004/06/07 20:24:38 fluxgen Exp $ #include "FbWindow.hh" @@ -249,6 +249,13 @@ void FbWindow::setAlpha(unsigned char alpha) { #endif // HAVE_XRENDER } +unsigned char FbWindow::alpha() const { +#ifdef HAVE_XRENDER + if (m_transparent.get()) + return m_transparent->alpha(); +#endif // HAVE_XRENDER + return 255; +} FbWindow &FbWindow::operator = (const FbWindow &win) { m_parent = win.parent(); diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index 3c5dabb..88437c1 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWindow.hh,v 1.30 2004/05/17 15:01:32 rathnor Exp $ +// $Id: FbWindow.hh,v 1.31 2004/06/07 20:24:37 fluxgen Exp $ #ifndef FBTK_FBWINDOW_HH #define FBTK_FBWINDOW_HH @@ -151,6 +151,7 @@ public: inline unsigned int height() const { return m_height; } inline unsigned int borderWidth() const { return m_border_width; } inline int depth() const { return m_depth; } + unsigned char alpha() const; int screenNumber() const; long eventMask() const; /// compare X window -- cgit v0.11.2