[vala] gdk-3.0: Use only metadata for EventKey, Screen, Window, update Rectangle
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gdk-3.0: Use only metadata for EventKey, Screen, Window, update Rectangle
- Date: Sat, 8 Oct 2016 17:10:03 +0000 (UTC)
commit aa62c1ac81ee807804299d8ad2c9dab03b7bb42f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Oct 8 19:01:47 2016 +0200
gdk-3.0: Use only metadata for EventKey, Screen, Window, update Rectangle
vapi/gdk-3.0.vapi | 7 +++++--
vapi/metadata/Gdk-3.0-custom.vala | 17 -----------------
vapi/metadata/Gdk-3.0.metadata | 19 +++++++++++--------
3 files changed, 16 insertions(+), 27 deletions(-)
---
diff --git a/vapi/gdk-3.0.vapi b/vapi/gdk-3.0.vapi
index 9336779..52ec48b 100644
--- a/vapi/gdk-3.0.vapi
+++ b/vapi/gdk-3.0.vapi
@@ -5490,7 +5490,7 @@ namespace Gdk {
public Gdk.Rectangle workarea { get; }
public signal void invalidate ();
}
- [CCode (cheader_filename = "gdk/gdk.h")]
+ [CCode (cheader_filename = "gdk/gdk.h", type_id = "gdk_screen_get_type ()")]
public class Screen : GLib.Object {
[CCode (has_construct_function = false)]
protected Screen ();
@@ -5510,6 +5510,7 @@ namespace Gdk {
public int get_monitor_at_point (int x, int y);
[Version (since = "2.2")]
public int get_monitor_at_window (Gdk.Window window);
+ [Version (since = "2.2")]
public void get_monitor_geometry (int monitor_num, out Gdk.Rectangle dest);
[Version (since = "2.14")]
public int get_monitor_height_mm (int monitor_num);
@@ -5626,7 +5627,7 @@ namespace Gdk {
[Version (since = "2.22")]
public Gdk.VisualType get_visual_type ();
}
- [CCode (cheader_filename = "gdk/gdk.h")]
+ [CCode (cheader_filename = "gdk/gdk.h", type_id = "gdk_window_get_type ()")]
public class Window : GLib.Object {
[CCode (has_construct_function = false)]
public Window (Gdk.Window? parent, Gdk.WindowAttr attributes, Gdk.WindowAttributesType
attributes_mask);
@@ -5971,6 +5972,8 @@ namespace Gdk {
}
[CCode (cheader_filename = "gdk/gdk.h")]
public struct Rectangle : Cairo.RectangleInt {
+ [Version (since = "3.20")]
+ public bool equal (Gdk.Rectangle rect2);
public bool intersect (Gdk.Rectangle src2, out Gdk.Rectangle dest);
public void union (Gdk.Rectangle src2, out Gdk.Rectangle dest);
}
diff --git a/vapi/metadata/Gdk-3.0-custom.vala b/vapi/metadata/Gdk-3.0-custom.vala
index 72b650b..ca91b19 100644
--- a/vapi/metadata/Gdk-3.0-custom.vala
+++ b/vapi/metadata/Gdk-3.0-custom.vala
@@ -1,12 +1,4 @@
namespace Gdk {
- public class Screen : GLib.Object {
- public void get_monitor_geometry (int monitor_num, out Gdk.Rectangle dest);
- }
-
- public class Window : GLib.Object {
- public void get_frame_extents (out Gdk.Rectangle rect);
- }
-
[SimpleType]
public struct Atom : uint {
[CCode (cname = "GDK_NONE")]
@@ -42,17 +34,8 @@ namespace Gdk {
public Gdk.EventWindowState window_state { [CCode (cname = "(GdkEventWindowState *)")] get; }
}
- [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function =
"g_boxed_free", type_id = "gdk_event_get_type ()")]
- [Compact]
- public class EventKey : Event {
- [CCode (cname = "string")]
- public string str;
- }
-
[CCode (cheader_filename = "gdk/gdk.h")]
public struct Rectangle : Cairo.RectangleInt {
- public bool intersect (Gdk.Rectangle src2, out Gdk.Rectangle dest);
- public void union (Gdk.Rectangle src2, out Gdk.Rectangle dest);
}
[CCode (ref_function = "", unref_function = "")]
diff --git a/vapi/metadata/Gdk-3.0.metadata b/vapi/metadata/Gdk-3.0.metadata
index be4edca..ca9c9ea 100644
--- a/vapi/metadata/Gdk-3.0.metadata
+++ b/vapi/metadata/Gdk-3.0.metadata
@@ -14,14 +14,17 @@ Event
._get_angle skip
._get_center skip
._get_distance skip
-Window
+Window abstract=false
.add_filter skip=false
.create_similar_image_surface type="Cairo.ImageSurface"
.remove_filter skip=false
.moved_to_rect.*_rect type="Gdk.Rectangle"
WindowRedirect skip
-EventKey struct=false
- .string skip
+Rectangle struct
+ .x skip
+ .y skip
+ .width skip
+ .height skip
RGBA struct
ModifierType
.modifier_reserved_*_mask skip
@@ -41,12 +44,10 @@ Device
.associated_device nullable
.name nullable
-// https://bugzilla.gnome.org/show_bug.cgi?id=748833
-Rectangle skip
-
// vapigen actually generates the correctly, but in away that breaks BC
-Screen.get_monitor_geometry skip
-Window.get_frame_extents skip
+Rectangle.union return_void
+Screen.get_monitor_geometry return_void
+Window.get_frame_extents return_void
EventAny struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
EventButton struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
@@ -56,6 +57,8 @@ EventDND struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
EventExpose struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
EventFocus struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
EventGrabBroken struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventKey struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+ .string name="str" unowned=false
EventMotion struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
.axes array
EventOwnerChange struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]