summaryrefslogtreecommitdiff
path: root/Source/++DFB/++dfb/idirectfbdisplaylayer.cpp
blob: e95ed1b5ecccf71610218e4c4f7c3b730effc1d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
/*
   (c) Copyright 2000-2002  convergence integrated media GmbH.
   All rights reserved.

   Written by Denis Oliver Kropp <dok@convergence.de>,
              Andreas Hundt <andi@convergence.de> and
              Sven Neumann <sven@convergence.de>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the
   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.
*/

#include "++dfb.h"
#include "++dfb_internal.h"

DFBDisplayLayerID IDirectFBDisplayLayer::GetID()
{
     DFBDisplayLayerID layer_id;

     DFBCHECK( iface->GetID (iface, &layer_id) );

     return layer_id;
}

DFBDisplayLayerDescription IDirectFBDisplayLayer::GetDescription()
{
     DFBDisplayLayerDescription desc;

     DFBCHECK( iface->GetDescription (iface, &desc) );

     return desc;
}

void IDirectFBDisplayLayer::GetSourceDescriptions (DFBDisplayLayerSourceDescription *desc)
{
     DFBCHECK( iface->GetSourceDescriptions (iface, desc) );
}

IDirectFBSurface IDirectFBDisplayLayer::GetSurface()
{
     IDirectFBSurface_C *idirectfbsurface;

     DFBCHECK( iface->GetSurface (iface, &idirectfbsurface) );

     return IDirectFBSurface (idirectfbsurface);
}

IDirectFBScreen IDirectFBDisplayLayer::GetScreen()
{
     IDirectFBScreen_C *idirectfbscreen;

     DFBCHECK( iface->GetScreen (iface, &idirectfbscreen) );

     return IDirectFBScreen (idirectfbscreen);
}

void IDirectFBDisplayLayer::SetCooperativeLevel (DFBDisplayLayerCooperativeLevel level)
{
     DFBCHECK( iface->SetCooperativeLevel (iface, level) );
}

void IDirectFBDisplayLayer::SetOpacity (u8 opacity)
{
     DFBCHECK( iface->SetOpacity (iface, opacity) );
}

void IDirectFBDisplayLayer::SetSourceRectangle (int x,
                                                int y,
                                                int width,
                                                int height)
{
     DFBCHECK( iface->SetSourceRectangle (iface, x, y, width, height) );
}

void IDirectFBDisplayLayer::SetScreenLocation (float x,
                                               float y,
                                               float width,
                                               float height)
{
     DFBCHECK( iface->SetScreenLocation (iface, x, y, width, height) );
}

void IDirectFBDisplayLayer::SetScreenPosition (int x,
                                               int y)
{
     DFBCHECK( iface->SetScreenPosition (iface, x, y) );
}

void IDirectFBDisplayLayer::SetScreenRectangle (int x,
                                                int y,
                                                int width,
                                                int height)
{
     DFBCHECK( iface->SetScreenRectangle (iface, x, y, width, height) );
}

void IDirectFBDisplayLayer::SetClipRegions (const DFBRegion *regions,
                                            int              num_regions,
                                            DFBBoolean       positive)
{
     DFBCHECK( iface->SetClipRegions (iface, regions, num_regions, positive) );
}

void IDirectFBDisplayLayer::SetSrcColorKey (u8 r, u8 g, u8 b)
{
     DFBCHECK( iface->SetSrcColorKey (iface, r, g, b) );
}

void IDirectFBDisplayLayer::SetDstColorKey (u8 r, u8 g, u8 b)
{
     DFBCHECK( iface->SetDstColorKey (iface, r, g, b) );
}

int IDirectFBDisplayLayer::GetLevel()
{
     int level;

     DFBCHECK( iface->GetLevel (iface, &level) );

     return level;
}

void IDirectFBDisplayLayer::SetLevel (int level)
{
     DFBCHECK( iface->SetLevel (iface, level) );
}

