summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-12-01 13:22:34 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-12-01 13:22:34 +0000
commitad2faab27444c4f2e24e5bcde65898036a86767b (patch)
tree532459fbfda124d5b0b781ba52a3900cdf215231 /nuttx/include
parentfb34a4488c575b10b465ef59cd72a568079330ce (diff)
downloadpx4-nuttx-ad2faab27444c4f2e24e5bcde65898036a86767b.tar.gz
px4-nuttx-ad2faab27444c4f2e24e5bcde65898036a86767b.tar.bz2
px4-nuttx-ad2faab27444c4f2e24e5bcde65898036a86767b.zip
Add argument to window callbacks
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1366 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/nx.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/nuttx/include/nuttx/nx.h b/nuttx/include/nuttx/nx.h
index 9f7b52dd8..12d13491d 100644
--- a/nuttx/include/nuttx/nx.h
+++ b/nuttx/include/nuttx/nx.h
@@ -101,13 +101,15 @@ struct nx_callback_s
* rect - The rectangle that needs to be re-drawn (in window relative
* coordinates
* more - TRUE: More re-draw requests will follow
+ * arg - User provided argument (see nx_openwindow, nx_constructwindow)
*
* Returned Value:
* None
*
**************************************************************************/
- void (*redraw)(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, boolean more);
+ void (*redraw)(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
+ boolean more, FAR void *arg);
/**************************************************************************
* Name: position
@@ -123,6 +125,7 @@ struct nx_callback_s
* the overalll display
* bounds - The bounding rectangle that the describes the entire
* display
+ * arg - User provided argument (see nx_openwindow, nx_constructwindow)
*
* Returned Value:
* None
@@ -131,7 +134,8 @@ struct nx_callback_s
void (*position)(NXWINDOW hwnd, FAR const struct nxgl_rect_s *size,
FAR const struct nxgl_point_s *pos,
- FAR const struct nxgl_rect_s *bounds);
+ FAR const struct nxgl_rect_s *bounds,
+ FAR void *arg);
/**************************************************************************
* Name: mousein
@@ -143,6 +147,7 @@ struct nx_callback_s
* hwnd - Window handle
* pos - The (x,y) position of the mouse
* buttons - See NX_MOUSE_* definitions
+ * arg - User provided argument (see nx_openwindow, nx_constructwindow)
*
* Returned Value:
* None
@@ -150,7 +155,8 @@ struct nx_callback_s
**************************************************************************/
#ifdef CONFIG_NX_MOUSE
- void (*mousein)(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, ubyte buttons);
+ void (*mousein)(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
+ ubyte buttons, FAR void *arg);
#endif
/**************************************************************************
@@ -163,6 +169,7 @@ struct nx_callback_s
* hwnd - Window handle
* nch - The number of characters that are available in ch[]
* ch - The array of characters
+ * arg - User provided argument (see nx_openwindow, nx_constructwindow)
*
* Returned Value:
* None
@@ -170,7 +177,7 @@ struct nx_callback_s
**************************************************************************/
#ifdef CONFIG_NX_KBD
- void (*kbdin)(NXWINDOW hwnd, ubyte nch, const ubyte *ch);
+ void (*kbdin)(NXWINDOW hwnd, ubyte nch, const ubyte *ch, FAR void *arg);
#endif
};
@@ -390,6 +397,7 @@ EXTERN int nx_eventnotify(NXHANDLE handle, int signo);
* Input Parameters:
* handle - The handle returned by nx_connect
* cb - Callbacks used to process window events
+ * arg - User provided value that will be returned with NX callbacks.
*
* Return:
* Success: A non-NULL handle used with subsequent NX accesses
@@ -398,7 +406,8 @@ EXTERN int nx_eventnotify(NXHANDLE handle, int signo);
****************************************************************************/
EXTERN NXWINDOW nx_openwindow(NXHANDLE handle,
- FAR const struct nx_callback_s *cb);
+ FAR const struct nx_callback_s *cb,
+ FAR void *arg);
/****************************************************************************
* Name: nx_closewindow