From 6ac70c416d83031621859211ab611416045185f3 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 20 Oct 2021 17:21:32 +0300 Subject: [PATCH 51/51] gtk3x: Drop gtk-3.96 compatibility code See osdn #43082 Signed-off-by: Marko Lindqvist --- client/gui-gtk-4.0/gtkcompat.c | 60 ---------------------------------- client/gui-gtk-4.0/gtkcompat.h | 26 --------------- 2 files changed, 86 deletions(-) diff --git a/client/gui-gtk-4.0/gtkcompat.c b/client/gui-gtk-4.0/gtkcompat.c index 3fd052ee66..2ff935f02f 100644 --- a/client/gui-gtk-4.0/gtkcompat.c +++ b/client/gui-gtk-4.0/gtkcompat.c @@ -20,66 +20,6 @@ #define GTKCOMPAT_ITSELF #include "gtkcompat.h" -#if !GTK_CHECK_VERSION(3,98,0) - -/************************************************************************//** - Compatibility wrapper for dropping parameter from gtk_window_new() calls -****************************************************************************/ -GtkWidget *compat_window_new_wrapper(void) -{ - return gtk_window_new(GTK_WINDOW_TOPLEVEL); -} - -/************************************************************************//** - Version of gdk_key_event_get_keyval() for gtk < 3.98 -****************************************************************************/ -guint gdk_key_event_get_keyval(GdkEvent *ev) -{ - guint keyval; - - gdk_event_get_keyval(ev, &keyval); - - return keyval; -} - -/************************************************************************//** - Version of gdk_event_get_modifier_state() for gtk < 3.98 -****************************************************************************/ -GdkModifierType gdk_event_get_modifier_state(GdkEvent *ev) -{ - GdkModifierType state; - - gdk_event_get_state(ev, &state); - - return state; -} - -/************************************************************************//** - Version of gdk_button_event_get_button() for gtk < 3.98 -****************************************************************************/ -guint gdk_button_event_get_button(GdkEvent *ev) -{ - guint button; - - gdk_event_get_button(ev, &button); - - return button; -} - -/************************************************************************//** - Version of gdk_scroll_event_get_direction() for gtk < 3.98 -****************************************************************************/ -GdkScrollDirection gdk_scroll_event_get_direction(GdkEvent *ev) -{ - GdkScrollDirection direction; - - gdk_event_get_scroll_direction(ev, &direction); - - return direction; -} - -#endif /* GTK version < 3.98 */ - #if !GTK_CHECK_VERSION(3,98,3) diff --git a/client/gui-gtk-4.0/gtkcompat.h b/client/gui-gtk-4.0/gtkcompat.h index c41bac5361..9855f7db7f 100644 --- a/client/gui-gtk-4.0/gtkcompat.h +++ b/client/gui-gtk-4.0/gtkcompat.h @@ -17,32 +17,6 @@ #define GTKCOMPAT_GTK4_FINAL #endif -#if !GTK_CHECK_VERSION(3,98,0) -/* Compatibility mode */ - -GtkWidget *compat_window_new_wrapper(void); - -#ifndef GTKCOMPAT_ITSELF -#define gtk_window_new() compat_window_new_wrapper() -#endif /* GTKCOMPAT_ITSELF */ - -guint gdk_key_event_get_keyval(GdkEvent *ev); -GdkModifierType gdk_event_get_modifier_state(GdkEvent *ev); -guint gdk_button_event_get_button(GdkEvent *ev); -GdkScrollDirection gdk_scroll_event_get_direction(GdkEvent *ev); -#define gdk_event_get_position(_ev_, _x_, _y_) gdk_event_get_coords(_ev_, _x_, _y_) - -/* Wrap GtkNative away */ -#define GtkNative GtkWidget -#define gtk_widget_get_native(_wdg_) (_wdg_) -#define gtk_native_get_surface(_nat_) gtk_widget_get_surface(_nat_) - -#define gtk_label_set_wrap(_wdg_, _wrap_) gtk_label_set_line_wrap(_wdg_, _wrap_) - -#define gtk_menu_button_new() gtk_menu_new() - -#endif /* GTK version < 3.98 */ - #if !GTK_CHECK_VERSION(3,98,3) /* Compatibility mode */ -- 2.33.0