- Timestamp:
- Mar 23, 2011, 5:52:24 PM (14 years ago)
- Location:
- trunk/src/shell32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/systray.c
r21592 r21600 27 27 #include "config.h" 28 28 #include "winuser32.h" 29 #include "auxthread.h" 29 30 30 31 #include "systray.h" … … 227 228 } 228 229 229 /************************************************************************* 230 * Shell_NotifyIconA [SHELL32.297][SHELL32.296] 231 */ 232 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid ) 233 { 230 static PVOID Do_Shell_NotifyIconA(PVOID arg1, PVOID arg2, 231 PVOID arg3, PVOID arg4) 232 { 233 DWORD dwMessage = (DWORD)arg1; 234 PNOTIFYICONDATAA pnid = (PNOTIFYICONDATAA)arg2; 235 234 236 BOOL flag = FALSE; 235 237 switch(dwMessage) … … 245 247 break; 246 248 } 247 return flag; 249 return (PVOID)flag; 250 } 251 252 /************************************************************************* 253 * Shell_NotifyIconA [SHELL32.297][SHELL32.296] 254 */ 255 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid ) 256 { 257 PVOID ret; 258 BOOL brc = RunOnAuxThreadAndWait(Do_Shell_NotifyIconA, 259 (PVOID)dwMessage, (PVOID)pnid, 260 NULL, NULL, &ret); 261 if (brc) 262 brc = (BOOL)ret; 263 return brc; 248 264 } 249 265 -
trunk/src/shell32/systray_os2.h
r21592 r21600 8 8 #define __WINE_SYSTRAY_OS2_H 9 9 10 // map some Win32 types used in systray.h to OS/2 types11 // to avoid Win32 header inclusion and conflicts12 13 #define HICON HPOINTER14 15 10 #include "systray.h" 16 11 17 // define some Win32 structs in terms of OS/2 types18 // to avoid Win32 header inclusion andconflicts12 // define some Win32 structs and types in terms of OS/2 types 13 // to avoid inclusion of shellapi.h that would create conflicts 19 14 20 15 #define NIF_MESSAGE 0x00000001 -
trunk/src/shell32/systray_os2ex.c
r21592 r21600 6 6 */ 7 7 8 #define INCL_WIN 9 #define INCL_DOS 10 #define INCL_DOSERRORS 11 #include <os2wrap.h> 8 #define INCL_PM 9 #define INCL_DOS 10 #define INCL_DOSERRORS 11 #include <os2wrap.h> // Odin32 OS/2 api wrappers 12 13 #include <win32api.h> 12 14 13 15 #include <string.h> 14 15 #include <odin.h>16 #include <winconst.h>17 16 18 17 // declare function pointers for dynamic linking to xsystray DLL … … 22 21 #include "systray_os2.h" 23 22 23 #include "dbglog.h" 24 24 25 #define WM_XST_MYNOTIFY (WM_USER + 1000) 26 27 static ULONG WM_XST_CREATED = 0; 25 28 26 29 static HWND hwndProxy = NULLHANDLE; … … 69 72 (MPARAM)ptrayItem->notifyIcon.uID, 70 73 (MPARAM)winMsg); 74 return (MRESULT)TRUE; 71 75 } 72 73 return (MRESULT)FALSE; 76 break; 77 } 78 case XST_IN_CONTEXT: 79 { 80 DoWin32PostMessage(ptrayItem->notifyIcon.hWnd, 81 ptrayItem->notifyIcon.uCallbackMessage, 82 (MPARAM)ptrayItem->notifyIcon.uID, 83 (MPARAM)WM_CONTEXTMENU_W); 84 return (MRESULT)TRUE; 74 85 } 75 86 default: 76 87 break; 77 88 } 78 } 79 89 90 return (MRESULT)FALSE; 91 } 80 92 default: 93 { 94 if (msg == WM_XST_CREATED) 95 { 96 return (MRESULT)TRUE; 97 } 81 98 break; 82 99 } 83 84 return OldProxyWndProc(hWnd, msg, mp1, mp2); 100 } 101 102 return WinDefWindowProc(hWnd, msg, mp1, mp2); 85 103 } 86 104 … … 89 107 if (hwndProxyRefs == 0) 90 108 { 91 ULONG fcf = 0; 92 hwndProxy = WinCreateStdWindow(HWND_DESKTOP, 0, &fcf, NULL, 93 NULL, 0, NULLHANDLE, 0, NULL); 109 if (!WinRegisterClass(NULLHANDLE, "OdinXSysTrayProxy", ProxyWndProc, 110 0, 0)) 111 { 112 dprintf(("SHELL32: SYSTRAY: WinRegisterClass() failed with %x", 113 WinGetLastError(0))); 114 return FALSE; 115 } 116 117 hwndProxy = WinCreateWindow(HWND_DESKTOP, "OdinXSysTrayProxy", NULL, 118 0, 0, 0, 0, 0, NULLHANDLE, HWND_BOTTOM, 0, 119 NULL, NULL); 120 94 121 if (hwndProxy == NULLHANDLE) 122 { 123 dprintf(("SHELL32: SYSTRAY: WinCreateWindow() failed with %x", 124 WinGetLastError(0))); 95 125 return FALSE; 96 97 OldProxyWndProc = WinSubclassWindow(hwndProxy, ProxyWndProc);98 } 126 } 127 } 128 99 129 ++ hwndProxyRefs; 100 130 … … 171 201 return FALSE; 172 202 203 // initialize some constants 204 WM_XST_CREATED = xstGetSysTrayCreatedMsgId(); 205 173 206 SYSTRAY_ItemInit = SYSTRAY_Ex_ItemInit; 174 207 SYSTRAY_ItemTerm = SYSTRAY_Ex_ItemTerm;
Note:
See TracChangeset
for help on using the changeset viewer.