diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2013-02-08 16:14:48 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@googlemail.com> | 2013-02-08 16:14:48 +0100 |
commit | 577a9b4c41e6d0b8ee6a281877e5366be96803d6 (patch) | |
tree | e0c772fd006e7e67dcb2a4a7dc61e359f6dd02a1 /src/tsm_screen.c | |
parent | 36f9d2d0b1bcc66572ddba0241558f2ca176897c (diff) |
llog: add "data" parameter to pass context
If we allow users to specify log functions, we should also allow them to
pass a context. This isn't used internally, but may be needed by external
users so provide it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'src/tsm_screen.c')
-rw-r--r-- | src/tsm_screen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tsm_screen.c b/src/tsm_screen.c index 6b5d9a9..ebc8982 100644 --- a/src/tsm_screen.c +++ b/src/tsm_screen.c @@ -69,6 +69,7 @@ struct selection_pos { struct tsm_screen { size_t ref; llog_submit_t llog; + void *llog_data; unsigned int opts; unsigned int flags; struct shl_timer *timer; @@ -438,7 +439,7 @@ static inline unsigned int to_abs_y(struct tsm_screen *con, unsigned int y) } SHL_EXPORT -int tsm_screen_new(struct tsm_screen **out, tsm_log_t log) +int tsm_screen_new(struct tsm_screen **out, tsm_log_t log, void *log_data) { struct tsm_screen *con; int ret; @@ -454,6 +455,7 @@ int tsm_screen_new(struct tsm_screen **out, tsm_log_t log) memset(con, 0, sizeof(*con)); con->ref = 1; con->llog = log; + con->llog_data = log_data; con->def_attr.fr = 255; con->def_attr.fg = 255; con->def_attr.fb = 255; |