Cleaned up includes, they were a bit of a mess

This commit is contained in:
Scoopta 2020-03-25 23:05:46 -07:00
parent f61ec70797
commit 29aeffd8c1
13 changed files with 97 additions and 52 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019 Scoopta * Copyright (C) 2019-2020 Scoopta
* This file is part of Wofi * This file is part of Wofi
* Wofi is free software: you can redistribute it and/or modify * Wofi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -18,13 +18,9 @@
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#include <map.h>
#include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdarg.h>
#include <string.h> #include <map.h>
#include <stdlib.h>
void config_put(struct map* map, char* line); void config_put(struct map* map, char* line);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019 Scoopta * Copyright (C) 2019-2020 Scoopta
* This file is part of Wofi * This file is part of Wofi
* Wofi is free software: you can redistribute it and/or modify * Wofi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -17,10 +17,10 @@
#ifndef PROPERTY_BOX_H #ifndef PROPERTY_BOX_H
#define PROPERTY_BOX_H #define PROPERTY_BOX_H
#include <map.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#define WOFI_TYPE_PROPERTY_BOX wofi_property_box_get_type() #define WOFI_TYPE_PROPERTY_BOX wofi_property_box_get_type()
G_DECLARE_FINAL_TYPE(WofiPropertyBox, wofi_property_box, WOFI, PROPERTY_BOX, GtkBox); G_DECLARE_FINAL_TYPE(WofiPropertyBox, wofi_property_box, WOFI, PROPERTY_BOX, GtkBox);

View File

@ -18,17 +18,9 @@
#ifndef UTIL_H #ifndef UTIL_H
#define UTIL_H #define UTIL_H
#include <math.h>
#include <time.h> #include <time.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libgen.h>
#include <sys/stat.h> #include <sys/types.h>
#include <sys/time.h>
time_t utils_get_time_millis(void); time_t utils_get_time_millis(void);

View File

@ -18,28 +18,9 @@
#ifndef WAIFU_H #ifndef WAIFU_H
#define WAIFU_H #define WAIFU_H
#include <wofi_api.h> #include <stdbool.h>
#include <utils.h> #include <map.h>
#include <config.h>
#include <property_box.h>
#include <ctype.h>
#include <dlfcn.h>
#include <errno.h>
#include <stddef.h>
#include <string.h>
#include <libgen.h>
#include <unistd.h>
#include <sys/stat.h>
#include <gtk/gtk.h>
#include <pango/pango.h>
#include <gdk/gdkwayland.h>
#include <xdg-output-unstable-v1-client-protocol.h>
#include <wlr-layer-shell-unstable-v1-client-protocol.h>
void wofi_init(struct map* config); void wofi_init(struct map* config);

View File

@ -18,9 +18,7 @@
#ifndef WOFI_API_H #ifndef WOFI_API_H
#define WOFI_API_H #define WOFI_API_H
#include <map.h> #include <stddef.h>
#include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include <wayland-client.h> #include <wayland-client.h>

View File

@ -15,7 +15,15 @@
along with Wofi. If not, see <http://www.gnu.org/licenses/>. along with Wofi. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <wofi.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <config.h>
#include <wofi_api.h>
#include <pango/pango.h>
static const char* arg_names[] = {"parse_action", "separator", "print_line_num"}; static const char* arg_names[] = {"parse_action", "separator", "print_line_num"};

View File

@ -15,8 +15,17 @@
along with Wofi. If not, see <http://www.gnu.org/licenses/>. along with Wofi. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <wofi.h> #include <stdio.h>
#include <libgen.h>
#include <sys/stat.h>
#include <map.h>
#include <utils.h>
#include <config.h>
#include <wofi_api.h>
#include <gtk/gtk.h>
#include <gio/gdesktopappinfo.h> #include <gio/gdesktopappinfo.h>
static const char* arg_names[] = {"print_command"}; static const char* arg_names[] = {"print_command"};

View File

@ -15,7 +15,20 @@
along with Wofi. If not, see <http://www.gnu.org/licenses/>. along with Wofi. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <wofi.h> #include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <utils.h>
#include <config.h>
#include <wofi_api.h>
#include <glib.h>
static const char* arg_names[] = {"always_parse_args", "show_all"}; static const char* arg_names[] = {"always_parse_args", "show_all"};

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019 Scoopta * Copyright (C) 2019-2020 Scoopta
* This file is part of Wofi * This file is part of Wofi
* Wofi is free software: you can redistribute it and/or modify * Wofi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -17,6 +17,13 @@
#include <config.h> #include <config.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <map.h>
void config_put(struct map* map, char* line) { void config_put(struct map* map, char* line) {
size_t line_size = strlen(line); size_t line_size = strlen(line);
char* new_line = calloc(1, line_size + 1); char* new_line = calloc(1, line_size + 1);

View File

@ -15,17 +15,23 @@
along with Wofi. If not, see <http://www.gnu.org/licenses/>. along with Wofi. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <map.h>
#include <wofi.h>
#include <utils.h>
#include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stddef.h> #include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <getopt.h> #include <getopt.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#include <signal.h>
#include <map.h>
#include <wofi.h>
#include <utils.h>
#include <config.h>
#include <wayland-client.h>
#include <gtk/gtk.h>
static const char* nyan_colors[] = {"#FF0000", "#FFA500", "#FFFF00", "#00FF00", "#0000FF", "#FF00FF"}; static const char* nyan_colors[] = {"#FF0000", "#FFA500", "#FFFF00", "#00FF00", "#0000FF", "#FF00FF"};
static size_t nyan_color_l = sizeof(nyan_colors) / sizeof(char*); static size_t nyan_color_l = sizeof(nyan_colors) / sizeof(char*);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019 Scoopta * Copyright (C) 2019-2020 Scoopta
* This file is part of Wofi * This file is part of Wofi
* Wofi is free software: you can redistribute it and/or modify * Wofi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -17,6 +17,8 @@
#include <property_box.h> #include <property_box.h>
#include <map.h>
struct _WofiPropertyBox { struct _WofiPropertyBox {
GtkBox super; GtkBox super;
}; };

View File

@ -17,6 +17,17 @@
#include <utils.h> #include <utils.h>
#include <math.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libgen.h>
#include <sys/stat.h>
#include <sys/time.h>
time_t utils_get_time_millis(void) { time_t utils_get_time_millis(void) {
struct timeval time; struct timeval time;
gettimeofday(&time, NULL); gettimeofday(&time, NULL);

View File

@ -16,6 +16,28 @@
*/ */
#include <wofi.h> #include <wofi.h>
#include <wofi_api.h>
#include <ctype.h>
#include <dlfcn.h>
#include <errno.h>
#include <string.h>
#include <libgen.h>
#include <unistd.h>
#include <stdint.h>
#include <sys/stat.h>
#include <utils.h>
#include <config.h>
#include <property_box.h>
#include <xdg-output-unstable-v1-client-protocol.h>
#include <wlr-layer-shell-unstable-v1-client-protocol.h>
#include <gtk/gtk.h>
#include <pango/pango.h>
#include <gdk/gdkwayland.h>
static const char* terminals[] = {"kitty", "termite", "gnome-terminal", "weston-terminal"}; static const char* terminals[] = {"kitty", "termite", "gnome-terminal", "weston-terminal"};