![]() ![]() You must use CoreGraphics to draw into an overlay window to preserve the transparency of the window. After creating an overlay window, you should use CGContextClearRect to clear the overlay window’s alpha channel to zero this ensures the initial transparancy of the window. Overlay windows are intended as a replacement for the pre-Carbon practice of drawing directly into the window manager port by creating a full-screen overlay window and drawing into it, you can draw over any window in any application without disturbing the contents of the windows underneath your drawing. “An overlay window is a completely transparent window positioned above all other windows. Link against amework and look in MacWindows.h. The only way I know to make a window without a titlebar is do use the undocumented NSThemeWindow class, which may of course change its API or disappear entirely with a new OS release.įirst of all, Carbon allows you to do some things with windows that Cocoa doesn’t (for instance making transparent windows opaque for events). You could probably make do with a fully transparent window without a title bar. You don’t necessarily need to have a window that is the same shape as your animation (which may be problematic since stepping your animation implies changing the shape, and hence changing the window’s shape, which may be heavy to do several times a second). ![]() That would need pattern matching to recognise items… As for interacting with folders, look into methods of getting a screenshot, and then interacting with things as they appear in your screenshot. I remember something about Apple posting an example of a program with non-standard shaped windows. ![]() I already thought of doing it with a window… for it to be in front of everything else shouldn’t be a pbm using a modal dialogue… RealBasic could do so to but custom shape window were a real pain so an animated window… cocoa seems more efficient about this… maybe I ll use my screenmate as a screensaver too but the main objective is to have it as a screenmate first Alternatively, you could try making your screenmate a ScreenSaver. I think it’s possible for background apps to have windows, though I never looked into it myself. Drawing outside of a window is simply not allowed in Mac OS X, AFAIK. (If not, it’s probably on the Apple site or something.) You could try adapting that to make a window exactly the shape of your animation, and have that romp across the screen. If you look through the sample projects installed by Developer Tools, I believe you will find one showing how to make a window in the shape of some writing. While Neko has source, it is way too complex to digest at this point.īasically, I d like to make something PC users have had for quite some time but that I couldn’t find anywhere for mac: Screenmate… yeah, it’s useless but I want it all the same… I’m coming from RealBasic, and RealBasic can’t do a screenmate… What I want is an app that would run in the background, not taking more than 5% of the processor time… The app would launch randomly some small animations of my character on the desktop… Is it possible to do such a thing with cocoa? I’m looking for some beginner level examples of how to do animations on the desktop. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |