[cairo] drawing to desktop
Baz
brian.ewins at gmail.com
Mon Oct 22 17:41:43 PDT 2007
On 22/10/2007, Behdad Esfahbod <behdad at behdad.org> wrote:
> On Mon, 2007-10-22 at 17:37 -0400, Travis Griggs wrote:
> > I've got bindings in Smalltalk for drawing with Cairo to windows or
> > pixmaps on X/OSX/Win32. I'd like to toy with drawing straight to the
> > desktop. Is this doable? I think I know how to get an HDC for the
> > Screen in Win32. But no clue how to do the equivalent in X or OSX.
> > Anyone done this and have any (pseudo)code to share?
>
> Humm, not my stuff, but how about RootWindow() and RootWindowOfScreen?
> Then pass that to cairo_xlib_surface_create() as Drawable.
>
There's some code here that does this, more or less, on the mac:
http://www.extremetech.com/article2/0,1697,1842608,00.asp
It actually creates a borderless window and places it underneath
everything. The main trick (buried in all that code) is
[myNSWindow setLevel:
CGWindowLevelForKey(kCGDesktopWindowLevelKey)];
which is what buries the window.
Hope this helps,
Baz
More information about the cairo
mailing list