From fbe40b7b24ec4bc2107beafc01e7d7c3a37fea94 Mon Sep 17 00:00:00 2001 From: Rico Tiongson Date: Thu, 7 Feb 2019 17:24:24 +0800 Subject: [PATCH] Move files to lib --- src/{comfortable_swipe/index.cpp => lib/comfortable_swipe} | 7 ++++++- src/{comfortable_swipe => lib}/gesture/swipe_gesture.cpp | 0 src/{comfortable_swipe => lib}/gesture/swipe_gesture.h | 0 src/{comfortable_swipe => lib}/index.hpp | 7 ++++--- src/{comfortable_swipe => lib}/service/autostart.cpp | 0 src/{comfortable_swipe => lib}/service/buffer.cpp | 0 src/{comfortable_swipe => lib}/service/help.cpp | 0 src/{comfortable_swipe => lib}/service/restart.cpp | 0 src/{comfortable_swipe => lib}/service/start.cpp | 0 src/{comfortable_swipe => lib}/service/stop.cpp | 0 src/{comfortable_swipe => lib}/util/autostart_filename.cpp | 0 src/{comfortable_swipe => lib}/util/conf_filename.cpp | 0 src/{comfortable_swipe => lib}/util/read_config_file.cpp | 0 src/{comfortable_swipe => lib}/util/regex.cpp | 0 src/main.cpp | 4 +++- 15 files changed, 13 insertions(+), 5 deletions(-) rename src/{comfortable_swipe/index.cpp => lib/comfortable_swipe} (90%) rename src/{comfortable_swipe => lib}/gesture/swipe_gesture.cpp (100%) rename src/{comfortable_swipe => lib}/gesture/swipe_gesture.h (100%) rename src/{comfortable_swipe => lib}/index.hpp (94%) rename src/{comfortable_swipe => lib}/service/autostart.cpp (100%) rename src/{comfortable_swipe => lib}/service/buffer.cpp (100%) rename src/{comfortable_swipe => lib}/service/help.cpp (100%) rename src/{comfortable_swipe => lib}/service/restart.cpp (100%) rename src/{comfortable_swipe => lib}/service/start.cpp (100%) rename src/{comfortable_swipe => lib}/service/stop.cpp (100%) rename src/{comfortable_swipe => lib}/util/autostart_filename.cpp (100%) rename src/{comfortable_swipe => lib}/util/conf_filename.cpp (100%) rename src/{comfortable_swipe => lib}/util/read_config_file.cpp (100%) rename src/{comfortable_swipe => lib}/util/regex.cpp (100%) diff --git a/src/comfortable_swipe/index.cpp b/src/lib/comfortable_swipe similarity index 90% rename from src/comfortable_swipe/index.cpp rename to src/lib/comfortable_swipe index b474877..1c30917 100644 --- a/src/comfortable_swipe/index.cpp +++ b/src/lib/comfortable_swipe @@ -19,7 +19,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -// export all modules here +#include "index.hpp" + +/** + * Make sure to include all implementation (.cpp) files below to be ready for export. + */ + #include "gesture/swipe_gesture.cpp" #include "service/autostart.cpp" #include "service/buffer.cpp" diff --git a/src/comfortable_swipe/gesture/swipe_gesture.cpp b/src/lib/gesture/swipe_gesture.cpp similarity index 100% rename from src/comfortable_swipe/gesture/swipe_gesture.cpp rename to src/lib/gesture/swipe_gesture.cpp diff --git a/src/comfortable_swipe/gesture/swipe_gesture.h b/src/lib/gesture/swipe_gesture.h similarity index 100% rename from src/comfortable_swipe/gesture/swipe_gesture.h rename to src/lib/gesture/swipe_gesture.h diff --git a/src/comfortable_swipe/index.hpp b/src/lib/index.hpp similarity index 94% rename from src/comfortable_swipe/index.hpp rename to src/lib/index.hpp index e13262e..ba2b232 100644 --- a/src/comfortable_swipe/index.hpp +++ b/src/lib/index.hpp @@ -28,12 +28,13 @@ along with this program. If not, see . #define __COMFORTABLE_SWIPE__CONFIG__ "/usr/local/share/comfortable-swipe/comfortable-swipe.conf" #endif /* __COMFORTABLE_SWIPE__CONFIG__ */ - #include // std::map #include // std::string -#include "gesture/swipe_gesture.h" -// other program header files +/** + * Make sure to include your header files here so that they can be imported by other modules. + */ +#include "gesture/swipe_gesture.h" extern "C" { namespace comfortable_swipe::util diff --git a/src/comfortable_swipe/service/autostart.cpp b/src/lib/service/autostart.cpp similarity index 100% rename from src/comfortable_swipe/service/autostart.cpp rename to src/lib/service/autostart.cpp diff --git a/src/comfortable_swipe/service/buffer.cpp b/src/lib/service/buffer.cpp similarity index 100% rename from src/comfortable_swipe/service/buffer.cpp rename to src/lib/service/buffer.cpp diff --git a/src/comfortable_swipe/service/help.cpp b/src/lib/service/help.cpp similarity index 100% rename from src/comfortable_swipe/service/help.cpp rename to src/lib/service/help.cpp diff --git a/src/comfortable_swipe/service/restart.cpp b/src/lib/service/restart.cpp similarity index 100% rename from src/comfortable_swipe/service/restart.cpp rename to src/lib/service/restart.cpp diff --git a/src/comfortable_swipe/service/start.cpp b/src/lib/service/start.cpp similarity index 100% rename from src/comfortable_swipe/service/start.cpp rename to src/lib/service/start.cpp diff --git a/src/comfortable_swipe/service/stop.cpp b/src/lib/service/stop.cpp similarity index 100% rename from src/comfortable_swipe/service/stop.cpp rename to src/lib/service/stop.cpp diff --git a/src/comfortable_swipe/util/autostart_filename.cpp b/src/lib/util/autostart_filename.cpp similarity index 100% rename from src/comfortable_swipe/util/autostart_filename.cpp rename to src/lib/util/autostart_filename.cpp diff --git a/src/comfortable_swipe/util/conf_filename.cpp b/src/lib/util/conf_filename.cpp similarity index 100% rename from src/comfortable_swipe/util/conf_filename.cpp rename to src/lib/util/conf_filename.cpp diff --git a/src/comfortable_swipe/util/read_config_file.cpp b/src/lib/util/read_config_file.cpp similarity index 100% rename from src/comfortable_swipe/util/read_config_file.cpp rename to src/lib/util/read_config_file.cpp diff --git a/src/comfortable_swipe/util/regex.cpp b/src/lib/util/regex.cpp similarity index 100% rename from src/comfortable_swipe/util/regex.cpp rename to src/lib/util/regex.cpp diff --git a/src/main.cpp b/src/main.cpp index b472d81..6f2b7b7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,8 +16,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +// Compile: g++ main.cpp -std=c++11 -lxdo + #include // std::string -#include "comfortable_swipe/index.cpp" +#include "lib/comfortable_swipe" /* MAIN DRIVER FUNCTION */