Wine reimplements win32 and directx, etc, ot the .Net api.
edit: Straight from Wikipedia: "Wine is predominantly written using black-box testing reverse-engineering, to avoid copyright issues.[4] [4] https://forum.winehq.org/viewtopic.php?p=37364#37364 "
An API is an API and it will be the same if it is reverse engineered or copied the declaration.
And Google didn't copied without permission Sun's code, they used Apache Harmony