summaryrefslogtreecommitdiff
path: root/Source/++DFB/++dfb/idirectfbwindow.cpp
blob: 771020a2efb62aeea2393b5eb924910cb6aa178b (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
/*
   (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"

DFBWindowID IDirectFBWindow::GetID()
{
     DFBWindowID window_id;

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

     return window_id;
}

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

void IDirectFBWindow::GetSize (int *width,
                               int *height)
{
     DFBCHECK( iface->GetSize (iface, width, height) );
}

IDirectFBEventBuffer IDirectFBWindow::CreateEventBuffer()
{
     IDirectFBEventBuffer_C *idirectfbeventbuffer;

     DFBCHECK( iface->CreateEventBuffer (iface, &idirectfbeventbuffer) );

     static IDirectFBEventBuffer *buffer = new IDirectFBEventBuffer (idirectfbeventbuffer);
     return *buffer;
}

void IDirectFBWindow::AttachEventBuffer (IDirectFBEventBuffer *buffer)
{
     DFBCHECK( iface->AttachEventBuffer (iface, buffer->get_iface()) );
}

void IDirectFBWindow::DetachEventBuffer (IDirectFBEventBuffer *buffer)
{
     DFBCHECK( iface->DetachEventBuffer (iface, buffer->get_iface()) );
}

void IDirectFBWindow::EnableEvents (DFBWindowEventType mask)
{
     DFBCHECK( iface->EnableEvents (iface, mask) );
}

void IDirectFBWindow::DisableEvents (DFBWindowEventType mask)
{
     DFBCHECK( iface->DisableEvents (iface, mask) );
}

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

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

     return IDirectFBSurface (idirectfbsurface);
}

void IDirectFBWindow::SetOptions (DFBWindowOptions options)
{
     DFBCHECK( iface->SetOptions (iface, options) );
}

DFBWindowOptions IDirectFBWindow::GetOptions ()
{
     DFBWindowOptions options;

     DFBCHECK( iface->GetOptions (iface, &options) );

     return options;
}

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

void IDirectFBWindow::SetColorKeyIndex (unsigned int index)
{
     DFBCHECK( iface->SetColorKeyIndex (iface, index) );
}

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

void IDirectFBWindow::SetOpaqueRegion (int x1, int y1, int x2, int y2)
{
     DFBCHECK( iface->SetOpaqueRegion (iface, x1, y1, x2, y2) );
}

u8 IDirectFBWindow::GetOpacity()
{
     u8 opacity;

     DFBCHECK( iface->GetOpacity (iface, &opacity) );

     return opacity;
}

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

void IDirectFBWindow::RequestFocus()
{
     DFBCHECK( iface->RequestFocus (iface) );
}

void IDirectFBWindow::GrabKeyboard()
{
     DFBCHECK( iface->GrabKeyboard (iface) );
}

void IDirectFBWindow::UngrabKeyboard()
{
     DFBCHECK( iface->UngrabKeyboard (iface) );
}

void IDirectFBWindow::GrabPointer()
{
     DFBCHECK( iface->GrabPointer (iface) );
}

void IDirectFBWindow::UngrabPointer()
{
     DFBCHECK( iface->UngrabPointer (iface) );
}

void IDirectFBWindow::GrabKey (DFBInputDeviceKeySymbol    symbol,
                               DFBInputDeviceModifierMask modifiers)
{
     DFBCHECK( iface->GrabKey (iface, symbol, modifiers) );
}

void IDirectFBWindow::UngrabKey (DFBInputDeviceKeySymbol    symbol,
                                 DFBInputDeviceModifierMask modifiers)
{
     DFBCHECK( iface->UngrabKey (iface, symbol, modifiers) );
}

void IDirectFBWindow::Move (int dx, int dy)
{
     DFBCHECK( iface->Move (iface, dx, dy) );
}

void IDirectFBWindow::MoveTo (int x, int y)
{
     DFBCHECK( iface->MoveTo (iface, x, y) );
}

void IDirectFBWindow::Resize (int width,
                              int height)
{
     DFBCHECK( iface->Resize (iface, width, height) );
}

void IDirectFBWindow::SetStackingClass (DFBWindowStackingClass stacking_class)
{
     DFBCHECK( iface->SetStackingClass (iface, stacking_class) );
}

void IDirectFBWindow::Raise()
{
     DFBCHECK( iface->Raise (iface) );
}

void IDirectFBWindow::Lower()
{
     DFBCHECK( iface->Lower (iface) );
}

void IDirectFBWindow::RaiseToTop()
{
     DFBCHECK( iface->RaiseToTop (iface) );
}

void IDirectFBWindow::LowerToBottom()
{
     DFBCHECK( iface->LowerToBottom (iface) );
}

void IDirectFBWindow::PutAtop (IDirectFBWindow *lower)
{
     DFBCHECK( iface->PutAtop (iface, lower->iface) );
}

void IDirectFBWindow::PutBelow (IDirectFBWindow *upper)
{
     DFBCHECK( iface->PutBelow (iface, upper->iface) );
}

void IDirectFBWindow::Close()
{
     DFBCHECK( iface->Close (iface) );
}

void IDirectFBWindow::Destroy()
{
     DFBCHECK( iface->Destroy (iface) );
}

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

void IDirectFBWindow::SetDstGeometry (DFBWindowGeometry *geometry)
{
     DFBCHECK( iface->SetDstGeometry (iface, geometry) );
}

void IDirectFBWindow::SetSrcGeometry (DFBWindowGeometry *geometry)
{
     DFBCHECK( iface->SetSrcGeometry (iface, geometry) );
}