diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-12-04 12:57:22 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-12-04 12:57:22 +0000 |
commit | 05d31bd06816565ec8af26885ecaa26851851e18 (patch) | |
tree | e9267ad7e7f24d444cb8c8fd290e24e6c1f88c99 /nuttx/graphics | |
parent | 01fab0c78eeef5461a896847f05caec51d26050f (diff) | |
download | px4-nuttx-05d31bd06816565ec8af26885ecaa26851851e18.tar.gz px4-nuttx-05d31bd06816565ec8af26885ecaa26851851e18.tar.bz2 px4-nuttx-05d31bd06816565ec8af26885ecaa26851851e18.zip |
Removed superfluous toolbar handle
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1412 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics')
-rw-r--r-- | nuttx/graphics/nxtk/nxtk_bitmaptoolbar.c | 10 | ||||
-rw-r--r-- | nuttx/graphics/nxtk/nxtk_closetoolbar.c | 6 | ||||
-rw-r--r-- | nuttx/graphics/nxtk/nxtk_filltoolbar.c | 10 | ||||
-rw-r--r-- | nuttx/graphics/nxtk/nxtk_filltraptoolbar.c | 10 | ||||
-rw-r--r-- | nuttx/graphics/nxtk/nxtk_movetoolbar.c | 13 | ||||
-rw-r--r-- | nuttx/graphics/nxtk/nxtk_opentoolbar.c | 13 |
6 files changed, 31 insertions, 31 deletions
diff --git a/nuttx/graphics/nxtk/nxtk_bitmaptoolbar.c b/nuttx/graphics/nxtk/nxtk_bitmaptoolbar.c index 6b5769e88..dde83d9ef 100644 --- a/nuttx/graphics/nxtk/nxtk_bitmaptoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_bitmaptoolbar.c @@ -80,7 +80,7 @@ * specified toolbar sub-window. * * Input Parameters: - * htb - The toolbar sub-window that will receive the bitmap image + * hfwnd - The sub-window twhose toolbar will receive the bitmap image * dest - Describes the rectangular region on in the toolbar sub-window * will receive the bit map. * src - The start of the source image. @@ -94,15 +94,15 @@ * ****************************************************************************/ -int nxtk_bitmaptoolbar(NXTKWINDOW htb, FAR const struct nxgl_rect_s *dest, +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 struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)htb; + FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s clipdest; #ifdef CONFIG_DEBUG - if (!htb || !dest || !src || !origin) + if (!hfwnd || !dest || !src || !origin) { errno = EINVAL; return ERROR; @@ -118,6 +118,6 @@ int nxtk_bitmaptoolbar(NXTKWINDOW htb, FAR const struct nxgl_rect_s *dest, /* Then copy the bitmap */ - nx_bitmap((NXWINDOW)htb, &clipdest, src, origin, stride); + nx_bitmap((NXWINDOW)hfwnd, &clipdest, src, origin, stride); return OK; } diff --git a/nuttx/graphics/nxtk/nxtk_closetoolbar.c b/nuttx/graphics/nxtk/nxtk_closetoolbar.c index 2cd44dfc3..e7557aeba 100644 --- a/nuttx/graphics/nxtk/nxtk_closetoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_closetoolbar.c @@ -81,16 +81,16 @@ * Create a tool bar at the top of the specified framed window * * Input Parameters: - * htb - The toolbar handle returned by nxtk_opentoolbar + * hfwnd - The handle returned by nxtk_openwindow * * Return: * OK on success; ERROR on failure with errno set appropriately * ****************************************************************************/ -int nxtk_closetoolbar(NXTKTOOLBAR htb) +int nxtk_closetoolbar(NXTKWINDOW hfwnd) { - FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)htb; + FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; /* Un-initialize the toolbar info */ diff --git a/nuttx/graphics/nxtk/nxtk_filltoolbar.c b/nuttx/graphics/nxtk/nxtk_filltoolbar.c index 73760be24..946cfd076 100644 --- a/nuttx/graphics/nxtk/nxtk_filltoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_filltoolbar.c @@ -81,7 +81,7 @@ * Fill the specified rectangle in the client window with the specified color * * Input Parameters: - * htb - The toolbar handle returned by nxtk_opentoolbar + * hfwnd - The handle returned by nxtk_openwindow * rect - The location within the toolbar window to be filled * color - The color to use in the fill * @@ -90,14 +90,14 @@ * ****************************************************************************/ -int nxtk_filltoolbar(NXTKTOOLBAR htb, FAR const struct nxgl_rect_s *rect, +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 *)htb; + FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s fillrect; #ifdef CONFIG_DEBUG - if (!htb || !rect || !color) + if (!hfwnd || !rect || !color) { errno = EINVAL; return ERROR; @@ -113,5 +113,5 @@ int nxtk_filltoolbar(NXTKTOOLBAR htb, FAR const struct nxgl_rect_s *rect, /* Then fill it */ - return nx_fill((NXWINDOW)htb, &fillrect, color); + return nx_fill((NXWINDOW)hfwnd, &fillrect, color); } diff --git a/nuttx/graphics/nxtk/nxtk_filltraptoolbar.c b/nuttx/graphics/nxtk/nxtk_filltraptoolbar.c index 526dfec8f..03e9c749c 100644 --- a/nuttx/graphics/nxtk/nxtk_filltraptoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_filltraptoolbar.c @@ -81,7 +81,7 @@ * Fill the specified rectangle in the toolbar with the specified color * * Input Parameters: - * htb - The window handle returned by nxtk_openwindow + * hfwnd - The handle returned by nxtk_openwindow * trap - The trapezoidal region to be filled * color - The color to use in the fill * @@ -90,14 +90,14 @@ * ****************************************************************************/ -int nxtk_filltraptoolbar(NXTKTOOLBAR htb, FAR const struct nxgl_trapezoid_s *trap, +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 *)htb; + FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s relclip; #ifdef CONFIG_DEBUG - if (!htb || !trap || !color) + if (!hfwnd || !trap || !color) { errno = EINVAL; return ERROR; @@ -107,5 +107,5 @@ int nxtk_filltraptoolbar(NXTKTOOLBAR htb, FAR const struct nxgl_trapezoid_s *tra /* Perform the fill, clipping to the client window */ nxgl_rectoffset(&relclip, &fwnd->tbrect, -fwnd->wnd.bounds.pt1.x, -fwnd->wnd.bounds.pt1.y); - return nx_filltrapezoid((NXWINDOW)htb, &relclip, trap, color); + return nx_filltrapezoid((NXWINDOW)hfwnd, &relclip, trap, color); } diff --git a/nuttx/graphics/nxtk/nxtk_movetoolbar.c b/nuttx/graphics/nxtk/nxtk_movetoolbar.c index 78a20b54e..6e464c375 100644 --- a/nuttx/graphics/nxtk/nxtk_movetoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_movetoolbar.c @@ -81,8 +81,9 @@ * Move a rectangular region within the toolbar sub-window of a framed window * * Input Parameters: - * htb - The toolbar sub-window within which the move is to be done. - * This must have been previously created by nxtk_openwindow(). + * hfwnd - The sub-window containing the toolbar within which the move is + * to be done. This must have been previously created by + * nxtk_openwindow(). * rect - Describes the rectangular region relative to the toolbar * sub-window to move * offset - The offset to move the region @@ -92,15 +93,15 @@ * ****************************************************************************/ -int nxtk_movetoolbar(NXTKTOOLBAR htb, FAR const struct nxgl_rect_s *rect, +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 *)htb; + FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s srcrect; struct nxgl_point_s clipoffset; #ifdef CONFIG_DEBUG - if (!htb || !rect || !offset) + if (!hfwnd || !rect || !offset) { errno = EINVAL; return ERROR; @@ -115,5 +116,5 @@ int nxtk_movetoolbar(NXTKTOOLBAR htb, FAR const struct nxgl_rect_s *rect, /* Then move it within the toolbar window */ - return nx_move((NXTKTOOLBAR)htb, &srcrect, &clipoffset); + return nx_move((NXWINDOW)hfwnd, &srcrect, &clipoffset); } diff --git a/nuttx/graphics/nxtk/nxtk_opentoolbar.c b/nuttx/graphics/nxtk/nxtk_opentoolbar.c index 315e72a5a..64525b766 100644 --- a/nuttx/graphics/nxtk/nxtk_opentoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_opentoolbar.c @@ -87,14 +87,13 @@ * arg - User provided value that will be returned with toolbar callbacks. * * Return: - * Success: A non-NULL handle used with subsequent NXTK toolbar accesses - * Failure: NULL is returned and errno is set appropriately + * OK on success; ERROR on failure with errno set appropriately * ****************************************************************************/ -NXTKTOOLBAR nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height, - FAR const struct nx_callback_s *cb, - FAR void *arg) +int nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height, + FAR const struct nx_callback_s *cb, + FAR void *arg) { FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; @@ -102,7 +101,7 @@ NXTKTOOLBAR nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height, if (!hfwnd || !cb) { errno = EINVAL; - return NULL; + return ERROR; } #endif @@ -124,6 +123,6 @@ NXTKTOOLBAR nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height, /* Return the initialized toolbar reference */ - return (NXTKTOOLBAR)fwnd; + return OK; } |