mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-25 01:25:39 +00:00
67e0164e7d
* gtk/Window.cs : override Raw prop and take a ref, since gtk+ owns the ref to new Windows, and we need a ref. [Fixes #47721] svn path=/trunk/gtk-sharp/; revision=19151
75 lines
1.4 KiB
Plaintext
Executable file
75 lines
1.4 KiB
Plaintext
Executable file
// Gtk.Window.custom - Gtk Window class customizations
|
|
//
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
//
|
|
// (c) 2001 Mike Kestner
|
|
//
|
|
// This code is inserted after the automatically generated code.
|
|
|
|
|
|
[DllImport("libgobject-2.0-0.dll")]
|
|
private static extern void g_object_ref (IntPtr raw);
|
|
|
|
protected override IntPtr Raw {
|
|
get {
|
|
return base.Raw;
|
|
}
|
|
set {
|
|
base.Raw = value;
|
|
g_object_ref (value);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Window Constructor
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Constructs a new Window of type TopLevel with the
|
|
/// specified Title.
|
|
/// </remarks>
|
|
|
|
public Window (String title) : this (WindowType.Toplevel)
|
|
{
|
|
this.Title = title;
|
|
}
|
|
|
|
/// <summary>
|
|
/// DefaultSize Property
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// The default Size of the Window in Screen Coordinates.
|
|
/// </remarks>
|
|
|
|
public System.Drawing.Size DefaultSize {
|
|
get {
|
|
return new System.Drawing.Size (
|
|
DefaultWidth, DefaultHeight);
|
|
}
|
|
set {
|
|
DefaultWidth = value.Width;
|
|
DefaultHeight = value.Height;
|
|
}
|
|
}
|
|
|
|
public System.Drawing.Size Position {
|
|
get {
|
|
int x, y;
|
|
GetPosition (out x, out y);
|
|
|
|
return new System.Drawing.Size (
|
|
x, y);
|
|
}
|
|
}
|
|
|
|
public System.Drawing.Size Size {
|
|
get {
|
|
int x, y;
|
|
GetSize (out x, out y);
|
|
|
|
return new System.Drawing.Size (
|
|
x, y);
|
|
}
|
|
}
|