1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 /* 25 * Conversion parameters: 26 * inFile = GtkIMContextSimple.html 27 * outPack = gtk 28 * outFile = IMContextSimple 29 * strct = GtkIMContextSimple 30 * realStrct= 31 * ctorStrct= 32 * clss = IMContextSimple 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_im_context_simple_ 41 * - gtk_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - gtk.IMContext 48 * structWrap: 49 * - GtkIMContext* -> IMContext 50 * module aliases: 51 * local aliases: 52 * overrides: 53 */ 54 55 module gtk.IMContextSimple; 56 57 public import gtkc.gtktypes; 58 59 private import gtkc.gtk; 60 private import glib.ConstructionException; 61 private import gobject.ObjectG; 62 63 64 private import gtk.IMContext; 65 66 67 68 private import gtk.IMContext; 69 70 /** 71 * Description 72 */ 73 public class IMContextSimple : IMContext 74 { 75 76 /** the main Gtk struct */ 77 protected GtkIMContextSimple* gtkIMContextSimple; 78 79 80 public GtkIMContextSimple* getIMContextSimpleStruct() 81 { 82 return gtkIMContextSimple; 83 } 84 85 86 /** the main Gtk struct as a void* */ 87 protected override void* getStruct() 88 { 89 return cast(void*)gtkIMContextSimple; 90 } 91 92 /** 93 * Sets our main struct and passes it to the parent class 94 */ 95 public this (GtkIMContextSimple* gtkIMContextSimple) 96 { 97 super(cast(GtkIMContext*)gtkIMContextSimple); 98 this.gtkIMContextSimple = gtkIMContextSimple; 99 } 100 101 protected override void setStruct(GObject* obj) 102 { 103 super.setStruct(obj); 104 gtkIMContextSimple = cast(GtkIMContextSimple*)obj; 105 } 106 107 /** 108 */ 109 110 /** 111 * Creates a new GtkIMContextSimple. 112 * Returns: a new GtkIMContextSimple. 113 */ 114 public static IMContext newIMContextSimple() 115 { 116 // GtkIMContext * gtk_im_context_simple_new (void); 117 auto p = gtk_im_context_simple_new(); 118 119 if(p is null) 120 { 121 return null; 122 } 123 124 return ObjectG.getDObject!(IMContext)(cast(GtkIMContext*) p); 125 } 126 127 /** 128 * Adds an additional table to search to the input context. 129 * Each row of the table consists of max_seq_len key symbols 130 * followed by two guint16 interpreted as the high and low 131 * words of a gunicode value. Tables are searched starting 132 * from the last added. 133 * The table must be sorted in dictionary order on the 134 * numeric value of the key symbol fields. (Values beyond 135 * the length of the sequence should be zero.) 136 * Params: 137 * data = the table 138 * maxSeqLen = Maximum length of a sequence in the table 139 * (cannot be greater than GTK_MAX_COMPOSE_LEN) 140 */ 141 public void addTable(ushort[] data, int maxSeqLen) 142 { 143 // void gtk_im_context_simple_add_table (GtkIMContextSimple *context_simple, guint16 *data, gint max_seq_len, gint n_seqs); 144 gtk_im_context_simple_add_table(gtkIMContextSimple, data.ptr, maxSeqLen, cast(int) data.length); 145 } 146 }