1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY!
2 #ifndef _GIOMM_ACTION_H
3 #define _GIOMM_ACTION_H
4 
5 #include <giommconfig.h>
6 
7 
8 #include <glibmm/ustring.h>
9 #include <sigc++/sigc++.h>
10 
11 /* Copyright (C) 2011 The giomm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
25  */
26 
27 
28 #include <glibmm/interface.h>
29 #include <glibmm/variant.h>
30 #include <glibmm/varianttype.h>
31 #include <gio/gio.h>
32 
33 
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GActionInterface GActionInterface;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37 
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 using GAction = struct _GAction;
40 using GActionClass = struct _GActionClass;
41 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
42 
43 
44 #ifndef DOXYGEN_SHOULD_SKIP_THIS
45 namespace Gio
46 { class GIOMM_API Action_Class; } // namespace Gio
47 #endif // DOXYGEN_SHOULD_SKIP_THIS
48 
49 namespace Gio
50 {
51 
52 /** Action - An action.
53  * Action represents a single named action.
54  *
55  * The main interface to an action is that it can be activated with activate().
56  * This results in the signal_activate() signal being emitted. An activation
57  * has a Glib::VariantBase parameter (which may be <tt>0</tt>). The correct
58  * type for the parameter is determined by a static parameter type (which is
59  * given at construction time).
60  *
61  * An action may optionally have a state, in which case the state may be set
62  * with change_state(). This call takes a Glib::VariantBase. The correct type
63  * for the state is determined by a static state type (which is given at
64  * construction time).
65  *
66  * The state may have a hint associated with it, specifying its valid range.
67  *
68  * Action is merely the interface to the concept of an action, as described
69  * above. Various implementations of actions exist, including SimpleAction and
70  * Gtk::Action.
71  *
72  * In all cases, the implementing class is responsible for storing the name of
73  * the action, the parameter type, the enabled state, the optional state type
74  * and the state and emitting the appropriate signals when these change. The
75  * implementor responsible for filtering calls to activate() and change_state()
76  * for type safety and for the state being enabled.
77  *
78  * Probably the only useful thing to do with a Action is to put it inside of a
79  * SimpleActionGroup.
80  *
81  * @newin{2,32}
82  */
83 
84 class GIOMM_API Action : public Glib::Interface
85 {
86 
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88 
89 public:
90   using CppObjectType = Action;
91   using CppClassType = Action_Class;
92   using BaseObjectType = GAction;
93   using BaseClassType = GActionInterface;
94 
95   // noncopyable
96   Action(const Action&) = delete;
97   Action& operator=(const Action&) = delete;
98 
99 private:
100   friend class Action_Class;
101   static CppClassType action_class_;
102 
103 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
104 protected:
105   /**
106    * You should derive from this class to use it.
107    */
108   Action();
109 
110 #ifndef DOXYGEN_SHOULD_SKIP_THIS
111   /** Called by constructors of derived classes. Provide the result of
112    * the Class init() function to ensure that it is properly
113    * initialized.
114    *
115    * @param interface_class The Class object for the derived type.
116    */
117   explicit Action(const Glib::Interface_Class& interface_class);
118 
119 public:
120   // This is public so that C++ wrapper instances can be
121   // created for C instances of unwrapped types.
122   // For instance, if an unexpected C type implements the C interface.
123   explicit Action(GAction* castitem);
124 
125 protected:
126 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
127 
128 public:
129 
130   Action(Action&& src) noexcept;
131   Action& operator=(Action&& src) noexcept;
132 
133   ~Action() noexcept override;
134 
135   static void add_interface(GType gtype_implementer);
136 
137   /** Get the GType for this class, for use with the underlying GObject type system.
138    */
139   static GType get_type()      G_GNUC_CONST;
140 
141 #ifndef DOXYGEN_SHOULD_SKIP_THIS
142   static GType get_base_type() G_GNUC_CONST;
143 #endif
144 
145   ///Provides access to the underlying C GObject.
gobj()146   GAction*       gobj()       { return reinterpret_cast<GAction*>(gobject_); }
147 
148   ///Provides access to the underlying C GObject.
gobj()149   const GAction* gobj() const { return reinterpret_cast<GAction*>(gobject_); }
150 
151 private:
152 
153 
154 public:
155 
156   /** Queries the name of @a action.
157    *
158    * @newin{2,28}
159    *
160    * @return The name of the action.
161    */
162   Glib::ustring get_name() const;
163 
164   /** Queries the type of the parameter that must be given when activating
165    *  @a action.
166    *
167    * When activating the action using g_action_activate(), the Variant
168    * given to that function must be of the type returned by this function.
169    *
170    * In the case that this function returns <tt>nullptr</tt>, you must not give any
171    * Variant, but <tt>nullptr</tt> instead.
172    *
173    * @newin{2,28}
174    *
175    * @return The parameter type.
176    */
177   Glib::VariantType get_parameter_type() const;
178 
179   /** Queries the type of the state of @a action.
180    *
181    * If the action is stateful (e.g. created with
182    * g_simple_action_new_stateful()) then this function returns the
183    * VariantType of the state.  This is the type of the initial value
184    * given as the state. All calls to g_action_change_state() must give a
185    * Variant of this type and g_action_get_state() will return a
186    * Variant of the same type.
187    *
188    * If the action is not stateful (e.g. created with g_simple_action_new())
189    * then this function will return <tt>nullptr</tt>. In that case, g_action_get_state()
190    * will return <tt>nullptr</tt> and you must not call g_action_change_state().
191    *
192    * @newin{2,28}
193    *
194    * @return The state type, if the action is stateful.
195    */
196   Glib::VariantType get_state_type() const;
197 
198   //TODO: Is there any specific type that can really be used with this? A std::list<>. We must test this.
199   //  See also ActionGroup:::get_action_state_hint().
200   /** Requests a hint about the valid range of values for the state of
201    * the action.
202    *
203    * If a null Variant is returned it either means that the action is not stateful
204    * or that there is no hint about the valid range of values for the
205    * state of the action.
206    *
207    * If a Variant array is returned then each item in the array is a
208    * possible value for the state.  If a Variant pair (ie: two-tuple) is
209    * returned then the tuple specifies the inclusive lower and upper bound
210    * of valid values for the state.
211    *
212    * In any case, the information is merely a hint.  It may be possible to
213    * have a state value outside of the hinted range and setting a value
214    * within the range may fail.
215    *
216    * @param value This will be set to the state range hint.
217    */
218   template <typename T_Value>
219   void get_state_hint(T_Value& value) const;
220 
221   //TODO: When we can break ABI, Return a Glib::VariantContainerBase,
222   // as we already do for ActionGroup::get_action_state_hint(),
223   // because that is what this returns (to specify a range).
224 
225   /** Requests a hint about the valid range of values for the state of
226    *  @a action.
227    *
228    * If <tt>nullptr</tt> is returned it either means that the action is not stateful
229    * or that there is no hint about the valid range of values for the
230    * state of the action.
231    *
232    * If a Variant array is returned then each item in the array is a
233    * possible value for the state.  If a Variant pair (ie: two-tuple) is
234    * returned then the tuple specifies the inclusive lower and upper bound
235    * of valid values for the state.
236    *
237    * In any case, the information is merely a hint.  It may be possible to
238    * have a state value outside of the hinted range and setting a value
239    * within the range may fail.
240    *
241    * The return value (if non-<tt>nullptr</tt>) should be freed with
242    * Glib::variant_unref() when it is no longer required.
243    *
244    * @newin{2,28}
245    *
246    * @return The state range hint.
247    */
248   Glib::VariantBase get_state_hint_variant() const;
249 
250 
251   /** Checks if @a action is currently enabled.
252    *
253    * An action must be enabled in order to be activated or in order to
254    * have its state changed from outside callers.
255    *
256    * @newin{2,28}
257    *
258    * @return Whether the action is enabled.
259    */
260   bool get_enabled() const;
261 
262   /** Request for the state of @a action to be changed to @a value,
263    * assuming that the action has the expected state type.
264    *
265    * See get_state_type().
266    *
267    * This call merely requests a change.  The action may refuse to change
268    * its state or may change its state to something other than @a value.
269    * See get_state_hint().
270    *
271    * @newin{2,38}
272    *
273    * @param value The new state.
274    */
275   template <typename T_Value>
276   void change_state(const T_Value& value);
277 
278   //This is just here to maintain API compatibility,
279   //by stopping the compiler from calling the
280   //regular change_state() with a Variant,
281   //if the application code previously called change_state(VariantBase).
282   template <typename T_Value>
283   void change_state(const Glib::Variant<T_Value>& value);
284 
285 
286   /** Request for the state of @a action to be changed to @a value.
287    *
288    * The action must be stateful and @a value must be of the correct type.
289    * See g_action_get_state_type().
290    *
291    * This call merely requests a change.  The action may refuse to change
292    * its state or may change its state to something other than @a value.
293    * See g_action_get_state_hint().
294    *
295    * If the @a value GVariant is floating, it is consumed.
296    *
297    * @newin{2,30}
298    *
299    * @param value The new state.
300    */
301   void change_state_variant(const Glib::VariantBase& value);
302 
303 
304 #ifndef GIOMM_DISABLE_DEPRECATED
305 
306   /** Request for the state of @a action to be changed to @a value.
307    *
308    * The action must be stateful and @a value must be of the correct type.
309    * See g_action_get_state_type().
310    *
311    * This call merely requests a change.  The action may refuse to change
312    * its state or may change its state to something other than @a value.
313    * See g_action_get_state_hint().
314    *
315    * If the @a value GVariant is floating, it is consumed.
316    *
317    * @newin{2,30}
318    *
319    * @deprecated Use the templated method instead, passing a normal C++ type.
320    *
321    * @param value The new state.
322    */
323   void change_state(const Glib::VariantBase& value);
324 #endif // GIOMM_DISABLE_DEPRECATED
325 
326 
327   /** Queries the current state of the action.
328    *
329    * If the action is not stateful then a null Variant will be returned.  If the
330    * action is stateful then the type of the return value is the type
331    * given by get_state_type().
332    *
333    * @param value This will be set to the current state of the action.
334    */
335   template <typename T_Value>
336   void get_state(T_Value& value) const;
337 
338 
339   /** Queries the current state of @a action.
340    *
341    * If the action is not stateful then <tt>nullptr</tt> will be returned.  If the
342    * action is stateful then the type of the return value is the type
343    * given by g_action_get_state_type().
344    *
345    * The return value (if non-<tt>nullptr</tt>) should be freed with
346    * Glib::variant_unref() when it is no longer required.
347    *
348    * @newin{2,28}
349    *
350    * @return The current state of the action.
351    */
352   Glib::VariantBase get_state_variant() const;
353 
354   /** Activates the action.
355    */
356   void activate();
357 
358   /** Activates the action.
359    *
360    * The @a parameter must be the correct type of parameter for the action (ie:
361    * the parameter type given at construction time), if any.
362    *
363    * @param parameter: The parameter to the activation
364    */
365   template <typename T_Value>
366   void activate(const T_Value& parameter);
367 
368   //This is just here to maintain API compatibility,
369   //by stopping the compiler from calling the
370   //regular activate() with a Variant,
371   //if the application code previously called activate(VariantBase).
372   template <typename T_Value>
373   void activate(const Glib::Variant<T_Value>& parameter);
374 
375 
376   /** Activates the action.
377    *
378    *  @a parameter must be the correct type of parameter for the action (ie:
379    * the parameter type given at construction time).  If the parameter
380    * type was <tt>nullptr</tt> then @a parameter must also be <tt>nullptr</tt>.
381    *
382    * If the @a parameter GVariant is floating, it is consumed.
383    *
384    * @newin{2,28}
385    *
386    * @param parameter The parameter to the activation.
387    */
388   void activate_variant(const Glib::VariantBase& parameter);
389 
390 
391 #ifndef GIOMM_DISABLE_DEPRECATED
392 
393   /** Activates the action.
394    *
395    *  @a parameter must be the correct type of parameter for the action (ie:
396    * the parameter type given at construction time).  If the parameter
397    * type was <tt>nullptr</tt> then @a parameter must also be <tt>nullptr</tt>.
398    *
399    * If the @a parameter GVariant is floating, it is consumed.
400    *
401    * @newin{2,28}
402    *
403    * @deprecated Use the templated method instead, passing a normal C++ type.
404    *
405    * @param parameter The parameter to the activation.
406    */
407   void activate(const Glib::VariantBase& parameter);
408 #endif // GIOMM_DISABLE_DEPRECATED
409 
410 
411   /** Checks if @a action_name is valid.
412    *
413    *  @a action_name is valid if it consists only of alphanumeric characters,
414    * plus '-' and '.'.  The empty string is not a valid action name.
415    *
416    * It is an error to call this function with a non-utf8 @a action_name.
417    *  @a action_name must not be <tt>nullptr</tt>.
418    *
419    * @newin{2,38}
420    *
421    * @param action_name A potential action name.
422    * @return <tt>true</tt> if @a action_name is valid.
423    */
424   static bool name_is_valid(const Glib::ustring& action_name);
425 
426   /** Parses a detailed action name into its separate name and target components.
427    *
428    * Detailed action names can have three formats. See parse_detailed_name_variant().
429    *
430    * @newin{2,40}
431    *
432    * @param detailed_name A detailed action name.
433    * @param[out] action_name The action name.
434    * @param[out] target_value The target value.
435    * @throw Glib::VariantParseError if @a detailed_name has an invalid format or a target of an unexpected type.
436    */
437   template <typename T_Value>
438   static void parse_detailed_name(const Glib::ustring& detailed_name, Glib::ustring& action_name, T_Value& target_value);
439 
440 
441   /** Parses a detailed action name into its separate name and target
442    * components.
443    *
444    * Detailed action names can have three formats.
445    *
446    * The first format is used to represent an action name with no target
447    * value and consists of just an action name containing no whitespace
448    * nor the characters ':', '(' or ')'.  For example: "app.action".
449    *
450    * The second format is used to represent an action with a target value
451    * that is a non-empty string consisting only of alphanumerics, plus '-'
452    * and '.'.  In that case, the action name and target value are
453    * separated by a double colon ("::").  For example:
454    * "app.action::target".
455    *
456    * The third format is used to represent an action with any type of
457    * target value, including strings.  The target value follows the action
458    * name, surrounded in parens.  For example: "app.action(42)".  The
459    * target value is parsed using Glib::variant_parse().  If a tuple-typed
460    * value is desired, it must be specified in the same way, resulting in
461    * two sets of parens, for example: "app.action((1,2,3))".  A string
462    * target can be specified this way as well: "app.action('target')".
463    * For strings, this third format must be used if * target value is
464    * empty or contains characters other than alphanumerics, '-' and '.'.
465    *
466    * @newin{2,38}
467    *
468    * @param detailed_name A detailed action name.
469    * @param action_name The action name.
470    * @param target_value The target value, or <tt>nullptr</tt> for no target.
471    *
472    * @throws Glib::VariantParseError
473    */
474   static void parse_detailed_name_variant(const Glib::ustring& detailed_name, Glib::ustring& action_name, Glib::VariantBase& target_value);
475 
476   /** Formats a detailed action name from the action's action_name and @a target_value.
477    *
478    * This function is the opposite of parse_detailed_action_name().
479    * It will produce a string that can be parsed back to the @a action_name
480    * and @a target_value by that function.
481    *
482    * See that function for the types of strings that will be printed by
483    * this function.
484    *
485    * @param target_value A Variant target value.
486    * @result A detailed format string.
487    */
488   template <typename T_Value>
489   Glib::ustring print_detailed_name(const T_Value& target_value);
490 
491 
492   /** Formats a detailed action name from @a action_name and @a target_value.
493    *
494    * It is an error to call this function with an invalid action name.
495    *
496    * This function is the opposite of g_action_parse_detailed_name().
497    * It will produce a string that can be parsed back to the @a action_name
498    * and @a target_value by that function.
499    *
500    * See that function for the types of strings that will be printed by
501    * this function.
502    *
503    * @newin{2,38}
504    *
505    * @param action_name A valid action name.
506    * @param target_value A Variant target value, or <tt>nullptr</tt>.
507    * @return A detailed format string.
508    */
509   static Glib::ustring print_detailed_name_variant(const Glib::ustring& action_name, const Glib::VariantBase& target_value);
510 
511   /** If @a action is currently enabled.
512    *
513    * If the action is disabled then calls to g_action_activate() and
514    * g_action_change_state() have no effect.
515    *
516    * @newin{2,28}
517    *
518    * Default value: <tt>true</tt>
519    *
520    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
521    * or receive notification when the value of the property changes.
522    */
523   Glib::PropertyProxy_ReadOnly< bool > property_enabled() const;
524 
525 
526   /** The name of the action.  This is mostly meaningful for identifying
527    * the action once it has been added to a ActionGroup. It is immutable.
528    *
529    * @newin{2,28}
530    *
531    * Default value: ""
532    *
533    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
534    * or receive notification when the value of the property changes.
535    */
536   Glib::PropertyProxy_ReadOnly< Glib::ustring > property_name() const;
537 
538 
539   /** The type of the parameter that must be given when activating the
540    * action. This is immutable, and may be <tt>nullptr</tt> if no parameter is needed when
541    * activating the action.
542    *
543    * @newin{2,28}
544    *
545    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
546    * or receive notification when the value of the property changes.
547    */
548   Glib::PropertyProxy_ReadOnly< Glib::VariantType > property_parameter_type() const;
549 
550 
551   /** The state of the action, or <tt>nullptr</tt> if the action is stateless.
552    *
553    * @newin{2,28}
554    *
555    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
556    * or receive notification when the value of the property changes.
557    */
558   Glib::PropertyProxy_ReadOnly< Glib::VariantBase > property_state() const;
559 
560 
561   /** The VariantType of the state that the action has, or <tt>nullptr</tt> if the
562    * action is stateless. This is immutable.
563    *
564    * @newin{2,28}
565    *
566    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
567    * or receive notification when the value of the property changes.
568    */
569   Glib::PropertyProxy_ReadOnly< Glib::VariantType > property_state_type() const;
570 
571 
572     virtual Glib::ustring get_name_vfunc() const;
573 
574 
575     virtual Glib::VariantType get_parameter_type_vfunc() const;
576 
577     virtual Glib::VariantType get_state_type_vfunc() const;
578 
579 
580     virtual Glib::VariantBase get_state_hint_vfunc() const;
581 
582 
583     virtual bool get_enabled_vfunc() const;
584 
585 
586     virtual Glib::VariantBase get_state_vfunc() const;
587 
588 
589     virtual void change_state_vfunc(const Glib::VariantBase& value);
590 
591     virtual void activate_vfunc(const Glib::VariantBase& parameter);
592 
593 
594 public:
595 
596 public:
597   //C++ methods used to invoke GTK+ virtual functions:
598 
599 protected:
600   //GTK+ Virtual Functions (override these to change behaviour):
601 
602   //Default Signal Handlers::
603 
604 
605 };
606 
607 template <typename T_Value>
get_state(T_Value & value)608 void Action::get_state(T_Value& value) const
609 {
610   value = T_Value(); //Make sure that it is initialized.
611 
612   using type_glib_variant = Glib::Variant<T_Value>;
613 
614   g_return_if_fail(
615     g_variant_type_equal(g_action_get_state_type(const_cast<GAction*>(gobj())), type_glib_variant::variant_type().gobj()));
616 
617   const auto variantBase = get_state_variant();
618   const auto variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase);
619   value = variantDerived.get();
620 }
621 
622 template <typename T_Value>
get_state_hint(T_Value & value)623 void Action::get_state_hint(T_Value& value) const
624 {
625   value = T_Value(); //Make sure that it is initialized.
626 
627   using type_glib_variant = Glib::Variant<T_Value>;
628 
629   const auto variantBase = get_state_hint_variant();
630 
631   // We can't check the type (a range) that will be returned before getting the range hint.
632   g_return_if_fail(
633     variantBase.is_of_type(type_glib_variant::variant_type()) );
634 
635   const auto variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase);
636   value = variantDerived.get();
637 }
638 
639 #ifndef DOXYGEN_SHOULD_SKIP_THIS
640 // Doxygen 1.8.4 does not understand that this is the static function previously declared.
641 template <typename T_Value>
642 //static
parse_detailed_name(const Glib::ustring & detailed_name,Glib::ustring & action_name,T_Value & target_value)643 void Action::parse_detailed_name(const Glib::ustring& detailed_name, Glib::ustring& action_name, T_Value& target_value)
644 {
645   action_name.clear(); //Make sure the output arguments are initialized.
646   target_value = T_Value();
647 
648   using type_glib_variant = Glib::Variant<T_Value>;
649 
650   Glib::VariantBase target_value_variantBase;
651   parse_detailed_name_variant(detailed_name, action_name, target_value_variantBase);
652 
653   if (!target_value_variantBase)
654     throw Glib::VariantParseError(Glib::VariantParseError::TYPE_ERROR,
655       "Detailed action name '" + detailed_name + "' has no target. Expected a target of type " +
656       type_glib_variant::variant_type().get_string());
657 
658   if (!target_value_variantBase.is_of_type(type_glib_variant::variant_type()))
659     throw Glib::VariantParseError(Glib::VariantParseError::TYPE_ERROR,
660       "Detailed action name '" + detailed_name + "' has a target of type " +
661       target_value_variantBase.get_type_string() + ". Expected " + type_glib_variant::variant_type().get_string());
662 
663   const type_glib_variant target_value_variantDerived =
664     target_value_variantBase.cast_dynamic<type_glib_variant>(target_value_variantBase);
665   target_value = target_value_variantDerived.get();
666 }
667 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
668 
669 template <typename T_Value>
print_detailed_name(const T_Value & target_value)670 Glib::ustring Action::print_detailed_name(const T_Value& target_value)
671 {
672   using type_glib_variant = Glib::Variant<T_Value>;
673 
674   g_return_val_if_fail(
675     g_variant_type_equal(g_action_get_parameter_type(const_cast<GAction*>(gobj())), type_glib_variant::variant_type().gobj()),
676     Glib::ustring());
677   return print_detailed_name_variant(get_name(), type_glib_variant::create(target_value));
678 }
679 
680 template <typename T_Value>
change_state(const T_Value & value)681 void Action::change_state(const T_Value& value)
682 {
683   using type_glib_variant = Glib::Variant<T_Value>;
684 
685   g_return_if_fail(
686     g_variant_type_equal(g_action_get_state_type(const_cast<GAction*>(gobj())), type_glib_variant::variant_type().gobj()));
687 
688   change_state_variant(type_glib_variant::create(value));
689 }
690 
691 template <typename T_Value>
change_state(const Glib::Variant<T_Value> & value)692 void Action::change_state(const Glib::Variant<T_Value>& value)
693 {
694   change_state_variant(value);
695 }
696 
697 template <typename T_Value>
activate(const T_Value & parameter)698 void Action::activate(const T_Value& parameter)
699 {
700   using type_glib_variant = Glib::Variant<T_Value>;
701 
702   g_return_if_fail(
703     g_variant_type_equal(g_action_get_parameter_type(const_cast<GAction*>(gobj())), type_glib_variant::variant_type().gobj()));
704 
705   activate_variant(type_glib_variant::create(parameter));
706 }
707 
708 
709 template <typename T_Value>
activate(const Glib::Variant<T_Value> & value)710 void Action::activate(const Glib::Variant<T_Value>& value)
711 {
712   activate_variant(value);
713 }
714 
715 
716 } // namespace Gio
717 
718 
719 namespace Glib
720 {
721   /** A Glib::wrap() method for this object.
722    *
723    * @param object The C instance.
724    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
725    * @result A C++ instance that wraps this C instance.
726    *
727    * @relates Gio::Action
728    */
729   GIOMM_API
730   Glib::RefPtr<Gio::Action> wrap(GAction* object, bool take_copy = false);
731 
732 } // namespace Glib
733 
734 
735 #endif /* _GIOMM_ACTION_H */
736 
737