hexagram/include/hexagram/cluster.h

58 lines
1.6 KiB
C

#ifndef _HEXAGRAM_CLUSTER_H
#define _HEXAGRAM_CLUSTER_H
#include <cairo.h>
#include <hexagram/list.h>
#include <hexagram/can.h>
#include <hexagram/pattern.h>
#include <hexagram/speedo.h>
#include <hexagram/fuel.h>
#include <hexagram/tacho.h>
#include <hexagram/thermo.h>
#include <hexagram/odo.h>
#include <hexagram/temp.h>
#include <hexagram/clock.h>
#include <hexagram/status.h>
#define HEXAGRAM_CLUSTER_GAUGE_COUNT 9
typedef struct _hexagram_cluster {
double width,
height;
hexagram_pattern pattern;
hexagram_speedo speedo;
hexagram_fuel fuel;
hexagram_tacho tacho;
hexagram_thermo thermo;
hexagram_odo odo;
hexagram_temp temp;
hexagram_clock clock;
hexagram_status_icon_box status;
hexagram_tacho_shift_indicator shift_indicator;
hexagram_gauge *gauges[HEXAGRAM_CLUSTER_GAUGE_COUNT];
} hexagram_cluster;
int hexagram_cluster_init(hexagram_cluster *cluster,
double rpm_min,
double rpm_redline,
double rpm_max);
void hexagram_cluster_cleanup(hexagram_cluster *cluster);
hexagram_cluster *hexagram_cluster_new(double rpm_min,
double rpm_redline,
double rpm_max);
void hexagram_cluster_destroy(hexagram_cluster *cluster);
int hexagram_cluster_filter_can_if(hexagram_can_if *can_if);
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 */