From 60c083385feda8f5632803aa4792fc79062ae0ab Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 3 Dec 2008 00:28:08 +0000 Subject: [PATCH] For consistency, all close function return int git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1398 42af7a65-404d-4744-a932-0658087f49c3 --- graphics/nxtk/nxtk_closetoolbar.c | 5 +++-- graphics/nxtk/nxtk_closewindow.c | 7 +++---- include/nuttx/nxtk.h | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/graphics/nxtk/nxtk_closetoolbar.c b/graphics/nxtk/nxtk_closetoolbar.c index 22decf804d7..2cd44dfc324 100644 --- a/graphics/nxtk/nxtk_closetoolbar.c +++ b/graphics/nxtk/nxtk_closetoolbar.c @@ -84,11 +84,11 @@ * htb - The toolbar handle returned by nxtk_opentoolbar * * Return: - * None + * OK on success; ERROR on failure with errno set appropriately * ****************************************************************************/ -void nxtk_closetoolbar(NXTKTOOLBAR htb) +int nxtk_closetoolbar(NXTKTOOLBAR htb) { FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)htb; @@ -107,5 +107,6 @@ void nxtk_closetoolbar(NXTKTOOLBAR htb) */ nxfe_redrawreq(&fwnd->wnd, &fwnd->wnd.bounds); + return OK; } diff --git a/graphics/nxtk/nxtk_closewindow.c b/graphics/nxtk/nxtk_closewindow.c index e97c3fccf63..edc9e457d3d 100644 --- a/graphics/nxtk/nxtk_closewindow.c +++ b/graphics/nxtk/nxtk_closewindow.c @@ -84,13 +84,12 @@ * hfwnd - The handle returned by nxtk_openwindow * * Return: - * Success: A non-NULL handle used with subsequent NXTK window accesses - * Failure: NULL is returned and errno is set appropriately + * OK on success; ERROR on failure with errno set appropriately * ****************************************************************************/ -void nxtk_closewindow(NXTKWINDOW hfwnd) +int nxtk_closewindow(NXTKWINDOW hfwnd) { - nx_closewindow((NXWINDOW)hfwnd); + return nx_closewindow((NXWINDOW)hfwnd); } diff --git a/include/nuttx/nxtk.h b/include/nuttx/nxtk.h index c8e81a1408d..4a6d9d5cdd3 100644 --- a/include/nuttx/nxtk.h +++ b/include/nuttx/nxtk.h @@ -108,12 +108,11 @@ EXTERN NXTKWINDOW nxtk_openwindow(NXHANDLE handle, * hfwnd - The handle returned by nxtk_openwindow * * Return: - * Success: A non-NULL handle used with subsequent NXTK window accesses - * Failure: NULL is returned and errno is set appropriately + * OK on success; ERROR on failure with errno set appropriately * ****************************************************************************/ -EXTERN void nxtk_closewindow(NXTKWINDOW hfwnd); +EXTERN int nxtk_closewindow(NXTKWINDOW hfwnd); /**************************************************************************** * Name: nxtk_getposition @@ -309,11 +308,11 @@ EXTERN NXTKTOOLBAR nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height, * htb - The toolbar handle returned by nxtk_opentoolbar * * Return: - * None + * OK on success; ERROR on failure with errno set appropriately * ****************************************************************************/ -EXTERN void nxtk_closetoolbar(NXTKTOOLBAR htb); +EXTERN int nxtk_closetoolbar(NXTKTOOLBAR htb); /**************************************************************************** * Name: nxtk_filltoolbar