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
11 #ifndef MATH_CONVERTER_H
12 #define MATH_CONVERTER_H
14 #include <glib-object.h>
17 #include "math-equation.h"
22 #define MATH_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), math_converter_get_type(), MathConverter))
24 typedef struct MathConverterPrivate MathConverterPrivate
;
28 GtkHBox parent_instance
;
29 MathConverterPrivate
*priv
;
34 GtkHBoxClass parent_class
;
36 void (*changed
)(MathConverter
*converter
);
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
);
53 #endif /* MATH_CONVERTER_H */