diff options
author | Gediminas Liktaras <gliktaras@gmail.com> | 2011-12-08 13:34:09 (GMT) |
---|---|---|
committer | Paul Tagliamonte <paultag@fluxbox.org> | 2011-12-10 16:13:19 (GMT) |
commit | cd339169d1961eb508ea89cee2609ec6d0fc0c15 (patch) | |
tree | 01acd158a03fb17a72e067ff0b36701da75e49dc /util/fbcompose/XRenderPlugin.cc | |
parent | 85ac5c4b2c6a526992f483a6e91867dc2f82a19e (diff) | |
download | fluxbox_paul-cd339169d1961eb508ea89cee2609ec6d0fc0c15.zip fluxbox_paul-cd339169d1961eb508ea89cee2609ec6d0fc0c15.tar.bz2 |
fbcompose - A compositing addon for fluxbox window manager.
fbcompose(1) is an optional compositing addon for fluxbox window manager. It
augments fluxbox with a number of graphical features. Most notably, fbcompose
allows fluxbox to properly display applications that require compositing
(docky, for example), adds support for true window transparency (as opposed to
fluxbox's pseudo transparency) and provides a plugin framework to extend the
compositor's functionality.
As this is still a beta version of the compositor, the bugs are likely.
Diffstat (limited to 'util/fbcompose/XRenderPlugin.cc')
-rw-r--r-- | util/fbcompose/XRenderPlugin.cc | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/util/fbcompose/XRenderPlugin.cc b/util/fbcompose/XRenderPlugin.cc new file mode 100644 index 0000000..4df050f --- /dev/null +++ b/util/fbcompose/XRenderPlugin.cc | |||
@@ -0,0 +1,95 @@ | |||
1 | /** XRenderPlugin.cc file for the fluxbox compositor. */ | ||
2 | |||
3 | // Copyright (c) 2011 Gediminas Liktaras (gliktaras at gmail dot com) | ||
4 | // | ||
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy | ||
6 | // of this software and associated documentation files (the "Software"), to deal | ||
7 | // in the Software without restriction, including without limitation the rights | ||
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
9 | // copies of the Software, and to permit persons to whom the Software is | ||
10 | // furnished to do so, subject to the following conditions: | ||
11 | // | ||
12 | // The above copyright notice and this permission notice shall be included in | ||
13 | // all copies or substantial portions of the Software. | ||
14 | // | ||
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
21 | // THE SOFTWARE. | ||
22 | |||
23 | |||
24 | #include "XRenderPlugin.hh" | ||
25 | |||
26 | #include "XRenderScreen.hh" | ||
27 | #include "XRenderWindow.hh" | ||
28 | |||
29 | using namespace FbCompositor; | ||
30 | |||
31 | |||
32 | //--- CONSTRUCTORS AND DESTRUCTORS --------------------------------------------- | ||
33 | |||
34 | // Costructor. | ||
35 | XRenderPlugin::XRenderPlugin(const BaseScreen &screen, const std::vector<FbTk::FbString> &args) : | ||
36 | BasePlugin(screen, args) { | ||
37 | } | ||
38 | |||
39 | // Destructor. | ||
40 | XRenderPlugin::~XRenderPlugin() { } | ||
41 | |||
42 | |||
43 | //--- ACCESSORS ---------------------------------------------------------------- | ||
44 | |||
45 | // Returns a reference screen object, cast into the correct class. | ||
46 | const XRenderScreen &XRenderPlugin::xrenderScreen() const { | ||
47 | static const XRenderScreen &s = dynamic_cast<const XRenderScreen&>(BasePlugin::screen()); | ||
48 | return s; | ||
49 | } | ||
50 | |||
51 | |||
52 | //--- RENDERING ACTIONS -------------------------------------------------------- | ||
53 | |||
54 | // Rectangles that the plugin wishes to damage. | ||
55 | const std::vector<XRectangle> &XRenderPlugin::damagedAreas() { | ||
56 | static std::vector<XRectangle> damage; | ||
57 | return damage; | ||
58 | } | ||
59 | |||
60 | |||
61 | // Post background rendering actions and jobs. | ||
62 | const std::vector<XRenderRenderingJob> &XRenderPlugin::postBackgroundRenderingActions() { | ||
63 | static std::vector<XRenderRenderingJob> jobs; | ||
64 | return jobs; | ||
65 | } | ||
66 | |||
67 | |||
68 | // Pre window rendering actions and jobs. | ||
69 | const std::vector<XRenderRenderingJob> &XRenderPlugin::preWindowRenderingActions(const XRenderWindow &/*window*/) { | ||
70 | static std::vector<XRenderRenderingJob> jobs; | ||
71 | return jobs; | ||
72 | } | ||
73 | |||
74 | // Window rendering job initialization. | ||
75 | void XRenderPlugin::windowRenderingJobInit(const XRenderWindow &/*window*/, XRenderRenderingJob &/*job*/) { } | ||
76 | |||
77 | // Post window rendering actions and jobs. | ||
78 | const std::vector<XRenderRenderingJob> &XRenderPlugin::postWindowRenderingActions(const XRenderWindow &/*window*/) { | ||
79 | static std::vector<XRenderRenderingJob> jobs; | ||
80 | return jobs; | ||
81 | } | ||
82 | |||
83 | |||
84 | // Reconfigure rectangle rendering job initialization. | ||
85 | void XRenderPlugin::recRectRenderingJobInit(XRectangle &/*rect_return*/, GC /*gc*/) { } | ||
86 | |||
87 | |||
88 | // Extra rendering actions and jobs. | ||
89 | const std::vector<XRenderRenderingJob> &XRenderPlugin::extraRenderingActions() { | ||
90 | static std::vector<XRenderRenderingJob> jobs; | ||
91 | return jobs; | ||
92 | } | ||
93 | |||
94 | // Post extra rendering actions. | ||
95 | void XRenderPlugin::postExtraRenderingActions() { } | ||