86#define ANIMATE_COLOR_NONE 0xffffffff
97 static const WCHAR aviW[] = {
'A',
'V',
'I', 0 };
114 memset(&mminfo, 0,
sizeof(mminfo));
149 TRACE(
"stopping animation thread\n");
157 TRACE(
"animation thread stopped\n");
254 void const *pBitmapData;
268 pBitmapData = infoPtr->
outdata;
276 pBitmapData = infoPtr->
indata;
330 nOffsetX = ((
rect.right -
rect.left) - nWidth)/2;
331 nOffsetY = ((
rect.bottom -
rect.top) - nHeight)/2;
350 WARN(
"Decompression error\n");
358 if (infoPtr->
nLoop != -1) {
359 if (--infoPtr->
nLoop == 0) {
416 TRACE(
"Already playing\n");
422 infoPtr->
nLoop = cRepeat;
427 TRACE(
"(repeat=%d from=%d to=%d);\n",
457 TRACE(
"Using a timer\n");
464 TRACE(
"Using an animation thread\n");
488 WARN(
"Can't find 'RIFF' chunk\n");
494 WARN(
"Can't find 'AVI ' chunk\n");
500 WARN(
"Can't find 'hdrl' list\n");
506 WARN(
"Can't find 'avih' chunk\n");
527 WARN(
"Can't find 'strl' list\n");
533 WARN(
"Can't find 'strh' chunk\n");
565 WARN(
"Can't find 'strh' chunk\n");
570 if (!infoPtr->
inbih) {
571 WARN(
"Can't alloc input BIH\n");
599 WARN(
"There should be a single 'strl' list\n");
610 WARN(
"Can't find 'movi' list\n");
622 numFrame < infoPtr->mah.dwTotalFrames) {
662 WARN(
"Can't load codec for the file\n");
669 infoPtr->
outbih = heap_alloc_zero(outSize);
676 WARN(
"Can't get output BIH\n");
686 WARN(
"Can't begin decompression\n");
702 TRACE(
"Closing avi.\n");
704 return (infoPtr->
hMMio != 0);
716 TRACE(
"No AVI resource found.\n");
719 WARN(
"No AVI file found.\n");
728 WARN(
"No AVI resource found.\n");
735 WARN(
"Can't get AVI information\n");
742 WARN(
"Can't get AVI Codec\n");
775 if (!lpwszName)
return FALSE;
797 static const WCHAR msvfw32W[] = {
'm',
's',
'v',
'f',
'w',
'3',
'2',
'.',
'd',
'l',
'l', 0 };
812 infoPtr = heap_alloc_zero(
sizeof(*infoPtr));
813 if (!infoPtr)
return FALSE;
864 TRACE(
"(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
913 case WM_STYLECHANGED:
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
static void ANIMATE_Free(ANIMATE_INFO *infoPtr)
static void ANIMATE_TransparentBlt(ANIMATE_INFO const *infoPtr, HDC hdcDest, HDC hdcSource)
static LRESULT ANIMATE_StyleChanged(ANIMATE_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss)
static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static DWORD CALLBACK ANIMATE_AnimationThread(LPVOID ptr_)
void ANIMATE_Register(void)
static LRESULT ANIMATE_Destroy(ANIMATE_INFO *infoPtr)
static BOOL ANIMATE_EraseBackground(ANIMATE_INFO const *infoPtr, HDC hdc)
static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
static BOOL ANIMATE_OpenW(ANIMATE_INFO *infoPtr, HINSTANCE hInstance, LPWSTR lpszName)
static BOOL ANIMATE_Create(HWND hWnd, const CREATESTRUCTW *lpcs)
static LRESULT ANIMATE_Timer(ANIMATE_INFO *infoPtr)
static BOOL ANIMATE_OpenA(ANIMATE_INFO *infoPtr, HINSTANCE hInstance, LPSTR lpszName)
#define ANIMATE_COLOR_NONE
static void ANIMATE_Notify(const ANIMATE_INFO *infoPtr, UINT notif)
static LRESULT ANIMATE_Play(ANIMATE_INFO *infoPtr, UINT cRepeat, WORD wFrom, WORD wTo)
static BOOL ANIMATE_LoadResW(ANIMATE_INFO *infoPtr, HINSTANCE hInst, LPCWSTR lpName)
static BOOL ANIMATE_LoadFileW(ANIMATE_INFO *infoPtr, LPWSTR lpName)
void ANIMATE_Unregister(void)
static BOOL ANIMATE_DrawFrame(ANIMATE_INFO *infoPtr, HDC hDC)
static BOOL ANIMATE_PaintFrame(ANIMATE_INFO *infoPtr, HDC hDC)
static BOOL ANIMATE_DoStop(ANIMATE_INFO *infoPtr)
static BOOL ANIMATE_Stop(ANIMATE_INFO *infoPtr)
#define GetProcAddress(x, y)
#define MultiByteToWideChar
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI FreeResource(HGLOBAL handle)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags)
LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
MMRESULT WINAPI mmioClose(HMMIO hmmio, UINT uFlags)
MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck, const MMCKINFO *lpckParent, UINT uFlags)
LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
HMMIO WINAPI mmioOpenW(LPWSTR szFileName, MMIOINFO *lpmmioinfo, DWORD dwOpenFlags)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
const unsigned char size_t insize
static IMMNotificationClient notif
#define mmioFOURCC(c0, c1, c2, c3)
LPBITMAPINFOHEADER outbih
COLORREF transparentColor
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
PCRITICAL_SECTION_DEBUG DebugInfo
DWORD dwSuggestedBufferSize
DWORD dwPaddingGranularity
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
#define ICMODE_DECOMPRESS
#define ICM_DECOMPRESS_GET_FORMAT
#define ICM_DECOMPRESS_BEGIN
DWORD WINAPI GetCurrentThreadId(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
int WINAPI SetDIBits(_In_opt_ HDC, _In_ HBITMAP, _In_ UINT, _In_ UINT, _In_ CONST VOID *, _In_ CONST BITMAPINFO *, _In_ UINT)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
struct tagBITMAPINFO * LPBITMAPINFO
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_CTLCOLORSTATIC
#define GetWindowLongPtrW
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define IS_INTRESOURCE(i)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI GetDC(_In_opt_ HWND)
int WINAPI GetDlgCtrlID(_In_ HWND)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)