diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4753a05 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# C++ generated headers +*.gch diff --git a/src/comfortable_swipe/index.cpp b/src/comfortable_swipe/index.cpp new file mode 100644 index 0000000..4f6ed6c --- /dev/null +++ b/src/comfortable_swipe/index.cpp @@ -0,0 +1,18 @@ +#!/bin/g++ +#ifndef __COMFORTABLE_SWIPE__ +#define __COMFORTABLE_SWIPE__ + +// export all modules here +#include "gesture/swipe_gesture.cpp" +#include "service/autostart.cpp" +#include "service/buffer.cpp" +#include "service/help.cpp" +#include "service/restart.cpp" +#include "service/start.cpp" +#include "service/stop.cpp" +#include "util/autostart_filename.cpp" +#include "util/conf_filename.cpp" +#include "util/read_config_file.cpp" +#include "util/regex.cpp" + +#endif /* __COMFORTABLE_SWIPE__ */ diff --git a/src/comfortable_swipe/index.hpp b/src/comfortable_swipe/index.hpp new file mode 100644 index 0000000..4f4347b --- /dev/null +++ b/src/comfortable_swipe/index.hpp @@ -0,0 +1,48 @@ +#ifndef __COMFORTABLE_SWIPE__index_hpp__ +#define __COMFORTABLE_SWIPE__index_hpp__ + +// global definitions +#ifndef __COMFORTABLE_SWIPE__PROGRAM__ +#define __COMFORTABLE_SWIPE__PROGRAM__ "/usr/local/bin/comfortable-swipe" +#endif /* __COMFORTABLE_SWIPE__PROGRAM__ */ + +#ifndef __COMFORTABLE_SWIPE__CONFIG__ +#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" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +namespace comfortable_swipe +{ + namespace util + { + extern const char* GESTURE_SWIPE_BEGIN_REGEX_PATTERN; + extern const char* GESTURE_SWIPE_UPDATE_REGEX_PATTERN; + extern const char* GESTURE_SWIPE_END_REGEX_PATTERN; + std::map read_config_file(const char*); + const char* autostart_filename(); + constexpr const char* conf_filename(); + } + + namespace service + { + void autostart(); + void buffer(); + void help(); + void restart(); + void start(); + void stop(); + } +} + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __COMFORTABLE_SWIPE__index_hpp__ */ \ No newline at end of file