Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use C libraries to create GNOME app in JavaScript

I am a beginner in GNOME desktop application development so I am trying to learn about it as much as possible. I have read various tutorials present on developer.gnome.org written for JavaScript. I know that through GObject Introspection I can access C libraries in JavaScript.

As use of JavaScript for desktop applications is new so not many documentations are present. I was wondering if there is any way I can know which functions I can use with what parameters to access some libraries.

For example I can create a button using GTK in JavaScript by:

this.mybutton = new GTK.Button({some code here});

How can I come to know about the name of the functions I can use? Is there any way I can make out the name of the function for JavaScript seeing the documentation written for C?

For some of the libraries I have seen this documentation written for JavaScript. Any help will be appreciated to understand more about GNOME application development.

like image 982
prolific Avatar asked Mar 19 '14 14:03

prolific


1 Answers

I agree with you: the documentation is pretty low on the subject.
Most of the time I try to find already written code from other developers and change it to have what I want.
The C documentation is pretty complete on http://developer.gnome.org and most of the time you can use nearly the same methods.
I suggest you to take a look at this web site: http://www.roojs.org/seed/gir-1.2-gtk-3.0/seed/
And also to this one: http://zetcode.com/gui/javascriptgtktutorial/
Good luck with your javascript development !!!

like image 131
Nicolas Avatar answered Oct 29 '22 15:10

Nicolas