Nicer structure
This commit is contained in:
24
src/mappings.h
Normal file
24
src/mappings.h
Normal file
@@ -0,0 +1,24 @@
|
||||
// gKeyMapper - reading and writing the mappings configuration file.
|
||||
#ifndef GKEYMAPPER_MAPPINGS_H
|
||||
#define GKEYMAPPER_MAPPINGS_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "keyrow.h"
|
||||
|
||||
namespace gkeymapper {
|
||||
|
||||
// Default config file: ~/.config/gKeyMapper/mappings.conf.
|
||||
std::string default_config_path();
|
||||
|
||||
// Writes all rows as "G1=type:target" lines. Returns false on I/O error.
|
||||
bool write_mappings(const std::string& path, const std::vector<KeyRow>& rows);
|
||||
|
||||
// Loads mappings from path into the rows' widgets. Missing/invalid lines are
|
||||
// skipped; a missing file is reported and otherwise ignored.
|
||||
void read_mappings(const std::string& path, const std::vector<KeyRow>& rows);
|
||||
|
||||
} // namespace gkeymapper
|
||||
|
||||
#endif // GKEYMAPPER_MAPPINGS_H
|
||||
Reference in New Issue
Block a user