diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/delphi/m_utils.inc | 15 | ||||
| -rw-r--r-- | include/m_utils.h | 32 | 
2 files changed, 14 insertions, 33 deletions
| diff --git a/include/delphi/m_utils.inc b/include/delphi/m_utils.inc index 205f22d9ff..f71dfedd65 100644 --- a/include/delphi/m_utils.inc +++ b/include/delphi/m_utils.inc @@ -64,24 +64,19 @@ type      ISOcode: array [0..2] of AnsiChar;
    end;
 -const
 -  OUF_NEWWINDOW = 1;
 -  OUF_UNICODE   = 2;
    {
 -    wParam : OUF_* flag
 -    lParam : Pointer to a null terminated string containing Url
      Affect : Open a URL in the user's default web browser, see notes
 -    Returns: 0 on success, [non zero on failure]
      Notes  : bOpenInWindow should be zero to open the URL in the browoser window
               the user last used, or nonzero to open in a new browser window,
               if there's no browser running, it will be started to show the URL
 -    Version: v0.1.0.1+
    }
 -  MS_UTILS_OPENURL:PAnsiChar = 'Utils/OpenURL';
 +procedure Utils_OpenUrl(const url:PAnsiChar; bOpenInWindow:BYTE=1); stdcall;
 +                 external CoreDLL name 'Utils_OpenUrl';
 +
 +procedure Utils_OpenUrlW(const url:PWideChar; bOpenInWindow:BYTE=1); stdcall;
 +                 external CoreDLL name 'Utils_OpenUrlW';
    {
 -    wParam : 0
 -    lParam : Pointer to an initalised TUTILRESIZEDIALOG structure
      Affect : Resize a dialog by calling a custom routine to move each control, see notes
      Returns: 0 on success, [non zero] on failure
      Notes  : Does not support DIALOGTEMPLATEEX dialogboxes, and will return
 diff --git a/include/m_utils.h b/include/m_utils.h index 3e8545f766..96e7cbe783 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -40,31 +40,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #include <m_string.h>
  #endif
 -//this entire module is v0.1.0.1+
 -//this module cannot be redefined by a plugin, because it's not useful for it
 -//to be possible
 -//There are some more utility services in the database for dealing with time
 -//and simple string scrambling, but they are very db-orientated
 -
 -/* Opens a URL in the user's default web browser   v0.1.0.1+
 -wParam = OUF_* flags
 -lParam = (LPARAM)(const TCHAR*)szUrl
 -returns 0 always
 -bOpenInNewWindow should be zero to open the URL in the browser window the user
 -last used, or nonzero to open in a new browser window. If there's no browser
 -running, one will be opened to show the URL.
 -*/
 -
 -#define OUF_NEWWINDOW   1
 -#define OUF_UNICODE     2
 +/////////////////////////////////////////////////////////////////////////////////////////
 +// Opens a URL in the user's default web browser
 +//
 +// bOpenInNewWindow should be zero to open the URL in the browser window the user
 +// last used, or nonzero to open in a new browser window. If there's no browser
 +// running, one will be opened to show the URL.
 -#if defined( _UNICODE )
 -	#define OUF_TCHAR OUF_UNICODE
 -#else
 -	#define OUF_TCHAR 0
 -#endif
 +EXTERN_C MIR_CORE_DLL(void) Utils_OpenUrl(const char *pszUrl, bool bOpenInNewWindow = true);
 +EXTERN_C MIR_CORE_DLL(void) Utils_OpenUrlW(const wchar_t *pszUrl, bool bOpenInNewWindow = true);
 -#define MS_UTILS_OPENURL	"Utils/OpenURL"
 +#define Utils_OpenUrlT Utils_OpenUrlW
  /////////////////////////////////////////////////////////////////////////////////////////
  // Resizes a dialog by calling a custom routine to move the individual
 | 
