summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2017-08-02 16:59:09 +0100
committerBenjamin Otte <otte@redhat.com>2017-08-02 16:59:09 +0100
commit47fe08528d8d483aaef5e91f1a8646e066febf06 (patch)
treeabc233f3fb6f2ec3283433b11dd56514d7e38067 /gtk
parent18c086a46cdeeb096a78955b07de309f66bf5c38 (diff)
downloadgtk+-47fe08528d8d483aaef5e91f1a8646e066febf06.tar.gz
eventbox: Remove
Diffstat (limited to 'gtk')
-rw-r--r--gtk/Makefile.am2
-rw-r--r--gtk/gtk-autocleanups.h1
-rw-r--r--gtk/gtk.h1
-rw-r--r--gtk/gtkcombobox.c1
-rw-r--r--gtk/gtkeventbox.c355
-rw-r--r--gtk/gtkeventbox.h86
-rw-r--r--gtk/gtkplacesviewrow.c1
-rw-r--r--gtk/gtkprintunixdialog.c1
-rw-r--r--gtk/gtkrecentchooserdefault.c1
-rw-r--r--gtk/makefile.msc.in2
-rw-r--r--gtk/meson.build2
11 files changed, 0 insertions, 453 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 15e697ec4b..eca8907b8f 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -189,7 +189,6 @@ gtk_public_h_sources = \
gtkentrybuffer.h \
gtkentrycompletion.h \
gtkenums.h \
- gtkeventbox.h \
gtkeventcontroller.h \
gtkexpander.h \
gtkfilechooser.h \
@@ -726,7 +725,6 @@ gtk_base_c_sources = \
gtkentry.c \
gtkentrybuffer.c \
gtkentrycompletion.c \
- gtkeventbox.c \
gtkeventcontroller.c \
gtkexpander.c \
gtkfilechooser.c \
diff --git a/gtk/gtk-autocleanups.h b/gtk/gtk-autocleanups.h
index a46e35a3ae..ecddaf9e76 100644
--- a/gtk/gtk-autocleanups.h
+++ b/gtk/gtk-autocleanups.h
@@ -68,7 +68,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkEditable, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkEntry, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkEntryBuffer, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkEntryCompletion, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkEventBox, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkEventController, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkExpander, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkFileChooserButton, g_object_unref)
diff --git a/gtk/gtk.h b/gtk/gtk.h
index 0e8b26fc04..eb31ee23b9 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -93,7 +93,6 @@
#include <gtk/gtkentrybuffer.h>
#include <gtk/gtkentrycompletion.h>
#include <gtk/gtkenums.h>
-#include <gtk/gtkeventbox.h>
#include <gtk/gtkeventcontroller.h>
#include <gtk/gtkexpander.h>
#include <gtk/gtkfixed.h>
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index ce4097b791..167124ed94 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -26,7 +26,6 @@
#include "gtkcellrenderertext.h"
#include "gtkcellview.h"
#include "gtkcontainerprivate.h"
-#include "gtkeventbox.h"
#include "gtkframe.h"
#include "gtkiconprivate.h"
#include "gtkbox.h"
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
deleted file mode 100644
index ac2cd2c66c..0000000000
--- a/gtk/gtkeventbox.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * 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 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 <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#include "config.h"
-
-#include "gtkeventbox.h"
-
-#include "gtkintl.h"
-#include "gtkprivate.h"
-#include "gtkrender.h"
-#include "gtksizerequest.h"
-#include "gtkwidgetprivate.h"
-
-
-/**
- * SECTION:gtkeventbox
- * @Short_description: A widget used to catch events for widgets which
- * do not have their own window
- * @Title: GtkEventBox
- *
- * The #GtkEventBox widget is a subclass of #GtkBin which also has its
- * own window. It is useful since it allows you to catch events for widgets
- * which do not have their own window.
- */
-
-struct _GtkEventBoxPrivate
-{
- gboolean above_child;
- GdkWindow *event_window;
-};
-
-enum {
- PROP_0,
- PROP_ABOVE_CHILD
-};
-
-static void gtk_event_box_realize (GtkWidget *widget);
-static void gtk_event_box_unrealize (GtkWidget *widget);
-static void gtk_event_box_map (GtkWidget *widget);
-static void gtk_event_box_unmap (GtkWidget *widget);
-static void gtk_event_box_size_allocate (GtkWidget *widget,
- const GtkAllocation *allocation,
- int baseline,
- GtkAllocation *out_clip);
-static void gtk_event_box_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gtk_event_box_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-G_DEFINE_TYPE_WITH_PRIVATE (GtkEventBox, gtk_event_box, GTK_TYPE_BIN)
-
-static void
-gtk_event_box_class_init (GtkEventBoxClass *class)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (class);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
-
- gobject_class->set_property = gtk_event_box_set_property;
- gobject_class->get_property = gtk_event_box_get_property;
-
- widget_class->realize = gtk_event_box_realize;
- widget_class->unrealize = gtk_event_box_unrealize;
- widget_class->map = gtk_event_box_map;
- widget_class->unmap = gtk_event_box_unmap;
- widget_class->size_allocate = gtk_event_box_size_allocate;
-
- g_object_class_install_property (gobject_class,
- PROP_ABOVE_CHILD,
- g_param_spec_boolean ("above-child",
- P_("Above child"),
- P_("Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it."),
- FALSE,
- GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
-}
-
-static void
-gtk_event_box_init (GtkEventBox *event_box)
-{
- gtk_widget_set_has_window (GTK_WIDGET (event_box), FALSE);
-
- event_box->priv = gtk_event_box_get_instance_private (event_box);
- event_box->priv->above_child = FALSE;
-}
-
-/**
- * gtk_event_box_new:
- *
- * Creates a new #GtkEventBox.
- *
- * Returns: a new #GtkEventBox
- */
-GtkWidget*
-gtk_event_box_new (void)
-{
- return g_object_new (GTK_TYPE_EVENT_BOX, NULL);
-}
-
-static void
-gtk_event_box_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GtkEventBox *event_box;
-
- event_box = GTK_EVENT_BOX (object);
-
- switch (prop_id)
- {
- case PROP_ABOVE_CHILD:
- gtk_event_box_set_above_child (event_box, g_value_get_boolean (value));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gtk_event_box_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GtkEventBox *event_box;
-
- event_box = GTK_EVENT_BOX (object);
-
- switch (prop_id)
- {
- case PROP_ABOVE_CHILD:
- g_value_set_boolean (value, gtk_event_box_get_above_child (event_box));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-/**
- * gtk_event_box_get_above_child:
- * @event_box: a #GtkEventBox
- *
- * Returns whether the event box window is above or below the
- * windows of its child. See gtk_event_box_set_above_child()
- * for details.
- *
- * Returns: %TRUE if the event box window is above the
- * window of its child
- *
- * Since: 2.4
- */
-gboolean
-gtk_event_box_get_above_child (GtkEventBox *event_box)
-{
- GtkEventBoxPrivate *priv = event_box->priv;
-
- g_return_val_if_fail (GTK_IS_EVENT_BOX (event_box), FALSE);
-
- return priv->above_child;
-}
-
-/**
- * gtk_event_box_set_above_child:
- * @event_box: a #GtkEventBox
- * @above_child: %TRUE if the event box window is above its child
- *
- * Set whether the event box window is positioned above the windows
- * of its child, as opposed to below it. If the window is above, all
- * events inside the event box will go to the event box. If the window
- * is below, events in windows of child widgets will first got to that
- * widget, and then to its parents.
- *
- * The default is to keep the window below the child.
- *
- * Since: 2.4
- */
-void
-gtk_event_box_set_above_child (GtkEventBox *event_box,
- gboolean above_child)
-{
- GtkEventBoxPrivate *priv = event_box->priv;
- GtkWidget *widget;
-
- g_return_if_fail (GTK_IS_EVENT_BOX (event_box));
-
- widget = GTK_WIDGET (event_box);
-
- above_child = above_child != FALSE;
-
- if (priv->above_child != above_child)
- {
- priv->above_child = above_child;
-
- if (gtk_widget_get_realized (widget))
- {
- if (!gtk_widget_get_has_window (widget))
- {
- if (above_child)
- gdk_window_raise (priv->event_window);
- else
- gdk_window_lower (priv->event_window);
- }
- else
- {
- gboolean visible = gtk_widget_get_visible (widget);
-
- if (visible)
- gtk_widget_hide (widget);
-
- gtk_widget_unrealize (widget);
- gtk_widget_realize (widget);
-
- if (visible)
- gtk_widget_show (widget);
- }
- }
-
- if (gtk_widget_get_visible (widget))
- gtk_widget_queue_resize (widget);
-
- g_object_notify (G_OBJECT (event_box), "above-child");
- }
-}
-
-static void
-gtk_event_box_realize (GtkWidget *widget)
-{
- GtkEventBoxPrivate *priv;
- GtkAllocation allocation;
-
- priv = GTK_EVENT_BOX (widget)->priv;
-
- gtk_widget_get_window_allocation (widget, &allocation);
-
- GTK_WIDGET_CLASS (gtk_event_box_parent_class)->realize (widget);
-
- if (priv->above_child)
- {
- priv->event_window = gdk_window_new_input (gtk_widget_get_window (widget),
- GDK_ALL_EVENTS_MASK,
- &allocation);
- gtk_widget_register_window (widget, priv->event_window);
- }
-}
-
-static void
-gtk_event_box_unrealize (GtkWidget *widget)
-{
- GtkEventBoxPrivate *priv = GTK_EVENT_BOX (widget)->priv;
-
- if (priv->event_window != NULL)
- {
- gtk_widget_unregister_window (widget, priv->event_window);
- gdk_window_destroy (priv->event_window);
- priv->event_window = NULL;
- }
-
- GTK_WIDGET_CLASS (gtk_event_box_parent_class)->unrealize (widget);
-}
-
-static void
-gtk_event_box_map (GtkWidget *widget)
-{
- GtkEventBoxPrivate *priv = GTK_EVENT_BOX (widget)->priv;
-
- if (priv->event_window != NULL && !priv->above_child)
- gdk_window_show (priv->event_window);
-
- GTK_WIDGET_CLASS (gtk_event_box_parent_class)->map (widget);
-
- if (priv->event_window != NULL && priv->above_child)
- gdk_window_show (priv->event_window);
-}
-
-static void
-gtk_event_box_unmap (GtkWidget *widget)
-{
- GtkEventBoxPrivate *priv = GTK_EVENT_BOX (widget)->priv;
-
- if (priv->event_window != NULL)
- gdk_window_hide (priv->event_window);
-
- GTK_WIDGET_CLASS (gtk_event_box_parent_class)->unmap (widget);
-}
-
-static void
-gtk_event_box_size_allocate (GtkWidget *widget,
- const GtkAllocation *allocation,
- int baseline,
- GtkAllocation *out_clip)
-{
- GtkBin *bin;
- GtkAllocation child_allocation;
- GtkEventBoxPrivate *priv;
- GtkWidget *child;
-
- bin = GTK_BIN (widget);
-
- if (!gtk_widget_get_has_window (widget))
- {
- child_allocation.x = allocation->x;
- child_allocation.y = allocation->y;
- }
- else
- {
- child_allocation.x = 0;
- child_allocation.y = 0;
- }
- child_allocation.width = allocation->width;
- child_allocation.height = allocation->height;
-
- if (gtk_widget_get_realized (widget))
- {
- priv = GTK_EVENT_BOX (widget)->priv;
-
- if (priv->event_window != NULL)
- gdk_window_move_resize (priv->event_window,
- child_allocation.x,
- child_allocation.y,
- child_allocation.width,
- child_allocation.height);
- }
-
- child = gtk_bin_get_child (bin);
- if (child)
- gtk_widget_size_allocate (child, &child_allocation, baseline, out_clip);
-}
diff --git a/gtk/gtkeventbox.h b/gtk/gtkeventbox.h
deleted file mode 100644
index fae62eb8ac..0000000000
--- a/gtk/gtkeventbox.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * 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 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 <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __GTK_EVENT_BOX_H__
-#define __GTK_EVENT_BOX_H__
-
-
-#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
-#error "Only <gtk/gtk.h> can be included directly."
-#endif
-
-#include <gtk/gtkbin.h>
-
-
-G_BEGIN_DECLS
-
-#define GTK_TYPE_EVENT_BOX (gtk_event_box_get_type ())
-#define GTK_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_EVENT_BOX, GtkEventBox))
-#define GTK_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
-#define GTK_IS_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_EVENT_BOX))
-#define GTK_IS_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EVENT_BOX))
-#define GTK_EVENT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
-
-typedef struct _GtkEventBox GtkEventBox;
-typedef struct _GtkEventBoxClass GtkEventBoxClass;
-typedef struct _GtkEventBoxPrivate GtkEventBoxPrivate;
-
-struct _GtkEventBox
-{
- GtkBin bin;
-
- /*< private >*/
- GtkEventBoxPrivate *priv;
-};
-
-/**
- * GtkEventBoxClass:
- * @parent_class: The parent class.
- */
-struct _GtkEventBoxClass
-{
- GtkBinClass parent_class;
-
- /*< private >*/
-
- /* Padding for future expansion */
- void (*_gtk_reserved1) (void);
- void (*_gtk_reserved2) (void);
- void (*_gtk_reserved3) (void);
- void (*_gtk_reserved4) (void);
-};
-
-GDK_AVAILABLE_IN_ALL
-GType gtk_event_box_get_type (void) G_GNUC_CONST;
-GDK_AVAILABLE_IN_ALL
-GtkWidget* gtk_event_box_new (void);
-GDK_AVAILABLE_IN_ALL
-gboolean gtk_event_box_get_above_child (GtkEventBox *event_box);
-GDK_AVAILABLE_IN_ALL
-void gtk_event_box_set_above_child (GtkEventBox *event_box,
- gboolean above_child);
-
-G_END_DECLS
-
-#endif /* __GTK_EVENT_BOX_H__ */
diff --git a/gtk/gtkplacesviewrow.c b/gtk/gtkplacesviewrow.c
index eb00df7867..70d8e8df68 100644
--- a/gtk/gtkplacesviewrow.c
+++ b/gtk/gtkplacesviewrow.c
@@ -28,7 +28,6 @@
*/
#ifdef GTK_COMPILATION
#include "gtkbutton.h"
-#include "gtkeventbox.h"
#include "gtkimage.h"
#include "gtkintl.h"
#include "gtklabel.h"
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index e630ad8a9b..5a31fd5ec0 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -48,7 +48,6 @@
#include "gtkgrid.h"
#include "gtkframe.h"
#include "gtklabel.h"
-#include "gtkeventbox.h"
#include "gtkbuildable.h"
#include "gtkmessagedialog.h"
#include "gtkbutton.h"
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index 6d859515fd..f65c568b83 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -41,7 +41,6 @@
#include "gtkcssiconthemevalueprivate.h"
#include "gtkdragsource.h"
#include "gtkentry.h"
-#include "gtkeventbox.h"
#include "gtkexpander.h"
#include "gtkframe.h"
#include "gtkbox.h"
diff --git a/gtk/makefile.msc.in b/gtk/makefile.msc.in
index 01515e8cd0..416d920827 100644
--- a/gtk/makefile.msc.in
+++ b/gtk/makefile.msc.in
@@ -203,7 +203,6 @@ gtk_OBJECTS = \
gtkentry.obj \
gtkentrybuffer.obj \
gtkentrycompletion.obj \
- gtkeventbox.obj \
gtkexpander.obj \
gtkfixed.obj \
gtkfontsel.obj \
@@ -392,7 +391,6 @@ gtk_public_h_sources = \
gtkentrybuffer.h \
gtkentrycompletion.h \
gtkenums.h \
- gtkeventbox.h \
gtkexpander.h \
gtkfilechooser.h \
gtkfilechooserbutton.h \
diff --git a/gtk/meson.build b/gtk/meson.build
index 0444bf2404..393a5cd20b 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -144,7 +144,6 @@ gtk_public_sources = files([
'gtkentry.c',
'gtkentrybuffer.c',
'gtkentrycompletion.c',
- 'gtkeventbox.c',
'gtkeventcontroller.c',
'gtkexpander.c',
'gtkfilechooser.c',
@@ -435,7 +434,6 @@ gtk_public_headers = files([
'gtkentrybuffer.h',
'gtkentrycompletion.h',
'gtkenums.h',
- 'gtkeventbox.h',
'gtkeventcontroller.h',
'gtkexpander.h',
'gtkfilechooser.h',