libs: nxstyle fixes

nxstyle fixes to pass the CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea
2021-02-23 20:23:56 +01:00
committed by Xiang Xiao
parent 88fa869a04
commit 561428fb84
99 changed files with 1245 additions and 900 deletions
+5 -3
View File
@@ -130,8 +130,9 @@ void nxtk_subwindowclip(FAR struct nxtk_framedwindow_s *fwnd,
* Name: nxtk_containerclip
*
* Description:
* We are given a 'src' rectangle in containing window, relative coordinates
* (i.e., (0,0) is the top left corner of the outer, containing window).
* We are given a 'src' rectangle in containing window, relative
* coordinates (i.e., (0,0) is the top left corner of the outer,
* containing window).
* This function will (1) clip that src rectangle so that it lies within
* the sub-window bounds, and then (2) move the rectangle to that it is
* relative to the sub-window (i.e., (0,0) is the top left corner of the
@@ -161,7 +162,8 @@ void nxtk_containerclip(FAR struct nxtk_framedwindow_s *fwnd,
*
* Input Parameters:
* fwnd - The framed window within which the move is to be done.
* This must have been previously created by nxtk_openwindow().
* This must have been previously created by
* nxtk_openwindow().
* destrect - The location to receive the clipped rectangle relative
* to containing window
* destoffset - The location to received the clipped offset.
+8 -6
View File
@@ -50,8 +50,8 @@
* will receive the bit map.
* src - The start of the source image.
* origin - The origin of the upper, left-most corner of the full bitmap.
* Both dest and origin are in sub-window coordinates, however, the
* origin may lie outside of the sub-window display.
* Both dest and origin are in sub-window coordinates, however,
* the origin may lie outside of the sub-window display.
* stride - The width of the full source image in pixels.
*
* Returned Value:
@@ -61,9 +61,11 @@
int nxtk_bitmaptoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *dest,
FAR const void *src[CONFIG_NX_NPLANES],
FAR const struct nxgl_point_s *origin, unsigned int stride)
FAR const struct nxgl_point_s *origin,
unsigned int stride)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_point_s wndorigin;
struct nxgl_rect_s clipdest;
@@ -90,8 +92,8 @@ int nxtk_bitmaptoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *dest,
nxgl_vectoradd(&wndorigin, origin, &fwnd->tbrect.pt1);
/* Then move the origin so that is relative to the containing window, not the
* client subwindow
/* Then move the origin so that is relative to the containing window, not
* the client subwindow
*/
nxgl_vectsubtract(&wndorigin, &wndorigin, &fwnd->wnd.bounds.pt1);
+4 -3
View File
@@ -50,8 +50,8 @@
* will receive the bit map.
* src - The start of the source image.
* origin - The origin of the upper, left-most corner of the full bitmap.
* Both dest and origin are in sub-window coordinates, however, the
* origin may lie outside of the sub-window display.
* Both dest and origin are in sub-window coordinates, however,
* the origin may lie outside of the sub-window display.
* stride - The width of the full source image in pixels.
*
* Returned Value:
@@ -64,7 +64,8 @@ int nxtk_bitmapwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *dest,
FAR const struct nxgl_point_s *origin,
unsigned int stride)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_point_s wndorigin;
struct nxgl_rect_s clipdest;
+4 -4
View File
@@ -40,10 +40,10 @@
* to the window and then (2) block any further window messaging.
*
* The 'blocked' callback is the response from nx_block (or nxtk_block).
* Those blocking interfaces are used to assure that no further messages are
* are directed to the window. Receipt of the blocked callback signifies
* that (1) there are no further pending callbacks and (2) that the
* window is now 'defunct' and will receive no further callbacks.
* Those blocking interfaces are used to assure that no further messages
* are are directed to the window. Receipt of the blocked callback
* signifies that (1) there are no further pending callbacks and (2) that
* the window is now 'defunct' and will receive no further callbacks.
*
* This callback supports coordinated destruction of a window in multi-
* user mode. In multi-use mode, the client window logic must stay
+3 -2
View File
@@ -41,8 +41,9 @@
* Name: nxtk_containerclip
*
* Description:
* We are given a 'src' rectangle in containing window, relative coordinates
* (i.e., (0,0) is the top left corner of the outer, containing window).
* We are given a 'src' rectangle in containing window, relative
* coordinates (i.e., (0,0) is the top left corner of the outer, containing
* window).
* This function will (1) clip that src rectangle so that it lies within
* the sub-window bounds, and then (2) move the rectangle to that it is
* relative to the sub-window (i.e., (0,0) is the top left corner of the
+9 -4
View File
@@ -77,7 +77,8 @@
*
****************************************************************************/
int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *center,
int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd,
FAR const struct nxgl_point_s *center,
nxgl_coord_t radius, nxgl_coord_t width,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
{
@@ -98,10 +99,14 @@ int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *cent
vector.pt1.x = pts[i].x;
vector.pt1.y = pts[i].y;
vector.pt2.x = pts[i+1].x;
vector.pt2.y = pts[i+1].y;
vector.pt2.x = pts[i + 1].x;
vector.pt2.y = pts[i + 1].y;
ret = nxtk_drawlinetoolbar(hfwnd, &vector, width, color, NX_LINECAP_PT1);
ret = nxtk_drawlinetoolbar(hfwnd,
&vector,
width,
color,
NX_LINECAP_PT1);
if (ret != OK)
{
return ret;
+9 -4
View File
@@ -77,7 +77,8 @@
*
****************************************************************************/
int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *center,
int nxtk_drawcirclewindow(NXTKWINDOW hfwnd,
FAR const struct nxgl_point_s *center,
nxgl_coord_t radius, nxgl_coord_t width,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
{
@@ -98,10 +99,14 @@ int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *cente
vector.pt1.x = pts[i].x;
vector.pt1.y = pts[i].y;
vector.pt2.x = pts[i+1].x;
vector.pt2.y = pts[i+1].y;
vector.pt2.x = pts[i + 1].x;
vector.pt2.y = pts[i + 1].y;
ret = nxtk_drawlinewindow(hfwnd, &vector, width, color, NX_LINECAP_PT1);
ret = nxtk_drawlinewindow(hfwnd,
&vector,
width,
color,
NX_LINECAP_PT1);
if (ret != OK)
{
return ret;
+6 -5
View File
@@ -172,7 +172,7 @@ int nxtk_drawframe(FAR struct nxtk_framedwindow_s *fwnd,
#endif
#endif
/* Draw left and right outer edges *****************************************/
/* Draw left and right outer edges ****************************************/
/* Draw the shiny left out edge */
@@ -192,7 +192,7 @@ int nxtk_drawframe(FAR struct nxtk_framedwindow_s *fwnd,
nxtk_drawframeside(fwnd, &frame, bounds, g_bordercolor2);
#endif
/* Draw left and right central regions *************************************/
/* Draw left and right central regions ************************************/
#if CONFIG_NXTK_BORDERWIDTH > 2
frame.pt1.x = 1;
@@ -217,7 +217,8 @@ int nxtk_drawframe(FAR struct nxtk_framedwindow_s *fwnd,
nxtk_drawframeside(fwnd, &frame, bounds, g_bordercolor1);
#endif
/* Draw left and right inner sides *****************************************/
/* Draw left and right inner sides ****************************************/
/* This segment stops at the bottom of the toolbar. If there is a
* tool bar, then we have to continue this to the top of the display
* using g_bordercolor1 (see below)
@@ -248,8 +249,8 @@ int nxtk_drawframe(FAR struct nxtk_framedwindow_s *fwnd,
#endif
#endif
/* Fix up the little line-seqments at the top inner edges that need to match
* the color of the toolbar.
/* Fix up the little line-seqments at the top inner edges that need to
* match the color of the toolbar.
*/
#if CONFIG_NXTK_BORDERWIDTH > 1
+9 -5
View File
@@ -58,10 +58,11 @@
*
****************************************************************************/
int nxtk_drawlinetoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector,
nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES],
int nxtk_drawlinetoolbar(NXTKWINDOW hfwnd,
FAR struct nxgl_vector_s *vector,
nxgl_coord_t width,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES],
uint8_t caps)
{
struct nxgl_trapezoid_s trap[3];
struct nxgl_rect_s rect;
@@ -80,7 +81,8 @@ int nxtk_drawlinetoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector,
ret = nxgl_splitline(vector, trap, &rect, width);
switch (ret)
{
/* 0: Line successfully broken up into three trapezoids. Values in
/* 0: Line successfully broken up into three trapezoids.
* Values in
* traps[0], traps[1], and traps[2] are valid.
*/
@@ -119,7 +121,9 @@ int nxtk_drawlinetoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector,
return ERROR;
}
/* Draw circular caps at each end of the line to support better line joins */
/* Draw circular caps at each end of the line to support better line
* joins
*/
if (caps != NX_LINECAP_NONE && width >= 3)
{
+7 -4
View File
@@ -57,10 +57,11 @@
*
****************************************************************************/
int nxtk_drawlinewindow(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector,
nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES],
int nxtk_drawlinewindow(NXTKWINDOW hfwnd,
FAR struct nxgl_vector_s *vector,
nxgl_coord_t width,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES],
uint8_t caps)
{
struct nxgl_trapezoid_s trap[3];
struct nxgl_rect_s rect;
@@ -118,7 +119,9 @@ int nxtk_drawlinewindow(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector,
return ERROR;
}
/* Draw circular caps at each end of the line to support better line joins */
/* Draw circular caps at each end of the line to support better line
* joins
*/
if (caps != NX_LINECAP_NONE && width >= 3)
{
+25 -16
View File
@@ -97,9 +97,10 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
DEBUGASSERT(fwnd->fwcb != NULL);
if (fwnd->fwcb->redraw)
{
/* Clip the redraw rectangle so that it lies within the client sub-window
* bounds and move the rectangle to that it is relative to the client
* sub-window (i.e., (0,0) is the top left corner of the client sub-window).
/* Clip the redraw rectangle so that it lies within the client
* sub-window bounds and move the rectangle to that it is relative to
* the client sub-window
* (i.e., (0,0) is the top left corner of the client sub-window).
*/
nxtk_containerclip(fwnd, &intersection, rect, &fwnd->fwrect);
@@ -110,7 +111,8 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
if (!nxgl_nullrect(&intersection))
{
fwnd->fwcb->redraw((NXTKWINDOW)fwnd, &intersection, false, fwnd->fwarg);
fwnd->fwcb->redraw((NXTKWINDOW)fwnd,
&intersection, false, fwnd->fwarg);
}
}
@@ -120,9 +122,10 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
if (fwnd->tbcb && fwnd->tbcb->redraw)
{
/* Clip the redraw rectangle so that it lies within the toolbar sub-window
* bounds and move the rectangle to that it is relative to the toolbar
* sub-window (i.e., (0,0) is the top left corner of the client sub-window).
/* Clip the redraw rectangle so that it lies within the toolbar
* sub-window bounds and move the rectangle to that it is relative to
* the toolbar sub-window
* (i.e., (0,0) is the top left corner of the client sub-window).
*/
nxtk_containerclip(fwnd, &intersection, rect, &fwnd->tbrect);
@@ -133,7 +136,8 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
if (!nxgl_nullrect(&intersection))
{
fwnd->tbcb->redraw((NXTKWINDOW)fwnd, &intersection, false, fwnd->tbarg);
fwnd->tbcb->redraw((NXTKWINDOW)fwnd,
&intersection, false, fwnd->tbarg);
}
}
@@ -151,7 +155,8 @@ static void nxtk_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size,
FAR const struct nxgl_rect_s *bounds,
FAR void *arg)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hwnd;
struct nxgl_size_s subwindowsize;
ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n",
@@ -189,16 +194,18 @@ static void nxtk_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size,
static void nxtk_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
uint8_t buttons, FAR void *arg)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hwnd;
struct nxgl_point_s abspos;
struct nxgl_point_s relpos;
/* Raise the window to the top if any mouse button was pressed or if auto-raise
* is configured. Do this before reporting the mouse event (because processing
* of the mouse event could change the ordering again).
/* Raise the window to the top if any mouse button was pressed or if
* auto-raise is configured. Do this before reporting the mouse event
* (because processing of the mouse event could change the ordering again).
*/
/* REVISIT: This does not work correctly. In a scenario where (1) there are
/* REVISIT:
* This does not work correctly. In a scenario where (1) there are
* multiple queued touchscreen events and (2) the result of the first input
* was to switch windows, then this autoraise implementation will cause the
* window to revert to the previous window. Not good behavior.
@@ -298,7 +305,8 @@ static void nxtk_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
static void nxtk_kbdin(NXWINDOW hwnd, uint8_t nch, const uint8_t *ch,
FAR void *arg)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hwnd;
/* Only the client window gets keyboard input */
@@ -316,7 +324,8 @@ static void nxtk_kbdin(NXWINDOW hwnd, uint8_t nch, const uint8_t *ch,
static void nxtk_event(NXWINDOW hwnd, enum nx_event_e event,
FAR void *arg1, FAR void *arg2)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hwnd;
/* Forward the event to the window client */
+2 -1
View File
@@ -58,7 +58,8 @@
*
****************************************************************************/
int nxtk_fillcircletoolbar(NXWINDOW hfwnd, FAR const struct nxgl_point_s *center,
int nxtk_fillcircletoolbar(NXWINDOW hfwnd,
FAR const struct nxgl_point_s *center,
nxgl_coord_t radius,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
{
+2 -1
View File
@@ -58,7 +58,8 @@
*
****************************************************************************/
int nxtk_fillcirclewindow(NXWINDOW hfwnd, FAR const struct nxgl_point_s *center,
int nxtk_fillcirclewindow(NXWINDOW hfwnd,
FAR const struct nxgl_point_s *center,
nxgl_coord_t radius,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
{
+4 -2
View File
@@ -41,7 +41,8 @@
* Name: nxtk_filltoolbar
*
* Description:
* Fill the specified rectangle in the client window with the specified color
* Fill the specified rectangle in the client window with the specified
* color
*
* Input Parameters:
* hfwnd - The handle returned by nxtk_openwindow
@@ -56,7 +57,8 @@
int nxtk_filltoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_rect_s fillrect;
#ifdef CONFIG_DEBUG_FEATURES
+2 -1
View File
@@ -57,7 +57,8 @@ int nxtk_filltraptoolbar(NXTKWINDOW hfwnd,
FAR const struct nxgl_trapezoid_s *trap,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_rect_s relclip;
#ifdef CONFIG_DEBUG_FEATURES
+4 -2
View File
@@ -41,7 +41,8 @@
* Name: nxtk_filltrapwindow
*
* Description:
* Fill the specified rectangle in the client window with the specified color
* Fill the specified rectangle in the client window with the specified
* color
*
* Input Parameters:
* hfwnd - The window handle returned by nxtk_openwindow
@@ -57,7 +58,8 @@ int nxtk_filltrapwindow(NXTKWINDOW hfwnd,
FAR const struct nxgl_trapezoid_s *trap,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_rect_s relclip;
struct nxgl_trapezoid_s reltrap;
+4 -2
View File
@@ -41,7 +41,8 @@
* Name: nxtk_fillwindow
*
* Description:
* Fill the specified rectangle in the client window with the specified color
* Fill the specified rectangle in the client window with the specified
* color
*
* Input Parameters:
* hfwnd - The window handle returned by nxtk_openwindow
@@ -56,7 +57,8 @@
int nxtk_fillwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_rect_s fillrect;
#ifdef CONFIG_DEBUG_FEATURES
+2 -1
View File
@@ -62,7 +62,8 @@ int nxtk_gettoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_rect_s getrect;
#ifdef CONFIG_DEBUG_FEATURES
+2 -1
View File
@@ -62,7 +62,8 @@ int nxtk_getwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_rect_s getrect;
#ifdef CONFIG_DEBUG_FEATURES
+4 -2
View File
@@ -60,7 +60,8 @@
int nxtk_movetoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
FAR const struct nxgl_point_s *offset)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_rect_s srcrect;
struct nxgl_point_s clipoffset;
@@ -76,7 +77,8 @@ int nxtk_movetoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
* toolbar sub-window
*/
nxtk_subwindowmove(fwnd, &srcrect, &clipoffset, rect, offset, &fwnd->tbrect);
nxtk_subwindowmove(fwnd, &srcrect, &clipoffset,
rect, offset, &fwnd->tbrect);
/* Then move it within the toolbar window */
+4 -2
View File
@@ -59,7 +59,8 @@
int nxtk_movewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
FAR const struct nxgl_point_s *offset)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_rect_s srcrect;
struct nxgl_point_s clipoffset;
@@ -75,7 +76,8 @@ int nxtk_movewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
* client sub-window
*/
nxtk_subwindowmove(fwnd, &srcrect, &clipoffset, rect, offset, &fwnd->fwrect);
nxtk_subwindowmove(fwnd, &srcrect, &clipoffset,
rect, offset, &fwnd->fwrect);
/* Then move it within the client window */
+5 -2
View File
@@ -56,11 +56,14 @@
int nxtk_setposition(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *pos)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_point_s offset;
struct nxgl_point_s newpos;
/* Calculate the offset that is requested and add that to the window origin. */
/* Calculate the offset that is requested and add that to the window
* origin.
*/
nxgl_vectsubtract(&offset, pos, &fwnd->fwrect.pt1);
nxgl_vectoradd(&newpos, &offset, &fwnd->wnd.bounds.pt1);
+1 -1
View File
@@ -84,7 +84,7 @@ void nxtk_setsubwindows(FAR struct nxtk_framedwindow_s *fwnd)
if (fullheight > 2 * CONFIG_NXTK_BORDERWIDTH)
{
/* Yes.. get the height of the toolbar */
/* Yes.. get the height of the toolbar */
tbheight = fwnd->tbheight;
if (tbheight >= fullheight - bdrheight)
+5 -3
View File
@@ -74,9 +74,11 @@ void nxtk_subwindowclip(FAR struct nxtk_framedwindow_s *fwnd,
nxgl_rectintersect(&tmp, &tmp, bounds);
/* Then move the rectangle so that is relative to the containing window, not the
* client subwindow
/* Then move the rectangle so that is relative to the containing window,
* not the client subwindow
*/
nxgl_rectoffset(dest, &tmp, -fwnd->wnd.bounds.pt1.x, -fwnd->wnd.bounds.pt1.y);
nxgl_rectoffset(dest, &tmp,
-fwnd->wnd.bounds.pt1.x,
-fwnd->wnd.bounds.pt1.y);
}
+5 -3
View File
@@ -45,7 +45,8 @@
*
* Input Parameters:
* fwnd - The framed window within which the move is to be done.
* This must have been previously created by nxtk_openwindow().
* This must have been previously created by
* nxtk_openwindow().
* destrect - The loccation to receive the clipped rectangle relative
* to containing window
* destoffset - The location to received the clipped offset.
@@ -76,7 +77,9 @@ void nxtk_subwindowmove(FAR struct nxtk_framedwindow_s *fwnd,
nxgl_rectintersect(&abssrc, &abssrc, &fwnd->fwrect);
/* Clip the source rectangle so that destination area is within the window. */
/* Clip the source rectangle so that destination area is within the
* window.
*/
destoffset->x = srcoffset->x;
if (destoffset->x < 0)
@@ -104,7 +107,6 @@ void nxtk_subwindowmove(FAR struct nxtk_framedwindow_s *fwnd,
abssrc.pt2.y = bounds->pt2.y - destoffset->y;
}
/* Then move the rectangle so that is relative to the containing window,
* not the client subwindow
*/
+5 -2
View File
@@ -59,11 +59,14 @@
int nxtk_toolbarbounds(NXTKWINDOW hfwnd, FAR struct nxgl_rect_s *bounds)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
FAR struct nxtk_framedwindow_s *fwnd =
(FAR struct nxtk_framedwindow_s *)hfwnd;
DEBUGASSERT(hfwnd && bounds);
/* Offset the rectangle by subtracting the current position of the window. */
/* Offset the rectangle by subtracting the current position of the
* window.
*/
nxgl_rectoffset(bounds, &fwnd->tbrect,
-fwnd->wnd.bounds.pt1.x, -fwnd->wnd.bounds.pt1.y);