mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 13:35:28 +00:00
4d694b215f
'RequestSize' instead of 'SizeRequest' to avoid a name clash. * api/gtk-api.xml: * sources/Gtk.metadata: out param for gtk_widget_get_size_request. svn path=/trunk/gtk-sharp/; revision=11046
48 lines
1,019 B
Plaintext
48 lines
1,019 B
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);
|
|
ret.Ref ();
|
|
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);
|
|
}
|
|
}
|
|
|