Start port of swaybar to layer shell

This starts up the event loop and wayland display and shims out the
basic top level rendering concepts. Also includes some changes to
incorporate pango into the 1.x codebase properly.
This commit is contained in:
Drew DeVault 2018-03-28 23:04:20 -04:00
parent 382e8af418
commit cab1352801
23 changed files with 345 additions and 3787 deletions

View file

@ -4,19 +4,18 @@
#include <string.h>
#include <strings.h>
#include <poll.h>
#include "swaybar/bar.h"
#include <time.h>
#include "swaybar/event_loop.h"
#include "list.h"
#include "log.h"
struct event_item {
void(*cb)(int fd, short mask, void *data);
void (*cb)(int fd, short mask, void *data);
void *data;
};
struct timer_item {
timer_t timer;
void(*cb)(timer_t timer, void *data);
void (*cb)(timer_t timer, void *data);
void *data;
};
@ -138,7 +137,8 @@ void event_loop_poll() {
void init_event_loop() {
event_loop.fds.length = 0;
event_loop.fds.capacity = 10;
event_loop.fds.items = malloc(event_loop.fds.capacity * sizeof(struct pollfd));
event_loop.fds.items = malloc(
event_loop.fds.capacity * sizeof(struct pollfd));
event_loop.items = create_list();
event_loop.timers = create_list();
}