50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
#ifndef _HEXAGRAM_CLUSTER_H
|
|
#define _HEXAGRAM_CLUSTER_H
|
|
|
|
#include <cairo.h>
|
|
|
|
#include <hexagram/can.h>
|
|
#include <hexagram/tacho.h>
|
|
#include <hexagram/speedo.h>
|
|
#include <hexagram/thermo.h>
|
|
#include <hexagram/fuel.h>
|
|
#include <hexagram/mfd.h>
|
|
|
|
typedef struct _hexagram_cluster {
|
|
hexagram_tacho tacho;
|
|
hexagram_speedo speedo;
|
|
hexagram_thermo thermo;
|
|
hexagram_fuel fuel;
|
|
hexagram_mfd mfd;
|
|
|
|
double width,
|
|
height;
|
|
|
|
struct {
|
|
double rpm, rps, temp, fuel;
|
|
} state;
|
|
} hexagram_cluster;
|
|
|
|
void hexagram_cluster_resize(hexagram_cluster *cluster,
|
|
double width,
|
|
double height);
|
|
|
|
void hexagram_cluster_init(hexagram_cluster *cluster,
|
|
double width,
|
|
double height);
|
|
|
|
hexagram_cluster *hexagram_cluster_new(double width,
|
|
double height);
|
|
|
|
int hexagram_cluster_filter_can_if(hexagram_can_if *can_if);
|
|
|
|
int hexagram_cluster_update(hexagram_cluster *cluster,
|
|
struct can_frame *frame);
|
|
|
|
void hexagram_cluster_draw_bg(hexagram_cluster *cluster,
|
|
cairo_t *cr);
|
|
|
|
void hexagram_cluster_draw_fg(hexagram_cluster *cluster,
|
|
cairo_t *cr);
|
|
|
|
#endif /* _HEXAGRAM_CLUSTER_H */
|