+ wxArrayVideoModes resultModes;
+
+ CFArrayRef theArray = CGDisplayAvailableModes( m_id );
+
+ for (CFIndex i = 0; i < CFArrayGetCount(theArray); ++i)
+ {
+ CFDictionaryRef theValue = (CFDictionaryRef) CFArrayGetValueAtIndex( theArray, i );
+
+ wxVideoMode theMode(
+ wxCFDictKeyToInt( theValue, kCGDisplayWidth ),
+ wxCFDictKeyToInt( theValue, kCGDisplayHeight ),
+ wxCFDictKeyToInt( theValue, kCGDisplayBitsPerPixel ),
+ wxCFDictKeyToInt( theValue, kCGDisplayRefreshRate ));
+
+ if (theMode.Matches( mode ))
+ resultModes.Add( theMode );
+ }
+
+ return resultModes;