/***************************************************************************
                            QApplication.java -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

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

package org.kde.qt;

import java.util.*;
import java.lang.Error;

/**
 See {@link QApplicationSignals} for signals emitted by QApplication.

 See {@link QApplicationEventHandling} for event handlers to override in subclasses of QApplication.

*/
public class QApplication extends QObject  {
	protected QApplication(Class dummy){super((Class) null);}

	private native void newQApplication( String[] args);
	public QApplication( String[] args) {
		super((Class) null);
		newQApplication( args);
	}
	private native void newQApplication( String[] args, boolean GUIenabled);
	public QApplication( String[] args, boolean GUIenabled) {
		super((Class) null);
		newQApplication( args, GUIenabled);
	}
	private native void newQApplication( String[] args, int arg1);
	public QApplication( String[] args, int arg1) {
		super((Class) null);
		newQApplication( args, arg1);
	}
//	private native void newQApplication( Display* dpy, int visual, int cmap);
//	public QApplication( Display* dpy, int visual, int cmap) {
//		super((Class) null);
//		newQApplication( dpy, visual, cmap);
//	}
//	private native void newQApplication( Display* dpy);
//	public QApplication( Display* dpy) {
//		super((Class) null);
//		newQApplication( dpy);
//	}
//	private native void newQApplication( Display* dpy, int argc, String argv, int visual, int cmap);
//	public QApplication( Display* dpy, int argc, String argv, int visual, int cmap) {
//		super((Class) null);
//		newQApplication( dpy, argc, argv, visual, cmap);
//	}
//	private native void newQApplication( Display* dpy, int argc, String argv);
//	public QApplication( Display* dpy, int argc, String argv) {
//		super((Class) null);
//		newQApplication( dpy, argc, argv);
//	}
	protected native void finalize() throws InternalError;
//	public native int argc();
	public native String[] args();
	public native int type();
	public native QWidget mainWidget();
	public native void setMainWidget( QWidget arg1);
	public native void polish( QWidget arg1);
	public native QWidget focusWidget();
	public native QWidget activeWindow();
	public native int exec();
	public native void processEvents();
	public native void processEvents( int maxtime);
	public native void processOneEvent();
	public native boolean hasPendingEvents();
	public native int enter_loop();
	public native void exit_loop();
	public native int loopLevel();
	public native boolean notify( QObject arg1, QEvent arg2);
	public native void setDefaultCodec( QTextCodec arg1);
	public native QTextCodec defaultCodec();
	public native void installTranslator( QTranslator arg1);
	public native void removeTranslator( QTranslator arg1);
	public native String translate( String context, String key, String comment, int encoding);
//	public native boolean macEventFilter( EventRef arg1);
//	public native boolean winEventFilter( MSG* arg1);
//	public native boolean x11EventFilter( XEvent* arg1);
//	public native int x11ClientMessage( QWidget arg1, XEvent* arg2, boolean passive_only);
//	public native int x11ProcessEvent( XEvent* arg1);
//	public native boolean qwsEventFilter( QWSEvent arg1);
//	public native int qwsProcessEvent( QWSEvent arg1);
	public native void qwsSetCustomColors( int[] colortable, int start, int numColors);
	public native void winFocus( QWidget arg1, boolean arg2);
	public native boolean isSessionRestored();
	public native String sessionId();
	public native void commitData( QSessionManager sm);
	public native void saveState( QSessionManager sm);
	public native void wakeUpGuiThread();
	public native void lock();
	public native void unlock( boolean wakeUpGui);
	public native void unlock();
	public native boolean locked();
	public native boolean tryLock();
	public native void setEnableRemoteControl( boolean enable, QUuid appId);
	public native void setEnableRemoteControl( boolean enable);
	public native boolean remoteControlEnabled();
	public native QUuid applicationId();
	public native void quit();
	public native void closeAllWindows();
	public static native QStyle style();
	public static native void setStyle( QStyle arg1);
	public static native QStyle setStyle( String arg1);
	public static native int colorMode();
	public static native void setColorMode( int arg1);
	public static native int colorSpec();
	public static native void setColorSpec( int arg1);
	public static native QCursor overrideCursor();
	public static native void setOverrideCursor( QCursor arg1, boolean replace);
	public static native void setOverrideCursor( QCursor arg1);
	public static native void restoreOverrideCursor();
	public static native boolean hasGlobalMouseTracking();
	public static native void setGlobalMouseTracking( boolean enable);
	public static native QPalette palette( QWidget arg1);
	public static native QPalette palette();
	public static native void setPalette( QPalette arg1, boolean informWidgets, String className);
	public static native void setPalette( QPalette arg1);
	public static native QFont font( QWidget arg1);
	public static native QFont font();
	public static native void setFont( QFont arg1, boolean informWidgets, String className);
	public static native void setFont( QFont arg1);
	public static native QFontMetrics fontMetrics();
	public static native ArrayList allWidgets();
	public static native ArrayList topLevelWidgets();
	public static native QDesktopWidget desktop();
	public static native QWidget activePopupWidget();
	public static native QWidget activeModalWidget();
	public static native QClipboard clipboard();
	public static native QWidget widgetAt( int x, int y, boolean child);
	public static native QWidget widgetAt( int x, int y);
	public static native QWidget widgetAt( QPoint arg1, boolean child);
	public static native QWidget widgetAt( QPoint arg1);
	public static native void exit( int retcode);
	public static native void exit();
	public static native boolean sendEvent( QObject receiver, QEvent event);
	public static native void postEvent( QObject receiver, QEvent event);
	public static native void sendPostedEvents( QObject receiver, int event_type);
	public static native void sendPostedEvents();
	public static native void removePostedEvents( QObject receiver);
	public static native boolean startingUp();
	public static native boolean closingDown();
	public static native void flushX();
	public static native void flush();
	public static native void syncX();
	public static native void beep();
	public static native void setWinStyleHighlightColor( QColor c);
	public static native QColor winStyleHighlightColor();
	public static native void setDesktopSettingsAware( boolean arg1);
	public static native boolean desktopSettingsAware();
	public static native void setCursorFlashTime( int arg1);
	public static native int cursorFlashTime();
	public static native void setDoubleClickInterval( int arg1);
	public static native int doubleClickInterval();
	public static native void setWheelScrollLines( int arg1);
	public static native int wheelScrollLines();
	public static native void setGlobalStrut( QSize arg1);
	public static native QSize globalStrut();
	public static native void setLibraryPaths( String[] arg1);
	public static native ArrayList libraryPaths();
	public static native void addLibraryPath( String arg1);
	public static native void removeLibraryPath( String arg1);
	public static native void setStartDragTime( int ms);
	public static native int startDragTime();
	public static native void setStartDragDistance( int l);
	public static native int startDragDistance();
	public static native void setReverseLayout( boolean b);
	public static native boolean reverseLayout();
	public static native int horizontalAlignment( int align);
	public static native boolean isEffectEnabled( int arg1);
	public static native void setEffectEnabled( int arg1, boolean enable);
	public static native void setEffectEnabled( int arg1);
//	public static native QWSDecoration qwsDecoration();
//	public static native void qwsSetDecoration( QWSDecoration arg1);
//	public static native int winVersion();
//	public static native void winMouseButtonUp();
//	public static native void create_xim();
//	public static native void close_xim();
//	public static native boolean x11_apply_settings();
	public static final int Tty = 0;
	public static final int GuiClient = 1;
	public static final int GuiServer = 2;
	public static final int NormalColors = 0;
	public static final int CustomColors = 1;
	public static final int NormalColor = 0;
	public static final int CustomColor = 1;
	public static final int ManyColor = 2;
	public static final int DefaultCodec = 0;
	public static final int UnicodeUTF8 = 1;
}
