|
NXWidgets
1.19
|
#include <ccallback.hxx>

Public Member Functions | |
| CCallback (CWidgetControl *widgetControl) | |
| ~CCallback (void) | |
| FAR struct nx_callback_s * | getCallbackVTable (void) |
| void | setNxTerm (NXTERM handle) |
Static Private Member Functions | |
| static void | redraw (NXHANDLE hwnd, FAR const struct nxgl_rect_s *rect, bool bMore, FAR void *arg) |
| static void | position (NXHANDLE hwnd, FAR const struct nxgl_size_s *size, FAR const struct nxgl_point_s *pos, FAR const struct nxgl_rect_s *bounds, FAR void *arg) |
| static void | newMouseEvent (NXHANDLE hwnd, FAR const struct nxgl_point_s *pos, uint8_t buttons, FAR void *arg) |
| static void | newKeyboardEvent (NXHANDLE hwnd, uint8_t nCh, FAR const uint8_t *str, FAR void *arg) |
| static void | windowBlocked (NXWINDOW hwnd, FAR void *arg1, FAR void *arg2) |
Private Attributes | |
| CWidgetControl * | m_widgetControl |
| struct nx_callback_s | m_callbacks |
| NXTERM | m_nxterm |
Callback function proxies. This class receives and dispatches callbacks from the NX server. This calls also manages a few lower-level details such as keeping track of the reported window handles and window positions and sizes.
There are three instances that represent an NX window from the perspective of NXWidgets.
There a various kinds of of window instances, but each inherits (1) CCallback and dispatches the Windows callbacks and (2) INxWindow that describes the common window behavior.
Definition at line 91 of file ccallback.hxx.
| CCallback::CCallback | ( | CWidgetControl * | widgetControl | ) |
Constructor.
| widgetControl | Control object associated with this window |
Definition at line 70 of file ccallback.cxx.
|
inline |
Destructor.
Definition at line 226 of file ccallback.hxx.
|
inline |
Get the callback vtable. This is neeed only by the window instance that inherits this class. The window instance needs the C-callable vtable in order to create the NX window. Once the window is created, this class will begin to receive callbacks via the C-callable vtable methods.
Definition at line 239 of file ccallback.hxx.
|
staticprivate |
New keyboard/keypad data is available for the window. The new keyboard data is handled by CWidgetControl::newKeyboardEvent.
NOTE: This method runs in the context of the NX callback which may either be the context of the NX event listener thread (if multi- user NX), or possibly in the connects of device driver or even a device driver interrupt.
The GUI thread is probably sleeping a semaphore, waiting to be awakened by a mouse or keyboard event.
| hwnd | Handle to a specific NX window. |
| nCh | The number of characters that are available in str[]. |
| str | The array of characters. |
| arg | User provided argument (see nx_openwindow, nx_requestbg, nxtk_openwindow, or nxtk_opentoolbar). |
New keyboard/keypad data is available for the window. The new keyboard data is handled by CWidgetControl::newKeyboardEvent.
| hwnd | Handle to a specific NX window. |
| nCh | The number of characters that are available in str[]. |
| str | The array of characters. |
| arg | User provided argument (see nx_openwindow, nx_requestbg, nxtk_openwindow, or nxtk_opentoolbar). |
Definition at line 198 of file ccallback.cxx.
|
staticprivate |
New mouse data is available for the window. The new mouse data is handled by CWidgetControl::newMouseEvent.
NOTE: This method runs in the context of the NX callback which may either be the context of the NX event listener thread (if multi- user NX), or possibly in the connects of device driver or even a device driver interrupt.
The GUI thread is probably sleeping a semaphore, waiting to be awakened by a mouse or keyboard event.
| hwnd | Handle to a specific NX window. |
| pos | The (x,y) position of the mouse. |
| buttons | See NX_MOUSE_* definitions. |
| arg | User provided argument (see nx_openwindow, nx_requestbg, nxtk_openwindow, or nxtk_opentoolbar). |
New mouse data is available for the window. The new mouse data is handled by CWidgetControl::newMouseEvent.
| hwnd | Handle to a specific NX window. |
| pos | The (x,y) position of the mouse. |
| buttons | See NX_MOUSE_* definitions. |
| arg | User provided argument (see nx_openwindow, nx_requestbg, nxtk_openwindow, or nxtk_opentoolbar). |
Definition at line 169 of file ccallback.cxx.
|
staticprivate |
Position Callback. The new positional data is handled by CWidgetControl::geometryEvent.
NOTE: This method runs in the context of the NX callback which may either be the context of the owning thread or, in the case of multi- user NX, the context of the NX event listener thread.
| hwnd | Handle to a specific NX window. |
| size | The size of the window. |
| pos | The position of the upper left hand corner of the window on the overall display. |
| bounds | The bounding rectangle that describes the entire display. |
| arg | User provided argument (see nx_openwindow, nx_requestbg, nxtk_openwindow, or nxtk_opentoolbar). |
Position Callback. The new positional data is handled by CWidgetControl::geometryEvent.
| hwnd | Handle to a specific NX window. |
| size | The size of the window. |
| pos | The position of the upper left hand corner of the window on the overall display. |
| bounds | The bounding rectangle that describes the entire display. |
| arg | User provided argument (see nx_openwindow, nx_requestbg, nxtk_openwindow, or nxtk_opentoolbar). |
Definition at line 137 of file ccallback.cxx.
|
staticprivate |
Re-Draw Callback. The redraw event is handled by CWidgetControl::redrawEvent.
NOTE: This method runs in the context of the NX callback which may either be the context of the owning thread or, in the case of multi- user NX, the context of the NX event listener thread.
| hwnd | Handle to a specific NX window. |
| rect | The rectangle that needs to be re-drawn (in window relative coordinates). |
| bMore | true: More re-draw requests will follow. |
| arg | User provided argument (see nx_openwindow, nx_requestbg, nxtk_openwindow, or nxtk_opentoolbar). |
ReDraw Callback. The redraw action is handled by CWidgetControl:redrawEvent.
| hwnd | Handle to a specific NX window. |
| rect | The rectangle that needs to be re-drawn (in window relative coordinates). |
| bMore | true: More re-draw requests will follow. |
| arg | User provided argument (see nx_openwindow, nx_requestbg, nxtk_openwindow, or nxtk_opentoolbar). |
Definition at line 106 of file ccallback.cxx.
|
inline |
By default, NX keyboard input is given to the various widgets residing in the window. But NxTerm is a different usage model; In this case, keyboard input needs to be directed to the NxTerm character driver. This method can be used to enable (or disable) redirection of NX keyboard input from the window widgets to the NxTerm
| handle. | The NXTERM handle. If non-NULL, NX keyboard input will be directed to the NxTerm driver using this handle; If NULL (the default), NX keyboard input will be directed to the widgets within the window. |
Definition at line 259 of file ccallback.hxx.
|
staticprivate |
This callback is the response from nx_block (or nxtk_block). Those blocking interfaces are used to assure that no further messages are directed to the window. Receipt of the blocked callback signifies that (1) there are no further pending callbacks and (2) that the window is now 'defunct' and will receive no further callbacks.
This callback supports coordinated destruction of a window in multi- user mode. In multi-use mode, the client window logic must stay intact until all of the queued callbacks are processed. Then the window may be safely closed. Closing the window prior with pending callbacks can lead to bad behavior when the callback is executed.
| hwnd. | Window handle of the blocked window |
| arg1. | User provided argument (see nx_openwindow, nx_requestbkgd, nxtk_openwindow, or nxtk_opentoolbar) |
| arg2 | - User provided argument (see nx_block or nxtk_block) |
This callback is the response from nx_block (or nxtk_block). Those blocking interfaces are used to assure that no further messages are directed to the window. Receipt of the blocked callback signifies that (1) there are no further pending callbacks and (2) that the window is now 'defunct' and will receive no further callbacks.
This callback supports coordinated destruction of a window in multi- user mode. In multi-use more, the client window logic must stay intact until all of the queued callbacks are processed. Then the window may be safely closed. Closing the window prior with pending callbacks can lead to bad behavior when the callback is executed.
| hwnd. | Window handle of the blocked window |
| arg1. | User provided argument (see nx_openwindow, nx_requestbkgd, nxtk_openwindow, or nxtk_opentoolbar) |
| arg2 | - User provided argument (see nx_block or nxtk_block) |
Definition at line 249 of file ccallback.cxx.
|
private |
C-callable vtable of callback function pointers
Definition at line 95 of file ccallback.hxx.
|
private |
The NxTerm handle for redirection of keyboard input
Definition at line 97 of file ccallback.hxx.
|
private |
The widget control instance for this window
Definition at line 94 of file ccallback.hxx.
1.8.13