vala r1886 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1886 - in trunk: . gobject
- Date: Fri, 24 Oct 2008 12:19:30 +0000 (UTC)
Author: juergbi
Date: Fri Oct 24 12:19:30 2008
New Revision: 1886
URL: http://svn.gnome.org/viewvc/vala?rev=1886&view=rev
Log:
2008-10-24 JÃrg Billeter <j bitron ch>
* gobject/Makefile.am:
* gobject/valaccodeclassbinding.vala:
* gobject/valaccodegenerator.vala:
* gobject/valaccodeinterfacebinding.vala:
* gobject/valaccodemodule.vala:
* gobject/valaccodeobjecttypesymbolbinding.vala:
* gobject/valagobjectmodule.vala:
Add GObjectModule
Added:
trunk/gobject/valagobjectmodule.vala (contents, props changed)
- copied, changed from r1880, /trunk/gobject/valaccodetypesymbolbinding.vala
Removed:
trunk/gobject/valaccodetypesymbolbinding.vala
Modified:
trunk/ChangeLog
trunk/gobject/Makefile.am
trunk/gobject/valaccodeclassbinding.vala
trunk/gobject/valaccodegenerator.vala
trunk/gobject/valaccodeinterfacebinding.vala
trunk/gobject/valaccodemodule.vala
trunk/gobject/valaccodeobjecttypesymbolbinding.vala
Modified: trunk/gobject/Makefile.am
==============================================================================
--- trunk/gobject/Makefile.am (original)
+++ trunk/gobject/Makefile.am Fri Oct 24 12:19:30 2008
@@ -32,10 +32,10 @@
valaccodemethodmodule.vala \
valaccodemodule.vala \
valaccodeobjecttypesymbolbinding.vala \
- valaccodetypesymbolbinding.vala \
valaclassregisterfunction.vala \
valadbusmodule.vala \
valagirwriter.vala \
+ valagobjectmodule.vala \
valainterfaceregisterfunction.vala \
valatyperegisterfunction.vala \
$(NULL)
Modified: trunk/gobject/valaccodeclassbinding.vala
==============================================================================
--- trunk/gobject/valaccodeclassbinding.vala (original)
+++ trunk/gobject/valaccodeclassbinding.vala Fri Oct 24 12:19:30 2008
@@ -868,7 +868,7 @@
var cinst = new CCodeFunctionCall (new CCodeIdentifier ("g_object_class_install_property"));
cinst.add_argument (ccall);
cinst.add_argument (new CCodeConstant (prop.get_upper_case_cname ()));
- cinst.add_argument (get_param_spec (prop));
+ cinst.add_argument (head.get_param_spec (prop));
init_block.add_statement (new CCodeExpressionStatement (cinst));
}
@@ -876,7 +876,7 @@
/* create signals */
foreach (Signal sig in cl.get_signals ()) {
- init_block.add_statement (new CCodeExpressionStatement (get_signal_creation (sig, cl)));
+ init_block.add_statement (new CCodeExpressionStatement (head.get_signal_creation (sig, cl)));
}
} else if (!cl.is_compact) {
/* create type, dup_func, and destroy_func fields for generic types */
Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala (original)
+++ trunk/gobject/valaccodegenerator.vala Fri Oct 24 12:19:30 2008
@@ -143,6 +143,7 @@
public CCodeGenerator () {
head = new CCodeBaseModule (this, head);
head = new CCodeMethodModule (this, head);
+ head = new GObjectModule (this, head);
head = new DBusModule (this, head);
predefined_marshal_set = new HashSet<string> (str_hash, str_equal);
Modified: trunk/gobject/valaccodeinterfacebinding.vala
==============================================================================
--- trunk/gobject/valaccodeinterfacebinding.vala (original)
+++ trunk/gobject/valaccodeinterfacebinding.vala Fri Oct 24 12:19:30 2008
@@ -124,7 +124,7 @@
if (prop.is_abstract) {
var cinst = new CCodeFunctionCall (new CCodeIdentifier ("g_object_interface_install_property"));
cinst.add_argument (new CCodeIdentifier ("iface"));
- cinst.add_argument (get_param_spec (prop));
+ cinst.add_argument (head.get_param_spec (prop));
init_block.add_statement (new CCodeExpressionStatement (cinst));
}
@@ -133,7 +133,7 @@
/* create signals */
foreach (Signal sig in iface.get_signals ()) {
- init_block.add_statement (new CCodeExpressionStatement (get_signal_creation (sig, iface)));
+ init_block.add_statement (new CCodeExpressionStatement (head.get_signal_creation (sig, iface)));
}
// connect default implementations
Modified: trunk/gobject/valaccodemodule.vala
==============================================================================
--- trunk/gobject/valaccodemodule.vala (original)
+++ trunk/gobject/valaccodemodule.vala Fri Oct 24 12:19:30 2008
@@ -83,4 +83,12 @@
public virtual CCodeExpression get_construct_property_assignment (CCodeConstant canonical_cconstant, DataType property_type, CCodeExpression value) {
return next.get_construct_property_assignment (canonical_cconstant, property_type, value);
}
+
+ public virtual CCodeFunctionCall get_param_spec (Property prop) {
+ return next.get_param_spec (prop);
+ }
+
+ public virtual CCodeFunctionCall get_signal_creation (Signal sig, TypeSymbol type) {
+ return next.get_signal_creation (sig, type);
+ }
}
Modified: trunk/gobject/valaccodeobjecttypesymbolbinding.vala
==============================================================================
--- trunk/gobject/valaccodeobjecttypesymbolbinding.vala (original)
+++ trunk/gobject/valaccodeobjecttypesymbolbinding.vala Fri Oct 24 12:19:30 2008
@@ -22,7 +22,7 @@
using GLib;
-public abstract class Vala.CCodeObjectTypeSymbolBinding : Vala.CCodeTypeSymbolBinding {
+public abstract class Vala.CCodeObjectTypeSymbolBinding : Vala.CCodeBinding {
bool is_dbus_visible (CodeNode node) {
var dbus_attribute = node.get_attribute ("DBus");
Copied: trunk/gobject/valagobjectmodule.vala (from r1880, /trunk/gobject/valaccodetypesymbolbinding.vala)
==============================================================================
--- /trunk/gobject/valaccodetypesymbolbinding.vala (original)
+++ trunk/gobject/valagobjectmodule.vala Fri Oct 24 12:19:30 2008
@@ -1,4 +1,4 @@
-/* valaccodetypesymbolbinding.vala
+/* valagobjectmodule.vala
*
* Copyright (C) 2008 JÃrg Billeter
*
@@ -23,8 +23,12 @@
using GLib;
-public abstract class Vala.CCodeTypeSymbolBinding : CCodeBinding {
- public CCodeFunctionCall get_param_spec (Property prop) {
+public class Vala.GObjectModule : CCodeModule {
+ public GObjectModule (CCodeGenerator codegen, CCodeModule? next) {
+ base (codegen, next);
+ }
+
+ public override CCodeFunctionCall get_param_spec (Property prop) {
var cspec = new CCodeFunctionCall ();
cspec.add_argument (prop.get_canonical_cconstant ());
cspec.add_argument (new CCodeConstant ("\"%s\"".printf (prop.nick)));
@@ -200,7 +204,7 @@
return cspec;
}
- public CCodeFunctionCall get_signal_creation (Signal sig, TypeSymbol type) {
+ public override CCodeFunctionCall get_signal_creation (Signal sig, TypeSymbol type) {
var csignew = new CCodeFunctionCall (new CCodeIdentifier ("g_signal_new"));
csignew.add_argument (new CCodeConstant ("\"%s\"".printf (sig.get_cname ())));
csignew.add_argument (new CCodeIdentifier (type.get_type_id ()));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]