#include <stdbool.h>
#include <mcp/syscalls.h>
#include "a2560k.h"
Go to the source code of this file.
|
|
EventRecord * | Event_New (void) |
| | Allocate an EventManager object.
|
| |
|
EventManager * | EventManager_New (void) |
| | Allocate an EventManager object.
|
| |
|
void | EventManager_RemoveEventsForWindow (Window *the_window) |
| | Nulls out any events associated with the window pointer passed Call this when a window has been closed, to ensure that there are not future events that will try to recall the window after it is destroyed.
|
| |
|
EventRecord * | EventManager_NextEvent (void) |
| | Checks to see if there is an event in the queue returns NULL if no event (not the same as returning an event of type nullEvent)
|
| |
| void | EventManager_AddMouseEvent (event_kind the_what) |
| | Add a new mouse event to the event queue NOTE: this does not actually insert a new record, as the event queue is a circular buffer It overwrites whatever slot is next in line This is designed to be called from mouse IRQ, with minimimal information available. More...
|
| |
| void | EventManager_AddWindowEvent (event_kind the_what, int16_t x, int16_t y, int16_t width, int16_t height, Window *the_window, Control *the_control) |
| | Add a new window event to the event queue NOTE: this does not actually insert a new record, as the event queue is a circular buffer It overwrites whatever slot is next in line. More...
|
| |
| void | EventManager_AddMenuEvent (event_kind the_what, int16_t menu_selection, int16_t x, int16_t y, Window *the_window) |
| | Add a new menu event to the event queue NOTE: this does not actually insert a new record, as the event queue is a circular buffer It overwrites whatever slot is next in line. More...
|
| |
|
void | EventManager_WaitForEvent (void) |
| | Wait for an event to happen, do system-processing of it, then if appropriate, give the window responsible for the event a chance to do something with it.
|
| |
◆ EventManager_AddMenuEvent()
| void EventManager_AddMenuEvent |
( |
event_kind |
the_what, |
|
|
int16_t |
menu_selection, |
|
|
int16_t |
x, |
|
|
int16_t |
y, |
|
|
Window * |
the_window |
|
) |
| |
Add a new menu event to the event queue NOTE: this does not actually insert a new record, as the event queue is a circular buffer It overwrites whatever slot is next in line.
- Parameters
-
| the_what | – specifies the type of event to add to the queue. only menu events such as menuOpened are supported |
| menu_selection | – the ID of the specific menu item that was under the mouse at the time of the event. If no menu item is relevant (e.g, for an open menu event no menu was open so no menu item could have been selected, pass -1. |
| x | – Global horizontal coordinate associated with the event. e.g., where the mouse was clicked, etc. |
| y | – Global vertical coordinate associated with the event |
| the_window | – the window that was the active window at the time of the event |
◆ EventManager_AddMouseEvent()
| void EventManager_AddMouseEvent |
( |
event_kind |
the_what | ) |
|
Add a new mouse event to the event queue NOTE: this does not actually insert a new record, as the event queue is a circular buffer It overwrites whatever slot is next in line This is designed to be called from mouse IRQ, with minimimal information available.
- Parameters
-
| the_what | – specifies the type of event to add to the queue. only mouseDown/up/moved events supported The function will query VICKY for x,y and determine if the mouse is over a window, a control, etc.
|
◆ EventManager_AddWindowEvent()
| void EventManager_AddWindowEvent |
( |
event_kind |
the_what, |
|
|
int16_t |
x, |
|
|
int16_t |
y, |
|
|
int16_t |
width, |
|
|
int16_t |
height, |
|
|
Window * |
the_window, |
|
|
Control * |
the_control |
|
) |
| |
Add a new window event to the event queue NOTE: this does not actually insert a new record, as the event queue is a circular buffer It overwrites whatever slot is next in line.
- Parameters
-
| the_what | – specifies the type of event to add to the queue. only window events such as windowChanged are supported |
| x | – Global horizontal coordinate associated with the event. e.g., where the mouse was clicked, etc. |
| y | – Global vertical coordinate associated with the event |
| width | – If the window size was changed, the new width in pixels |
| height | – If the window size was changed, the new height in pixels |
| the_window | – a valid window object for the window where the event originated |
| the_control | – for controlclick type events, a valid control object |