mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-25 07:24:20 -04:00
* [EGD-558][fix] change error to info * [EGD-558] added volume control of currently active audio operation * [EGD-558] added ringing on incoming call * [EGD-558] mini clean up in callwindow * [EGD-558] removed reinterpret_casts and added some logging * [EGD-558] rewritten methods to increment/decrement volume * [EGD-558] clean up * [EGD-558] moved volume control to application class added nullptr checks * [EGD-558] fixed types * [EGD-558] added some audio debug logs * [EGD-558] left a comment why ringing sound is currently disabled * [EGD-558] PR fixes * [EGD-558] PR fix * [EGD-558] added propper error codes on pointer checking in Audio.cpp
65 lines
1.3 KiB
C++
65 lines
1.3 KiB
C++
#include "InputEvent.hpp"
|
|
#include <string>
|
|
#include <cstdint>
|
|
#include <vector>
|
|
#include <map>
|
|
namespace gui
|
|
{
|
|
|
|
/*
|
|
*
|
|
*/
|
|
class KeyProfile
|
|
{
|
|
public:
|
|
uint32_t keyCode = 0;
|
|
bool cyclic = false;
|
|
;
|
|
std::vector<uint32_t> chars;
|
|
std::vector<uint32_t> timeouts;
|
|
|
|
KeyProfile();
|
|
virtual ~KeyProfile();
|
|
|
|
void addCharacters(const std::string &s);
|
|
void addTimeouts(const std::string &s);
|
|
};
|
|
|
|
/*
|
|
*
|
|
*/
|
|
class Profile
|
|
{
|
|
std::string name;
|
|
std::map<uint32_t, KeyProfile *> keys = {};
|
|
|
|
void addCharacters(KeyProfile *pk, const std::string &s);
|
|
void addTimeouts(KeyProfile *pk, const std::string &s);
|
|
void addKeyProfile(KeyProfile *pk);
|
|
void setName(std::string name)
|
|
{
|
|
this->name = name;
|
|
};
|
|
const KeyProfile *getKeyProfile(uint32_t keyCode);
|
|
|
|
public:
|
|
void clear()
|
|
{
|
|
this->keys.clear();
|
|
};
|
|
Profile() = default;
|
|
Profile(const std::string &name);
|
|
Profile(Profile &&p);
|
|
virtual ~Profile();
|
|
|
|
std::string getName()
|
|
{
|
|
return name;
|
|
};
|
|
bool load(std::string filename);
|
|
|
|
uint32_t get(bsp::KeyCodes code, uint32_t times);
|
|
};
|
|
|
|
} /* namespace gui */
|