Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Update GTK+ to version 3.14.15
Browse files Browse the repository at this point in the history
Based on the patches from Mikkel Kruse Johnsen. See the PR:
#128
While Mikkel has patches on his fork to update step by step
to GTK 3.20 here I am focusing on updating to 3.14.15 and getting
things to the minimal to just compile. Then the idea would be
to fix the possible issues by fixing the metadata.

See that the CSS demo is currently disabled since the CssProvider
is not properly picked up for some reason. We will need to research
a bit on this but for now it is good enough doing it without.

There are also 3 new patches that need to be applied due to the
scanner hanging or giving an error when parsing the source code.
Two of those patches are already in GTK upstream see:
https://git.gnome.org/browse/gtk+/commit/?id=64eca0bb2dad94164d38a89797bf7a439a321b48
https://git.gnome.org/browse/gtk+/commit/?id=fab70d34d443d25c8c68fea30ae7b483749b5e40
The third patch has not yet a workaround that we can merge, it seems
The third patch has not yet a workaround that we can merge, it seems
the ifdef about the GI_SCANNER is giving some issues. We should probably
improve the scanner for this.

See that there are also some generator problems with GtkWidgetClass.
The part of the patch was taken from:
openmedicus@5fc657a
This workaround fixes the problem below. We should probably research here why this happens and how we can fix it in a better way:
./Widget.cs(111,4): error CS0246: The type or namespace name `GtkWidgetClass' could not be found. Are you missing an assembly reference?
./Widget.cs(112,4): error CS0841: A local variable `klass' cannot be used before it is declared
./Widget.cs(113,4): error CS0103: The name `OverrideClassStruct' does not exist in the current context
./Widget.cs(113,32): error CS0841: A local variable `klass' cannot be used before it is declared
  • Loading branch information
nacho committed May 21, 2016
1 parent 0f1a3e0 commit 94e46e7
Show file tree
Hide file tree
Showing 10 changed files with 6,090 additions and 1,371 deletions.
664 changes: 538 additions & 126 deletions gdk/gdk-api.raw

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion generator/ObjectBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public bool CanGenerateClassStruct {
* as they may contain class fields which don't appear in the old (version 1) API files. There are also cases in which the order of the
* <signal> and <virtual_method> elements do not match the struct layout.
*/
return (is_interface || this.ParserVersion >= 2) && class_fields_valid;
return (is_interface || this.ParserVersion >= 2) && (class_fields_valid || class_struct_name == "GtkWidgetClass");
}
}

