2010-03-30 11:34:37 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 et sw=2 tw=80: */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-03-30 11:34:37 +00:00
|
|
|
|
|
|
|
#ifndef nsQAppInstance_h
|
|
|
|
#define nsQAppInstance_h
|
|
|
|
|
2011-10-18 00:53:37 +00:00
|
|
|
// declared in nsAppRunner.cpp
|
|
|
|
extern int gArgc;
|
|
|
|
extern char **gArgv;
|
2010-03-30 11:34:37 +00:00
|
|
|
|
2011-10-18 00:53:37 +00:00
|
|
|
class QApplication;
|
|
|
|
class MComponentData;
|
2010-07-29 01:05:08 +00:00
|
|
|
class nsQAppInstance
|
2010-03-30 11:34:37 +00:00
|
|
|
{
|
|
|
|
public:
|
2011-10-18 00:53:37 +00:00
|
|
|
static void AddRef(int& aArgc = gArgc,
|
|
|
|
char** aArgv = gArgv,
|
|
|
|
bool aDefaultProcess = false);
|
2010-03-30 11:34:37 +00:00
|
|
|
static void Release(void);
|
|
|
|
|
|
|
|
private:
|
2010-07-29 01:05:08 +00:00
|
|
|
static QApplication *sQAppInstance;
|
2011-10-18 00:53:37 +00:00
|
|
|
static MComponentData* sMComponentData;
|
2010-03-30 11:34:37 +00:00
|
|
|
static int sQAppRefCount;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsQAppInstance_h */
|