VSF Documented
__vk_tgui_slider.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18/****************************************************************************
19* Copyright 2020 by Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) *
20* *
21* Licensed under the Apache License, Version 2.0 (the "License"); *
22* you may not use this file except in compliance with the License. *
23* You may obtain a copy of the License at *
24* *
25* http://www.apache.org/licenses/LICENSE-2.0 *
26* *
27* Unless required by applicable law or agreed to in writing, software *
28* distributed under the License is distributed on an "AS IS" BASIS, *
29* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
30* See the License for the specific language governing permissions and *
31* limitations under the License. *
32* *
33****************************************************************************/
34
35#ifndef __VK_TGUI_CONTROLS_SLIDER_H__
36#define __VK_TGUI_CONTROLS_SLIDER_H__
37
38/*============================ INCLUDES ======================================*/
39
40#include "./vsf_tgui_control.h"
41
42#if VSF_TGUI_CFG_SUPPORT_SLIDER == ENABLED
43
49#if defined(__VK_TGUI_CONTROLS_SLIDER_CLASS_IMPLEMENT)
50# define __PLOOC_CLASS_IMPLEMENT__
51# undef __VK_TGUI_CONTROLS_SLIDER_CLASS_IMPLEMENT
52#elif defined(__VK_TGUI_CONTROLS_SLIDER_CLASS_INHERIT)
53# define __PLOOC_CLASS_INHERIT__
54# undef __VK_TGUI_CONTROLS_SLIDER_CLASS_INHERIT
55#endif
56
57#include "utilities/ooc_class.h"
58
59#ifdef __cplusplus
60extern "C" {
61#endif
62
63/*============================ MACROS ========================================*/
64
65#if VSF_TGUI_CFG_SUPPORT_TIMER == DISABLED
66# error tgui_slider depends on tgui_timer service, please either enable \
67tgui_timer by setting VSF_TGUI_CFG_SUPPORT_TIMER to ENABLED or disable \
68tgui_slider by setting VSF_TGUI_CFG_SUPPORT_SLIDER to DISABLED
69#endif
70
71
72/*============================ MACROFIED FUNCTIONS ===========================*/
73/*============================ TYPES =========================================*/
74
75declare_class(__vk_tgui_slider_t)
76
77def_class(__vk_tgui_slider_t,
78
79 public_member(
82 )
83
84 protected_member(
85 struct {
89 } tPosition;
90 )
91
92 private_member(
93 vsf_tgui_timer_t tSlideTimer;
94 vsf_systimer_tick_t tOldTimeTick;
95 )
96
97)
98end_def_class(__vk_tgui_slider_t)
99
100/*============================ GLOBAL VARIABLES ==============================*/
101/*============================ PROTOTYPES ====================================*/
102
103extern
104void vk_tgui_slider_init( __vk_tgui_slider_t *ptSlider,
105 const vsf_tgui_control_t *ptHost,
106 uint_fast8_t chFrameRatePerSec);
107
108extern
109int_fast16_t vk_tgui_slider_on_timer_event_handler(__vk_tgui_slider_t *ptSlider);
110
111extern
112bool vk_tgui_slider_is_working(__vk_tgui_slider_t *ptSlider);
113
114extern
115int_fast16_t vk_tgui_slider_location_set( __vk_tgui_slider_t *ptSlider,
118
119extern
120int_fast16_t vk_tgui_slider_location_target_set( __vk_tgui_slider_t *ptSlider,
121 int_fast16_t iLocation);
122extern
123int_fast16_t vk_tgui_slider_location_target_get( __vk_tgui_slider_t *ptSlider);
124
125extern
126int_fast16_t vk_tgui_slider_location_target_increase( __vk_tgui_slider_t *ptSlider,
127 int_fast16_t iOffset);
128
129extern
130int_fast16_t vk_tgui_slider_location_current_get( __vk_tgui_slider_t *ptSlider);
131
132extern
133int_fast16_t vk_tgui_slider_location_current_set( __vk_tgui_slider_t *ptSlider,
134 int_fast16_t iLocation);
135
136extern
137int_fast16_t vk_tgui_slider_location_current_increase( __vk_tgui_slider_t *ptSlider,
138 int_fast16_t iOffset);
139
140extern
141int_fast16_t vk_tgui_slider_location_get_distance( __vk_tgui_slider_t *ptSlider);
142
143extern
144int_fast16_t vk_tgui_slider_reset(__vk_tgui_slider_t *ptSlider);
145
146#ifdef __cplusplus
147}
148#endif
149
150#endif
151#endif
152/* EOF */
153
uint16_t hwAcceleration
Definition __vk_tgui_slider.h:82
int16_t iResidual
Definition __vk_tgui_slider.h:90
int16_t iCurrent
Definition __vk_tgui_slider.h:90
uint16_t hwSpeed
Definition __vk_tgui_slider.h:82
int16_t iTarget
Definition __vk_tgui_slider.h:90
declare_class(__vk_tgui_slider_t) def_class(__vk_tgui_slider_t
struct @135 tPosition
uint64_t vsf_systimer_tick_t
Definition cortex_a_generic.h:73
signed short int16_t
Definition lvgl.h:42
unsigned short uint16_t
Definition lvgl.h:41
unsigned char uint_fast8_t
Definition stdint.h:23
short int_fast16_t
Definition stdint.h:24
def_class(vsf_stream_fifo_t, which(vsf_stream_tx_t TX;vsf_stream_rx_t RX;), private:vsf_slist_queue_t union { vsf_stream_fifo_cfg_t cfg;struct { vsf_stream_dat_rdy_evt_t tDataReadyEventHandling;vsf_stream_dat_drn_evt_t tDataDrainEventHandling;vsf_stream_status_t Status;#if !defined(VSF_PBUF_QUEUE_CFG_ATOM_ACCESS) vsf_protect_region_t *pregion;#endif };};) end_def_class(vsf_stream_fifo_t) extern vsf_err_t vsf_stream_fifo_init(vsf_stream_fifo_t *obj_ptr
struct vsf_tgui_control_t vsf_tgui_control_t
Definition vsf_tgui_common.h:555