Logo Search packages:      
Sourcecode: blender version File versions

GHOST_TSuccess GHOST_SystemCarbon::init (  )  [protected, virtual]

Initializes the system. For now, it justs registers the window class (WNDCLASS).

Returns:
A success value.

Reimplemented from GHOST_System.

Definition at line 603 of file GHOST_SystemCarbon.cpp.

References GHOST_System::init(), m_handler, sAEHandlerLaunch(), and sEventHandlerProc().

{
    GHOST_TSuccess success = GHOST_System::init();
    if (success) {
            /*
         * Initialize the cursor to the standard arrow shape (so that we can change it later on).
         * This initializes the cursor's visibility counter to 0.
         */
        ::InitCursor();

            MenuRef windMenu;
            ::CreateStandardWindowMenu(0, &windMenu);
            ::InsertMenu(windMenu, 0);
            ::DrawMenuBar();

        ::InstallApplicationEventHandler(sEventHandlerProc, GetEventTypeCount(kEvents), kEvents, this, &m_handler);
            
            ::AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, sAEHandlerLaunch, (SInt32) this, false);
            ::AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, sAEHandlerOpenDocs, (SInt32) this, false);
            ::AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments, sAEHandlerPrintDocs, (SInt32) this, false);
            ::AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, sAEHandlerQuit, (SInt32) this, false);
    }
    return success;
}


Generated by  Doxygen 1.6.0   Back to index