Gooey GUI Library
|
#include "common/gooey_common.h"
#include <stdbool.h>
Go to the source code of this file.
Functions | |
GooeySlider * | GooeySlider_Create (int x, int y, int width, long min_value, long max_value, bool show_hints, void(*callback)(long value)) |
Adds a slider to the window. | |
long | GooeySlider_GetValue (GooeySlider *slider) |
Gets the current value of the slider. | |
void | GooeySlider_SetValue (GooeySlider *slider, long value) |
Sets the value of the slider. | |
GooeySlider * GooeySlider_Create | ( | int | x, |
int | y, | ||
int | width, | ||
long | min_value, | ||
long | max_value, | ||
bool | show_hints, | ||
void(*)(long value) | callback | ||
) |
Adds a slider to the window.
This function creates and adds a slider to the specified window at the given position with a defined width and range. The slider's value changes when dragged, and a callback function is invoked to notify when the slider value changes.
x | The x-coordinate of the slider's position. |
y | The y-coordinate of the slider's position. |
width | The width of the slider. |
min_value | The minimum value of the slider. |
max_value | The maximum value of the slider. |
show_hints | Whether to show hints for the slider. |
callback | The callback function to call when the slider value changes. |
long GooeySlider_GetValue | ( | GooeySlider * | slider | ) |
Gets the current value of the slider.
This function retrieves the current value of the slider. The value is within the range specified by the slider's minimum and maximum values.
slider | The slider to get the value from. |
void GooeySlider_SetValue | ( | GooeySlider * | slider, |
long | value | ||
) |
Sets the value of the slider.
This function sets the slider's value to the specified value within the slider's valid range (between the minimum and maximum values).
slider | The slider to set the value for. |
value | The new value for the slider. |