Update documentation
Tasks:
- [ ] document the
gi.Systemmodule - [ ] document the
cairomodule - [ ] move the documentation to the wiki
I am very interested in this project ... sadly I do not master C ++ ...
But I might be able to contribute to the documentation. Is the node-gtk interface the same as gjs, I mean the same as the main class in gjs.
I see gjs documentation on GJS Documentation
Hey @donnisnoni95, awesome! :) The node-gtk interface is similar but not the same as the gjs one. For example, node-gtk uses camelCase where gjs uses snake_case, eg window.getHeight() vs window.get_height(). So you can usually translate gjs code quite easily to node-gtk.
In an ideal world, which isn't the case here, we would generate the same kind of documentation that you linked to, but for node-gtk. However, we don't have enough manpower (less than 1 ^^') to complete that task.
If you're interested in creating documentation for this project, here are a few pointers I can give you:
- Our naming function is here
- To generate documentation, one would use the GObject-Introspection API in conjunction with that function to get the names right. Think of that as an API that returns metadata about other API:s (function names, argument types, return types, etc). To understand how the GI API is used, I recommend reading lib/index.js and lib/inspect.js. Note that the GI API is usable directly from Javascript, though you need to refer to the C documentation.
- Some modifications to the API:s are made when it makes sense to do so, in /lib/overrides/. The files in there contains JSDoc annotations that would need to be parsed and that would override information provided by the GI API.
- Some parts of the
node-gtkAPI are "manually" created, such as thegi.require("cairo")module and thegi.Systemmodule.
Yes exactly, I have explored and looked at some of the codes in this repo and I have also seen the API provided by gjs in the documentation.
They use devdocs and I tried to find their official repo from it, but I couldn't find it. although I have already searched on their gitlab.
I am also very happy to be able to fill my free time by contributing to open source projects. I will make it as soon as possible and I believe we can work together.
Actually this is my first contribution on github. I tried several times to help ... but some repo owners ignored my request. Thank you friend ... for giving me a very good response.