MLX42 1.0
MLX42
|
#include "MLX42/MLX42_Int.h"
Go to the source code of this file.
Functions | |
void | mlx_update_matrix (const mlx_t *mlx) |
static void | mlx_resize_callback (GLFWwindow *window, int32_t width, int32_t height) |
static void | mlx_close_callback (GLFWwindow *window) |
void | mlx_close_hook (mlx_t *mlx, mlx_closefunc func, void *param) |
void | mlx_resize_hook (mlx_t *mlx, mlx_resizefunc func, void *param) |
void | mlx_set_icon (mlx_t *mlx, mlx_texture_t *image) |
void | mlx_set_window_pos (mlx_t *mlx, int32_t xpos, int32_t ypos) |
void | mlx_get_window_pos (mlx_t *mlx, int32_t *xpos, int32_t *ypos) |
void | mlx_set_window_size (mlx_t *mlx, int32_t new_width, int32_t new_height) |
void | mlx_set_window_limit (mlx_t *mlx, int32_t min_w, int32_t min_h, int32_t max_w, int32_t max_h) |
void | mlx_set_window_title (mlx_t *mlx, const char *title) |
|
static |
Definition at line 53 of file mlx_window.c.
void mlx_close_hook | ( | mlx_t * | mlx, |
mlx_closefunc | func, | ||
void * | param | ||
) |
This function sets the close callback, which is called in attempt to close the window device such as a close window widget used in the window bar.
[in] | mlx | The MLX instance handle. |
[in] | func | The close callback function. |
[in] | param | An additional optional parameter. |
Definition at line 63 of file mlx_window.c.
Gets the window's position.
[in] | mlx | The MLX instance handle. |
[out] | xpos | The x position. |
[out] | ypos | The y position. |
Definition at line 106 of file mlx_window.c.
|
static |
void mlx_resize_hook | ( | mlx_t * | mlx, |
mlx_resizefunc | func, | ||
void * | param | ||
) |
This function sets the resize callback, which is called when the window is resized
[in] | mlx | The MLX instance handle. |
[in] | func | The resize callback function. |
[in] | param | An additional optional parameter. |
Definition at line 74 of file mlx_window.c.
void mlx_set_icon | ( | mlx_t * | mlx, |
mlx_texture_t * | image | ||
) |
Lets you set a custom image as the program icon.
NOTE: In MacOS this function does nothing, you should use the bundles icon to set the dock bar icon.
[in] | mlx | The MLX instance handle. |
[in] | image | The image to use as icon. |
Definition at line 85 of file mlx_window.c.
void mlx_set_window_limit | ( | mlx_t * | mlx, |
int32_t | min_w, | ||
int32_t | min_h, | ||
int32_t | max_w, | ||
int32_t | max_h | ||
) |
Sets the size limits of the specified window. Will force the window to not be resizable past or below the given values.
Pass -1 for no limit to any of the min/max parameters to ignore that boundary. For instance if you want a min window size but the max window size can be whatever.
[in] | mlx | The MLX instance handle. |
[in] | min_w | The min width of the window. |
[in] | max_w | The max width of the window. |
[in] | min_h | The min height of the window. |
[in] | max_h | The max height of the window. |
Definition at line 124 of file mlx_window.c.
Sets the window's position.
Do not use this function to move an already visible window unless you have very good reasons for doing so, as it will confuse and annoy the user.
[in] | mlx | The MLX instance handle. |
[in] | xpos | The x position. |
[in] | ypos | The y position. |
Definition at line 99 of file mlx_window.c.
Changes the window size to the newly specified values. Use this to update the window width and height values in the mlx handle.
[in] | mlx | The MLX instance handle. |
[in] | new_width | The new desired width. |
[in] | new_height | The new desired height. |
Definition at line 115 of file mlx_window.c.
Sets the title of the window.
[in] | mlx | The MLX instance handle. |
[in] | title | The window title. |
Definition at line 131 of file mlx_window.c.
Recalculate the view projection matrix, used by images for screen pos Reference: https://bit.ly/3KuHOu1 (Matrix View Projection)
In case the setting to stretch the image is set, we maintain the width and height but not the depth.
Definition at line 21 of file mlx_window.c.