Patch 8.2.1881
Problem:    Cannot build with GTK3.
Solution:   Adjust form functions.
Files:      src/gui_gtk_f.c


*** ../vim-8.2.1880/src/gui_gtk_f.c     2020-10-21 16:10:16.382485983 +0200
--- src/gui_gtk_f.c     2020-10-21 17:26:49.015080921 +0200
***************
*** 48,55 ****
  };
  
  
! 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);
--- 48,59 ----
  };
  
  
! static void gui_gtk_form_class_init(GtkFormClass *klass);
! #if GTK_CHECK_VERSION(3,0,0)
! static void gui_gtk_form_init(GtkForm *form);
! #else
! static void gui_gtk_form_init(GtkForm *form, void *g_class);
! #endif
  
  static void form_realize(GtkWidget *widget);
  static void form_unrealize(GtkWidget *widget);
***************
*** 195,202 ****
  }
  
  // Basic Object handling procedures
  #if GTK_CHECK_VERSION(3,0,0)
! G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER)
  #else
      GtkType
  gui_gtk_form_get_type(void)
--- 199,207 ----
  }
  
  // Basic Object handling procedures
+ 
  #if GTK_CHECK_VERSION(3,0,0)
! G_DEFINE_TYPE(GtkForm, gui_gtk_form, GTK_TYPE_CONTAINER)
  #else
      GtkType
  gui_gtk_form_get_type(void)
***************
*** 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);
      }
--- 216,223 ----
        form_info.type_name = "GtkForm";
        form_info.object_size = sizeof(GtkForm);
        form_info.class_size = sizeof(GtkFormClass);
!       form_info.class_init_func = (GtkClassInitFunc)gui_gtk_form_class_init;
!       form_info.object_init_func = (GtkObjectInitFunc)gui_gtk_form_init;
  
        form_type = gtk_type_unique(GTK_TYPE_CONTAINER, &form_info);
      }
***************
*** 221,227 ****
  #endif // !GTK_CHECK_VERSION(3,0,0)
  
      static void
! form_class_init(GtkFormClass *klass)
  {
      GtkWidgetClass *widget_class;
      GtkContainerClass *container_class;
--- 226,232 ----
  #endif // !GTK_CHECK_VERSION(3,0,0)
  
      static void
! gui_gtk_form_class_init(GtkFormClass *klass)
  {
      GtkWidgetClass *widget_class;
      GtkContainerClass *container_class;
***************
*** 254,260 ****
  }
  
      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);
--- 259,269 ----
  }
  
      static void
! gui_gtk_form_init(GtkForm *form
! #if !GTK_CHECK_VERSION(3,0,0)
!       , void *g_class UNUSED
! #endif
!       )
  {
  #if GTK_CHECK_VERSION(3,0,0)
      gtk_widget_set_has_window(GTK_WIDGET(form), TRUE);
***************
*** 416,423 ****
      }
  
  #if GTK_CHECK_VERSION(3,0,0)
!     if (GTK_WIDGET_CLASS (gtk_form_parent_class)->unrealize)
!        (* GTK_WIDGET_CLASS (gtk_form_parent_class)->unrealize) (widget);
  #else
      if (GTK_WIDGET_CLASS (parent_class)->unrealize)
         (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
--- 425,432 ----
      }
  
  #if GTK_CHECK_VERSION(3,0,0)
!     if (GTK_WIDGET_CLASS (gui_gtk_form_parent_class)->unrealize)
!        (* GTK_WIDGET_CLASS (gui_gtk_form_parent_class)->unrealize) (widget);
  #else
      if (GTK_WIDGET_CLASS (parent_class)->unrealize)
         (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
***************
*** 555,561 ****
        }
      }
  
!     return GTK_WIDGET_CLASS(gtk_form_parent_class)->draw(widget, cr);
  }
  #else // !GTK_CHECK_VERSION(3,0,0)
      static gint
--- 564,570 ----
        }
      }
  
!     return GTK_WIDGET_CLASS(gui_gtk_form_parent_class)->draw(widget, cr);
  }
  #else // !GTK_CHECK_VERSION(3,0,0)
      static gint
*** ../vim-8.2.1880/src/version.c       2020-10-21 16:49:13.992979808 +0200
--- src/version.c       2020-10-21 17:28:02.202871125 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1881,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
98. The Alta Vista administrators ask you what sites are missing
    in their index files.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202010211529.09LFTB1L089426%40masaka.moolenaar.net.

Raspunde prin e-mail lui