Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

robj

macrumors regular
Original poster
Dec 23, 2009
230
0
Madrid, Spain
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 ;)
 
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.
 
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.

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.
 
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.
 
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.

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 :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.