/***************************************************************************
                          interfaces.cpp  -  description
                             -------------------
    begin                : Mon Jan 15 2001
    copyright            : (C) 2001 by Christoph Cullmann
    email                : cullmann@kde.org
 ***************************************************************************/

/***************************************************************************
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
 ***************************************************************************/

#include "application.h"
#include "application.moc"

#include "documentmanager.h"
#include "mainwindow.h"
#include "pluginmanager.h"

#include "../app/kateapp.h"

#include <kapplication.h>

namespace Kate
{

class PrivateApplication
  {
  public:
    PrivateApplication ()
    {
    }

    ~PrivateApplication ()
    {
      
    }          
    
    KateApp *app; 
  };
            
Application::Application (void *application) : QObject ((KateApp *) application)
{
  d = new PrivateApplication;
  d->app = (KateApp *) application;
}

Application::~Application ()
{
  delete d;
}

DocumentManager *Application::documentManager ()
{
  return d->app->documentManager ();
}

PluginManager *Application::pluginManager ()
{
  return d->app->pluginManager ();
}

InitPluginManager *Application::initPluginManager ()
{
  return d->app->initPluginManager ();
}
    
MainWindow *Application::activeMainWindow ()
{
  return d->app->activeMainWindow ();
}
    
uint Application::mainWindows ()
{
  return d->app->mainWindows ();
}
 
MainWindow *Application::mainWindow (uint n)
{
  return d->app->mainWindow (n);
}

Application *application ()
{
  return ((KateApp *)kapp)->application ();
}

}

