Commit 0a07e973 authored by Javier Jardon's avatar Javier Jardon

gtk/: fully remove gtkalias hacks

https://bugzilla.gnome.org/show_bug.cgi?id=623845
parent 404e7d0e
......@@ -21,7 +21,6 @@ CFILE_GLOB=$(top_srcdir)/gtk/*.c
# Header files to ignore when scanning
IGNORE_HFILES= \
gtkalias.h \
fnmatch.h \
gtkdebug.h \
gtkbuilderprivate.h \
......
......@@ -103,20 +103,9 @@ endif
gtk.def: gtk.symbols
(echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gtk.symbols | $(SED) -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > $(srcdir)/gtk.def
gtkalias.h: gtk.symbols
$(PERL) $(srcdir)/makegtkalias.pl < $(srcdir)/gtk.symbols > gtkalias.h
gtkaliasdef.c: gtk.symbols
$(PERL) $(srcdir)/makegtkalias.pl -def < $(srcdir)/gtk.symbols > gtkaliasdef.c
check-aliases:
@$(TESTS_ENVIRONMENT) $(srcdir)/aliasfilescheck.sh
.PHONY: check-aliases
TESTS_ENVIRONMENT = srcdir="$(srcdir)" gtk_all_c_sources="$(gtk_all_c_sources)"
TESTS = aliasfilescheck.sh
if OS_LINUX
TESTS += abicheck.sh pltcheck.sh
TESTS = abicheck.sh
endif
libgtkincludedir = $(includedir)/gtk-3.0/gtk
......@@ -732,13 +721,11 @@ gtk_built_public_sources = \
# built headers that don't get installed
gtk_built_private_headers = \
gtkalias.h \
gtkmarshalers.h \
gtkbuiltincache.h \
gtkimcontextsimpleseqs.h
gtk_built_sources = \
gtkaliasdef.c \
gtktypebuiltins.c \
gtktypefuncs.c \
gtkmarshalers.c \
......@@ -794,7 +781,6 @@ stamp-gtkmarshalers.h: @REBUILD@ gtkmarshalers.list
&& echo timestamp > $(@F)
gtkmarshalers.c: @REBUILD@ gtkmarshalers.list
(echo "#include \"gtkmarshalers.h\""; \
echo "#include \"gtkalias.h\""; \
$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --body) >> xgen-gmlc \
&& cp xgen-gmlc gtkmarshalers.c \
&& rm -f xgen-gmlc
......@@ -1331,10 +1317,7 @@ EXTRA_DIST += \
gtkrc.key.mac \
makefile.msc \
makefile.msc.in \
makegtkalias.pl \
aliasfilescheck.sh \
abicheck.sh \
pltcheck.sh \
gtktypebuiltins.c.template \
gtktypebuiltins.h.template
......
#! /bin/sh
if test "x$gtk_all_c_sources" = x; then
echo gtk_all_c_sources variable not defined
exit 1
fi
grep 'IN_FILE' ${srcdir-.}/gtk.symbols | sed 's/.*(//;s/).*//' | grep __ | sort -u > expected-files
{ cd ${srcdir-.}; grep '^ *# *define __' $gtk_all_c_sources; } | sed 's/.*define //;s/ *$//' | sort > actual-files
diff expected-files actual-files && rm -f expected-files actual-files
......@@ -55,8 +55,6 @@
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
/**
* SECTION:gtkaboutdialog
......@@ -2441,6 +2439,3 @@ gtk_show_about_dialog (GtkWindow *parent,
gtk_window_present (GTK_WINDOW (dialog));
}
#define __GTK_ABOUT_DIALOG_C__
#include "gtkaliasdef.c"
......@@ -36,7 +36,7 @@
#include "gtkmain.h" /* For _gtk_boolean_handled_accumulator */
#include "gdk/gdkkeysyms.h"
#include "gtkmarshalers.h"
#include "gtkalias.h"
/**
* SECTION:gtkaccelgroup
......@@ -1466,6 +1466,3 @@ gtk_accelerator_get_default_mod_mask (void)
{
return default_accel_mod_mask;
}
#define __GTK_ACCEL_GROUP_C__
#include "gtkaliasdef.c"
......@@ -35,7 +35,7 @@
#include "gtkmain.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
#include <gdk/gdkkeysyms.h>
/**
......@@ -899,6 +899,3 @@ gtk_accel_label_refetch (GtkAccelLabel *accel_label)
return FALSE;
}
#define __GTK_ACCEL_LABEL_C__
#include "gtkaliasdef.c"
......@@ -23,8 +23,7 @@
#include "gtkmarshalers.h"
#include "gtkwindow.h" /* in lack of GtkAcceleratable */
#include "gtkintl.h"
#include "gtkalias.h"
#include "gtkintl.h"
#include <glib/gstdio.h>
......@@ -1032,6 +1031,3 @@ gtk_accel_map_save (const gchar *file_name)
}
#endif
#define __GTK_ACCEL_MAP_C__
#include "gtkaliasdef.c"
......@@ -23,7 +23,6 @@
#include "gtkwidget.h"
#include "gtkintl.h"
#include "gtkaccessible.h"
#include "gtkalias.h"
/**
* SECTION:gtkaccessible
......@@ -116,6 +115,3 @@ gtk_accessible_real_connect_widget_destroyed (GtkAccessible *accessible)
&accessible->widget);
}
}
#define __GTK_ACCESSIBLE_C__
#include "gtkaliasdef.c"
......@@ -92,7 +92,6 @@
#include "gtkprivate.h"
#include "gtkbuildable.h"
#include "gtkactivatable.h"
#include "gtkalias.h"
#define GTK_ACTION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ACTION, GtkActionPrivate))
......@@ -1826,6 +1825,3 @@ gtk_action_create_menu (GtkAction *action)
return NULL;
}
#define __GTK_ACTION_C__
#include "gtkaliasdef.c"
......@@ -43,7 +43,6 @@
#include "gtkbuilderprivate.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
#define GTK_ACTION_GROUP_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ACTION_GROUP, GtkActionGroupPrivate))
......@@ -1436,6 +1435,3 @@ _gtk_action_group_emit_post_activate (GtkActionGroup *action_group,
{
g_signal_emit (action_group, action_group_signals[POST_ACTIVATE], 0, action);
}
#define __GTK_ACTION_GROUP_C__
#include "gtkaliasdef.c"
......@@ -266,7 +266,6 @@
#include "gtktypeutils.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
static void gtk_activatable_class_init (gpointer g_iface);
......@@ -559,6 +558,3 @@ gtk_activatable_get_use_action_appearance (GtkActivatable *activatable)
return use_appearance;
}
#define __GTK_ACTIVATABLE_C__
#include "gtkaliasdef.c"
......@@ -29,7 +29,7 @@
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
enum
{
......@@ -701,6 +701,3 @@ gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
if (need_emission)
gtk_adjustment_value_changed (adjustment);
}
#define __GTK_ADJUSTMENT_C__
#include "gtkaliasdef.c"
......@@ -48,7 +48,7 @@
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
enum {
PROP_0,
......@@ -714,6 +714,3 @@ gtk_alignment_get_padding (GtkAlignment *alignment,
if(padding_right)
*padding_right = priv->padding_right;
}
#define __GTK_ALIGNMENT_C__
#include "gtkaliasdef.c"
......@@ -38,8 +38,6 @@
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkalias.h"
#include <gdk/gdk.h>
#ifdef GDK_WINDOWING_X11
#include <gdk/x11/gdkx.h>
......@@ -711,6 +709,3 @@ gtk_application_class_init (GtkApplicationClass *klass)
g_type_class_add_private (gobject_class, sizeof (GtkApplicationPrivate));
}
#define __GTK_APPLICATION_C__
#include "gtkaliasdef.c"
......@@ -49,7 +49,6 @@
#include "gtkarrow.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
#define MIN_ARROW_SIZE 15
......@@ -303,6 +302,3 @@ gtk_arrow_expose (GtkWidget *widget,
return FALSE;
}
#define __GTK_ARROW_C__
#include "gtkaliasdef.c"
......@@ -47,7 +47,7 @@
#include "gtkaspectframe.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
enum {
PROP_0,
......@@ -350,6 +350,3 @@ gtk_aspect_frame_compute_child_allocation (GtkFrame *frame,
else
GTK_FRAME_CLASS (gtk_aspect_frame_parent_class)->compute_child_allocation (frame, child_allocation);
}
#define __GTK_ASPECT_FRAME_C__
#include "gtkaliasdef.c"
......@@ -64,8 +64,6 @@
#include "gtkprivate.h"
#include "gtkbuildable.h"
#include "gtkalias.h"
#define GTK_ASSISTANT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_ASSISTANT, GtkAssistantPrivate))
#define HEADER_SPACING 12
......@@ -2551,7 +2549,3 @@ gtk_assistant_buildable_custom_finished (GtkBuildable *buildable,
parent_buildable_iface->custom_finished (buildable, builder, child,
tagname, user_data);
}
#define __GTK_ASSISTANT_C__
#include "gtkaliasdef.c"
......@@ -59,7 +59,7 @@
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
enum {
PROP_0,
......@@ -830,6 +830,3 @@ gtk_button_box_new (GtkOrientation orientation)
"orientation", orientation,
NULL);
}
#define __GTK_BUTTON_BOX_C__
#include "gtkaliasdef.c"
......@@ -41,7 +41,7 @@
#include "gtkbin.h"
#include "gtksizerequest.h"
#include "gtkintl.h"
#include "gtkalias.h"
static void gtk_bin_add (GtkContainer *container,
GtkWidget *widget);
......@@ -277,6 +277,3 @@ gtk_bin_get_child (GtkBin *bin)
return bin->child;
}
#define __GTK_BIN_C__
#include "gtkaliasdef.c"
......@@ -36,7 +36,6 @@
#include "gtkkeyhash.h"
#include "gtkwidget.h"
#include "gtkrc.h"
#include "gtkalias.h"
/* --- defines --- */
......@@ -1676,6 +1675,3 @@ _gtk_binding_reset_parsed (void)
slist = next;
}
}
#define __GTK_BINDINGS_C__
#include "gtkaliasdef.c"
......@@ -80,7 +80,7 @@
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
enum {
PROP_0,
......@@ -1712,6 +1712,3 @@ gtk_box_forall (GtkContainer *container,
(* callback) (child->widget, callback_data);
}
}
#define __GTK_BOX_C__
#include "gtkaliasdef.c"
......@@ -42,7 +42,6 @@
#include "gtkbuildable.h"
#include "gtktypeutils.h"
#include "gtkintl.h"
#include "gtkalias.h"
typedef GtkBuildableIface GtkBuildableInterface;
......@@ -359,6 +358,3 @@ gtk_buildable_get_internal_child (GtkBuildable *buildable,
return (* iface->get_internal_child) (buildable, builder, childname);
}
#define __GTK_BUILDABLE_C__
#include "gtkaliasdef.c"
......@@ -253,7 +253,7 @@
#include "gtkwindow.h"
#include "gtkicontheme.h"
#include "gtkstock.h"
#include "gtkalias.h"
static void gtk_builder_class_init (GtkBuilderClass *klass);
static void gtk_builder_init (GtkBuilder *builder);
......@@ -1848,6 +1848,3 @@ _gtk_builder_get_absolute_filename (GtkBuilder *builder, const gchar *string)
return filename;
}
#define __GTK_BUILDER_C__
#include "gtkaliasdef.c"
......@@ -31,7 +31,7 @@
#include "gtkversion.h"
#include "gtktypeutils.h"
#include "gtkintl.h"
#include "gtkalias.h"
static void free_property_info (PropertyInfo *info);
static void free_object_info (ObjectInfo *info);
......
......@@ -54,7 +54,7 @@
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
static const GtkBorder default_default_border = { 1, 1, 1, 1 };
static const GtkBorder default_default_outside_border = { 0, 0, 0, 0 };
......@@ -2494,6 +2494,3 @@ gtk_button_get_event_window (GtkButton *button)
return button->event_window;
}
#define __GTK_BUTTON_C__
#include "gtkaliasdef.c"
......@@ -78,7 +78,6 @@
#include "gtktooltip.h"
#include "gtkprivate.h"
#include "gdk/gdkkeysyms.h"
#include "gtkalias.h"
/***************************************************************************/
/* The following date routines are taken from the lib_date package.
......@@ -4027,6 +4026,3 @@ gtk_calendar_get_detail_height_rows (GtkCalendar *calendar)
g_return_val_if_fail (GTK_IS_CALENDAR (calendar), 0);
return GTK_CALENDAR_GET_PRIVATE (calendar)->detail_height_rows;
}
#define __GTK_CALENDAR_C__
#include "gtkaliasdef.c"
......@@ -33,7 +33,7 @@
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
typedef GtkCellEditableIface GtkCellEditableInterface;
G_DEFINE_INTERFACE(GtkCellEditable, gtk_cell_editable, GTK_TYPE_WIDGET)
......@@ -147,6 +147,3 @@ gtk_cell_editable_remove_widget (GtkCellEditable *cell_editable)
g_signal_emit_by_name (cell_editable, "remove-widget");
}
#define __GTK_CELL_EDITABLE_C__
#include "gtkaliasdef.c"
......@@ -23,7 +23,7 @@
#include <errno.h>
#include "gtkcelllayout.h"
#include "gtkintl.h"
#include "gtkalias.h"
GType
gtk_cell_layout_get_type (void)
......@@ -442,6 +442,3 @@ _gtk_cell_layout_buildable_add_child (GtkBuildable *buildable,
g_return_if_fail (iface->pack_start != NULL);
iface->pack_start (GTK_CELL_LAYOUT (buildable), GTK_CELL_RENDERER (child), FALSE);
}
#define __GTK_CELL_LAYOUT_C__
#include "gtkaliasdef.c"
......@@ -23,7 +23,7 @@
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtktreeprivate.h"
#include "gtkalias.h"
static void gtk_cell_renderer_get_property (GObject *object,
guint param_id,
......@@ -967,6 +967,3 @@ gtk_cell_renderer_stop_editing (GtkCellRenderer *cell,
g_signal_emit (cell, cell_renderer_signals[EDITING_CANCELED], 0);
}
}
#define __GTK_CELL_RENDERER_C__
#include "gtkaliasdef.c"
......@@ -27,7 +27,6 @@
#include "gtkmain.h"
#include "gtkprivate.h"
#include "gdk/gdkkeysyms.h"
#include "gtkalias.h"
#define GTK_CELL_RENDERER_ACCEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_CELL_RENDERER_ACCEL, GtkCellRendererAccelPrivate))
......@@ -665,7 +664,3 @@ gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell,
return GTK_CELL_EDITABLE (accel->edit_widget);
}
#define __GTK_CELL_RENDERER_ACCEL_C__
#include "gtkaliasdef.c"
......@@ -30,8 +30,6 @@
#include "gtkcomboboxentry.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtkalias.h"
#define GTK_CELL_RENDERER_COMBO_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_CELL_RENDERER_COMBO, GtkCellRendererComboPrivate))
......@@ -489,6 +487,3 @@ gtk_cell_renderer_combo_start_editing (GtkCellRenderer *cell,
return GTK_CELL_EDITABLE (combo);
}
#define __GTK_CELL_RENDERER_COMBO_C__
#include "gtkaliasdef.c"
......@@ -24,7 +24,7 @@
#include "gtkicontheme.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkalias.h"
static void gtk_cell_renderer_pixbuf_get_property (GObject *object,
guint param_id,
......@@ -862,6 +862,3 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell,
if (symbolic)
g_object_unref (symbolic);
}
#define __GTK_CELL_RENDERER_PIXBUF_C__
#include "gtkaliasdef.c"
......@@ -32,7 +32,6 @@
#include "gtkprogressbar.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
#define GTK_CELL_RENDERER_PROGRESS_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), \
GTK_TYPE_CELL_RENDERER_PROGRESS, \
......@@ -673,6 +672,3 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
g_object_unref (layout);
}
}
#define __GTK_CELL_RENDERER_PROGRESS_C__
#include "gtkaliasdef.c"
......@@ -26,7 +26,6 @@
#include "gtkprivate.h"
#include "gtkspinbutton.h"
#include "gtkcellrendererspin.h"
#include "gtkalias.h"
#define GTK_CELL_RENDERER_SPIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_CELL_RENDERER_SPIN, GtkCellRendererSpinPrivate))
......@@ -350,7 +349,3 @@ gtk_cell_renderer_spin_new (void)
{
return g_object_new (GTK_TYPE_CELL_RENDERER_SPIN, NULL);
}
#define __GTK_CELL_RENDERER_SPIN_C__
#include "gtkaliasdef.c"
......@@ -33,7 +33,6 @@
#include "gtkiconfactory.h"
#include "gtkicontheme.h"
#include "gtkintl.h"
#include "gtkalias.h"
/**
......@@ -387,6 +386,3 @@ gtk_cell_renderer_spinner_render (GtkCellRenderer *cellr,
draw_rect.x, draw_rect.y,
draw_rect.width, draw_rect.height);
}
#define __GTK_CELL_RENDERER_SPINNER_C__
#include "gtkaliasdef.c"
......@@ -26,7 +26,7 @@
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtktreeprivate.h"
#include "gtkalias.h"
static void gtk_cell_renderer_text_finalize (GObject *object);
......@@ -1929,6 +1929,3 @@ gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer
renderer->calc_fixed_height = TRUE;
}
}
#define __GTK_CELL_RENDERER_TEXT_C__
#include "gtkaliasdef.c"
......@@ -24,7 +24,7 @@
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtktreeprivate.h"
#include "gtkalias.h"
static void gtk_cell_renderer_toggle_get_property (GObject *object,
guint param_id,
......@@ -522,6 +522,3 @@ gtk_cell_renderer_toggle_set_activatable (GtkCellRendererToggle *toggle,
g_object_notify (G_OBJECT (toggle), "activatable");
}
}
#define __GTK_CELL_RENDERER_TOGGLE_C__
#include "gtkaliasdef.c"
......@@ -27,7 +27,7 @@
#include "gtkprivate.h"
#include <gobject/gmarshal.h>
#include "gtkbuildable.h"
#include "gtkalias.h"
typedef struct _GtkCellViewCellInfo GtkCellViewCellInfo;
struct _GtkCellViewCellInfo
......@@ -1095,7 +1095,3 @@ gtk_cell_view_buildable_custom_tag_end (GtkBuildable *buildable,
parent_buildable_iface->custom_tag_end (buildable, builder, child, tagname,
data);
}
#define __GTK_CELL_VIEW_C__
#include "gtkaliasdef.c"
......@@ -29,7 +29,6 @@
#include "gtklabel.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
#define INDICATOR_SIZE 13
......@@ -424,6 +423,3 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
x, y, indicator_size, indicator_size);
}
}
#define __GTK_CHECK_BUTTON_C__
#include "gtkaliasdef.c"
......@@ -32,7 +32,7 @@
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkalias.h"
enum {
TOGGLED,
......@@ -549,6 +549,3 @@ gtk_check_menu_item_set_property (GObject *object,
break;
}
}
#define __GTK_CHECK_MENU_ITEM_C__
#include "gtkaliasdef.c"
......@@ -32,7 +32,7 @@
#include "gtkintl.h"
#include "gtktextbuffer.h"
#include "gtkquartz.h"
#include "gtkalias.h"
enum {
OWNER_CHANGE,
......@@ -1011,6 +1011,3 @@ _gtk_clipboard_store_all (void)
{
/* FIXME: Implement */
}
#define __GTK_CLIPBOARD_C__
#include "gtkaliasdef.c"
......@@ -29,7 +29,6 @@
#include "gtkmarshalers.h"
#include "gtktextbufferrichtext.h"
#include "gtkintl.h"
#include "gtkalias.h"
#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h"
......@@ -2082,6 +2081,3 @@ _gtk_clipboard_store_all (void)