Skip to content

Commit

Permalink
libdeng2|App: Added audience for startup completion
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 9, 2013
1 parent df2299c commit 13c1941
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doomsday/client/src/dd_main.cpp
Expand Up @@ -1782,6 +1782,13 @@ void DD_FinishInitializationAfterWindowReady()
exit(2); // Cannot continue...
return;
}

/// @todo This notification should be done from the app.
for(de::App::StartupCompleteAudience::Loop iter(de::App::app().audienceForStartupComplete);
!iter.done(); ++iter)
{
iter->appStartupCompleted();
}
}

/**
Expand Down
6 changes: 6 additions & 0 deletions doomsday/libdeng2/include/de/core/app.h
Expand Up @@ -58,6 +58,12 @@ class DENG2_PUBLIC App : DENG2_OBSERVES(Clock, TimeChange)
};
Q_DECLARE_FLAGS(SubsystemInitFlags, SubsystemInitFlag)

/**
* Observers to be notified when application startup has been fully
* completed.
*/
DENG2_DEFINE_AUDIENCE(StartupComplete, void appStartupCompleted())

public:
/**
* Construct an App instance. The application will not be fully usable
Expand Down

0 comments on commit 13c1941

Please sign in to comment.