Logo Search packages:      
Sourcecode: blender version File versions

OSStatus GHOST_SystemCarbon::sEventHandlerProc ( EventHandlerCallRef  handler,
EventRef  event,
void *  userData 
) [static, protected]

Callback for Carbon when it has events.

Definition at line 954 of file GHOST_SystemCarbon.cpp.

References handleKeyEvent(), handleMouseEvent(), and handleWindowEvent().

Referenced by init().

{
      GHOST_SystemCarbon* sys = (GHOST_SystemCarbon*) userData;
    OSStatus err = eventNotHandledErr;

    switch (::GetEventClass(event))
    {
            case kEventClassAppleEvent:
                  EventRecord eventrec;
                  if (ConvertEventRefToEventRecord(event, &eventrec)) {
                        err = AEProcessAppleEvent(&eventrec);
                  }
                  break;
        case kEventClassMouse:
            err = sys->handleMouseEvent(event);
            break;
            case kEventClassWindow:
                  err = sys->handleWindowEvent(event);
                  break;
            case kEventClassKeyboard:
                  err = sys->handleKeyEvent(event);
                  break;
    }

    return err;
}


Generated by  Doxygen 1.6.0   Back to index