diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-01-06 05:46:39 -0500 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-01-06 05:46:39 -0500 |
commit | a0e4658f80dc4d64db4dbe0ae3d6b191cc9ccf8e (patch) | |
tree | 20039f0ce36ac639617111ea7b8620349af3844e | |
parent | 906913017f569363bed0657458f285a93c062221 (diff) |
clean
-rw-r--r-- | libwinnie/src/fbdev/event.cc | 137 | ||||
-rw-r--r-- | libwinnie/src/fbdev/gfx.cc | 231 | ||||
-rw-r--r-- | libwinnie/src/fbdev/keyboard.cc | 150 | ||||
-rw-r--r-- | libwinnie/src/fbdev/mouse.cc | 212 | ||||
-rw-r--r-- | libwinnie/src/gfx.cc | 2 | ||||
-rw-r--r-- | libwinnie/src/sdl/event.cc | 6 | ||||
-rw-r--r-- | libwinnie/src/sdl/event.h (renamed from libwinnie/src/event.h) | 0 | ||||
-rw-r--r-- | libwinnie/src/sdl/gfx.cc | 2 | ||||
-rw-r--r-- | libwinnie/src/sdl/gfx.h (renamed from libwinnie/src/gfx.h) | 0 | ||||
-rw-r--r-- | libwinnie/src/sdl/keyboard.cc | 2 | ||||
-rw-r--r-- | libwinnie/src/sdl/keyboard.h (renamed from libwinnie/src/keyboard.h) | 0 | ||||
-rw-r--r-- | libwinnie/src/sdl/mouse.cc | 2 | ||||
-rw-r--r-- | libwinnie/src/sdl/mouse.h (renamed from libwinnie/src/mouse.h) | 0 | ||||
-rw-r--r-- | libwinnie/src/text.cc | 2 | ||||
-rw-r--r-- | libwinnie/src/window.cc | 2 | ||||
-rw-r--r-- | libwinnie/src/window.h | 2 | ||||
-rw-r--r-- | libwinnie/src/winnie.cc | 4 | ||||
-rw-r--r-- | libwinnie/src/winnie.h | 8 | ||||
-rw-r--r-- | libwinnie/src/wm.cc | 4 | ||||
-rw-r--r-- | winnie/plugins.conf | 2 |
20 files changed, 18 insertions, 750 deletions
diff --git a/libwinnie/src/fbdev/event.cc b/libwinnie/src/fbdev/event.cc deleted file mode 100644 index 18e363c..0000000 --- a/libwinnie/src/fbdev/event.cc +++ /dev/null @@ -1,137 +0,0 @@ -/* -winnie - an experimental window system - -Copyright (C) 2013 Eleni Maria Stea - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. - -Author: Eleni Maria Stea <elene.mst@gmail.com> -*/ - -#ifdef WINNIE_FBDEV -#include <list> -#include <stdio.h> - -#include <errno.h> -#include <unistd.h> -#include <sys/select.h> -#include <sys/time.h> - -#include "event.h" -#include "wm.h" -#include "keyboard.h" -#include "mouse.h" - -struct TimerEvent { - long time; - Window *win; - TimerMode mode; - long interval; - - bool operator <(const TimerEvent &rhs) const { return time < rhs.time; } -}; - -static std::list<TimerEvent> timers; - -void process_events() -{ - int keyb_fd = get_keyboard_fd(); - int mouse_fd = get_mouse_fd(); - - for(;;) { - wm->process_windows(); - - fd_set read_set; - - FD_ZERO(&read_set); - FD_SET(keyb_fd, &read_set); - FD_SET(mouse_fd, &read_set); - - int maxfd = keyb_fd > mouse_fd ? keyb_fd : mouse_fd; - - struct timeval *timeout = 0; - struct timeval tv; - if(!timers.empty()) { - long now = winnie_get_time(); - long next_timer = timers.front().time - now; - - tv.tv_sec = next_timer / 1000; - tv.tv_usec = next_timer % 1000; - timeout = &tv; - } - - int numfd; - while((numfd = select(maxfd + 1, &read_set, 0, 0, timeout)) == -1) { - if(errno != EINTR) { - break; - } - } - - if(numfd > 0) { - if(FD_ISSET(keyb_fd, &read_set)) { - process_keyboard_event(); - } - if(FD_ISSET(mouse_fd, &read_set)) { - process_mouse_event(); - } - } - - bool added_timer = false; - long now = winnie_get_time(); - while(!timers.empty() && now >= timers.front().time) { - TimerEvent ev = timers.front(); - timers.pop_front(); - - if(ev.mode == TIMER_REPEAT) { - ev.time = now + ev.interval; - timers.push_back(ev); - added_timer = true; - } - - Window *win = ev.win; - TimerFuncType func = win->get_timer_callback(); - if(func) { - func(win); - } else { - fprintf(stderr, "timer gone off but window has no timer callback\n"); - } - } - - if(added_timer) { - timers.sort(); - } - } -} - -void set_window_timer(Window *win, unsigned int msec, TimerMode mode) -{ - if(!win) { - fprintf(stderr, "set_window_timer null window\n"); - return; - } - if(!win->get_timer_callback()) { - fprintf(stderr, "trying to start a timer without having a timer callback\n"); - return; - } - - TimerEvent ev; - ev.interval = (long)msec; - ev.time = winnie_get_time() + ev.interval; - ev.win = win; - ev.mode = mode; - timers.push_back(ev); - timers.sort(); -} - -#endif // WINNIE_FBDEV diff --git a/libwinnie/src/fbdev/gfx.cc b/libwinnie/src/fbdev/gfx.cc deleted file mode 100644 index c5449ef..0000000 --- a/libwinnie/src/fbdev/gfx.cc +++ /dev/null @@ -1,231 +0,0 @@ -/* -winnie - an experimental window system - -Copyright (C) 2013 Eleni Maria Stea - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. - -Author: Eleni Maria Stea <elene.mst@gmail.com> -*/ - -#ifdef WINNIE_FBDEV -#include <errno.h> -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/mman.h> -#include <sys/time.h> -#include <unistd.h> - -#include <linux/fb.h> - -#include "gfx.h" -#include "shalloc.h" -#include "winnie.h" - -#define FRAMEBUFFER_SIZE(xsz, ysz, bpp) ((xsz) * (ysz) * (bpp) / CHAR_BIT) - -static unsigned char *framebuffer; -static int dev_fd; -static int rgb_order[3]; - -struct Graphics { - Rect screen_rect; - Rect clipping_rect; - int color_depth; - Pixmap *pixmap; -}; - -static Graphics *gfx; - -bool init_gfx() -{ - if(!(gfx = (Graphics*)sh_malloc(sizeof *gfx))) { - return false; - } - - get_subsys()->graphics_offset = (int)((char*)gfx - (char*)get_pool()); - - dev_fd = -1; - - if((dev_fd = open("/dev/fb0", O_RDWR)) == -1) { - fprintf(stderr, "Cannot open /dev/fb0 : %s\n", strerror(errno)); - return false; - } - - fb_var_screeninfo sinfo; - if(ioctl(dev_fd, FBIOGET_VSCREENINFO, &sinfo) == -1) { - close(dev_fd); - dev_fd = -1; - fprintf(stderr, "Unable to get screen info : %s\n", strerror(errno)); - return false; - } - - printf("width : %d height : %d\n : bpp : %d\n", sinfo.xres, sinfo.yres, sinfo.bits_per_pixel); - printf("virtual w: %d virtual h: %d\n", sinfo.xres_virtual, sinfo.yres_virtual); - - gfx->screen_rect.x = gfx->screen_rect.y = 0; - gfx->screen_rect.width = sinfo.xres_virtual; - gfx->screen_rect.height = sinfo.yres_virtual; - gfx->color_depth = sinfo.bits_per_pixel; - - rgb_order[0] = sinfo.red.offset / 8; - rgb_order[1] = sinfo.green.offset / 8; - rgb_order[2] = sinfo.blue.offset / 8; - - set_clipping_rect(gfx->screen_rect); - - int sz = FRAMEBUFFER_SIZE(gfx->screen_rect.width, gfx->screen_rect.height, gfx->color_depth); - framebuffer = (unsigned char*)mmap(0, sz, PROT_READ | PROT_WRITE, MAP_SHARED, dev_fd, 0); - - if(framebuffer == (void*)-1) { - close(dev_fd); - dev_fd = -1; - fprintf(stderr, "Cannot map the framebuffer to memory : %s\n", strerror(errno)); - return false; - } - -// TODO: uncomment when I find how to use intelfb instead of i915 GRRRR.- - fb_vblank vblank; - if(ioctl(dev_fd, FBIOGET_VBLANK, &vblank) == -1) { -// fprintf(stderr, "FBIOGET_VBLANK error: %s\n", strerror(errno)); - } -/* - else { - printf("flags: %x\n", vblank.flags); - printf("count: %d\n", vblank.count); - printf("beam position: %d, %d\n", vblank.hcount, vblank.vcount); - } -*/ - - if(!(gfx->pixmap = (Pixmap*)sh_malloc(sizeof(Pixmap)))) { - fprintf(stderr, "Failed to allocate pixmap.\n"); - return false; - } - - gfx->pixmap->width = gfx->screen_rect.width; - gfx->pixmap->height = gfx->screen_rect.height; - - int fbsize = gfx->pixmap->width * gfx->pixmap->height * gfx->color_depth / 8; - if(!(gfx->pixmap->pixels = (unsigned char*)sh_malloc(fbsize))) { - fprintf(stderr, "failed to allocate the pixmap framebuffer.\n"); - return false; - } - - return true; -} - -void destroy_gfx() -{ - clear_screen(0, 0, 0); - gfx_update(gfx->screen_rect); - - if(dev_fd != -1) { - close(dev_fd); - } - - dev_fd = -1; - - munmap(framebuffer, FRAMEBUFFER_SIZE(gfx->screen_rect.width, gfx->screen_rect.height, gfx->color_depth)); - framebuffer = 0; - - sh_free(gfx->pixmap->pixels); - gfx->pixmap->pixels = 0; - sh_free(gfx->pixmap); - sh_free(gfx); -} - -bool client_open_gfx(void *smem_start, int offset) -{ - gfx = (Graphics*)((unsigned char*)smem_start + offset); - return true; -} - -void client_close_gfx() -{ -} - -unsigned char *get_framebuffer() -{ - return gfx->pixmap->pixels; -} - -Pixmap *get_framebuffer_pixmap() -{ - return gfx->pixmap; -} - -Rect get_screen_size() -{ - return gfx->screen_rect; -} - -int get_color_depth() -{ - return gfx->color_depth; -} - -void set_clipping_rect(const Rect &rect) -{ - gfx->clipping_rect = rect_intersection(rect, get_screen_size()); -} - -const Rect &get_clipping_rect() -{ - return gfx->clipping_rect; -} - -void set_cursor_visibility(bool visible) -{ - fb_cursor curs; - curs.enable = visible ? 1 : 0; - - if(ioctl(dev_fd, FBIO_CURSOR, &curs) == -1) { - fprintf(stderr, "Cannot toggle cursor visibility : %s\n", strerror(errno)); - } -} - -void gfx_update(const Rect &upd_rect) -{ - Rect rect = rect_intersection(upd_rect, gfx->screen_rect); - unsigned char *sptr = gfx->pixmap->pixels + (rect.y * gfx->screen_rect.width + rect.x) * 4; - unsigned char *dptr = framebuffer + (rect.y * gfx->screen_rect.width + rect.x) * 4; - - for(int i=0; i<rect.height; i++) { - memcpy(dptr, sptr, rect.width * 4); - sptr += gfx->screen_rect.width * 4; - dptr += gfx->screen_rect.width * 4; - } -} - -void wait_vsync() -{ - unsigned long arg = 0; - if(ioctl(dev_fd, FBIO_WAITFORVSYNC, &arg) == -1) { -// printf("ioctl error %s\n", strerror(errno)); - } -} - -void get_rgb_order(int *r, int *g, int *b) -{ - *r = rgb_order[0]; - *g = rgb_order[1]; - *b = rgb_order[2]; -} - -#endif // WINNIE_FBDEV diff --git a/libwinnie/src/fbdev/keyboard.cc b/libwinnie/src/fbdev/keyboard.cc deleted file mode 100644 index 45f26e6..0000000 --- a/libwinnie/src/fbdev/keyboard.cc +++ /dev/null @@ -1,150 +0,0 @@ -/* -winnie - an experimental window system - -Copyright (C) 2013 Eleni Maria Stea - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. - -Author: Eleni Maria Stea <elene.mst@gmail.com> -*/ - -#ifdef WINNIE_FBDEV -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include <fcntl.h> -#include <sys/ioctl.h> -#include <termios.h> -#include <unistd.h> - -#include "keyboard.h" -#include "shalloc.h" -#include "window.h" -#include "winnie.h" -#include "wm.h" - -struct Keyboard { - int dev_fd; - enum {RAW, CANONICAL} ttystate; -}; - -static Keyboard *keyboard; - -bool init_keyboard() -{ - if(!(keyboard = (Keyboard*)sh_malloc(sizeof *keyboard))) { - return false; - } - - get_subsys()->keyboard_offset = (int)((char*)keyboard - (char*)get_pool()); - - keyboard->ttystate = keyboard->CANONICAL; - keyboard->dev_fd = -1; - - if((keyboard->dev_fd = open("/dev/tty", O_RDWR)) == -1) { - fprintf(stderr, "Cannot open /dev/tty : %s\n", strerror(errno)); - return false; - } - - struct termios buf; - - if(tcgetattr(keyboard->dev_fd, &buf) < 0) { - fprintf(stderr, "Cannot get the tty parameters : %s\n", strerror(errno)); - return false; - } - - buf.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); - buf.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); - buf.c_cflag &= ~(CSIZE | PARENB); - buf.c_cflag |= CS8; - buf.c_oflag &= ~(OPOST); - - if(tcsetattr(keyboard->dev_fd, TCSAFLUSH, &buf) < 0) { - return false; - } - - keyboard->ttystate = keyboard->RAW; - return true; -} - -void destroy_keyboard() -{ - struct termios buf; - - if(tcgetattr(keyboard->dev_fd, &buf) < 0) { - fprintf(stderr, "Cannot get the tty parameters : %s\n", strerror(errno)); - } - - buf.c_lflag |= (ECHO | ICANON | IEXTEN | ISIG); - buf.c_iflag |= (BRKINT | ICRNL | INPCK | ISTRIP | IXON); - buf.c_cflag |= (CSIZE | PARENB); - buf.c_cflag &= CS8; - buf.c_oflag |= (OPOST); - - if(tcsetattr(keyboard->dev_fd, TCSAFLUSH, &buf) < 0) { - fprintf(stderr, "Cannot set the tty parameters : %s\n", strerror(errno)); - } - - keyboard->ttystate = keyboard->CANONICAL; - - if(keyboard->dev_fd != -1) { - close(keyboard->dev_fd); - keyboard->dev_fd = -1; - } - - sh_free(keyboard); -} - -bool client_open_keyboard(void *smem_start, int offset) -{ - keyboard = (Keyboard*)((unsigned char*)smem_start + offset); - return true; -} - -void client_close_keyboard() -{ -} - -int get_keyboard_fd() -{ - return keyboard->dev_fd; -} - -void process_keyboard_event() -{ - char key; - if(read(keyboard->dev_fd, &key, 1) < 1) { - return; - } - - if(key == 'q') { - exit(0); - } - - Window *focused_win = wm->get_focused_window(); - if(focused_win) { - KeyboardFuncType keyb_callback = focused_win->get_keyboard_callback(); - if(keyb_callback) { - keyb_callback(focused_win, key, true); //TODO: true?? - } - } - - /* TODO: - * - handle system-wide key combinations (alt-tab?) - * - otherwise send keypress/release to focused window - */ -} -#endif // WINNIE_FBDEV diff --git a/libwinnie/src/fbdev/mouse.cc b/libwinnie/src/fbdev/mouse.cc deleted file mode 100644 index 5805879..0000000 --- a/libwinnie/src/fbdev/mouse.cc +++ /dev/null @@ -1,212 +0,0 @@ -/* -winnie - an experimental window system - -Copyright (C) 2013 Eleni Maria Stea - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. - -Author: Eleni Maria Stea <elene.mst@gmail.com> -*/ - -#ifdef WINNIE_FBDEV -#include <errno.h> -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include <fcntl.h> -#include <sys/ioctl.h> -#include <termios.h> -#include <unistd.h> - -#include "geom.h" -#include "gfx.h" -#include "mouse.h" -#include "shalloc.h" -#include "window.h" -#include "winnie.h" -#include "wm.h" - -#define BN_LEFT 1 -#define BN_RIGHT 2 -#define BN_MIDDLE 4 - -static int read_mouse(); - -struct Mouse { - int dev_fd; - Rect bounds; - int pointer_x; - int pointer_y; - int bnstate; -}; - -static Mouse *mouse; - -bool init_mouse() -{ - if(!(mouse = (Mouse*)sh_malloc(sizeof *mouse))) { - return false; - } - get_subsys()->mouse_offset = (int)((char*)mouse - (char*)get_pool()); - memset(mouse, 0, sizeof *mouse); - - mouse->dev_fd = -1; - - if((mouse->dev_fd = open("/dev/psaux", O_RDONLY | O_NONBLOCK)) == -1) { - fprintf(stderr, "Cannot open /dev/psaux : %s\n", strerror(errno)); - return false; - } - - set_mouse_bounds(get_screen_size()); - return true; -} - -void destroy_mouse() -{ - if(mouse->dev_fd != -1) { - close(mouse->dev_fd); - mouse->dev_fd = -1; - } - sh_free(mouse); -} - -bool client_open_mouse(void *smem_start, int offset) -{ - mouse = (Mouse*)((unsigned char*)smem_start + offset); - return true; -} - -void client_close_mouse() -{ -} - -void set_mouse_bounds(const Rect &rect) -{ - mouse->bounds = rect; -} - -int get_mouse_fd() -{ - return mouse->dev_fd; -} - -void process_mouse_event() -{ - /* TODO: - * - read all pending events from mouse fd (use O_NONBLOCK so that - * read will return -1 when there are no more events instead of blocking). - */ - - int prev_state = mouse->bnstate; - int prev_x = mouse->pointer_x; - int prev_y = mouse->pointer_y; - - if(read_mouse() == -1) { - return; - } - - Window *top; - if(!(top = wm->get_grab_window())) { - top = wm->get_window_at_pos(mouse->pointer_x, mouse->pointer_y); - if(top) { - wm->set_focused_window(top); - } - else { - wm->set_focused_window(0); - } - } - - /* - send each pointer move and button press/release to the topmost window - * with the pointer on it. - */ - - int dx = mouse->pointer_x - prev_x; - int dy = mouse->pointer_y - prev_y; - - if((dx || dy) && top) { - MouseMotionFuncType motion_callback = top->get_mouse_motion_callback(); - if(motion_callback) { - Rect rect = top->get_absolute_rect(); - motion_callback(top, mouse->pointer_x - rect.x, mouse->pointer_y - rect.y); - } - } - - MouseButtonFuncType button_callback; - if((mouse->bnstate != prev_state) && top && (button_callback = top->get_mouse_button_callback())) { - int num_bits = sizeof mouse->bnstate * CHAR_BIT; - for(int i=0; i<num_bits; i++) { - int s = (mouse->bnstate >> i) & 1; - int prev_s = (prev_state >> i) & 1; - if(s != prev_s) { - Rect rect = top->get_absolute_rect(); - button_callback(top, i, s, mouse->pointer_x - rect.x, mouse->pointer_y - rect.y); - } - } - } -} - -void get_pointer_pos(int *x, int *y) -{ - *x = mouse->pointer_x; - *y = mouse->pointer_y; -} - -int get_button_state() -{ - return mouse->bnstate; -} - -int get_button(int bn) -{ - if(bn < 0 || bn >= 3) { - return 0; - } - return (mouse->bnstate & (1 << bn)) != 0; -} - -static int read_mouse() -{ - int rd; - signed char state[3] = {0, 0, 0}; - - if((rd = read(mouse->dev_fd, state, 3)) == -1) { - fprintf(stderr, "Unable to get mouse state : %s\n", strerror(errno)); - return -1; - } - - mouse->bnstate = state[0] & 7; - mouse->pointer_x += state[1]; - mouse->pointer_y -= state[2]; - - if(mouse->pointer_x < mouse->bounds.x) { - mouse->pointer_x = mouse->bounds.x; - } - - if(mouse->pointer_y < mouse->bounds.y) { - mouse->pointer_y = mouse->bounds.y; - } - - if(mouse->pointer_x > mouse->bounds.x + mouse->bounds.width - 1) { - mouse->pointer_x = mouse->bounds.x + mouse->bounds.width - 1; - } - - if(mouse->pointer_y > mouse->bounds.y + mouse->bounds.height - 1) { - mouse->pointer_y = mouse->bounds.y + mouse->bounds.height - 1; - } - - return 0; -} -#endif // WINNIE_FBDEV diff --git a/libwinnie/src/gfx.cc b/libwinnie/src/gfx.cc index 212ed38..e35f080 100644 --- a/libwinnie/src/gfx.cc +++ b/libwinnie/src/gfx.cc @@ -24,7 +24,7 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #include <algorithm> #include "geom.h" -#include "gfx.h" +#include "sdl/gfx.h" // used by the polygon rasterizer #define MAX_SCANLINES 2048 diff --git a/libwinnie/src/sdl/event.cc b/libwinnie/src/sdl/event.cc index 889e153..5835704 100644 --- a/libwinnie/src/sdl/event.cc +++ b/libwinnie/src/sdl/event.cc @@ -23,9 +23,9 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #include <stdlib.h> #include <SDL/SDL.h> -#include "event.h" -#include "keyboard.h" -#include "mouse.h" +#include "sdl/event.h" +#include "sdl/keyboard.h" +#include "sdl/mouse.h" #include "wm.h" enum { diff --git a/libwinnie/src/event.h b/libwinnie/src/sdl/event.h index 5c1db45..5c1db45 100644 --- a/libwinnie/src/event.h +++ b/libwinnie/src/sdl/event.h diff --git a/libwinnie/src/sdl/gfx.cc b/libwinnie/src/sdl/gfx.cc index 9f31a4e..5671764 100644 --- a/libwinnie/src/sdl/gfx.cc +++ b/libwinnie/src/sdl/gfx.cc @@ -24,7 +24,7 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #include <stdlib.h> #include <SDL/SDL.h> -#include "gfx.h" +#include "sdl/gfx.h" #include "shalloc.h" #include "winnie.h" diff --git a/libwinnie/src/gfx.h b/libwinnie/src/sdl/gfx.h index cb1c7ef..cb1c7ef 100644 --- a/libwinnie/src/gfx.h +++ b/libwinnie/src/sdl/gfx.h diff --git a/libwinnie/src/sdl/keyboard.cc b/libwinnie/src/sdl/keyboard.cc index 042bbbb..b9241f4 100644 --- a/libwinnie/src/sdl/keyboard.cc +++ b/libwinnie/src/sdl/keyboard.cc @@ -22,7 +22,7 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #ifdef WINNIE_SDL #include <SDL/SDL.h> -#include "keyboard.h" +#include "sdl/keyboard.h" #include "window.h" #include "wm.h" diff --git a/libwinnie/src/keyboard.h b/libwinnie/src/sdl/keyboard.h index 4d55cba..4d55cba 100644 --- a/libwinnie/src/keyboard.h +++ b/libwinnie/src/sdl/keyboard.h diff --git a/libwinnie/src/sdl/mouse.cc b/libwinnie/src/sdl/mouse.cc index 9196a93..80f33fb 100644 --- a/libwinnie/src/sdl/mouse.cc +++ b/libwinnie/src/sdl/mouse.cc @@ -22,7 +22,7 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #ifdef WINNIE_SDL #include <SDL/SDL.h> -#include "mouse.h" +#include "sdl/mouse.h" #include "shalloc.h" #include "wm.h" #include "window.h" diff --git a/libwinnie/src/mouse.h b/libwinnie/src/sdl/mouse.h index 9e55496..9e55496 100644 --- a/libwinnie/src/mouse.h +++ b/libwinnie/src/sdl/mouse.h diff --git a/libwinnie/src/text.cc b/libwinnie/src/text.cc index 345a857..0abe6ac 100644 --- a/libwinnie/src/text.cc +++ b/libwinnie/src/text.cc @@ -22,7 +22,7 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #include <ft2build.h> #include <freetype/freetype.h> -#include "gfx.h" +#include "sdl/gfx.h" #include "shalloc.h" #include "text.h" #include "winnie.h" diff --git a/libwinnie/src/window.cc b/libwinnie/src/window.cc index 6c9c106..22e4069 100644 --- a/libwinnie/src/window.cc +++ b/libwinnie/src/window.cc @@ -23,7 +23,7 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #include <stdio.h> //TODO #include <string.h> -#include "gfx.h" +#include "sdl/gfx.h" #include "window.h" #include "wm.h" diff --git a/libwinnie/src/window.h b/libwinnie/src/window.h index 0e67871..1d987e3 100644 --- a/libwinnie/src/window.h +++ b/libwinnie/src/window.h @@ -25,7 +25,7 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #include <vector> #include "geom.h" -#include "event.h" +#include "sdl/event.h" class Window { public: diff --git a/libwinnie/src/winnie.cc b/libwinnie/src/winnie.cc index f9ebc92..2e94b24 100644 --- a/libwinnie/src/winnie.cc +++ b/libwinnie/src/winnie.cc @@ -28,8 +28,8 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #include <sys/mman.h> #include <sys/time.h> -#include "keyboard.h" -#include "mouse.h" +#include "sdl/keyboard.h" +#include "sdl/mouse.h" #include "shalloc.h" #include "winnie.h" diff --git a/libwinnie/src/winnie.h b/libwinnie/src/winnie.h index 1c4f60c..5b0937a 100644 --- a/libwinnie/src/winnie.h +++ b/libwinnie/src/winnie.h @@ -22,11 +22,11 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #ifndef WINNIE_H_ #define WINNIE_H_ -#include "event.h" +#include "sdl/event.h" #include "geom.h" -#include "gfx.h" -#include "keyboard.h" -#include "mouse.h" +#include "sdl/gfx.h" +#include "sdl/keyboard.h" +#include "sdl/mouse.h" #include "text.h" #include "window.h" #include "wm.h" diff --git a/libwinnie/src/wm.cc b/libwinnie/src/wm.cc index 6ffb61b..9255667 100644 --- a/libwinnie/src/wm.cc +++ b/libwinnie/src/wm.cc @@ -24,8 +24,8 @@ Author: Eleni Maria Stea <elene.mst@gmail.com> #include <stdexcept> #include <stdio.h> // TODO -#include "gfx.h" -#include "mouse.h" +#include "sdl/gfx.h" +#include "sdl/mouse.h" #include "mouse_cursor.h" #include "shalloc.h" #include "text.h" diff --git a/winnie/plugins.conf b/winnie/plugins.conf index 395a826..4778c9f 100644 --- a/winnie/plugins.conf +++ b/winnie/plugins.conf @@ -1,3 +1 @@ ../clock/winnie_clock.so -../sysmon/winnie_sysmon.so -../tunnel/winnie_tunnel.so |