Low Level Display Programming

Discussion in 'Mac Programming' started by robj, Dec 24, 2009.

  1. robj macrumors regular

    Joined:
    Dec 23, 2009
    Location:
    Madrid, Spain
    #1
    Hello!

    I want to access low level features of the OS, mainly the ones related with display detection features.

    My purpose is to call the function that detect displays and then try to shut down a display.

    I don't know where to start reading documentation, I have read this link inside mac dev center.

    In which language do I need to develop this? , C / C++ / ObjC?

    Do you know where is the API to control this things?

    Thanks in advance ;)
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    I'm not sure you'll be able to do this without a lot of work. The display drivers will be closed source drivers. Finding out exactly what does what will require writing a dummy display driver.

    From recollection that is likely to mean writing your own KEXT or maybe an IO Kit driver (I forget which one deals with displays and graphics but I think it is KEXTs).

    Also note that writing a KEXT requires two Macs for remote kernel debugging.
     
  3. robj thread starter macrumors regular

    Joined:
    Dec 23, 2009
    Location:
    Madrid, Spain
    #3
    That sounds a little scary :eek:

    isn't there any interface that those display drivers expose to the user space?

    What I want to do is the same when you open Display Preferences and click on "Detect Displays".

    Maybe this could be a good start point to start digging.
     
  4. larkost macrumors 6502a

    Joined:
    Oct 13, 2007
    #4
    I dont' believe that this is exposed anywhere in an API, and once you are there, then I don't believe that any API will let you shut down a display. These are things that are completely managed by the OS, and are not usually considered things that programs should be playing with.


    Now if you were to explain to us what you are really after (not how you are trying to solve the problem, but what the problem actually is), then there is a better chance that someone can help you.
     
  5. robj thread starter macrumors regular

    Joined:
    Dec 23, 2009
    Location:
    Madrid, Spain
    #5
    What I want to explore is why when i plug the external display adapter to my MB Mini Display Port nothing happens. The idea was calling the function that detect displays by myself and inspecting the return value.

    And the other thing is If there is a way to programmatically shutdown the MB main display while using external one. For now, the only way to accomplish this is using the MB with the lid closed. ( or waking it up using external USB device ).

    I'm not sure if all of this is possible, that's why I wanted to learn how OSX does this things :)
     

Share This Page