JUKE_SONGLIST_CLEAR should not been needed here. I personally recommend you to just send empty data. But I guess both methods might works, but last one might been safer.
Actually I think plugin authors should be able to handle both of these cases. If they get a SONG_NEXT command with empty data, then they know there is no "next" song. If they get a SONGLIST_CLEAR command then they should understand there is no next song either. As a result, I will leave it up to the plugin authors to code for both cases.
BTW. I could otherwise add "JUKE_APP_SUSPEND" and "JUKE_APP_RESTORED" as alternative names to these focus commands? Or should I rename to these to? OK with others (I ask that because it now over V1.0 and wont change without I heard).
If we use these commands differently then it still does not matter what you call the commands themeselves ... the problem would be that be do not implement them the same.
What I mean is ...... if MultiJuke is going to use the "LOSTFOCUS" command to indicate the folllowing two things:
1) Application no longer has the focus
2) Application has been minimized
... and my software is only going to use it to support (2), then we are both not implementing this command the same way which would be bad. As a result, since I can not support (1) then I decided not to support the "LOSTFOCUS" command at all.
I can only inform the plugin when the application has been "minimized" and "restored". If you want to add commands (or rename the current ones to) "JUKE_APP_MINIMIZED" and "JUKE_APP_RESTORED" then I can use them, otherwise it will not work for me.
The correct way to handle this is to keep the "GAINFOCUS" and "LOSTFOCUS" commands, but also add two new commands called "JUKE_APP_MINIMIZED" and "JUKE_APP_RESTORED". If you do this then the jukebox software can clear indicate what they are doing to the plugin.