Mer/Documentation/Vala control panel

From Maemo Wiki
Revision as of 09:12, 28 July 2009 by imported>qwerty12 (Mer/Documentation/Vala Control Panel moved to Mer/Documentation/Vala control panel: Camel case is frowned upon. Thanks Stskeeps for telling me to name it "Vala Control Panel". :p)
Jump to navigationJump to search

Mer needs new control panels. But not everyone knows C, but they may be proficient in C#. Vala is a language with C#-like syntax, that compiles to C, which makes it perfect for writing CPAs which are (to my knowledge) C only. But, documentation on Vala is rather lacking.

An example can be found here: http://slexy.org/view/s2hH10B3bV

(maemo.org wiki sucks and does not understand "<source lang="c-sharp">")

Save the above as "cpa.vala". Because valac seems to be more accustomed for making programs, you have to use valac's -C option which'll output the generated C code and gcc can then be used to make it into a library.

Improvements very much welcomed.