|
|
#1 |
|
Junior Member
|
API...
kichik, you said that there's an API for the hotkeys plug-in... Is it public? Is it available somewhere?
Thanks! |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Well, it'll probably be released along with the SDK anyway, but here it is.
*moved to wa dev forum* NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
|
Thanks... But can you tell me what is the value of
IPC_REGISTER_WINAMP_IPCMESSAGE The winamp5 sdk doesn't seems to be released yet, so I don't have this value...! |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
#define IPC_REGISTER_WINAMP_IPCMESSAGE 65536
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
|
Thanks, It works!
But I still have a problem. I call the IPC_GEN_HOTKEYS_ADD after the winamp window is shown, since I'm not sure I can know at which moment the hotkey plugin is loaded: If I call the IPC_GEN_HOTKEYS_ADD at the init() of my plugin it doesn't work (my plugin is probably loaded after the hotkey plugin). So the user opens the preferences window, adds a hotkey for the actions I added to the hotkeys plugin. When Winamp is closed then reopened, the settings for these added actions are not restored, probably because when your plugin is initialized it doesn't know anything yet about the new actions... What can I do? What is the precise moment (some WM_* message or some IPC_* message I could intercept) where I would have to register my hotkeys that would be _after_ the hotkeys plugin init, but _before_ the hotkeys settings loading? Winamp Advanced Controls, the ultimate tray plugin! |
|
|
|
|
|
#6 | |
|
Moderator Alumni
Join Date: Apr 2000
Location: USA
Posts: 315
|
Quote:
-Justin |
|
|
|
|
|
|
#7 |
|
Junior Member
|
mmh... I don't think this will help me a lot.
I don't have any problem knowing when it's safe to send an IPC message. It's just that the Golbal hotkeys plugin, at the moment it loads its settings, doesn't know anything about the "custom" hotkey actions I added, so it can't load their settings... kichik (or anyone else), you probably used gen_hotkeys API with another plugin? How can it be acheived? Here's the actual squence of events as I understand it: 1 Winamp starts 2 my plugin->init() is called 3 my plugin loads its settings 4 ... 5 gen_hotkeys->init() is called 6 gen_hotkeys loads its settings (but doesn't know yet about the custom actions) 7 ... 8 Winamp is idle 9 my plugin registers the new keys with the gen_hotkeys API ---- I think the step 9 should be between 5 and 6, but I don't know how to acheive that. Winamp Advanced Controls, the ultimate tray plugin! |
|
|
|
|
|
#8 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Do as Justin said.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#9 |
|
Forum Pirate
Beta Team Join Date: Oct 2001
Posts: 2,032
|
Niver, you do know justin invented winamp... i think i may know what he is talking about.
|
|
|
|
|
|
#10 |
|
Junior Member
|
Ok, ok, it works... obviously Justin was right (as usual) and I look stupid (as usual too ?...)
Thanks all for your help. Winamp Advanced Controls, the ultimate tray plugin! |
|
|
|
|
|
#11 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Don't forget to zero the extended array in the insertion structure defined in wa_hotkeys.h before you send the add message. If you don't, your hot key action might not work as expected or at all in following versions of Winamp.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|