Qt 4.8
Functions
qdirectfbwindowsurface.cpp File Reference
#include "qdirectfbwindowsurface.h"
#include "qdirectfbscreen.h"
#include "qdirectfbpaintengine.h"
#include <private/qwidget_p.h>
#include <qwidget.h>
#include <qwindowsystem_qws.h>
#include <qpaintdevice.h>
#include <qvarlengtharray.h>

Go to the source code of this file.

Functions

static DFBResult setWindowGeometry (IDirectFBWindow *dfbWindow, const QRect &old, const QRect &rect)
 

Function Documentation

◆ setWindowGeometry()

static DFBResult setWindowGeometry ( IDirectFBWindow *  dfbWindow,
const QRect old,
const QRect rect 
)
static

Definition at line 185 of file qdirectfbwindowsurface.cpp.

Referenced by QDirectFBWindowSurface::setGeometry().

186 {
187  DFBResult result = DFB_OK;
188  const bool isMove = old.isEmpty() || rect.topLeft() != old.topLeft();
189  const bool isResize = rect.size() != old.size();
190 
191 #if (Q_DIRECTFB_VERSION >= 0x010000)
192  if (isResize && isMove) {
193  result = dfbWindow->SetBounds(dfbWindow, rect.x(), rect.y(),
194  rect.width(), rect.height());
195  } else if (isResize) {
196  result = dfbWindow->Resize(dfbWindow,
197  rect.width(), rect.height());
198  } else if (isMove) {
199  result = dfbWindow->MoveTo(dfbWindow, rect.x(), rect.y());
200  }
201 #else
202  if (isResize) {
203  result = dfbWindow->Resize(dfbWindow,
204  rect.width(), rect.height());
205  }
206  if (isMove) {
207  result = dfbWindow->MoveTo(dfbWindow, rect.x(), rect.y());
208  }
209 #endif
210  return result;
211 }
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
QSize size() const
Returns the size of the rectangle.
Definition: qrect.h:309
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
Definition: qrect.h:234
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288