mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
Removed superfluous toolbar handle
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1412 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user