mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2004-02-18 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide EventExpose. make Region opaque. * gdk/EventExpose.cs : glue-based manual implementation. * gdk/EventExpose.custom : kill * gdk/gdk-api.xml : regen * gdk/gdk-symbols.xml : manual mapping for EventExpose. * glue/event.cs : expose Expose struct fields. * sample/Scribble.cs : fix some EventExpose api breakage svn path=/trunk/gtk-sharp/; revision=23226
This commit is contained in:
parent
c0db7bdbcb
commit
ff95b08c65
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2004-02-18 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
|
* gdk/Gdk.metadata : hide EventExpose. make Region opaque.
|
||||||
|
* gdk/EventExpose.cs : glue-based manual implementation.
|
||||||
|
* gdk/EventExpose.custom : kill
|
||||||
|
* gdk/gdk-api.xml : regen
|
||||||
|
* gdk/gdk-symbols.xml : manual mapping for EventExpose.
|
||||||
|
* glue/event.cs : expose Expose struct fields.
|
||||||
|
* sample/Scribble.cs : fix some EventExpose api breakage
|
||||||
|
|
||||||
2004-02-18 Mike Kestner <mkestner@ximian.com>
|
2004-02-18 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
* gdk/Gdk.metadata : hide EventMotion
|
* gdk/Gdk.metadata : hide EventMotion
|
||||||
|
44
gdk/EventExpose.cs
Normal file
44
gdk/EventExpose.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
// Gdk.EventExpose.cs - Custom expose event wrapper
|
||||||
|
//
|
||||||
|
// Author: Mike Kestner <mkestner@ximian.com>
|
||||||
|
//
|
||||||
|
// (c) 2004 Novell, Inc.
|
||||||
|
|
||||||
|
namespace Gdk {
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
public class EventExpose : Event {
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern Rectangle gtksharp_gdk_event_expose_get_area (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern IntPtr gtksharp_gdk_event_expose_get_region (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern int gtksharp_gdk_event_expose_get_count (IntPtr evt);
|
||||||
|
|
||||||
|
public EventExpose (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
|
public Rectangle Area {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_expose_get_area (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Count {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_expose_get_count (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Region Region {
|
||||||
|
get {
|
||||||
|
return new Region (gtksharp_gdk_event_expose_get_region (Handle));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
//
|
|
||||||
// gdk/EventExpose.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,10 +65,12 @@
|
|||||||
<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='GdkEventExpose']" 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>
|
||||||
<attr path="//struct[@cname='GdkPixmapObject']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkPixmapObject']" name="hidden">1</attr>
|
||||||
|
<attr path="//struct[@cname='GdkRegion']" name="opaque">1</attr>
|
||||||
<attr path="//struct[@cname='GdkTimeCoord']/field[@cname='axes']" name="array_len">128</attr>
|
<attr path="//struct[@cname='GdkTimeCoord']/field[@cname='axes']" name="array_len">128</attr>
|
||||||
<attr path="//struct[@cname='GdkWindowObject']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkWindowObject']" name="hidden">1</attr>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
@ -2325,7 +2325,7 @@
|
|||||||
<field cname="x_root" type="gshort" />
|
<field cname="x_root" type="gshort" />
|
||||||
<field cname="y_root" type="gshort" />
|
<field cname="y_root" type="gshort" />
|
||||||
</struct>
|
</struct>
|
||||||
<struct name="EventExpose" cname="GdkEventExpose">
|
<struct name="EventExpose" cname="GdkEventExpose" 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" />
|
||||||
@ -2536,7 +2536,7 @@
|
|||||||
</parameters>
|
</parameters>
|
||||||
</method>
|
</method>
|
||||||
</boxed>
|
</boxed>
|
||||||
<struct name="Region" cname="GdkRegion">
|
<struct name="Region" cname="GdkRegion" opaque="1">
|
||||||
<field cname="size" type="long" />
|
<field cname="size" type="long" />
|
||||||
<field cname="numRects" type="long" />
|
<field cname="numRects" type="long" />
|
||||||
<field cname="rects" type="GdkRegionBox*" />
|
<field cname="rects" type="GdkRegionBox*" />
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<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="GdkEventExpose" name="Gdk.EventExpose"/>
|
||||||
<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"/>
|
||||||
|
21
glue/event.c
21
glue/event.c
@ -45,6 +45,9 @@ gdouble gtksharp_gdk_event_motion_get_x_root (GdkEventMotion *event);
|
|||||||
gdouble gtksharp_gdk_event_motion_get_y_root (GdkEventMotion *event);
|
gdouble gtksharp_gdk_event_motion_get_y_root (GdkEventMotion *event);
|
||||||
gdouble* gtksharp_gdk_event_motion_get_axes (GdkEventMotion *event);
|
gdouble* gtksharp_gdk_event_motion_get_axes (GdkEventMotion *event);
|
||||||
GdkDevice* gtksharp_gdk_event_motion_get_device (GdkEventMotion *event);
|
GdkDevice* gtksharp_gdk_event_motion_get_device (GdkEventMotion *event);
|
||||||
|
GdkRectangle gtksharp_gdk_event_expose_get_area (GdkEventExpose *event);
|
||||||
|
gint gtksharp_gdk_event_expose_get_count (GdkEventExpose *event);
|
||||||
|
GdkRegion* gtksharp_gdk_event_expose_get_region (GdkEventExpose *event);
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
GdkEventType
|
GdkEventType
|
||||||
@ -251,3 +254,21 @@ gtksharp_gdk_event_motion_get_axes (GdkEventMotion *event)
|
|||||||
return event->axes;
|
return event->axes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GdkRectangle
|
||||||
|
gtksharp_gdk_event_expose_get_area (GdkEventExpose *event)
|
||||||
|
{
|
||||||
|
return event->area;
|
||||||
|
}
|
||||||
|
|
||||||
|
gint
|
||||||
|
gtksharp_gdk_event_expose_get_count (GdkEventExpose *event)
|
||||||
|
{
|
||||||
|
return event->count;
|
||||||
|
}
|
||||||
|
|
||||||
|
GdkRegion*
|
||||||
|
gtksharp_gdk_event_expose_get_region (GdkEventExpose *event)
|
||||||
|
{
|
||||||
|
return event->region;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -47,16 +47,12 @@ namespace GtkSamples {
|
|||||||
|
|
||||||
static void ExposeEvent (object obj, ExposeEventArgs args)
|
static void ExposeEvent (object obj, ExposeEventArgs args)
|
||||||
{
|
{
|
||||||
Gdk.EventExpose ev = args.Event;
|
Gdk.Rectangle area = args.Event.Area;
|
||||||
Gdk.Window window = ev.window;
|
args.Event.Window.DrawDrawable (darea.Style.BlackGC,
|
||||||
// FIXME: mcs bug
|
pixmap,
|
||||||
Gdk.Rectangle area = ev.Area;
|
area.X, area.Y,
|
||||||
// FIXME: array marshalling not done yet so no FG */
|
area.X, area.Y,
|
||||||
window.DrawDrawable (darea.Style.BlackGC,
|
area.Width, area.Height);
|
||||||
pixmap,
|
|
||||||
area.X, area.Y,
|
|
||||||
area.X, area.Y,
|
|
||||||
area.Width, area.Height);
|
|
||||||
|
|
||||||
args.RetVal = false;
|
args.RetVal = false;
|
||||||
}
|
}
|
||||||
@ -67,12 +63,10 @@ namespace GtkSamples {
|
|||||||
Gdk.Window window = ev.window;
|
Gdk.Window window = ev.window;
|
||||||
Gdk.Rectangle allocation = darea.Allocation;
|
Gdk.Rectangle allocation = darea.Allocation;
|
||||||
|
|
||||||
Console.WriteLine ("Darea=[{0}]" , darea);
|
|
||||||
pixmap = new Gdk.Pixmap (window,
|
pixmap = new Gdk.Pixmap (window,
|
||||||
allocation.Width,
|
allocation.Width,
|
||||||
allocation.Height,
|
allocation.Height,
|
||||||
-1);
|
-1);
|
||||||
Console.WriteLine ("Darea.Style={0}", darea.Style);
|
|
||||||
pixmap.DrawRectangle (darea.Style.WhiteGC, true, 0, 0,
|
pixmap.DrawRectangle (darea.Style.WhiteGC, true, 0, 0,
|
||||||
allocation.Width, allocation.Height);
|
allocation.Width, allocation.Height);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user