Muteki
EABI code execution on Besta® RTOS devices.
Loading...
Searching...
No Matches
slider.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 dogtopus
3 * SPDX-License-Identifier: MIT
4 */
5
10
11#ifndef __MUTEKI_UI_TYPES_SLIDER_H__
12#define __MUTEKI_UI_TYPES_SLIDER_H__
13
14#include "framework.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
76
80typedef struct ui_slider_s ui_slider_t;
81
94 void (*on_set_position)(ui_slider_t *self, unsigned short position);
99 unsigned short (*on_set_maximum)(ui_slider_t *self, unsigned short maximum);
103 void (*on_value_to_point)(ui_slider_t *self, unsigned short value, short out_point[2]);
115 unsigned short *position;
123 unsigned short touch_begin_x;
131 unsigned short maximum;
135 unsigned short minimum;
139 unsigned short step;
143 unsigned short thumb_pressed;
148 unsigned short slider_flags;
152 unsigned short unk_0x62[3];
153};
154
155#ifdef __cplusplus
156} // extern "C"
157#endif
158
159#endif // __MUTEKI_UI_TYPES_SLIDER_H__
UI framework type (component, group, event) definitions.
struct ui_component_s ui_component_t
ui_component_s
Definition framework.h:71
The slider widget struct.
Definition slider.h:85
unsigned short step
Number of positions to advance on key presses.
Definition slider.h:139
unsigned short touch_begin_x
X coordinate of the start point of a thumb drag.
Definition slider.h:123
void(*) on_set_position(ui_slider_t *self, unsigned short position)
Set position callback.
Definition slider.h:94
short last_thumb_center_x
Thumb position.
Definition slider.h:119
double pixels_per_step
Cached fraction value of (sub)pixels per slider step.
Definition slider.h:107
unsigned short slider_flags
Style flags.
Definition slider.h:148
unsigned short thumb_pressed
Thumb pressing state.
Definition slider.h:143
lcd_surface_t * thumb_bg
Cached thumb background image.
Definition slider.h:111
unsigned short unk_0x62[3]
Unknown. Set to 0.
Definition slider.h:152
ui_component_t component
The inherited component struct.
Definition slider.h:89
unsigned short(*) on_set_maximum(ui_slider_t *self, unsigned short maximum)
Set maximum callback.
Definition slider.h:99
void(*) on_value_to_point(ui_slider_t *self, unsigned short value, short out_point[2])
Callback to convert slider position value to thumb sprite coordinate.
Definition slider.h:103
unsigned short * position
Current position number (borrowed reference).
Definition slider.h:115
unsigned short maximum
Maximum position number of the slider.
Definition slider.h:131
int unk_0x54
Unknown. Set to 0.
Definition slider.h:127
unsigned short minimum
Minimum position number of the slider.
Definition slider.h:135
ui_slider_flag_e
Style flags for the slider widget.
Definition slider.h:27
@ UI_SLIDER_FRAME_RAISED
Frame style: Raised.
Definition slider.h:69
@ UI_SLIDER_TRACK_SIMPLE
Track style: Simple.
Definition slider.h:32
@ UI_SLIDER_FRAME_NONE
Frame style: None.
Definition slider.h:64
@ UI_SLIDER_THUMB_BITMAP
Thumb style: Bitmap.
Definition slider.h:47
@ UI_SLIDER_THUMB_BITMAP_ALT
Thumb style: Bitmap (alternate).
Definition slider.h:53
@ UI_SLIDER_TRACK_BAR
Track style: Progress-bar-like.
Definition slider.h:38
@ UI_SLIDER_THUMB_NONE
Thumb style: Hidden.
Definition slider.h:43
@ UI_SLIDER_THUMB_OUTLINE
Thumb style: Outline.
Definition slider.h:58
@ UI_SLIDER_FRAME_SUNKEN
Frame style: Sunken.
Definition slider.h:74
struct ui_slider_s ui_slider_t
The slider widget type.
Definition slider.h:80
Surface type definitions.
struct lcd_surface_s lcd_surface_t
Descriptor of an LCD drawing surface or hardware framebuffer.