__created(false),
__hasFocus(false),
__waylandSurface(nullptr),
- __winShell(nullptr),
__acceptsFocus(true),
__allowUserGeometry(false),
__title(""),
return __created;
}
-bool DSWindowPrivate::setWindowShell(DSWindowShell *winShell)
-{
- if (__winShell)
- {
- DSLOG_ERR("DSWindow", "Already exist DSWindowShell...");
- return false;
- }
-
- __winShell = winShell;
- return true;
-}
-
-DSWindowShell *DSWindowPrivate::getWindowShell(void)
-{
- return __winShell;
-}
-
bool DSWindowPrivate::setVkbdFloating(bool set)
{
__vkbd_floating = set;
return priv->__waylandSurface.get();
}
-
-bool DSWindow::setWindowShell(DSWindowShell *winShell)
-{
- DS_GET_PRIV(DSWindow);
- return priv->setWindowShell(winShell);
-}
-
-DSWindowShell *DSWindow::getWindowShell(void)
-{
- DS_GET_PRIV(DSWindow);
- return priv->getWindowShell();
-}
-
void DSWindow::registerCallbackSizeChanged(DSObject *slot, std::function<void(std::shared_ptr<stSize>)> func)
{
__sizeChangedSignal.connect(slot, func);
DSWaylandSurface *surface();
- bool setWindowShell(DSWindowShell *winShell);
- DSWindowShell *getWindowShell(void);
-
void registerCallbackSizeChanged(DSObject *slot, std::function<void(std::shared_ptr<stSize>)> func);
void registerCallbackBufferChanged(DSObject *slot, std::function<void(std::shared_ptr<IDSBuffer>)> func);
void registerCallbackWindowRaiseToTop(DSObject *slot, std::function<void(void *)> func);
bool setFocus(void);
bool isCreated();
- bool setWindowShell(DSWindowShell *winShell);
- DSWindowShell *getWindowShell(void);
-
bool setVkbdFloating(bool set);
bool getVkbdFloating();
bool __created;
bool __hasFocus;
std::shared_ptr<DSWaylandSurface> __waylandSurface;
- DSWindowShell *__winShell;
bool __acceptsFocus;
bool __allowUserGeometry;
std::string __title;
// create DSWindowShell
std::shared_ptr<DSWindowShell> shell = __createWindowShell(window);
-
- // set DSWindowShell to DSWindow
- window->setWindowShell(shell.get());
}
void DSZone::__onSurfaceDestroy(std::shared_ptr<DSWaylandSurface> waylandSurface)
auto winShell = std::make_shared<DSWindowShell>(win.get());
EXPECT_TRUE(winShell != nullptr);
-
- EXPECT_TRUE(win->setWindowShell(winShell.get()) == true);
-
- DSWindowShell *getWinShell = nullptr;
- getWinShell = win->getWindowShell();
- EXPECT_TRUE(winShell.get() == getWinShell);
}
TEST_F(DSWindowTest, TitleTest)