开发者

Cocoa vs Carbon

What would be the Cocoa equivalent for this code?

#include <Carbon/Carbon开发者_开发问答.h>
void check_apple_events() {
    printf("check_apple_events\n");
    RgnHandle cursorRgn = NULL; 
    Boolean gotEvent=TRUE; 
    EventRecord event; 
    while (gotEvent) { 
        gotEvent = WaitNextEvent(everyEvent, &event, 0L, cursorRgn); 
    }
}


Start by reading the How Cocoa Applications Handle Apple Events portion of the Cocoa Scripting Guide. Then read the rest of it and ask a more focused question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