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

/**

 Copyright (C) 2000 Trolltech AS.  All rights reserved.

 This file is part of Qt Designer.

 This file may be distributed and/or modified under the terms of the
 GNU General Public License version 2 as published by the Free Software
 Foundation and appearing in the file LICENSE.GPL included in the
 packaging of this file.

 This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

 See http://www.trolltech.com/gpl/ for GPL licensing information.

 Contact info@trolltech.com if any conditions of this licensing are
 not clear to you.


 See {@link QWidgetSignals} for signals emitted by QWidget.

 See {@link QWidgetEventHandling} for event handlers to override in subclasses of QWidget.

 @short 
* Copyright (C) 2000 Trolltech AS.
*/
public class QWidget extends QObject implements  QPaintDeviceInterface {
	protected QWidget(Class dummy){super((Class) null);}

	private native void newQWidget( QWidget parent, String name, int f);
	public QWidget( QWidget parent, String name, int f) {
		super((Class) null);
		newQWidget( parent, name, f);
	}
	public QWidget( QWidget parent, String name) {
		this(parent, name, 0);
	}
	public QWidget( QWidget parent) {
		this(parent, null, 0);
	}
	private native void newQWidget();
	public QWidget() {
		super((Class) null);
		newQWidget();
	}
	protected native void finalize() throws InternalError;
	public native int winId();
	public native void setName( String name);
	public native QStyle style();
	public native void setStyle( QStyle arg1);
	public native QStyle setStyle( String arg1);
	public native boolean isTopLevel();
	public native boolean isDialog();
	public native boolean isPopup();
	public native boolean isDesktop();
	public native boolean isModal();
	public native boolean isEnabled();
	public native boolean isEnabledTo( QWidget arg1);
	public native boolean isEnabledToTLW();
	public native QRect frameGeometry();
	public native QRect geometry();
	public native int x();
	public native int y();
	public native QPoint pos();
	public native QSize frameSize();
	public native QSize size();
	public native int width();
	public native int height();
	public native QRect rect();
	public native QRect childrenRect();
	public native QRegion childrenRegion();
	public native QSize minimumSize();
	public native QSize maximumSize();
	public native int minimumWidth();
	public native int minimumHeight();
	public native int maximumWidth();
	public native int maximumHeight();
	public native void setMinimumSize( QSize arg1);
	public native void setMinimumSize( int minw, int minh);
	public native void setMaximumSize( QSize arg1);
	public native void setMaximumSize( int maxw, int maxh);
	public native void setMinimumWidth( int minw);
	public native void setMinimumHeight( int minh);
	public native void setMaximumWidth( int maxw);
	public native void setMaximumHeight( int maxh);
	public native QSize sizeIncrement();
	public native void setSizeIncrement( QSize arg1);
	public native void setSizeIncrement( int w, int h);
	public native QSize baseSize();
	public native void setBaseSize( QSize arg1);
	public native void setBaseSize( int basew, int baseh);
	public native void setFixedSize( QSize arg1);
	public native void setFixedSize( int w, int h);
	public native void setFixedWidth( int w);
	public native void setFixedHeight( int h);
	public native QPoint mapToGlobal( QPoint arg1);
	public native QPoint mapFromGlobal( QPoint arg1);
	public native QPoint mapToParent( QPoint arg1);
	public native QPoint mapFromParent( QPoint arg1);
	public native QPoint mapTo( QWidget arg1, QPoint arg2);
	public native QPoint mapFrom( QWidget arg1, QPoint arg2);
	public native QWidget topLevelWidget();
	public native int backgroundMode();
	public native void setBackgroundMode( int arg1);
	public native void setBackgroundMode( int arg1, int arg2);
	public native QColor foregroundColor();
	public native QColor eraseColor();
	public native void setEraseColor( QColor arg1);
	public native QPixmap erasePixmap();
	public native void setErasePixmap( QPixmap arg1);
	public native QColorGroup colorGroup();
	public native QPalette palette();
	public native boolean ownPalette();
	public native void setPalette( QPalette arg1);
	public native void unsetPalette();
	public native QColor paletteForegroundColor();
	public native void setPaletteForegroundColor( QColor arg1);
	public native QColor paletteBackgroundColor();
	public native void setPaletteBackgroundColor( QColor arg1);
	public native QPixmap paletteBackgroundPixmap();
	public native void setPaletteBackgroundPixmap( QPixmap arg1);
	public native QBrush backgroundBrush();
	public native QFont font();
	public native boolean ownFont();
	public native void setFont( QFont arg1);
	public native void unsetFont();
	public native QFontMetrics fontMetrics();
	public native QFontInfo fontInfo();
	public native QCursor cursor();
	public native boolean ownCursor();
	public native void setCursor( QCursor arg1);
	public native void unsetCursor();
	public native String caption();
	public native QPixmap icon();
	public native String iconText();
	public native boolean hasMouseTracking();
	public native boolean hasMouse();
	public native void setMask( QBitmap arg1);
	public native void setMask( QRegion arg1);
	public native void clearMask();
	public native QColor backgroundColor();
	public native void setBackgroundColor( QColor arg1);
	public native QPixmap backgroundPixmap();
	public native void setBackgroundPixmap( QPixmap arg1);
	public native boolean isActiveWindow();
	public native void setActiveWindow();
	public native boolean isFocusEnabled();
	public native int focusPolicy();
	public native void setFocusPolicy( int arg1);
	public native boolean hasFocus();
	public native void setFocusProxy( QWidget arg1);
	public native QWidget focusProxy();
	public native void grabMouse();
	public native void grabMouse( QCursor arg1);
	public native void releaseMouse();
	public native void grabKeyboard();
	public native void releaseKeyboard();
	public native boolean isUpdatesEnabled();
//	public native void repaintUnclipped( QRegion arg1, boolean erase);
//	public native void repaintUnclipped( QRegion arg1);
	public native boolean close( boolean alsoDelete);
	public native boolean isVisible();
	public native boolean isVisibleTo( QWidget arg1);
	public native boolean isVisibleToTLW();
	public native QRect visibleRect();
	public native boolean isHidden();
	public native boolean isMinimized();
	public native boolean isMaximized();
	public native QSize sizeHint();
	public native QSize minimumSizeHint();
	public native QSizePolicy sizePolicy();
	public native void setSizePolicy( QSizePolicy arg1);
	public native int heightForWidth( int arg1);
	public native void adjustSize();
	public native QLayout layout();
	public native void updateGeometry();
	public native void reparent( QWidget parent, int arg1, QPoint arg2, boolean showIt);
	public native void reparent( QWidget parent, int arg1, QPoint arg2);
	public native void reparent( QWidget parent, QPoint arg1, boolean showIt);
	public native void reparent( QWidget parent, QPoint arg1);
	public native void recreate( QWidget parent, int f, QPoint p, boolean showIt);
	public native void recreate( QWidget parent, int f, QPoint p);
	public native void erase();
	public native void erase( int x, int y, int w, int h);
	public native void erase( QRect arg1);
	public native void erase( QRegion arg1);
	public native void scroll( int dx, int dy);
	public native void scroll( int dx, int dy, QRect arg1);
	public native void drawText( int x, int y, String arg1);
	public native void drawText( QPoint arg1, String arg2);
	public native QWidget focusWidget();
	public native QRect microFocusHint();
	public native boolean acceptDrops();
	public native void setAcceptDrops( boolean on);
	public native void setAutoMask( boolean arg1);
	public native boolean autoMask();
	public native void setBackgroundOrigin( int arg1);
	public native int backgroundOrigin();
	public native boolean customWhatsThis();
	public native QWidget parentWidget( boolean sameWindow);
	public native QWidget parentWidget();
	public native int testWState( int s);
	public native int testWFlags( int f);
	public native QWidget childAt( int x, int y, boolean includeThis);
	public native QWidget childAt( int x, int y);
	public native QWidget childAt( QPoint arg1, boolean includeThis);
	public native QWidget childAt( QPoint arg1);
//	public native QGfx graphicsContext( boolean clip_children);
//	public native QGfx graphicsContext();
//	public native QRegion clippedRegion( boolean do_children);
//	public native QRegion clippedRegion();
//	public native void macCGClippedContext( boolean do_children);
//	public native void macCGClippedContext();
	public native void setPalette( QPalette p, boolean arg1);
	public native void setFont( QFont f, boolean arg1);
	public native void setEnabled( boolean arg1);
	public native void setDisabled( boolean arg1);
	public native void setCaption( String arg1);
	public native void setIcon( QPixmap arg1);
	public native void setIconText( String arg1);
	public native void setMouseTracking( boolean enable);
	public native void setFocus();
	public native void clearFocus();
	public native void setUpdatesEnabled( boolean enable);
	public native void update();
	public native void update( int x, int y, int w, int h);
	public native void update( QRect arg1);
	public native void repaint();
	public native void repaint( boolean erase);
	public native void repaint( int x, int y, int w, int h, boolean erase);
	public native void repaint( int x, int y, int w, int h);
	public native void repaint( QRect arg1, boolean erase);
	public native void repaint( QRect arg1);
	public native void repaint( QRegion arg1, boolean erase);
	public native void repaint( QRegion arg1);
	public native void show();
	public native void hide();
	public native void iconify();
	public native void showMinimized();
	public native void showMaximized();
	public native void showFullScreen();
	public native void showNormal();
	public native void polish();
	public native void constPolish();
	public native boolean close();
	public native void raise();
	public native void lower();
	public native void stackUnder( QWidget arg1);
	public native void move( int x, int y);
	public native void move( QPoint arg1);
	public native void resize( int w, int h);
	public native void resize( QSize arg1);
	public native void setGeometry( int x, int y, int w, int h);
	public native void setGeometry( QRect arg1);
	public static native void setTabOrder( QWidget arg1, QWidget arg2);
	public static native QWidget mouseGrabber();
	public static native QWidget keyboardGrabber();
	public static native QWidget find( int arg1);
//	public static native QWidgetMapper wmapper();
	public native boolean event( QEvent arg1);
//	protected native String scanLine( int arg1);
//	protected native int bytesPerLine();
	protected native void updateMask();
	protected native void styleChange( QStyle arg1);
	protected native void enabledChange( boolean oldEnabled);
	protected native void paletteChange( QPalette arg1);
	protected native void fontChange( QFont arg1);
	protected native void windowActivationChange( boolean oldActive);
	protected native int metric( int arg1);
	protected native void resetInputContext();
	protected native void create( int arg1, boolean initializeWindow, boolean destroyOldWindow);
	protected native void create();
	protected native void destroy( boolean destroyWindow, boolean destroySubWindows);
	protected native void destroy();
	protected native int getWState();
	protected native void setWState( int arg1);
	protected native void clearWState( int n);
	protected native int getWFlags();
	protected native void setWFlags( int arg1);
	protected native void clearWFlags( int n);
	protected native boolean focusNextPrevChild( boolean next);
//	protected native QWExtra extraData();
//	protected native QTLWExtra topData();
	protected native QFocusData focusData();
	protected native void setKeyCompression( boolean arg1);
	protected native void setMicroFocusHint( int x, int y, int w, int h, boolean text, QFont f);
	protected native void setMicroFocusHint( int x, int y, int w, int h);
//	protected native void dirtyClippedRegion( boolean arg1);
//	protected native boolean isClippedRegionDirty();
	public static final int NoFocus = 0;
	public static final int TabFocus = 0x1;
	public static final int ClickFocus = 0x2;
	public static final int StrongFocus = 0x3;
	public static final int WheelFocus = 0x7;
	public static final int WidgetOrigin = 0;
	public static final int ParentOrigin = 1;
	public static final int WindowOrigin = 2;

	public native int devType();
	public native boolean isExtDev();
	public native boolean paintingActive();
//	public native void setResolution( int arg1);
//	public native int resolution();
	
	/** Internal method */
	protected native long paintDevice();
}
