These methods do not support at this time.
The size and position of the DisplayArea is determined by DSOutput.
Change-Id: Ic69ce8fa1e9f593a29e23ce9647450e6d76ec486
// make a display area.
__displayArea = std::make_shared<DSDisplayArea>(output);
- __displayArea->setPosition(0, 0);
- __displayArea->setSize(output->getResolutionWidth(), output->getResolutionHeight());
}
void _onOutputRemoved(std::shared_ptr<IDSOutput> output) override
DSDisplayArea::~DSDisplayArea()
{}
-bool DSDisplayArea::setPosition(int x, int y)
-{
- DS_GET_PRIV(DSDisplayArea);
-
- if (!priv->setPosition(x, y))
- return false;
-
- return true;
-}
-
-bool DSDisplayArea::setSize(int width, int height)
-{
- DS_GET_PRIV(DSDisplayArea);
-
- if (!priv->setSize(width, height))
- return false;
-
- return true;
-}
-
int DSDisplayArea::getWidth()
{
DS_GET_PRIV(DSDisplayArea);
// add idle enterer event on __onEventIdleEnterer for rendereing and displaying
DSEventLoop::addIdleEnterer(this, __onEventIdleEnterer);
+
+ // The size of DSDisplayArea is the one of DSOutput
+ __width = outputImpl->getResolutionWidth();
+ __height = outputImpl->getResolutionWidth();
}
DSDisplayAreaPrivate::~DSDisplayAreaPrivate()
{}
-bool DSDisplayAreaPrivate::setPosition(int x, int y)
-{
- __x = x;
- __y = y;
-
- return true;
-}
-
-bool DSDisplayAreaPrivate::setSize(int width, int height)
-{
- __width = width;
- __height = height;
-
- return true;
-}
-
int DSDisplayAreaPrivate::getWidth()
{
if (__output == nullptr)
explicit DSDisplayArea(std::shared_ptr<IDSOutput> output);
virtual ~DSDisplayArea();
- bool setPosition(int x, int y);
- bool setSize(int width, int height);
int getWidth();
int getHeight();
std::shared_ptr<IDSOutput> getOutput();
virtual ~DSDisplayAreaPrivate();
static DSDisplayAreaPrivate *getPrivate(DSDisplayArea *q) { return q->__d_func(); }
- bool setPosition(int x, int y);
- bool setSize(int width, int height);
int getWidth();
int getHeight();
auto output = std::make_shared<DSOutputImpl>(displayDeviceOutput);
EXPECT_TRUE(output != nullptr);
EXPECT_TRUE(output->applyResolutionAuto() == true);
+
auto displayArea = std::make_shared<DSDisplayArea>(output);
}
}
auto output = std::make_shared<DSOutputImpl>(displayDeviceOutput);
EXPECT_TRUE(output != nullptr);
EXPECT_TRUE(output->applyResolutionAuto() == true);
+
auto displayArea = std::make_shared<DSDisplayArea>(output);
- EXPECT_TRUE(displayArea->setPosition(0, 0) != 0);
- EXPECT_TRUE(displayArea->setSize(100, 100) != 0);
- EXPECT_TRUE(displayArea->getHeight() != 0);
- EXPECT_TRUE(displayArea->getWidth() != 0);
+ EXPECT_TRUE(displayArea->getHeight() == output->getResolutionWidth());
+ EXPECT_TRUE(displayArea->getWidth() == output->getResolutionHeight());
}
}