diff --git a/meson.build b/meson.build index 565c4ef..1b44173 100644 --- a/meson.build +++ b/meson.build @@ -68,8 +68,8 @@ endif executable('maomao', 'src/maomao.c', - 'src/util.c', - 'src/mem.c', + 'src/common/util.c', + 'src/common/mem.c', wayland_sources, dependencies : [ libm, diff --git a/src/client.h b/src/client/client.h similarity index 100% rename from src/client.h rename to src/client/client.h diff --git a/src/mem.c b/src/common/mem.c similarity index 100% rename from src/mem.c rename to src/common/mem.c diff --git a/src/mem.h b/src/common/mem.h similarity index 100% rename from src/mem.h rename to src/common/mem.h diff --git a/src/util.c b/src/common/util.c similarity index 100% rename from src/util.c rename to src/common/util.c diff --git a/src/util.h b/src/common/util.h similarity index 100% rename from src/util.h rename to src/common/util.h diff --git a/src/parse_config.h b/src/config/parse_config.h similarity index 100% rename from src/parse_config.h rename to src/config/parse_config.h diff --git a/src/preset_config.h b/src/config/preset_config.h similarity index 100% rename from src/preset_config.h rename to src/config/preset_config.h diff --git a/src/dispatch.h b/src/dispatch/dispatch.h similarity index 100% rename from src/dispatch.h rename to src/dispatch/dispatch.h diff --git a/src/maomao.c b/src/maomao.c index 1204123..53781d1 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -79,7 +79,7 @@ #endif #include "dwl-ipc-unstable-v2-protocol.h" -#include "util.h" +#include "common/util.h" #include /* macros */ @@ -619,7 +619,7 @@ void snap_scene_buffer_apply_size(struct wlr_scene_buffer *buffer, int sx, void client_set_pending_state(Client *c); void set_rect_size(struct wlr_scene_rect *rect, int width, int height); -#include "dispatch.h" +#include "dispatch/dispatch.h" /* variables */ static const char broken[] = "broken"; @@ -747,12 +747,12 @@ static struct wlr_xwayland *xwayland; #endif /* configuration, allows nested code to access above variables */ -#include "preset_config.h" +#include "config/preset_config.h" /* attempt to encapsulate suck into one file */ -#include "client.h" +#include "client/client.h" #ifdef IM -#include "ime.h" +#include "text_input/ime.h" #endif struct NumTags { @@ -777,7 +777,7 @@ struct vec2 *baked_points_tag; struct vec2 *baked_points_close; // update global variables from config file -#include "parse_config.h" +#include "config/parse_config.h" struct vec2 calculate_animation_curve_at(double t, int type) { struct vec2 point; diff --git a/src/ime.h b/src/text_input/ime.h similarity index 99% rename from src/ime.h rename to src/text_input/ime.h index bddec24..f902b7b 100644 --- a/src/ime.h +++ b/src/text_input/ime.h @@ -8,7 +8,7 @@ #include #include #include -#include "mem.h" +#include "../common/mem.h" #define LAB_SET_MAX_SIZE 16