MLX42 1.0
MLX42
|
#include "MLX42/MLX42_Int.h"
Go to the source code of this file.
Functions | |
bool | mlx_getline (char **out, size_t *out_size, FILE *file) |
uint64_t | mlx_fnv_hash (char *str, size_t len) |
bool | mlx_freen (int32_t count,...) |
uint32_t | mlx_rgba_to_mono (uint32_t color) |
double | mlx_get_time (void) |
void | mlx_focus (mlx_t *mlx) |
String hashing algorithm using FNV-1a. Source: https://bit.ly/3JcRGHa
str | The string to hash |
len | The length of the string. |
Definition at line 68 of file mlx_utils.c.
This function brings the specified window to front and sets input focus.
Do not use this function to steal focus from other applications unless you are certain that is what the user wants. Focus stealing can be extremely disruptive.
[in] | mlx | The MLX instance handle. |
Definition at line 126 of file mlx_utils.c.
Utility function that lets you free x amount of pointers.
count | The amount of args provided. |
... | Any form of pointer. |
Definition at line 89 of file mlx_utils.c.
Gets the elapsed time since MLX was initialized.
Definition at line 121 of file mlx_utils.c.
Function to read a file stream line by line, reusing the same output pointer. Since the same output pointer is reused it should only be freed once, either on success or failure. This function is made to be somewhat similar to getline. Getline can't be used directly since it's not standard and therefore not available on all platforms.
out | Pointer to store output string. |
out_size | Pointer to store output strings length. |
file | File stream to read from. |
Definition at line 28 of file mlx_utils.c.
Converts an RGBA value to a monochrome/grayscale value. It does so using specific weights for each channel.
color | The input RGBA value. |
Definition at line 109 of file mlx_utils.c.