/***************************************************************************
                            qt_QMotifStyle.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, 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 "qt_QMotifStyle.h"
}

#include <qmotifstyle.h>
#include <qpixmap.h>

class QMotifStyleBridge : public QMotifStyle
{
public:
	QMotifStyleBridge(bool useHighlightCols) : QMotifStyle(useHighlightCols) {}
	~QMotifStyleBridge() {}
	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;
	}
};

qt_QMotifStyle * qt_new_QMotifStyle(int useHighlightCols){
	return (qt_QMotifStyle *) new QMotifStyleBridge((bool)useHighlightCols);
}
void qt_del_QMotifStyle( qt_QMotifStyle* p ){
	delete (QMotifStyleBridge*) p;
}
void qt_QMotifStyle_setUseHighlightColors( qt_QMotifStyle* instPointer,int arg1){
	((QMotifStyleBridge*)instPointer)->setUseHighlightColors((bool)arg1);
	return;
}
int qt_QMotifStyle_useHighlightColors( qt_QMotifStyle* instPointer){
	return (int) ((QMotifStyleBridge*)instPointer)->useHighlightColors();
}
void qt_QMotifStyle_polish( qt_QMotifStyle* instPointer,qt_QPalette * arg1){
	((QMotifStyleBridge*)instPointer)->polish((QPalette&)* (QPalette*)arg1);
	return;
}
void qt_QMotifStyle_polish1( qt_QMotifStyle* instPointer,qt_QWidget * arg1){
	((QMotifStyleBridge*)instPointer)->polish((QWidget*)arg1);
	return;
}
void qt_QMotifStyle_polish2( qt_QMotifStyle* instPointer,qt_QApplication* arg1){
	((QMotifStyleBridge*)instPointer)->polish((QApplication*)arg1);
	return;
}
void qt_QMotifStyle_polishPopupMenu( qt_QMotifStyle* instPointer,qt_QPopupMenu* arg1){
	((QMotifStyleBridge*)instPointer)->polishPopupMenu((QPopupMenu*)arg1);
	return;
}
void qt_QMotifStyle_drawPrimitive( qt_QMotifStyle* instPointer,int pe, qt_QPainter * p, qt_QRect* r, qt_QColorGroup * cg, int flags, int arg1){
	((QMotifStyleBridge*)instPointer)->drawPrimitive((QStyle::PrimitiveElement)pe, (QPainter*)p, (QRect&)* (QRect*)r, (QColorGroup&)* (QColorGroup*)cg, (QStyle::SFlags)flags, (QStyleOption&)arg1);
	return;
}
void qt_QMotifStyle_drawControl( qt_QMotifStyle* instPointer,int element, qt_QPainter * p, qt_QWidget * widget, qt_QRect* r, qt_QColorGroup * cg, int how, int arg1){
	((QMotifStyleBridge*)instPointer)->drawControl((QStyle::ControlElement)element, (QPainter*)p, (QWidget*)widget, (QRect&)* (QRect*)r, (QColorGroup&)* (QColorGroup*)cg, (QStyle::SFlags)how, (QStyleOption&)arg1);
	return;
}
void qt_QMotifStyle_drawComplexControl( qt_QMotifStyle* instPointer,int control, qt_QPainter * p, qt_QWidget * widget, qt_QRect* r, qt_QColorGroup * cg, int how, int sub, int subActive, int arg1){
	((QMotifStyleBridge*)instPointer)->drawComplexControl((QStyle::ComplexControl)control, (QPainter*)p, (QWidget*)widget, (QRect&)* (QRect*)r, (QColorGroup&)* (QColorGroup*)cg, (QStyle::SFlags)how, (QStyle::SCFlags)sub, (QStyle::SCFlags)subActive, (QStyleOption&)arg1);
	return;
}
qt_QRect* qt_QMotifStyle_querySubControlMetrics( qt_QMotifStyle* instPointer,int control, qt_QWidget * widget, int sc, int arg1){
	QRect _r= ((QMotifStyleBridge*)instPointer)->querySubControlMetrics((QStyle::ComplexControl)control, (QWidget*)widget, (QStyle::SubControl)sc, (QStyleOption&)arg1);
	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
}
int qt_QMotifStyle_pixelMetric( qt_QMotifStyle* instPointer,int metric, qt_QWidget * widget){
	return (int) ((QMotifStyleBridge*)instPointer)->pixelMetric((QStyle::PixelMetric)metric, (QWidget*)widget);
}
qt_QSize * qt_QMotifStyle_sizeFromContents( qt_QMotifStyle* instPointer,int contents, qt_QWidget * widget, qt_QSize * contentsSize, int arg1){
	QSize _s= ((QMotifStyleBridge*)instPointer)->sizeFromContents((QStyle::ContentsType)contents, (QWidget*)widget, (QSize&)* (QSize*)contentsSize, (QStyleOption&)arg1);
	return (qt_QSize *)new QSize(_s.width(),_s.height());
}
qt_QRect* qt_QMotifStyle_subRect( qt_QMotifStyle* instPointer,int r, qt_QWidget * widget){
	QRect _r= ((QMotifStyleBridge*)instPointer)->subRect((QStyle::SubRect)r, (QWidget*)widget);
	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
}
qt_QPixmap * qt_QMotifStyle_stylePixmap( qt_QMotifStyle* instPointer,int arg1, qt_QWidget * arg2, int arg3){
	return (qt_QPixmap *)new QPixmap(((QMotifStyleBridge*)instPointer)->stylePixmap((QStyle::StylePixmap)arg1, (QWidget*)arg2, (QStyleOption&)arg3));
}
//int qt_QMotifStyle_styleHint( qt_QMotifStyle* instPointer,int sh, qt_QWidget * arg1, int arg2, qt_QStyleHintReturn* arg3){
//	return (int) ((QMotifStyleBridge*)instPointer)->styleHint((StyleHint)sh, (QWidget*)arg1, (QStyleOption&)arg2, (QStyleHintReturn*)arg3);
//}
