2002-08-03 22:24:37 +00:00
|
|
|
//
|
|
|
|
// 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)); }
|
|
|
|
}
|
|
|
|
|
2002-09-24 03:21:37 +00:00
|
|
|
|
|
|
|
[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){
|
2003-07-23 17:19:21 +00:00
|
|
|
Gdk.Window ret = (Gdk.Window) GLib.Object.GetObject(raw_ret, false);
|
2002-09-24 03:21:37 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
2003-01-30 02:56:49 +00:00
|
|
|
}
|
|
|
|
|
2004-01-28 04:08:29 +00:00
|
|
|
public void AddAccelerator (string accel_signal, AccelGroup accel_group, AccelKey accel_key)
|
|
|
|
{
|
2004-02-10 16:04:50 +00:00
|
|
|
this.AddAccelerator (accel_signal, accel_group, (uint) accel_key.Key, accel_key.AccelMods, accel_key.AccelFlags);
|
2004-01-28 04:08:29 +00:00
|
|
|
|
|
|
|
}
|
2004-02-14 17:28:11 +00:00
|
|
|
|
|
|
|
[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);
|
|
|
|
}
|
|
|
|
}
|