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 = GtkIMMulticontext.html 27 * outPack = gtk 28 * outFile = IMMulticontext 29 * strct = GtkIMMulticontext 30 * realStrct= 31 * ctorStrct= 32 * clss = IMMulticontext 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_im_multicontext_ 41 * - gtk_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - glib.Str 48 * - gtk.IMContext 49 * - gtk.MenuShell 50 * structWrap: 51 * - GtkIMContext* -> IMContext 52 * - GtkMenuShell* -> MenuShell 53 * module aliases: 54 * local aliases: 55 * overrides: 56 */ 57 58 module gtk.IMMulticontext; 59 60 public import gtkc.gtktypes; 61 62 private import gtkc.gtk; 63 private import glib.ConstructionException; 64 private import gobject.ObjectG; 65 66 67 private import glib.Str; 68 private import gtk.IMContext; 69 private import gtk.MenuShell; 70 71 72 73 private import gtk.IMContext; 74 75 /** 76 * Description 77 */ 78 public class IMMulticontext : IMContext 79 { 80 81 /** the main Gtk struct */ 82 protected GtkIMMulticontext* gtkIMMulticontext; 83 84 85 public GtkIMMulticontext* getIMMulticontextStruct() 86 { 87 return gtkIMMulticontext; 88 } 89 90 91 /** the main Gtk struct as a void* */ 92 protected override void* getStruct() 93 { 94 return cast(void*)gtkIMMulticontext; 95 } 96 97 /** 98 * Sets our main struct and passes it to the parent class 99 */ 100 public this (GtkIMMulticontext* gtkIMMulticontext) 101 { 102 super(cast(GtkIMContext*)gtkIMMulticontext); 103 this.gtkIMMulticontext = gtkIMMulticontext; 104 } 105 106 protected override void setStruct(GObject* obj) 107 { 108 super.setStruct(obj); 109 gtkIMMulticontext = cast(GtkIMMulticontext*)obj; 110 } 111 112 /** 113 */ 114 115 /** 116 * Creates a new GtkIMMulticontext. 117 * Returns: a new GtkIMMulticontext. 118 */ 119 public static IMContext newIMMulticontext() 120 { 121 // GtkIMContext * gtk_im_multicontext_new (void); 122 auto p = gtk_im_multicontext_new(); 123 124 if(p is null) 125 { 126 return null; 127 } 128 129 return ObjectG.getDObject!(IMContext)(cast(GtkIMContext*) p); 130 } 131 132 /** 133 * Add menuitems for various available input methods to a menu; 134 * the menuitems, when selected, will switch the input method 135 * for the context and the global default input method. 136 * Params: 137 * menushell = a GtkMenuShell 138 */ 139 public void appendMenuitems(MenuShell menushell) 140 { 141 // void gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context, GtkMenuShell *menushell); 142 gtk_im_multicontext_append_menuitems(gtkIMMulticontext, (menushell is null) ? null : menushell.getMenuShellStruct()); 143 } 144 145 /** 146 * Gets the id of the currently active slave of the context. 147 * Since 2.16 148 * Returns: the id of the currently active slave 149 */ 150 public string getContextId() 151 { 152 // const char * gtk_im_multicontext_get_context_id (GtkIMMulticontext *context); 153 return Str.toString(gtk_im_multicontext_get_context_id(gtkIMMulticontext)); 154 } 155 156 /** 157 * Sets the context id for context. 158 * This causes the currently active slave of context to be 159 * replaced by the slave corresponding to the new context id. 160 * Since 2.16 161 * Params: 162 * context = a GtkIMMulticontext 163 * contextId = the id to use 164 */ 165 public void setContextId(string contextId) 166 { 167 // void gtk_im_multicontext_set_context_id (GtkIMMulticontext *context, const char *context_id); 168 gtk_im_multicontext_set_context_id(gtkIMMulticontext, Str.toStringz(contextId)); 169 } 170 }