2 winnie - an experimental window system
4 Copyright (C) 2013 Eleni Maria Stea
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 Author: Eleni Maria Stea <elene.mst@gmail.com>
29 static Subsys *subsys;
33 if(!init_shared_memory()) {
37 if(!(subsys = (Subsys*)sh_malloc(sizeof *subsys))) {
45 if(!init_window_manager()) {
49 if(!init_keyboard()) {
61 wm->invalidate_region(get_screen_size());
65 void winnie_shutdown()
71 destroy_window_manager();
75 destroy_shared_memory();
78 long winnie_get_time()
80 static struct timeval init_tv;
85 if(!tv.tv_sec && !tv.tv_usec) {
90 return (tv.tv_usec - init_tv.tv_usec) / 1000 + (tv.tv_sec - init_tv.tv_sec) * 1000;