blob: 2bc3cba15aa8587e7ddefc22aaa85828a863809e [file] [log] [blame]
Nathan Scottf0ed0fd2021-06-23 17:44:56 +10001#ifndef HEADER_DynamicMeter
2#define HEADER_DynamicMeter
Benny Baumann8e4ce182023-05-24 11:14:25 +02003/*
4htop - DynamicMeter.h
5(C) 2021 htop dev team
6(C) 2021 Red Hat, Inc. All Rights Reserved.
7Released under the GNU GPLv2+, see the COPYING file
8in the source distribution for its full text.
9*/
Nathan Scottf0ed0fd2021-06-23 17:44:56 +100010
Sohaib Mohamed6f2021f2021-07-11 03:11:29 +020011#include <stdbool.h>
12
Sohaib Mohamed90b209e2021-07-18 06:25:45 +020013#include "Hashtable.h"
Nathan Scottf0ed0fd2021-06-23 17:44:56 +100014#include "Meter.h"
15
16
17typedef struct DynamicMeter_ {
18 char name[32]; /* unique name, cannot contain spaces */
19 char* caption;
20 char* description;
21 unsigned int type;
22 double maximum;
Nathan Scottf0ed0fd2021-06-23 17:44:56 +100023} DynamicMeter;
24
25Hashtable* DynamicMeters_new(void);
26
Nathan Scottc0c2bb92021-09-03 12:11:31 +100027void DynamicMeters_delete(Hashtable* dynamics);
28
Christian Göttschec3746dc2021-08-22 17:14:29 +020029const char* DynamicMeter_lookup(Hashtable* dynamics, unsigned int key);
Nathan Scottf0ed0fd2021-06-23 17:44:56 +100030
Nathan Scottbf853ad2021-07-12 16:51:19 +100031bool DynamicMeter_search(Hashtable* dynamics, const char* name, unsigned int* key);
Nathan Scottf0ed0fd2021-06-23 17:44:56 +100032
33extern const MeterClass DynamicMeter_class;
34
35#endif