JX Application Framework
|
#include "JAssertBase.h"
#include "JUserNotification.h"
#include "JCreateProgressDisplay.h"
#include "JStringManager.h"
#include <functional>
Functions | |
void | JInitCore (JAssertBase *ah=nullptr, const JUtf8Byte *appSignature=nullptr, const JUtf8Byte **defaultStringData=nullptr, JUserNotification *un=nullptr, JCreateProgressDisplay *cpg=nullptr) |
void | JSetWebBrowser (JWebBrowser *webBrowser) |
void | JDeleteGlobals () |
bool | JGetAssertHandler (JAssertBase **ah) |
JWebBrowser * | JGetWebBrowser () |
JUserNotification * | JGetUserNotification () |
JCreateProgressDisplay * | JGetCreatePG () |
JStringManager * | JGetStringManager () |
const JString & | JGetString (const JUtf8Byte *id) |
JString | JGetString (const JUtf8Byte *id, const JUtf8Byte *map[], const JSize size) |
bool | JGetDataDirectories (const JUtf8Byte *signature, const JUtf8Byte *dirName, JString *sysDir, JString *userDir) |
void | JSetTaskScheduler (const std::function< void(const std::function< void()> &)> &sched) |
void | JScheduleTask (const std::function< void()> &f) |
JProgressDisplay * | JNewPG () |
void JDeleteGlobals | ( | ) |
Deletes all global objects and factories, in reverse order of creation.
bool JGetAssertHandler | ( | JAssertBase ** | ah | ) |
We cannot guarantee that JInitCore was called, so we cannot guarantee that we have an object that we can return. Since assert() may be called because of arbitrary system failures, we cannot allocate an object when this function is called. Thus, we return true if we have an object.
JCreateProgressDisplay * JGetCreatePG | ( | ) |
bool JGetDataDirectories | ( | const JUtf8Byte * | signature, |
const JUtf8Byte * | dirName, | ||
JString * | sysDir, | ||
JString * | userDir | ||
) |
Only return a string after globals have been initialized.
JStringManager * JGetStringManager | ( | ) |
JUserNotification * JGetUserNotification | ( | ) |
JWebBrowser * JGetWebBrowser | ( | ) |
void JInitCore | ( | JAssertBase * | ah, |
const JUtf8Byte * | appSignature, | ||
const JUtf8Byte ** | defaultStringData, | ||
JUserNotification * | un, | ||
JCreateProgressDisplay * | cpg | ||
) |
Initializes all global objects and factories. Calls atexit(JDeleteGlobals) to ensure that all objects are cleaned up when the program terminates.
We take ownership of all the objects that are passed in. We make copies of the string data.
Passing in nullptr for ah,un,cpg means that you want the default text implementation.
Passing in nullptr for appSignature and defaultStringData means that you want to use the default U.S. string data.
Passing in nullptr for gcfm,gcc means that you get nothing, so we will explode via assert() if these objects are requested.
Passing in nullptr for the font names means that you get: defaultFontName = "Helvetica" greekFontName = "Symbol" monospaceFontName = "Courier"
|
inline |
void JScheduleTask | ( | const std::function< void()> & | f | ) |
void JSetTaskScheduler | ( | const std::function< void(const std::function< void()> &)> & | sched | ) |
void JSetWebBrowser | ( | JWebBrowser * | webBrowser | ) |