[gtkmm] Deprecate Deprecate Gtk::IconFactory, IconSet, IconSource.
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Deprecate Deprecate Gtk::IconFactory, IconSet, IconSource.
- Date: Tue, 2 Jul 2013 17:49:02 +0000 (UTC)
commit b2a3e8bf99fcc4679ccb907172f605747fe2277c
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Tue Jul 2 19:29:07 2013 +0200
Deprecate Deprecate Gtk::IconFactory, IconSet, IconSource.
* gtk/gtkmm/wrap_init.h: Add GDK_DISABLE_DEPRECATION_WARNINGS, which is now
necessary in wrap_init.cc.
* gtk/src/iconfactory.ccg: Move IconSize code to enums.ccg.
* gtk/src/iconfactory.hg: Deprecate IconFactory.
* gtk/src/iconset.hg: Deprecate IconSet.
* gtk/src/iconsource.hg: Deprecate IconSource.
* gtk/src/enums.ccg: Move IconSize code from iconfactory.ccg.
* gtk/src/enums.hg: Deprecate most IconSize methods.
* gtk/src/image.[hg|ccg]: Deprecate methods that take an IconSet or a StockID
parameter.
* gtk/src/stylecontext.hg: Deprecate [set|get]_direction() and
render_icon_pixbuf().
ChangeLog | 17 ++++++++++++++++
gtk/gtkmm/wrap_init.h | 8 +++++++
gtk/src/enums.ccg | 48 +++++++++++++++++++++++++++++++++++++++++++++++
gtk/src/enums.hg | 23 +++++++++++++++++++--
gtk/src/iconfactory.ccg | 45 --------------------------------------------
gtk/src/iconfactory.hg | 9 ++++++++
gtk/src/iconset.hg | 8 +++++++
gtk/src/iconsource.hg | 9 ++++++++
gtk/src/image.ccg | 8 +++++++
gtk/src/image.hg | 36 ++++++++++++++++++++++++++++------
gtk/src/stylecontext.hg | 10 +++++---
11 files changed, 162 insertions(+), 59 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5086dfe..9ed783a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2013-07-02 Kjell Ahlstedt <kjell ahlstedt bredband net>
+ Deprecate Deprecate Gtk::IconFactory, IconSet, IconSource.
+
+ * gtk/gtkmm/wrap_init.h: Add GDK_DISABLE_DEPRECATION_WARNINGS, which is now
+ necessary in wrap_init.cc.
+ * gtk/src/iconfactory.ccg: Move IconSize code to enums.ccg.
+ * gtk/src/iconfactory.hg: Deprecate IconFactory.
+ * gtk/src/iconset.hg: Deprecate IconSet.
+ * gtk/src/iconsource.hg: Deprecate IconSource.
+ * gtk/src/enums.ccg: Move IconSize code from iconfactory.ccg.
+ * gtk/src/enums.hg: Deprecate most IconSize methods.
+ * gtk/src/image.[hg|ccg]: Deprecate methods that take an IconSet or a StockID
+ parameter.
+ * gtk/src/stylecontext.hg: Deprecate [set|get]_direction() and
+ render_icon_pixbuf().
+
+2013-07-02 Kjell Ahlstedt <kjell ahlstedt bredband net>
+
Deprecate some API that is deprecated in the C API.
* gtk/src/cellrenderer.hg: Deprecate property_cell_background_gdk().
diff --git a/gtk/gtkmm/wrap_init.h b/gtk/gtkmm/wrap_init.h
index a04d907..92a125c 100644
--- a/gtk/gtkmm/wrap_init.h
+++ b/gtk/gtkmm/wrap_init.h
@@ -25,6 +25,14 @@
namespace Gtk
{
+// This is needed in wrap_init.cc, but to get it there in a better way than
+// putting it here requires a change in generate_wrap_init.pl.
+// It's required because some gtk_*_get_type() functions are deprecated, but
+// their .h files have not been moved to the gtk+/gtk/deprecated directory.
+#ifndef GTKMM_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#endif
+
void wrap_init();
} /* namespace Gtk */
diff --git a/gtk/src/enums.ccg b/gtk/src/enums.ccg
index bde9d4e..2546fe5 100644
--- a/gtk/src/enums.ccg
+++ b/gtk/src/enums.ccg
@@ -27,6 +27,54 @@ GType Glib::Value<Gtk::IconSize>::value_type()
namespace Gtk
{
+// static
+bool IconSize::lookup(IconSize size, int& width, int& height)
+{
+ return gtk_icon_size_lookup((GtkIconSize) int(size), &width, &height);
+}
+
+#ifndef GTKMM_DISABLE_DEPRECATED
+// static
+bool IconSize::lookup(IconSize size, int& width, int& height, const Glib::RefPtr<Gtk::Settings>& settings)
+{
+ return gtk_icon_size_lookup_for_settings(Glib::unwrap(settings), (GtkIconSize) int(size), &width, &height);
+}
+#endif //GTKMM_DISABLE_DEPRECATED
+
+#ifndef GTKMM_DISABLE_DEPRECATED
+// static
+IconSize IconSize::register_new(const Glib::ustring& name, int width, int height)
+{
+ const int size = gtk_icon_size_register(name.c_str(), width, height);
+ return IconSize(size);
+}
+#endif //GTKMM_DISABLE_DEPRECATED
+
+#ifndef GTKMM_DISABLE_DEPRECATED
+// static
+void IconSize::register_alias(const Glib::ustring& alias, IconSize target)
+{
+ gtk_icon_size_register_alias(alias.c_str(), (GtkIconSize) int(target));
+}
+#endif //GTKMM_DISABLE_DEPRECATED
+
+#ifndef GTKMM_DISABLE_DEPRECATED
+// static
+IconSize IconSize::from_name(const Glib::ustring& name)
+{
+ const int size = gtk_icon_size_from_name(name.c_str());
+ return IconSize(size);
+}
+#endif //GTKMM_DISABLE_DEPRECATED
+
+#ifndef GTKMM_DISABLE_DEPRECATED
+// static
+Glib::ustring IconSize::get_name(IconSize size)
+{
+ return gtk_icon_size_get_name((GtkIconSize) int(size));
+}
+#endif //GTKMM_DISABLE_DEPRECATED
+
float _gtkmm_align_float_from_enum(Align value)
{
//Choose the float alignment value appropriate for this human-readable enum value:
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index 74f7cdc..30c6bc2 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -21,6 +21,10 @@
_DEFS(gtkmm,gtk)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
namespace Gtk
{
@@ -130,8 +134,6 @@ public:
explicit IconSize(int size) : size_ (size) {}
operator int() const { return size_; }
- // These static methods are implemented in iconfactory.ccg. TODO: That's probably unnecessarily obscure.
murrayc.
-
/** Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default
Gtk::Settings.
* Normally size would be Gtk::ICON_SIZE_MENU, Gtk::ICON_SIZE_BUTTON, etc.
* This function isn't normally needed because Gtk::Widget::render_icon() is the usual way to get an icon
for
@@ -146,6 +148,7 @@ public:
*/
static bool lookup(IconSize size, int& width, int& height);
+#ifndef GTKMM_DISABLE_DEPRECATED
/** Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular
* Gtk::Settings. Normally size would be Gtk::ICON_SIZE_MENU, Gtk::ICON_SIZE_BUTTON, etc.
* This function isn't normally needed because Gtk::Widget::render_icon() is the usual way to get an icon
for
@@ -159,39 +162,53 @@ public:
* @param settings A Gtk::Settings object, used to determine which set of user preferences to used.
* @result true if size was a valid size.
*
+ * @deprecated Use IconSize::lookup() without the @a settings parameter instead.
* @newin{2,14}
*/
static bool lookup(IconSize size, int& width, int& height, const Glib::RefPtr<Gtk::Settings>& settings);
+#endif //GTKMM_DISABLE_DEPRECATED
+#ifndef GTKMM_DISABLE_DEPRECATED
/** Registers a new icon size, along the same lines as ICON_SIZE_MENU, etc. Returns the integer value for
the size.
*
* @param name Name of the icon size.
* @param width The icon width.
* @param height The icon height.
* @result Integer value representing the size.
+ * @deprecated Use Gtk::IconTheme instead.
*/
static IconSize register_new(const Glib::ustring& name, int width, int height);
+#endif //GTKMM_DISABLE_DEPRECATED
+#ifndef GTKMM_DISABLE_DEPRECATED
/** Registers @a alias as another name for @a target so calling from_name() with @a alias as argument will
return @a target.
*
* @param alias An alias for target.
* @param target An existing icon size.
+ * @deprecated Use Gtk::IconTheme instead.
*/
static void register_alias(const Glib::ustring& alias, IconSize target);
+#endif //GTKMM_DISABLE_DEPRECATED
+#ifndef GTKMM_DISABLE_DEPRECATED
/** Looks up the icon size associated with @a name.
*
* @param name the name to look up.
- * result The icon size with the given name.
+ * @result The icon size with the given name.
+ * @deprecated Use Gtk::IconTheme instead.
*/
static IconSize from_name(const Glib::ustring& name);
+#endif //GTKMM_DISABLE_DEPRECATED
+#ifndef GTKMM_DISABLE_DEPRECATED
/** Gets the canonical name of the given icon size.
*
* @param size size AnIconSize.
* @result The name of the given icon size.
+ * @deprecated Use Gtk::IconTheme instead.
*/
static Glib::ustring get_name(IconSize size);
+#endif //GTKMM_DISABLE_DEPRECATED
};
diff --git a/gtk/src/iconfactory.ccg b/gtk/src/iconfactory.ccg
index 574fbe1..031daaa 100644
--- a/gtk/src/iconfactory.ccg
+++ b/gtk/src/iconfactory.ccg
@@ -16,50 +16,5 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <gtkmm/settings.h>
#include <gtk/gtk.h>
-namespace Gtk
-{
-
-// static
-bool IconSize::lookup(IconSize size, int& width, int& height)
-{
- return gtk_icon_size_lookup((GtkIconSize) int(size), &width, &height);
-}
-
-// static
-bool IconSize::lookup(IconSize size, int& width, int& height, const Glib::RefPtr<Gtk::Settings>& settings)
-{
- return gtk_icon_size_lookup_for_settings(Glib::unwrap(settings), (GtkIconSize) int(size), &width, &height);
-}
-
-
-// static
-IconSize IconSize::register_new(const Glib::ustring& name, int width, int height)
-{
- const int size = gtk_icon_size_register(name.c_str(), width, height);
- return IconSize(size);
-}
-
-// static
-void IconSize::register_alias(const Glib::ustring& alias, IconSize target)
-{
- gtk_icon_size_register_alias(alias.c_str(), (GtkIconSize) int(target));
-}
-
-// static
-IconSize IconSize::from_name(const Glib::ustring& name)
-{
- const int size = gtk_icon_size_from_name(name.c_str());
- return IconSize(size);
-}
-
-// static
-Glib::ustring IconSize::get_name(IconSize size)
-{
- return gtk_icon_size_get_name((GtkIconSize) int(size));
-}
-
-} // namespace Gtk
-
diff --git a/gtk/src/iconfactory.hg b/gtk/src/iconfactory.hg
index b78c3e8..587a204 100644
--- a/gtk/src/iconfactory.hg
+++ b/gtk/src/iconfactory.hg
@@ -25,9 +25,18 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
+_IS_DEPRECATED // This whole file is deprecated.
+
namespace Gtk
{
+/** @deprecated Use Gtk::IconTheme instead.
+ */
class IconFactory : public Glib::Object
{
_CLASS_GOBJECT(IconFactory, GtkIconFactory, GTK_ICON_FACTORY, Glib::Object, GObject)
diff --git a/gtk/src/iconset.hg b/gtk/src/iconset.hg
index 990259f..32bf9c0 100644
--- a/gtk/src/iconset.hg
+++ b/gtk/src/iconset.hg
@@ -24,6 +24,13 @@
_DEFS(gtkmm,gtk)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
+_IS_DEPRECATED // This whole file is deprecated.
+
namespace Gtk
{
@@ -35,6 +42,7 @@ class Widget;
/** This manages a set of variants of a particular icon
* An IconSet contains variants for different sizes and widget states.
* Icons in an icon factory are named by a stock ID, which is a simple string identifying the icon. Each
GtkStyle has a list of GtkIconFactory derived from the current theme; those icon factories are consulted
first when searching for an icon. If the theme doesn't set a particular icon, GTK+ looks for the icon in a
list of default icon factories, maintained by gtk_icon_factory_add_default() and
gtk_icon_factory_remove_default(). Applications with icons should add a default icon factory with their
icons, which will allow themes to override the icons for the application.
+ * @deprecated Use Gtk::IconTheme instead.
*/
class IconSet
{
diff --git a/gtk/src/iconsource.hg b/gtk/src/iconsource.hg
index e8c0c6f..487ea8d 100644
--- a/gtk/src/iconsource.hg
+++ b/gtk/src/iconsource.hg
@@ -21,9 +21,18 @@
_DEFS(gtkmm,gtk)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
+_IS_DEPRECATED // This whole file is deprecated.
+
namespace Gtk
{
+/** @deprecated Use Gtk::IconTheme instead.
+ */
class IconSource
{
_CLASS_BOXEDTYPE(IconSource, GtkIconSource, gtk_icon_source_new, gtk_icon_source_copy,
gtk_icon_source_free)
diff --git a/gtk/src/image.ccg b/gtk/src/image.ccg
index 8a45aa9..661d4f9 100644
--- a/gtk/src/image.ccg
+++ b/gtk/src/image.ccg
@@ -21,21 +21,26 @@
namespace Gtk
{
+#ifndef GTKMM_DISABLE_DEPRECATED
Image::Image(const Gtk::StockID& stock_id, IconSize size)
:
_CONSTRUCT("stock", stock_id.get_c_str(), "icon-size", (GtkIconSize) int(size))
{}
+#endif //GTKMM_DISABLE_DEPRECATED
+#ifndef GTKMM_DISABLE_DEPRECATED
Image::Image(const Glib::RefPtr<IconSet>& icon_set, IconSize size)
:
_CONSTRUCT("icon-set", (icon_set ? icon_set->gobj() : 0), "icon-size", (GtkIconSize) int(size))
{}
+#endif //GTKMM_DISABLE_DEPRECATED
Image::Image(const Glib::RefPtr<Gdk::PixbufAnimation>& animation)
:
_CONSTRUCT("pixbuf-animation", Glib::unwrap(animation))
{}
+#ifndef GTKMM_DISABLE_DEPRECATED
void Image::get_stock(Gtk::StockID& stock_id, IconSize& size) const
{
char* pStockID = 0; // GTK+ iconsistency: although not const, it should not be freed.
@@ -46,7 +51,9 @@ void Image::get_stock(Gtk::StockID& stock_id, IconSize& size) const
size = IconSize(static_cast<int>(icon_size));
stock_id = Gtk::StockID(pStockID); // the StockID ctor checks for 0
}
+#endif //GTKMM_DISABLE_DEPRECATED
+#ifndef GTKMM_DISABLE_DEPRECATED
void Image::get_icon_set(Glib::RefPtr<IconSet>& icon_set, IconSize& size) const
{
GtkIconSet* pIconSet = 0;
@@ -57,6 +64,7 @@ void Image::get_icon_set(Glib::RefPtr<IconSet>& icon_set, IconSize& size) const
size = IconSize(static_cast<int>(icon_size));
icon_set = Glib::wrap(pIconSet, true); //true = take_copy.
}
+#endif //GTKMM_DISABLE_DEPRECATED
Glib::ustring Image::get_icon_name() const
{
diff --git a/gtk/src/image.hg b/gtk/src/image.hg
index ffd5ba5..06479d2 100644
--- a/gtk/src/image.hg
+++ b/gtk/src/image.hg
@@ -24,6 +24,10 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/misc_p.h)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
namespace Gtk
{
@@ -71,35 +75,42 @@ public:
*/
_WRAP_CTOR(Image(const std::string& file), gtk_image_new_from_file)
- //TODO: Change this documentation when we have wrapped new_from_icon_set().
/** Creates a new Image widget displaying @a pixbuf.
* Note that this just creates an GtkImage from the pixbuf. The Gtk::Image created will not react to state
changes.
- * Should you want that, you should use new_from_icon_set().
+ * Should you want that, you should use the default constructor and set_from_icon_name().
*/
_WRAP_CTOR(Image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_image_new_from_pixbuf)
- //TODO: Wrap gtk_image_new_from_icon_set()
+ _IGNORE(gtk_image_new_from_icon_set) // deprecated since 3.10
//We don't wrap gtk_image_new_from_icon_name() to avoid a clash with the from-filename constructor.
//But we do wrap gtk_image_set_from_icon_name()
_IGNORE(gtk_image_new_from_icon_name)
+#ifndef GTKMM_DISABLE_DEPRECATED
/** Creates am Image displaying a stock icon.
* Sample stock icon identifiers are Gtk::Stock::OPEN, Gtk::Stock::EXIT. Sample stock sizes are
Gtk::ICON_SIZE_MENU, Gtk::ICON_SIZE_SMALL_TOOLBAR.
* If the stock icon name isn't known, a "broken image" icon will be displayed instead.
* You can register your own stock icon names - see Gtk::IconFactory::add().
* @param stock_id A stock icon.
* @param size A stock icon size.
+ * @deprecated Use the default constructor and set_from_icon_name() instead.
*/
Image(const Gtk::StockID& stock_id, IconSize size);
+#endif //GTKMM_DISABLE_DEPRECATED
+#ifndef GTKMM_DISABLE_DEPRECATED
+ /** @deprecated Use the default constructor and set_from_icon_name() instead.
+ */
Image(const Glib::RefPtr<IconSet>& icon_set, IconSize size);
+#endif //GTKMM_DISABLE_DEPRECATED
+
explicit Image(const Glib::RefPtr<Gdk::PixbufAnimation>& animation);
_WRAP_METHOD(void set(const std::string& filename), gtk_image_set_from_file)
_WRAP_METHOD(void set_from_resource(const std::string& resource_path), gtk_image_set_from_resource)
_WRAP_METHOD(void set(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_image_set_from_pixbuf)
- _WRAP_METHOD(void set(const Gtk::StockID& stock_id, IconSize size), gtk_image_set_from_stock)
- _WRAP_METHOD(void set(const Glib::RefPtr<IconSet>& icon_set, IconSize size), gtk_image_set_from_icon_set)
+ _WRAP_METHOD(void set(const Gtk::StockID& stock_id, IconSize size), gtk_image_set_from_stock, deprecated
"Use set_from_icon_name() instead.")
+ _WRAP_METHOD(void set(const Glib::RefPtr<IconSet>& icon_set, IconSize size), gtk_image_set_from_icon_set,
deprecated "Use set_from_icon_name() instead.")
_WRAP_METHOD(void set(const Glib::RefPtr<Gdk::PixbufAnimation>& animation), gtk_image_set_from_animation)
_WRAP_METHOD(void set(const Glib::RefPtr<const Gio::Icon>& icon, IconSize size), gtk_image_set_from_gicon)
@@ -112,8 +123,19 @@ public:
_WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_pixbuf(), gtk_image_get_pixbuf, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const, gtk_image_get_pixbuf, refreturn,
constversion)
+
+#ifndef GTKMM_DISABLE_DEPRECATED
+ /** @deprecated Use get_icon_name() instead.
+ */
void get_stock(Gtk::StockID& stock_id, IconSize& size) const;
+#endif //GTKMM_DISABLE_DEPRECATED
+
+#ifndef GTKMM_DISABLE_DEPRECATED
+ /** @deprecated Use get_icon_name() instead.
+ */
void get_icon_set(Glib::RefPtr<IconSet>& icon_set, IconSize& size) const;
+#endif //GTKMM_DISABLE_DEPRECATED
+
_WRAP_METHOD(Glib::RefPtr<Gdk::PixbufAnimation> get_animation(), gtk_image_get_animation, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Gdk::PixbufAnimation> get_animation() const, gtk_image_get_animation,
refreturn, constversion)
@@ -147,8 +169,8 @@ public:
_WRAP_PROPERTY("pixbuf", Glib::RefPtr<Gdk::Pixbuf>)
_WRAP_PROPERTY("file", Glib::ustring)
- _WRAP_PROPERTY("stock", Glib::ustring)
- _WRAP_PROPERTY("icon-set", Glib::RefPtr<IconSet>)
+ _WRAP_PROPERTY("stock", Glib::ustring, deprecated "Use property_icon_name() instead.")
+ _WRAP_PROPERTY("icon-set", Glib::RefPtr<IconSet>, deprecated "Use property_icon_name() instead.")
_WRAP_PROPERTY("icon-size", int)
_WRAP_PROPERTY("pixel-size", int)
_WRAP_PROPERTY("pixbuf-animation", Glib::RefPtr<Gdk::PixbufAnimation>)
diff --git a/gtk/src/stylecontext.hg b/gtk/src/stylecontext.hg
index 22a6578..7bfd894 100644
--- a/gtk/src/stylecontext.hg
+++ b/gtk/src/stylecontext.hg
@@ -175,7 +175,7 @@ public:
const Glib::ustring& property_name, Glib::ValueBase& value) const,
gtk_style_context_get_style_property)
- _WRAP_METHOD(Glib::RefPtr<IconSet> lookup_icon_set(const Glib::ustring& stock_id),
gtk_style_context_lookup_icon_set, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<IconSet> lookup_icon_set(const Glib::ustring& stock_id),
gtk_style_context_lookup_icon_set, refreturn, deprecated "Use IconTheme::lookup_icon() instead.")
// gtk_icon_set_render_icon_pixbuf() in gtkstylecontext.h is wrapped in IconSet::render_icon_pixbuf().
@@ -184,8 +184,8 @@ public:
_WRAP_METHOD(Glib::RefPtr<Gdk::Screen> get_screen(), gtk_style_context_get_screen, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Gdk::Screen> get_screen() const, gtk_style_context_get_screen, refreturn,
constversion)
- _WRAP_METHOD(void set_direction(TextDirection direction), gtk_style_context_set_direction)
- _WRAP_METHOD(TextDirection get_direction() const, gtk_style_context_get_direction)
+ _WRAP_METHOD(void set_direction(TextDirection direction), gtk_style_context_set_direction, deprecated "Use
set_state() with StateFlags::STATE_FLAG_DIR_LTR and StateFlags::STATE_FLAG_DIR_RTL instead.")
+ _WRAP_METHOD(TextDirection get_direction() const, gtk_style_context_get_direction, deprecated "Use
get_state() and check for StateFlags::STATE_FLAG_DIR_LTR and StateFlags::STATE_FLAG_DIR_RTL instead.")
_WRAP_METHOD(void set_junction_sides(JunctionSides sides), gtk_style_context_set_junction_sides)
_WRAP_METHOD(JunctionSides get_junction_sides() const, gtk_style_context_get_junction_sides)
@@ -210,6 +210,8 @@ public:
Gdk::RGBA get_border_color(StateFlags state = (StateFlags)0) const;
_IGNORE(gtk_style_context_get_border_color)
+ //TODO: gtk_style_context_get_font() is deprecated. It's replaced by gtk_style_context_get(), which we
+ // probably don't want to wrap. It takes '...' parameters. Make a handcoded get_font()?
#m4 _CONVERSION(`const
PangoFontDescription*',`Pango::FontDescription',`Glib::wrap(const_cast<PangoFontDescription*>($3), true)')
_WRAP_METHOD(Pango::FontDescription get_font(StateFlags state = (StateFlags)0) const,
gtk_style_context_get_font)
@@ -242,7 +244,7 @@ public:
_WRAP_METHOD(void render_extension(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x, double y,
double width, double height, PositionType gap_side), gtk_render_extension)
_WRAP_METHOD(void render_handle(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x, double y, double
width, double height), gtk_render_handle)
_WRAP_METHOD(void render_activity(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x, double y,
double width, double height), gtk_render_activity)
- _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> render_icon_pixbuf(const IconSource& source, IconSize size),
gtk_render_icon_pixbuf)
+ _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> render_icon_pixbuf(const IconSource& source, IconSize size),
gtk_render_icon_pixbuf, deprecated "Use IconTheme::load_icon() instead.")
_WRAP_METHOD(void render_icon(const ::Cairo::RefPtr< ::Cairo::Context>& cr, const
Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double x, double y), gtk_render_icon)
_WRAP_METHOD(void render_insertion_cursor(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x, double
y, const Glib::RefPtr<Pango::Layout>& layout, int index, Pango::Direction direction),
gtk_render_insertion_cursor)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]