How does native window api display graphics?

How does qui libraries like win32, cocoa and other libraries draw their graphics? (like buttons, background etc.)

Do they use OpenGL?
Search keywords: Graphics Device Interface (GDI), Quartz, DirectX.
Topic archived. No new replies allowed.