mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 07:03:34 +00:00
fixing color issues with texts
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/04 21:49:46 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/11 18:37:05 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/11 21:43:13 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -37,6 +37,10 @@ namespace mlx::core
|
||||
inline void getMousePos(int* x, int* y) noexcept;
|
||||
inline void mouseMove(void* win, int x, int y) noexcept;
|
||||
|
||||
inline void mouseHook(int (*funct_ptr)(const char*, void*), void* param) noexcept;
|
||||
inline void keyHook(int (*funct_ptr)(const char*, void*), void* param) noexcept;
|
||||
inline void exposeHook(int (*funct_ptr)(const char*, void*), void* param) noexcept;
|
||||
|
||||
inline constexpr void enableAutoRepeat() noexcept;
|
||||
inline constexpr void disableAutoRepeat() noexcept;
|
||||
|
||||
|
||||
@@ -27,6 +27,21 @@ namespace mlx::core
|
||||
SDL_FlushEvent(SDL_MOUSEMOTION);
|
||||
}
|
||||
|
||||
void Application::mouseHook(int (*funct_ptr)(const char*, void*), void* param) noexcept
|
||||
{
|
||||
_in.mouseHook(funct_ptr, param);
|
||||
}
|
||||
|
||||
void Application::keyHook(int (*funct_ptr)(const char*, void*), void* param) noexcept
|
||||
{
|
||||
_in.keyHook(funct_ptr, param);
|
||||
}
|
||||
|
||||
void Application::exposeHook(int (*funct_ptr)(const char*, void*), void* param) noexcept
|
||||
{
|
||||
_in.exposeHook(funct_ptr, param);
|
||||
}
|
||||
|
||||
constexpr void Application::enableAutoRepeat() noexcept
|
||||
{
|
||||
_in.enableAutoRepeat();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/04 17:35:20 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/06 16:09:47 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/11 21:42:56 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -69,6 +69,24 @@ extern "C"
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mlx_mouse_hook(void* mlx, int (*funct_ptr)(const char*, void*), void* param)
|
||||
{
|
||||
static_cast<mlx::core::Application*>(mlx)->mouseHook(funct_ptr, param);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mlx_key_hook(void* mlx, int (*funct_ptr)(const char*, void*), void* param)
|
||||
{
|
||||
static_cast<mlx::core::Application*>(mlx)->keyHook(funct_ptr, param);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mlx_expose_hook(void* mlx, int (*funct_ptr)(const char*, void*), void* param)
|
||||
{
|
||||
static_cast<mlx::core::Application*>(mlx)->exposeHook(funct_ptr, param);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mlx_do_key_autorepeaton(void* mlx)
|
||||
{
|
||||
static_cast<mlx::core::Application*>(mlx)->enableAutoRepeat();
|
||||
|
||||
Reference in New Issue
Block a user