Ryujinx-GtkSharp/gtk/TreeView.custom
Gonzalo Paniagua Javier b5cfb4ba67 2003-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* gtk/TreeView.custom:
	(GetPathAtPos): added 3 overloads of this method so that the caller
	does not need to create extra variables that may not use.

	* api/gtk-api.xml:
	* sources/Gtk.metadata: added pass_out attribute for tx and ty
	arguments of TreeView::WidgetToTreeCoords. Hide TreeView::GetPathAtPos.

svn path=/trunk/gtk-sharp/; revision=13677
2003-04-16 02:26:12 +00:00

98 lines
2.6 KiB
Plaintext

// Gtk.TreeView.Custom - Gtk TreeView class customizations
//
// Authors:
// Kristian Rietveld <kris@gtk.org>
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (c) 2002 Kristian Rietveld
// (c) 2003 Ximian, Inc. (http://www.ximian.com)
//
// This code is inserted after the automatically generated code.
[DllImport("libgtk-win32-2.0-0.dll")]
static extern IntPtr gtk_tree_view_get_model (IntPtr raw);
[DllImport("libgtk-win32-2.0-0.dll")]
static extern IntPtr gtk_tree_view_set_model (IntPtr raw, IntPtr raw_model);
/// <summary>Model Property</summary>
/// <remarks>Gets the model being displayed by the TreeView
/// </remarks>
public Gtk.TreeModel Model {
get {
IntPtr raw_ret = gtk_tree_view_get_model (Handle);
Gtk.TreeModel ret = (Gtk.TreeModel) GLib.Object.GetObject (raw_ret);
return ret;
}
set {
gtk_tree_view_set_model (Handle, value.Handle);
}
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern bool gtk_tree_view_get_path_at_pos (IntPtr raw,
int x,
int y,
out IntPtr path,
IntPtr column,
out int cell_x,
out int cell_y);
[DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_view_get_path_at_pos")]
static extern bool gtk_tree_view_get_path_at_pos_intptr (IntPtr raw,
int x,
int y,
out IntPtr path,
IntPtr column,
IntPtr cell_x,
IntPtr cell_y);
public bool GetPathAtPos (int x, int y, out Gtk.TreePath path, Gtk.TreeViewColumn column, out int cell_x, out int cell_y)
{
IntPtr col;
if (column == null)
col = IntPtr.Zero;
else
col = column.Handle;
IntPtr pathHandle;
bool raw_ret = gtk_tree_view_get_path_at_pos (Handle, x, y, out pathHandle, col, out cell_x, out cell_y);
if (raw_ret)
path = new TreePath (pathHandle);
else
path = null;
return raw_ret;
}
public bool GetPathAtPos (int x, int y, out Gtk.TreePath path)
{
IntPtr pathHandle;
bool raw_ret = gtk_tree_view_get_path_at_pos_intptr (Handle, x, y, out pathHandle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
if (raw_ret)
path = new TreePath (pathHandle);
else
path = null;
return raw_ret;
}
public bool GetPathAtPos (int x, int y, out Gtk.TreePath path, Gtk.TreeViewColumn column)
{
if (column == null)
return GetPathAtPos (x, y, out path);
IntPtr pathHandle;
bool raw_ret = gtk_tree_view_get_path_at_pos_intptr (Handle, x, y, out pathHandle, column.Handle, IntPtr.Zero, IntPtr.Zero);
if (raw_ret)
path = new TreePath (pathHandle);
else
path = null;
return raw_ret;
}