diff options
author | Tino Rachui <tra@openoffice.org> | 2000-11-22 12:55:37 +0000 |
---|---|---|
committer | Tino Rachui <tra@openoffice.org> | 2000-11-22 12:55:37 +0000 |
commit | 6dd45639a4b2693e68bc1abbb22055b7b301a1c3 (patch) | |
tree | 4c0456d3994cee364a144f2128900a70aa02d774 /sal/inc/systools/win32/user9x.h | |
parent | 5493e93204328c837131f71bbafd730cb8e95f7e (diff) |
*** empty log message ***
Diffstat (limited to 'sal/inc/systools/win32/user9x.h')
-rw-r--r-- | sal/inc/systools/win32/user9x.h | 68 |
1 files changed, 54 insertions, 14 deletions
diff --git a/sal/inc/systools/win32/user9x.h b/sal/inc/systools/win32/user9x.h index 7704464962dd..480f2e3dde83 100644 --- a/sal/inc/systools/win32/user9x.h +++ b/sal/inc/systools/win32/user9x.h @@ -2,9 +2,9 @@ * * $RCSfile: user9x.h,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: tra $ $Date: 2000-11-14 06:48:47 $ + * last change: $Author: tra $ $Date: 2000-11-22 13:55:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -58,6 +58,7 @@ * * ************************************************************************/ + #pragma once #ifndef _WINDOWS_ @@ -68,7 +69,10 @@ extern "C"{ #endif -/* undefine if already a macro */ +//------------------------------------------------------------------------ +// undefine the macros defined in the winuser.h file in order to avoid +// warnings because of multiple defines +//------------------------------------------------------------------------ #ifdef SendMessageW #undef SendMessageW @@ -94,14 +98,44 @@ extern "C"{ #undef GetClipboardFormatNameW #endif -extern LRESULT ( WINAPI * lpfnSendMessageW) ( +#ifdef SetWindowTextW +#undef SetWindowTextW +#endif + +//------------------------------------------------------------------------ +// set the compiler directives for the function pointer we declare below +// if we build sal or sal will be used as static library we define extern +// else sal exports the function pointers from a dll and we use __declspec +//------------------------------------------------------------------------ + +#if defined(SAL_EXPORT_SYSTOOLS) || defined(USE_SAL_STATIC) + #define USER9X_API extern +#else + #define USER9X_API __declspec( dllimport ) +#endif + +//------------------------------------------------------------------------ +// the Shell9xInit and Shell9xDeInit functions will be used only by +// sal itself and will not be exported +//------------------------------------------------------------------------ + +#if defined(SAL_EXPORT_SYSTOOLS) + extern void WINAPI User9xInit( ); + extern void WINAPI User9xDeInit( ); +#endif + +//------------------------------------------------------------------------ +// declare function pointers to the appropriate user32 functions +//------------------------------------------------------------------------ + +USER9X_API LRESULT ( WINAPI * lpfnSendMessageW) ( HWND hWnd, // handle to the destination window UINT Msg, // message WPARAM wParam, // first message parameter LPARAM lParam // second message parameter ); -extern HWND ( WINAPI * lpfnCreateWindowExW ) ( +USER9X_API HWND ( WINAPI * lpfnCreateWindowExW ) ( DWORD dwExStyle, // extended window style LPCWSTR lpClassName, // registered class name LPCWSTR lpWindowName, // window name @@ -116,36 +150,42 @@ extern HWND ( WINAPI * lpfnCreateWindowExW ) ( LPVOID lpParam // window-creation data ); -extern ATOM ( WINAPI * lpfnRegisterClassExW ) ( +USER9X_API ATOM ( WINAPI * lpfnRegisterClassExW ) ( CONST WNDCLASSEXW* lpwcx // class data ); -extern BOOL ( WINAPI * lpfnUnregisterClassW ) ( +USER9X_API BOOL ( WINAPI * lpfnUnregisterClassW ) ( LPCWSTR lpClassName, // class name HINSTANCE hInstance // handle to application instance ); -extern UINT (WINAPI * lpfnRegisterClipboardFormatW) ( +USER9X_API UINT (WINAPI * lpfnRegisterClipboardFormatW) ( LPCWSTR lpszFormat // name of new format ); -extern int ( WINAPI * lpfnGetClipboardFormatNameW ) ( +USER9X_API int ( WINAPI * lpfnGetClipboardFormatNameW ) ( UINT format, // clipboard format to retrieve LPWSTR lpszFormatName, // format name int cchMaxCount // length of format name buffer ); -/* define as macro */ +USER9X_API BOOL ( WINAPI * lpfnSetWindowTextW ) ( + HWND hWnd, + LPCWSTR lpString +); + +//------------------------------------------------------------------------ +// redefine the above undefined macros so that the preprocessor replaces +// all occurrences of this macros with our function pointer +//------------------------------------------------------------------------ + #define SendMessageW lpfnSendMessageW #define CreateWindowExW lpfnCreateWindowExW #define RegisterClassExW lpfnRegisterClassExW #define UnregisterClassW lpfnUnregisterClassW #define RegisterClipboardFormatW lpfnRegisterClipboardFormatW #define GetClipboardFormatNameW lpfnGetClipboardFormatNameW - - -void WINAPI User9xInit(LPOSVERSIONINFO lpVersionInfo); -void WINAPI User9xDeInit(); +#define SetWindowTextW lpfnSetWindowTextW #ifdef __cplusplus } |