static inline int nxeg_setsize(NXEGWINDOW hwnd, FAR struct nxgl_size_s *size) { int ret = nx_setsize(hwnd, size); if (ret < 0) { message("nxeg_setsize: nx_setsize failed: %d\n", errno); g_exitcode = NXEXIT_NXSETSIZE; } return ret; }
int nxtk_setsize(NXTKWINDOW hfwnd, FAR const struct nxgl_size_s *size) { FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_size_s newsize; #ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !size) { set_errno(EINVAL); return ERROR; } #endif /* Add the sizes need for the toolbar and the borders */ newsize.w = size->w + 2 * CONFIG_NXTK_BORDERWIDTH; newsize.h = size->h + fwnd->tbheight + 2 * CONFIG_NXTK_BORDERWIDTH; /* Then set the window size */ return nx_setsize((NXWINDOW)hfwnd, &newsize); }