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 = GtkActionable.html 27 * outPack = gtk 28 * outFile = ActionableIF 29 * strct = GtkActionable 30 * realStrct= 31 * ctorStrct= 32 * clss = ActionableT 33 * interf = ActionableIF 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_actionable_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * - glib.Str 47 * - glib.Variant 48 * structWrap: 49 * - GVariant* -> Variant 50 * module aliases: 51 * local aliases: 52 * overrides: 53 */ 54 55 module gtk.ActionableIF; 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 glib.Str; 65 private import glib.Variant; 66 67 68 69 70 /** 71 * This interface provides a convenient way of associating widgets with 72 * actions on a GtkApplicationWindow or GtkApplication. 73 * 74 * It primarily consists of two properties: "action-name" 75 * and "action-target". There are also some convenience APIs 76 * for setting these properties. 77 * 78 * This interface is presently only meaningful if used on a widget that 79 * is (or will be) located inside of a GtkApplicationWindow and can 80 * only be used to associate the widget with actions on that window, or 81 * its associated GtkApplication. 82 */ 83 public interface ActionableIF 84 { 85 86 87 public GtkActionable* getActionableTStruct(); 88 89 /** the main Gtk struct as a void* */ 90 protected void* getStruct(); 91 92 93 /** 94 */ 95 96 /** 97 * Gets the action name for actionable. 98 * See gtk_actionable_set_action_name() for more information. 99 * Returns: the action name, or NULL if none is set Since 3.4 100 */ 101 public string getActionName(); 102 103 /** 104 * Specifies the name of the action with which this widget should be 105 * associated. If action_name is NULL then the widget will be 106 * unassociated from any previous action. 107 * Usually this function is used when the widget is located (or will be 108 * located) within the hierarchy of a GtkApplicationWindow. 109 * Names are of the form "win.save" or "app.quit" for actions on the 110 * containing GtkApplicationWindow or its associated GtkApplication, 111 * respectively. This is the same form used for actions in the GMenu 112 * associated with the window. 113 * Params: 114 * actionName = an action name, or NULL 115 * Since 3.4 116 */ 117 public void setActionName(string actionName); 118 119 /** 120 * Gets the current target value of actionabe. 121 * See gtk_actionable_set_action_target_value() for more information. 122 * Returns: the current target value. [transfer none] Since 3.4 123 */ 124 public Variant getActionTargetValue(); 125 126 /** 127 * Sets the target value of an actionable widget. 128 * If target_value is NULL then the target value is unset. 129 * The target value has two purposes. First, it is used as the 130 * parameter to activation of the action associated with the 131 * GtkActionable widget. Second, it is used to determine if the widget 132 * should be rendered as "active" - the widget is active if the state 133 * is equal to the given target. 134 * Consider the example of associating a set of buttons with a GAction 135 * with string state in a typical "radio button" situation. Each button 136 * will be associated with the same action, but with a different target 137 * value for that action. Clicking on a particular button will activate 138 * the action with the target of that button, which will typically cause 139 * the action's state to change to that value. Since the action's state 140 * is now equal to the target value of the button, the button will now 141 * be rendered as active (and the other buttons, with different targets, 142 * rendered inactive). 143 * Params: 144 * targetValue = a GVariant to set as the target value, or NULL 145 * Since 3.4 146 */ 147 public void setActionTargetValue(Variant targetValue); 148 149 /** 150 * Sets the action-name and associated string target value of an 151 * actionable widget. 152 * This allows for the effect of both gtk_actionable_set_action_name() 153 * and gtk_actionable_set_action_target_value() in the common case that 154 * the target is string-valued. 155 * detailed_action_name is a string of the form 156 * "action::target" where action 157 * is the action name and target is the string to use 158 * as the target. 159 * Params: 160 * detailedActionName = the detailed action name 161 * Since 3.4 162 */ 163 public void setDetailedActionName(string detailedActionName); 164 }