Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TouchScreenGUIDemo
Events/Event.h
- Committer:
- duncanFrance
- Date:
- 2016-03-25
- Revision:
- 0:0a590815d51c
- Child:
- 12:63db16fea709
File content as of revision 0:0a590815d51c:
#ifndef SIMPLEGUI_EVENT_H
#define SIMPLEGUI_EVENT_H
#include "mbed.h"
typedef struct Event {
// It would be nice to use e.g. classes to represent events. But getting class information
// out of a C++ class at runtime takes gymnastics which I can't be bothered with
// Instead it's up to YOU the user of this library to ensure that your event types
// are drawn from a central list so that they can be properly distinguished. Sorry.
uint8_t type;
// This should probably be some kind of union to cope with the different kinds of event we expect to handle
// For now I'm going to explicitly assume events relate to something on-screen
int screenX;
int screenY;
} Event;
#endif