terminal: remove global video object

We used to have a global video object for each terminal. However, this has
all been moved to the UI subsystem which can deal with multiple video
objects simultaneously. Hence, we can remove this as it is no longer used.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-08-11 14:01:04 +02:00
parent bed915dfb6
commit 11a4b6c887
3 changed files with 2 additions and 8 deletions

View File

@ -58,7 +58,6 @@ struct screen {
struct kmscon_terminal {
unsigned long ref;
struct ev_eloop *eloop;
struct uterm_video *video;
struct uterm_input *input;
bool opened;
@ -319,13 +318,12 @@ static void write_event(struct kmscon_vte *vte, const char *u8, size_t len,
int kmscon_terminal_new(struct kmscon_terminal **out,
struct ev_eloop *loop,
struct uterm_video *video,
struct uterm_input *input)
{
struct kmscon_terminal *term;
int ret;
if (!out || !loop || !video || !input)
if (!out || !loop || !input)
return -EINVAL;
term = malloc(sizeof(*term));
@ -335,7 +333,6 @@ int kmscon_terminal_new(struct kmscon_terminal **out,
memset(term, 0, sizeof(*term));
term->ref = 1;
term->eloop = loop;
term->video = video;
term->input = input;
kmscon_dlist_init(&term->screens);
@ -356,7 +353,6 @@ int kmscon_terminal_new(struct kmscon_terminal **out,
goto err_pty;
ev_eloop_ref(term->eloop);
uterm_video_ref(term->video);
uterm_input_ref(term->input);
*out = term;
@ -400,7 +396,6 @@ void kmscon_terminal_unref(struct kmscon_terminal *term)
if (term->redraw)
ev_eloop_unregister_idle_cb(term->eloop, draw_all, term);
uterm_input_unref(term->input);
uterm_video_unref(term->video);
ev_eloop_unref(term->eloop);
free(term);
}

View File

@ -52,7 +52,6 @@ typedef void (*kmscon_terminal_event_cb)
int kmscon_terminal_new(struct kmscon_terminal **out,
struct ev_eloop *loop,
struct uterm_video *video,
struct uterm_input *input);
void kmscon_terminal_ref(struct kmscon_terminal *term);
void kmscon_terminal_unref(struct kmscon_terminal *term);

View File

@ -182,7 +182,7 @@ int kmscon_ui_new(struct kmscon_ui **out,
ui->input = input;
kmscon_dlist_init(&ui->video_list);
ret = kmscon_terminal_new(&ui->term, eloop, video, ui->input);
ret = kmscon_terminal_new(&ui->term, eloop, ui->input);
if (ret)
goto err_free;