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

Commit f66a1c8

Browse files
committed
[Gtk] Manually generate gtk_parse_args as the generator is not smart enough yet.
1 parent 2295268 commit f66a1c8

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

gtk/Global.custom

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Global.custom - customizations to Gtk.Global
2+
//
3+
// Authors: Marius Ungureanu <[email protected]>
4+
//
5+
// Copyright (c) 2016 Microsoft
6+
//
7+
// This program is free software; you can redistribute it and/or
8+
// modify it under the terms of version 2 of the Lesser GNU General
9+
// Public License as published by the Free Software Foundation.
10+
//
11+
//
12+
// This program is free software; you can redistribute it and/or
13+
// modify it under the terms of version 2 of the Lesser GNU General
14+
// Public License as published by the Free Software Foundation.
15+
//
16+
// This program is distributed in the hope that it will be useful,
17+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19+
// Lesser General Public License for more details.
20+
//
21+
// You should have received a copy of the GNU Lesser General Public
22+
// License along with this program; if not, write to the
23+
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24+
// Boston, MA 02111-1307, USA.
25+
26+
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
27+
static extern bool gtk_parse_args(ref int argc, ref IntPtr argv);
28+
29+
public static bool ParseArgs(ref int argc, ref string[] argv) {
30+
GLib.Argv a = new GLib.Argv (argv);
31+
IntPtr buf = a.Handle;
32+
33+
bool ret = gtk_parse_args (ref argc, ref buf);
34+
argv = a.GetArgs (argc);
35+
return ret;
36+
}

gtk/Gtk.metadata

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,4 +935,5 @@
935935
<attr path="/api/namespace/object[@cname='GtkIMContext']/method[@cname='gtk_im_context_get_preedit_string']/parameters/parameter[@name='attrs']" name="owned">true</attr>
936936
<attr path="/api/namespace/object[@cname='GtkIconView']/method[@cname='gtk_icon_view_get_tooltip_context']/parameters/parameter[@name='path']" name="owned">true</attr>
937937
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@cname='gtk_tree_view_get_tooltip_context']/parameters/parameter[@name='path']" name="owned">true</attr>
938+
<attr path="/api/namespace/class[@cname='GtkGlobal']/method[@cname='gtk_parse_args']" name="hidden">1</attr>
938939
</metadata>

gtk/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ customs = \
8181
FileChooserWidget.custom \
8282
FileSelection.custom \
8383
Frame.custom \
84+
Global.custom \
8485
HBox.custom \
8586
HScale.custom \
8687
IconFactory.custom \

0 commit comments

Comments
 (0)