diff options
author | fluxgen <fluxgen> | 2003-09-10 21:27:02 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-09-10 21:27:02 (GMT) |
commit | 6d9afb845384a72be3ff87c6c6b9a684100256dc (patch) | |
tree | 9eefaa99381b9ed6a7df597aa253abc060c7a8b9 /src | |
parent | dd0aad54c0571785849c2ac5d3a46a0c0c1516ea (diff) | |
download | fluxbox_pavel-6d9afb845384a72be3ff87c6c6b9a684100256dc.zip fluxbox_pavel-6d9afb845384a72be3ff87c6c6b9a684100256dc.tar.bz2 |
no graphics exposure by default
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/GContext.cc | 21 | ||||
-rw-r--r-- | src/FbTk/GContext.hh | 7 |
2 files changed, 23 insertions, 5 deletions
diff --git a/src/FbTk/GContext.cc b/src/FbTk/GContext.cc index 910e20f..3885a46 100644 --- a/src/FbTk/GContext.cc +++ b/src/FbTk/GContext.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: GContext.cc,v 1.1 2003/08/27 13:45:11 fluxgen Exp $ | 22 | // $Id: GContext.cc,v 1.2 2003/09/10 21:27:02 fluxgen Exp $ |
23 | 23 | ||
24 | #include "GContext.hh" | 24 | #include "GContext.hh" |
25 | 25 | ||
@@ -35,12 +35,14 @@ GContext::GContext(const FbTk::FbDrawable &drawable): | |||
35 | m_gc(XCreateGC(FbTk::App::instance()->display(), | 35 | m_gc(XCreateGC(FbTk::App::instance()->display(), |
36 | drawable.drawable(), | 36 | drawable.drawable(), |
37 | 0, 0)) { | 37 | 0, 0)) { |
38 | setGraphicsExposure(false); | ||
38 | } | 39 | } |
39 | 40 | ||
40 | GContext::GContext(Drawable drawable): | 41 | GContext::GContext(Drawable drawable): |
41 | m_gc(XCreateGC(FbTk::App::instance()->display(), | 42 | m_gc(XCreateGC(FbTk::App::instance()->display(), |
42 | drawable, | 43 | drawable, |
43 | 0, 0)) { | 44 | 0, 0)) { |
45 | setGraphicsExposure(false); | ||
44 | } | 46 | } |
45 | 47 | ||
46 | GContext::~GContext() { | 48 | GContext::~GContext() { |
@@ -49,13 +51,21 @@ GContext::~GContext() { | |||
49 | } | 51 | } |
50 | 52 | ||
51 | void GContext::setForeground(const FbTk::Color &color) { | 53 | void GContext::setForeground(const FbTk::Color &color) { |
54 | setForeground(color.pixel()); | ||
55 | } | ||
56 | |||
57 | void GContext::setForeground(long pixel_value) { | ||
52 | XSetForeground(FbTk::App::instance()->display(), m_gc, | 58 | XSetForeground(FbTk::App::instance()->display(), m_gc, |
53 | color.pixel()); | 59 | pixel_value); |
54 | } | 60 | } |
55 | 61 | ||
56 | void GContext::setBackground(const FbTk::Color &color) { | 62 | void GContext::setBackground(const FbTk::Color &color) { |
63 | setBackground(color.pixel()); | ||
64 | } | ||
65 | |||
66 | void GContext::setBackground(long pixel_value) { | ||
57 | XSetBackground(FbTk::App::instance()->display(), m_gc, | 67 | XSetBackground(FbTk::App::instance()->display(), m_gc, |
58 | color.pixel()); | 68 | pixel_value); |
59 | } | 69 | } |
60 | 70 | ||
61 | /// not implemented! | 71 | /// not implemented! |
@@ -73,4 +83,9 @@ void GContext::setClipOrigin(int x, int y) { | |||
73 | x, y); | 83 | x, y); |
74 | } | 84 | } |
75 | 85 | ||
86 | void GContext::setGraphicsExposure(bool flag) { | ||
87 | XSetGraphicsExposures(FbTk::App::instance()->display(), m_gc, | ||
88 | flag); | ||
89 | } | ||
90 | |||
76 | } // end namespace FbTk | 91 | } // end namespace FbTk |
diff --git a/src/FbTk/GContext.hh b/src/FbTk/GContext.hh index 636c054..29e8f0d 100644 --- a/src/FbTk/GContext.hh +++ b/src/FbTk/GContext.hh | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: GContext.hh,v 1.1 2003/08/27 13:45:11 fluxgen Exp $ | 22 | // $Id: GContext.hh,v 1.2 2003/09/10 21:27:02 fluxgen Exp $ |
23 | 23 | ||
24 | #ifndef FBTK_GCONTEXT_HH | 24 | #ifndef FBTK_GCONTEXT_HH |
25 | #define FBTK_GCONTEXT_HH | 25 | #define FBTK_GCONTEXT_HH |
@@ -44,11 +44,14 @@ public: | |||
44 | virtual ~GContext(); | 44 | virtual ~GContext(); |
45 | 45 | ||
46 | void setForeground(const FbTk::Color &color); | 46 | void setForeground(const FbTk::Color &color); |
47 | void setForeground(long pixel_value); | ||
47 | void setBackground(const FbTk::Color &color); | 48 | void setBackground(const FbTk::Color &color); |
49 | void setBackground(long pixel_value); | ||
48 | void setFont(const FbTk::Font &font); | 50 | void setFont(const FbTk::Font &font); |
49 | void setClipMask(const FbTk::FbPixmap &pm); | 51 | void setClipMask(const FbTk::FbPixmap &pm); |
50 | void setClipOrigin(int x, int y); | 52 | void setClipOrigin(int x, int y); |
51 | 53 | void setGraphicsExposure(bool value); | |
54 | |||
52 | GC gc() const { return m_gc; } | 55 | GC gc() const { return m_gc; } |
53 | 56 | ||
54 | private: | 57 | private: |