summaryrefslogtreecommitdiff
path: root/gen/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'gen/map.h')
-rw-r--r--gen/map.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/gen/map.h b/gen/map.h
new file mode 100644
index 0000000..9ce72e4
--- /dev/null
+++ b/gen/map.h
@@ -0,0 +1,54 @@
+/*
+ * This file is part of preppie.
+ *
+ * Copyright (C) 2010 Mikhail Zabaluev <mikhail.zabaluev@gmail.com>
+ *
+ * This work is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This work is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this work; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#ifndef _PREPPIE_GEN_MAP_H_
+#define _PREPPIE_GEN_MAP_H_
+
+#include <glib.h>
+#include <preppie/profile-format.h>
+#include "mapping-rep.h"
+
+G_BEGIN_DECLS
+
+
+typedef struct _SprepGenMap SprepGenMap;
+typedef struct _SprepGenMapPage SprepGenMapPage;
+
+struct _SprepGenMapPage {
+ const SprepGenMapping **mappings;
+ guint offset;
+};
+
+struct _SprepGenMap {
+ SprepGenMapPage pages[SPREP_PAGE_TABLE_SIZE];
+};
+
+SprepGenMap * sprep_gen_map_new ();
+void sprep_gen_map_destroy (SprepGenMap *map);
+void sprep_gen_map_add (SprepGenMap *map,
+ gunichar key,
+ const SprepGenMapping *value);
+gsize sprep_gen_map_prepare_layout (SprepGenMap *map);
+
+
+G_END_DECLS
+
+#endif /* _PREPPIE_GEN_MAP_H_ */