make bit depth accessible from an FbDrawable
This commit is contained in:
parent
934bd42ace
commit
eaabe0321d
4 changed files with 10 additions and 9 deletions
|
@ -72,6 +72,7 @@ public:
|
||||||
virtual Drawable drawable() const = 0;
|
virtual Drawable drawable() const = 0;
|
||||||
virtual unsigned int width() const = 0;
|
virtual unsigned int width() const = 0;
|
||||||
virtual unsigned int height() const = 0;
|
virtual unsigned int height() const = 0;
|
||||||
|
virtual unsigned int depth() const = 0;
|
||||||
static inline Display *display() { return s_display; }
|
static inline Display *display() { return s_display; }
|
||||||
protected:
|
protected:
|
||||||
static Display *s_display; // display connection // display connection
|
static Display *s_display; // display connection // display connection
|
||||||
|
|
|
@ -69,7 +69,7 @@ FbWindow::FbWindow(int screen_num,
|
||||||
long eventmask,
|
long eventmask,
|
||||||
bool override_redirect,
|
bool override_redirect,
|
||||||
bool save_unders,
|
bool save_unders,
|
||||||
int depth,
|
unsigned int depth,
|
||||||
int class_type):
|
int class_type):
|
||||||
FbDrawable(),
|
FbDrawable(),
|
||||||
m_parent(0),
|
m_parent(0),
|
||||||
|
@ -89,7 +89,7 @@ FbWindow::FbWindow(const FbWindow &parent,
|
||||||
long eventmask,
|
long eventmask,
|
||||||
bool override_redirect,
|
bool override_redirect,
|
||||||
bool save_unders,
|
bool save_unders,
|
||||||
int depth, int class_type):
|
unsigned int depth, int class_type):
|
||||||
m_parent(&parent),
|
m_parent(&parent),
|
||||||
m_screen_num(parent.screenNumber()),
|
m_screen_num(parent.screenNumber()),
|
||||||
m_destroy(true),
|
m_destroy(true),
|
||||||
|
@ -599,7 +599,7 @@ void FbWindow::updateGeometry() {
|
||||||
void FbWindow::create(Window parent, int x, int y,
|
void FbWindow::create(Window parent, int x, int y,
|
||||||
unsigned int width, unsigned int height,
|
unsigned int width, unsigned int height,
|
||||||
long eventmask, bool override_redirect,
|
long eventmask, bool override_redirect,
|
||||||
bool save_unders, int depth, int class_type) {
|
bool save_unders, unsigned int depth, int class_type) {
|
||||||
|
|
||||||
|
|
||||||
m_border_width = 0;
|
m_border_width = 0;
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
int x, int y, unsigned int width, unsigned int height, long eventmask,
|
int x, int y, unsigned int width, unsigned int height, long eventmask,
|
||||||
bool overrride_redirect = false,
|
bool overrride_redirect = false,
|
||||||
bool save_unders = false,
|
bool save_unders = false,
|
||||||
int depth = CopyFromParent,
|
unsigned int depth = CopyFromParent,
|
||||||
int class_type = InputOutput);
|
int class_type = InputOutput);
|
||||||
|
|
||||||
FbWindow(const FbWindow &parent,
|
FbWindow(const FbWindow &parent,
|
||||||
|
@ -67,7 +67,7 @@ public:
|
||||||
long eventmask,
|
long eventmask,
|
||||||
bool overrride_redirect = false,
|
bool overrride_redirect = false,
|
||||||
bool save_unders = false,
|
bool save_unders = false,
|
||||||
int depth = CopyFromParent,
|
unsigned int depth = CopyFromParent,
|
||||||
int class_type = InputOutput);
|
int class_type = InputOutput);
|
||||||
|
|
||||||
virtual ~FbWindow();
|
virtual ~FbWindow();
|
||||||
|
@ -179,7 +179,7 @@ public:
|
||||||
inline unsigned int width() const { return m_width; }
|
inline unsigned int width() const { return m_width; }
|
||||||
inline unsigned int height() const { return m_height; }
|
inline unsigned int height() const { return m_height; }
|
||||||
inline unsigned int borderWidth() const { return m_border_width; }
|
inline unsigned int borderWidth() const { return m_border_width; }
|
||||||
inline int depth() const { return m_depth; }
|
inline unsigned int depth() const { return m_depth; }
|
||||||
unsigned char alpha() const;
|
unsigned char alpha() const;
|
||||||
int screenNumber() const;
|
int screenNumber() const;
|
||||||
long eventMask() const;
|
long eventMask() const;
|
||||||
|
@ -218,7 +218,7 @@ private:
|
||||||
long eventmask,
|
long eventmask,
|
||||||
bool override_redirect,
|
bool override_redirect,
|
||||||
bool save_unders,
|
bool save_unders,
|
||||||
int depth,
|
unsigned int depth,
|
||||||
int class_type);
|
int class_type);
|
||||||
|
|
||||||
const FbWindow *m_parent; ///< parent FbWindow
|
const FbWindow *m_parent; ///< parent FbWindow
|
||||||
|
@ -227,7 +227,7 @@ private:
|
||||||
int m_x, m_y; ///< position of window
|
int m_x, m_y; ///< position of window
|
||||||
unsigned int m_width, m_height; ///< size of window
|
unsigned int m_width, m_height; ///< size of window
|
||||||
unsigned int m_border_width; ///< border size
|
unsigned int m_border_width; ///< border size
|
||||||
int m_depth; ///< bit depth
|
unsigned int m_depth; ///< bit depth
|
||||||
bool m_destroy; ///< wheter the x window was created before
|
bool m_destroy; ///< wheter the x window was created before
|
||||||
std::auto_ptr<FbTk::Transparent> m_transparent;
|
std::auto_ptr<FbTk::Transparent> m_transparent;
|
||||||
bool m_lastbg_color_set;
|
bool m_lastbg_color_set;
|
||||||
|
|
|
@ -114,7 +114,7 @@ void MenuItem::draw(FbDrawable &draw,
|
||||||
int icon_x = x + theme.bevelWidth();
|
int icon_x = x + theme.bevelWidth();
|
||||||
int icon_y = y + theme.bevelWidth();
|
int icon_y = y + theme.bevelWidth();
|
||||||
// enable clip mask
|
// enable clip mask
|
||||||
XSetClipMask(disp, gc, tmp_mask.drawable());
|
XSetClipMask(disp, gc, None); //tmp_mask.drawable());
|
||||||
XSetClipOrigin(disp, gc, icon_x, icon_y);
|
XSetClipOrigin(disp, gc, icon_x, icon_y);
|
||||||
|
|
||||||
draw.copyArea(tmp_pixmap.drawable(),
|
draw.copyArea(tmp_pixmap.drawable(),
|
||||||
|
|
Loading…
Reference in a new issue