Globally hide mouse cursor in Cocoa/Carbon? - cocoa

Is there a way to globally hide the mouse cursor for all apps in Cocoa (or Carbon)? Or at least replace it with something else?
EDIT: Thanks for the input guys, but turns out Daniel Jalkut found the solution a while ago :) http://lists.apple.com/archives/carbon-dev/2006/Jan/msg00555.html

You are looking for CGDisplayHideCursor, which is part of the Quartz Display Services API.

Check out: http://developer.apple.com/legacy/mac/library/samplecode/CarbonCocoa_PictureCursor/listing2.html
It's an old sample, but probably still works.
I expect that you're going to be limited to your application window, however. If you want to hide it for everyone you will probably have to make your window cover the screen.
Fun fact: The old toolbox function was simply "HideCursor()".

just add this to your code:
CGDisplayHideCursor (kCGNullDirectDisplay);

No, I don't believe there's a way of doing what you want, short of showing a full screen window and then obscuring absolutely everything on the desktop. That would also prevent e.g. keystrokes being sent to the right application and the like.

Related

How can I have Gnome terminal effects for XFCE?

Surely, this is documented somewhere. I for some reason or another cannot find the answer for this.
Most people are wanting to make their terminals completely transparent, I however want the effects where you see the desktop background. I am certain that this is default for gnome. What is this effect called and How can I get this in XFCE?
I was told that installing something like Terminator would resolve this but its just the true transparency which looks messy with a ton of windows and stuff going on.
Here is an example of what I am wanting for XFCE.
http://i.imgur.com/zy1EBdS.png
Thanks in advance !
The simple way could be opening your xfce4-terminal and going to Edit->Preferences->Appearance->Background and then chose a Background image to show instead of a Solid Color or Transparent. In example.
In the Xubuntu version that I have solved this issue accidentally. I had to go to manage settings menu -> Window Manager Tweaks -> Compositor(tab)
and uncheck Enable Display Compositing
Now I can have the terminal just show the desktop background instead of every thing that is messy behind it.

NSPopover - hiding standard window possible?

In my Mac app, I want to use a NSPopover, activated by a NSStatusItem. Activating works like a charm, but I would like to get rid of the standard window (white or HUD), that is provided by the NSPopover, and use my own view instead. Does anyone know if that is possible?
Thanks
no, it is not possible -- we tried hard and ended up reverting to the 10.7 way of using a custom class.. check MAAttachedWindow
well with enough swizzling and posing it'd be possible of course... but that is very evil and at least as much work as your own class!

How to trigger the On-Screen-Keyboard in Windows 7 by clicking on an input?

Well, I'd like to show up the On-Screen-Keyboard when the user clicks onto any control which needs a text-input. System-wide.
The reason: I am using a touchscreen for some projects I've been working on and needed to open the On-Screen-Keyboard manually every time me or someone else had to type something.
Are there any possibilities, capturing a system-wide event for that? Thanks in advance for your help and suggestions!
I am currently looking into a solution like this. It's been a feature well implemented on mobile platforms, but nothing on the desktop! Hopefully something will come along as a result of the Touch Centric strategy for Windows 8.
The closest, but most expensive thing I found is M T Soft TS Keyboard http://www.imgpresents.com/mtsts/mtsts.htm?babelfish=translate

How to make an NSPanel immovable

Hey all, quick question that has been bugging me about NSPanel. I like the look of The NSPanel HUD but for the project I am doing I need the Panel to not be moved. Does anyone know of any possible solutions to make it were my NSPanel cannot be moved at all but maintain its buttons interactivity? I've been searching for any questions similar to this for awhile now. Any insight on the issue would be helpful! Thanks.
Don't forget to look in superclasses. A panel is a kind of window, and since Mac OS X 10.6, it's possible to set a window's movable property to NO.
I'm with Dave DeLong, though: I hope you have a good reason to break this functionality. Users expect to be able to move windows, especially those with title bars and HUD windows by their backgrounds, out of their way. And remember, you're not the only application on the system; the user may have something important to get to in a window in another application.

Editable CATextLayer?

I have several CATextLayers. When I doubleclick one of them, I want to be able to edit it's string. Think of text as it's handled in Keynote or many other apps. Any ideas?
I thought of putting an editable textfield right in front of the layer and then dismiss it on enter, but I didn't get far. :-(
I target Mac OS X 10.5 with Objective-C 2.0 and Garbage Collection.
Any help or pointers would be greatly appreciated. Thanks in advance!!
I think your approach using an editable NSTextFieldCell is the right way to go. It's not a trivial task, but you can do it.

Resources