/* Copyright (C) 2009 The gtkmm Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ #include #include _DEFS(gtkmm,gtk) _PINCLUDE(glibmm/private/interface_p.h) #m4 _PUSH(SECTION_CC_PRE_INCLUDES) #undef GTK_DISABLE_DEPRECATED #define GDK_DISABLE_DEPRECATION_WARNINGS 1 #m4 _POP() //TODO: Do this when we can stop using this as a base class elsewhere, when we break ABI: //_IS_DEPRECATED // This whole file is deprecated. #ifndef DOXYGEN_SHOULD_SKIP_THIS extern "C" { typedef struct _GtkActivatableIface GtkActivatableIface; } #endif /* DOXYGEN_SHOULD_SKIP_THIS */ namespace Gtk { /** %Activatable widgets can be connected to a Gtk::Action and reflect the state * of the action. An %Activatable can also provide feedback through its action, * as it is responsible for activating the related action. * * @newin{2,16} * * @deprecated Use Gio::Action instead of Gtk::Action. * Gtk::Actionable is roughly a replacement for %Gtk::Activatable. */ class GTKMM_API Activatable : public Glib::Interface { _CLASS_INTERFACE(Activatable, GtkActivatable, GTK_ACTIVATABLE, GtkActivatableIface, , , GTKMM_API) public: _WRAP_METHOD(void do_set_related_action(const Glib::RefPtr& action), gtk_activatable_do_set_related_action, deprecated "There is no corresponding replacement when using Gio::Action.") _WRAP_METHOD(Glib::RefPtr get_related_action(), gtk_activatable_get_related_action, refreturn, deprecated "Use Gtk::Actionable::get_action_name() on Gtk::Actionable widgets instead.") _WRAP_METHOD(Glib::RefPtr get_related_action() const, gtk_activatable_get_related_action, refreturn, constversion, deprecated "Use Gtk::Actionable::get_action_name() on Gtk::Actionable widgets instead.") _WRAP_METHOD(bool get_use_action_appearance() const, gtk_activatable_get_use_action_appearance, deprecated "There is no corresponding replacement when using Gio::Action.") _WRAP_METHOD(void sync_action_properties(const Glib::RefPtr& action), gtk_activatable_sync_action_properties, deprecated "There is no corresponding replacement when using Gio::Action.") _WRAP_METHOD(void set_related_action(const Glib::RefPtr& action), gtk_activatable_set_related_action, deprecated "Use Gtk::Actionable::set_action_name() on Gtk::Actionable widgets instead.") _WRAP_METHOD(void set_use_action_appearance(bool use_appearance = true), gtk_activatable_set_use_action_appearance, deprecated "There is no corresponding replacement when using Gio::Action.") _WRAP_PROPERTY("related-action", Glib::RefPtr, deprecated "Use Gtk::Actionable::property_action_name() on Gtk::Actionable widgets instead.") _WRAP_PROPERTY("use-action-appearance", bool, deprecated "There is no corresponding replacement when using Gio::Action.") #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING) #m4 _CONVERSION(`GtkAction*',`const Glib::RefPtr&',`Glib::wrap($3, true)') _WRAP_VFUNC(void update(const Glib::RefPtr& action, const Glib::ustring& property_name), update) _WRAP_VFUNC(void sync_action_properties(const Glib::RefPtr& action), sync_action_properties) }; } // namespace Gtk