~ubuntu-branches/ubuntu/precise/gcalctool/precise-proposed

« back to all changes in this revision

Viewing changes to src/unit-manager.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2011-02-01 14:37:04 UTC
  • mfrom: (1.3.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20110201143704-ipo3nv351hrcfrlf
Tags: 5.91.6-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef UNIT_MANAGER_H
 
2
#define UNIT_MANAGER_H
 
3
 
 
4
#include <glib-object.h>
 
5
#include "unit-category.h"
 
6
#include "mp.h"
 
7
 
 
8
G_BEGIN_DECLS
 
9
 
 
10
#define UNIT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), unit_manager_get_type(), UnitManager))
 
11
 
 
12
typedef struct UnitManagerPrivate UnitManagerPrivate;
 
13
 
 
14
typedef struct
 
15
{
 
16
    GObject parent_instance;
 
17
    UnitManagerPrivate *priv;
 
18
} UnitManager;
 
19
 
 
20
typedef struct
 
21
{
 
22
    GObjectClass parent_class;
 
23
} UnitManagerClass;
 
24
 
 
25
GType unit_manager_get_type(void);
 
26
 
 
27
UnitManager *unit_manager_get_default(void);
 
28
 
 
29
UnitCategory *unit_manager_add_category(UnitManager *manager, const gchar *name, const gchar *display_name);
 
30
 
 
31
const GList *unit_manager_get_categories(UnitManager *manager);
 
32
 
 
33
UnitCategory *unit_manager_get_category(UnitManager *manager, const gchar *category);
 
34
 
 
35
Unit *unit_manager_get_unit(UnitManager *manager, const gchar *unit);
 
36
 
 
37
gboolean unit_manager_convert(UnitManager *manager, const MPNumber *x, const char *x_units, const char *z_units, MPNumber *z);
 
38
 
 
39
G_END_DECLS
 
40
 
 
41
#endif /* UNIT_MANAGER_H */