lgi-devs / lgi

Dynamic Lua binding to GObject libraries using GObject-Introspection
MIT License
436 stars 69 forks source link

Documentation for lgi #322

Open aidinio opened 2 months ago

aidinio commented 2 months ago

I have been using lgi for one of my projects, and it has been incredibly difficult for me to wrap my head around it. There aren't any documents for it, and the only way for me to make a program with lgi that uses dbus, is to look at other people's code, and Gio documents that are authored for C, then write my own code, and make it work with a lot of trial and error. Is there any better way to to do this? Any time a GLib.Variant value is returned, I have to fiddle around with it for a long time, and then finally find out what value it actually stored. I'm amazed that there isn't any documentation for the simplest operations with lgi and dbus.

psychon commented 2 months ago

Do you know about https://github.com/lgi-devs/lgi/tree/master/docs? Because it sounds a lot like you do not. Feel free to improve that with things that you wish where explained there.

documents that are authored for C

Well, yes and no. That's how GObject-Introspection works. The C code is the authoritative source for things and everything else works by parsing the code and the comments on it.