Make the currency code OO
[gcalctool.git] / src / currency.h
blobf7f761b25759edd20e2aa0cadb5835b520c37d3f
1 #ifndef CURRENCY_H
2 #define CURRENCY_H
4 #include <glib-object.h>
5 #include "mp.h"
7 G_BEGIN_DECLS
9 #define CURRENCY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), currency_get_type(), Currency))
11 typedef struct CurrencyPrivate CurrencyPrivate;
13 typedef struct
15 GObject parent_instance;
16 CurrencyPrivate *priv;
17 } Currency;
19 typedef struct
21 GObjectClass parent_class;
22 } CurrencyClass;
24 GType currency_get_type(void);
26 Currency *currency_new(const gchar *name, const gchar *display_name, const gchar *symbol);
28 const gchar *currency_get_name(Currency *currency);
30 const gchar *currency_get_display_name(Currency *currency);
32 const gchar *currency_get_symbol(Currency *currency);
34 void currency_set_value(Currency *currency, MPNumber *value);
36 const MPNumber *currency_get_value(Currency *currency);
38 G_END_DECLS
40 #endif /* CURRENCY_H */