libs/libnx/nxmu/nx_eventhandler.c: Appease nxstyle

This commit is contained in:
YAMAMOTO Takashi 2020-11-20 20:52:59 +09:00 committed by Xiang Xiao
parent 6d8ccccbb0
commit efe8e24fe7

View file

@ -144,8 +144,9 @@ int nx_eventhandler(NXHANDLE handle)
{ {
if (errcode == EAGAIN) if (errcode == EAGAIN)
{ {
/* EAGAIN is not an error. It occurs because the MQ is opened with /* EAGAIN is not an error. It occurs because the MQ is
* O_NONBLOCK and there is no message available now. * opened with O_NONBLOCK and there is no message
* available now.
*/ */
return OK; return OK;
@ -180,24 +181,28 @@ int nx_eventhandler(NXHANDLE handle)
case NX_CLIMSG_REDRAW: case NX_CLIMSG_REDRAW:
{ {
FAR struct nxclimsg_redraw_s *redraw = (FAR struct nxclimsg_redraw_s *)buffer; FAR struct nxclimsg_redraw_s *redraw =
(FAR struct nxclimsg_redraw_s *)buffer;
wnd = redraw->wnd; wnd = redraw->wnd;
DEBUGASSERT(wnd); DEBUGASSERT(wnd);
if (wnd->cb->redraw) if (wnd->cb->redraw)
{ {
wnd->cb->redraw((NXWINDOW)wnd, &redraw->rect, redraw->more, wnd->arg); wnd->cb->redraw((NXWINDOW)wnd, &redraw->rect, redraw->more,
wnd->arg);
} }
} }
break; break;
case NX_CLIMSG_NEWPOSITION: case NX_CLIMSG_NEWPOSITION:
{ {
FAR struct nxclimsg_newposition_s *postn = (FAR struct nxclimsg_newposition_s *)buffer; FAR struct nxclimsg_newposition_s *postn =
(FAR struct nxclimsg_newposition_s *)buffer;
wnd = postn->wnd; wnd = postn->wnd;
DEBUGASSERT(wnd); DEBUGASSERT(wnd);
if (wnd->cb->position) if (wnd->cb->position)
{ {
wnd->cb->position((NXWINDOW)wnd, &postn->size, &postn->pos, &postn->bounds, wnd->arg); wnd->cb->position((NXWINDOW)wnd, &postn->size, &postn->pos,
&postn->bounds, wnd->arg);
} }
} }
break; break;
@ -205,12 +210,14 @@ int nx_eventhandler(NXHANDLE handle)
#ifdef CONFIG_NX_XYINPUT #ifdef CONFIG_NX_XYINPUT
case NX_CLIMSG_MOUSEIN: case NX_CLIMSG_MOUSEIN:
{ {
FAR struct nxclimsg_mousein_s *mouse = (FAR struct nxclimsg_mousein_s *)buffer; FAR struct nxclimsg_mousein_s *mouse =
(FAR struct nxclimsg_mousein_s *)buffer;
wnd = mouse->wnd; wnd = mouse->wnd;
DEBUGASSERT(wnd); DEBUGASSERT(wnd);
if (wnd->cb->mousein) if (wnd->cb->mousein)
{ {
wnd->cb->mousein((NXWINDOW)wnd, &mouse->pos, mouse->buttons, wnd->arg); wnd->cb->mousein((NXWINDOW)wnd, &mouse->pos, mouse->buttons,
wnd->arg);
} }
} }
break; break;
@ -219,7 +226,8 @@ int nx_eventhandler(NXHANDLE handle)
#ifdef CONFIG_NX_KBD #ifdef CONFIG_NX_KBD
case NX_CLIMSG_KBDIN: case NX_CLIMSG_KBDIN:
{ {
FAR struct nxclimsg_kbdin_s *kbd = (FAR struct nxclimsg_kbdin_s *)buffer; FAR struct nxclimsg_kbdin_s *kbd =
(FAR struct nxclimsg_kbdin_s *)buffer;
wnd = kbd->wnd; wnd = kbd->wnd;
DEBUGASSERT(wnd); DEBUGASSERT(wnd);
if (wnd->cb->kbdin) if (wnd->cb->kbdin)
@ -232,12 +240,14 @@ int nx_eventhandler(NXHANDLE handle)
case NX_CLIMSG_EVENT: case NX_CLIMSG_EVENT:
{ {
FAR struct nxclimsg_event_s *event = (FAR struct nxclimsg_event_s *)buffer; FAR struct nxclimsg_event_s *event =
(FAR struct nxclimsg_event_s *)buffer;
wnd = event->wnd; wnd = event->wnd;
DEBUGASSERT(wnd); DEBUGASSERT(wnd);
if (wnd->cb->event) if (wnd->cb->event)
{ {
wnd->cb->event((NXWINDOW)wnd, event->event, wnd->arg, event->arg); wnd->cb->event((NXWINDOW)wnd, event->event, wnd->arg,
event->arg);
} }
} }
break; break;