Fix incorrect spelling of ones' and two's complement (Bug #642457)
[gcalctool.git] / src / math-converter.h
blobe2fc04d36f26feed24cd16d989c217e3979c6f8f
1 /* Copyright (c) 2008-2009 Robert Ancell
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2, or (at your option)
6 * any later version.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
16 * 02111-1307, USA.
19 #ifndef MATH_CONVERTER_H
20 #define MATH_CONVERTER_H
22 #include <glib-object.h>
23 #include <gtk/gtk.h>
25 #include "math-equation.h"
26 #include "unit.h"
28 G_BEGIN_DECLS
30 #define MATH_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), math_converter_get_type(), MathConverter))
32 typedef struct MathConverterPrivate MathConverterPrivate;
34 typedef struct
36 GtkHBox parent_instance;
37 MathConverterPrivate *priv;
38 } MathConverter;
40 typedef struct
42 GtkHBoxClass parent_class;
44 void (*changed)(MathConverter *converter);
45 } MathConverterClass;
47 GType math_converter_get_type(void);
49 MathConverter *math_converter_new(MathEquation *equation);
51 void math_converter_set_category(MathConverter *converter, const gchar *category);
53 const gchar *math_converter_get_category(MathConverter *converter);
55 void math_converter_set_conversion(MathConverter *converter, /*const gchar *category,*/ const gchar *unit_a, const gchar *unit_b);
57 void math_converter_get_conversion(MathConverter *converter, Unit **from_unit, Unit **to_unit);
59 G_END_DECLS
61 #endif /* MATH_CONVERTER_H */