We are a small but niche software development company that specialize in cross-platform solutions for our customers. While we use HTML for most of the front-end work, some applications require background daemons to provide services for the front-end to achieve its function.
This work is part of one such system, which has a background daemon, through running in user context started by launcherd during user sign on. The goal is to display a popup menu, on the Mac OSX desktop, displaying 10~20 text entries for the user to select. It should:
- To be integrated & callable from a C/C++ background application started by launcherd (in user context)
- Should be pure C/C++/Objective-C.
No other frameworks allowed as the process does not use any framework other than vanilla Mac API.
- The process has no UI and is a typical command line application that is started by plain old C main() and sits in a CFRunLoopRun() until termination signal is received.
- Ideally everything should be in one file, say PopupMenu.h/cpp.
- The process links to Cocoa framework. So using Objective-C is okay.
- The process has no ui, so the function should create its own required ui elements to manage the menu.
- Any UI elements created, should be cleaned up when the function returns.
- Only the popup menu should be visible. That is if the function creates temporary windows, it should not be visible to the user. And no menu bar either.
- Needless to say, the popup menu should be in the foreground no matter which application the user is using.
- The expected function prototype is std::string showPopup(std::vector<std::string> const& items, std::vector<std::string> const& labels); Both items & labels are of the same size. Labels are the menu entries to be displayed, whereas the function should return the items element corresponding to user selection.
- Both items & labels are encoded in UTF-8 and may contain non-English characters
- It should work on OSX 10.11 (El Capitan) onward to current OS X release (10.14 Mojave)
Category: IT & Programming
Subcategory: Desktop apps
What is the scope of the project?: Medium-sized change
Is this a project or a position?: Project
I currently have: I have specifications
Required availability: As needed
Required platforms: Mac OS