wined3d: Pass a wined3d_device_context to wined3d_cs_emit_blt_sub_resource().
[wine/zf.git] / dlls / shlwapi / stopwatch.c
blobcb8b860d0251cc3bdb259404331b4e78d520943d
1 /*
2 * Stopwatch Functions
4 * Copyright 2004 Jon Griffiths
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 * NOTES
21 * These functions probably never need to be implemented unless we
22 * A) Rewrite explorer from scratch, and
23 * B) Want to use a substandard API to tune its performance.
26 #include <stdarg.h>
27 #include <string.h>
28 #include <stdlib.h>
30 #define NONAMELESSUNION
32 #include "windef.h"
33 #include "winbase.h"
34 #include "winreg.h"
35 #include "winternl.h"
36 #include "wine/debug.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(shell);
40 /*************************************************************************
41 * @ [SHLWAPI.241]
43 * Get the current performance monitoring mode.
45 * PARAMS
46 * None.
48 * RETURNS
49 * The current performance monitoring mode. This is zero if monitoring
50 * is disabled (the default).
52 * NOTES
53 * If this function returns 0, no further StopWatch functions should be called.
55 DWORD WINAPI StopWatchMode(void)
57 FIXME("() stub!\n");
58 return 0;
61 /*************************************************************************
62 * @ [SHLWAPI.242]
64 * Write captured performance nodes to a log file.
66 * PARAMS
67 * None.
69 * RETURNS
70 * Nothing.
72 void WINAPI StopWatchFlush(void)
74 FIXME("() stub!\n");
77 /*************************************************************************
78 * @ [SHLWAPI.244]
80 * Write a performance event to a log file
82 * PARAMS
83 * dwClass [I] Class of event
84 * lpszStr [I] Text of event to log
85 * dwUnknown [I] Unknown
86 * dwMode [I] Mode flags
87 * dwTimeStamp [I] Timestamp
89 * RETURNS
90 * Success: ERROR_SUCCESS.
91 * Failure: A standard Win32 error code indicating the failure.
93 DWORD WINAPI StopWatchW(DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown,
94 DWORD dwMode, DWORD dwTimeStamp)
96 FIXME("(%d,%s,%d,%d,%d) stub!\n", dwClass, debugstr_w(lpszStr),
97 dwUnknown, dwMode, dwTimeStamp);
98 return ERROR_SUCCESS;
101 /*************************************************************************
102 * @ [SHLWAPI.243]
104 * See StopWatchW.
106 DWORD WINAPI StopWatchA(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown,
107 DWORD dwMode, DWORD dwTimeStamp)
108 { DWORD retval;
109 UNICODE_STRING szStrW;
111 if(lpszStr) RtlCreateUnicodeStringFromAsciiz(&szStrW, lpszStr);
112 else szStrW.Buffer = NULL;
114 retval = StopWatchW(dwClass, szStrW.Buffer, dwUnknown, dwMode, dwTimeStamp);
116 RtlFreeUnicodeString(&szStrW);
117 return retval;
120 /*************************************************************************
121 * @ [SHLWAPI.245]
123 * Log a shell frame event.
125 * PARAMS
126 * hWnd [I] Window having the event
127 * pvUnknown1 [I] Unknown
128 * bUnknown2 [I] Unknown
129 * pClassWnd [I] Window of class to log
131 * RETURNS
132 * Nothing.
134 void WINAPI StopWatch_TimerHandler(HWND hWnd, PVOID pvUnknown1, BOOL bUnknown2, HWND *pClassWnd)
136 FIXME("(%p,%p,%d,%p) stub!\n", hWnd, pvUnknown1, bUnknown2 ,pClassWnd);
139 /* FIXME: Parameters for @246:StopWatch_CheckMsg unknown */
141 /*************************************************************************
142 * @ [SHLWAPI.247]
144 * Log the start of an applet.
146 * PARAMS
147 * lpszName [I] Name of the applet
149 * RETURNS
150 * Nothing.
152 void WINAPI StopWatch_MarkFrameStart(LPCSTR lpszName)
154 FIXME("(%s) stub!\n", debugstr_a(lpszName));
157 /* FIXME: Parameters for @248:StopWatch_MarkSameFrameStart unknown */
159 /*************************************************************************
160 * @ [SHLWAPI.249]
162 * Log a java applet stopping.
164 * PARAMS
165 * lpszEvent [I] Name of the event (applet)
166 * hWnd [I] Window running the applet
167 * dwReserved [I] Unused
169 * RETURNS
170 * Nothing.
172 void WINAPI StopWatch_MarkJavaStop(LPCWSTR lpszEvent, HWND hWnd, DWORD dwReserved)
174 FIXME("(%s,%p,0x%08x) stub!\n", debugstr_w(lpszEvent), hWnd, dwReserved);
177 /*************************************************************************
178 * @ [SHLWAPI.250]
180 * Read the performance counter.
182 * PARAMS
183 * None.
185 * RETURNS
186 * The low 32 bits of the current performance counter reading.
188 DWORD WINAPI GetPerfTime(void)
190 static LARGE_INTEGER iCounterFreq = { {0} };
191 LARGE_INTEGER iCounter;
193 TRACE("()\n");
195 if (!iCounterFreq.QuadPart)
196 QueryPerformanceFrequency(&iCounterFreq);
198 QueryPerformanceCounter(&iCounter);
199 iCounter.QuadPart = iCounter.QuadPart * 1000 / iCounterFreq.QuadPart;
200 return iCounter.u.LowPart;
203 /* FIXME: Parameters for @251:StopWatch_DispatchTime unknown */
205 /*************************************************************************
206 * @ [SHLWAPI.252]
208 * Set an as yet unidentified performance value.
210 * PARAMS
211 * dwUnknown [I] Value to set
213 * RETURNS
214 * dwUnknown.
216 DWORD WINAPI StopWatch_SetMsgLastLocation(DWORD dwUnknown)
218 FIXME("(%d) stub!\n", dwUnknown);
220 return dwUnknown;
223 /* FIXME: Parameters for @253:StopWatchExA, 254:StopWatchExW unknown */