Re: [Vala] Call cairo_destroy() function explicilty
- From: Jonathan Ryan <jjr49 drexel edu>
- To: vala-list gnome org
- Subject: Re: [Vala] Call cairo_destroy() function explicilty
- Date: Wed, 29 Sep 2010 17:47:23 -0400
Use a pointer instead, then delete the pointer.
Context* context = ...;
<do stuff>
delete context;
Jonathan Ryan
On 09/29/2010 04:58 PM, Erick Pérez wrote:
Hi:
I was experimenting with cairo and i need to call cairo_destroy
function explicitly. cairo_destroy its tagged with unref_function in
cairo.vapi but i dunno how to call it explicitly.
The reason is: "when using Clutter.CairoTexture you need to call
cairo_destroy on the cairo_context to actually draw on the texture."
So in vala i need to find a way to call that function.
cairo.vapi
----
[CCode (cheader_filename = "cairo.h", gir_namespace = "cairo",
gir_version = "1.0")]
namespace Cairo {
[Compact]
[CCode (ref_function = "cairo_reference", unref_function =
"cairo_destroy", cname = "cairo_t", cprefix = "cairo_",
cheader_filename = "cairo.h")]
public class Context {
[CCode (cname = "cairo_create")]
...
----
Thxs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]