Windows + MAC screensaver with cocos2DX

Hi, I am looking in to cocos2DX as a solution to create a cross platform screensaver.
Has someone done such a project?

The launch, the shutdown and the “game loop” of a screensaver is a bit different from the other applications.
The operating system creates a window in which drawing must be done by the screensaver.
In windows the window is a HWND and in MAC is a NSWindow or an NSView
Under MAC, the timer for the animation is provided by the system so it must not be a normal game loop inside the app.

I am writing to ask if someone has bits of code to show how a screensaver can be initialized to make the Cocos2Dx drawing on the window handle that is supplied by the operating system.

thanks
Mike