From ed6a78372c4c7dde448e92d21f74f3defee35fed Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 1 Dec 2008 13:26:23 +0000 Subject: Add nx_constructwindow git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1367 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/graphics/nxsu/nxfe.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'nuttx/graphics/nxsu/nxfe.h') diff --git a/nuttx/graphics/nxsu/nxfe.h b/nuttx/graphics/nxsu/nxfe.h index f0cc076a7..7fd65f2f3 100644 --- a/nuttx/graphics/nxsu/nxfe.h +++ b/nuttx/graphics/nxsu/nxfe.h @@ -94,6 +94,39 @@ EXTERN const struct nx_callback_s g_bkgdcb; * Public Functions ****************************************************************************/ +/**************************************************************************** + * Name: nxfe_constructwindow + * + * Description: + * This function is the same a nx_openwindow EXCEPT that the client provides + * the window structure instance. nx_constructwindow will initialize the + * the pre-allocated window structure for use by NX. This function is + * provided in addition to nx_open window in order to support a kind of + * inheritance: The caller's window structure may include extensions that + * are not visible to NX. + * + * NOTE: wnd must have been allocated using malloc() (or related allocators) + * Once provided to nxfe_constructwindow() that memory is owned and managed + * by NX. On certain error conditions or when the window is closed, NX will + * free() the the window. + * + * Input Parameters: + * handle - The handle returned by nx_connect + * wnd - The pre-allocated window structure. + * cb - Callbacks used to process window events + * arg - User provided value that will be returned with NX callbacks. + * + * Return: + * OK on success; ERROR on failure with errno set appropriately. In the + * case of ERROR, NX will have dealloated the pre-allocated window. + * + ****************************************************************************/ + +EXTERN int nxfe_constructwindow(NXHANDLE handle, + FAR struct nxbe_window_s *wnd, + FAR const struct nx_callback_s *cb, + FAR void *arg); + /**************************************************************************** * Name: nxfe_redrawreq * -- cgit v1.2.3