Ryujinx-GtkSharp/gtk/Widget.custom
Mike Kestner e83c55a242 2004-03-12 Mike Kestner <mkestner@ximian.com>
* */Makefile.am : automakify the build
	* */Makefile.in : kill
	* *.custom : remove System.Drawing dependencies
	* *.cs : remove System.Drawing dependencies
	* *-api.xml : mv to *-api.raw
	* glue/* : mv to lib specific gluelibs for glib, gdk, gtk, and glade.
	* gtk/gtk-symbols : alias GtkType to GType
	* sources/gtk-sharp-sources.xml : create .raw files. They are now
	transformed to .xml files by the metadata compilation step.

svn path=/trunk/gtk-sharp/; revision=23967
2004-03-12 21:18:11 +00:00

53 lines
1.3 KiB
Plaintext

//
// Gtk.Widget.custom - Gtk Widget class customizations
//
// Author: Rachel Hestilow <hestilow@ximian.com>
//
// Copyright (C) 2002 Rachel Hestilow
//
// This code is inserted after the automatically generated code.
//
[DllImport("gtksharpglue")]
static extern IntPtr gtksharp_gtk_widget_get_allocation (IntPtr style);
public Gdk.Rectangle Allocation {
get { return Gdk.Rectangle.New (gtksharp_gtk_widget_get_allocation (Handle)); }
}
[DllImport ("gtksharpglue")]
static extern IntPtr gtksharp_gtk_widget_get_window (IntPtr widget);
public Gdk.Window GdkWindow {
get {
IntPtr raw_ret = gtksharp_gtk_widget_get_window (Handle);
if (raw_ret != (IntPtr) 0){
Gdk.Window ret = (Gdk.Window) GLib.Object.GetObject(raw_ret, false);
return ret;
}
return null;
}
}
public void AddAccelerator (string accel_signal, AccelGroup accel_group, AccelKey accel_key)
{
this.AddAccelerator (accel_signal, accel_group, (uint) accel_key.Key, accel_key.AccelMods, accel_key.AccelFlags);
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_widget_set_state (IntPtr raw, int state);
[DllImport("gtksharpglue")]
static extern int gtksharp_gtk_widget_get_state (IntPtr raw);
public Gtk.StateType State {
set {
gtk_widget_set_state (Handle, (int) value);
}
get {
return (Gtk.StateType) gtksharp_gtk_widget_get_state (Handle);
}
}