Support both μs and us for entering microseconds
[gcalctool.git] / src / currency.h
blob663ece7862fe7c85bdd99ef1f409a7539f72e416
1 /*
2 * Copyright (C) 2008-2011 Robert Ancell.
4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License as published by the Free Software
6 * Foundation, either version 2 of the License, or (at your option) any later
7 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
8 * license.
9 */
11 #ifndef CURRENCY_H
12 #define CURRENCY_H
14 #include <glib-object.h>
15 #include "mp.h"
17 G_BEGIN_DECLS
19 #define CURRENCY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), currency_get_type(), Currency))
21 typedef struct CurrencyPrivate CurrencyPrivate;
23 typedef struct
25 GObject parent_instance;
26 CurrencyPrivate *priv;
27 } Currency;
29 typedef struct
31 GObjectClass parent_class;
32 } CurrencyClass;
34 GType currency_get_type(void);
36 Currency *currency_new(const gchar *name,
37 const gchar *display_name,
38 const gchar *symbol);
40 const gchar *currency_get_name(Currency *currency);
42 const gchar *currency_get_short_display_name(Currency *currency);
44 const gchar *currency_get_display_name(Currency *currency);
46 const gchar *currency_get_symbol(Currency *currency);
48 void currency_set_value(Currency *currency, MPNumber *value);
50 const MPNumber *currency_get_value(Currency *currency);
52 G_END_DECLS
54 #endif /* CURRENCY_H */