[Vala] vala + gtk+-3.0 ?
- From: san hoi <hoisan49 gmail com>
- To: vala-list gnome org
- Subject: [Vala] vala + gtk+-3.0 ?
- Date: Wed, 23 Mar 2011 20:20:35 +0900
vala : 0.10.7
os : fedora 15
I try to compile customwidget sample in gtk+-3.0. (
http://live.gnome.org/Vala/CustomWidgetSamples#Subclassing_Gtk.Widget
)
but it cannot work.
$ valac --pkg gtk+-3.0 widget.vala
widget.vala:26.5-26.37: error: ValaWidget.size_request: no suitable
method found to override
public override void size_request (out Gtk.Requisition requisition) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
widget.vala:61.22-61.36: error: The name `WindowClass' does not exist
in the context of `Gdk'
wclass = Gdk.WindowClass.INPUT_OUTPUT,
^^^^^^^^^^^^^^^
widget.vala:61.13-61.49: error: Invalid type for member `wclass'
wclass = Gdk.WindowClass.INPUT_OUTPUT,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
widget.vala:64.9-64.19: error: The name `window' does not exist in the
context of `ValaWidget'
this.window = new Gdk.Window (get_parent_window (), attrs, 0);
^^^^^^^^^^^
widget.vala:65.9-65.19: error: The name `window' does not exist in the
context of `ValaWidget'
this.window.move_resize (this.allocation.x, this.allocation.y,
^^^^^^^^^^^
widget.vala:70.9-70.19: error: The name `window' does not exist in the
context of `ValaWidget'
this.window.set_user_data (this);
^^^^^^^^^^^
widget.vala:74.41-74.51: error: The name `window' does not exist in
the context of `ValaWidget'
this.style = this.style.attach (this.window);
^^^^^^^^^^^
widget.vala:78.36-78.46: error: The name `window' does not exist in
the context of `ValaWidget'
this.style.set_background (this.window, Gtk.StateType.NORMAL);
^^^^^^^^^^^
widget.vala:81.9-81.17: error: The name `set_flags' does not exist in
the context of `ValaWidget.realize'
set_flags (WidgetFlags.REALIZED);
^^^^^^^^^
widget.vala:92.36-92.46: error: The name `window' does not exist in
the context of `ValaWidget'
var cr = Gdk.cairo_create (this.window);
^^^^^^^^^^^
widget.vala:95.55-95.64: error: The name `state' does not exist in the
context of `ValaWidget'
Gdk.cairo_set_source_color (cr, this.style.fg[this.state]);
^^^^^^^^^^
widget.vala:97.23-97.37: error: The name `allocation' does not exist
in the context of `ValaWidget'
this.allocation.width - 2 * BORDER_WIDTH,
^^^^^^^^^^^^^^^
widget.vala:98.23-98.37: error: The name `allocation' does not exist
in the context of `ValaWidget'
this.allocation.height - 2 * BORDER_WIDTH);
^^^^^^^^^^^^^^^
widget.vala:106.22-106.36: error: The name `allocation' does not exist
in the context of `ValaWidget'
cr.move_to ((this.allocation.width - fontw) / 2,
^^^^^^^^^^^^^^^
widget.vala:107.22-107.36: error: The name `allocation' does not exist
in the context of `ValaWidget'
(this.allocation.height - fonth) / 2);
^^^^^^^^^^^^^^^
widget.vala:90.5-90.37: error: ValaWidget.expose_event: no suitable
method found to override
public override bool expose_event (Gdk.EventExpose event) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 16 error(s), 0 warning(s)
Is there vala's tutorial page for gtk+-3.0? And is this bug in
gtk+-3.0.vapi binding?
Thank you in advance for any help.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]