Results 1 to 5 of 5

Thread: Window snapping Cocoa application for Mac OS X

  1. #1
    Member
    Join Date
    Jul 2006
    Posts
    82
    Thanks
    0
    Thanked
    8 times in 8 posts

    Window snapping Cocoa application for Mac OS X

    It appears to me that there currently exists no application for OS X that enables window snapping, as seen in some distributions of Linux or like allSnap does for Windows. Therefore, I have been thinking of creating such a cocoa application in Objective-C.

    I am thinking of somehow getting a list of all currently open applications, and then using an NSDistantObject call to every one of them, fetching their window details (frame origin, height, width etc).
    Then, have a listener for when a window is moved (listening for NSWindowDidMoveNotification or something) or if its dimensions change. Afterwards, somehow have the snapping program set the height and width of the window (setFrameOrigin if the window is dragged) that is changing accordingly whenever it is say 5px away from the border of another window.

    It is currently just a vague idea. Any thoughts that might make this idea more realistic/concrete, or a link to an existing window snapping application for OS X, would be much appreciated.

  2. #2
    Registered+
    Join Date
    Aug 2005
    Posts
    26
    Thanks
    0
    Thanked
    1 time in 1 post
    Well, this might get you going...

    http://bbs.applescript.net/viewtopic.php?pid=49916

    That's doing tiling for the front most app, without the snapping but it's a way to play around with placement.

  3. #3
    awm
    awm is offline
    Senior Member
    Join Date
    Apr 2006
    Location
    US
    Posts
    920
    Thanks
    4
    Thanked
    7 times in 7 posts
    I don't exactly understand what you need to do, but Grab will allow you to capture a window, its located in Applications/Utilities/

  4. #4
    Member
    Join Date
    Jul 2006
    Posts
    82
    Thanks
    0
    Thanked
    8 times in 8 posts
    I'm basically trying to create an Objective-C application that does what allSnap does for Windows. I think the way OS X handles applications and windows, and the fact that it is not open source, makes this more complex to achieve than other operating systems.

  5. #5
    awm
    awm is offline
    Senior Member
    Join Date
    Apr 2006
    Location
    US
    Posts
    920
    Thanks
    4
    Thanked
    7 times in 7 posts
    OK, I think I get what you're trying to do now. Things like NSWindowDidMoveNotification will only give you information about your windows, not those of other applications. Generally messing with other programs windows is very difficult or impossible.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Will an old application run on a dual-core PC?
    By sansannah in forum Help! Quick Relief From Tech Headaches
    Replies: 7
    Last Post: 28-09-2006, 02:32 PM
  2. Window Tints - New Legislation Planned
    By Barakka in forum Automotive
    Replies: 14
    Last Post: 05-05-2005, 03:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •