Updated Latvian translation and added Latvian translation for help by Viesturs Ružāns...
[gcalctool.git] / src / math-converter.h
blobf67b4256383631ea4e899d7d50dcf148574de362
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 MATH_CONVERTER_H
12 #define MATH_CONVERTER_H
14 #include <glib-object.h>
15 #include <gtk/gtk.h>
17 #include "math-equation.h"
18 #include "unit.h"
20 G_BEGIN_DECLS
22 #define MATH_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), math_converter_get_type(), MathConverter))
24 typedef struct MathConverterPrivate MathConverterPrivate;
26 typedef struct
28 GtkHBox parent_instance;
29 MathConverterPrivate *priv;
30 } MathConverter;
32 typedef struct
34 GtkHBoxClass parent_class;
36 void (*changed)(MathConverter *converter);
37 } MathConverterClass;
39 GType math_converter_get_type(void);
41 MathConverter *math_converter_new(MathEquation *equation);
43 void math_converter_set_category(MathConverter *converter, const gchar *category);
45 const gchar *math_converter_get_category(MathConverter *converter);
47 void math_converter_set_conversion(MathConverter *converter, /*const gchar *category,*/ const gchar *unit_a, const gchar *unit_b);
49 void math_converter_get_conversion(MathConverter *converter, Unit **from_unit, Unit **to_unit);
51 G_END_DECLS
53 #endif /* MATH_CONVERTER_H */