int IDirectFBDisplayLayer::GetCurrentOutputField()
{
     int field;

     DFBCHECK( iface->GetCurrentOutputField (iface, &field) );

     return field;
}

void IDirectFBDisplayLayer::SetFieldParity (int field)
{
     DFBCHECK( iface->SetFieldParity (iface, field) );
}

void IDirectFBDisplayLayer::WaitForSync()
{
     DFBCHECK( iface->WaitForSync (iface) );
}

void IDirectFBDisplayLayer::GetConfiguration (DFBDisplayLayerConfig *config)
{
     DFBCHECK( iface->GetConfiguration (iface, config) );
}

void IDirectFBDisplayLayer::TestConfiguration (DFBDisplayLayerConfig      &config,
                                               DFBDisplayLayerConfigFlags *failed)
{
     DFBCHECK( iface->TestConfiguration (iface, &config, failed) );
}

void IDirectFBDisplayLayer::SetConfiguration (DFBDisplayLayerConfig &config)
{
     DFBCHECK( iface->SetConfiguration (iface, &config) );
}

void IDirectFBDisplayLayer::SetBackgroundMode (DFBDisplayLayerBackgroundMode mode)
{
     DFBCHECK( iface->SetBackgroundMode (iface, mode) );
}

void IDirectFBDisplayLayer::SetBackgroundImage (IDirectFBSurface *surface)
{
     DFBCHECK( iface->SetBackgroundImage (iface, surface->get_iface()) );
}

void IDirectFBDisplayLayer::SetBackgroundColor (u8 r, u8 g, u8 b, u8 a)
{
     DFBCHECK( iface->SetBackgroundColor (iface, r, g, b, a) );
}

void IDirectFBDisplayLayer::GetColorAdjustment (DFBColorAdjustment *adj)
{
     DFBCHECK( iface->GetColorAdjustment (iface, adj) );
}

void IDirectFBDisplayLayer::SetColorAdjustment (DFBColorAdjustment &adj)
{
     DFBCHECK( iface->SetColorAdjustment (iface, &adj) );
}

IDirectFBWindow IDirectFBDisplayLayer::CreateWindow (DFBWindowDescription &desc)
{
     IDirectFBWindow_C *idirectfbwindow;

     DFBCHECK( iface->CreateWindow (iface, &desc, &idirectfbwindow) );

     return IDirectFBWindow (idirectfbwindow);
}

IDirectFBWindow IDirectFBDisplayLayer::GetWindow (DFBWindowID window_id)
{
     IDirectFBWindow_C *idirectfbwindow;

     DFBCHECK( iface->GetWindow (iface, window_id, &idirectfbwindow) );

     return IDirectFBWindow (idirectfbwindow);
}

void IDirectFBDisplayLayer::EnableCursor (bool enable)
{
     DFBCHECK( iface->EnableCursor (iface, enable) );
}

void IDirectFBDisplayLayer::GetCursorPosition (int *x, int *y)
{
     DFBCHECK( iface->GetCursorPosition (iface, x, y) );
}

void IDirectFBDisplayLayer::WarpCursor (int x, int y)
{
     DFBCHECK( iface->WarpCursor (iface, x, y) );
}

void IDirectFBDisplayLayer::SetCursorAcceleration (int numerator,
                                                   int denominator,
                                                   int threshold)
{
     DFBCHECK( iface->SetCursorAcceleration (iface, numerator, denominator, threshold) );
}

void IDirectFBDisplayLayer::SetCursorShape (IDirectFBSurface *shape,
                                            int               hot_x,
                                            int               hot_y)
{
     DFBCHECK( iface->SetCursorShape (iface, shape->get_iface(), hot_x, hot_y) );
}

void IDirectFBDisplayLayer::SetCursorOpacity (u8 opacity)
{
     DFBCHECK( iface->SetCursorOpacity (iface, opacity) );
}

void IDirectFBDisplayLayer::SwitchContext (DFBBoolean exclusive)
{
     DFBCHECK( iface->SwitchContext (iface, exclusive) );
}