Wine, WineLib and "Programming Windows 95"
Last updated: 2003/5/4
Description
Display a bezier curb. The two endpoints are kind of in the middle
of the window and when you click and move the mouse you move the endpoint's
tangent and its weight. The left button affects the left endpoint and the
right mouse button affects the right endpoint. If the mouse moves outside
the window its movements are ignored. If the window is resized the bezier
curve returns to its default configuration.
Wine tests
Winelib tests
Tested API
- GDI32
GetStockObject, LineTo, MoveToEx, PolyBezier, SelectObject
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetDC, GetMessageA, InvalidateRect, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ReleaseDC, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Draws a clover occupying the whole surface of the window with lines
starting from its center.
Wine tests
- There is a serious drawing bug. The clover is not
fully drawn.
Winelib tests
Tested API
- GDI32
CombineRgn, CreateEllipticRgn, CreateRectRgn, DeleteObject, GetStockObject, LineTo, MoveToEx, SelectClipRgn, SetViewportOrgEx
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetStringTypeA, GetStringTypeW, GetVersion, HeapAlloc, HeapCreate, HeapFree, LCMapStringA, LCMapStringW, LoadLibraryA, MultiByteToWideChar, RaiseException, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, SetCursor, ShowCursor, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Prints out the characteristics of the screen device. This is the
equivalent of sysmets1 (no scrollbar).
Wine tests
- The value of PDEVICESIZE is 140 instead of 0.
Is that normal ?
- All the values above are hardcoded in graphics/x11drv/init.c:148 in
the X11DRV_DevCaps array.
Winelib tests
Tested API
- GDI32
GetDeviceCaps, GetStockObject, GetTextMetricsA, SetTextAlign, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetDC, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ReleaseDC, ShowWindow, TranslateMessage, UpdateWindow, wsprintfA
Last updated: 2001/4/1
Description
Displays a crossed rectangle at the center of the window using the
metafile functionality. Note that the cross does not quite fit the top and
bottom right corners of the rectangle.
Wine tests
Winelib tests
Tested API
- GDI32
CloseEnhMetaFile, CreateEnhMetaFileA, DeleteEnhMetaFile, GetStockObject, LineTo, MoveToEx, PlayEnhMetaFile, Rectangle
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetClientRect, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Same as emf1 except that the metafile is saved on disk in the 'emf2.emf'
file, and then read from there.
Wine tests
- The file created on disk (emf2.emf) is 252 bytes
in size instead of 232. Note that I get 244 on NT4 and that it used to be
244 bytes with an older version of Wine.
Winelib tests
Tested API
- GDI32
CloseEnhMetaFile, CreateEnhMetaFileA, DeleteEnhMetaFile, GetEnhMetaFileA, GetStockObject, LineTo, MoveToEx, PlayEnhMetaFile, Rectangle
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetClientRect, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
This example draws three 'V' formed of two segments each. For doing so it
uses BeginPath, EndPath and StrokePath so that the joint between the two
segments is drawm according to specific rules. The first 'V' has round ends
and a round joint, other two have 'square' ends and respectively a flat
joint and a sharp joint. See the screenshot
for more details.
Wine tests
- The segment ends are drawn correctly except that
the joint is done incorrectly. See
bug #11.
Winelib tests
Tested API
- GDI32
BeginPath, DeleteObject, EndPath, ExtCreatePen, GetStockObject, LineTo, MoveToEx, SelectObject, SetMapMode, SetViewportExtEx, SetWindowExtEx, StrokePath
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Displays a text of Balzac (in the French edition) with a ruler on top and
on the left. The text is justified. There is no scrollbar.
Wine tests
- The justification is not very accurate. There is
almost a character difference between lines. See bug #50.
- The text looks absolutely ugly (compare it to
this). My font configuration may not
be optimal but X's lack of anti-aliasing is partly responsible too.
Winelib tests
Tested API
- GDI32
CreateFontIndirectA, DPtoLP, DeleteObject, GetDeviceCaps, GetStockObject, GetTextExtentPoint32A, GetTextMetricsA, LineTo, ModifyWorldTransform, MoveToEx, RestoreDC, SaveDC, SelectObject, SetGraphicsMode, SetMapMode, SetTextJustification, SetViewportExtEx, SetViewportOrgEx, SetWindowExtEx, SetWindowOrgEx, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetStringTypeA, GetStringTypeW, GetVersion, HeapAlloc, HeapCreate, HeapFree, LCMapStringA, LCMapStringW, LoadLibraryA, MultiByteToWideChar, RaiseException, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetClientRect, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Draws a rectangle, an inscribed ellipse, another nested rectangle with round corners this time, and diagonals stopping on the ellipse.
Wine tests
Winelib tests
Tested API
- GDI32
Ellipse, GetStockObject, LineTo, MoveToEx, Rectangle, RoundRect
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Displays a 10x10 array of rectangles containing a blue ellipse with
diagonals stopping on the ellipse.
Wine tests
Winelib tests
Tested API
- GDI32
CloseMetaFile, CreateMetaFileA, CreateSolidBrush, DeleteMetaFile, DeleteObject, Ellipse, GetStockObject, LineTo, MoveToEx, PlayMetaFile, Rectangle, SelectObject, SetMapMode, SetViewportExtEx, SetWindowExtEx, SetWindowOrgEx
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2000/12/2
Description
Displays random rectangles of random colors (they seem to be taken
from the Windows palette though) and sizes. When one moves the window
around or resizes it the display is suspended and restarts after the
operation is finished.
Wine tests
- The display is fast. I would say as fast as on Windows though
it's hard to judge since I cannot get both displayed on the same
hardware at the same time.
- In managed mode the display stops when resizing the window but
it continues when just moving the window around. Better than Windows.
Isn't it cool?
Winelib tests
Tested API
- GDI32
CreateSolidBrush, DeleteObject, GetStockObject
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
CreateWindowExA, DefWindowProcA, DispatchMessageA, FillRect, GetDC, LoadCursorA, LoadIconA, PeekMessageA, PostQuitMessage, RegisterClassExA, ReleaseDC, SetRect, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Divides the screen (yes, the screen, not the window) in a 10x10 array of
rectangles. Then it performs 200 random swaps of the cells and again 200
reverse swaps. So the screen should be back as it was initially when the
program stops.
Wine tests
- Be prepared to do a screen refresh after the program is finished.
- This pretty much works. But LockWindowUpdate is
not implemented so if applications such as gkrellm are running there is
some corruption. See bug
#52.
- The application is supposed to lock screen updates while it runs. I
don't suppose this is possible under X. Anyway there are still updates
while the program is running.
Winelib tests
Tested API
- GDI32
BitBlt, CreateCompatibleBitmap, CreateCompatibleDC, CreateDCA, DeleteDC, DeleteObject, SelectObject
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetTickCount, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, Sleep, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
GetDesktopWindow, GetSystemMetrics, LockWindowUpdate
Last updated: 2003/5/4
Description
Draws the first period of a sinusoid.
Wine tests
Winelib tests
Tested API
- GDI32
GetStockObject, LineTo, MoveToEx, Polyline
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetStringTypeA, GetStringTypeW, GetVersion, HeapAlloc, HeapCreate, HeapFree, LCMapStringA, LCMapStringW, LoadLibraryA, MultiByteToWideChar, RaiseException, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2001/2/28
Description
Displays various metrics about the window.
Wine tests
- Works fine. I did not check that the metrics were accurate
though. This is what I get on Windows.
- The results in managed mode are slightly
different from the non-managed mode. Is this normal? As I understand it
in managed mode the inside of the window is of the size the application
asked for while in non-managed mode we substract the window's
decorations.
Winelib tests
Tested API
- GDI32
DPtoLP, GetStockObject, GetTextMetricsA, RestoreDC, SaveDC, SelectObject, SetMapMode, SetViewportExtEx, SetWindowExtEx, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetClientRect, GetDC, GetMessageA, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ReleaseDC, ShowWindow, TranslateMessage, UpdateWindow