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 ======================================*/
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/*============================ MACROS ========================================*/
60#if VSF_TGUI_CFG_SUPPORT_TIMER == DISABLED
61# error tgui_slider depends on tgui_timer service, please either enable \
62tgui_timer by setting VSF_TGUI_CFG_SUPPORT_TIMER to ENABLED or disable \
63tgui_slider by setting VSF_TGUI_CFG_SUPPORT_SLIDER to DISABLED
64#endif
65
66
67/*============================ MACROFIED FUNCTIONS ===========================*/
68/*============================ TYPES =========================================*/
69
70declare_class(__vk_tgui_slider_t)
71
72def_class(__vk_tgui_slider_t,
73
74 public_member(
77 )
78
79 protected_member(
80 struct {
84 } tPosition;
85 )
86
87 private_member(
88 vsf_tgui_timer_t tSlideTimer;
89 vsf_systimer_tick_t tOldTimeTick;
90 )
91
92)
93end_def_class(__vk_tgui_slider_t)
94
95/*============================ GLOBAL VARIABLES ==============================*/
96/*============================ PROTOTYPES ====================================*/
97
98extern
99void vk_tgui_slider_init( __vk_tgui_slider_t *ptSlider,
100 const vsf_tgui_control_t *ptHost,
101 uint_fast8_t chFrameRatePerSec);
102
103extern
104int_fast16_t vk_tgui_slider_on_timer_event_handler(__vk_tgui_slider_t *ptSlider);
105
106extern
107bool vk_tgui_slider_is_working(__vk_tgui_slider_t *ptSlider);
108
109extern
110int_fast16_t vk_tgui_slider_location_set( __vk_tgui_slider_t *ptSlider,
113
114extern
115int_fast16_t vk_tgui_slider_location_target_set( __vk_tgui_slider_t *ptSlider,
116 int_fast16_t iLocation);
117extern
118int_fast16_t vk_tgui_slider_location_target_get( __vk_tgui_slider_t *ptSlider);
119
120extern
121int_fast16_t vk_tgui_slider_location_target_increase( __vk_tgui_slider_t *ptSlider,
122 int_fast16_t iOffset);
123
124extern
125int_fast16_t vk_tgui_slider_location_current_get( __vk_tgui_slider_t *ptSlider);
126
127extern
128int_fast16_t vk_tgui_slider_location_current_set( __vk_tgui_slider_t *ptSlider,
129 int_fast16_t iLocation);
130
131extern
132int_fast16_t vk_tgui_slider_location_current_increase( __vk_tgui_slider_t *ptSlider,
133 int_fast16_t iOffset);
134
135extern
136int_fast16_t vk_tgui_slider_location_get_distance( __vk_tgui_slider_t *ptSlider);
137
138extern
139int_fast16_t vk_tgui_slider_reset(__vk_tgui_slider_t *ptSlider);
140
141#endif
142#endif
143/* EOF */
144
uint16_t hwAcceleration
Definition __vk_tgui_slider.h:77
int16_t iResidual
Definition __vk_tgui_slider.h:85
int16_t iCurrent
Definition __vk_tgui_slider.h:85
uint16_t hwSpeed
Definition __vk_tgui_slider.h:77
int16_t iTarget
Definition __vk_tgui_slider.h:85
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
unsigned short uint16_t
Definition stdint.h:7
unsigned char uint_fast8_t
Definition stdint.h:23
short int16_t
Definition stdint.h:6
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:506