summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/qtjava/TQGLColormap.cpp
blob: e6eae5afc9349f59cc69cdbb39493d6d48dacd89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqwindowdefs.h>
#include <tqglcolormap.h>
#include <tqcolor.h>

#include <qtjava/QtSupport.h>
#include <qtjava/TQGLColormap.h>

class TQGLColormapJBridge : public TQGLColormap
{
public:
	TQGLColormapJBridge() : TQGLColormap() {};
	TQGLColormapJBridge(const TQGLColormap& arg1) : TQGLColormap(arg1) {};
	~TQGLColormapJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_detach(JNIEnv* env, jobject obj)
{
	((TQGLColormap*) QtSupport::getQt(env, obj))->detach();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_qt_QGLColormap_finalize(env, obj);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QGLColormap_entryColor(JNIEnv* env, jobject obj, jint idx)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQColor(((TQGLColormap*) QtSupport::getQt(env, obj))->entryColor((int) idx)), "org.kde.qt.TQColor", TRUE);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QGLColormap_entryRgb(JNIEnv* env, jobject obj, jint idx)
{
	jint xret = (jint) ((TQGLColormap*) QtSupport::getQt(env, obj))->entryRgb((int) idx);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj)) {
		delete (TQGLColormap*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QGLColormap_findNearest(JNIEnv* env, jobject obj, jint color)
{
	jint xret = (jint) ((TQGLColormap*) QtSupport::getQt(env, obj))->findNearest((TQRgb) color);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QGLColormap_find(JNIEnv* env, jobject obj, jint color)
{
	jint xret = (jint) ((TQGLColormap*) QtSupport::getQt(env, obj))->find((TQRgb) color);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QGLColormap_isDisposed(JNIEnv* env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QGLColormap_isEmpty(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQGLColormap*) QtSupport::getQt(env, obj))->isEmpty();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_newTQGLColormap__(JNIEnv* env, jobject obj)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQGLColormapJBridge());
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_newTQGLColormap__Lorg_kde_qt_QGLColormap_2(JNIEnv* env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQGLColormapJBridge((const TQGLColormap&)*(const TQGLColormap*) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_setEntries__I_3I(JNIEnv* env, jobject obj, jint count, jintArray colors)
{
	int* _int_colors = QtSupport::toIntPtr(env, colors);
	((TQGLColormap*) QtSupport::getQt(env, obj))->setEntries((int) count,  (const TQRgb*) _int_colors);
	env->SetIntArrayRegion(colors, 0, 1, (jint *) _int_colors);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_setEntries__I_3II(JNIEnv* env, jobject obj, jint count, jintArray colors, jint base)
{
	int* _int_colors = QtSupport::toIntPtr(env, colors);
	((TQGLColormap*) QtSupport::getQt(env, obj))->setEntries((int) count,  (const TQRgb*) _int_colors, (int) base);
	env->SetIntArrayRegion(colors, 0, 1, (jint *) _int_colors);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_setEntry__II(JNIEnv* env, jobject obj, jint idx, jint color)
{
	((TQGLColormap*) QtSupport::getQt(env, obj))->setEntry((int) idx, (TQRgb) color);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_setEntry__ILorg_kde_qt_QColor_2(JNIEnv* env, jobject obj, jint idx, jobject color)
{
	((TQGLColormap*) QtSupport::getQt(env, obj))->setEntry((int) idx, (const TQColor&)*(const TQColor*) QtSupport::getQt(env, color));
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QGLColormap_size(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TQGLColormap*) QtSupport::getQt(env, obj))->size();
	return xret;
}