[Vala] Export vapi from libray

2014-11-21 Thread Andy Lees
Hi,

I would like to export an interface to some C structures from a vala
library that provides a number of other classes, etc.  If I include the
vapi and associated .h file in the library, it compiles fine, but does not
export the contents of the referenced vapi in the library vapi.

How would one go about including the vapi contents in the library interface?

Thanks for your attention.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Testing out parameters

2014-11-21 Thread Andy Lees
Is there a way to test if an out parameter has been provided, assuming I
default it to null?  In the case I want to avoid an expensive calculation
if it's not required?

Thanks for your attention.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Testing out parameters

2014-11-21 Thread Luca Bruno
On 21/11/2014 14:38, Andy Lees wrote:
 Is there a way to test if an out parameter has been provided, assuming I
 default it to null?  In the case I want to avoid an expensive calculation
 if it's not required?
In the old days you could check if if (param == null), not sure if
still works.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Export vapi from libray

2014-11-21 Thread Andre Masella
If this is a shared library, it's not generally desirable to do so. What if
the user wants to use both your library and the library you have
re-exported? This will cause conflicts if there are any changes between the
two versions.

More likely, you want to declare dependencies. This is done using a `.deps`
file of the same name as your `.vapi` file. It lists the other packages on
which you depend. The Vala compiler will automatically import them as if
they were specified with the `--pkg` flag. There are plenty in
`/usr/share/vala-*/vapi/*.deps`. For example, `webkit2gtk-4.0.deps` has the
contents:

gtk+-3.0
libsoup-2.4

If the library is static, then there really isn't a good mechanism. Any
functions declared `public extern` in `.vala` will be exported, so you can
migrate some of the VAPI to `.vala` files. You could also `cat` the two
VAPIs together. This is pretty bad. I would probably convert the static
library to shared and then use the `.deps` mechanism instead.

On 21 November 2014 07:07, Andy Lees andrewl...@gmail.com wrote:

 Hi,

 I would like to export an interface to some C structures from a vala
 library that provides a number of other classes, etc.  If I include the
 vapi and associated .h file in the library, it compiles fine, but does not
 export the contents of the referenced vapi in the library vapi.

 How would one go about including the vapi contents in the library
 interface?

 Thanks for your attention.
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list




-- 
--Andre Masellaan...@masella.name
http://www.masella.name/
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Using monodevelop for developing VALA?

2014-11-21 Thread Gonzalo Aguilar Delgado

Hi,

Someone is using monodevelop 4 or 5 to develop on vala? Because I cannot 
get it recognize vala projects. It can compile old ones but I cannot 
create new projects.


Monodevelop is still working for vala?

Best regards,
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Using monodevelop for developing VALA?

2014-11-21 Thread Marek Gibek
Hi!

I updated mono vala plugin for MonoDevelop 5. Yannick Inizan created
nice PPA for it here:
https://launchpad.net/~inizan-yannick/+archive/ubuntu/mono

Source code is here:
https://mail.gnome.org/archives/vala-list/2014-August/msg00049.html

Please note that:
- I rewrote the references part (fixed, references and configurations)
so it will not open old projects correctly (you have to recreate
solution and project files)
- I do not maintain it (I'm working on plugin for IntelliJ, but this
is not open source for now)

Best Regards,
Marek

On 11/21/14, Gonzalo Aguilar Delgado gagui...@aguilardelgado.com wrote:
 Hi,

 Someone is using monodevelop 4 or 5 to develop on vala? Because I cannot
 get it recognize vala projects. It can compile old ones but I cannot
 create new projects.

 Monodevelop is still working for vala?

 Best regards,
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Using monodevelop for developing VALA?

2014-11-21 Thread Steven Oliver
Marek, do you plan to eventually open source your plugin for IntelliJ?

Steven N. Oliver

On Fri, Nov 21, 2014 at 9:58 AM, Marek Gibek gib...@gmail.com wrote:

 Hi!

 I updated mono vala plugin for MonoDevelop 5. Yannick Inizan created
 nice PPA for it here:
 https://launchpad.net/~inizan-yannick/+archive/ubuntu/mono

 Source code is here:
 https://mail.gnome.org/archives/vala-list/2014-August/msg00049.html

 Please note that:
 - I rewrote the references part (fixed, references and configurations)
 so it will not open old projects correctly (you have to recreate
 solution and project files)
 - I do not maintain it (I'm working on plugin for IntelliJ, but this
 is not open source for now)

 Best Regards,
 Marek

 On 11/21/14, Gonzalo Aguilar Delgado gagui...@aguilardelgado.com wrote:
  Hi,
 
  Someone is using monodevelop 4 or 5 to develop on vala? Because I cannot
  get it recognize vala projects. It can compile old ones but I cannot
  create new projects.
 
  Monodevelop is still working for vala?
 
  Best regards,
  ___
  vala-list mailing list
  vala-list@gnome.org
  https://mail.gnome.org/mailman/listinfo/vala-list
 
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Using monodevelop for developing VALA?

2014-11-21 Thread Marek Gibek
The only reason it's not open source is I'm planning to make business
on it ;) You know, create multiplatform UI framework in Vala / OpenGL
/ WPF inspired, abstraction for system libraries, IDE plugin - write
once, run everywhere (Windows, Linux, Android, iOS etc). Everybody has
dreams - don't blame me for mines :D

At some stage, I plan to make it open source (whole platform). With no
restrictions if I fail. Or dual license - free for open source
projects - if I succeed.

So, please keep fingers crossed for any of those scenarios ;)

Cheers,
Marek

On 11/21/14, Steven Oliver oliver.ste...@gmail.com wrote:
 Marek, do you plan to eventually open source your plugin for IntelliJ?

 Steven N. Oliver

 On Fri, Nov 21, 2014 at 9:58 AM, Marek Gibek gib...@gmail.com wrote:

 Hi!

 I updated mono vala plugin for MonoDevelop 5. Yannick Inizan created
 nice PPA for it here:
 https://launchpad.net/~inizan-yannick/+archive/ubuntu/mono

 Source code is here:
 https://mail.gnome.org/archives/vala-list/2014-August/msg00049.html

 Please note that:
 - I rewrote the references part (fixed, references and configurations)
 so it will not open old projects correctly (you have to recreate
 solution and project files)
 - I do not maintain it (I'm working on plugin for IntelliJ, but this
 is not open source for now)

 Best Regards,
 Marek

 On 11/21/14, Gonzalo Aguilar Delgado gagui...@aguilardelgado.com wrote:
  Hi,
 
  Someone is using monodevelop 4 or 5 to develop on vala? Because I
  cannot
  get it recognize vala projects. It can compile old ones but I cannot
  create new projects.
 
  Monodevelop is still working for vala?
 
  Best regards,
  ___
  vala-list mailing list
  vala-list@gnome.org
  https://mail.gnome.org/mailman/listinfo/vala-list
 
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list