mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 14:43:34 +00:00
adding documentation to mlx.h
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/19 11:31:51 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/19 12:14:07 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -39,9 +39,6 @@ namespace mlx::core
|
||||
|
||||
inline void onEvent(void* win, int event, int (*funct_ptr)(int, void*), void* param) noexcept;
|
||||
|
||||
inline void enableAutoRepeat() noexcept;
|
||||
inline void disableAutoRepeat() noexcept;
|
||||
|
||||
inline void getScreenSize(int* w, int* h) noexcept;
|
||||
|
||||
inline void* newGraphicsSuport(std::size_t w, std::size_t h, std::string title);
|
||||
|
||||
@@ -32,16 +32,6 @@ namespace mlx::core
|
||||
_in->onEvent(_graphics[*static_cast<int*>(win)]->getWindow()->getID(), event, funct_ptr, param);
|
||||
}
|
||||
|
||||
void Application::enableAutoRepeat() noexcept
|
||||
{
|
||||
_in->enableAutoRepeat();
|
||||
}
|
||||
|
||||
void Application::disableAutoRepeat() noexcept
|
||||
{
|
||||
_in->disableAutoRepeat();
|
||||
}
|
||||
|
||||
void Application::getScreenSize(int* w, int* h) noexcept
|
||||
{
|
||||
SDL_DisplayMode DM;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/04 17:35:20 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/19 11:49:40 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/19 12:14:02 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -75,18 +75,6 @@ extern "C"
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mlx_do_key_autorepeaton(void* mlx)
|
||||
{
|
||||
static_cast<mlx::core::Application*>(mlx)->enableAutoRepeat();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mlx_do_key_autorepeatoff(void* mlx)
|
||||
{
|
||||
static_cast<mlx::core::Application*>(mlx)->disableAutoRepeat();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* mlx_new_image(void* mlx, int width, int height)
|
||||
{
|
||||
return static_cast<mlx::core::Application*>(mlx)->newTexture(width, height);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/05 16:30:19 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/12 19:54:20 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/19 12:14:38 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -26,9 +26,6 @@ namespace mlx
|
||||
_xRel = 0;
|
||||
_yRel = 0;
|
||||
|
||||
if(!_auto_repeat)
|
||||
std::memset(_keys.data(), 0, SDL_NUM_SCANCODES);
|
||||
|
||||
while(SDL_PollEvent(&_event))
|
||||
{
|
||||
if(_event.type == SDL_MOUSEMOTION)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/05 16:27:35 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/13 10:55:46 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/19 12:14:43 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -51,9 +51,6 @@ namespace mlx
|
||||
inline bool is_running() const noexcept { return !_end; }
|
||||
inline constexpr void finish() noexcept { _end = true; }
|
||||
|
||||
inline constexpr void enableAutoRepeat() noexcept { _auto_repeat = true; }
|
||||
inline constexpr void disableAutoRepeat() noexcept { _auto_repeat = false; }
|
||||
|
||||
inline void addWindow(std::shared_ptr<MLX_Window> window)
|
||||
{
|
||||
_windows[window->getID()] = window;
|
||||
@@ -81,6 +78,5 @@ namespace mlx
|
||||
int _yRel = 0;
|
||||
|
||||
bool _end = false;
|
||||
bool _auto_repeat = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user