I m trying to register for CGScreenRefreshCallback and CGScreenUpdateMoveCallback ( here s what apple s saying about http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/Reference/reference.html#//apple_ref/doc/uid/TP30001070-CH1g-F16970 ) using C++ only.
我写了这一复电的简单测试器,以便检索不断变化的试金:
#include "ApplicationServices/ApplicationServices.h"
#include <iostream>
using namespace std;
/////////////HEADER
static void DHRefreshCallback (CGRectCount count,const CGRect * rectArray,void * userParameter);
///////////////////
int main (int argc, char * const argv[]) {
CGRegisterScreenRefreshCallback(DHRefreshCallback, NULL);
while (true) {
// just hanging
}
return 0;
}
static void DHRefreshCallback (CGRectCount count,const CGRect * rectArray,void * userParameter){
cout << "something changed" << endl;
return;
}
......但是没有工作。
我知道,我需要与WowServer(Quartz Compositor Quartz extreme Quartz 2D......still can tates out the differences)联系,并且需要一丝不).,以便获得这些呼吁,但我确实不知道在C++中如何做到这一点(根本就没有目标C)。
任何方向?
thx in advance, pigiuz