Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 20th June 2005, 22:08   #1
gello
Junior Member
 
Join Date: Jun 2005
Location: sailing yacht
Posts: 3
media library interface

OK, I'm on my third working plugin for winamp and I'm tired
of wading through header files and sample code to find
things.

This request is simple. When a user left clicks (select,
or WM_LBUTTONDOWN for win32 pods)
in the media library window a song is highlighted.
I want to be informed of this event so I can display some
auxiliary information about the tune
in another window. The ProcMessage
interface in the media library does not even get a message when this event occurs. Does anyone know a simple way to be informed of this event? I know I can find the window and
subclass the window procedure of what is probably a listview control but how gross is that. Surely there is a feature
somewhere in the API I can hook to without such a kluge.

Please elevate me from my ignorance and save me another 1000
lines of obtuse win32 code to interface to this beast.

Thanks
gello is offline   Reply With Quote
Old 24th June 2005, 01:36   #2
saivert
Banned
 
saivert's Avatar
 
Join Date: Jan 2001
Location: Norway
Posts: 927
ProcMessage is only called by Media Library when Library specific events occur. It is not tied to the window procedure of the Media Library window. You need to subclass (nickname of technique that invoves swapping out a window procedure with your own) the Media Library window and stcik around waiting for the clicks.
saivert is offline   Reply With Quote
Old 26th June 2005, 01:21   #3
gello
Junior Member
 
Join Date: Jun 2005
Location: sailing yacht
Posts: 3
That is exactly what I feared.
Subclassing is such a painful and incompatible way
of doing something so simple.

I shouldn't complain,
whats another few pages of inscrutable code in the world of
windows. Hey, why don't we all go back to pulling up the raster for the screen and doing image
recognition on the pixels to see what has been selected?

Thanks for the help, I suppose I'll subclass it and
start sorting out messages and trying to get our two
windows to cooperate at the event level.

cheers,

gello
gello is offline   Reply With Quote
Old 26th June 2005, 01:41   #4
gello
Junior Member
 
Join Date: Jun 2005
Location: sailing yacht
Posts: 3
P.S.

Subclassing gets me the key clicks, now
I have to figure out the window type of the media library listview child window and what messages to issue to it (hopefully its a common control) to retrieve the currently highlighted
but not enqueued item.

Since I am already in the subclassed windows procedure
its time for more inscrutable code.

Its all doable, but what a mess of version dependent crap.

On second thought, maybe my comment on doing pixel
recognition wasn't so facetious . . .

We can close this thread, it is easier to write
a new media library plugin than to maintain any solution based on this method.

Thanks for the help.
gello is offline   Reply With Quote
Old 26th June 2005, 03:09   #5
saivert
Banned
 
saivert's Avatar
 
Join Date: Jan 2001
Location: Norway
Posts: 927
The developers of the Media Library plug-in never anticipated their plug-in to be used in such a way. You can always tell the user to right click the item and then use the send to menu to tell your ML plug-in to display more info. This assumes you are adding an item to the send to menu. I know Nullsoft has an awful habit of making incomplete APIs for us programmers. They should have exposed way more to us than what they have now. Heck! The entire Winamp package should have been open-source, but it's not so we must continue making huge hacks to archieve what we want.

Winamp also uses so many closed-source copyrighted components (like the burning engine, MP3 decode and encode, Equalizer's internal code) so if Winamp ever was converted into a open-source project then we would have to say bye bye to MP3 and burning provided no other solution was written.
saivert is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump