Ryujinx-GtkSharp/gtk/FileChooserWidget.custom
Todd Berman ae8ed25625 2004-10-29 Todd Berman <tberman@off.net>
* gtk/ComboBox.custom: Add a header.
        * gtk/FileChooserDialog.custom: Add subclassing support, and a header.
        * gtk/FileChooserWidget.custom: Add a header.

svn path=/trunk/gtk-sharp/; revision=35493
2004-10-30 03:31:43 +00:00

42 lines
1.5 KiB
Plaintext

// Gtk.RadioMenuItem.custom - Gtk RadioMenuItem customizations
//
// Authors: Todd Berman <tberman@off.net>
//
// Copyright (c) 2004 Todd Berman
//
// 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 ("libgtk-win32-2.0-0.dll")]
static extern IntPtr gtk_file_chooser_get_filenames (IntPtr raw);
[DllImport("libglib-2.0-0.dll")]
static extern void g_strfreev (IntPtr handle);
public string[] Filenames {
get {
IntPtr strv = gtk_file_chooser_get_filenames (Handle);
System.Collections.ArrayList result = new System.Collections.ArrayList ();
int i = 0;
IntPtr strptr = Marshal.ReadIntPtr (strv, IntPtr.Size * i++);
while (strptr != IntPtr.Zero) {
result.Add (Marshal.PtrToStringAnsi (strptr));
strptr = Marshal.ReadIntPtr (strv, IntPtr.Size * i++);
}
g_strfreev (strv);
return result.ToArray (typeof (string)) as string[];
}
}