Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does "Cinch App" do it?

If you aren't familiar with Cinch, its an application on Mac App Store that allows you to resize ANY window to half/full screen size if you drag the window to the edge of the screen. Exactly like the functionality in windows 7.

Now my question is, how is it done? I have looked all over cocoa apis looking for notifications/delegate methods for whenever a window is being dragged (ALL windows, not just windows owned by the app from which code is running from) but can't find it. Looked in Core Graphics API...Quartz Display Services....but can't find it.

Any help will be greatly appreciated as I have been looking for the past week....Thanks!

Edit: Resize the window is easy since it can be done through applescript bridge..

like image 340
user635064 Avatar asked Oct 22 '25 13:10

user635064


1 Answers

Are you developer behind i-Snap or some other Mac App Store clone of Cinch?

I'm the developer behind Cinch, and while I try to maintain an "abundance mentality" which basically says "There's enough out there for everyone", I've been upset by the Mac App Store lowering the barrier for entry to this market which has produced a number of half-backed competitors.

I would be thrilled to see some real innovation around the work I have done, and not just clones looking to make a quick buck.

Anyway, you want to look at the Accessibility APIs. It's a Carbon C API. This is probably your best reference: http://developer.apple.com/library/mac/#samplecode/UIElementInspector/Introduction/Intro.html%23//apple_ref/doc/uid/DTS10000728

like image 96
Steve Avatar answered Oct 24 '25 02:10

Steve



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!