consoled-workspace.c revision 2eec67acbb00593e414549a7e5b35eb7dd776b1b
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2014 David Herrmann <dh.herrmann@gmail.com>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
#include <stdlib.h>
#include "consoled.h"
#include "grdev.h"
#include "idev.h"
#include "list.h"
#include "macro.h"
#include "util.h"
int r;
if (!w)
return -ENOMEM;
w->ref = 1;
w->manager = m;
r = terminal_new(&w->current, w);
if (r < 0)
return r;
*out = w;
w = NULL;
return 0;
}
static void workspace_cleanup(Workspace *w) {
Terminal *t;
assert(w);
assert(!w->session_list);
while ((t = w->terminal_list))
terminal_free(t);
free(w);
}
assert(w);
++w->ref;
return w;
}
if (!w)
return NULL;
if (--w->ref == 0)
return NULL;
}
assert(w);
assert(s);
return workspace_ref(w);
}
assert(w);
assert(s);
return workspace_unref(w);
}
void workspace_refresh(Workspace *w) {
Terminal *t;
Session *s;
Display *d;
assert(w);
width = 0;
height = 0;
/* find out minimum dimension of all attached displays */
}
}
/* either both are zero, or none is zero */
/* update terminal-sizes if dimensions changed */
terminal_resize(t);
workspace_dirty(w);
}
}
void workspace_dirty(Workspace *w) {
Session *s;
assert(w);
session_dirty(s);
}
assert(w);
}
assert(w);
}