aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/GContext.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-10 21:27:02 (GMT)
committerfluxgen <fluxgen>2003-09-10 21:27:02 (GMT)
commit6d9afb845384a72be3ff87c6c6b9a684100256dc (patch)
tree9eefaa99381b9ed6a7df597aa253abc060c7a8b9 /src/FbTk/GContext.cc
parentdd0aad54c0571785849c2ac5d3a46a0c0c1516ea (diff)
downloadfluxbox_pavel-6d9afb845384a72be3ff87c6c6b9a684100256dc.zip
fluxbox_pavel-6d9afb845384a72be3ff87c6c6b9a684100256dc.tar.bz2
no graphics exposure by default
Diffstat (limited to 'src/FbTk/GContext.cc')
-rw-r--r--src/FbTk/GContext.cc21
1 files changed, 18 insertions, 3 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
40GContext::GContext(Drawable drawable): 41GContext::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
46GContext::~GContext() { 48GContext::~GContext() {
@@ -49,13 +51,21 @@ GContext::~GContext() {
49} 51}
50 52
51void GContext::setForeground(const FbTk::Color &color) { 53void GContext::setForeground(const FbTk::Color &color) {
54 setForeground(color.pixel());
55}
56
57void 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
56void GContext::setBackground(const FbTk::Color &color) { 62void GContext::setBackground(const FbTk::Color &color) {
63 setBackground(color.pixel());
64}
65
66void 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
86void GContext::setGraphicsExposure(bool flag) {
87 XSetGraphicsExposures(FbTk::App::instance()->display(), m_gc,
88 flag);
89}
90
76} // end namespace FbTk 91} // end namespace FbTk