I have a project using FireBreath and Gstreamer to build my own plugin on Mac.
My plugin chooses Core Graphics to show my video from Gstreamer, and my situation is that Gstreamer opens the other new openGL window to show my video.
This window should be embedded in the browser.
There is a Gst_video_overlay function in Gstreamer, and I could pass the window ID to make my video on specific window. but I have no idea how to get the specific window ID in the browser?
I'll give you the short answer: You can't.
The Window ID belongs to a different process, so it's not something you can use anyway.
The only way you can use OpenGL in a NPAPI plugin on Mac (at least since carbon went away and it switched to cocoa) is to use CoreAnimation and use a OpenGLCALayer
Related
I would like to create a preferences window like in the standard Mac OS X apps (Safari etc.). I have found resources like DBPrefsWindowController from back in 2008 that matches the Apple HIG.
Just wondering if there is a new way to accomplish this? I can't locate any standard windows in Interface Builder so I assume Apple doesn't provide those, nor can I locate a official Apple sample code for providing this standard UI.
Thank you
It seems DBPrefsWindowController is no longer available.
For now, I would recommend the up to date RHPreferences framework.
Available on GitHub. BSD Licensed.
It’s a simple and easy Preferences window controller with multiple tabs for your next Mac application.
It also provides:
Auto resizing between different sized tab views (With animation)
Custom NSToolbarItem support
Persistence of the last used tab
Support for placeholder NSToolbarItems (eg NSToolbarFlexibleSpaceItemIdentifier & NSToolbarShowFontsItemIdentifier)
Is there a way to get an NSWindow reference from its id from an AIR extension?
I am making an Adobe Air app which is supposed to stay always on top. It is for kids so you can give a computer to them and they can't exit the app. The problem is that the default "alwaysOnTop" property of air applications doesn't work. What I am planning to do is use a native extension to get the Air window id and then try and set the level. I've already checked with the accessibility API but apparently there is no way of doing it that way. I could be wrong, though.
I found a way. Just use the global NSapp variable to get the main window from inside an Air native extension. Then call setLevel on that window and that's it.
I don't know what to call it, but you know that greenish thing covering most of the middle of the top of the iTunes window, that shows the apple symbol or shows the music slider or the status etc., what is it? I've seen several other applications using it -- how do you get it? I couldn't find it in Interface Builder.
Thanks.
It's not available as a standard component (yet). iTunes is not even a Cocoa app (well, some part of it is Cocoa, but not much.). A few other Apple apps have similar interface element, so let's hope it'll become available in the next version.
I'm trying to get started with OpenCV by trying to write a simple screen recorder -- one that can perform continuous or polled capture of a GUI window on Mac. For example, I could capture the client area of a browser window.
I'm sure this is possible, but I don't know where to start -- any pointers? Is the framegrabber to read the GUI window an OSX/Cocoa thing, or an OpenCV call?
You'll have to deal with the operating system you're dealing with. I've seen some software where they install a driver. It emulates a camera and streams your desktop into the camera. That way you can use OpenCV's functions to get access to the desktop.
I think you'll have to deal with MacOSX components as CoreVideo... and to make some objective-c bindings.
I want to build a desktop app where the size of both the window and the content is resized automaticly according to the resolution of the monitor. I know it can be done easily with the docking features of .NET Forms, but my customer insists on going with Linux so I can't use it.
I tried Flex & Air, but the content is not resized automaticaly when I put the app in fullscreen or in another resolution (the app goes full screen but I still have tiny buttons). Now, I am looking at Qt and Gtk...
Is there a GUI framework that can do that? I don't care about the programming language.
Also, since the app will go in a bar it would be nice to be able to customize easily the skin. (like in Flex, WPF, etc.)
Regards,
Pascal
An excellent place to start is understanding how the Screen class works: MSDN Even though that is .Net, it will give you an idea of how the screen size, dpi, etc. can be obtained. In addition that information should translate to the Mono platform. Since your client is insisting on Linux, you should look at MonoDevelop and then possibly the GTK# framework. My understanding is that GTK# is not a very friendly (that is pretty) development system (yet).
See:
MonoDevelop
GTK#