Re: [Vala] Purple.CoreUiOps
- From: Joseph Montanez <jmontanez gorilla3d com>
- To: Luca Bruno <lethalman88 gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Purple.CoreUiOps
- Date: Fri, 17 Feb 2012 09:08:09 -0800
I tried that one too:
Purple.CoreUiOps ui_ops = {
null, null, null, null, null
};
error: initializer list used for `Purple.CoreUiOps?', which is neither
array nor struct
Purple.CoreUiOps ui_ops = {
And this one:
var ui_ops = Purple.CoreUiOps() {
debug_ui_init = null,
get_ui_info = null,
quit = null,
ui_init = null,
ui_prefs_init = null
};
error: syntax error, use `new' to create new objects
I took a look at the libpurple headers and it is a struct:
typedef struct
{
void (*ui_prefs_init)(void);
void (*debug_ui_init)(void);
void (*ui_init)(void);
void (*quit)(void);
GHashTable* (*get_ui_info)(void);
void (*_purple_reserved1)(void);
void (*_purple_reserved2)(void);
void (*_purple_reserved3)(void);
} PurpleCoreUiOps;
Maybe the libpurple vapi that is bundled with vala is wrong?
On Fri, Feb 17, 2012 at 7:16 AM, Luca Bruno <lethalman88 gmail com> wrote:
On Fri, Feb 17, 2012 at 3:38 PM, Joseph Montanez <jmontanez gorilla3d com>
wrote:
My brain is melting trying to figure out how to get Purple.CoreUiOps
to initialize.
Here is the vapi:
[CCode (cheader_filename = "purple.h")]
[Compact]
public class CoreUiOps {
[CCode (has_construct_function = false)]
public weak GLib.Callback debug_ui_init;
public weak GLib.Callback get_ui_info;
public weak GLib.Callback quit;
public weak GLib.Callback ui_init;
public weak GLib.Callback ui_prefs_init;
}
Try with a struct.
--
www.debian.org - The Universal Operating System
--
Joseph Montanez
Web Developer
Gorilla3D
Design, Develop, Deploy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]