Adjusting testing cases for current state of OCCT
[occt.git] / samples / java / drv / SampleHLRJni / SampleHLRJni_Aspect_WindowDriver_java.cxx
CommitLineData
7fd59977 1//
2// Copyright (C) 1991 - 2000 by
3// Matra Datavision SA. All rights reserved.
4//
5// Copyright (C) 2001 - 2004 by
6// Open CASCADE SA. All rights reserved.
7//
8// This file is part of the Open CASCADE Technology software.
9//
10// This software may be distributed and/or modified under the terms and
11// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
12// and appearing in the file LICENSE included in the packaging of this file.
13//
14// This software is distributed on an "AS IS" basis, without warranty of any
15// kind, and Open CASCADE SA hereby disclaims all such warranties,
16// including without limitation, any warranties of merchantability, fitness
17// for a particular purpose or non-infringement. Please see the License for
18// the specific terms and conditions governing rights and limitations under the
19// License.
20
21#include <SampleHLRJni_Aspect_WindowDriver.h>
22#include <Aspect_WindowDriver.hxx>
23#include <jcas.hxx>
24#include <stdlib.h>
25#include <Standard_ErrorHandler.hxx>
26#include <Standard_Failure.hxx>
27#include <Standard_SStream.hxx>
28
29#include <Standard_Boolean.hxx>
30#include <Standard_Integer.hxx>
31#include <Aspect_TypeOfResize.hxx>
32#include <Aspect_Window.hxx>
33#include <Aspect_TypeOfDrawMode.hxx>
34#include <Standard_ShortReal.hxx>
35#include <Standard_Real.hxx>
36#include <TCollection_ExtendedString.hxx>
37#include <Standard_CString.hxx>
38
39
40extern "C" {
41
42
43JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_BeginDraw (JNIEnv *env, jobject theobj, jboolean DoubleBuffer, jint aRetainBuffer)
44{
45
46jcas_Locking alock(env);
47{
48try {
49Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
50the_this->BeginDraw((Standard_Boolean) DoubleBuffer,(Standard_Integer) aRetainBuffer);
51
52}
53catch (Standard_Failure) {
54 Standard_SStream Err;
55 Err << Standard_Failure::Caught();
56 Err << (char) 0;
57 jcas_ThrowException(env,Err.str().c_str());
58}
59}
60alock.Release();
61
62}
63
64
65
66JNIEXPORT jshort JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_ResizeSpace (JNIEnv *env, jobject theobj)
67{
68jshort thejret;
69
70jcas_Locking alock(env);
71{
72try {
73Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
74 thejret = the_this->ResizeSpace();
75
76}
77catch (Standard_Failure) {
78 Standard_SStream Err;
79 Err << Standard_Failure::Caught();
80 Err << (char) 0;
81 jcas_ThrowException(env,Err.str().c_str());
82}
83}
84alock.Release();
85return thejret;
86}
87
88
89
90JNIEXPORT jobject JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_Window (JNIEnv *env, jobject theobj)
91{
92jobject thejret;
93
94jcas_Locking alock(env);
95{
96try {
97Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
98Handle(Aspect_Window)* theret = new Handle(Aspect_Window);
99*theret = the_this->Window();
100thejret = jcas_CreateObject(env,"CASCADESamplesJni/Aspect_Window",theret);
101
102}
103catch (Standard_Failure) {
104 Standard_SStream Err;
105 Err << Standard_Failure::Caught();
106 Err << (char) 0;
107 jcas_ThrowException(env,Err.str().c_str());
108}
109}
110alock.Release();
111return thejret;
112}
113
114
115
116JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_SetDrawMode (JNIEnv *env, jobject theobj, jshort aMode)
117{
118
119jcas_Locking alock(env);
120{
121try {
122Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
123the_this->SetDrawMode((Aspect_TypeOfDrawMode) aMode);
124
125}
126catch (Standard_Failure) {
127 Standard_SStream Err;
128 Err << Standard_Failure::Caught();
129 Err << (char) 0;
130 jcas_ThrowException(env,Err.str().c_str());
131}
132}
133alock.Release();
134
135}
136
137
138
139JNIEXPORT jboolean JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_OpenBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer, jfloat aPivotX, jfloat aPivotY, jint aWidthIndex, jint aColorIndex, jint aFontIndex, jshort aDrawMode)
140{
141jboolean thejret;
142
143jcas_Locking alock(env);
144{
145try {
146Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
147 thejret = the_this->OpenBuffer((Standard_Integer) aRetainBuffer,(Standard_ShortReal) aPivotX,(Standard_ShortReal) aPivotY,(Standard_Integer) aWidthIndex,(Standard_Integer) aColorIndex,(Standard_Integer) aFontIndex,(Aspect_TypeOfDrawMode) aDrawMode);
148
149}
150catch (Standard_Failure) {
151 Standard_SStream Err;
152 Err << Standard_Failure::Caught();
153 Err << (char) 0;
154 jcas_ThrowException(env,Err.str().c_str());
155}
156}
157alock.Release();
158return thejret;
159}
160
161
162
163JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_CloseBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer)
164{
165
166jcas_Locking alock(env);
167{
168try {
169Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
170the_this->CloseBuffer((Standard_Integer) aRetainBuffer);
171
172}
173catch (Standard_Failure) {
174 Standard_SStream Err;
175 Err << Standard_Failure::Caught();
176 Err << (char) 0;
177 jcas_ThrowException(env,Err.str().c_str());
178}
179}
180alock.Release();
181
182}
183
184
185
186JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_ClearBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer)
187{
188
189jcas_Locking alock(env);
190{
191try {
192Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
193the_this->ClearBuffer((Standard_Integer) aRetainBuffer);
194
195}
196catch (Standard_Failure) {
197 Standard_SStream Err;
198 Err << Standard_Failure::Caught();
199 Err << (char) 0;
200 jcas_ThrowException(env,Err.str().c_str());
201}
202}
203alock.Release();
204
205}
206
207
208
209JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_DrawBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer)
210{
211
212jcas_Locking alock(env);
213{
214try {
215Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
216the_this->DrawBuffer((Standard_Integer) aRetainBuffer);
217
218}
219catch (Standard_Failure) {
220 Standard_SStream Err;
221 Err << Standard_Failure::Caught();
222 Err << (char) 0;
223 jcas_ThrowException(env,Err.str().c_str());
224}
225}
226alock.Release();
227
228}
229
230
231
232JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_EraseBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer)
233{
234
235jcas_Locking alock(env);
236{
237try {
238Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
239the_this->EraseBuffer((Standard_Integer) aRetainBuffer);
240
241}
242catch (Standard_Failure) {
243 Standard_SStream Err;
244 Err << Standard_Failure::Caught();
245 Err << (char) 0;
246 jcas_ThrowException(env,Err.str().c_str());
247}
248}
249alock.Release();
250
251}
252
253
254
255JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_MoveBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer, jfloat aPivotX, jfloat aPivotY)
256{
257
258jcas_Locking alock(env);
259{
260try {
261Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
262the_this->MoveBuffer((Standard_Integer) aRetainBuffer,(Standard_ShortReal) aPivotX,(Standard_ShortReal) aPivotY);
263
264}
265catch (Standard_Failure) {
266 Standard_SStream Err;
267 Err << Standard_Failure::Caught();
268 Err << (char) 0;
269 jcas_ThrowException(env,Err.str().c_str());
270}
271}
272alock.Release();
273
274}
275
276
277
278JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_ScaleBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer, jdouble aScaleX, jdouble aScaleY)
279{
280
281jcas_Locking alock(env);
282{
283try {
284Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
285the_this->ScaleBuffer((Standard_Integer) aRetainBuffer,(Quantity_Factor) aScaleX,(Quantity_Factor) aScaleY);
286
287}
288catch (Standard_Failure) {
289 Standard_SStream Err;
290 Err << Standard_Failure::Caught();
291 Err << (char) 0;
292 jcas_ThrowException(env,Err.str().c_str());
293}
294}
295alock.Release();
296
297}
298
299
300
301JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_RotateBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer, jdouble anAngle)
302{
303
304jcas_Locking alock(env);
305{
306try {
307Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
308the_this->RotateBuffer((Standard_Integer) aRetainBuffer,(Quantity_PlaneAngle) anAngle);
309
310}
311catch (Standard_Failure) {
312 Standard_SStream Err;
313 Err << Standard_Failure::Caught();
314 Err << (char) 0;
315 jcas_ThrowException(env,Err.str().c_str());
316}
317}
318alock.Release();
319
320}
321
322
323
324JNIEXPORT jboolean JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_BufferIsOpen (JNIEnv *env, jobject theobj, jint aRetainBuffer)
325{
326jboolean thejret;
327
328jcas_Locking alock(env);
329{
330try {
331Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
332 thejret = the_this->BufferIsOpen((Standard_Integer) aRetainBuffer);
333
334}
335catch (Standard_Failure) {
336 Standard_SStream Err;
337 Err << Standard_Failure::Caught();
338 Err << (char) 0;
339 jcas_ThrowException(env,Err.str().c_str());
340}
341}
342alock.Release();
343return thejret;
344}
345
346
347
348JNIEXPORT jboolean JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_BufferIsEmpty (JNIEnv *env, jobject theobj, jint aRetainBuffer)
349{
350jboolean thejret;
351
352jcas_Locking alock(env);
353{
354try {
355Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
356 thejret = the_this->BufferIsEmpty((Standard_Integer) aRetainBuffer);
357
358}
359catch (Standard_Failure) {
360 Standard_SStream Err;
361 Err << Standard_Failure::Caught();
362 Err << (char) 0;
363 jcas_ThrowException(env,Err.str().c_str());
364}
365}
366alock.Release();
367return thejret;
368}
369
370
371
372JNIEXPORT jboolean JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_BufferIsDrawn (JNIEnv *env, jobject theobj, jint aRetainBuffer)
373{
374jboolean thejret;
375
376jcas_Locking alock(env);
377{
378try {
379Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
380 thejret = the_this->BufferIsDrawn((Standard_Integer) aRetainBuffer);
381
382}
383catch (Standard_Failure) {
384 Standard_SStream Err;
385 Err << Standard_Failure::Caught();
386 Err << (char) 0;
387 jcas_ThrowException(env,Err.str().c_str());
388}
389}
390alock.Release();
391return thejret;
392}
393
394
395
396JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_AngleOfBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer, jobject anAngle)
397{
398
399jcas_Locking alock(env);
400{
401try {
402Standard_Real the_anAngle = jcas_GetReal(env,anAngle);
403Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
404the_this->AngleOfBuffer((Standard_Integer) aRetainBuffer,the_anAngle);
405jcas_SetReal(env,anAngle,the_anAngle);
406
407}
408catch (Standard_Failure) {
409 Standard_SStream Err;
410 Err << Standard_Failure::Caught();
411 Err << (char) 0;
412 jcas_ThrowException(env,Err.str().c_str());
413}
414}
415alock.Release();
416
417}
418
419
420
421JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_ScaleOfBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer, jobject aScaleX, jobject aScaleY)
422{
423
424jcas_Locking alock(env);
425{
426try {
427Standard_Real the_aScaleX = jcas_GetReal(env,aScaleX);
428Standard_Real the_aScaleY = jcas_GetReal(env,aScaleY);
429Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
430the_this->ScaleOfBuffer((Standard_Integer) aRetainBuffer,the_aScaleX,the_aScaleY);
431jcas_SetReal(env,aScaleX,the_aScaleX);
432jcas_SetReal(env,aScaleY,the_aScaleY);
433
434}
435catch (Standard_Failure) {
436 Standard_SStream Err;
437 Err << Standard_Failure::Caught();
438 Err << (char) 0;
439 jcas_ThrowException(env,Err.str().c_str());
440}
441}
442alock.Release();
443
444}
445
446
447
448JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_PositionOfBuffer (JNIEnv *env, jobject theobj, jint aRetainBuffer, jobject aPivotX, jobject aPivotY)
449{
450
451jcas_Locking alock(env);
452{
453try {
454Standard_ShortReal the_aPivotX = jcas_GetShortReal(env,aPivotX);
455Standard_ShortReal the_aPivotY = jcas_GetShortReal(env,aPivotY);
456Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
457the_this->PositionOfBuffer((Standard_Integer) aRetainBuffer,the_aPivotX,the_aPivotY);
458jcas_SetShortReal(env,aPivotX,the_aPivotX);
459jcas_SetShortReal(env,aPivotY,the_aPivotY);
460
461}
462catch (Standard_Failure) {
463 Standard_SStream Err;
464 Err << Standard_Failure::Caught();
465 Err << (char) 0;
466 jcas_ThrowException(env,Err.str().c_str());
467}
468}
469alock.Release();
470
471}
472
473
474
475JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_Aspect_1WindowDriver_1TextSize_11 (JNIEnv *env, jobject theobj, jobject aText, jobject aWidth, jobject aHeight, jint aFontIndex)
476{
477
478jcas_Locking alock(env);
479{
480try {
481TCollection_ExtendedString* the_aText = (TCollection_ExtendedString*) jcas_GetHandle(env,aText);
482if ( the_aText == NULL ) {
483
484 // The following assumes availability of the default constructor (what may not
485 // always be the case). Therefore explicit exception is thrown if the null
486 // object has been passed.
487 // the_aText = new TCollection_ExtendedString ();
488 // jcas_SetHandle ( env, aText, the_aText );
489 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
490
491} // end if
492Standard_ShortReal the_aWidth = jcas_GetShortReal(env,aWidth);
493Standard_ShortReal the_aHeight = jcas_GetShortReal(env,aHeight);
494Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
495the_this->TextSize(*the_aText,the_aWidth,the_aHeight,(Standard_Integer) aFontIndex);
496jcas_SetShortReal(env,aWidth,the_aWidth);
497jcas_SetShortReal(env,aHeight,the_aHeight);
498
499}
500catch (Standard_Failure) {
501 Standard_SStream Err;
502 Err << Standard_Failure::Caught();
503 Err << (char) 0;
504 jcas_ThrowException(env,Err.str().c_str());
505}
506}
507alock.Release();
508
509}
510
511
512
513JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_Aspect_1WindowDriver_1TextSize_12 (JNIEnv *env, jobject theobj, jobject aText, jobject aWidth, jobject aHeight, jobject anXoffset, jobject anYoffset, jint aFontIndex)
514{
515
516jcas_Locking alock(env);
517{
518try {
519TCollection_ExtendedString* the_aText = (TCollection_ExtendedString*) jcas_GetHandle(env,aText);
520if ( the_aText == NULL ) {
521
522 // The following assumes availability of the default constructor (what may not
523 // always be the case). Therefore explicit exception is thrown if the null
524 // object has been passed.
525 // the_aText = new TCollection_ExtendedString ();
526 // jcas_SetHandle ( env, aText, the_aText );
527 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
528
529} // end if
530Standard_ShortReal the_aWidth = jcas_GetShortReal(env,aWidth);
531Standard_ShortReal the_aHeight = jcas_GetShortReal(env,aHeight);
532Standard_ShortReal the_anXoffset = jcas_GetShortReal(env,anXoffset);
533Standard_ShortReal the_anYoffset = jcas_GetShortReal(env,anYoffset);
534Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
535the_this->TextSize(*the_aText,the_aWidth,the_aHeight,the_anXoffset,the_anYoffset,(Standard_Integer) aFontIndex);
536jcas_SetShortReal(env,aWidth,the_aWidth);
537jcas_SetShortReal(env,aHeight,the_aHeight);
538jcas_SetShortReal(env,anXoffset,the_anXoffset);
539jcas_SetShortReal(env,anYoffset,the_anYoffset);
540
541}
542catch (Standard_Failure) {
543 Standard_SStream Err;
544 Err << Standard_Failure::Caught();
545 Err << (char) 0;
546 jcas_ThrowException(env,Err.str().c_str());
547}
548}
549alock.Release();
550
551}
552
553
554
555JNIEXPORT jobject JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_FontSize (JNIEnv *env, jobject theobj, jobject aSlant, jobject aSize, jobject aBheight, jint aFontIndex)
556{
557jobject thejret;
558
559jcas_Locking alock(env);
560{
561try {
562Standard_Real the_aSlant = jcas_GetReal(env,aSlant);
563Standard_ShortReal the_aSize = jcas_GetShortReal(env,aSize);
564Standard_ShortReal the_aBheight = jcas_GetShortReal(env,aBheight);
565Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
566Standard_CString sret = the_this->FontSize(the_aSlant,the_aSize,the_aBheight,(Standard_Integer) aFontIndex);
567jclass CLSret = env->FindClass("jcas/Standard_CString");
568thejret = env->AllocObject(CLSret);
569jcas_SetCStringValue(env,thejret,sret);
570jcas_SetReal(env,aSlant,the_aSlant);
571jcas_SetShortReal(env,aSize,the_aSize);
572jcas_SetShortReal(env,aBheight,the_aBheight);
573
574}
575catch (Standard_Failure) {
576 Standard_SStream Err;
577 Err << Standard_Failure::Caught();
578 Err << (char) 0;
579 jcas_ThrowException(env,Err.str().c_str());
580}
581}
582alock.Release();
583return thejret;
584}
585
586
587
588JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_ColorBoundIndexs (JNIEnv *env, jobject theobj, jobject aMinIndex, jobject aMaxIndex)
589{
590
591jcas_Locking alock(env);
592{
593try {
594Standard_Integer the_aMinIndex = jcas_GetInteger(env,aMinIndex);
595Standard_Integer the_aMaxIndex = jcas_GetInteger(env,aMaxIndex);
596Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
597the_this->ColorBoundIndexs(the_aMinIndex,the_aMaxIndex);
598jcas_SetInteger(env,aMinIndex,the_aMinIndex);
599jcas_SetInteger(env,aMaxIndex,the_aMaxIndex);
600
601}
602catch (Standard_Failure) {
603 Standard_SStream Err;
604 Err << Standard_Failure::Caught();
605 Err << (char) 0;
606 jcas_ThrowException(env,Err.str().c_str());
607}
608}
609alock.Release();
610
611}
612
613
614
615JNIEXPORT jint JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_LocalColorIndex (JNIEnv *env, jobject theobj, jint anIndex)
616{
617jint thejret;
618
619jcas_Locking alock(env);
620{
621try {
622Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
623 thejret = the_this->LocalColorIndex((Standard_Integer) anIndex);
624
625}
626catch (Standard_Failure) {
627 Standard_SStream Err;
628 Err << Standard_Failure::Caught();
629 Err << (char) 0;
630 jcas_ThrowException(env,Err.str().c_str());
631}
632}
633alock.Release();
634return thejret;
635}
636
637
638
639JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_FontBoundIndexs (JNIEnv *env, jobject theobj, jobject aMinIndex, jobject aMaxIndex)
640{
641
642jcas_Locking alock(env);
643{
644try {
645Standard_Integer the_aMinIndex = jcas_GetInteger(env,aMinIndex);
646Standard_Integer the_aMaxIndex = jcas_GetInteger(env,aMaxIndex);
647Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
648the_this->FontBoundIndexs(the_aMinIndex,the_aMaxIndex);
649jcas_SetInteger(env,aMinIndex,the_aMinIndex);
650jcas_SetInteger(env,aMaxIndex,the_aMaxIndex);
651
652}
653catch (Standard_Failure) {
654 Standard_SStream Err;
655 Err << Standard_Failure::Caught();
656 Err << (char) 0;
657 jcas_ThrowException(env,Err.str().c_str());
658}
659}
660alock.Release();
661
662}
663
664
665
666JNIEXPORT jint JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_LocalFontIndex (JNIEnv *env, jobject theobj, jint anIndex)
667{
668jint thejret;
669
670jcas_Locking alock(env);
671{
672try {
673Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
674 thejret = the_this->LocalFontIndex((Standard_Integer) anIndex);
675
676}
677catch (Standard_Failure) {
678 Standard_SStream Err;
679 Err << Standard_Failure::Caught();
680 Err << (char) 0;
681 jcas_ThrowException(env,Err.str().c_str());
682}
683}
684alock.Release();
685return thejret;
686}
687
688
689
690JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_TypeBoundIndexs (JNIEnv *env, jobject theobj, jobject aMinIndex, jobject aMaxIndex)
691{
692
693jcas_Locking alock(env);
694{
695try {
696Standard_Integer the_aMinIndex = jcas_GetInteger(env,aMinIndex);
697Standard_Integer the_aMaxIndex = jcas_GetInteger(env,aMaxIndex);
698Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
699the_this->TypeBoundIndexs(the_aMinIndex,the_aMaxIndex);
700jcas_SetInteger(env,aMinIndex,the_aMinIndex);
701jcas_SetInteger(env,aMaxIndex,the_aMaxIndex);
702
703}
704catch (Standard_Failure) {
705 Standard_SStream Err;
706 Err << Standard_Failure::Caught();
707 Err << (char) 0;
708 jcas_ThrowException(env,Err.str().c_str());
709}
710}
711alock.Release();
712
713}
714
715
716
717JNIEXPORT jint JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_LocalTypeIndex (JNIEnv *env, jobject theobj, jint anIndex)
718{
719jint thejret;
720
721jcas_Locking alock(env);
722{
723try {
724Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
725 thejret = the_this->LocalTypeIndex((Standard_Integer) anIndex);
726
727}
728catch (Standard_Failure) {
729 Standard_SStream Err;
730 Err << Standard_Failure::Caught();
731 Err << (char) 0;
732 jcas_ThrowException(env,Err.str().c_str());
733}
734}
735alock.Release();
736return thejret;
737}
738
739
740
741JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_WidthBoundIndexs (JNIEnv *env, jobject theobj, jobject aMinIndex, jobject aMaxIndex)
742{
743
744jcas_Locking alock(env);
745{
746try {
747Standard_Integer the_aMinIndex = jcas_GetInteger(env,aMinIndex);
748Standard_Integer the_aMaxIndex = jcas_GetInteger(env,aMaxIndex);
749Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
750the_this->WidthBoundIndexs(the_aMinIndex,the_aMaxIndex);
751jcas_SetInteger(env,aMinIndex,the_aMinIndex);
752jcas_SetInteger(env,aMaxIndex,the_aMaxIndex);
753
754}
755catch (Standard_Failure) {
756 Standard_SStream Err;
757 Err << Standard_Failure::Caught();
758 Err << (char) 0;
759 jcas_ThrowException(env,Err.str().c_str());
760}
761}
762alock.Release();
763
764}
765
766
767
768JNIEXPORT jint JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_LocalWidthIndex (JNIEnv *env, jobject theobj, jint anIndex)
769{
770jint thejret;
771
772jcas_Locking alock(env);
773{
774try {
775Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
776 thejret = the_this->LocalWidthIndex((Standard_Integer) anIndex);
777
778}
779catch (Standard_Failure) {
780 Standard_SStream Err;
781 Err << Standard_Failure::Caught();
782 Err << (char) 0;
783 jcas_ThrowException(env,Err.str().c_str());
784}
785}
786alock.Release();
787return thejret;
788}
789
790
791
792JNIEXPORT void JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_MarkBoundIndexs (JNIEnv *env, jobject theobj, jobject aMinIndex, jobject aMaxIndex)
793{
794
795jcas_Locking alock(env);
796{
797try {
798Standard_Integer the_aMinIndex = jcas_GetInteger(env,aMinIndex);
799Standard_Integer the_aMaxIndex = jcas_GetInteger(env,aMaxIndex);
800Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
801the_this->MarkBoundIndexs(the_aMinIndex,the_aMaxIndex);
802jcas_SetInteger(env,aMinIndex,the_aMinIndex);
803jcas_SetInteger(env,aMaxIndex,the_aMaxIndex);
804
805}
806catch (Standard_Failure) {
807 Standard_SStream Err;
808 Err << Standard_Failure::Caught();
809 Err << (char) 0;
810 jcas_ThrowException(env,Err.str().c_str());
811}
812}
813alock.Release();
814
815}
816
817
818
819JNIEXPORT jint JNICALL Java_SampleHLRJni_Aspect_1WindowDriver_LocalMarkIndex (JNIEnv *env, jobject theobj, jint anIndex)
820{
821jint thejret;
822
823jcas_Locking alock(env);
824{
825try {
826Handle(Aspect_WindowDriver) the_this = *((Handle(Aspect_WindowDriver)*) jcas_GetHandle(env,theobj));
827 thejret = the_this->LocalMarkIndex((Standard_Integer) anIndex);
828
829}
830catch (Standard_Failure) {
831 Standard_SStream Err;
832 Err << Standard_Failure::Caught();
833 Err << (char) 0;
834 jcas_ThrowException(env,Err.str().c_str());
835}
836}
837alock.Release();
838return thejret;
839}
840
841
842}