Is there a Mac/Xcode equivalent to the Windows Workarea? - xcode

I am creating a toolbar on Windows that is being ported over to the Mac, is there such a concept as a workarea on the Mac, like there is on Windows.
If you are unfamiliar of what the workarea on Windows is, it is basically a defined space that all open windows can re-size in. Meaning normally you can re-size your windows to fill the whole screen, but if I change the workarea to a smaller size when you try to maximize your open windows they will stop at the boundaries of the new workarea. For example the Windows taskbar does this. If you move your windows taskbar up or down, then this affects how much space you have left for open windows to utilize, the taskbar is changing your workarea dimensions.
Windows uses the following function SystemParametersInfo with SPI_SETWORKAREA passed into to change the size of a workarea. Is there an equivalent to this on the Mac?
Thanks.

Yes, there is a mechanism in OS X to keep maximized windows from overlapping the Dock. Look at NSScreen's -visibleFrame method.

Related

mating emacs buffers to grouped windows in Windows

I imagine this is too platform-specific and may need to be 'hacked on' to emacs rather than being a preexisting feature (if it even can be done)... but I'll ask anyway.
You know how Windows can aggregate all the windows associated with a given process (whether multiple instances of the process or multiple windows tied to the same process) into a single icon on the taskbar?
I'm wondering if I can have a single emacs process and a single window but multiple buffers open, and be able to see each buffer represented as a window when I hover over the emacs icon on the taskbar--when I click on the virtual window from the taskbar corresponding to a given buffer, it switches to that buffer in the process window and pops it?
Nope, I don't think this is possible, at least not out of the box.
Actually, what you see grouped under the same task-bar icon is the list of Emacs frames, not windows or buffers. MS Windows knows nothing about Emacs buffers or windows. It knows Emacs frames as MS Windows windows.

How can I tell if the taskbar is using small icons

I'm looking for a way to detect if the user is using small icons :
I couldn't find anything in GetSystemMetrics \ SystemParametersInfo.
I tried to use the "Running applications" window's size :
it works fine when the taskbar's orientation is bottom\top, but when it's left\right this window takes the entire taskbar width.
Any ideas?
Deskbands are not quite dead on Windows, but they are on life-support. First make sure if you don't want to take advantage of thumbnail toolbars, ITaskbarList3::ThumbBarXxx() functions.
I'm not aware of an api to read back the button size setting. There's a backdoor you can use, these configuration settings are always saved to the registry. Run SysInternals' ProcMon utility and change the setting. On my machine (Windows 8), out popped this registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarSmallIcons
That almost surely works, I can't guarantee anything beyond Windows 8 of course.

How to hide a window in Windows 7, just like desktop managers do

When I install a virtual desktop manager on Windows 7, and I switch to a different virtual desktop, all the current windows disappear, also disappearing from the Start Menu.
I want to hide some of a particular application's windows, but not all of them, in a similar manner. How can I hide a window like this?
In particular, I need to hide a VirtualBox Seamless mode window, so I'm not sure minimizing the window will work. It does, however, disappear when using virtual desktop managers.
The same window cannot appear on multiple desktops. If you need your application window to appear on multiple desktops you need to create a separate window for each desktop. The desktop a window appears on depends on the thread that creates the window. You can change the desktop thread assignment using the SetThreadDesktop function.
The answer is simply ShowWindow(SW_HIDE) and ShowWindow(SW_SHOW). I think "Virtual Desktop Managers" just hide windows and show them as necessary when the desktops change.

How do I get the size of all windows on the screen in windows 7?

I am trying to write a program that gets the windows that are displayed on the screen. Something like screen.getActiveWindow().size would be cool, but it only addresses the active window.
I am looking for the sizes of all windows on the screen, as well as event information when they are resized, cover each other up.
Am I just daydreaming or is there a way to get this information on windows?
You need to use EnumWindow Function go get the hwnd of each window then user EnumChildWindow to get the child windows and finally get windowinfo the clr doesn't have all of the necessary function to do low level window manipulation unless its been added in 4.0 and I haven't noticed.

Mac OS X vs. Windows mouse wheel scrolling

Mac OS X determines what area to scroll by the mouse position. Windows does this by what application is active.
So I thought anyway. If Notepad++ is the active application in Windows, I can scroll underlying applications by placing the mouse pointer on them. But this seems like the only application with this behaviour. Windows Explorer (Win7) doesn't even allow scrolling in the side pane if the pane is not active.
My question is, can this be controlled by developers, and why is Windows behaving like this? I am not about to make a Windows application, but as a developer this makes me curious (and annoyed).
There are a number of applications that do the focus-window-under-mouse, but I like Alt-Drag: http://code.google.com/p/altdrag/
Since the code is Open Source, you may find something reusable there.

Resources