The problem in gui_gtk_f has now become a warning, but there is a
fatal in the link:
gui_gtk_f:
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread
-I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0
-I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0
-I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0
-I/usr/include/gio-unix-2.0 -I/usr/include/libxkbcommon
-I/usr/include/wayland -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O2
-fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
-o objects/gui_gtk_f.o gui_gtk_f.c
In file included from /usr/include/glib-2.0/gobject/gobject.h:24:0,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:28,
from /usr/include/gtk-3.0/gdk/gdk.h:32,
from /usr/include/gtk-3.0/gtk/gtk.h:30,
from beval.h:15,
from vim.h:1810,
from gui_gtk_f.c:26:
gui_gtk_f.c:199:24: warning: ‘gtk_form_init’ used but never defined
G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER)
^
/usr/include/glib-2.0/gobject/gtype.h:1979:17: note: in definition of
macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN_PRE’
static void type_name##_init (TypeName *self); \
^~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1761:60: note: in expansion of
macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN’
#define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)
_G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;}
_G_DEFINE_TYPE_EXTENDED_END()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1602:43: note: in expansion of
macro ‘G_DEFINE_TYPE_EXTENDED’
#define G_DEFINE_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN,
t_n, T_P, 0, {})
^~~~~~~~~~~~~~~~~~~~~~
gui_gtk_f.c:199:1: note: in expansion of macro ‘G_DEFINE_TYPE’
G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER)
^~~~~~~~~~~~~
gui_gtk_f.c:199:24: warning: ‘gtk_form_class_init’ used but never defined
G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER)
^
/usr/include/glib-2.0/gobject/gtype.h:1980:17: note: in definition of
macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN_PRE’
static void type_name##_class_init (TypeName##Class *klass); \
^~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1761:60: note: in expansion of
macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN’
#define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)
_G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;}
_G_DEFINE_TYPE_EXTENDED_END()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1602:43: note: in expansion of
macro ‘G_DEFINE_TYPE_EXTENDED’
#define G_DEFINE_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN,
t_n, T_P, 0, {})
^~~~~~~~~~~~~~~~~~~~~~
gui_gtk_f.c:199:1: note: in expansion of macro ‘G_DEFINE_TYPE’
G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER)
^~~~~~~~~~~~~
gui_gtk_f.c:257:1: warning: ‘form_init’ defined but not used [-Wunused-function]
form_init(GtkForm *form, void *g_class UNUSED)
^~~~~~~~~
gui_gtk_f.c:224:1: warning: ‘form_class_init’ defined but not used
[-Wunused-function]
form_class_init(GtkFormClass *klass)
^~~~~~~~~~~~~~~
Linking:
link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
gcc -L/usr/local/lib -Wl,--as-needed -o vim-normal
objects/arabic.o objects/arglist.o objects/autocmd.o objects/beval.o
objects/buffer.o objects/change.o objects/blob.o objects/blowfish.o
objects/cindent.o objects/clientserver.o objects/clipboard.o
objects/cmdexpand.o objects/cmdhist.o objects/crypt.o
objects/crypt_zip.o objects/debugger.o objects/dict.o objects/diff.o
objects/digraph.o objects/drawline.o objects/drawscreen.o
objects/edit.o objects/eval.o objects/evalbuffer.o objects/evalfunc.o
objects/evalvars.o objects/evalwindow.o objects/ex_cmds.o
objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o
objects/ex_getln.o objects/fileio.o objects/filepath.o
objects/findfile.o objects/fold.o objects/getchar.o objects/gui_xim.o
objects/hardcopy.o objects/hashtab.o objects/help.o
objects/highlight.o objects/if_cscope.o objects/if_xcmdsrv.o
objects/indent.o objects/insexpand.o objects/list.o objects/locale.o
objects/map.o objects/mark.o objects/match.o objects/mbyte.o
objects/memline.o objects/menu.o objects/misc1.o objects/misc2.o
objects/mouse.o objects/move.o objects/normal.o objects/ops.o
objects/option.o objects/optionstr.o objects/os_unix.o
objects/pathdef.o objects/popupmenu.o objects/popupwin.o
objects/profiler.o objects/pty.o objects/quickfix.o objects/regexp.o
objects/register.o objects/screen.o objects/scriptfile.o
objects/search.o objects/session.o objects/sha256.o objects/sign.o
objects/sound.o objects/spell.o objects/spellfile.o
objects/spellsuggest.o objects/syntax.o objects/tag.o objects/term.o
objects/terminal.o objects/testing.o objects/textformat.o
objects/textobject.o objects/textprop.o objects/time.o
objects/typval.o objects/ui.o objects/undo.o objects/usercmd.o
objects/userfunc.o objects/version.o objects/vim9compile.o
objects/vim9execute.o objects/vim9script.o objects/vim9type.o
objects/viminfo.o objects/window.o objects/bufwrite.o objects/gui.o
objects/gui_gtk.o objects/gui_gtk_x11.o objects/gui_gtk_f.o
objects/gui_beval.o objects/gui_gtk_gresources.o
objects/netbeans.o objects/job.o objects/channel.o objects/xdiffi.o
objects/xemit.o objects/xprepare.o objects/xutils.o
objects/xhistogram.o objects/xpatience.o objects/charset.o
objects/json.o objects/main.o objects/memfile.o objects/message.o
-lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0
-lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0
-lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo
-lelf -lselinux -lacl -lattr -lgpm -ldl
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk.o: in function `gui_mch_set_text_area_pos':
gui_gtk.c:(.text+0x216b): undefined reference to `gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk.o: in function `gui_mch_set_scrollbar_pos':
gui_gtk.c:(.text+0x259c): undefined reference to `gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk.o: in function `gui_mch_create_scrollbar':
gui_gtk.c:(.text+0x2633): undefined reference to `gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk_x11.o: in function `form_configure_event':
gui_gtk_x11.c:(.text+0x10fa): undefined reference to `gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
gui_gtk_x11.c:(.text+0x1120): undefined reference to
`gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk_x11.o:gui_gtk_x11.c:(.text+0x306e): more undefined
references to `gui_gtk_form_get_type' follow
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk_f.o: in function `gtk_form_get_type_once':
gui_gtk_f.c:(.text+0x1a8): undefined reference to `gtk_form_init'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk_f.o: in function `gui_gtk_form_new':
gui_gtk_f.c:(.text+0x342): undefined reference to `gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk_f.o: in function `gui_gtk_form_put':
gui_gtk_f.c:(.text+0x385): undefined reference to `gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk_f.o: in function `gui_gtk_form_move':
gui_gtk_f.c:(.text+0x4f7): undefined reference to `gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk_f.o: in function `gui_gtk_form_freeze':
gui_gtk_f.c:(.text+0x595): undefined reference to `gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk_f.o: in function `gui_gtk_form_thaw':
gui_gtk_f.c:(.text+0x5ea): undefined reference to `gui_gtk_form_get_type'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui_gtk_f.o: in function `gtk_form_class_intern_init':
gui_gtk_f.c:(.text+0x1e5): undefined reference to `gtk_form_class_init'
collect2: error: ld returned 1 exit status
link.sh: Linking failed
make[1]: *** [Makefile:2134: vim-normal] Error 1
make[1]: Leaving directory '/root/.build/vim/vim-hg/src/shadow-normal'
make: *** [Makefile:2085: reconfig] Error 2
exit status 2
Wed 21 Oct 16:27:50 CEST 2020
Best regards,
Tony.
On Wed, Oct 21, 2020 at 4:11 PM Bram Moolenaar <[email protected]> wrote:
>
>
> Patch 8.2.1878
> Problem: GTK: error for redefining function. (Tony Mechelynck)
> Solution: Remove "gtk_" prefix from local functions and prepend "gui_" to
> global functions.
> Files: src/gui_gtk_f.c, src/gui_gtk_f.h, src/gui_gtk.c, src/gui_gtk_x11.c
>
>
> *** ../vim-8.2.1877/src/gui_gtk_f.c 2020-10-21 12:37:56.270973451 +0200
> --- src/gui_gtk_f.c 2020-10-21 16:08:48.386725805 +0200
> ***************
> *** 11,17 ****
> * (C) 1998,1999 by Marcin Dalecki <[email protected]>
> *
> * Support for GTK+ 2 was added by:
> - *
> * (C) 2002,2003 Jason Hildebrand <[email protected]>
> * Daniel Elstner <[email protected]>
> *
> --- 11,16 ----
> ***************
> *** 21,27 ****
> * long time.
> *
> * Support for GTK+ 3 was added by:
> - *
> * 2016 Kazunobu Kuriyama <[email protected]>
> */
>
> --- 20,25 ----
> ***************
> *** 50,101 ****
> };
>
>
> ! static void gtk_form_class_init(GtkFormClass *klass);
> ! static void gtk_form_init(GtkForm *form, void *g_class);
>
> ! static void gtk_form_realize(GtkWidget *widget);
> ! static void gtk_form_unrealize(GtkWidget *widget);
> ! static void gtk_form_map(GtkWidget *widget);
> ! static void gtk_form_size_request(GtkWidget *widget,
> ! GtkRequisition *requisition);
> ! #if GTK_CHECK_VERSION(3,0,0)
> ! static void gtk_form_get_preferred_width(GtkWidget *widget,
> ! gint *minimal_width,
> ! gint *natural_width);
> ! static void gtk_form_get_preferred_height(GtkWidget *widget,
> ! gint *minimal_height,
> ! gint *natural_height);
> ! #endif
> ! static void gtk_form_size_allocate(GtkWidget *widget,
> ! GtkAllocation *allocation);
> ! #if GTK_CHECK_VERSION(3,0,0)
> ! static gboolean gtk_form_draw(GtkWidget *widget,
> ! cairo_t *cr);
> ! #else
> ! static gint gtk_form_expose(GtkWidget *widget,
> ! GdkEventExpose *event);
> ! #endif
> !
> ! static void gtk_form_remove(GtkContainer *container,
> ! GtkWidget *widget);
> ! static void gtk_form_forall(GtkContainer *container,
> ! gboolean include_internals,
> ! GtkCallback callback,
> ! gpointer callback_data);
> !
> ! static void gtk_form_attach_child_window(GtkForm *form,
> ! GtkFormChild *child);
> ! static void gtk_form_realize_child(GtkForm *form,
> ! GtkFormChild *child);
> ! static void gtk_form_position_child(GtkForm *form,
> ! GtkFormChild *child,
> ! gboolean force_allocate);
> ! static void gtk_form_position_children(GtkForm *form);
>
> ! static void gtk_form_send_configure(GtkForm *form);
>
> ! static void gtk_form_child_map(GtkWidget *widget, gpointer user_data);
> ! static void gtk_form_child_unmap(GtkWidget *widget, gpointer user_data);
>
> #if !GTK_CHECK_VERSION(3,0,0)
> static GtkWidgetClass *parent_class = NULL;
> --- 48,83 ----
> };
>
>
> ! static void form_class_init(GtkFormClass *klass);
> ! static void form_init(GtkForm *form, void *g_class);
> !
> ! static void form_realize(GtkWidget *widget);
> ! static void form_unrealize(GtkWidget *widget);
> ! static void form_map(GtkWidget *widget);
> ! static void form_size_request(GtkWidget *widget, GtkRequisition
> *requisition);
> ! #if GTK_CHECK_VERSION(3,0,0)
> ! static void form_get_preferred_width(GtkWidget *widget, gint
> *minimal_width, gint *natural_width);
> ! static void form_get_preferred_height(GtkWidget *widget, gint
> *minimal_height, gint *natural_height);
> ! #endif
> ! static void form_size_allocate(GtkWidget *widget, GtkAllocation
> *allocation);
> ! #if GTK_CHECK_VERSION(3,0,0)
> ! static gboolean form_draw(GtkWidget *widget, cairo_t *cr);
> ! #else
> ! static gint form_expose(GtkWidget *widget, GdkEventExpose *event);
> ! #endif
> !
> ! static void form_remove(GtkContainer *container, GtkWidget *widget);
> ! static void form_forall(GtkContainer *container, gboolean
> include_internals, GtkCallback callback, gpointer callback_data);
>
> ! static void form_attach_child_window(GtkForm *form, GtkFormChild *child);
> ! static void form_realize_child(GtkForm *form, GtkFormChild *child);
> ! static void form_position_child(GtkForm *form, GtkFormChild *child,
> gboolean force_allocate);
> ! static void form_position_children(GtkForm *form);
>
> ! static void form_send_configure(GtkForm *form);
>
> ! static void form_child_map(GtkWidget *widget, gpointer user_data);
> ! static void form_child_unmap(GtkWidget *widget, gpointer user_data);
>
> #if !GTK_CHECK_VERSION(3,0,0)
> static GtkWidgetClass *parent_class = NULL;
> ***************
> *** 104,127 ****
> // Public interface
>
> GtkWidget *
> ! gtk_form_new(void)
> {
> GtkForm *form;
>
> #if GTK_CHECK_VERSION(3,0,0)
> form = g_object_new(GTK_TYPE_FORM, NULL);
> #else
> ! form = gtk_type_new(gtk_form_get_type());
> #endif
>
> return GTK_WIDGET(form);
> }
>
> void
> ! gtk_form_put(GtkForm *form,
> ! GtkWidget *child_widget,
> ! gint x,
> ! gint y)
> {
> GtkFormChild *child;
>
> --- 86,110 ----
> // Public interface
>
> GtkWidget *
> ! gui_gtk_form_new(void)
> {
> GtkForm *form;
>
> #if GTK_CHECK_VERSION(3,0,0)
> form = g_object_new(GTK_TYPE_FORM, NULL);
> #else
> ! form = gtk_type_new(gui_gtk_form_get_type());
> #endif
>
> return GTK_WIDGET(form);
> }
>
> void
> ! gui_gtk_form_put(
> ! GtkForm *form,
> ! GtkWidget *child_widget,
> ! gint x,
> ! gint y)
> {
> GtkFormChild *child;
>
> ***************
> *** 151,172 ****
> // that gtk_widget_set_parent() realizes the widget if it's visible
> // and its parent is mapped.
> if (gtk_widget_get_realized(GTK_WIDGET(form)))
> ! gtk_form_attach_child_window(form, child);
>
> gtk_widget_set_parent(child_widget, GTK_WIDGET(form));
>
> if (gtk_widget_get_realized(GTK_WIDGET(form))
> && !gtk_widget_get_realized(child_widget))
> ! gtk_form_realize_child(form, child);
>
> ! gtk_form_position_child(form, child, TRUE);
> }
>
> void
> ! gtk_form_move(GtkForm *form,
> ! GtkWidget *child_widget,
> ! gint x,
> ! gint y)
> {
> GList *tmp_list;
> GtkFormChild *child;
> --- 134,156 ----
> // that gtk_widget_set_parent() realizes the widget if it's visible
> // and its parent is mapped.
> if (gtk_widget_get_realized(GTK_WIDGET(form)))
> ! form_attach_child_window(form, child);
>
> gtk_widget_set_parent(child_widget, GTK_WIDGET(form));
>
> if (gtk_widget_get_realized(GTK_WIDGET(form))
> && !gtk_widget_get_realized(child_widget))
> ! form_realize_child(form, child);
>
> ! form_position_child(form, child, TRUE);
> }
>
> void
> ! gui_gtk_form_move(
> ! GtkForm *form,
> ! GtkWidget *child_widget,
> ! gint x,
> ! gint y)
> {
> GList *tmp_list;
> GtkFormChild *child;
> ***************
> *** 181,194 ****
> child->x = x;
> child->y = y;
>
> ! gtk_form_position_child(form, child, TRUE);
> return;
> }
> }
> }
>
> void
> ! gtk_form_freeze(GtkForm *form)
> {
> g_return_if_fail(GTK_IS_FORM(form));
>
> --- 165,178 ----
> child->x = x;
> child->y = y;
>
> ! form_position_child(form, child, TRUE);
> return;
> }
> }
> }
>
> void
> ! gui_gtk_form_freeze(GtkForm *form)
> {
> g_return_if_fail(GTK_IS_FORM(form));
>
> ***************
> *** 196,202 ****
> }
>
> void
> ! gtk_form_thaw(GtkForm *form)
> {
> g_return_if_fail(GTK_IS_FORM(form));
>
> --- 180,186 ----
> }
>
> void
> ! gui_gtk_form_thaw(GtkForm *form)
> {
> g_return_if_fail(GTK_IS_FORM(form));
>
> ***************
> *** 204,210 ****
> {
> if (!(--form->freeze_count))
> {
> ! gtk_form_position_children(form);
> gtk_widget_queue_draw(GTK_WIDGET(form));
> }
> }
> --- 188,194 ----
> {
> if (!(--form->freeze_count))
> {
> ! form_position_children(form);
> gtk_widget_queue_draw(GTK_WIDGET(form));
> }
> }
> ***************
> *** 215,221 ****
> G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER)
> #else
> GtkType
> ! gtk_form_get_type(void)
> {
> static GtkType form_type = 0;
>
> --- 199,205 ----
> G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER)
> #else
> GtkType
> ! gui_gtk_form_get_type(void)
> {
> static GtkType form_type = 0;
>
> ***************
> *** 227,234 ****
> form_info.type_name = "GtkForm";
> form_info.object_size = sizeof(GtkForm);
> form_info.class_size = sizeof(GtkFormClass);
> ! form_info.class_init_func = (GtkClassInitFunc)gtk_form_class_init;
> ! form_info.object_init_func = (GtkObjectInitFunc)gtk_form_init;
>
> form_type = gtk_type_unique(GTK_TYPE_CONTAINER, &form_info);
> }
> --- 211,218 ----
> form_info.type_name = "GtkForm";
> form_info.object_size = sizeof(GtkForm);
> form_info.class_size = sizeof(GtkFormClass);
> ! form_info.class_init_func = (GtkClassInitFunc)form_class_init;
> ! form_info.object_init_func = (GtkObjectInitFunc)form_init;
>
> form_type = gtk_type_unique(GTK_TYPE_CONTAINER, &form_info);
> }
> ***************
> *** 237,243 ****
> #endif // !GTK_CHECK_VERSION(3,0,0)
>
> static void
> ! gtk_form_class_init(GtkFormClass *klass)
> {
> GtkWidgetClass *widget_class;
> GtkContainerClass *container_class;
> --- 221,227 ----
> #endif // !GTK_CHECK_VERSION(3,0,0)
>
> static void
> ! form_class_init(GtkFormClass *klass)
> {
> GtkWidgetClass *widget_class;
> GtkContainerClass *container_class;
> ***************
> *** 249,276 ****
> parent_class = gtk_type_class(gtk_container_get_type());
> #endif
>
> ! widget_class->realize = gtk_form_realize;
> ! widget_class->unrealize = gtk_form_unrealize;
> ! widget_class->map = gtk_form_map;
> #if GTK_CHECK_VERSION(3,0,0)
> ! widget_class->get_preferred_width = gtk_form_get_preferred_width;
> ! widget_class->get_preferred_height = gtk_form_get_preferred_height;
> #else
> ! widget_class->size_request = gtk_form_size_request;
> #endif
> ! widget_class->size_allocate = gtk_form_size_allocate;
> #if GTK_CHECK_VERSION(3,0,0)
> ! widget_class->draw = gtk_form_draw;
> #else
> ! widget_class->expose_event = gtk_form_expose;
> #endif
>
> ! container_class->remove = gtk_form_remove;
> ! container_class->forall = gtk_form_forall;
> }
>
> static void
> ! gtk_form_init(GtkForm *form, void *g_class UNUSED)
> {
> #if GTK_CHECK_VERSION(3,0,0)
> gtk_widget_set_has_window(GTK_WIDGET(form), TRUE);
> --- 233,260 ----
> parent_class = gtk_type_class(gtk_container_get_type());
> #endif
>
> ! widget_class->realize = form_realize;
> ! widget_class->unrealize = form_unrealize;
> ! widget_class->map = form_map;
> #if GTK_CHECK_VERSION(3,0,0)
> ! widget_class->get_preferred_width = form_get_preferred_width;
> ! widget_class->get_preferred_height = form_get_preferred_height;
> #else
> ! widget_class->size_request = form_size_request;
> #endif
> ! widget_class->size_allocate = form_size_allocate;
> #if GTK_CHECK_VERSION(3,0,0)
> ! widget_class->draw = form_draw;
> #else
> ! widget_class->expose_event = form_expose;
> #endif
>
> ! container_class->remove = form_remove;
> ! container_class->forall = form_forall;
> }
>
> static void
> ! form_init(GtkForm *form, void *g_class UNUSED)
> {
> #if GTK_CHECK_VERSION(3,0,0)
> gtk_widget_set_has_window(GTK_WIDGET(form), TRUE);
> ***************
> *** 285,291 ****
> */
>
> static void
> ! gtk_form_realize(GtkWidget *widget)
> {
> GList *tmp_list;
> GtkForm *form;
> --- 269,275 ----
> */
>
> static void
> ! form_realize(GtkWidget *widget)
> {
> GList *tmp_list;
> GtkForm *form;
> ***************
> *** 353,362 ****
> {
> GtkFormChild *child = tmp_list->data;
>
> ! gtk_form_attach_child_window(form, child);
>
> if (gtk_widget_get_visible(child->widget))
> ! gtk_form_realize_child(form, child);
> }
> }
>
> --- 337,346 ----
> {
> GtkFormChild *child = tmp_list->data;
>
> ! form_attach_child_window(form, child);
>
> if (gtk_widget_get_visible(child->widget))
> ! form_realize_child(form, child);
> }
> }
>
> ***************
> *** 369,375 ****
> // Well, I reckon at least the gdk_window_show(form->bin_window)
> // is necessary. GtkForm is anything but a usual container widget.
> static void
> ! gtk_form_map(GtkWidget *widget)
> {
> GList *tmp_list;
> GtkForm *form;
> --- 353,359 ----
> // Well, I reckon at least the gdk_window_show(form->bin_window)
> // is necessary. GtkForm is anything but a usual container widget.
> static void
> ! form_map(GtkWidget *widget)
> {
> GList *tmp_list;
> GtkForm *form;
> ***************
> *** 394,400 ****
> }
>
> static void
> ! gtk_form_unrealize(GtkWidget *widget)
> {
> GList *tmp_list;
> GtkForm *form;
> --- 378,384 ----
> }
>
> static void
> ! form_unrealize(GtkWidget *widget)
> {
> GList *tmp_list;
> GtkForm *form;
> ***************
> *** 416,425 ****
> if (child->window != NULL)
> {
> g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
> ! FUNC2GENERIC(gtk_form_child_map),
> child);
> g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
> ! FUNC2GENERIC(gtk_form_child_unmap),
> child);
>
> gdk_window_set_user_data(child->window, NULL);
> --- 400,409 ----
> if (child->window != NULL)
> {
> g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
> ! FUNC2GENERIC(form_child_map),
> child);
> g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
> ! FUNC2GENERIC(form_child_unmap),
> child);
>
> gdk_window_set_user_data(child->window, NULL);
> ***************
> *** 441,447 ****
> }
>
> static void
> ! gtk_form_size_request(GtkWidget *widget, GtkRequisition *requisition)
> {
> g_return_if_fail(GTK_IS_FORM(widget));
> g_return_if_fail(requisition != NULL);
> --- 425,431 ----
> }
>
> static void
> ! form_size_request(GtkWidget *widget, GtkRequisition *requisition)
> {
> g_return_if_fail(GTK_IS_FORM(widget));
> g_return_if_fail(requisition != NULL);
> ***************
> *** 452,477 ****
>
> #if GTK_CHECK_VERSION(3,0,0)
> static void
> ! gtk_form_get_preferred_width(GtkWidget *widget,
> gint *minimal_width,
> gint *natural_width)
> {
> GtkRequisition requisition;
>
> ! gtk_form_size_request(widget, &requisition);
>
> *minimal_width = requisition.width;
> *natural_width = requisition.width;
> }
>
> static void
> ! gtk_form_get_preferred_height(GtkWidget *widget,
> gint *minimal_height,
> gint *natural_height)
> {
> GtkRequisition requisition;
>
> ! gtk_form_size_request(widget, &requisition);
>
> *minimal_height = requisition.height;
> *natural_height = requisition.height;
> --- 436,461 ----
>
> #if GTK_CHECK_VERSION(3,0,0)
> static void
> ! form_get_preferred_width(GtkWidget *widget,
> gint *minimal_width,
> gint *natural_width)
> {
> GtkRequisition requisition;
>
> ! form_size_request(widget, &requisition);
>
> *minimal_width = requisition.width;
> *natural_width = requisition.width;
> }
>
> static void
> ! form_get_preferred_height(GtkWidget *widget,
> gint *minimal_height,
> gint *natural_height)
> {
> GtkRequisition requisition;
>
> ! form_size_request(widget, &requisition);
>
> *minimal_height = requisition.height;
> *natural_height = requisition.height;
> ***************
> *** 479,485 ****
> #endif // GTK_CHECK_VERSION(3,0,0)
>
> static void
> ! gtk_form_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
> {
> GList *tmp_list;
> GtkForm *form;
> --- 463,469 ----
> #endif // GTK_CHECK_VERSION(3,0,0)
>
> static void
> ! form_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
> {
> GList *tmp_list;
> GtkForm *form;
> ***************
> *** 507,513 ****
> while (tmp_list)
> {
> GtkFormChild *child = tmp_list->data;
> ! gtk_form_position_child(form, child, TRUE);
>
> tmp_list = tmp_list->next;
> }
> --- 491,497 ----
> while (tmp_list)
> {
> GtkFormChild *child = tmp_list->data;
> ! form_position_child(form, child, TRUE);
>
> tmp_list = tmp_list->next;
> }
> ***************
> *** 524,530 ****
> }
> gtk_widget_set_allocation(widget, allocation);
> if (need_reposition)
> ! gtk_form_send_configure(form);
> }
>
> #if GTK_CHECK_VERSION(3,0,0)
> --- 508,514 ----
> }
> gtk_widget_set_allocation(widget, allocation);
> if (need_reposition)
> ! form_send_configure(form);
> }
>
> #if GTK_CHECK_VERSION(3,0,0)
> ***************
> *** 538,544 ****
> }
>
> static gboolean
> ! gtk_form_draw(GtkWidget *widget, cairo_t *cr)
> {
> GList *tmp_list = NULL;
> GtkForm *form = NULL;
> --- 522,528 ----
> }
>
> static gboolean
> ! form_draw(GtkWidget *widget, cairo_t *cr)
> {
> GList *tmp_list = NULL;
> GtkForm *form = NULL;
> ***************
> *** 563,571 ****
> // gtk_widget_draw() fails and the relevant scrollbar won't
> // appear on the screen.
> //
> ! // Calling gtk_form_position_child() like this is one of ways
> // to make sure of that.
> ! gtk_form_position_child(form, formchild, TRUE);
>
> gtk_form_render_background(formchild->widget, cr);
> }
> --- 547,555 ----
> // gtk_widget_draw() fails and the relevant scrollbar won't
> // appear on the screen.
> //
> ! // Calling form_position_child() like this is one of ways
> // to make sure of that.
> ! form_position_child(form, formchild, TRUE);
>
> gtk_form_render_background(formchild->widget, cr);
> }
> ***************
> *** 575,581 ****
> }
> #else // !GTK_CHECK_VERSION(3,0,0)
> static gint
> ! gtk_form_expose(GtkWidget *widget, GdkEventExpose *event)
> {
> GList *tmp_list;
> GtkForm *form;
> --- 559,565 ----
> }
> #else // !GTK_CHECK_VERSION(3,0,0)
> static gint
> ! form_expose(GtkWidget *widget, GdkEventExpose *event)
> {
> GList *tmp_list;
> GtkForm *form;
> ***************
> *** 598,604 ****
>
> // Container method
> static void
> ! gtk_form_remove(GtkContainer *container, GtkWidget *widget)
> {
> GList *tmp_list;
> GtkForm *form;
> --- 582,588 ----
>
> // Container method
> static void
> ! form_remove(GtkContainer *container, GtkWidget *widget)
> {
> GList *tmp_list;
> GtkForm *form;
> ***************
> *** 625,633 ****
> if (child->window)
> {
> g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
> ! FUNC2GENERIC(>k_form_child_map), child);
> g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
> ! FUNC2GENERIC(>k_form_child_unmap), child);
>
> // FIXME: This will cause problems for reparenting NO_WINDOW
> // widgets out of a GtkForm
> --- 609,617 ----
> if (child->window)
> {
> g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
> ! FUNC2GENERIC(&form_child_map), child);
> g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
> ! FUNC2GENERIC(&form_child_unmap), child);
>
> // FIXME: This will cause problems for reparenting NO_WINDOW
> // widgets out of a GtkForm
> ***************
> *** 646,652 ****
> }
>
> static void
> ! gtk_form_forall(GtkContainer *container,
> gboolean include_internals UNUSED,
> GtkCallback callback,
> gpointer callback_data)
> --- 630,636 ----
> }
>
> static void
> ! form_forall(GtkContainer *container,
> gboolean include_internals UNUSED,
> GtkCallback callback,
> gpointer callback_data)
> ***************
> *** 673,679 ****
> // Operations on children
>
> static void
> ! gtk_form_attach_child_window(GtkForm *form, GtkFormChild *child)
> {
> if (child->window != NULL)
> return; // been there, done that
> --- 657,663 ----
> // Operations on children
>
> static void
> ! form_attach_child_window(GtkForm *form, GtkFormChild *child)
> {
> if (child->window != NULL)
> return; // been there, done that
> ***************
> *** 734,742 ****
> * alongside with the actual widget.
> */
> g_signal_connect(G_OBJECT(child->widget), "map",
> ! G_CALLBACK(>k_form_child_map), child);
> g_signal_connect(G_OBJECT(child->widget), "unmap",
> ! G_CALLBACK(>k_form_child_unmap), child);
> }
> else if (!gtk_widget_get_realized(child->widget))
> {
> --- 718,726 ----
> * alongside with the actual widget.
> */
> g_signal_connect(G_OBJECT(child->widget), "map",
> ! G_CALLBACK(&form_child_map), child);
> g_signal_connect(G_OBJECT(child->widget), "unmap",
> ! G_CALLBACK(&form_child_unmap), child);
> }
> else if (!gtk_widget_get_realized(child->widget))
> {
> ***************
> *** 745,759 ****
> }
>
> static void
> ! gtk_form_realize_child(GtkForm *form, GtkFormChild *child)
> {
> ! gtk_form_attach_child_window(form, child);
> gtk_widget_realize(child->widget);
> }
>
> static void
> ! gtk_form_position_child(GtkForm *form, GtkFormChild *child,
> ! gboolean force_allocate)
> {
> gint x;
> gint y;
> --- 729,742 ----
> }
>
> static void
> ! form_realize_child(GtkForm *form, GtkFormChild *child)
> {
> ! form_attach_child_window(form, child);
> gtk_widget_realize(child->widget);
> }
>
> static void
> ! form_position_child(GtkForm *form, GtkFormChild *child, gboolean
> force_allocate)
> {
> gint x;
> gint y;
> ***************
> *** 826,841 ****
> }
>
> static void
> ! gtk_form_position_children(GtkForm *form)
> {
> GList *tmp_list;
>
> for (tmp_list = form->children; tmp_list; tmp_list = tmp_list->next)
> ! gtk_form_position_child(form, tmp_list->data, FALSE);
> }
>
> void
> ! gtk_form_move_resize(GtkForm *form, GtkWidget *widget,
> gint x, gint y, gint w, gint h)
> {
> #if GTK_CHECK_VERSION(3,0,0)
> --- 809,824 ----
> }
>
> static void
> ! form_position_children(GtkForm *form)
> {
> GList *tmp_list;
>
> for (tmp_list = form->children; tmp_list; tmp_list = tmp_list->next)
> ! form_position_child(form, tmp_list->data, FALSE);
> }
>
> void
> ! gui_gtk_form_move_resize(GtkForm *form, GtkWidget *widget,
> gint x, gint y, gint w, gint h)
> {
> #if GTK_CHECK_VERSION(3,0,0)
> ***************
> *** 845,855 ****
> widget->requisition.height = h;
> #endif
>
> ! gtk_form_move(form, widget, x, y);
> }
>
> static void
> ! gtk_form_send_configure(GtkForm *form)
> {
> GtkWidget *widget;
> GdkEventConfigure event;
> --- 828,838 ----
> widget->requisition.height = h;
> #endif
>
> ! gui_gtk_form_move(form, widget, x, y);
> }
>
> static void
> ! form_send_configure(GtkForm *form)
> {
> GtkWidget *widget;
> GdkEventConfigure event;
> ***************
> *** 869,875 ****
> }
>
> static void
> ! gtk_form_child_map(GtkWidget *widget UNUSED, gpointer user_data)
> {
> GtkFormChild *child;
>
> --- 852,858 ----
> }
>
> static void
> ! form_child_map(GtkWidget *widget UNUSED, gpointer user_data)
> {
> GtkFormChild *child;
>
> ***************
> *** 880,886 ****
> }
>
> static void
> ! gtk_form_child_unmap(GtkWidget *widget UNUSED, gpointer user_data)
> {
> GtkFormChild *child;
>
> --- 863,869 ----
> }
>
> static void
> ! form_child_unmap(GtkWidget *widget UNUSED, gpointer user_data)
> {
> GtkFormChild *child;
>
> *** ../vim-8.2.1877/src/gui_gtk_f.h 2019-11-30 18:24:07.000000000 +0100
> --- src/gui_gtk_f.h 2020-10-21 16:09:02.242682090 +0200
> ***************
> *** 21,27 ****
> extern "C" {
> #endif
>
> ! #define GTK_TYPE_FORM (gtk_form_get_type ())
> #ifdef USE_GTK3
> #define GTK_FORM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),
> GTK_TYPE_FORM, GtkForm))
> #define GTK_FORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),
> GTK_TYPE_FORM, GtkFormClass))
> --- 21,27 ----
> extern "C" {
> #endif
>
> ! #define GTK_TYPE_FORM (gui_gtk_form_get_type ())
> #ifdef USE_GTK3
> #define GTK_FORM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),
> GTK_TYPE_FORM, GtkForm))
> #define GTK_FORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),
> GTK_TYPE_FORM, GtkFormClass))
> ***************
> *** 53,81 ****
> };
>
> #ifdef USE_GTK3
> ! GType gtk_form_get_type(void);
> #else
> ! GtkType gtk_form_get_type(void);
> #endif
>
> ! GtkWidget *gtk_form_new(void);
>
> ! void gtk_form_put(GtkForm * form, GtkWidget * widget,
> ! gint x, gint y);
>
> ! void gtk_form_move(GtkForm *form, GtkWidget * widget,
> ! gint x, gint y);
>
> ! void gtk_form_move_resize(GtkForm * form, GtkWidget * widget,
> ! gint x, gint y,
> ! gint w, gint h);
>
> // These disable and enable moving and repainting respectively. If you
> // want to update the layout's offsets but do not want it to repaint
> // itself, you should use these functions.
>
> ! void gtk_form_freeze(GtkForm *form);
> ! void gtk_form_thaw(GtkForm *form);
>
>
> #ifdef __cplusplus
> --- 53,77 ----
> };
>
> #ifdef USE_GTK3
> ! GType gui_gtk_form_get_type(void);
> #else
> ! GtkType gui_gtk_form_get_type(void);
> #endif
>
> ! GtkWidget *gui_gtk_form_new(void);
>
> ! void gui_gtk_form_put(GtkForm * form, GtkWidget * widget, gint x, gint y);
>
> ! void gui_gtk_form_move(GtkForm *form, GtkWidget * widget, gint x, gint y);
>
> ! void gui_gtk_form_move_resize(GtkForm * form, GtkWidget * widget, gint x,
> gint y, gint w, gint h);
>
> // These disable and enable moving and repainting respectively. If you
> // want to update the layout's offsets but do not want it to repaint
> // itself, you should use these functions.
>
> ! void gui_gtk_form_freeze(GtkForm *form);
> ! void gui_gtk_form_thaw(GtkForm *form);
>
>
> #ifdef __cplusplus
> *** ../vim-8.2.1877/src/gui_gtk.c 2020-09-09 20:58:52.008764176 +0200
> --- src/gui_gtk.c 2020-10-21 16:06:49.331102500 +0200
> ***************
> *** 810,816 ****
> void
> gui_mch_set_text_area_pos(int x, int y, int w, int h)
> {
> ! gtk_form_move_resize(GTK_FORM(gui.formwin), gui.drawarea, x, y, w, h);
> }
>
>
> --- 810,816 ----
> void
> gui_mch_set_text_area_pos(int x, int y, int w, int h)
> {
> ! gui_gtk_form_move_resize(GTK_FORM(gui.formwin), gui.drawarea, x, y, w,
> h);
> }
>
>
> ***************
> *** 1005,1011 ****
> gui_mch_set_scrollbar_pos(scrollbar_T *sb, int x, int y, int w, int h)
> {
> if (sb->id != NULL)
> ! gtk_form_move_resize(GTK_FORM(gui.formwin), sb->id, x, y, w, h);
> }
>
> int
> --- 1005,1011 ----
> gui_mch_set_scrollbar_pos(scrollbar_T *sb, int x, int y, int w, int h)
> {
> if (sb->id != NULL)
> ! gui_gtk_form_move_resize(GTK_FORM(gui.formwin), sb->id, x, y, w, h);
> }
>
> int
> ***************
> *** 1111,1117 ****
> GtkAdjustment *adjustment;
>
> gtk_widget_set_can_focus(sb->id, FALSE);
> ! gtk_form_put(GTK_FORM(gui.formwin), sb->id, 0, 0);
>
> adjustment = gtk_range_get_adjustment(GTK_RANGE(sb->id));
>
> --- 1111,1117 ----
> GtkAdjustment *adjustment;
>
> gtk_widget_set_can_focus(sb->id, FALSE);
> ! gui_gtk_form_put(GTK_FORM(gui.formwin), sb->id, 0, 0);
>
> adjustment = gtk_range_get_adjustment(GTK_RANGE(sb->id));
>
> *** ../vim-8.2.1877/src/gui_gtk_x11.c 2020-10-07 16:12:33.905930345 +0200
> --- src/gui_gtk_x11.c 2020-10-21 16:08:03.698866995 +0200
> ***************
> *** 3811,3817 ****
> G_CALLBACK(on_tabline_menu), G_OBJECT(tabline_menu));
> #endif // FEAT_GUI_TABLINE
>
> ! gui.formwin = gtk_form_new();
> gtk_container_set_border_width(GTK_CONTAINER(gui.formwin), 0);
> #if !GTK_CHECK_VERSION(3,0,0)
> gtk_widget_set_events(gui.formwin, GDK_EXPOSURE_MASK);
> --- 3811,3817 ----
> G_CALLBACK(on_tabline_menu), G_OBJECT(tabline_menu));
> #endif // FEAT_GUI_TABLINE
>
> ! gui.formwin = gui_gtk_form_new();
> gtk_container_set_border_width(GTK_CONTAINER(gui.formwin), 0);
> #if !GTK_CHECK_VERSION(3,0,0)
> gtk_widget_set_events(gui.formwin, GDK_EXPOSURE_MASK);
> ***************
> *** 3840,3846 ****
> GDK_POINTER_MOTION_HINT_MASK);
>
> gtk_widget_show(gui.drawarea);
> ! gtk_form_put(GTK_FORM(gui.formwin), gui.drawarea, 0, 0);
> gtk_widget_show(gui.formwin);
> gtk_box_pack_start(GTK_BOX(vbox), gui.formwin, TRUE, TRUE, 0);
>
> --- 3840,3846 ----
> GDK_POINTER_MOTION_HINT_MASK);
>
> gtk_widget_show(gui.drawarea);
> ! gui_gtk_form_put(GTK_FORM(gui.formwin), gui.drawarea, 0, 0);
> gtk_widget_show(gui.formwin);
> gtk_box_pack_start(GTK_BOX(vbox), gui.formwin, TRUE, TRUE, 0);
>
> ***************
> *** 4119,4127 ****
> if (gtk_socket_id != 0)
> usable_height -= (gui.char_height - (gui.char_height/2)); // sic.
>
> ! gtk_form_freeze(GTK_FORM(gui.formwin));
> gui_resize_shell(event->width, usable_height);
> ! gtk_form_thaw(GTK_FORM(gui.formwin));
>
> return TRUE;
> }
> --- 4119,4127 ----
> if (gtk_socket_id != 0)
> usable_height -= (gui.char_height - (gui.char_height/2)); // sic.
>
> ! gui_gtk_form_freeze(GTK_FORM(gui.formwin));
> gui_resize_shell(event->width, usable_height);
> ! gui_gtk_form_thaw(GTK_FORM(gui.formwin));
>
> return TRUE;
> }
> *** ../vim-8.2.1877/src/version.c 2020-10-21 14:49:05.033959899 +0200
> --- src/version.c 2020-10-21 16:09:39.598564319 +0200
> ***************
> *** 752,753 ****
> --- 752,755 ----
> { /* Add new patch number below this line */
> + /**/
> + 1878,
> /**/
>
> --
> hundred-and-one symptoms of being an internet addict:
> 94. Now admit it... How many of you have made "modem noises" into
> the phone just to see if it was possible? :-)
>
> /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\ an exciting new programming language -- http://www.Zimbu.org ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vim_dev/202010211410.09LEAwNU063934%40masaka.moolenaar.net.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/CAJkCKXsKnzm976pbO_VYiGkv%2BaEKiqg7q%2Bd4V_V_g5%2BbqUOtsg%40mail.gmail.com.