custom cursor in QC

volkerk's picture

is there a way to set a custom cursor dynamically in QC?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

itsthejayj's picture
Re: custom cursor in QC

not too sure what kind of dynamics your looking for here. But could you not just connect a sprite with an image to the mouse patch's x, and y? + hide mouse in qcs preferences.

sorry if i've misunderstood your question

PreviewAttachmentSize
cursor.qtz24.32 KB

cwright's picture
Re: custom cursor in QC

Assuming itsthejayj's solution isn't satisfactory, no, there is no support for cursor modification in the QC framework. It has to be handled by an external application.

volkerk's picture
Re: custom cursor in QC

yeah, i was looking for a system level support for cursors within qc. itsthejayj's solution is a workaround, but you would still have to hide the actual arrow cursor and make sure it appears again outside the composition. would be a useful plugin. volker

cwright's picture
Re: custom cursor in QC

this can be a risky operation, only because apps that don't expect their cursor to get modified won't have anything in place to restore normal operation. for example, QuartzCrystal, KeyNote, or iTunes. It might work without any problems, but I can't guarantee that (I'll need to read up on cursor handling stuff a bit more -- there are a few tricky lines to deal with quirks in QuartzBuilder, and that's just for visibilty control).

dust's picture
Re: custom cursor in QC

i know in leopard if you built a quartz builder application and sent the application window to the desktop level and checked off hide mouse it would give you more of a system wide custom pointer. things seem to work different in snow leopard where it only seems to work if the app is focused. you can do a lot of things to cursors within the context of your quartz application or any application for that matter. i'm not sure why apple only lets you change the size system wide but if actually do a search in the apple documentation for "pointer" you will find what you need plus a bunch of other stuff you didn't know you needed. i think most of mouse cursor stuff is in the hid frameworks. just search sample code for hid and you'll pull up some useful things. there used to be an apple mouse patch for max msp that had a warning with it. "use at your own risk" changing the pointer won't hurt anything but soon as you start messing with the positioning things can get messy.

dust's picture
Re: custom cursor in QC

there is also display options in the cg context as well. to hide a cursor you use something like this in you application.

CGDisplayHideCursor(CGDirectDisplayID display)

cwright's picture
Re: custom cursor in QC

sadly, it's not that simple.

Calling that will indeed hide the cursor. But only for as long as the app has focus. Once it's unfocused/refocused, it'll redisplay the cursor. You have to trap the focus/unfocus events, and then recall that function as necessary, manually. QC plugins have absolutely no notion of focus/unfocus, so handling those events is impossible. As such, making a plugin that makes use of that function will only work as long as the user never clicks on another application (including Finder).

dust's picture
Re: custom cursor in QC

i don't know if this does what you want. this is a file chris made that has been floating around its an example of how to go full screen with a quartz application, i modified it very slightly. had to override some nswindow stuff to get mouse events into the window without clicking.

if you go >window full screen it will hide your mouse making the particle system your cursor. not sure if this is what your looking for.

i made an apple script plugin for quartz composer that will let you do more system wide things. i suppose you could make a quartz application and set the window level to cursor level so your custom cursor stays on top of everything with a clear background then just make your pointer really small or use the apple script plugin to hide the cursor. maybe that way you could have a custom cursor with quartz. seems a bit tricky to me and might actually not really be a qc solution but its entirely possible to have an animated cursor. programs like mighty mouse and stuff do this all ready.

i would just buy quartz builder for now, it streamlines the operation for you.

PreviewAttachmentSize
QCFullscreen.zip1.18 MB