Hey,
I made a small perl script, I pass it some arguments and have it successfully displaying the output to my G15 screen which is all working great. However I wish to display the output in two different formats, the default clock script that comes with the g15client uses the thin black buttons to do just this. Does anyone know how this is done? I don't think it's just opening a new screen, as my script opens in a new screen and the circular black button cycles through these.
Alternatively does anyone know where that default clock script is? I might be able to figure out how to do it if I could find that.
PS: I only learnt perl and this g15 stuff 2 days ago so try to keep any answers as simple as possible :)
Cheers.
Re: Displaying two different formats from one script
Programming documentation for libg15render is available at http://www.g15tools.com/docs-g15r which should give a description of the functions available in the library. That said, the best documentation is probably the source for some of the utilities using libg15render as that will show you how the library is used in context.
Re: Displaying two different formats from one script
I suggest you check g15stats instead, as it's built like you will want to do it - a self executable (most likely). The other ones are .so files that gets loaded by g15daemon at startup.
+ download the source of g15daemon, check inside documents, there's the real development pages.
Re: Displaying two different formats from one script
I can already write C code (as long as it's not excessively complicated). I'll have a look through the code and see how it's done. Cheers for the reply :)
Re: Displaying two different formats from one script
The clock plugin is written in C.
If you want to create a similar thing you can (for it being the most easy) either learn C or C++ (object oriented expansion of it, i recommend it, it gives you some more easy ways of handling text for example)
At the moment however you are going to do this you will need to learn some more low level language, or hope for someone to increase g15composer functionality ;) (not such a high chance)
If you do go ahead and learn c++, don't be afraid to come back and ask for a starting point, cause i was afraid of the g15 parts being really complicated (partly due to man 3 <*g15*> and the like didn't return ANYTHING useful), which they were not.
The subjects you would need to read up on for c++ is really narrow: basically any starting tutorial found online should provide you with enough information (you need to know about how you declare variables, and functions)
The clock plugin is inside the g15daemon source package, under plugins.