Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no wiki, poor documentation, little community [closed] #256

Open
jerome-diver opened this issue Dec 27, 2020 · 4 comments
Open

no wiki, poor documentation, little community [closed] #256

jerome-diver opened this issue Dec 27, 2020 · 4 comments

Comments

@jerome-diver
Copy link

Hi, i have big pain to find any didactic and useful information around lgi and also goo canvas and all that is over.
Can you link some nice references to help dev users to win a bit of time to learn how to use this ?
Maybe there is something usefull to do on this point, i really would like to help on that, but... i feel myself locked and stick with my miss-understanding of lgi, and GooCanvas and GTK and Cairo all around.
I just arrived with help to build 3 rectangle's shapes and handle mouse event (and, because of big help, if not, i would never be able in this year to just do that, even if i know to use other GUI, not only wrappers around also) then build a collid test who miserably failed because of, i think, a bad event managment (not from lgi, but from myself, because i not really understand what i have to do to fix the problem as long as the lgi and gtk and cairo and goo canvas doc is poor and example also with mouse event and canvas especialy).
What do you think about that ? Any plan to ask dev to help make something useful for information around ?

@psychon
Copy link
Collaborator

psychon commented Dec 28, 2020

Well... I am not quite sure how I can help you. You mentioned these lbibraries:

I never used GooCanvas, buts its docs even start with an introduction with some examples.

Could you perhaps ask some more concrete question? Or is the above already helpful? If not, what is missing?

@jerome-diver
Copy link
Author

Thank you for your quick answer.
Precisely, what's missing i think is a real documentation who explain what is GTK objects, Cairo objetcs, Glib, and so on... what are they doing and how they are working together. So it should be not only lgi specific question, but it would be positive to get this somewhere if not everywhere (i mean oficialy at any point).
Also, look at the API, it is better than nothing, but clearly there is many methods who are poor description if nothing (and specialy about there arguments that for some of them i can loose hours to find what is it and how can i get it, like a "canvas context" for example).
If you think documentation is nice and enough, just close and delete my question. At this point i feel like it is an evidence that GTK and wrapper around has not enough clear and quality documentation to help new dev user with that (i do compared with Qt, can you have a look at the Qt doc to compare please ? you will see better what i mean).
thank you again.

@psychon
Copy link
Collaborator

psychon commented Dec 28, 2020

I am not sure how I can help you, so... uhm...

cairo just does drawing. Like "draw a line in red from (50, 30) to (100, 20)". GTK does "window stuff", like open a window with this button placed like this etc. GTK uses cairo for drawing. GLib is "low level system stuff" and datastructures. For example, it implements things like a list of objects (LinkedList in Java or std::vector in C++ (yes, I know that a vector is not a linked list, but you get the idea)).

I do not know what GooCanvas does, but it looks like it simplifies drawing widgets with GTK/cairo.
With GTK, you have to be able to redraw your whole widget all the time. Everything that is visible can get lost (for $REASONS) and needs to be redrawn. With GooCanvas, you can place a circle at some specific coordinates and that circle stays there and is automatically redrawn when needed.

Personally, I do not have much clue about GTK/GLib/... and never used them much, but I have more or less success with navigating the references.

Oh one important ingredient is GObject. This is another library (that uses GLib, I think...). It implements an object system. In C++ you would call this class. But it supports GObject introspection. For example "dear object, which properties do you have?". This basically makes the API documentations machine-readable. LGI is short for Lua GObject Introspection. It uses this machine readable API documentation and makes the API accessible to Lua. Similar projects exists for lots of programming languages: https://gi.readthedocs.io/en/latest/users.html

Good luck and feel free to ask some questions.

@jerome-diver
Copy link
Author

ho, i see in the sample directory the gtk-demo/main.lua who seems to me very nice to show some minimal uses of lgi... that is nice and help me a lot.

@jerome-diver jerome-diver changed the title no wiki, poor documentation, little community no wiki, poor documentation, little community [closed] Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants