/***************************************************************************
                            kde_KApplication.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "kde_KApplication.h"
}

#include <kapplication.h>

class KApplicationBridge : public KApplication
{
public:
	KApplicationBridge(bool allowStyles, bool GUIenabled) : KApplication(allowStyles, GUIenabled) {}
	KApplicationBridge(Display* display, int& argc, char* * argv, const QCString& rAppName, bool allowStyles, bool GUIenabled) : KApplication(display, argc, argv, rAppName, allowStyles, GUIenabled) {}
	KApplicationBridge(int& argc, char* * argv, const QCString& rAppName, bool allowStyles, bool GUIenabled) : KApplication(argc, argv, rAppName, allowStyles, GUIenabled) {}
	~KApplicationBridge() {}
	KApplicationBridge(bool allowStyles, bool GUIenabled, KInstance* _instance) : KApplication(allowStyles, GUIenabled, _instance) {}
	bool  protected_x11EventFilter(XEvent* arg1) {
		return (bool ) KApplication::x11EventFilter(arg1);
	}
	void childEvent(QChildEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "childEvent", arg1, "QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "customEvent", arg1, "QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "timerEvent", arg1, "QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
};

kde_KApplication * kde_new_KApplication(int allowStyles, int GUIenabled){
	return (kde_KApplication *) new KApplicationBridge((bool)allowStyles, (bool)GUIenabled);
}
kde_KApplication * kde_new_KApplication1(Display* display, int argc, char** argv, qt_QCString* rAppName, int allowStyles, int GUIenabled){
	return (kde_KApplication *) new KApplicationBridge((Display*)display, (int&)argc, (char**)argv, (QCString&)* (QCString*)rAppName, (bool)allowStyles, (bool)GUIenabled);
}
kde_KApplication * kde_new_KApplication2(int argc, char** argv, qt_QCString* rAppName, int allowStyles, int GUIenabled){
	return (kde_KApplication *) new KApplicationBridge((int&)argc, (char**)argv, (QCString&)* (QCString*)rAppName, (bool)allowStyles, (bool)GUIenabled);
}
void kde_del_KApplication( kde_KApplication* p ){
	delete (KApplicationBridge*) p;
}
kde_KConfig* kde_KApplication_sessionConfig( kde_KApplication* instPointer){
	return (kde_KConfig*) ((KApplicationBridge*)instPointer)->sessionConfig();
}
int kde_KApplication_isRestored( kde_KApplication* instPointer){
	return (int) ((KApplicationBridge*)instPointer)->isRestored();
}
void kde_KApplication_disableSessionManagement( kde_KApplication* instPointer){
	((KApplicationBridge*)instPointer)->disableSessionManagement();
	return;
}
int kde_KApplication_requestShutDown( kde_KApplication* instPointer,int confirm, int sdtype, int sdmode){
	return (int) ((KApplicationBridge*)instPointer)->requestShutDown((KApplication::ShutdownConfirm)confirm, (KApplication::ShutdownType)sdtype, (KApplication::ShutdownMode)sdmode);
}
void kde_KApplication_propagateSessionManager( kde_KApplication* instPointer){
	((KApplicationBridge*)instPointer)->propagateSessionManager();
	return;
}
void kde_KApplication_commitData( kde_KApplication* instPointer,qt_QSessionManager* sm){
	((KApplicationBridge*)instPointer)->commitData((QSessionManager&)* (QSessionManager*)sm);
	return;
}
void kde_KApplication_saveState( kde_KApplication* instPointer,qt_QSessionManager* sm){
	((KApplicationBridge*)instPointer)->saveState((QSessionManager&)* (QSessionManager*)sm);
	return;
}
qt_QPixmap * kde_KApplication_icon( kde_KApplication* instPointer){
	return (qt_QPixmap *)new QPixmap(((KApplicationBridge*)instPointer)->icon());
}
qt_QString * kde_KApplication_iconName( kde_KApplication* instPointer){
	return (qt_QString *)new QString(((KApplicationBridge*)instPointer)->iconName());
}
qt_QPixmap * kde_KApplication_miniIcon( kde_KApplication* instPointer){
	return (qt_QPixmap *)new QPixmap(((KApplicationBridge*)instPointer)->miniIcon());
}
qt_QString * kde_KApplication_miniIconName( kde_KApplication* instPointer){
	return (qt_QString *)new QString(((KApplicationBridge*)instPointer)->miniIconName());
}
void kde_KApplication_setTopWidget( kde_KApplication* instPointer,qt_QWidget * topWidget){
	((KApplicationBridge*)instPointer)->setTopWidget((QWidget*)topWidget);
	return;
}
void kde_KApplication_invokeHelp( kde_KApplication* instPointer,qt_QString * anchor, qt_QString * appname){
	((KApplicationBridge*)instPointer)->invokeHelp((QString&)* (QString*)anchor, (QString&)* (QString*)appname);
	return;
}
void kde_KApplication_invokeHTMLHelp( kde_KApplication* instPointer,qt_QString * aFilename, qt_QString * aTopic){
	((KApplicationBridge*)instPointer)->invokeHTMLHelp((QString&)* (QString*)aFilename, (QString&)* (QString*)aTopic);
	return;
}
void kde_KApplication_invokeMailer( kde_KApplication* instPointer,qt_QString * address, qt_QString * subject){
	((KApplicationBridge*)instPointer)->invokeMailer((QString&)* (QString*)address, (QString&)* (QString*)subject);
	return;
}
void kde_KApplication_invokeMailer1( kde_KApplication* instPointer,kde_KURL* mailtoURL){
	((KApplicationBridge*)instPointer)->invokeMailer((KURL&)* (KURL*)mailtoURL);
	return;
}
void kde_KApplication_invokeMailer2( kde_KApplication* instPointer,qt_QString * to, qt_QString * cc, qt_QString * bcc, qt_QString * subject, qt_QString * body, qt_QString * messageFile, qt_QStringList* attachURLs){
	((KApplicationBridge*)instPointer)->invokeMailer((QString&)* (QString*)to, (QString&)* (QString*)cc, (QString&)* (QString*)bcc, (QString&)* (QString*)subject, (QString&)* (QString*)body, (QString&)* (QString*)messageFile, (QStringList&)* (QStringList*)attachURLs);
	return;
}
void kde_KApplication_invokeBrowser( kde_KApplication* instPointer,qt_QString * url){
	((KApplicationBridge*)instPointer)->invokeBrowser((QString&)* (QString*)url);
	return;
}
qt_QString * kde_KApplication_caption( kde_KApplication* instPointer){
	return (qt_QString *)new QString(((KApplicationBridge*)instPointer)->caption());
}
//kde_KStyle* kde_KApplication_kstyle( kde_KApplication* instPointer){
//	return (kde_KStyle*) ((KApplicationBridge*)instPointer)->kstyle();
//}
qt_QString * kde_KApplication_makeStdCaption( kde_KApplication* instPointer,qt_QString * userCaption, int withAppName, int modified){
	return (qt_QString *)new QString(((KApplicationBridge*)instPointer)->makeStdCaption((QString&)* (QString*)userCaption, (bool)withAppName, (bool)modified));
}
qt_QString * kde_KApplication_tempSaveName( kde_KApplication* instPointer,qt_QString * pFilename){
	return (qt_QString *)new QString(((KApplicationBridge*)instPointer)->tempSaveName((QString&)* (QString*)pFilename));
}
qt_QString * kde_KApplication_checkRecoverFile( kde_KApplication* instPointer,qt_QString * pFilename, int bRecover){
	return (qt_QString *)new QString(((KApplicationBridge*)instPointer)->checkRecoverFile((QString&)* (QString*)pFilename, (bool&)bRecover));
}
Display* kde_KApplication_getDisplay( kde_KApplication* instPointer){
	return (Display*) ((KApplicationBridge*)instPointer)->getDisplay();
}
void kde_KApplication_enableStyles( kde_KApplication* instPointer){
	((KApplicationBridge*)instPointer)->enableStyles();
	return;
}
void kde_KApplication_disableStyles( kde_KApplication* instPointer){
	((KApplicationBridge*)instPointer)->disableStyles();
	return;
}
void kde_KApplication_installX11EventFilter( kde_KApplication* instPointer,qt_QWidget * filter){
	((KApplicationBridge*)instPointer)->installX11EventFilter((QWidget*)filter);
	return;
}
void kde_KApplication_addKipcEventMask( kde_KApplication* instPointer,int identifier){
	((KApplicationBridge*)instPointer)->addKipcEventMask((int)identifier);
	return;
}
void kde_KApplication_removeKipcEventMask( kde_KApplication* instPointer,int identifier){
	((KApplicationBridge*)instPointer)->removeKipcEventMask((int)identifier);
	return;
}
qt_QCString* kde_KApplication_startupId( kde_KApplication* instPointer){
	return (qt_QCString*)new QCString(((KApplicationBridge*)instPointer)->startupId());
}
void kde_KApplication_setStartupId( kde_KApplication* instPointer,qt_QCString* startup_id){
	((KApplicationBridge*)instPointer)->setStartupId((QCString&)* (QCString*)startup_id);
	return;
}
qt_QString * kde_KApplication_geometryArgument( kde_KApplication* instPointer){
	return (qt_QString *)new QString(((KApplicationBridge*)instPointer)->geometryArgument());
}
void kde_KApplication_installKDEPropertyMap( kde_KApplication* instPointer){
	((KApplicationBridge*)instPointer)->installKDEPropertyMap();
	return;
}
int kde_KApplication_notify( kde_KApplication* instPointer,qt_QObject * receiver, qt_QEvent * event){
	return (int) ((KApplicationBridge*)instPointer)->notify((QObject*)receiver, (QEvent*)event);
}
int kde_KApplication_xioErrhandler( kde_KApplication* instPointer){
	return (int) ((KApplicationBridge*)instPointer)->xioErrhandler();
}
void kde_KApplication_iceIOErrorHandler( kde_KApplication* instPointer,_IceConn* conn){
	((KApplicationBridge*)instPointer)->iceIOErrorHandler((_IceConn*)conn);
	return;
}
void kde_KApplication_ref( kde_KApplication* instPointer){
	((KApplicationBridge*)instPointer)->ref();
	return;
}
void kde_KApplication_deref( kde_KApplication* instPointer){
	((KApplicationBridge*)instPointer)->deref();
	return;
}
void kde_KApplication_addCmdLineOptions( ){
	KApplicationBridge::addCmdLineOptions();
	return;
}
kde_KApplication* kde_KApplication_kApplication( ){
	return (kde_KApplication*) KApplicationBridge::kApplication();
}
kde_DCOPClient* kde_KApplication_dcopClient( ){
	return (kde_DCOPClient*) KApplicationBridge::dcopClient();
}
void kde_KApplication_disableAutoDcopRegistration( ){
	KApplicationBridge::disableAutoDcopRegistration();
	return;
}
qt_QCString* kde_KApplication_launcher( ){
	return (qt_QCString*)new QCString(KApplicationBridge::launcher());
}
int kde_KApplication_startServiceByName( qt_QString * _name, qt_QString * URL, qt_QString* error, qt_QCString* dcopService, int* pid, qt_QCString* startup_id, int noWait){
	return (int) KApplicationBridge::startServiceByName((QString&)* (QString*)_name, (QString&)* (QString*)URL, (QString*)error, (QCString*)dcopService, (int*)pid, (QCString&)* (QCString*)startup_id, (bool)noWait);
}
int kde_KApplication_startServiceByName1( qt_QString * _name, qt_QStringList* URLs, qt_QString* error, qt_QCString* dcopService, int* pid, qt_QCString* startup_id, int noWait){
	return (int) KApplicationBridge::startServiceByName((QString&)* (QString*)_name, (QStringList&)* (QStringList*)URLs, (QString*)error, (QCString*)dcopService, (int*)pid, (QCString&)* (QCString*)startup_id, (bool)noWait);
}
int kde_KApplication_startServiceByDesktopPath( qt_QString * _name, qt_QString * URL, qt_QString* error, qt_QCString* dcopService, int* pid, qt_QCString* startup_id, int noWait){
	return (int) KApplicationBridge::startServiceByDesktopPath((QString&)* (QString*)_name, (QString&)* (QString*)URL, (QString*)error, (QCString*)dcopService, (int*)pid, (QCString&)* (QCString*)startup_id, (bool)noWait);
}
int kde_KApplication_startServiceByDesktopPath1( qt_QString * _name, qt_QStringList* URLs, qt_QString* error, qt_QCString* dcopService, int* pid, qt_QCString* startup_id, int noWait){
	return (int) KApplicationBridge::startServiceByDesktopPath((QString&)* (QString*)_name, (QStringList&)* (QStringList*)URLs, (QString*)error, (QCString*)dcopService, (int*)pid, (QCString&)* (QCString*)startup_id, (bool)noWait);
}
int kde_KApplication_startServiceByDesktopName( qt_QString * _name, qt_QString * URL, qt_QString* error, qt_QCString* dcopService, int* pid, qt_QCString* startup_id, int noWait){
	return (int) KApplicationBridge::startServiceByDesktopName((QString&)* (QString*)_name, (QString&)* (QString*)URL, (QString*)error, (QCString*)dcopService, (int*)pid, (QCString&)* (QCString*)startup_id, (bool)noWait);
}
int kde_KApplication_startServiceByDesktopName1( qt_QString * _name, qt_QStringList* URLs, qt_QString* error, qt_QCString* dcopService, int* pid, qt_QCString* startup_id, int noWait){
	return (int) KApplicationBridge::startServiceByDesktopName((QString&)* (QString*)_name, (QStringList&)* (QStringList*)URLs, (QString*)error, (QCString*)dcopService, (int*)pid, (QCString&)* (QCString*)startup_id, (bool)noWait);
}
int kde_KApplication_kdeinitExec( qt_QString * name, qt_QStringList* args, qt_QString* error, int* pid){
	return (int) KApplicationBridge::kdeinitExec((QString&)* (QString*)name, (QStringList&)* (QStringList*)args, (QString*)error, (int*)pid);
}
int kde_KApplication_kdeinitExecWait( qt_QString * name, qt_QStringList* args, qt_QString* error, int* pid){
	return (int) KApplicationBridge::kdeinitExecWait((QString&)* (QString*)name, (QStringList&)* (QStringList*)args, (QString*)error, (int*)pid);
}
int kde_KApplication_random( ){
	return (int) KApplicationBridge::random();
}
qt_QString * kde_KApplication_randomString( int length){
	return (qt_QString *)new QString(KApplicationBridge::randomString((int)length));
}
void kde_KApplication_startKdeinit( ){
	KApplicationBridge::startKdeinit();
	return;
}
kde_KApplication * kde_new_KApplication3(int allowStyles, int GUIenabled, kde_KInstance* _instance){
	return (kde_KApplication *) new KApplicationBridge((bool)allowStyles, (bool)GUIenabled, (KInstance*)_instance);
}
//int kde_KApplication_x11EventFilter( kde_KApplication* instPointer,XEvent* arg1){
//	return (int) ((KApplicationBridge*)instPointer)->protected_x11EventFilter((XEvent*)arg1);
//}
kde_KInstance* kde_KApplication_KInstance(kde_KApplication* instPointer){
	return (kde_KInstance*) (KInstance *) (KApplication *) instPointer;
}
qt_QApplication* kde_KApplication_QApplication(kde_KApplication* instPointer){
	return (qt_QApplication*) (QApplication *) (KApplication *) instPointer;
}
