Package ca.phon.app
Class WindowsURIHandler
java.lang.Object
ca.phon.app.WindowsURIHandler
- All Implemented Interfaces:
PhonStartupHook
,IPluginExtensionPoint<PhonStartupHook>
public final class WindowsURIHandler
extends Object
implements PhonStartupHook, IPluginExtensionPoint<PhonStartupHook>
Create a hidden message window for handling uri load requests on windows.
The window will respond to WM_USER messages with the lparam variable holding
a guid long value. This guid will be used to locate a file named with the
guid value in hex format in the user's application data folder. Once processed
the file will be deleted.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>
Get type of extensionGet factory for extension point objectsstatic com.sun.jna.platform.win32.WinDef.HWND
static void
Send message to custom message handler window using WM_USER message.void
startup()
Perform whatever operations are necessary for plug-in startup.static File
uriRequestFileFromId
(long messageId)
-
Constructor Details
-
WindowsURIHandler
public WindowsURIHandler()
-
-
Method Details
-
startup
Description copied from interface:PhonStartupHook
Perform whatever operations are necessary for plug-in startup.- Specified by:
startup
in interfacePhonStartupHook
- Throws:
PluginException
- on error. Excpetions will be printed to the logger
-
uriRequestFileFromId
-
getMessageHWND
public static com.sun.jna.platform.win32.WinDef.HWND getMessageHWND() -
getExtensionType
Description copied from interface:IPluginExtensionPoint
Get type of extension- Specified by:
getExtensionType
in interfaceIPluginExtensionPoint<PhonStartupHook>
-
getFactory
Description copied from interface:IPluginExtensionPoint
Get factory for extension point objects- Specified by:
getFactory
in interfaceIPluginExtensionPoint<PhonStartupHook>
-
main
Send message to custom message handler window using WM_USER message. A new launcher will be created by the installer at bin/phon_uri_handler.exe which executes this program. If Phon is not running (i.e., the message window is not found) it is opened with the uri as an argument.
-