Attempt fix g++ error
This commit is contained in:
parent
5457e012f2
commit
2ee59cf722
@ -15,6 +15,9 @@ addons:
|
||||
packages:
|
||||
- libxdo-dev
|
||||
- libinput-tools
|
||||
- g++-7
|
||||
env:
|
||||
CC: g++-7
|
||||
install:
|
||||
- pip install .
|
||||
script:
|
||||
|
||||
@ -32,7 +32,9 @@ extern "C"
|
||||
// CURRENT_WINDOW
|
||||
}
|
||||
|
||||
namespace comfortable_swipe::gesture
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace gesture
|
||||
{
|
||||
/**
|
||||
* Constructs a new swipe gesture, given configurations for certain swipe events.
|
||||
@ -209,5 +211,6 @@ namespace comfortable_swipe::gesture
|
||||
"down4"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__gesture_swipe_gesture__ */
|
||||
|
||||
@ -21,11 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "xdo_gesture.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
namespace comfortable_swipe::gesture
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace gesture
|
||||
{
|
||||
class swipe_gesture : protected xdo_gesture
|
||||
{
|
||||
@ -82,9 +80,6 @@ namespace comfortable_swipe::gesture
|
||||
static const char* GESTURE_END_REGEX_PATTERN;
|
||||
};
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__gesture_swipe_gesture_h__ */
|
||||
|
||||
@ -21,7 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "swipe_gesture.h"
|
||||
|
||||
namespace comfortable_swipe::gesture
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace gesture
|
||||
{
|
||||
/**
|
||||
* Regex pattern for the libinput entry for start of swipe.
|
||||
@ -87,5 +89,6 @@ namespace comfortable_swipe::gesture
|
||||
#undef CF_NUMBER_EXTRACT
|
||||
#undef CF_NUMBER_REGEX
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__gesture_swipe_gesture_regex__ */
|
||||
|
||||
@ -26,7 +26,9 @@ extern "C"
|
||||
|
||||
#include "xdo_gesture.h"
|
||||
|
||||
namespace comfortable_swipe::gesture
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace gesture
|
||||
{
|
||||
/**
|
||||
* Constructs a new gesture handler with xdo.
|
||||
@ -43,5 +45,6 @@ namespace comfortable_swipe::gesture
|
||||
xdo_free(this->xdo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__xdo_gesture__ */
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
#include <map> // std::map
|
||||
#include <string> // std::string
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace service
|
||||
@ -19,6 +17,5 @@ extern "C"
|
||||
void status();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__service_index_hpp__ */
|
||||
|
||||
@ -2,10 +2,17 @@
|
||||
#define __COMFORTABLE_SWIPE__service_python__
|
||||
|
||||
#include "_index.hpp"
|
||||
extern "C"
|
||||
{
|
||||
#include <Python.h>
|
||||
}
|
||||
|
||||
// export as python module
|
||||
namespace comfortable_swipe::service::python
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace service
|
||||
{
|
||||
namespace python
|
||||
{
|
||||
#define __comfortable_swipe_void_method(method) \
|
||||
static PyObject * \
|
||||
@ -57,6 +64,8 @@ namespace comfortable_swipe::service::python
|
||||
|
||||
PyObject * module;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// initialize module
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
|
||||
@ -21,7 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <cstdlib> // std::system
|
||||
|
||||
namespace comfortable_swipe::service
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace service
|
||||
{
|
||||
/**
|
||||
* Debugs output from `libinput debug-events`.
|
||||
@ -31,5 +33,6 @@ namespace comfortable_swipe::service
|
||||
(void) std::system("bash -c \"stdbuf -oL -e0 libinput debug-events 2> >(grep -v 'double tracking')\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__service_debug__ */
|
||||
|
||||
@ -21,7 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <cstdio> // std::puts, std::printf
|
||||
|
||||
namespace comfortable_swipe::service
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace service
|
||||
{
|
||||
/**
|
||||
* Shows the help window.
|
||||
@ -41,5 +43,6 @@ namespace comfortable_swipe::service
|
||||
std::puts("status - checks status of program and autostart");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__service_help__ */
|
||||
|
||||
@ -21,7 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "../service/_index.hpp"
|
||||
|
||||
namespace comfortable_swipe::service
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace service
|
||||
{
|
||||
/**
|
||||
* Restarts the comfortable-swipe service.
|
||||
@ -32,5 +34,6 @@ namespace comfortable_swipe::service
|
||||
comfortable_swipe::service::start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__service_restart__ */
|
||||
|
||||
@ -24,7 +24,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <cstdlib> // std::system
|
||||
#include <unistd.h> // pipe, fork, perror, exit
|
||||
|
||||
namespace comfortable_swipe::service
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace service
|
||||
{
|
||||
/**
|
||||
* Starts the comfortable-swipe service by buffering libinput debug-events.
|
||||
@ -59,5 +61,6 @@ namespace comfortable_swipe::service
|
||||
comfortable_swipe::service::stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__service_start__ */
|
||||
|
||||
@ -30,7 +30,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <cstdio> // FILE, std::feof, std::fgets, std::printf
|
||||
#include <regex> // std::cmatch, std::regex, std::regex_match
|
||||
|
||||
namespace comfortable_swipe::service
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace service
|
||||
{
|
||||
/**
|
||||
* Prints the status of comfortable-swipe.
|
||||
@ -71,5 +73,6 @@ namespace comfortable_swipe::service
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__service_restart__ */
|
||||
|
||||
@ -29,7 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <cstdlib> // std::atoi
|
||||
#include <cstdio> // FILE, std::feof, std::fgets
|
||||
|
||||
namespace comfortable_swipe::service
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace service
|
||||
{
|
||||
/**
|
||||
* Stops all comfortable-swipe instances.
|
||||
@ -66,5 +68,6 @@ namespace comfortable_swipe::service
|
||||
(void) std::system(kill.data());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__service_stop__ */
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
#include <map> // std::map
|
||||
#include <string> // std::string
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace util
|
||||
@ -13,6 +11,5 @@ extern "C"
|
||||
std::map<std::string, std::string> read_config_file(const char*);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__util_index_hpp__ */
|
||||
|
||||
@ -22,13 +22,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <map> // std::map
|
||||
#include <string> // std::string
|
||||
#include <fstream> // std::ifstream
|
||||
#include <sstream> // std::ostringstream
|
||||
#include <iostream> // std::endl, std::getline
|
||||
#include <sstream> // std::ostringstream
|
||||
#include <cstdlib> // exit
|
||||
#include <cctype> // std::isspace
|
||||
#include <stdexcept> // std::runtime_error
|
||||
|
||||
namespace comfortable_swipe::util
|
||||
namespace comfortable_swipe
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
/**
|
||||
* A utility method for reading the config file.
|
||||
@ -39,7 +41,7 @@ namespace comfortable_swipe::util
|
||||
{
|
||||
|
||||
std::map<std::string, std::string> conf;
|
||||
std::ifstream fin(filename);
|
||||
std::ifstream fin(filename, std::ios::in);
|
||||
|
||||
if (!fin.is_open())
|
||||
{
|
||||
@ -100,4 +102,6 @@ namespace comfortable_swipe::util
|
||||
return conf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __COMFORTABLE_SWIPE__util_read_config_file__ */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user