Expand Down
33 changes: 30 additions & 3 deletions gtk/Gtk.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<attr path="/api/namespace/struct[@cname='GtkRadioActionEntry']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GtkToggleActionEntry']" name="hidden">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkBorder']" name="opaque">false</attr>
<attr path="/api/namespace/boxed[@cname='GtkGradient']/method[@cname='gtk_gradient_add_color_stop']" name="hidden">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkGradient']/method[@cname='gtk_gradient_resolve']" name="hidden">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkGradient']/method[@cname='gtk_gradient_resolve_for_context']" name="hidden">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkIconInfo']/method[@name='Free']" name="deprecated">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkIconInfo']/method[@name='GetFilename']" name="win32_utf8_variant">true</attr>
<attr path="/api/namespace/boxed[@cname='GtkIconSet']/method[@name='GetSizes']" name="hidden">1</attr>
Expand All @@ -32,6 +35,7 @@
<attr path="/api/namespace/boxed[@cname='GtkSelectionData']/method[@name='SetText']" name="hidden">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkSelectionData']/method[@name='Set']/*/*[@name='data']" name="type">guchar</attr>
<attr path="/api/namespace/boxed[@cname='GtkSelectionData']/method[@name='Set']/*/*[@name='data']" name="array">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkSymbolicColor']/method[@cname='gtk_symbolic_color_resolve']" name="hidden">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkTargetEntry']" name="opaque">false</attr>
<attr path="/api/namespace/boxed[@cname='GtkTargetEntry']/field[@cname='flags']" name="type">GtkTargetFlags</attr>
<attr path="/api/namespace/boxed[@cname='GtkTextAttributes']/field[@cname='appearance']" name="hidden">1</attr>
Expand Down Expand Up @@ -73,6 +77,7 @@
<attr path="/api/namespace/class[@cname='GtkGlobal']/method[@name='EventsPending']" name="name">GetEventsPending</attr>
<attr path="/api/namespace/class[@cname='GtkGlobal']/method[@name='CheckVersion']/return-type" name="type">const-gchar*</attr>
<attr path="/api/namespace/class[@cname='GtkGlobal']/method[@name='EnumeratePrinters']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkIcon_']/method[@cname='gtk_icon_size_lookup_for_settings']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkInit_']/method[@name='Check']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkInit_']/method[@name='CheckAbiCheck']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkInit_']/method[@name='AbiCheck']" name="hidden">1</attr>
Expand All @@ -83,6 +88,9 @@
<attr path="/api/namespace/class[@cname='GtkRc_']/method[@name='Parse']" name="win32_utf8_variant">true</attr>
<attr path="/api/namespace/class[@cname='GtkRc_']/method[@name='SetDefaultFiles']" name="win32_utf8_variant">true</attr>
<attr path="/api/namespace/class[@cname='GtkRc_']/method[@name='SetDefaultFiles']/*/*[@name='filenames']" name="null_term_array">1</attr>
<attr path="/api/namespace/class[@cname='GtkRc_']/method[@cname='gtk_rc_get_style_by_paths']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkRc_']/method[@cname='gtk_rc_reparse_all_for_settings']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkRc_']/method[@cname='gtk_rc_reset_styles']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkRender_']" name="internal">1</attr>
<attr path="/api/namespace/class[@cname='GtkRender_']/method[@name='IconPixbuf']/return-type" name="owned">true</attr>
<attr path="/api/namespace/class[@cname='GtkStock_']" name="hidden">1</attr>
Expand Down Expand Up @@ -113,6 +121,7 @@
<attr path="/api/namespace/enum[@cname='GtkTextBufferTargetInfo']/member[@name='Text']" name="value">UInt32.MaxValue-2U</attr>
<attr path="/api/namespace/enum[@cname='GtkToolbarSpaceStyle']" name="hidden">1</attr>
<attr path="/api/namespace/enum[@cname='GtkWin32EmbedMessageType']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkActionable']/property[@name='ActionName']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkBuildable']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkCellEditable']/method[@name='EditingDone']" name="name">FinishEditing</attr>
<attr path="/api/namespace/interface[@cname='GtkCellEditable']/signal[@name='RemoveWidget']" name="name">WidgetRemoved</attr>
Expand Down Expand Up @@ -191,6 +200,8 @@
<attr path="/api/namespace/interface[@cname='GtkRecentChooser']/virtual_method[@cname='list_filters']/return-type" name="element_type">GtkRecentFilter*</attr>
<attr path="/api/namespace/interface[@cname='GtkRecentChooser']/virtual_method[@cname='list_filters']/return-type" name="elements_owned">false</attr>
<attr path="/api/namespace/interface[@cname='GtkRecentChooser']/virtual_method[@cname='list_filters']/return-type" name="owned">true</attr>
<attr path="/api/namespace/interface[@cname='GtkStyleProvider']/method[@cname='gtk_style_provider_get_icon_factory']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkStyleProvider']/method[@cname='gtk_style_provider_get_style']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='Foreach']/*/*[@name='func']" name="scope">call</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/*[@name='GetIterFirst']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='Get']" name="hidden">1</attr>
Expand Down Expand Up @@ -257,6 +268,9 @@
<attr path="/api/namespace/object[@cname='GtkApplication']/method[@name='GetWindows']/return-type" name="element_type">GtkWindow*</attr>
<attr path="/api/namespace/object[@cname='GtkArrow']/method[@name='Set']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkBin']/method[@name='GetChild']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkBuilder']/constructor[@cname='gtk_builder_new_from_file']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkBuilder']/constructor[@cname='gtk_builder_new_from_resource']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkBuilder']/constructor[@cname='gtk_builder_new_from_string']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkBuilder']/method[@name='AddFromFile']/*/*[@name='filename']" name="type">const-gfilename*</attr>
<attr path="/api/namespace/object[@cname='GtkBuilder']/method[@cname='gtk_builder_connect_signals']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkBuilder']/method[@cname='gtk_builder_connect_signals_full']" name="hidden">1</attr>
Expand Down Expand Up @@ -306,6 +320,7 @@
<attr path="/api/namespace/object[@cname='GtkClipboard']/signal" name="block_glue">1</attr>
<attr path="/api/namespace/object[@cname='GtkColorButton']/method[@name='GetColor']/*/*[@name='color']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkColorButton']/property[@name='Rgba']" name="type">GdkRGBA</attr>
<attr path="/api/namespace/object[@cname='GtkColorButton']/property[@cname='use-alpha']" name="name">HasAlpha</attr>
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='GetCurrentColor']/*/*[@name='color']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='GetPreviousColor']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='PaletteFromString']" name="hidden">1</attr>
Expand Down Expand Up @@ -362,11 +377,15 @@
<attr path="/api/namespace/object[@cname='GtkExpander']/constructor[@cname='gtk_expander_new_with_mnemonic']" name="preferred">1</attr>
<attr path="/api/namespace/object[@cname='GtkExpander']/signal[@name='Activate']" name="name">Activated</attr>
<attr path="/api/namespace/object[@cname='GtkFileChooserDialog']/constructor[@cname='gtk_file_chooser_dialog_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkFileChooserWidget']/signal[@cname='show-hidden']" name="name">ShowedHidden</attr>
<remove-node path="/api/namespace/object[@cname='GtkFileChooserWidget']/implements/interface[@cname='GtkFileChooserEmbed']" />
<attr path="/api/namespace/object[@cname='GtkFlowBox']/signal[@cname='select-all']" name="name">SelectedAll</attr>
<attr path="/api/namespace/object[@cname='GtkFlowBox']/signal[@cname='unselect-all']" name="name">UnselectedAll</attr>
<attr path="/api/namespace/object[@cname='GtkFontSelectionDialog']/method[@name='GetCancelButton']/return-type" name="type">GtkButton*</attr>
<attr path="/api/namespace/object[@cname='GtkFontSelectionDialog']/method[@name='GetOkButton']/return-type" name="type">GtkButton*</attr>
<attr path="/api/namespace/object[@cname='GtkFrame']/method[@name='GetLabelAlign']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkFrame']/method[@name='SetLabelAlign']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkGesture']/method[@cname='gtk_gesture_get_group']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkHandleBox']/property[@name='ChildDetached']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkHandleBox']/property[@name='ShadowType']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkHandleBox']/method[@name='GetChildDetached']" name="name">IsChildDetached</attr>
Expand Down Expand Up @@ -442,6 +461,8 @@
<attr path="/api/namespace/object[@cname='GtkLayout']/method[@name='GetVadjustment']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkLayout']/method[@name='SetHadjustment']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkLayout']/method[@name='SetVadjustment']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkListBox']/signal[@cname='select-all']" name="name">SelectedAll</attr>
<attr path="/api/namespace/object[@cname='GtkListBox']/signal[@cname='unselect-all']" name="name">UnselectedAll</attr>
<attr path="/api/namespace/object[@cname='GtkListStore']/constructor[@cname='gtk_list_store_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkListStore']/constructor[@cname='gtk_list_store_newv']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkListStore']/method[@name='Append']/*/*[@name='iter']" name="pass_as">out</attr>
Expand Down Expand Up @@ -471,13 +492,16 @@
<attr path="/api/namespace/object[@cname='GtkMenu']/method[@name='SetScreen']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkMenuShell']/signal[@name='Cancel']" name="name">Canceled</attr>
<attr path="/api/namespace/object[@cname='GtkMenuShell']/signal[@name='Deactivate']" name="name">Deactivated</attr>
<attr path="/api/namespace/object[@cname='GtkMenuShell']/signal[@name='Insert']" name="name">Inserted</attr>
<attr path="/api/namespace/object[@cname='GtkMessageDialog']/constructor[@cname='gtk_message_dialog_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkMessageDialog']/constructor[@cname='gtk_message_dialog_new_with_markup']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkMountOperation']/method[@name='IsShowing']" name="name">GetIsShowing</attr>
<attr path="/api/namespace/object[@cname='GtkNotebook']/signal[@name='ChangeCurrentPage']/return-type" name="type">void</attr>
<attr path="/api/namespace/object[@cname='GtkNotebook']/signal[@name='ReorderTab']/return-type" name="type">void</attr>
<attr path="/api/namespace/object[@cname='GtkPageSetup']/constructor[@cname='gtk_page_setup_new_from_file']/*/*[@name='file_name']" name="type">const-gfilename*</attr>
<attr path="/api/namespace/object[@cname='GtkPageSetup']/method[@name='ToFile']/*/*[@name='file_name']" name="type">const-gfilename*</attr>
<attr path="/api/namespace/object[@cname='GtkPlacesSidebar']/signal[@cname='show-connect-to-server']" name="name">ShowedConnectToServer</attr>
<attr path="/api/namespace/object[@cname='GtkPlacesSidebar']/signal[@cname='show-enter-location']" name="name">ShowEnteredLocation</attr>
<attr path="/api/namespace/object[@cname='GtkPlug']/constructor[@cname='gtk_plug_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkPlug']/constructor[@cname='gtk_plug_new_for_display']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkPlug']/property[@name='Embedded']" name="name">IsEmbedded</attr>
Expand Down Expand Up @@ -816,9 +840,10 @@
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='SetHadjustment']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='SetVadjustment']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/constructor[@cname='gtk_ui_manager_new_merge_id']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@name='AddUiFromFile']" name="win32_utf8_variant">true</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@cname='gtk_ui_manager_get_action_groups']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@name='GetToplevels']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@name='AddUiFromFile']" name="win32_utf8_variant">true</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@name='AddUiFromResource']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@cname='gtk_ui_manager_get_action_groups']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@name='GetToplevels']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkViewport']/method[@name='GetHadjustment']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkViewport']/method[@name='GetVadjustment']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkViewport']/method[@name='SetHadjustment']" name="hidden">1</attr>
Expand All @@ -843,6 +868,7 @@
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetPreferredSize']/*/*[@type='GtkRequisition*']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetRealized']" name="name">GetIsRealized</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetRequisition']/*/parameter[@name='requisition']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetSettings']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='HasDefault']" name="name">GetHasDefault</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='HasFocus']" name="name">GetHasFocus</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Intersect']/*/*[@name='intersection']" name="pass_as">out</attr>
Expand Down Expand Up @@ -894,6 +920,7 @@
<attr path="/api/namespace/object[@cname='GtkWindow']/method[@name='SetIconFromFile']" name="win32_utf8_variant">true</attr>
<attr path="/api/namespace/object[@cname='GtkWindow']/method[@name='SetIconList']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkWindow']/property[@name='Screen']" name="new_flag">1</attr>
<attr path="/api/namespace/object[@cname='GtkWindow']/property[@cname='is-maximized']" name="name">Maximized</attr>
<attr path="/api/namespace/object[@cname='GtkWindow']/signal[@name='ActivateDefault']" name="name">DefaultActivated</attr>
<attr path="/api/namespace/object[@cname='GtkWindow']/signal[@name='ActivateFocus']" name="name">FocusActivated</attr>
<attr path="/api/namespace/struct[@cname='GtkBindingArg']" name="hidden">1</attr>
Expand Down
Loading

0 comments on commit 94e46e7

Please sign in to comment.