mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-23 20:41:12 +00:00
2005-01-25 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : hide all the SignalFunc using Toolbar methods. * gtk/Makefile.am : add the new custom. * gtk/Toolbar.custom : implement the SignalFunc methods. Deal with null for Widget params in *Element. svn path=/trunk/gtk-sharp/; revision=39509
This commit is contained in:
parent
b8380e84ba
commit
fb12bb5f61
|
@ -1,3 +1,10 @@
|
||||||
|
2005-01-25 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* gtk/Gtk.metadata : hide all the SignalFunc using Toolbar methods.
|
||||||
|
* gtk/Makefile.am : add the new custom.
|
||||||
|
* gtk/Toolbar.custom : implement the SignalFunc methods. Deal with
|
||||||
|
null for Widget params in *Element.
|
||||||
|
|
||||||
2005-01-24 Jeroen Zwartepoorte <jeroen@xs4all.nl>
|
2005-01-24 Jeroen Zwartepoorte <jeroen@xs4all.nl>
|
||||||
|
|
||||||
* generator/MethodBody.cs : fix out LPUGen params.
|
* generator/MethodBody.cs : fix out LPUGen params.
|
||||||
|
|
|
@ -779,5 +779,29 @@ If type == <see cref="T:Gtk.ToolbarChildType.Widget" />, widget is used as the n
|
||||||
<remarks>You can cast the returned object to <see cref="T:Gtk.Toolbar+ToolbarChild" /> to access its child properties.</remarks>
|
<remarks>You can cast the returned object to <see cref="T:Gtk.Toolbar+ToolbarChild" /> to access its child properties.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
<Member MemberName="InsertStock">
|
||||||
|
<MemberSignature Language="C#" Value="public Gtk.Widget InsertStock (string stock_id, string tooltip_text, string tooltip_private_text, Gtk.SignalFunc cb, int position);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gtk.Widget</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="stock_id" Type="System.String" />
|
||||||
|
<Parameter Name="tooltip_text" Type="System.String" />
|
||||||
|
<Parameter Name="tooltip_private_text" Type="System.String" />
|
||||||
|
<Parameter Name="cb" Type="Gtk.SignalFunc" />
|
||||||
|
<Parameter Name="position" Type="System.Int32" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Deprecated</summary>
|
||||||
|
<param name="stock_id">a <see cref="T:System.String" /></param>
|
||||||
|
<param name="tooltip_text">a <see cref="T:System.String" /></param>
|
||||||
|
<param name="tooltip_private_text">a <see cref="T:System.String" /></param>
|
||||||
|
<param name="cb">a <see cref="T:Gtk.SignalFunc" /></param>
|
||||||
|
<param name="position">a <see cref="T:System.Int32" /></param>
|
||||||
|
<returns>a <see cref="T:Gtk.Widget" /></returns>
|
||||||
|
<remarks>Replaced by ToolItem API.</remarks>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
</Members>
|
</Members>
|
||||||
</Type>
|
</Type>
|
||||||
|
|
|
@ -323,7 +323,13 @@
|
||||||
<attr path="/api/namespace/object[@cname='GtkToggleAction']/method[@name='Toggled']" name="name">Toggle</attr>
|
<attr path="/api/namespace/object[@cname='GtkToggleAction']/method[@name='Toggled']" name="name">Toggle</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkToggleButton']/constructor[@cname='gtk_toggle_button_new_with_mnemonic']" name="preferred">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkToggleButton']/constructor[@cname='gtk_toggle_button_new_with_mnemonic']" name="preferred">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkToggleButton']/method[@name='Toggled']" name="name">Toggle</attr>
|
<attr path="/api/namespace/object[@cname='GtkToggleButton']/method[@name='Toggled']" name="name">Toggle</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='AppendItem']/*/*[@type='gpointer']" name="null_ok">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='AppendElement']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='AppendItem']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='InsertElement']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='InsertItem']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='InsertStock']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='PrependElement']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='PrependItem']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkToolItem']/signal[@name='SetTooltip']" name="name">TooltipSet</attr>
|
<attr path="/api/namespace/object[@cname='GtkToolItem']/signal[@name='SetTooltip']" name="name">TooltipSet</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/constructor[@cname='gtk_tree_model_filter_new']/*/*[@type='GtkTreePath*']" name="null_ok">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/constructor[@cname='gtk_tree_model_filter_new']/*/*[@type='GtkTreePath*']" name="null_ok">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertIterToChildIter']/*/*[@name='child_iter']" name="pass_as">out</attr>
|
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertIterToChildIter']/*/*[@name='child_iter']" name="pass_as">out</attr>
|
||||||
|
|
|
@ -90,6 +90,7 @@ customs = \
|
||||||
TextIter.custom \
|
TextIter.custom \
|
||||||
TextTag.custom \
|
TextTag.custom \
|
||||||
TextView.custom \
|
TextView.custom \
|
||||||
|
Toolbar.custom \
|
||||||
TreeIter.custom \
|
TreeIter.custom \
|
||||||
TreeModel.custom \
|
TreeModel.custom \
|
||||||
TreeModelFilter.custom \
|
TreeModelFilter.custom \
|
||||||
|
|
182
gtk/Toolbar.custom
Normal file
182
gtk/Toolbar.custom
Normal file
|
@ -0,0 +1,182 @@
|
||||||
|
// Gtk.Toolbar.custom - Gtk Toolbar class customizations
|
||||||
|
//
|
||||||
|
// Author: Mike Kestner <mkestner@novell.com>
|
||||||
|
//
|
||||||
|
// Copyright (C) 2005 Novell, Inc.
|
||||||
|
//
|
||||||
|
// This code is inserted after the automatically generated code.
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
// Public License as published by the Free Software Foundation.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this program; if not, write to the
|
||||||
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
// Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
|
static extern void g_object_weak_ref (IntPtr raw, WeakNotify cb, IntPtr data);
|
||||||
|
|
||||||
|
delegate void WeakNotify (IntPtr handle, IntPtr obj);
|
||||||
|
|
||||||
|
static void ReleaseDelegateCB (IntPtr handle, IntPtr obj)
|
||||||
|
{
|
||||||
|
GCHandle gch = (GCHandle) handle;
|
||||||
|
gch.Free ();
|
||||||
|
}
|
||||||
|
|
||||||
|
static WeakNotify on_weak_notify;
|
||||||
|
static WeakNotify OnWeakNotify {
|
||||||
|
get {
|
||||||
|
if (on_weak_notify == null)
|
||||||
|
on_weak_notify = new WeakNotify (ReleaseDelegateCB);
|
||||||
|
return on_weak_notify;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern IntPtr gtk_toolbar_append_element (IntPtr raw, int type, IntPtr widget, string text, string tooltip_text, string tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data);
|
||||||
|
|
||||||
|
[Obsolete ("Replaced by ToolItem API")]
|
||||||
|
public Gtk.Widget AppendElement (Gtk.ToolbarChildType type, Gtk.Widget widget, string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb)
|
||||||
|
{
|
||||||
|
GtkSharp.SignalFuncWrapper cb_wrapper = null;
|
||||||
|
cb_wrapper = new GtkSharp.SignalFuncWrapper (cb, this);
|
||||||
|
IntPtr raw_ret = gtk_toolbar_append_element (Handle, (int) type, widget == null ? IntPtr.Zero : widget.Handle, text, tooltip_text, tooltip_private_text, icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
|
||||||
|
Gtk.Widget ret;
|
||||||
|
if (raw_ret == IntPtr.Zero)
|
||||||
|
ret = null;
|
||||||
|
else {
|
||||||
|
ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret);
|
||||||
|
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern IntPtr gtk_toolbar_insert_element (IntPtr raw, int type, IntPtr widget, string text, string tooltip_text, string tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position);
|
||||||
|
|
||||||
|
[Obsolete ("Replaced by ToolItem API")]
|
||||||
|
public Gtk.Widget InsertElement (Gtk.ToolbarChildType type, Gtk.Widget widget, string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb, IntPtr user_data, int position)
|
||||||
|
{
|
||||||
|
GtkSharp.SignalFuncWrapper cb_wrapper = null;
|
||||||
|
cb_wrapper = new GtkSharp.SignalFuncWrapper (cb, this);
|
||||||
|
IntPtr raw_ret = gtk_toolbar_insert_element (Handle, (int) type, widget == null ? IntPtr.Zero : widget.Handle, text, tooltip_text, tooltip_private_text, icon.Handle, cb_wrapper.NativeDelegate, user_data, position);
|
||||||
|
Gtk.Widget ret;
|
||||||
|
if (raw_ret == IntPtr.Zero)
|
||||||
|
ret = null;
|
||||||
|
else {
|
||||||
|
ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret);
|
||||||
|
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern IntPtr gtk_toolbar_prepend_element (IntPtr raw, int type, IntPtr widget, string text, string tooltip_text, string tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data);
|
||||||
|
|
||||||
|
[Obsolete ("Replaced by ToolItem API")]
|
||||||
|
public Gtk.Widget PrependElement (Gtk.ToolbarChildType type, Gtk.Widget widget, string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb)
|
||||||
|
{
|
||||||
|
GtkSharp.SignalFuncWrapper cb_wrapper = null;
|
||||||
|
cb_wrapper = new GtkSharp.SignalFuncWrapper (cb, this);
|
||||||
|
IntPtr raw_ret = gtk_toolbar_prepend_element (Handle, (int) type, widget == null ? IntPtr.Zero : widget.Handle, text, tooltip_text, tooltip_private_text, icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
|
||||||
|
Gtk.Widget ret;
|
||||||
|
if (raw_ret == IntPtr.Zero)
|
||||||
|
ret = null;
|
||||||
|
else {
|
||||||
|
ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret);
|
||||||
|
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern IntPtr gtk_toolbar_append_item (IntPtr raw, string text, string tooltip_text, string tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data);
|
||||||
|
|
||||||
|
[Obsolete ("Replaced by ToolItem API")]
|
||||||
|
public Gtk.Widget AppendItem (string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb)
|
||||||
|
{
|
||||||
|
GtkSharp.SignalFuncWrapper cb_wrapper = null;
|
||||||
|
cb_wrapper = new GtkSharp.SignalFuncWrapper (cb, this);
|
||||||
|
IntPtr raw_ret = gtk_toolbar_append_item (Handle, text, tooltip_text, tooltip_private_text, icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
|
||||||
|
Gtk.Widget ret;
|
||||||
|
if (raw_ret == IntPtr.Zero)
|
||||||
|
ret = null;
|
||||||
|
else {
|
||||||
|
ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret);
|
||||||
|
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern IntPtr gtk_toolbar_insert_item (IntPtr raw, string text, string tooltip_text, string tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position);
|
||||||
|
|
||||||
|
[Obsolete ("Replaced by ToolItem API")]
|
||||||
|
public Gtk.Widget InsertItem (string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb, IntPtr user_data, int position)
|
||||||
|
{
|
||||||
|
GtkSharp.SignalFuncWrapper cb_wrapper = null;
|
||||||
|
cb_wrapper = new GtkSharp.SignalFuncWrapper (cb, this);
|
||||||
|
IntPtr raw_ret = gtk_toolbar_insert_item (Handle, text, tooltip_text, tooltip_private_text, icon.Handle, cb_wrapper.NativeDelegate, user_data, position);
|
||||||
|
Gtk.Widget ret;
|
||||||
|
if (raw_ret == IntPtr.Zero)
|
||||||
|
ret = null;
|
||||||
|
else {
|
||||||
|
ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret);
|
||||||
|
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern IntPtr gtk_toolbar_prepend_item (IntPtr raw, string text, string tooltip_text, string tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data);
|
||||||
|
|
||||||
|
[Obsolete ("Replaced by ToolItem API")]
|
||||||
|
public Gtk.Widget PrependItem (string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb)
|
||||||
|
{
|
||||||
|
GtkSharp.SignalFuncWrapper cb_wrapper = null;
|
||||||
|
cb_wrapper = new GtkSharp.SignalFuncWrapper (cb, this);
|
||||||
|
IntPtr raw_ret = gtk_toolbar_prepend_item (Handle, text, tooltip_text, tooltip_private_text, icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
|
||||||
|
Gtk.Widget ret;
|
||||||
|
if (raw_ret == IntPtr.Zero)
|
||||||
|
ret = null;
|
||||||
|
else {
|
||||||
|
ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret);
|
||||||
|
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern IntPtr gtk_toolbar_insert_stock (IntPtr raw, string stock_id, string tooltip_text, string tooltip_private_text, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position);
|
||||||
|
|
||||||
|
[Obsolete ("Replaced by ToolItem API")]
|
||||||
|
public Gtk.Widget InsertStock (string stock_id, string tooltip_text, string tooltip_private_text, Gtk.SignalFunc cb, int position)
|
||||||
|
{
|
||||||
|
return InsertStock (stock_id, tooltip_text, tooltip_private_text, cb, IntPtr.Zero, position);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Obsolete ("Replaced by ToolItem API")]
|
||||||
|
public Gtk.Widget InsertStock (string stock_id, string tooltip_text, string tooltip_private_text, Gtk.SignalFunc cb, IntPtr user_data, int position)
|
||||||
|
{
|
||||||
|
GtkSharp.SignalFuncWrapper cb_wrapper = null;
|
||||||
|
cb_wrapper = new GtkSharp.SignalFuncWrapper (cb, this);
|
||||||
|
IntPtr raw_ret = gtk_toolbar_insert_stock (Handle, stock_id, tooltip_text, tooltip_private_text, cb_wrapper.NativeDelegate, user_data, position);
|
||||||
|
Gtk.Widget ret;
|
||||||
|
if (raw_ret == IntPtr.Zero)
|
||||||
|
ret = null;
|
||||||
|
else {
|
||||||
|
ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret);
|
||||||
|
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue