[gtkmm] Gdk, Gtk: Update for the latest gtk4 (Gtk::IconInfo -> IconPaintable)
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk, Gtk: Update for the latest gtk4 (Gtk::IconInfo -> IconPaintable)
- Date: Thu, 6 Feb 2020 14:37:01 +0000 (UTC)
commit 04ab965346503a6e4e3ace6ba0b559c71378af37
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Thu Feb 6 15:33:37 2020 +0100
Gdk, Gtk: Update for the latest gtk4 (Gtk::IconInfo -> IconPaintable)
.gitignore | 4 +-
demos/gtk-demo/example_iconbrowser.cc | 17 ++-----
gdk/src/display.hg | 2 -
gdk/src/monitor.hg | 7 +--
gtk/src/filelist.am | 2 +-
gtk/src/iconinfo.hg | 78 -----------------------------
gtk/src/{iconinfo.ccg => iconpaintable.ccg} | 4 --
gtk/src/iconpaintable.hg | 40 +++++++++++++++
gtk/src/icontheme.ccg | 1 -
gtk/src/icontheme.hg | 65 ++++++++----------------
gtk/src/stylecontext.ccg | 5 --
gtk/src/stylecontext.hg | 21 ++------
gtk/src/widget.hg | 6 ++-
tools/m4/convert_gtk.m4 | 5 +-
14 files changed, 80 insertions(+), 177 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9b6edb70..4bf0dad4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -324,8 +324,8 @@ gtk/gtkmm/gridlayoutchild.cc
gtk/gtkmm/gridlayoutchild.h
gtk/gtkmm/headerbar.cc
gtk/gtkmm/headerbar.h
-gtk/gtkmm/iconinfo.cc
-gtk/gtkmm/iconinfo.h
+gtk/gtkmm/iconpaintable.cc
+gtk/gtkmm/iconpaintable.h
gtk/gtkmm/icontheme.cc
gtk/gtkmm/icontheme.h
gtk/gtkmm/iconview.cc
diff --git a/demos/gtk-demo/example_iconbrowser.cc b/demos/gtk-demo/example_iconbrowser.cc
index ff1ffb77..ef79f71b 100644
--- a/demos/gtk-demo/example_iconbrowser.cc
+++ b/demos/gtk-demo/example_iconbrowser.cc
@@ -312,7 +312,7 @@ void Example_IconBrowser::on_icon_view_item_activated(const Gtk::TreeModel::Path
const auto row = *iter;
const Glib::ustring name = row[m_store->get_text_column()];
const Glib::ustring description = row[m_store->m_columns.description];
- if (name.empty() || !Gtk::IconTheme::get_default()->has_icon(name))
+ if (name.empty() || !Gtk::IconTheme::get_for_display(get_display())->has_icon(name))
return;
m_details.set_title(name);
@@ -849,11 +849,11 @@ void Example_IconBrowser::add_icon(const Glib::ustring& name,
const Glib::ustring& description, const Glib::ustring& context_id)
{
auto regular_name = name;
- if (!Gtk::IconTheme::get_default()->has_icon(regular_name))
+ if (!Gtk::IconTheme::get_for_display(get_display())->has_icon(regular_name))
regular_name.clear();
auto symbolic_name = name + "-symbolic";
- if (!Gtk::IconTheme::get_default()->has_icon(symbolic_name))
+ if (!Gtk::IconTheme::get_for_display(get_display())->has_icon(symbolic_name))
symbolic_name.clear();
// Add a new row to the IconInfoStore (which is a ListStore).
@@ -960,7 +960,6 @@ void DetailDialog::set_image(
void DetailDialog::on_image_drag_begin(const Glib::RefPtr<Gdk::Drag>& /* drag */, int size_index)
{
- std::cout << "on_image_drag_begin\n";
auto image_texture = get_icon(size_index);
if (image_texture)
{
@@ -972,7 +971,6 @@ void DetailDialog::on_image_drag_begin(const Glib::RefPtr<Gdk::Drag>& /* drag */
void DetailDialog::on_image_get_texture(Glib::ValueBase& value, int size_index)
{
- std::cout << "on_image_get_texture\n";
auto image_texture = get_icon(size_index);
if (image_texture)
{
@@ -985,17 +983,12 @@ void DetailDialog::on_image_get_texture(Glib::ValueBase& value, int size_index)
Glib::RefPtr<const Gdk::Texture> DetailDialog::get_icon(int size_index)
{
- auto context = m_image[size_index].get_style_context();
- auto info = Gtk::IconTheme::get_default()->lookup_icon(
+ auto icon = Gtk::IconTheme::get_for_display(get_display())->lookup_icon(
m_icon_name, m_icon_size[size_index]);
Glib::RefPtr<const Gdk::Texture> texture;
try
{
- // Gtk::IconInfo::load_symbolic_for_context() returns a Glib::RefPtr<const Gdk::Paintable>
- // which is actually a Glib::RefPtr<const Gdk::Texture>
- bool is_symbolic = false;
- texture = std::dynamic_pointer_cast<const Gdk::Texture>(
- info->load_symbolic_for_context(context, is_symbolic));
+ texture = icon->download_texture();
}
catch (const Glib::Error& err)
{
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index 31927228..3d40e79a 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -107,8 +107,6 @@ public:
_WRAP_METHOD(int get_n_monitors() const, gdk_display_get_n_monitors)
_WRAP_METHOD(Glib::RefPtr<Monitor> get_monitor(int monitor_num), gdk_display_get_monitor, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Monitor> get_monitor(int monitor_num) const, gdk_display_get_monitor,
refreturn, constversion)
- _WRAP_METHOD(Glib::RefPtr<Monitor> get_primary_monitor(), gdk_display_get_primary_monitor, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Monitor> get_primary_monitor() const, gdk_display_get_primary_monitor,
refreturn, constversion)
_WRAP_METHOD(Glib::RefPtr<Monitor> get_monitor_at_surface(const Glib::RefPtr<Surface>& surface),
gdk_display_get_monitor_at_surface, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Monitor> get_monitor_at_surface(const Glib::RefPtr<Surface>& surface)
const, gdk_display_get_monitor_at_surface, refreturn, constversion)
diff --git a/gdk/src/monitor.hg b/gdk/src/monitor.hg
index a279e55e..a5834eae 100644
--- a/gdk/src/monitor.hg
+++ b/gdk/src/monitor.hg
@@ -31,11 +31,7 @@ class Display;
* Gdk::Monitor objects represent the individual outputs that are
* associated with a Gdk::Display. Display has APIs to enumerate
* monitors with Display::get_n_monitors() and Display::get_monitor()
- * and to find particular monitors with Display::get_primary_monitor(),
- * Display::get_monitor_at_point() or Display::get_monitor_at_window().
- *
- * Monitor was introduced in gtkmm 3.22 and supersedes earlier
- * APIs in Gdk::Screen to obtain monitor-related information.
+ * and to find particular monitors with Display::get_monitor_at_surface().
*
* @newin{3,22}
*/
@@ -59,7 +55,6 @@ public:
_WRAP_METHOD(int get_scale_factor() const, gdk_monitor_get_scale_factor)
_WRAP_METHOD(int get_refresh_rate() const, gdk_monitor_get_refresh_rate)
_WRAP_METHOD(SubpixelLayout get_subpixel_layout() const, gdk_monitor_get_subpixel_layout)
- _WRAP_METHOD(bool is_primary() const, gdk_monitor_is_primary)
_WRAP_METHOD(bool is_valid() const, gdk_monitor_is_valid)
// We use no_default_handler because _GdkMonitorClass is private
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 6cc06c43..84c74c6f 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -109,7 +109,7 @@ gtkmm_files_any_hg = \
gridlayout.hg \
gridlayoutchild.hg \
headerbar.hg \
- iconinfo.hg \
+ iconpaintable.hg \
icontheme.hg \
iconview.hg \
image.hg \
diff --git a/gtk/src/iconinfo.ccg b/gtk/src/iconpaintable.ccg
similarity index 89%
rename from gtk/src/iconinfo.ccg
rename to gtk/src/iconpaintable.ccg
index d7493623..31a889a9 100644
--- a/gtk/src/iconinfo.ccg
+++ b/gtk/src/iconpaintable.ccg
@@ -15,8 +15,4 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <glibmm/vectorutils.h>
-#include <giomm/slot_async.h>
-
#include <gtk/gtk.h>
-#include <gtkmm/icontheme.h>
diff --git a/gtk/src/iconpaintable.hg b/gtk/src/iconpaintable.hg
new file mode 100644
index 00000000..e93d3fb6
--- /dev/null
+++ b/gtk/src/iconpaintable.hg
@@ -0,0 +1,40 @@
+/* Copyright (C) 2003 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <glibmm/object.h>
+#include <gdkmm/texture.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gtk
+{
+
+class IconPaintable : public Glib::Object, public Gdk::Paintable
+{
+ _CLASS_GOBJECT(IconPaintable, GtkIconPaintable, GTK_ICON_PAINTABLE, Glib::Object, GObject)
+ _IMPLEMENTS_INTERFACE(Gdk::Paintable)
+
+public:
+ _WRAP_METHOD(Glib::ustring get_filename() const, gtk_icon_paintable_get_filename)
+ _WRAP_METHOD(bool is_symbolic() const, gtk_icon_paintable_is_symbolic)
+
+ _WRAP_METHOD(Glib::RefPtr<Gdk::Texture> download_texture(), gtk_icon_paintable_download_texture, errthrow)
+ _WRAP_METHOD(Glib::RefPtr<const Gdk::Texture> download_texture() const,
gtk_icon_paintable_download_texture, errthrow, constversion)
+};
+
+} // namespace Gtk
diff --git a/gtk/src/icontheme.ccg b/gtk/src/icontheme.ccg
index 620d1755..590caaa4 100644
--- a/gtk/src/icontheme.ccg
+++ b/gtk/src/icontheme.ccg
@@ -45,4 +45,3 @@ std::vector<int> IconTheme::get_icon_sizes(const Glib::ustring& icon_name) const
}
} // namespace Gtk
-
diff --git a/gtk/src/icontheme.hg b/gtk/src/icontheme.hg
index 57ab1163..726629d2 100644
--- a/gtk/src/icontheme.hg
+++ b/gtk/src/icontheme.hg
@@ -19,8 +19,8 @@
#include <gdkmm/paintable.h>
#include <gdkmm/display.h>
-
-#include <gtkmm/iconinfo.h>
+#include <gtkmm/enums.h>
+#include <gtkmm/iconpaintable.h>
#include <giomm/icon.h>
_DEFS(gtkmm,gtk)
@@ -42,7 +42,7 @@ _WRAP_GERROR(IconThemeError,GtkIconThemeError,GTK_ICON_THEME_ERROR)
* providing a filename is to allow different icons to be used
* depending on what “icon theme” is selected by the user.
* The operation of icon themes on Linux and Unix follows the
- * [Icon Theme Specification](http://www.freedesktop.org/Standards/icon-theme-spec).
+ * [IconPaintable Theme Specification](http://www.freedesktop.org/Standards/icon-theme-spec).
* There is a fallback icon theme, named `hicolor`, where applications
* should install their icons, but additional icon themes can be installed
* as operating system vendors and users choose.
@@ -54,7 +54,7 @@ _WRAP_GERROR(IconThemeError,GtkIconThemeError,GTK_ICON_THEME_ERROR)
* can create new %Gtk::IconTheme objects, but it’s much more
* efficient to use the standard icon theme for the Gdk::Display
* so that the icon information is shared with other people
- * looking up icons. Use get_default() or get_for_display().
+ * looking up icons. Use get_for_display().
*/
class IconTheme : public Glib::Object
{
@@ -66,7 +66,6 @@ protected:
public:
_WRAP_CREATE()
- _WRAP_METHOD(static Glib::RefPtr<IconTheme> get_default(), gtk_icon_theme_get_default, refreturn)
_WRAP_METHOD(static Glib::RefPtr<IconTheme> get_for_display(const Glib::RefPtr<Gdk::Display>& display),
gtk_icon_theme_get_for_display, refreturn)
_WRAP_METHOD(void set_display(const Glib::RefPtr<Gdk::Display>& display), gtk_icon_theme_set_display)
void set_search_path(const std::vector<Glib::ustring>& path);
@@ -79,52 +78,30 @@ public:
_WRAP_METHOD(void set_custom_theme(const Glib::ustring& theme_name), gtk_icon_theme_set_custom_theme)
_WRAP_METHOD(bool has_icon(const Glib::ustring& icon_name) const, gtk_icon_theme_has_icon)
+ _WRAP_METHOD_DOCS_ONLY(gtk_icon_theme_get_icon_sizes)
std::vector<int> get_icon_sizes(const Glib::ustring& icon_name) const;
- _IGNORE(gtk_icon_theme_get_icon_sizes)
-
- _WRAP_METHOD(Glib::RefPtr<IconInfo> lookup_icon(const Glib::ustring& icon_name, int size, IconLookupFlags
flags = (IconLookupFlags)0), gtk_icon_theme_lookup_icon)
- _WRAP_METHOD(Glib::RefPtr<const IconInfo> lookup_icon(const Glib::ustring& icon_name, int size,
IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_lookup_icon, constversion)
-
- _WRAP_METHOD(Glib::RefPtr<IconInfo> lookup_icon(const Glib::ustring& icon_name, int size, int scale,
IconLookupFlags flags = (IconLookupFlags)0), gtk_icon_theme_lookup_icon_for_scale)
- _WRAP_METHOD(Glib::RefPtr<const IconInfo> lookup_icon(const Glib::ustring& icon_name, int size, int scale,
IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_lookup_icon_for_scale, constversion)
-
- _WRAP_METHOD(Glib::RefPtr<IconInfo> lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon, int size,
IconLookupFlags flags = (IconLookupFlags)0), gtk_icon_theme_lookup_by_gicon)
- _WRAP_METHOD(Glib::RefPtr<const IconInfo> lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon, int size,
IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_lookup_by_gicon, constversion)
-
- _WRAP_METHOD(Glib::RefPtr<IconInfo> lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon, int size, int
scale, IconLookupFlags flags = (IconLookupFlags)0), gtk_icon_theme_lookup_by_gicon_for_scale)
- _WRAP_METHOD(Glib::RefPtr<const IconInfo> lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon, int size,
int scale, IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_lookup_by_gicon_for_scale,
constversion)
- #m4 _CONVERSION(`const std::vector<Glib::ustring>&',`const gchar*[]',`const_cast<const
gchar**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array($3).data())')
- _WRAP_METHOD(Glib::RefPtr<IconInfo> choose_icon(const std::vector<Glib::ustring>& icon_names, int size,
IconLookupFlags flags = (IconLookupFlags)0), gtk_icon_theme_choose_icon)
- _WRAP_METHOD(Glib::RefPtr<const IconInfo> choose_icon(const std::vector<Glib::ustring>& icon_names, int
size, IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_choose_icon, constversion)
-
- _WRAP_METHOD(Glib::RefPtr<IconInfo> choose_icon(const std::vector<Glib::ustring>& icon_names, int size,
int scale, IconLookupFlags flags = (IconLookupFlags)0), gtk_icon_theme_choose_icon_for_scale)
- _WRAP_METHOD(Glib::RefPtr<const IconInfo> choose_icon(const std::vector<Glib::ustring>& icon_names, int
size, int scale, IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_choose_icon_for_scale,
constversion)
-
- _WRAP_METHOD(Glib::RefPtr<const Gdk::Paintable> load_icon(const Glib::ustring& icon_name, int size,
- IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_load_icon, errthrow)
- _WRAP_METHOD(Glib::RefPtr<const Gdk::Paintable> load_icon(const Glib::ustring& icon_name, int size,
- int scale, IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_load_icon_for_scale,
errthrow)
+#m4 _CONVERSION(`const std::vector<Glib::ustring>&',`const char*[]',`const_cast<const
gchar**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array($3).data())')
+ _WRAP_METHOD(Glib::RefPtr<IconPaintable> lookup_icon(const Glib::ustring& icon_name,
+ const std::vector<Glib::ustring>& fallbacks{?}, int size, int scale = 1, TextDirection direction =
TextDirection::NONE,
+ IconLookupFlags flags = (IconLookupFlags)0), gtk_icon_theme_lookup_icon)
+ _WRAP_METHOD(Glib::RefPtr<const IconPaintable> lookup_icon(const Glib::ustring& icon_name,
+ const std::vector<Glib::ustring>& fallbacks{?}, int size, int scale = 1, TextDirection direction =
TextDirection::NONE,
+ IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_lookup_icon, constversion)
+
+ _WRAP_METHOD(Glib::RefPtr<IconPaintable> lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon,
+ int size, int scale = 1, TextDirection direction = TextDirection::NONE,
+ IconLookupFlags flags = (IconLookupFlags)0), gtk_icon_theme_lookup_by_gicon)
+ _WRAP_METHOD(Glib::RefPtr<const IconPaintable> lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon,
+ int size, int scale = 1, TextDirection direction = TextDirection::NONE,
+ IconLookupFlags flags = (IconLookupFlags)0) const, gtk_icon_theme_lookup_by_gicon, constversion)
#m4 _CONVERSION(`GList*',`std::vector<Glib::ustring>',`Glib::ListHandler<Glib::ustring>::list_to_vector($3,
Glib::OWNERSHIP_DEEP)')
/** Lists the icons in the current icon theme.
*
- * Only a subset of the icons can be listed by providing a context string.
- * The set of values for the context string is system dependent,
- * but will typically include such values as “Applications” and
- * “MimeTypes”. Contexts are explained in the
- * <a href="http://www.freedesktop.org/wiki/Specifications/icon-theme-spec">Icon Theme Specification</a>.
- * The standard contexts are listed in the
- * <a href="http://www.freedesktop.org/wiki/Specifications/icon-naming-spec">Icon Naming Specification</a>.
- *
- * @param context A string identifying a particular type of icon,
- * or an empty string to list all icons.
- * @return A vector holding the names of all the icons in the theme,
- * or all the icons in the context.
+ * @return A vector holding the names of all the icons in the theme.
*/
- _WRAP_METHOD(std::vector<Glib::ustring> list_icons(const Glib::ustring& context{NULL} = {}) const,
gtk_icon_theme_list_icons)
-
- _WRAP_METHOD(bool rescan_if_needed(), gtk_icon_theme_rescan_if_needed)
+ _WRAP_METHOD(std::vector<Glib::ustring> list_icons() const, gtk_icon_theme_list_icons)
// no_default_handler because GtkIconThemeClass is private.
_WRAP_SIGNAL(void changed(), "changed", no_default_handler)
diff --git a/gtk/src/stylecontext.ccg b/gtk/src/stylecontext.ccg
index 2035f64b..07f1c434 100644
--- a/gtk/src/stylecontext.ccg
+++ b/gtk/src/stylecontext.ccg
@@ -51,9 +51,4 @@ Border StyleContext::get_margin() const
return Border(&cborder, true);
}
-void StyleContext::unset_parent()
-{
- gtk_style_context_set_parent(gobj(), nullptr);
-}
-
} // namespace Gtk
diff --git a/gtk/src/stylecontext.hg b/gtk/src/stylecontext.hg
index 60a62f7c..d9003996 100644
--- a/gtk/src/stylecontext.hg
+++ b/gtk/src/stylecontext.hg
@@ -54,14 +54,6 @@ namespace Gtk
* Gdk::Display and RTL/LTR information set, The style context will be also
* updated automatically if any of these settings change on the widget.
*
- * If you are using the theming layer standalone, you will need to set a
- * widget path and a display yourself to the created style context through
- * set_path() and set_display(), as well
- * as updating the context yourself using invalidate()
- * whenever any of the conditions change, such as a change in the
- * Settings::property_gtk_theme_name() setting or a hierarchy change in the rendered
- * widget.
- *
* <h2>Transition animations</h2>
*
* StyleContext has built-in support for state change transitions.
@@ -102,8 +94,7 @@ protected:
_CTOR_DEFAULT()
public:
- _WRAP_CREATE()
- _IGNORE(gtk_style_context_new)
+ _WRAP_ENUM(PrintFlags, GtkStyleContextPrintFlags)
_WRAP_METHOD(static void add_provider_for_display(const Glib::RefPtr<Gdk::Display>& display, const
Glib::RefPtr<StyleProvider>& provider, guint priority), gtk_style_context_add_provider_for_display)
_WRAP_METHOD(static void remove_provider_for_display(const Glib::RefPtr<Gdk::Display>& display, const
Glib::RefPtr<StyleProvider>& provider), gtk_style_context_remove_provider_for_display)
@@ -121,12 +112,6 @@ public:
_WRAP_METHOD(void set_scale(int scale), gtk_style_context_set_scale)
_WRAP_METHOD(int get_scale() const, gtk_style_context_get_scale)
- _WRAP_METHOD(void set_parent(const Glib::RefPtr<StyleContext>& parent), gtk_style_context_set_parent)
- void unset_parent();
-
- _WRAP_METHOD(Glib::RefPtr<StyleContext> get_parent(), gtk_style_context_get_parent, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const StyleContext> get_parent() const, gtk_style_context_get_parent, refreturn,
constversion)
-
#m4 _CONVERSION(`GList*',`std::vector<Glib::ustring>',`Glib::ListHandler<Glib::ustring>::list_to_vector($3,
Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(std::vector<Glib::ustring> list_classes() const, gtk_style_context_list_classes)
@@ -175,9 +160,9 @@ public:
_WRAP_METHOD(void render_icon(const Cairo::RefPtr<Cairo::Context>& cr, const Glib::RefPtr<Gdk::Texture>&
texture, 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)
- _WRAP_SIGNAL(void changed(), "changed")
+ _WRAP_METHOD(Glib::ustring to_string(PrintFlags flags) const, gtk_style_context_to_string)
+
_WRAP_PROPERTY("display", Glib::RefPtr<Gdk::Display>)
- _WRAP_PROPERTY("parent", Glib::RefPtr<StyleContext>)
};
} // namespace Gtk
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index e1e8af18..cd8b2939 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -582,6 +582,10 @@ public:
_WRAP_METHOD(bool should_layout() const, gtk_widget_should_layout)
+ _WRAP_METHOD(void add_style_class(const Glib::ustring& style_class), gtk_widget_add_style_class)
+ _WRAP_METHOD(void remove_style_class(const Glib::ustring& style_class), gtk_widget_remove_style_class)
+ _WRAP_METHOD(bool has_style_class(const Glib::ustring& style_class) const, gtk_widget_has_style_class)
+
_WRAP_SIGNAL(void show(),"show")
_WRAP_SIGNAL(void hide(),"hide", custom_c_callback)
@@ -607,8 +611,6 @@ public:
_WRAP_SIGNAL(void state_flags_changed(Gtk::StateFlags previous_state_flags), "state-flags-changed")
- _WRAP_SIGNAL(void style_updated(), "style_updated")
-
_WRAP_SIGNAL(void direction_changed(TextDirection direction), "direction_changed")
_WRAP_SIGNAL(void grab_notify(bool was_grabbed), "grab_notify")
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 9c9f60c7..e201bf38 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -84,6 +84,7 @@ _CONV_ENUM(Gtk,SortType)
_CONV_INCLASS_ENUM(Gtk,SpinButton,UpdatePolicy)
_CONV_ENUM(Gtk,SpinType)
_CONV_ENUM(Gtk,StackTransitionType)
+_CONV_INCLASS_ENUM(Gtk,StyleContext,PrintFlags)
_CONV_ENUM(Gtk,TextDirection)
_CONV_ENUM(Gtk,TextSearchFlags)
_CONV_ENUM(Gtk,TextWindowType)
@@ -288,8 +289,8 @@ _CONVERSION(Gtk::Notebook_Helpers::Page*,GtkNotebookPage*,`($1)((void*)($3))',`(
_CONVERSION(`GtkSettings*',`Glib::RefPtr<Settings>', Glib::wrap($3))
-_CONVERSION(`GtkIconInfo*',`Glib::RefPtr<IconInfo>',`Glib::wrap($3)')
-_CONVERSION(`GtkIconInfo*',`Glib::RefPtr<const IconInfo>',`Glib::wrap($3)')
+_CONVERSION(`GtkIconPaintable*',`Glib::RefPtr<IconPaintable>',`Glib::wrap($3)')
+_CONVERSION(`GtkIconPaintable*',`Glib::RefPtr<const IconPaintable>',`Glib::wrap($3)')
_CONVERSION(`GtkIconTheme*',`Glib::RefPtr<IconTheme>',`Glib::wrap($3)')
_CONVERSION(`GtkWindowGroup*',`Glib::RefPtr<WindowGroup>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]