AmphetaDesk::OS::Windows - GUI routines for Windows (GUI only)


    gui_init();          # start the gui.
    gui_listen();        # listen for gui events.
    gui_note("text");    # send log info to the GUI.
    open_url();          # open a browser to a preset URL.


This module handles all the GUI routines for Windows 95 and up. We use native Win32::GUI and Win32::API routines to create a quick log window, systray icon, and default browser opening. The code correctly handles Windows 95 (which requires an older version of Win32::GUI) and Windows 98+ (which can use the latest version with no problem).


This routine loads specific libraries specific to the OS and attempts to do everything necessary to start up a GUI window and start listening for events. Various private supplementary routines are required for this to complete succesfully. Most of the code within this routine is thanks to David Berube. NOTE: All of this code was written for Win32::GUI v0.5xx, which means that deprecated v0.6xx things like -style and -exstyle still exist. The reason is twofold: one, we still need to use v0.5xx under Windows 95, and two, we're too lazy to find out the right equivalents under v0.6xx. This routine always returns 1.
This routine checks the GUI's event queue to see if there is anything that needs to be done. Under Win32, this covers checking for menu clicks, systray actions, or whether we should redraw the window. Since AmphetaDesk is single- threaded, this isn't perfect (ie. there's a noticable delay in window redrawing on a slow net connection). This routine always returns 1.
Much like AmphetaDesk::Utilities::note, only this routine specifically handles sending the $text to the GUI window. Under Win32, this is the pointless "yes, something is happening" logger window.
This routine checks in the registry for the user's default browser. If we haven't been told to use anything else, we use the registry settings, else we try to pass the $url as a shell parameter to the user's preferred choice. This routine always returns 1.



Morbus Iff, <>


Copyright 2000-2004 Morbus Iff <>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.