summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/qtjava/QColor.cpp
blob: a217ef0918acebc7d6ab6306688f41e5deffb827 (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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqwindowdefs.h>
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqcolor.h>

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

class TQColorJBridge : public TQColor
{
public:
	TQColorJBridge() : TTQColor() {};
	TQColorJBridge(int arg1,int arg2,int arg3) : TTQColor(arg1,arg2,arg3) {};
	TQColorJBridge(int arg1,int arg2,int arg3,TTQColor::Spec arg4) : TTQColor(arg1,arg2,arg3,arg4) {};
	TQColorJBridge(TQRgb arg1,uint arg2) : TTQColor(arg1,arg2) {};
	TQColorJBridge(TQRgb arg1) : TTQColor(arg1) {};
	TQColorJBridge(const TTQString& arg1) : TTQColor(arg1) {};
	TQColorJBridge(const TTQColor& arg1) : TTQColor(arg1) {};
	~TQColorJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_alloc(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TTQColor*) QtSupport::getQt(env, obj))->alloc();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_blue(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TTQColor*) QtSupport::getQt(env, obj))->blue();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_cleanup(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	TQColorJBridge::cleanup();
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QColor_colorNames(JNIEnv* env, jclass cls)
{
	TTQStringList  _qlist;
	(void) cls;
	_qlist = TQColorJBridge::colorNames();
	return (jobject) QtSupport::arrayWithTQStringList(env, (TTQStringList*) &_qlist);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_currentAllocContext(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	jint xret = (jint) TQColorJBridge::currentAllocContext();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QColor_dark__(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TTQColor(((TTQColor*) QtSupport::getQt(env, obj))->dark()), "org.kde.qt.TTQColor", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QColor_dark__I(JNIEnv* env, jobject obj, jint f)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TTQColor(((TTQColor*) QtSupport::getQt(env, obj))->dark((int) f)), "org.kde.qt.TTQColor", TRUE);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_destroyAllocContext(JNIEnv* env, jclass cls, jint arg1)
{
	(void) cls;
	(void) env;
	TQColorJBridge::destroyAllocContext((int) arg1);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_qt_QColor_finalize(env, obj);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_enterAllocContext(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	jint xret = (jint) TQColorJBridge::enterAllocContext();
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_getHsv(JNIEnv* env, jobject obj, jintArray h, jintArray s, jintArray v)
{
	int* _int_h = QtSupport::toIntPtr(env, h);
	int* _int_s = QtSupport::toIntPtr(env, s);
	int* _int_v = QtSupport::toIntPtr(env, v);
	((TTQColor*) QtSupport::getQt(env, obj))->getHsv( (int*) _int_h,  (int*) _int_s,  (int*) _int_v);
	env->SetIntArrayRegion(h, 0, 1, (jint *) _int_h);
	env->SetIntArrayRegion(s, 0, 1, (jint *) _int_s);
	env->SetIntArrayRegion(v, 0, 1, (jint *) _int_v);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_getRgb(JNIEnv* env, jobject obj, jintArray r, jintArray g, jintArray b)
{
	int* _int_r = QtSupport::toIntPtr(env, r);
	int* _int_g = QtSupport::toIntPtr(env, g);
	int* _int_b = QtSupport::toIntPtr(env, b);
	((TTQColor*) QtSupport::getQt(env, obj))->getRgb( (int*) _int_r,  (int*) _int_g,  (int*) _int_b);
	env->SetIntArrayRegion(r, 0, 1, (jint *) _int_r);
	env->SetIntArrayRegion(g, 0, 1, (jint *) _int_g);
	env->SetIntArrayRegion(b, 0, 1, (jint *) _int_b);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_green(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TTQColor*) QtSupport::getQt(env, obj))->green();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_hsv(JNIEnv* env, jobject obj, jintArray h, jintArray s, jintArray v)
{
	int* _int_h = QtSupport::toIntPtr(env, h);
	int* _int_s = QtSupport::toIntPtr(env, s);
	int* _int_v = QtSupport::toIntPtr(env, v);
	((TTQColor*) QtSupport::getQt(env, obj))->hsv( (int*) _int_h,  (int*) _int_s,  (int*) _int_v);
	env->SetIntArrayRegion(h, 0, 1, (jint *) _int_h);
	env->SetIntArrayRegion(s, 0, 1, (jint *) _int_s);
	env->SetIntArrayRegion(v, 0, 1, (jint *) _int_v);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_initialize(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	TQColorJBridge::initialize();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QColor_isDirty(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TTQColor*) QtSupport::getQt(env, obj))->isDirty();
	return xret;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QColor_isValid(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TTQColor*) QtSupport::getQt(env, obj))->isValid();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_leaveAllocContext(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	TQColorJBridge::leaveAllocContext();
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QColor_light__(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TTQColor(((TTQColor*) QtSupport::getQt(env, obj))->light()), "org.kde.qt.TTQColor", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QColor_light__I(JNIEnv* env, jobject obj, jint f)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TTQColor(((TTQColor*) QtSupport::getQt(env, obj))->light((int) f)), "org.kde.qt.TTQColor", TRUE);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_maxColors(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	jint xret = (jint) TQColorJBridge::maxColors();
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QColor_name(JNIEnv* env, jobject obj)
{
	TTQString  _qstring;
	_qstring = ((TTQColor*) QtSupport::getQt(env, obj))->name();
	return QtSupport::fromTQString(env, &_qstring);
}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_newTQColor__I(JNIEnv* env, jobject obj, jint rgb)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQColorJBridge((TQRgb) rgb));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_newTQColor__II(JNIEnv* env, jobject obj, jint rgb, jint pixel)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQColorJBridge((TQRgb) rgb, (uint) pixel));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_newTQColor__III(JNIEnv* env, jobject obj, jint r, jint g, jint b)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQColorJBridge((int) r, (int) g, (int) b));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_newTQColor__IIII(JNIEnv* env, jobject obj, jint x, jint y, jint z, jint arg4)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQColorJBridge((int) x, (int) y, (int) z, (TTQColor::Spec) arg4));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_newTQColor__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring name)
{
static TTQString* _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQColorJBridge((const TTQString&)*(TTQString*) QtSupport::toTQString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_numBitPlanes(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	jint xret = (jint) TQColorJBridge::numBitPlanes();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QColor_op_1equals(JNIEnv* env, jobject obj, jobject c)
{
	jboolean xret = (jboolean) ((TTQColor*) QtSupport::getQt(env, obj))->operator==((const TTQColor&)*(const TTQColor*) QtSupport::getQt(env, c));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QColor_op_1not_1equals(JNIEnv* env, jobject obj, jobject c)
{
	jboolean xret = (jboolean) ((TTQColor*) QtSupport::getQt(env, obj))->operator!=((const TTQColor&)*(const TTQColor*) QtSupport::getQt(env, c));
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_pixel(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TTQColor*) QtSupport::getQt(env, obj))->pixel();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_red(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TTQColor*) QtSupport::getQt(env, obj))->red();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QColor_rgb__(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TTQColor*) QtSupport::getQt(env, obj))->rgb();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_rgb___3I_3I_3I(JNIEnv* env, jobject obj, jintArray r, jintArray g, jintArray b)
{
	int* _int_r = QtSupport::toIntPtr(env, r);
	int* _int_g = QtSupport::toIntPtr(env, g);
	int* _int_b = QtSupport::toIntPtr(env, b);
	((TTQColor*) QtSupport::getQt(env, obj))->rgb( (int*) _int_r,  (int*) _int_g,  (int*) _int_b);
	env->SetIntArrayRegion(r, 0, 1, (jint *) _int_r);
	env->SetIntArrayRegion(g, 0, 1, (jint *) _int_g);
	env->SetIntArrayRegion(b, 0, 1, (jint *) _int_b);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_setHsv(JNIEnv* env, jobject obj, jint h, jint s, jint v)
{
	((TTQColor*) QtSupport::getQt(env, obj))->setHsv((int) h, (int) s, (int) v);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_setNamedColor(JNIEnv* env, jobject obj, jstring name)
{
static TTQString* _qstring_name = 0;
	((TTQColor*) QtSupport::getQt(env, obj))->setNamedColor((const TTQString&)*(TTQString*) QtSupport::toTQString(env, name, &_qstring_name));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_setRgb__I(JNIEnv* env, jobject obj, jint rgb)
{
	((TTQColor*) QtSupport::getQt(env, obj))->setRgb((TQRgb) rgb);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QColor_setRgb__III(JNIEnv* env, jobject obj, jint r, jint g, jint b)
{
	((TTQColor*) QtSupport::getQt(env, obj))->setRgb((int) r, (int) g, (int) b);
	return;
}