• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef HI_GV_PROGRESSBAR_H
17 #define HI_GV_PROGRESSBAR_H
18 
19 /* add include here */
20 #include "hi_go_comm.h"
21 #include "hi_gv_conf.h"
22 
23 #ifdef HIGV_USE_WIDGET_PROGRESSBAR
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* the macro of horizontal style */
29 #define PROGRESSBAR_STYLE_HORIZON 0x1
30 
31 /* the macro of vertical style */
32 #define PROGRESSBAR_STYLE_VERTICAL 0x2
33 
34 
35 /* Horizontal style */
36 #define HIGV_PROGRESSBAR_STYLE_HORIZON HIGV_STYLE_DEFINE(HIGV_WIDGET_PROGRESS, PROGRESSBAR_STYLE_HORIZON)
37 
38 /* Vertical style */
39 #define HIGV_PROGRESSBAR_STYLE_VERTICAL HIGV_STYLE_DEFINE(HIGV_WIDGET_PROGRESS, PROGRESSBAR_STYLE_VERTICAL)
40 
41 /*
42 * brief Set range of progressbar.
43 * param[in] progressBarHandle Progressbar handle.
44 * param[in] min    Min valude.
45 * param[in] max  Max value.
46 * retval ::HI_SUCCESS
47 * retval ::HI_ERR_COMM_LOST
48 * retval ::HI_ERR_COMM_INVAL
49 */
50 HI_S32 HI_GV_ProgressBar_SetRange(HIGV_HANDLE progressBarHandle, HI_U32 min, HI_U32 max);
51 
52 /*
53 * brief Set step.
54 * param[in] progressBarHandle Progressbar handle.
55 * param[in] step   step.
56 * retval ::HI_SUCCESS
57 * retval ::HI_ERR_COMM_LOST
58 * retval ::HI_ERR_COMM_INVAL
59 */
60 HI_S32 HI_GV_ProgressBar_SetStep(HIGV_HANDLE progressBarHandle, HI_U32 step);
61 
62 /*
63 * brief Set the posithion of progressbar.
64 * attention :If set pos out of the range, value will be min or max, return HI_SUCCESS.
65 *
66 * param[in] progressBarHandle Progressbar handle.
67 * param[in] pos
68 * retval ::HI_SUCCESS
69 * \retval ::HI_ERR_COMM_LOST
70 * see :: HI_GV_ProgressBar_GetPos
71 */
72 HI_S32 HI_GV_ProgressBar_SetPos(HIGV_HANDLE progressBarHandle, HI_U32 pos);
73 
74 /*
75 * brief Get the posithion of progressbar.
76 * param[in] progressBarHandle Progressbar handle.
77 * param[out] pos  Position.
78 * retval ::HI_SUCCESS
79 * retval ::HI_ERR_COMM_LOST
80 * retval ::HI_ERR_COMM_INVAL
81 * see ::HI_GV_ProgressBar_SetPos
82 */
83 HI_S32 HI_GV_ProgressBar_GetPos(HIGV_HANDLE progressBarHandle, HI_U32 *pos);
84 
85 /*
86 * brief Set the freground of progressbar.
87 * param[in] progressBarHandle  Progressbar handle.
88 * param[in] fgRect The range of progress.
89 * ΪձʾǰΧСͬ
90 * param[in] fgStyle   Fregroud style handle.
91 * retval ::HI_SUCCESS
92 * retval ::HI_ERR_COMM_LOST
93 * retval ::HI_ERR_COMM_INVAL
94 */
95 HI_S32 HI_GV_ProgressBar_SetFg(HIGV_HANDLE progressBarHandle, const HI_RECT *fgRect, HI_RESID fgStyle);
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 #endif
101 #endif /* HI_GV_PROGRESSBAR_H */
102