forked from sam-itt/sofis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroll-slip-gauge.h
46 lines (36 loc) · 1012 Bytes
/
roll-slip-gauge.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* SPDX-FileCopyrightText: 2021 Samuel Cuella <samuel.cuella@gmail.com>
*
* This file is part of SoFIS - an open source EFIS
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef ROLL_SLIP_GAUGE_H
#define ROLL_SLIP_GAUGE_H
#include <SDL2/SDL.h>
#include "sfv-gauge.h"
#include "generic-layer.h"
typedef struct{
SDL_Rect slip_rect;
#if !USE_SDL_GPU
SDL_Surface *rbuffer; /*rotation buffer*/
#endif
}RollSlipGaugeState;
typedef struct{
SfvGauge super;
float slip;
GenericLayer arc;
GenericLayer marker;
GenericLayer slip_marker;
#if !USE_SDL_GPU
SDL_Texture *arc_texture;
SDL_Renderer *renderer;
#endif
SDL_Rect marker_rect;
RollSlipGaugeState state;
}RollSlipGauge;
RollSlipGauge *roll_slip_gauge_new(void);
RollSlipGauge *roll_slip_gauge_init(RollSlipGauge *self);
bool roll_slip_gauge_set_value(RollSlipGauge *self, float value, bool animated);
bool roll_slip_gauge_set_slip(RollSlipGauge *self, float value, bool animated);
#endif /* ROLL_SLIP_GAUGE_H */