mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-22 12:50:59 +00:00
2004-02-18 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide EventFocus and EventConfigure. * gdk/EventConfigure.cs : glue-based manual implementation. * gdk/EventConfigure.custom : kill * gdk/EventFocus.cs : glue-based manual implementation. * gdk/EventFocus.custom : kill * gdk/gdk-api.xml : regen * gdk/gdk-symbols.xml : manual mappings. * glue/event.cs : expose Focus and Configure struct fields. * sample/Scribble.cs : fix EventConfigure api breakage svn path=/trunk/gtk-sharp/; revision=23239
This commit is contained in:
parent
b2bbe4483b
commit
5ab5d3beaf
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2004-02-18 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
|
* gdk/Gdk.metadata : hide EventFocus and EventConfigure.
|
||||||
|
* gdk/EventConfigure.cs : glue-based manual implementation.
|
||||||
|
* gdk/EventConfigure.custom : kill
|
||||||
|
* gdk/EventFocus.cs : glue-based manual implementation.
|
||||||
|
* gdk/EventFocus.custom : kill
|
||||||
|
* gdk/gdk-api.xml : regen
|
||||||
|
* gdk/gdk-symbols.xml : manual mappings.
|
||||||
|
* glue/event.cs : expose Focus and Configure struct fields.
|
||||||
|
* sample/Scribble.cs : fix EventConfigure api breakage
|
||||||
|
|
||||||
2004-02-18 Mike Kestner <mkestner@ximian.com>
|
2004-02-18 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
* gdk/Gdk.metadata : hide EventCrossing.
|
* gdk/Gdk.metadata : hide EventCrossing.
|
||||||
|
|
53
gdk/EventConfigure.cs
Normal file
53
gdk/EventConfigure.cs
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
// Gdk.EventConfigure.cs - Custom configure event wrapper
|
||||||
|
//
|
||||||
|
// Author: Mike Kestner <mkestner@ximian.com>
|
||||||
|
//
|
||||||
|
// (c) 2004 Novell, Inc.
|
||||||
|
|
||||||
|
namespace Gdk {
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
public class EventConfigure : Event {
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern int gtksharp_gdk_event_configure_get_x (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern int gtksharp_gdk_event_configure_get_y (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern int gtksharp_gdk_event_configure_get_width (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern int gtksharp_gdk_event_configure_get_height (IntPtr evt);
|
||||||
|
|
||||||
|
public EventConfigure (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
|
public int X {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_configure_get_x (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Y {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_configure_get_y (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Width {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_configure_get_width (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Height {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_configure_get_height (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
//
|
|
||||||
// gdk/EventConfigure.custom
|
|
||||||
//
|
|
||||||
// Author: Gustavo Giraldez <gustavo.giraldez@gmx.net>
|
|
||||||
//
|
|
||||||
// Copyright (C) 2004 Gustavo Giraldez.
|
|
||||||
//
|
|
||||||
|
|
||||||
[DllImport("libgdk-win32-2.0-0.dll")]
|
|
||||||
static extern IntPtr gdk_event_get_type();
|
|
||||||
|
|
||||||
public static GLib.GType GType {
|
|
||||||
get {
|
|
||||||
IntPtr raw_ret = gdk_event_get_type();
|
|
||||||
GLib.GType ret = new GLib.GType(raw_ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
26
gdk/EventFocus.cs
Normal file
26
gdk/EventFocus.cs
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
// Gdk.EventFocus.cs - Custom focus event wrapper
|
||||||
|
//
|
||||||
|
// Author: Mike Kestner <mkestner@ximian.com>
|
||||||
|
//
|
||||||
|
// (c) 2004 Novell, Inc.
|
||||||
|
|
||||||
|
namespace Gdk {
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
public class EventFocus : Event {
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern short gtksharp_gdk_event_focus_get_in (IntPtr evt);
|
||||||
|
|
||||||
|
public EventFocus (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
|
public bool In {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_focus_get_in (Handle) == 0 ? false : true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
//
|
|
||||||
// gdk/EventFocus.custom
|
|
||||||
//
|
|
||||||
// Author: Gustavo Giraldez <gustavo.giraldez@gmx.net>
|
|
||||||
//
|
|
||||||
// Copyright (C) 2004 Gustavo Giraldez.
|
|
||||||
//
|
|
||||||
|
|
||||||
[DllImport("libgdk-win32-2.0-0.dll")]
|
|
||||||
static extern IntPtr gdk_event_get_type();
|
|
||||||
|
|
||||||
public static GLib.GType GType {
|
|
||||||
get {
|
|
||||||
IntPtr raw_ret = gdk_event_get_type();
|
|
||||||
GLib.GType ret = new GLib.GType(raw_ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -65,8 +65,10 @@
|
||||||
<attr path="//object[@cname='GdkWindow']/method[@name='SetIconList']" name="hidden">1</attr>
|
<attr path="//object[@cname='GdkWindow']/method[@name='SetIconList']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkEventAny']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventAny']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkEventButton']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventButton']" name="hidden">1</attr>
|
||||||
|
<attr path="//struct[@cname='GdkEventConfigure']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkEventCrossing']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventCrossing']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkEventExpose']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventExpose']" name="hidden">1</attr>
|
||||||
|
<attr path="//struct[@cname='GdkEventFocus']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkEventKey']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventKey']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkEventMotion']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventMotion']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkEventScroll']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventScroll']" name="hidden">1</attr>
|
||||||
|
|
|
@ -2292,7 +2292,7 @@
|
||||||
<field cname="data_format" type="gushort" />
|
<field cname="data_format" type="gushort" />
|
||||||
<field cname="b" array_len="20" type="char" />
|
<field cname="b" array_len="20" type="char" />
|
||||||
</struct>
|
</struct>
|
||||||
<struct name="EventConfigure" cname="GdkEventConfigure">
|
<struct name="EventConfigure" cname="GdkEventConfigure" hidden="1">
|
||||||
<field cname="type" type="GdkEventType" />
|
<field cname="type" type="GdkEventType" />
|
||||||
<field cname="window" type="GdkWindow*" />
|
<field cname="window" type="GdkWindow*" />
|
||||||
<field cname="send_event" type="gint8" />
|
<field cname="send_event" type="gint8" />
|
||||||
|
@ -2333,7 +2333,7 @@
|
||||||
<field cname="region" type="GdkRegion*" />
|
<field cname="region" type="GdkRegion*" />
|
||||||
<field cname="count" type="gint" />
|
<field cname="count" type="gint" />
|
||||||
</struct>
|
</struct>
|
||||||
<struct name="EventFocus" cname="GdkEventFocus">
|
<struct name="EventFocus" cname="GdkEventFocus" hidden="1">
|
||||||
<field cname="type" type="GdkEventType" />
|
<field cname="type" type="GdkEventType" />
|
||||||
<field cname="window" type="GdkWindow*" />
|
<field cname="window" type="GdkWindow*" />
|
||||||
<field cname="send_event" type="gint8" />
|
<field cname="send_event" type="gint8" />
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
<symbol type="manual" cname="GdkEvent" name="Gdk.Event"/>
|
<symbol type="manual" cname="GdkEvent" name="Gdk.Event"/>
|
||||||
<symbol type="manual" cname="GdkEventAny" name="Gdk.Event"/>
|
<symbol type="manual" cname="GdkEventAny" name="Gdk.Event"/>
|
||||||
<symbol type="manual" cname="GdkEventButton" name="Gdk.EventButton"/>
|
<symbol type="manual" cname="GdkEventButton" name="Gdk.EventButton"/>
|
||||||
|
<symbol type="manual" cname="GdkEventConfigure" name="Gdk.EventConfigure"/>
|
||||||
<symbol type="manual" cname="GdkEventCrossing" name="Gdk.EventCrossing"/>
|
<symbol type="manual" cname="GdkEventCrossing" name="Gdk.EventCrossing"/>
|
||||||
<symbol type="manual" cname="GdkEventExpose" name="Gdk.EventExpose"/>
|
<symbol type="manual" cname="GdkEventExpose" name="Gdk.EventExpose"/>
|
||||||
|
<symbol type="manual" cname="GdkEventFocus" name="Gdk.EventFocus"/>
|
||||||
<symbol type="manual" cname="GdkEventKey" name="Gdk.EventKey"/>
|
<symbol type="manual" cname="GdkEventKey" name="Gdk.EventKey"/>
|
||||||
<symbol type="manual" cname="GdkEventMotion" name="Gdk.EventMotion"/>
|
<symbol type="manual" cname="GdkEventMotion" name="Gdk.EventMotion"/>
|
||||||
<symbol type="manual" cname="GdkEventScroll" name="Gdk.EventScroll"/>
|
<symbol type="manual" cname="GdkEventScroll" name="Gdk.EventScroll"/>
|
||||||
|
|
35
glue/event.c
35
glue/event.c
|
@ -59,6 +59,11 @@ gdouble gtksharp_gdk_event_crossing_get_y_root (GdkEventCrossing *event);
|
||||||
GdkNotifyType gtksharp_gdk_event_crossing_get_detail (GdkEventCrossing *event);
|
GdkNotifyType gtksharp_gdk_event_crossing_get_detail (GdkEventCrossing *event);
|
||||||
GdkCrossingMode gtksharp_gdk_event_crossing_get_mode (GdkEventCrossing *event);
|
GdkCrossingMode gtksharp_gdk_event_crossing_get_mode (GdkEventCrossing *event);
|
||||||
GdkWindow* gtksharp_gdk_event_crossing_get_subwindow (GdkEventCrossing *event);
|
GdkWindow* gtksharp_gdk_event_crossing_get_subwindow (GdkEventCrossing *event);
|
||||||
|
gint16 gtksharp_gdk_event_focus_get_in (GdkEventFocus *event);
|
||||||
|
gint gtksharp_gdk_event_configure_get_x (GdkEventConfigure *event);
|
||||||
|
gint gtksharp_gdk_event_configure_get_y (GdkEventConfigure *event);
|
||||||
|
gint gtksharp_gdk_event_configure_get_width (GdkEventConfigure *event);
|
||||||
|
gint gtksharp_gdk_event_configure_get_height (GdkEventConfigure *event);
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
GdkEventType
|
GdkEventType
|
||||||
|
@ -349,3 +354,33 @@ gtksharp_gdk_event_crossing_get_detail (GdkEventCrossing *event)
|
||||||
return event->detail;
|
return event->detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gint16
|
||||||
|
gtksharp_gdk_event_focus_get_in (GdkEventFocus *event)
|
||||||
|
{
|
||||||
|
return event->in;
|
||||||
|
}
|
||||||
|
|
||||||
|
gint
|
||||||
|
gtksharp_gdk_event_configure_get_x (GdkEventConfigure *event)
|
||||||
|
{
|
||||||
|
return event->x;
|
||||||
|
}
|
||||||
|
|
||||||
|
gint
|
||||||
|
gtksharp_gdk_event_configure_get_y (GdkEventConfigure *event)
|
||||||
|
{
|
||||||
|
return event->y;
|
||||||
|
}
|
||||||
|
|
||||||
|
gint
|
||||||
|
gtksharp_gdk_event_configure_get_width (GdkEventConfigure *event)
|
||||||
|
{
|
||||||
|
return event->width;
|
||||||
|
}
|
||||||
|
|
||||||
|
gint
|
||||||
|
gtksharp_gdk_event_configure_get_height (GdkEventConfigure *event)
|
||||||
|
{
|
||||||
|
return event->height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,15 +60,12 @@ namespace GtkSamples {
|
||||||
static void ConfigureEvent (object obj, ConfigureEventArgs args)
|
static void ConfigureEvent (object obj, ConfigureEventArgs args)
|
||||||
{
|
{
|
||||||
Gdk.EventConfigure ev = args.Event;
|
Gdk.EventConfigure ev = args.Event;
|
||||||
Gdk.Window window = ev.window;
|
Gdk.Window window = ev.Window;
|
||||||
Gdk.Rectangle allocation = darea.Allocation;
|
Gdk.Rectangle allocation = darea.Allocation;
|
||||||
|
|
||||||
pixmap = new Gdk.Pixmap (window,
|
pixmap = new Gdk.Pixmap (window, allocation.Width, allocation.Height, -1);
|
||||||
allocation.Width,
|
|
||||||
allocation.Height,
|
|
||||||
-1);
|
|
||||||
pixmap.DrawRectangle (darea.Style.WhiteGC, true, 0, 0,
|
pixmap.DrawRectangle (darea.Style.WhiteGC, true, 0, 0,
|
||||||
allocation.Width, allocation.Height);
|
allocation.Width, allocation.Height);
|
||||||
|
|
||||||
args.RetVal = true;
|
args.RetVal = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue