Hi all, first time poster, please forgive ignorance.
I'm writing an irssi module which allows users to interface with music players
on Win* machines, by remotely calling and servicing a program called AMIP (a
module which can integrate with Winamp, iTunes, foobar2k, etc...).
So far, I have written a module which allows song and playlist information to
be retrieved and printed in irssi, using added commands like '/mymodule np',
'/mymodule nextsong', '/mymodule showplaylist 3 10'.
However, I want to develop a statusbar which shows information of the users'
choice. For example, a user could have the statusbar display "$player $artist
$title $album $bitrate $time_remaining/$total_time", or any other combination
of the many variables exposed and available through my C module, as well as
defining text formatting (bold, colors, etc.). The user would set the
information they desire to be displayed in the status bar through a setting,
such as 'mymodule_sbstr' (e.g., 'mymodule_sbstr = "%B$0%n[%1 - %2]"), and could
define if the statusbar hides when a song is stopped/paused with
'mymodule_hide_on_pause', 'mymodule_hide_one_stop'...
I am looking for advice on different ways to implement such a statusbar; thus
far I have a few ideas.
(1) Implement completely in C.
(*) Not sure if/how this could be done.
(2) Implement in C and perl.
(*) Perl script would use '/mymodule getvariable $<variable>'
(*) Would retrieve result through signal emitted by C module.
(3) C and perl, expose part of module through XS.
(*) Allow perl to get information through 'Irssi::MyModule'.
(*) Allow perl to execute commands like 'mymodule_getvar( var );'
Any comments appreciated.
Max Englander.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com