summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxmu
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-12-02 20:02:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-12-02 20:02:59 +0000
commitaebaefc303f12beb92c4da219411bdb00aa4e03c (patch)
tree770fd1403c0aaf22a23220a4f95f689de9f8cf70 /nuttx/graphics/nxmu
parent124c331605b174afc08f7ef498209952b4a1dbc5 (diff)
downloadpx4-nuttx-aebaefc303f12beb92c4da219411bdb00aa4e03c.tar.gz
px4-nuttx-aebaefc303f12beb92c4da219411bdb00aa4e03c.tar.bz2
px4-nuttx-aebaefc303f12beb92c4da219411bdb00aa4e03c.zip
Don't keep sizes in rectangles
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1392 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxmu')
-rw-r--r--nuttx/graphics/nxmu/nx_setsize.c9
-rw-r--r--nuttx/graphics/nxmu/nxfe.h4
-rw-r--r--nuttx/graphics/nxmu/nxmu_reportposition.c12
-rw-r--r--nuttx/graphics/nxmu/nxmu_server.c2
4 files changed, 13 insertions, 14 deletions
diff --git a/nuttx/graphics/nxmu/nx_setsize.c b/nuttx/graphics/nxmu/nx_setsize.c
index eeff5969e..36169a222 100644
--- a/nuttx/graphics/nxmu/nx_setsize.c
+++ b/nuttx/graphics/nxmu/nx_setsize.c
@@ -85,7 +85,7 @@
*
****************************************************************************/
-int nx_setsize(NXWINDOW hwnd, FAR struct nxgl_rect_s *size)
+int nx_setsize(NXWINDOW hwnd, FAR struct nxgl_size_s *size)
{
FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd;
struct nxsvrmsg_setsize_s outmsg;
@@ -101,9 +101,10 @@ int nx_setsize(NXWINDOW hwnd, FAR struct nxgl_rect_s *size)
/* Then inform the server of the changed position */
- outmsg.msgid = NX_SVRMSG_SETSIZE;
- outmsg.wnd = wnd;
- nxgl_rectcopy(&outmsg.size, size);
+ outmsg.msgid = NX_SVRMSG_SETSIZE;
+ outmsg.wnd = wnd;
+ outmsg.size.w = size->w;
+ outmsg.size.h = size->h;
ret = mq_send(wnd->conn->cwrmq, &outmsg, sizeof(struct nxsvrmsg_setsize_s), NX_SVRMSG_PRIO);
if (ret < 0)
diff --git a/nuttx/graphics/nxmu/nxfe.h b/nuttx/graphics/nxmu/nxfe.h
index d5cf3279c..e036bf675 100644
--- a/nuttx/graphics/nxmu/nxfe.h
+++ b/nuttx/graphics/nxmu/nxfe.h
@@ -217,7 +217,7 @@ struct nxclimsg_newposition_s
{
uint32 msgid; /* NX_CLIMSG_NEWPOSITION */
FAR struct nxbe_window_s *wnd; /* The window whose position/size has changed */
- FAR struct nxgl_rect_s size; /* The current window size */
+ FAR struct nxgl_size_s size; /* The current window size */
FAR struct nxgl_point_s pos; /* The current window position */
FAR struct nxgl_rect_s bounds; /* Size of screen */
};
@@ -307,7 +307,7 @@ struct nxsvrmsg_setsize_s
{
uint32 msgid; /* NX_SVRMSG_SETSIZE */
FAR struct nxbe_window_s *wnd; /* The window whose position/size has changed */
- FAR struct nxgl_rect_s size; /* The new window size */
+ FAR struct nxgl_size_s size; /* The new window size */
};
/* This message informs the server that the size or position of the window has changed */
diff --git a/nuttx/graphics/nxmu/nxmu_reportposition.c b/nuttx/graphics/nxmu/nxmu_reportposition.c
index ed72ca52f..7f8ebb3b7 100644
--- a/nuttx/graphics/nxmu/nxmu_reportposition.c
+++ b/nuttx/graphics/nxmu/nxmu_reportposition.c
@@ -86,14 +86,12 @@ void nxfe_reportposition(FAR struct nxbe_window_s *wnd)
/* Send the size/position info */
- outmsg.msgid = NX_CLIMSG_NEWPOSITION;
- outmsg.wnd = wnd;
- outmsg.pos.x = wnd->origin.x;
- outmsg.pos.y = wnd->origin.y;
+ outmsg.msgid = NX_CLIMSG_NEWPOSITION;
+ outmsg.wnd = wnd;
+ outmsg.pos.x = wnd->origin.x;
+ outmsg.pos.y = wnd->origin.y;
- /* Convert the window bounding box to a window-relative rectangle */
-
- nxgl_rectoffset(&outmsg.size, &wnd->bounds, -wnd->origin.x, -wnd->origin.y);
+ nxgl_rectsize(&outmsg.size, &wnd->bounds);
/* Provide the background window bounding box which is the screen limits
* It must always have (0,0) as its origin
diff --git a/nuttx/graphics/nxmu/nxmu_server.c b/nuttx/graphics/nxmu/nxmu_server.c
index 113eafe2c..5a592eec7 100644
--- a/nuttx/graphics/nxmu/nxmu_server.c
+++ b/nuttx/graphics/nxmu/nxmu_server.c
@@ -430,7 +430,7 @@ int nx_runinstance(FAR const char *mqname, FAR struct fb_vtable_s *fb)
case NX_SVRMSG_LOWER: /* Lower the window to the bottom of the display */
{
FAR struct nxsvrmsg_lower_s *lowermsg = (FAR struct nxsvrmsg_lower_s *)buffer;
- nxbe_raise(lowermsg->wnd);
+ nxbe_lower(lowermsg->wnd);
}
break;