aboutsummaryrefslogtreecommitdiff
path: root/util/fbcompose/XRenderPlugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbcompose/XRenderPlugin.cc')
-rw-r--r--util/fbcompose/XRenderPlugin.cc95
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
29using namespace FbCompositor;
30
31
32//--- CONSTRUCTORS AND DESTRUCTORS ---------------------------------------------
33
34// Costructor.
35XRenderPlugin::XRenderPlugin(const BaseScreen &screen, const std::vector<FbTk::FbString> &args) :
36 BasePlugin(screen, args) {
37}
38
39// Destructor.
40XRenderPlugin::~XRenderPlugin() { }
41
42
43//--- ACCESSORS ----------------------------------------------------------------
44
45// Returns a reference screen object, cast into the correct class.
46const 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.
55const std::vector<XRectangle> &XRenderPlugin::damagedAreas() {
56 static std::vector<XRectangle> damage;
57 return damage;
58}
59
60
61// Post background rendering actions and jobs.
62const std::vector<XRenderRenderingJob> &XRenderPlugin::postBackgroundRenderingActions() {
63 static std::vector<XRenderRenderingJob> jobs;
64 return jobs;
65}
66
67
68// Pre window rendering actions and jobs.
69const std::vector<XRenderRenderingJob> &XRenderPlugin::preWindowRenderingActions(const XRenderWindow &/*window*/) {
70 static std::vector<XRenderRenderingJob> jobs;
71 return jobs;
72}
73
74// Window rendering job initialization.
75void XRenderPlugin::windowRenderingJobInit(const XRenderWindow &/*window*/, XRenderRenderingJob &/*job*/) { }
76
77// Post window rendering actions and jobs.
78const 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.
85void XRenderPlugin::recRectRenderingJobInit(XRectangle &/*rect_return*/, GC /*gc*/) { }
86
87
88// Extra rendering actions and jobs.
89const std::vector<XRenderRenderingJob> &XRenderPlugin::extraRenderingActions() {
90 static std::vector<XRenderRenderingJob> jobs;
91 return jobs;
92}
93
94// Post extra rendering actions.
95void XRenderPlugin::postExtraRenderingActions() { }