mirror of
https://git.planet-casio.com/Lephenixnoir/JustUI.git
synced 2024-12-28 04:23:40 +01:00
jscene: merge JSCENE_KEY with JWIDGET_KEY
Since both propagate anyway, there's no reason to separate them.
This commit is contained in:
parent
6f6af63ec3
commit
6ca607ae37
3 changed files with 5 additions and 5 deletions
|
@ -41,7 +41,7 @@ typedef struct {
|
|||
|
||||
/* Event details or data */
|
||||
union {
|
||||
/* Downward JWIDGET_KEY event or upwards JSCENE_KEY */
|
||||
/* JWIDGET_KEY events */
|
||||
key_event_t key;
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ typedef struct {
|
|||
/* Events */
|
||||
extern uint16_t JSCENE_NONE;
|
||||
extern uint16_t JSCENE_PAINT;
|
||||
extern uint16_t JSCENE_KEY;
|
||||
extern uint16_t JSCENE_KEY; /* Deprecated, merged with JWIDGET_KEY */
|
||||
|
||||
/* jscene_create(): Create a new scene at that specified screen position */
|
||||
jscene *jscene_create(int x, int y, int w, int h, void *parent);
|
||||
|
@ -104,7 +104,7 @@ bool jscene_process_event(jscene *scene, jevent event);
|
|||
scene.
|
||||
|
||||
If a scene event occurs, returns it. If a key event occurs, an event of type
|
||||
JSCENE_KEY is return and its .key attribute contains the details of the
|
||||
JWIDGET_KEY is return and its .key attribute contains the details of the
|
||||
forwarded keyboard event. */
|
||||
jevent jscene_run(jscene *scene);
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ jevent jscene_run(jscene *s)
|
|||
}
|
||||
#endif
|
||||
if(k.type != KEYEV_NONE && !jscene_process_key_event(s, k)) {
|
||||
e.type = JSCENE_KEY;
|
||||
e.type = JWIDGET_KEY;
|
||||
e.key = k;
|
||||
break;
|
||||
}
|
||||
|
@ -225,5 +225,5 @@ static void j_register_jscene(void)
|
|||
jscene_type_id = j_register_widget(&type_jscene, "jwidget");
|
||||
JSCENE_NONE = j_register_event();
|
||||
JSCENE_PAINT = j_register_event();
|
||||
JSCENE_KEY = j_register_event();
|
||||
JSCENE_KEY = JWIDGET_KEY;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue