summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-scr.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-05-17 10:02:41 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-05-21 15:29:43 +0800
commita610837ff38f5cc80bcbad465a80ab920e67927d (patch)
tree3e157da8508053daef1d400e8dfa3ec7c48e9f56 /ui/ncurses/nc-scr.h
parent3461b6ad5cb90f1448360d0eb04dd661ae477610 (diff)
downloadtalos-petitboot-a610837ff38f5cc80bcbad465a80ab920e67927d.tar.gz
talos-petitboot-a610837ff38f5cc80bcbad465a80ab920e67927d.zip
ui/ncurses: move getch() out of process_key callbacks
All process_key callbacks will want to query the key that was pressed, so do the getch() once in cui_process_key, and pass the result to the callback. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui/ncurses/nc-scr.h')
-rw-r--r--ui/ncurses/nc-scr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/ncurses/nc-scr.h b/ui/ncurses/nc-scr.h
index 0658dd0..f18753a 100644
--- a/ui/ncurses/nc-scr.h
+++ b/ui/ncurses/nc-scr.h
@@ -75,13 +75,13 @@ struct nc_scr {
void *ui_ctx;
int (*post)(struct nc_scr *scr);
int (*unpost)(struct nc_scr *scr);
- void (*process_key)(struct nc_scr *scr);
+ void (*process_key)(struct nc_scr *scr, int key);
void (*resize)(struct nc_scr *scr);
};
int nc_scr_init(struct nc_scr *scr, enum pb_nc_sig sig, int begin_x,
void *ui_ctx,
- void (*process_key)(struct nc_scr *),
+ void (*process_key)(struct nc_scr *, int),
int (*post)(struct nc_scr *),
int (*unpost)(struct nc_scr *),
void (*resize)(struct nc_scr *));
OpenPOWER on IntegriCloud