cfd6d7f9cf03abe48c06481974c019397e3222e1
[m17n/m17n-lib-cs.git] / MInputMethod.cs
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4 using System.IO;
5 using M17N;
6 using M17N.Core;
7 using M17N.Input;
8
9 namespace M17N.Input
10 {
11   public class MInputMethod
12   {
13     private class MInputAction
14     {
15       MExpression[] expr_list;
16     }
17
18     private class MInputMethodMap
19     {
20       public MSymbol name;
21       private MSymbol[] keys;
22       private MInputAction[] actions;
23     }
24
25     private class MInputMethodBranch
26     {
27       public MSymbol name;
28       private MInputAction[] actions;
29     }
30
31     private class MInputMethodState
32     {
33       public MText title;
34       public MSymbol name;
35       public MInputMethodBranch[] branches;
36     }
37
38     public readonly MSymbol language;
39     public readonly MSymbol name;
40     public readonly MSymbol subname;
41
42     private MDatabase mdb;
43     private MText description;
44     private MText title;
45     private MPlist commands;
46     private MPlist variables;
47     private MPlist maps;
48     private MPlist states;
49     private MPlist macros;
50     private MPlist externals;
51
52     public MInputMethod (MSymbol language, MSymbol name, MSymbol extra)
53     {
54       MDatabase.Tag tag = new MDatabase.Tag (language, name, extra);
55
56       mdb = MDatabase.Find (tag);
57       if (mdb == null)
58         throw new Exception (String.Format ("Input method {0} not available",
59                                             tag));
60       MPlist plist = (MPlist) mdb.Load ();
61     }
62   }
63 }