Ryujinx-GtkSharp/gtk/Widget.custom
John Luke 0dac8ebd48 2004-01-27 John Luke <jluke@cfl.rr.com>
* gtk/AccelKey.custom: add convenience ctor
    * gtk/Gtk.metadata: revert previous Widget.AddAccelerator change,
    fix AccelKey fields
    * gtk/Widget.custom: add overload for AddAccelerator
    * gtk/gtk-api.xml: regen

svn path=/trunk/gtk-sharp/; revision=22560
2004-01-28 04:08:29 +00:00

52 lines
1.2 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 System.Drawing.Size RequestSize {
get {
int x, y;
GetSizeRequest (out x, out y);
return new System.Drawing.Size (x, y);
}
set {
int x = value.Width;
int y = value.Height;
SetSizeRequest (x, y);
}
}
public void AddAccelerator (string accel_signal, AccelGroup accel_group, AccelKey accel_key)
{
this.AddAccelerator (accel_signal, accel_group, (uint) accel_key.Key, accel_key.accel_mods, accel_key.accel_flags);
}