cocoa help, getting screen info

Discussion in 'Mac Programming' started by MacRumoron, Jan 29, 2006.

  1. macrumors 6502

    Joined:
    Sep 6, 2005
    #1
    Hi, i was just wondering if it were possible to know what color pixel the cursor is hovering over??

    Anyone know the code to do this?

    Thanks :D
     
  2. macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #2
    Eek, I don't think this can be done in Cocoa. You can use Cocoa to get the cursor coordinates, though. Look into NSWorkspace i think. As far as pixel color, assuming you want to grab a pixel from *any* application and not just your own, you're going to have to grab the backing store from the window server. Try looking on dev.apple.com for the window server and aqua documentation, also try posting this question to the newsgroup comp.sys.mac.programmer.help.

    Good luck
     
  3. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3

Share This Page