mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 15:13:34 +00:00
adding std namespace to all libstd provided primitive types
This commit is contained in:
@@ -33,7 +33,7 @@ namespace mlx
|
||||
_yRel = _event.motion.yrel;
|
||||
}
|
||||
|
||||
uint32_t id = _event.window.windowID;
|
||||
std::uint32_t id = _event.window.windowID;
|
||||
if(_events_hooks.find(id) == _events_hooks.end())
|
||||
continue;
|
||||
auto& hooks = _events_hooks[id];
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/05 16:27:35 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/16 07:59:08 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/02/25 07:51:55 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace mlx
|
||||
inline int getXRel() const noexcept { return _xRel; }
|
||||
inline int getYRel() const noexcept { return _yRel; }
|
||||
|
||||
inline bool is_running() const noexcept { return !_end; }
|
||||
inline bool isRunning() const noexcept { return !_end; }
|
||||
inline constexpr void finish() noexcept { _end = true; }
|
||||
|
||||
inline void addWindow(std::shared_ptr<MLX_Window> window)
|
||||
@@ -53,7 +53,7 @@ namespace mlx
|
||||
_events_hooks[window->getID()] = {};
|
||||
}
|
||||
|
||||
inline void onEvent(uint32_t id, int event, int (*funct_ptr)(int, void*), void* param) noexcept
|
||||
inline void onEvent(std::uint32_t id, int event, int (*funct_ptr)(int, void*), void* param) noexcept
|
||||
{
|
||||
_events_hooks[id][event].hook = funct_ptr;
|
||||
_events_hooks[id][event].param = param;
|
||||
@@ -62,8 +62,8 @@ namespace mlx
|
||||
~Input() = default;
|
||||
|
||||
private:
|
||||
std::unordered_map<uint32_t, std::shared_ptr<MLX_Window>> _windows;
|
||||
std::unordered_map<uint32_t, std::array<Hook, 6>> _events_hooks;
|
||||
std::unordered_map<std::uint32_t, std::shared_ptr<MLX_Window>> _windows;
|
||||
std::unordered_map<std::uint32_t, std::array<Hook, 6>> _events_hooks;
|
||||
SDL_Event _event;
|
||||
|
||||
int _x = 0;
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
namespace mlx
|
||||
{
|
||||
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||
constexpr const uint32_t rmask = 0xff000000;
|
||||
constexpr const uint32_t gmask = 0x00ff0000;
|
||||
constexpr const uint32_t bmask = 0x0000ff00;
|
||||
constexpr const uint32_t amask = 0x000000ff;
|
||||
constexpr const std::uint32_t rmask = 0xff000000;
|
||||
constexpr const std::uint32_t gmask = 0x00ff0000;
|
||||
constexpr const std::uint32_t bmask = 0x0000ff00;
|
||||
constexpr const std::uint32_t amask = 0x000000ff;
|
||||
#else
|
||||
constexpr const uint32_t rmask = 0x000000ff;
|
||||
constexpr const uint32_t gmask = 0x0000ff00;
|
||||
constexpr const uint32_t bmask = 0x00ff0000;
|
||||
constexpr const uint32_t amask = 0xff000000;
|
||||
constexpr const std::uint32_t rmask = 0x000000ff;
|
||||
constexpr const std::uint32_t gmask = 0x0000ff00;
|
||||
constexpr const std::uint32_t bmask = 0x00ff0000;
|
||||
constexpr const std::uint32_t amask = 0xff000000;
|
||||
#endif
|
||||
|
||||
MLX_Window::MLX_Window(std::size_t w, std::size_t h, const std::string& title) : _width(w), _height(h)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace mlx
|
||||
inline SDL_Window* getNativeWindow() const noexcept { return _win; }
|
||||
inline int getWidth() const noexcept { return _width; }
|
||||
inline int getHeight() const noexcept { return _height; }
|
||||
inline uint32_t getID() const noexcept { return _id; }
|
||||
inline std::uint32_t getID() const noexcept { return _id; }
|
||||
|
||||
void destroy() noexcept;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace mlx
|
||||
SDL_Window* _win = nullptr;
|
||||
int _width = 0;
|
||||
int _height = 0;
|
||||
uint32_t _id = -1;
|
||||
std::uint32_t _id = -1;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user