From 1c2c8a35a16e9802e55ae6360d4bea28e1b84cd5 Mon Sep 17 00:00:00 2001 From: Raffaele Sandrini Date: Sun, 25 Mar 2007 09:28:15 +0000 Subject: [PATCH] add vte bindings add cheader_filename to class declarations; support pid_t 2007-03-25 Raffaele Sandrini * packages/vte/vte.files, packages/vte/vte.deps, packages/vte/vte.namespace, packages/vte/vte.excludes, packages/vte/vte.patch, packages/vte/vte.gidl, packages/vte/vte.metadata: add vte bindings * vapigen/valagidlparser.vala: add cheader_filename to class declarations; support pid_t type; support vte svn path=/trunk/; revision=267 --- vapigen/ChangeLog | 9 + vapigen/packages/vte/vte.deps | 5 + vapigen/packages/vte/vte.excludes | 7 + vapigen/packages/vte/vte.files | 1 + vapigen/packages/vte/vte.gidl | 833 ++++++++++++++++++++++++++++++++++++ vapigen/packages/vte/vte.metadata | 3 + vapigen/packages/vte/vte.namespace | 1 + vapigen/packages/vte/vte.patch | 34 ++ vapigen/vapigen/valagidlparser.vala | 18 +- 9 files changed, 910 insertions(+), 1 deletion(-) create mode 100644 vapigen/packages/vte/vte.deps create mode 100644 vapigen/packages/vte/vte.excludes create mode 100644 vapigen/packages/vte/vte.files create mode 100644 vapigen/packages/vte/vte.gidl create mode 100644 vapigen/packages/vte/vte.metadata create mode 100644 vapigen/packages/vte/vte.namespace create mode 100644 vapigen/packages/vte/vte.patch diff --git a/vapigen/ChangeLog b/vapigen/ChangeLog index 2599369..7b12b4c 100644 --- a/vapigen/ChangeLog +++ b/vapigen/ChangeLog @@ -1,3 +1,12 @@ +2007-03-25 Raffaele Sandrini + + * packages/vte/vte.files, packages/vte/vte.deps, + packages/vte/vte.namespace, packages/vte/vte.excludes, + packages/vte/vte.patch, packages/vte/vte.gidl, + packages/vte/vte.metadata: add vte bindings + * vapigen/valagidlparser.vala: add cheader_filename to class + declarations; support pid_t type; support vte + 2007-03-21 Raffaele Sandrini * packages/pango/pango.excludes: remove pangocairo.h diff --git a/vapigen/packages/vte/vte.deps b/vapigen/packages/vte/vte.deps new file mode 100644 index 0000000..0dec08a --- /dev/null +++ b/vapigen/packages/vte/vte.deps @@ -0,0 +1,5 @@ +gtk+-2.0 +gdk-2.0 +pango +atk +cairo diff --git a/vapigen/packages/vte/vte.excludes b/vapigen/packages/vte/vte.excludes new file mode 100644 index 0000000..78330c6 --- /dev/null +++ b/vapigen/packages/vte/vte.excludes @@ -0,0 +1,7 @@ +vtebg.* +debug.* +vteglyph.* +ring.* +vtetree.* +vteconv.* +vteseq.* diff --git a/vapigen/packages/vte/vte.files b/vapigen/packages/vte/vte.files new file mode 100644 index 0000000..85de9cf --- /dev/null +++ b/vapigen/packages/vte/vte.files @@ -0,0 +1 @@ +src diff --git a/vapigen/packages/vte/vte.gidl b/vapigen/packages/vte/vte.gidl new file mode 100644 index 0000000..5b80fd9 --- /dev/null +++ b/vapigen/packages/vte/vte.gidl @@ -0,0 +1,833 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vapigen/packages/vte/vte.metadata b/vapigen/packages/vte/vte.metadata new file mode 100644 index 0000000..d52977b --- /dev/null +++ b/vapigen/packages/vte/vte.metadata @@ -0,0 +1,3 @@ +Vte cheader_filename="vte/vte.h" +VteReaper cheader_filename="vte/reaper.h" +VteTerminalAccessible cheader_filename="vte/vteaccess.h" diff --git a/vapigen/packages/vte/vte.namespace b/vapigen/packages/vte/vte.namespace new file mode 100644 index 0000000..117423b --- /dev/null +++ b/vapigen/packages/vte/vte.namespace @@ -0,0 +1 @@ +Vte diff --git a/vapigen/packages/vte/vte.patch b/vapigen/packages/vte/vte.patch new file mode 100644 index 0000000..22fb0fe --- /dev/null +++ b/vapigen/packages/vte/vte.patch @@ -0,0 +1,34 @@ +--- vte-0.15.3/src/vte.h.orig 2007-02-17 19:38:45.000000000 +0100 ++++ vte-0.15.3/src/vte.h 2007-02-18 09:23:05.000000000 +0100 +@@ -330,27 +330,19 @@ + * VteCharAttributes structure in the passed GArray, if the array was not NULL. + * Note that it will have one entry per byte, not per character, so indexes + * should match up exactly. */ ++typedef gboolean (*VteIsSelectedFunc) (VteTerminal *terminal, glong column, glong row, gpointer data); + char *vte_terminal_get_text(VteTerminal *terminal, +- gboolean(*is_selected)(VteTerminal *terminal, +- glong column, +- glong row, +- gpointer data), ++ VteIsSelectedFunc is_selected, + gpointer data, + GArray *attributes); + char *vte_terminal_get_text_include_trailing_spaces(VteTerminal *terminal, +- gboolean(*is_selected)(VteTerminal *terminal, +- glong column, +- glong row, +- gpointer data), ++ VteIsSelectedFunc is_selected, + gpointer data, + GArray *attributes); + char *vte_terminal_get_text_range(VteTerminal *terminal, + glong start_row, glong start_col, + glong end_row, glong end_col, +- gboolean(*is_selected)(VteTerminal *terminal, +- glong column, +- glong row, +- gpointer data), ++ VteIsSelectedFunc is_selected, + gpointer data, + GArray *attributes); + void vte_terminal_get_cursor_position(VteTerminal *terminal, diff --git a/vapigen/vapigen/valagidlparser.vala b/vapigen/vapigen/valagidlparser.vala index d4e7fbe..a9e8b85 100644 --- a/vapigen/vapigen/valagidlparser.vala +++ b/vapigen/vapigen/valagidlparser.vala @@ -1,6 +1,6 @@ /* valagidlparser.vala * - * Copyright (C) 2006 Jürg Billeter + * Copyright (C) 2006-2007 Jürg Billeter, Raffaele Sandrini * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,6 +18,7 @@ * * Author: * Jürg Billeter + * Raffaele Sandrini */ using GLib; @@ -304,6 +305,16 @@ public class Vala.GIdlParser : CodeVisitor { var cl = new Class (node.gtype_name, current_source_reference); cl.access = MemberAccessibility.PUBLIC; + var attributes = get_attributes (cl.name); + if (attributes != null) { + foreach (string attr in attributes) { + var nv = attr.split ("=", 2); + if (nv[0] == "cheader_filename") { + cl.add_cheader_filename (eval (nv[1])); + } + } + } + if (node.parent != null) { var parent = new TypeReference (); parse_type_string (parent, node.parent); @@ -514,6 +525,8 @@ public class Vala.GIdlParser : CodeVisitor { type.type_name = "ValueArray"; } else if (n == "time_t") { type.type_name = "ulong"; + } else if (n == "pid_t") { + type.type_name = "int"; } else if (n == "FILE") { type.namespace_name = "GLib"; type.type_name = "File"; @@ -591,6 +604,9 @@ public class Vala.GIdlParser : CodeVisitor { type.namespace_name = null; type.type_name = "int"; } + } else if (n.has_prefix ("Vte")) { + type.namespace_name = "Vte"; + type.type_name = n.offset ("Vte".len ()); } else if (n.has_prefix ("G")) { type.namespace_name = "GLib"; type.type_name = n.offset ("G".len ()); -- 2.7.4