[gtkmm] Gtk: Remove API which has been removed in gtk+-4
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk: Remove API which has been removed in gtk+-4
- Date: Sun, 6 Nov 2016 16:22:48 +0000 (UTC)
commit 946588a38714c19fd47438a16e097493248bad2f
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Sun Nov 6 17:16:57 2016 +0100
Gtk: Remove API which has been removed in gtk+-4
Among other things, remove the Gtk::TextAttributes class.
GtkTextAttributes is now private (used only in gtk+). Bug #773642.
.gitignore | 4 ----
gtk/src/button.hg | 3 ---
gtk/src/entry.ccg | 7 -------
gtk/src/entry.hg | 14 --------------
gtk/src/enums.hg | 1 -
gtk/src/filelist.am | 1 -
gtk/src/gtk_signals.defs.patch | 22 ++++++----------------
gtk/src/textattributes.ccg | 20 --------------------
gtk/src/textattributes.hg | 39 ---------------------------------------
gtk/src/textiter.ccg | 14 --------------
gtk/src/textiter.hg | 4 +---
gtk/src/texttag.hg | 1 -
gtk/src/textview.hg | 1 -
gtk/src/widget.hg | 13 -------------
tools/m4/convert_gtk.m4 | 4 ----
15 files changed, 7 insertions(+), 141 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 746bc14..926f457 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,8 +50,6 @@ demos/pixbuf-demo
gdk/gdkmm-*.pc
gdk/gdkmm/applaunchcontext.cc
gdk/gdkmm/applaunchcontext.h
-gdk/gdkmm/color.cc
-gdk/gdkmm/color.h
gdk/gdkmm/cursor.cc
gdk/gdkmm/cursor.h
gdk/gdkmm/device.cc
@@ -434,8 +432,6 @@ gtk/gtkmm/switch.cc
gtk/gtkmm/switch.h
gtk/gtkmm/targetlist.cc
gtk/gtkmm/targetlist.h
-gtk/gtkmm/textattributes.cc
-gtk/gtkmm/textattributes.h
gtk/gtkmm/textbuffer.cc
gtk/gtkmm/textbuffer.h
gtk/gtkmm/textchildanchor.cc
diff --git a/gtk/src/button.hg b/gtk/src/button.hg
index d931408..99db855 100644
--- a/gtk/src/button.hg
+++ b/gtk/src/button.hg
@@ -76,9 +76,6 @@ public:
_WRAP_METHOD(void set_use_underline(bool use_underline = true), gtk_button_set_use_underline)
_WRAP_METHOD(bool get_use_underline() const, gtk_button_get_use_underline)
- _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_event_window(), gtk_button_get_event_window, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_event_window() const, gtk_button_get_event_window,
refreturn, constversion)
-
_WRAP_METHOD(void set_icon_name(const Glib::ustring& icon_name), gtk_button_set_icon_name)
_WRAP_METHOD(Glib::ustring get_icon_name() const, gtk_button_get_icon_name)
diff --git a/gtk/src/entry.ccg b/gtk/src/entry.ccg
index 8777b4b..950c266 100644
--- a/gtk/src/entry.ccg
+++ b/gtk/src/entry.ccg
@@ -63,13 +63,6 @@ void Entry::set_icon_drag_source(const Glib::RefPtr<TargetList>& target_list, Gd
gtk_entry_set_icon_drag_source(gobj(), ((GtkEntryIconPosition)(icon_pos)),
const_cast<GtkTargetList*>(Glib::unwrap(target_list)), ((GdkDragAction)(actions)));
}
-Gdk::Rectangle Entry::get_text_area() const
-{
- Gdk::Rectangle result;
- gtk_entry_get_text_area(const_cast<GtkEntry*>(gobj()), result.gobj());
- return result;
-}
-
Gdk::Rectangle Entry::get_icon_area(EntryIconPosition icon_pos) const
{
Gdk::Rectangle result;
diff --git a/gtk/src/entry.hg b/gtk/src/entry.hg
index e0ae849..3068a41 100644
--- a/gtk/src/entry.hg
+++ b/gtk/src/entry.hg
@@ -64,18 +64,6 @@ public:
_WRAP_METHOD(Glib::RefPtr<EntryBuffer> get_buffer(), gtk_entry_get_buffer, refreturn)
_WRAP_METHOD(Glib::RefPtr<const EntryBuffer> get_buffer() const, gtk_entry_get_buffer, refreturn,
constversion)
- /** Returns the area where the entry's text is drawn.
- * This function is useful when drawing something to the entry in a draw callback.
- *
- * See also get_icon_area().
- *
- * @result The location for the text area.
- *
- * @newin{3,0}
- **/
- Gdk::Rectangle get_text_area() const;
- _IGNORE(gtk_entry_get_text_area)
-
_WRAP_METHOD(void set_buffer(const Glib::RefPtr<EntryBuffer>& buffer), gtk_entry_set_buffer)
_WRAP_METHOD(void set_visibility(bool visible = true), gtk_entry_set_visibility)
_WRAP_METHOD(bool get_visibility() const, gtk_entry_get_visibility)
@@ -184,8 +172,6 @@ public:
* This function is useful when drawing something to the
* entry in a draw callback.
*
- * See also get_text_area().
- *
* @param icon_pos Icon position.
* @result The location for the icon area.
*
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index bdc924e..eb7e74a 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -50,7 +50,6 @@ _WRAP_ENUM(ScrollType, GtkScrollType)
_WRAP_ENUM(SelectionMode, GtkSelectionMode)
_WRAP_ENUM(ShadowType, GtkShadowType)
_WRAP_ENUM(StackTransitionType, GtkStackTransitionType)
-_WRAP_ENUM(StateType, GtkStateType)
_WRAP_ENUM(TargetFlags, GtkTargetFlags)
_WRAP_ENUM(ToolbarStyle, GtkToolbarStyle)
_WRAP_ENUM(WindowPosition,GtkWindowPosition)
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 4e7e7a2..045a87f 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -172,7 +172,6 @@ gtkmm_files_any_hg = \
styleprovider.hg \
switch.hg \
targetlist.hg \
- textattributes.hg \
textbuffer.hg \
textchildanchor.hg \
textiter.hg \
diff --git a/gtk/src/gtk_signals.defs.patch b/gtk/src/gtk_signals.defs.patch
index 956cd7b..9148f5a 100644
--- a/gtk/src/gtk_signals.defs.patch
+++ b/gtk/src/gtk_signals.defs.patch
@@ -1,5 +1,5 @@
---- ./../../gtk/src/gtk_signals.defs.orig 2016-11-01 13:27:33.663188572 +0100
-+++ ./../../gtk/src/gtk_signals.defs 2016-11-01 13:50:04.959615287 +0100
+--- ./../../gtk/src/gtk_signals.defs.orig 2016-11-05 12:10:48.138488731 +0100
++++ ./../../gtk/src/gtk_signals.defs 2016-11-05 12:18:17.944411939 +0100
@@ -1998,21 +1998,21 @@
(construct-only #f)
)
@@ -404,7 +404,7 @@
(return-type "void")
(when "first")
)
-@@ -10652,30 +10652,30 @@
+@@ -10646,30 +10646,30 @@
(parameters
'("gboolean" "p0")
)
@@ -437,7 +437,7 @@
(parameters
'("gboolean" "p0")
)
-@@ -10730,192 +10730,192 @@
+@@ -10724,192 +10724,192 @@
(parameters
'("GdkEvent*" "p0")
)
@@ -650,7 +650,7 @@
(parameters
'("GtkSelectionData*" "p0")
'("guint" "p1")
-@@ -10931,30 +10931,30 @@
+@@ -10925,30 +10925,30 @@
'("guint" "p1")
'("guint" "p2")
)
@@ -683,7 +683,7 @@
(parameters
'("GdkDragContext*" "p0")
'("guint" "p1")
-@@ -11046,39 +11046,39 @@
+@@ -11040,30 +11040,30 @@
'("guint" "p4")
'("guint" "p5")
)
@@ -699,16 +699,6 @@
)
)
- (define-signal damage-event
- (of-object "GtkWidget")
- (return-type "gboolean")
- (when "last")
- (parameters
-- '("GdkEvent*" "p0")
-+ '("GdkEventExpose*" "p0")
- )
- )
-
(define-signal grab-broken-event
(of-object "GtkWidget")
(return-type "gboolean")
diff --git a/gtk/src/textiter.ccg b/gtk/src/textiter.ccg
index 83b90b3..7e0e1ca 100644
--- a/gtk/src/textiter.ccg
+++ b/gtk/src/textiter.ccg
@@ -25,20 +25,6 @@ namespace Gtk
/**** Gtk::TextIter ********************************************************/
-
-
-bool TextIter::get_attributes(TextAttributes& values) const
-{
- // The initialization is not strictly necessary and omitting it
- // prevents a gcc-3.2 warning since { 0, } doesn't specifically
- // initialize all members.
- GtkTextAttributes gattributes; // = { 0, }
-
- const bool result = gtk_text_iter_get_attributes(gobj(), &gattributes);
- values = TextAttributes(&gattributes, true); //true = take_copy.
- return result;
-}
-
bool TextIter::starts_tag() const
{
return gtk_text_iter_starts_tag(const_cast<GtkTextIter*>(gobj()), nullptr /* see C docs */);
diff --git a/gtk/src/textiter.hg b/gtk/src/textiter.hg
index 66bf5d0..5e99d31 100644
--- a/gtk/src/textiter.hg
+++ b/gtk/src/textiter.hg
@@ -21,7 +21,6 @@
#include <gdkmm/pixbuf.h>
#include <gtkmm/texttag.h>
#include <gtkmm/textchildanchor.h>
-#include <gtkmm/textattributes.h>
#include <gtk/gtk.h> /* we need the definition of GtkTextIter */
@@ -54,7 +53,7 @@ class TextMark;
class TextIter
{
_CLASS_BOXEDTYPE_STATIC(TextIter, GtkTextIter)
- _IGNORE(gtk_text_iter_get_attributes, gtk_text_iter_copy, gtk_text_iter_free, gtk_text_iter_equal)
+ _IGNORE(gtk_text_iter_copy, gtk_text_iter_free, gtk_text_iter_equal)
_IGNORE(gtk_text_iter_assign)
public:
typedef std::bidirectional_iterator_tag iterator_category;
@@ -166,7 +165,6 @@ public:
_WRAP_METHOD(int get_chars_in_line() const, gtk_text_iter_get_chars_in_line)
_WRAP_METHOD(int get_bytes_in_line() const, gtk_text_iter_get_bytes_in_line)
- bool get_attributes(TextAttributes& values) const;
_WRAP_METHOD(Pango::Language get_language() const, gtk_text_iter_get_language)
_WRAP_METHOD(bool is_end() const, gtk_text_iter_is_end)
_WRAP_METHOD(bool is_start() const, gtk_text_iter_is_start)
diff --git a/gtk/src/texttag.hg b/gtk/src/texttag.hg
index 668af6b..ad48ddf 100644
--- a/gtk/src/texttag.hg
+++ b/gtk/src/texttag.hg
@@ -20,7 +20,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
#include <glibmm/object.h>
#include <gtkmm/enums.h>
-#include <gdkmm/color.h>
#include <gdkmm/rgba.h>
#include <pangomm/fontdescription.h>
#include <pangomm/tabarray.h>
diff --git a/gtk/src/textview.hg b/gtk/src/textview.hg
index 30d497f..6b17b5e 100644
--- a/gtk/src/textview.hg
+++ b/gtk/src/textview.hg
@@ -187,7 +187,6 @@ public:
_WRAP_METHOD(int get_indent() const, gtk_text_view_get_indent)
_WRAP_METHOD(void set_tabs(Pango::TabArray& tabs), gtk_text_view_set_tabs)
_WRAP_METHOD(Pango::TabArray get_tabs() const, gtk_text_view_get_tabs)
- _WRAP_METHOD(TextAttributes get_default_attributes() const, gtk_text_view_get_default_attributes)
_WRAP_METHOD(void set_overwrite(bool overwrite = true), gtk_text_view_set_overwrite)
_WRAP_METHOD(bool get_overwrite() const, gtk_text_view_get_overwrite)
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 668fb95..682395f 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -60,7 +60,6 @@ namespace Gtk
_CC_INCLUDE(gtk/gtk.h)
_WRAP_ENUM(DestDefaults, GtkDestDefaults)
-_WRAP_ENUM(WidgetHelpType, GtkWidgetHelpType)
_WRAP_ENUM(DragResult, GtkDragResult)
class Action;
@@ -232,8 +231,6 @@ public:
_WRAP_METHOD(bool get_is_drawable() const, gtk_widget_is_drawable)
_WRAP_METHOD(bool get_realized() const, gtk_widget_get_realized)
_WRAP_METHOD(bool get_mapped() const, gtk_widget_get_mapped)
- _WRAP_METHOD(void set_app_paintable(bool app_paintable = true), gtk_widget_set_app_paintable)
- _WRAP_METHOD(bool get_app_paintable() const, gtk_widget_get_app_paintable)
_WRAP_METHOD(void set_redraw_on_allocate(bool redraw_on_allocate = true),
gtk_widget_set_redraw_on_allocate)
@@ -490,8 +487,6 @@ public:
int get_width() const;
int get_height() const;
- _WRAP_METHOD(bool is_composited() const, gtk_widget_is_composited)
-
_WRAP_METHOD(bool in_destruction() const, gtk_widget_in_destruction)
_WRAP_METHOD(Glib::RefPtr<StyleContext> get_style_context(), gtk_widget_get_style_context, refreturn)
@@ -653,8 +648,6 @@ dnl
_CONVERSION(`GdkScreen*',`const Glib::RefPtr<Gdk::Screen>&',`Glib::wrap($3, true)')
_WRAP_SIGNAL(void screen_changed(const Glib::RefPtr<Gdk::Screen>& previous_screen), "screen_changed")
- _WRAP_SIGNAL(void composited_changed(), "composited_changed", no_default_handler)
-
//TODO: The signal_id is very C-like here:
//_WRAP_SIGNAL(bool can_activate_accel(guint signal_id), "can_activate_accel")
@@ -662,7 +655,6 @@ _CONVERSION(`GdkScreen*',`const Glib::RefPtr<Gdk::Screen>&',`Glib::wrap($3, true
_WRAP_SIGNAL(bool popup_menu(), "popup_menu", no_default_handler) //Note that popup-menu is a keybinding
signal, but is really meant to be wrapped.
//Keybinding signals:
- _IGNORE_SIGNAL("show_help")
_IGNORE_SIGNAL("keynav_failed")
_IGNORE_SIGNAL("destroy-event")
@@ -675,9 +667,6 @@ _CONVERSION(`GdkScreen*',`const Glib::RefPtr<Gdk::Screen>&',`Glib::wrap($3, true
_WRAP_SIGNAL(bool grab_broken_event(GdkEventGrabBroken* grab_broken_event), "grab_broken_event",
no_default_handler)
// TODO: Remove no_default_handler when we can break ABI:
- _WRAP_SIGNAL(bool damage_event(GdkEventExpose* expose_event), "damage-event", no_default_handler)
-
- // TODO: Remove no_default_handler when we can break ABI:
_WRAP_SIGNAL(bool touch_event(GdkEventTouch* touch_event), "touch_event", no_default_handler)
_WRAP_PROPERTY("name", Glib::ustring)
@@ -686,7 +675,6 @@ _CONVERSION(`GdkScreen*',`const Glib::RefPtr<Gdk::Screen>&',`Glib::wrap($3, true
_WRAP_PROPERTY("height_request", int)
_WRAP_PROPERTY("visible", bool)
_WRAP_PROPERTY("sensitive", bool)
- _WRAP_PROPERTY("app_paintable", bool)
_WRAP_PROPERTY("can_focus", bool)
_WRAP_PROPERTY("has_focus", bool)
_WRAP_PROPERTY("is_focus", bool)
@@ -736,7 +724,6 @@ protected:
#m4 _CONVERSION(`const ::Cairo::RefPtr< ::Cairo::Context>&',`cairo_t*',`($3)->cobj()')
_WRAP_METHOD(void draw(const ::Cairo::RefPtr< ::Cairo::Context>& cr), gtk_widget_draw)
- _WRAP_METHOD(void set_mapped(bool mapped = true), gtk_widget_set_mapped)
_WRAP_METHOD(void set_realized(bool realized = true), gtk_widget_set_realized)
_WRAP_METHOD(void set_has_window(bool has_window = true), gtk_widget_set_has_window)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 1d2a0f2..690aeb8 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -112,7 +112,6 @@ _CONV_ENUM(Gtk,SortType)
_CONV_ENUM(Gtk,SpinButtonUpdatePolicy)
_CONV_ENUM(Gtk,SpinType)
_CONV_ENUM(Gtk,StackTransitionType)
-_CONV_ENUM(Gtk,StateType)
_CONV_ENUM(Gtk,TargetFlags)
_CONV_ENUM(Gtk,TextDirection)
_CONV_ENUM(Gtk,TextSearchFlags)
@@ -126,7 +125,6 @@ _CONV_ENUM(Gtk,TreeViewDropPosition)
_CONV_ENUM(Gtk,TreeViewGridLines)
_CONV_ENUM(Gtk,UpdateType)
_CONV_ENUM(Gtk,Visibility)
-_CONV_ENUM(Gtk,WidgetHelpType)
_CONV_ENUM(Gtk,WindowPosition)
_CONV_ENUM(Gtk,WindowType)
_CONV_ENUM(Gtk,WrapMode)
@@ -419,8 +417,6 @@ _CONVERSION(`iterator&',`GtkTextIter*',__FR2P)
_CONVERSION(`const TextIter&',`const GtkTextIter*',__FR2P)
_CONVERSION(`const TextBuffer::iterator&',`const GtkTextIter*',__FR2P)
_CONVERSION(`const iterator&',`const GtkTextIter*',__FR2P)
-_CONVERSION(`TextAttributes&',`GtkTextAttributes*',__FR2P)
-_CONVERSION(`GtkTextAttributes*',`TextAttributes',TextAttributes($3))
_CONVERSION(`const Glib::RefPtr<TextTagTable>&',`GtkTextTagTable*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<TextBuffer>&',`GtkTextBuffer*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<TextChildAnchor>&',`GtkTextChildAnchor*',__CONVERT_REFPTR_TO_P)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]