mantielero

Untitled

Nov 12th, 2022
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 43.00 KB | None | 0 0
  1. /* Generated by Nim Compiler v1.6.6 */
  2. /* Compiled for: Linux, amd64, gcc */
  3. /* Command for C compiler:
  4.    g++ -c -std=gnu++14 -funsigned-char  -w -fmax-errors=3 -fpermissive -I/usr/include/opencascade/ -I/usr/import/opencascade/   -I/home/jose/.choosenim/toolchains/nim-1.6.6/lib -I/home/jose/src/nimlang/occt.nim/examples -o /home/jose/src/nimlang/occt.nim/examples/cache/@mviewer04.nim.cpp.o /home/jose/src/nimlang/occt.nim/examples/cache/@mviewer04.nim.cpp */
  5. #define NIM_INTBITS 64
  6.  
  7. #include "nimbase.h"
  8. #include "Standard_Handle.hxx"
  9. #include "AIS_ViewController.hxx"
  10. #include "AIS_InteractiveContext.hxx"
  11. #include "Standard_Transient.hxx"
  12. #include "V3d_View.hxx"
  13. #include <string.h>
  14. #include "Aspect_DisplayConnection.hxx"
  15. #include "OpenGl_GraphicDriver.hxx"
  16. #include "Graphic3d_GraphicDriver.hxx"
  17. #include "V3d_Viewer.hxx"
  18. #include "V3d_TypeOfView.hxx"
  19. #include "Xw_Window.hxx"
  20. #include "Aspect_Window.hxx"
  21. #include "Quantity_Color.hxx"
  22. #include "Quantity_NameOfColor.hxx"
  23. #include "Aspect_TypeOfTriedronPosition.hxx"
  24. #include "V3d_TypeOfVisualization.hxx"
  25. #include "Graphic3d_RenderingParams.hxx"
  26. #include "BRepPrimAPI_MakeBox.hxx"
  27. #include "BRepBuilderAPI_MakeShape.hxx"
  28. #include "BRepBuilderAPI_Command.hxx"
  29. #include "TopoDS_Solid.hxx"
  30. #include "TopoDS_Shape.hxx"
  31. #include "AIS_Shape.hxx"
  32. #include "AIS_InteractiveObject.hxx"
  33. #include "SelectMgr_SelectableObject.hxx"
  34. #include "PrsMgr_PresentableObject.hxx"
  35. #include "AIS_DisplayStatus.hxx"
  36. #undef LANGUAGE_C
  37. #undef MIPSEB
  38. #undef MIPSEL
  39. #undef PPC
  40. #undef R3000
  41. #undef R4000
  42. #undef i386
  43. #undef linux
  44. #undef mips
  45. #undef near
  46. #undef far
  47. #undef powerpc
  48. #undef unix
  49.   #  define nimfr_(proc, file) \
  50.       TFrame FR_; \
  51.       FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
  52.  
  53.   #  define nimfrs_(proc, file, slots, length) \
  54.       struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
  55.       FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
  56.  
  57.   #  define nimln_(n, file) \
  58.       FR_.line = n; FR_.filename = file;
  59.   struct tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg;
  60. struct tyTuple__mOcJMV5G9c4Xbhu28ljzjXA;
  61. struct tyObject_NSOpenGLContext__cXoy3V9c0amLPn8ieCuKwyA;
  62. struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw;
  63. struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
  64. struct Exception;
  65. struct RootObj;
  66. struct TNimType;
  67. struct TNimNode;
  68. struct NimStringDesc;
  69. struct TGenericSeq;
  70. struct tySequence__uB9b75OUPRENsBAu4AnoePA;
  71. struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
  72. struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
  73. struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
  74. struct tyObject_GcStack__7fytPA5bBsob6See21YMRA;
  75. struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
  76. struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
  77. struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
  78. struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
  79. struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
  80. struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
  81. struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
  82. struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
  83. struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
  84. struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
  85. struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
  86. struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
  87. union tyObject_XEvent__EZvRvOUywFnBp4PzilZBoA;
  88. struct tyObject_XAnyEvent__1ezXFSdvNym3JpvCnlsENg;
  89. struct tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q;
  90. struct tyObject_XKeyEvent__R59aUOCz38cH7kW8WZOY0fg;
  91. struct tyObject_XButtonEvent__iRbydJb1sLXZm2LAsp2Y9cA;
  92. struct tyObject_XMotionEvent__quIqNclnyTLRzhZ9baI9b4Mw;
  93. struct tyObject_XCrossingEvent__CwFNdmeikq1aI6Csp6M1TA;
  94. struct tyObject_XFocusChangeEvent__qWetk9cjWxGBS3eJVs3yD8g;
  95. struct tyObject_XExposeEvent__GlotzqzjF0UF69cdWtF3UmA;
  96. struct tyObject_XGraphicsExposeEvent__vqoMwYGbpvggSS5CE7yfDg;
  97. struct tyObject_XNoExposeEvent__OBeJnywKIxPbSlIDKzOCAw;
  98. struct tyObject_XVisibilityEvent__QIE8z6fsM14nzlNuZ4qx1g;
  99. struct tyObject_XCreateWindowEvent__gkTdbvHrseR8byhpmIGCOQ;
  100. struct tyObject_XDestroyWindowEvent__Tp9aCI6GD3XFIuCb9bdElOuQ;
  101. struct tyObject_XUnmapEvent__dcLuf3f3TlbopgMrXs9bCGQ;
  102. struct tyObject_XMapEvent__RhdYUwfbWPzmyx2xTyV2FA;
  103. struct tyObject_XMapRequestEvent__FaVNekhwNIncxldv52k8Lw;
  104. struct tyObject_XReparentEvent__0ud6oL9auF2YpEcfxEUnWsw;
  105. struct tyObject_XConfigureEvent__t9c9cC7EhkcyFJI9aMaDAboHA;
  106. struct tyObject_XGravityEvent__i47ge3KLMlyylKb7nomPgQ;
  107. struct tyObject_XResizeRequestEvent__6P9c2mszwxUkchOWHCWX4pw;
  108. struct tyObject_XConfigureRequestEvent__lqOXYk4ucPkV6vo82rcRfA;
  109. struct tyObject_XCirculateEvent__PZ5EpxBAqiDQSX2toN9bNVQ;
  110. struct tyObject_XCirculateRequestEvent__d1aa9cXr9a9bw8vIT3mxwrJoQ;
  111. struct tyObject_XPropertyEvent__8VLR5srdJmMgpN5n3xA9aYQ;
  112. struct tyObject_XSelectionClearEvent__bln1Oj561KhuR8PFhQdugA;
  113. struct tyObject_XSelectionRequestEvent__FKYV6bvwXA2X0DguhHqR9ag;
  114. struct tyObject_XSelectionEvent__vVuKKVLJTVeC347zxsVdyg;
  115. struct tyObject_XColormapEvent__uqOhwoxMeCXt84TvPXgUgA;
  116. struct tyObject_XClientMessageEvent__xo4p0BsKjqHQ1YGbKn8Gwg;
  117. union tyObject_XClientMessageData__OKbi4O7vRg7iM9cNCZ0JrCA;
  118. struct tyObject_XMappingEvent__9boqTjTHll5ddMwGFM6CFMw;
  119. struct tyObject_XErrorEvent__KFlW9cH2fxpW1RXJX7y9caGQ;
  120. struct tyObject_XKeymapEvent__CrUb4iNeKC4ksLHETVzgRQ;
  121. struct tyObject_XGenericEvent__BMeayQYhmFza5aSAzlZ4qg;
  122. struct tyObject_XGenericEventCookie__oilhtNjFFwRywZzkahsLvQ;
  123. struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
  124. typedef opencascade::handle<AIS_InteractiveContext> TY__U9azJ3jnkWQljuWXj5dG30g;
  125. typedef opencascade::handle<V3d_View> TY__icTQkUhVkd9cEc0gJ9c2VwPg;
  126. struct tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg : public AIS_ViewController {
  127. TY__U9azJ3jnkWQljuWXj5dG30g myContext;
  128. TY__icTQkUhVkd9cEc0gJ9c2VwPg myView;
  129. };
  130. struct tyTuple__mOcJMV5G9c4Xbhu28ljzjXA {
  131. TY__U9azJ3jnkWQljuWXj5dG30g Field0;
  132. TY__icTQkUhVkd9cEc0gJ9c2VwPg Field1;
  133. };
  134. typedef opencascade::handle<Aspect_DisplayConnection> TY__keu8dJZTmN1bTjmh2YTMeA;
  135. typedef opencascade::handle<OpenGl_GraphicDriver> TY__FZHdszn6vruH9aCoz9aCktYQ;
  136. typedef opencascade::handle<Graphic3d_GraphicDriver> TY__WzQHB9c9cwo6CTGferBwI78g;
  137. typedef opencascade::handle<V3d_Viewer> TY__47tV2K1aaSZXiNrxUNujaw;
  138. typedef opencascade::handle<Xw_Window> TY__LyS0CtE7Da8V9c3SncboSbA;
  139. typedef opencascade::handle<Aspect_Window> TY__yB86VfuSyzthqado7ziZgg;
  140. typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
  141. typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
  142. typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
  143. typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
  144. struct TNimType {
  145. NI size;
  146. NI align;
  147. tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
  148. tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
  149. TNimType* base;
  150. TNimNode* node;
  151. void* finalizer;
  152. tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
  153. tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
  154. };
  155. struct RootObj {
  156. TNimType* m_type;
  157. };
  158. struct TGenericSeq {
  159. NI len;
  160. NI reserved;
  161. };
  162. struct NimStringDesc : public TGenericSeq {
  163. NIM_CHAR data[SEQ_DECL_SIZE];
  164. };
  165. struct Exception : public RootObj {
  166. Exception* parent;
  167. NCSTRING name;
  168. NimStringDesc* message;
  169. tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
  170. Exception* up;
  171. };
  172. struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA : public Exception {
  173. };
  174. struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw : public tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA {
  175. };
  176. typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
  177. struct TNimNode {
  178. tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
  179. NI offset;
  180. TNimType* typ;
  181. NCSTRING name;
  182. NI len;
  183. TNimNode** sons;
  184. };
  185. struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
  186. NI refcount;
  187. TNimType* typ;
  188. };
  189. struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
  190. void* bottom;
  191. };
  192. struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
  193. NI len;
  194. NI cap;
  195. tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
  196. };
  197. typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
  198. typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
  199. typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
  200. typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
  201. typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
  202. struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
  203. tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
  204. };
  205. typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
  206. struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
  207. tyArray__0aOLqZchNi8nWtMTi8ND8w link;
  208. NI key;
  209. NI upperBound;
  210. NI level;
  211. };
  212. struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
  213. tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
  214. NI Field1;
  215. };
  216. typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
  217. struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
  218. NI len;
  219. tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
  220. tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
  221. };
  222. struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
  223. NI minLargeObj;
  224. NI maxLargeObj;
  225. tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
  226. NU32 flBitmap;
  227. tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
  228. tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
  229. tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
  230. NI currMem;
  231. NI maxMem;
  232. NI freeMem;
  233. NI occ;
  234. NI lastSize;
  235. tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
  236. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
  237. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
  238. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
  239. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
  240. NIM_BOOL locked;
  241. NIM_BOOL blockChunkSizeIncrease;
  242. NI nextChunkSize;
  243. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
  244. tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
  245. };
  246. struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
  247. NI stackScans;
  248. NI cycleCollections;
  249. NI maxThreshold;
  250. NI maxStackSize;
  251. NI maxStackCells;
  252. NI cycleTableSize;
  253. NI64 maxPause;
  254. };
  255. struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
  256. NI counter;
  257. NI max;
  258. tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
  259. tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
  260. };
  261. struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
  262. tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
  263. NI cycleThreshold;
  264. NI zctThreshold;
  265. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
  266. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
  267. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
  268. NI recGcLock;
  269. tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
  270. tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
  271. tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
  272. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
  273. NI gcThreadId;
  274. };
  275. typedef opencascade::handle<AIS_Shape> TY__0sNjvi6cy22LOUKb6aOHyA;
  276. typedef opencascade::handle<AIS_InteractiveObject> TY__9cLINH5i7M3YCUgLs46CBaA;
  277. struct tyObject_XAnyEvent__1ezXFSdvNym3JpvCnlsENg {
  278. int theType;
  279. unsigned long serial;
  280. int send_event;
  281. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  282. unsigned long window;
  283. };
  284. struct tyObject_XKeyEvent__R59aUOCz38cH7kW8WZOY0fg {
  285. int theType;
  286. unsigned long serial;
  287. int send_event;
  288. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  289. unsigned long window;
  290. unsigned long root;
  291. unsigned long subwindow;
  292. unsigned long time;
  293. int x;
  294. int y;
  295. int x_root;
  296. int y_root;
  297. unsigned int state;
  298. unsigned int keycode;
  299. int same_screen;
  300. };
  301. struct tyObject_XButtonEvent__iRbydJb1sLXZm2LAsp2Y9cA {
  302. int theType;
  303. unsigned long serial;
  304. int send_event;
  305. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  306. unsigned long window;
  307. unsigned long root;
  308. unsigned long subwindow;
  309. unsigned long time;
  310. int x;
  311. int y;
  312. int x_root;
  313. int y_root;
  314. unsigned int state;
  315. unsigned int button;
  316. int same_screen;
  317. };
  318. struct tyObject_XMotionEvent__quIqNclnyTLRzhZ9baI9b4Mw {
  319. int theType;
  320. unsigned long serial;
  321. int send_event;
  322. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  323. unsigned long window;
  324. unsigned long root;
  325. unsigned long subwindow;
  326. unsigned long time;
  327. int x;
  328. int y;
  329. int x_root;
  330. int y_root;
  331. unsigned int state;
  332. char is_hint;
  333. int same_screen;
  334. };
  335. struct tyObject_XCrossingEvent__CwFNdmeikq1aI6Csp6M1TA {
  336. int theType;
  337. unsigned long serial;
  338. int send_event;
  339. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  340. unsigned long window;
  341. unsigned long root;
  342. unsigned long subwindow;
  343. unsigned long time;
  344. int x;
  345. int y;
  346. int x_root;
  347. int y_root;
  348. int mode;
  349. int detail;
  350. int same_screen;
  351. int focus;
  352. unsigned int state;
  353. };
  354. struct tyObject_XFocusChangeEvent__qWetk9cjWxGBS3eJVs3yD8g {
  355. int theType;
  356. unsigned long serial;
  357. int send_event;
  358. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  359. unsigned long window;
  360. int mode;
  361. int detail;
  362. };
  363. struct tyObject_XExposeEvent__GlotzqzjF0UF69cdWtF3UmA {
  364. int theType;
  365. unsigned long serial;
  366. int send_event;
  367. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  368. unsigned long window;
  369. int x;
  370. int y;
  371. int width;
  372. int height;
  373. int count;
  374. };
  375. struct tyObject_XGraphicsExposeEvent__vqoMwYGbpvggSS5CE7yfDg {
  376. int theType;
  377. unsigned long serial;
  378. int send_event;
  379. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  380. unsigned long drawable;
  381. int x;
  382. int y;
  383. int width;
  384. int height;
  385. int count;
  386. int major_code;
  387. int minor_code;
  388. };
  389. struct tyObject_XNoExposeEvent__OBeJnywKIxPbSlIDKzOCAw {
  390. int theType;
  391. unsigned long serial;
  392. int send_event;
  393. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  394. unsigned long drawable;
  395. int major_code;
  396. int minor_code;
  397. };
  398. struct tyObject_XVisibilityEvent__QIE8z6fsM14nzlNuZ4qx1g {
  399. int theType;
  400. unsigned long serial;
  401. int send_event;
  402. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  403. unsigned long window;
  404. int state;
  405. };
  406. struct tyObject_XCreateWindowEvent__gkTdbvHrseR8byhpmIGCOQ {
  407. int theType;
  408. unsigned long serial;
  409. int send_event;
  410. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  411. unsigned long parent;
  412. unsigned long window;
  413. int x;
  414. int y;
  415. int width;
  416. int height;
  417. int border_width;
  418. int override_redirect;
  419. };
  420. struct tyObject_XDestroyWindowEvent__Tp9aCI6GD3XFIuCb9bdElOuQ {
  421. int theType;
  422. unsigned long serial;
  423. int send_event;
  424. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  425. unsigned long event;
  426. unsigned long window;
  427. };
  428. struct tyObject_XUnmapEvent__dcLuf3f3TlbopgMrXs9bCGQ {
  429. int theType;
  430. unsigned long serial;
  431. int send_event;
  432. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  433. unsigned long event;
  434. unsigned long window;
  435. int from_configure;
  436. };
  437. struct tyObject_XMapEvent__RhdYUwfbWPzmyx2xTyV2FA {
  438. int theType;
  439. unsigned long serial;
  440. int send_event;
  441. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  442. unsigned long event;
  443. unsigned long window;
  444. int override_redirect;
  445. };
  446. struct tyObject_XMapRequestEvent__FaVNekhwNIncxldv52k8Lw {
  447. int theType;
  448. unsigned long serial;
  449. int send_event;
  450. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  451. unsigned long parent;
  452. unsigned long window;
  453. };
  454. struct tyObject_XReparentEvent__0ud6oL9auF2YpEcfxEUnWsw {
  455. int theType;
  456. unsigned long serial;
  457. int send_event;
  458. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  459. unsigned long event;
  460. unsigned long window;
  461. unsigned long parent;
  462. int x;
  463. int y;
  464. int override_redirect;
  465. };
  466. struct tyObject_XConfigureEvent__t9c9cC7EhkcyFJI9aMaDAboHA {
  467. int theType;
  468. unsigned long serial;
  469. int send_event;
  470. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  471. unsigned long event;
  472. unsigned long window;
  473. int x;
  474. int y;
  475. int width;
  476. int height;
  477. int border_width;
  478. unsigned long above;
  479. int override_redirect;
  480. };
  481. struct tyObject_XGravityEvent__i47ge3KLMlyylKb7nomPgQ {
  482. int theType;
  483. unsigned long serial;
  484. int send_event;
  485. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  486. unsigned long event;
  487. unsigned long window;
  488. int x;
  489. int y;
  490. };
  491. struct tyObject_XResizeRequestEvent__6P9c2mszwxUkchOWHCWX4pw {
  492. int theType;
  493. unsigned long serial;
  494. int send_event;
  495. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  496. unsigned long window;
  497. int width;
  498. int height;
  499. };
  500. struct tyObject_XConfigureRequestEvent__lqOXYk4ucPkV6vo82rcRfA {
  501. int theType;
  502. unsigned long serial;
  503. int send_event;
  504. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  505. unsigned long parent;
  506. unsigned long window;
  507. int x;
  508. int y;
  509. int width;
  510. int height;
  511. int border_width;
  512. unsigned long above;
  513. int detail;
  514. unsigned long value_mask;
  515. };
  516. struct tyObject_XCirculateEvent__PZ5EpxBAqiDQSX2toN9bNVQ {
  517. int theType;
  518. unsigned long serial;
  519. int send_event;
  520. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  521. unsigned long event;
  522. unsigned long window;
  523. int place;
  524. };
  525. struct tyObject_XCirculateRequestEvent__d1aa9cXr9a9bw8vIT3mxwrJoQ {
  526. int theType;
  527. unsigned long serial;
  528. int send_event;
  529. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  530. unsigned long parent;
  531. unsigned long window;
  532. int place;
  533. };
  534. struct tyObject_XPropertyEvent__8VLR5srdJmMgpN5n3xA9aYQ {
  535. int theType;
  536. unsigned long serial;
  537. int send_event;
  538. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  539. unsigned long window;
  540. unsigned long atom;
  541. unsigned long time;
  542. int state;
  543. };
  544. struct tyObject_XSelectionClearEvent__bln1Oj561KhuR8PFhQdugA {
  545. int theType;
  546. unsigned long serial;
  547. int send_event;
  548. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  549. unsigned long window;
  550. unsigned long selection;
  551. unsigned long time;
  552. };
  553. struct tyObject_XSelectionRequestEvent__FKYV6bvwXA2X0DguhHqR9ag {
  554. int theType;
  555. unsigned long serial;
  556. int send_event;
  557. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  558. unsigned long owner;
  559. unsigned long requestor;
  560. unsigned long selection;
  561. unsigned long target;
  562. unsigned long property;
  563. unsigned long time;
  564. };
  565. struct tyObject_XSelectionEvent__vVuKKVLJTVeC347zxsVdyg {
  566. int theType;
  567. unsigned long serial;
  568. int send_event;
  569. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  570. unsigned long requestor;
  571. unsigned long selection;
  572. unsigned long target;
  573. unsigned long property;
  574. unsigned long time;
  575. };
  576. struct tyObject_XColormapEvent__uqOhwoxMeCXt84TvPXgUgA {
  577. int theType;
  578. unsigned long serial;
  579. int send_event;
  580. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  581. unsigned long window;
  582. unsigned long colormap;
  583. int c_new;
  584. int state;
  585. };
  586. typedef char tyArray__nNbxUiwYsukKERsPpdjNlQ[20];
  587. typedef short tyArray__o84zoeJk2qehCRP3mCX84g[10];
  588. typedef long tyArray__xDUyu9aScDpt0JZLU6q9aEZQ[5];
  589. union tyObject_XClientMessageData__OKbi4O7vRg7iM9cNCZ0JrCA {
  590. tyArray__nNbxUiwYsukKERsPpdjNlQ b;
  591. tyArray__o84zoeJk2qehCRP3mCX84g s;
  592. tyArray__xDUyu9aScDpt0JZLU6q9aEZQ l;
  593. };
  594. struct tyObject_XClientMessageEvent__xo4p0BsKjqHQ1YGbKn8Gwg {
  595. int theType;
  596. unsigned long serial;
  597. int send_event;
  598. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  599. unsigned long window;
  600. unsigned long message_type;
  601. int format;
  602. tyObject_XClientMessageData__OKbi4O7vRg7iM9cNCZ0JrCA data;
  603. };
  604. struct tyObject_XMappingEvent__9boqTjTHll5ddMwGFM6CFMw {
  605. int theType;
  606. unsigned long serial;
  607. int send_event;
  608. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  609. unsigned long window;
  610. int request;
  611. int first_keycode;
  612. int count;
  613. };
  614. struct tyObject_XErrorEvent__KFlW9cH2fxpW1RXJX7y9caGQ {
  615. int theType;
  616. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  617. unsigned long resourceid;
  618. unsigned long serial;
  619. unsigned char error_code;
  620. unsigned char request_code;
  621. unsigned char minor_code;
  622. };
  623. typedef char tyArray__4aFG3pQPUlTEoAKtMVpzjw[32];
  624. struct tyObject_XKeymapEvent__CrUb4iNeKC4ksLHETVzgRQ {
  625. int theType;
  626. unsigned long serial;
  627. int send_event;
  628. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  629. unsigned long window;
  630. tyArray__4aFG3pQPUlTEoAKtMVpzjw key_vector;
  631. };
  632. struct tyObject_XGenericEvent__BMeayQYhmFza5aSAzlZ4qg {
  633. int theType;
  634. unsigned long serial;
  635. int send_event;
  636. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  637. int extension;
  638. int evtype;
  639. };
  640. struct tyObject_XGenericEventCookie__oilhtNjFFwRywZzkahsLvQ {
  641. int theType;
  642. unsigned long serial;
  643. int send_event;
  644. tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* display;
  645. int extension;
  646. int evtype;
  647. unsigned int cookie;
  648. void* data;
  649. };
  650. typedef long tyArray__Sdaj3sYaqpvcWUW4S9aIRBg[24];
  651. union tyObject_XEvent__EZvRvOUywFnBp4PzilZBoA {
  652. int theType;
  653. tyObject_XAnyEvent__1ezXFSdvNym3JpvCnlsENg xany;
  654. tyObject_XKeyEvent__R59aUOCz38cH7kW8WZOY0fg xkey;
  655. tyObject_XButtonEvent__iRbydJb1sLXZm2LAsp2Y9cA xbutton;
  656. tyObject_XMotionEvent__quIqNclnyTLRzhZ9baI9b4Mw xmotion;
  657. tyObject_XCrossingEvent__CwFNdmeikq1aI6Csp6M1TA xcrossing;
  658. tyObject_XFocusChangeEvent__qWetk9cjWxGBS3eJVs3yD8g xfocus;
  659. tyObject_XExposeEvent__GlotzqzjF0UF69cdWtF3UmA xexpose;
  660. tyObject_XGraphicsExposeEvent__vqoMwYGbpvggSS5CE7yfDg xgraphicsexpose;
  661. tyObject_XNoExposeEvent__OBeJnywKIxPbSlIDKzOCAw xnoexpose;
  662. tyObject_XVisibilityEvent__QIE8z6fsM14nzlNuZ4qx1g xvisibility;
  663. tyObject_XCreateWindowEvent__gkTdbvHrseR8byhpmIGCOQ xcreatewindow;
  664. tyObject_XDestroyWindowEvent__Tp9aCI6GD3XFIuCb9bdElOuQ xdestroywindow;
  665. tyObject_XUnmapEvent__dcLuf3f3TlbopgMrXs9bCGQ xunmap;
  666. tyObject_XMapEvent__RhdYUwfbWPzmyx2xTyV2FA xmap;
  667. tyObject_XMapRequestEvent__FaVNekhwNIncxldv52k8Lw xmaprequest;
  668. tyObject_XReparentEvent__0ud6oL9auF2YpEcfxEUnWsw xreparent;
  669. tyObject_XConfigureEvent__t9c9cC7EhkcyFJI9aMaDAboHA xconfigure;
  670. tyObject_XGravityEvent__i47ge3KLMlyylKb7nomPgQ xgravity;
  671. tyObject_XResizeRequestEvent__6P9c2mszwxUkchOWHCWX4pw xresizerequest;
  672. tyObject_XConfigureRequestEvent__lqOXYk4ucPkV6vo82rcRfA xconfigurerequest;
  673. tyObject_XCirculateEvent__PZ5EpxBAqiDQSX2toN9bNVQ xcirculate;
  674. tyObject_XCirculateRequestEvent__d1aa9cXr9a9bw8vIT3mxwrJoQ xcirculaterequest;
  675. tyObject_XPropertyEvent__8VLR5srdJmMgpN5n3xA9aYQ xproperty;
  676. tyObject_XSelectionClearEvent__bln1Oj561KhuR8PFhQdugA xselectionclear;
  677. tyObject_XSelectionRequestEvent__FKYV6bvwXA2X0DguhHqR9ag xselectionrequest;
  678. tyObject_XSelectionEvent__vVuKKVLJTVeC347zxsVdyg xselection;
  679. tyObject_XColormapEvent__uqOhwoxMeCXt84TvPXgUgA xcolormap;
  680. tyObject_XClientMessageEvent__xo4p0BsKjqHQ1YGbKn8Gwg xclient;
  681. tyObject_XMappingEvent__9boqTjTHll5ddMwGFM6CFMw xmapping;
  682. tyObject_XErrorEvent__KFlW9cH2fxpW1RXJX7y9caGQ xerror;
  683. tyObject_XKeymapEvent__CrUb4iNeKC4ksLHETVzgRQ xkeymap;
  684. tyObject_XGenericEvent__BMeayQYhmFza5aSAzlZ4qg xgeneric;
  685. tyObject_XGenericEventCookie__oilhtNjFFwRywZzkahsLvQ xcookie;
  686. tyArray__Sdaj3sYaqpvcWUW4S9aIRBg pad;
  687. };
  688. typedef N_CDECL_PTR(int, tyProc__Q0f6PP79abfOLb4bhA213Hw) (tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* para1, tyObject_XEvent__EZvRvOUywFnBp4PzilZBoA* para2);
  689. struct tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q {
  690. char dummy;
  691. };
  692. typedef NimStringDesc* tyArray__nHXaesL0DJZHyVS07ARPRA[1];
  693. struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
  694. NCSTRING procname;
  695. NI line;
  696. NCSTRING filename;
  697. };
  698. struct tySequence__uB9b75OUPRENsBAu4AnoePA : TGenericSeq {
  699.   tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
  700. };
  701. extern "C" N_LIB_PRIVATE N_NIMCALL(void, processExpose)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0);
  702. static N_INLINE(void, nimFrame)(TFrame* s);
  703. N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_2993)(void);
  704. static N_INLINE(void, popFrame)(void);
  705. extern "C" N_LIB_PRIVATE N_NIMCALL(void, processConfigure)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0, NIM_BOOL theIsResized);
  706. extern "C" N_LIB_PRIVATE N_NIMCALL(void, processInput)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0);
  707. extern "C" N_LIB_PRIVATE N_NIMCALL(void, processExpose__viewer4852_47)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0);
  708. N_LIB_PRIVATE N_NIMCALL(void, main__viewer4852_466)(void);
  709. static N_INLINE(void, nimZeroMem)(void* p, NI size);
  710. static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
  711. N_LIB_PRIVATE N_NIMCALL(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA, getContextAndView__viewer4852_100)(void);
  712. N_LIB_PRIVATE N_NOINLINE(void*, newObj)(TNimType* typ, NI size);
  713. N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
  714. static N_INLINE(void, nimGCunrefNoCycle)(void* p);
  715. static N_INLINE(void, decRef__system_5358)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  716. static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
  717. static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
  718. static N_INLINE(void, rtlAddZCT__system_5356)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  719. N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5307)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w& s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  720. static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5313)(void* usr);
  721. static N_INLINE(void, asgnRef)(void** dest, void* src);
  722. static N_INLINE(void, incRef__system_5351)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  723. static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
  724. N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
  725. N_LIB_PRIVATE N_NIMCALL(TY__icTQkUhVkd9cEc0gJ9c2VwPg, view__viewer4852_20)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg* this_0);
  726. N_LIB_PRIVATE N_NIMCALL(tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q*, toDisplay__viewer4852_463)(Aspect_XDisplay* display);
  727. N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___systemZdollars_3)(NI x);
  728. N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
  729. N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___viewer4852_592)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg* x);
  730. N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___viewer4852_719)(Xw_Window x);
  731. static N_INLINE(void, initStackBottomWith)(void* locals);
  732. N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
  733. N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
  734. N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
  735. N_LIB_PRIVATE N_NIMCALL(void, x11_xlibDatInit000)(void);
  736. N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
  737. extern TNimType NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_;
  738. extern TNimType NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_;
  739. STRING_LITERAL(TM__wD429azSPMakedXQ1XuV5lw_2, "Can\'t export null shape to STEP", 31);
  740. extern TFrame* framePtr__system_2564;
  741. extern TFrame* framePtr__system_2564;
  742. extern TFrame* framePtr__system_2564;
  743. extern TFrame* framePtr__system_2564;
  744. extern TFrame* framePtr__system_2564;
  745. extern TFrame* framePtr__system_2564;
  746. extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5260;
  747. extern tyProc__Q0f6PP79abfOLb4bhA213Hw Dl_30819748081_;
  748. static N_INLINE(void, nimFrame)(TFrame* s) {
  749.     {
  750.         if (!(framePtr__system_2564 == ((TFrame*) NIM_NIL))) goto LA3_;
  751. {       (*s).calldepth = ((NI16) 0);
  752. }   }
  753.     goto LA1_;
  754.     LA3_: ;
  755.     {
  756.         (*s).calldepth = (NI16)((*framePtr__system_2564).calldepth + ((NI16) 1));
  757.     }
  758.     LA1_: ;
  759.     (*s).prev = framePtr__system_2564;
  760.     framePtr__system_2564 = s;
  761.     {
  762.         if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
  763. {       callDepthLimitReached__system_2993();
  764. }   }
  765.     LA8_: ;
  766. }
  767. static N_INLINE(void, popFrame)(void) {
  768.     framePtr__system_2564 = (*framePtr__system_2564).prev;
  769. }
  770. N_LIB_PRIVATE N_NIMCALL(void, processExpose)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0) {
  771.     nimfr_("processExpose", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  772.     nimln_(24, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  773.     {
  774.         NIM_BOOL T3_ = this_0.myView.IsNull();
  775.         if (!!(T3_)) goto LA4_;
  776. {       nimln_(25, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  777.         this_0.FlushViewEvents(this_0.myContext, this_0.myView, NIM_TRUE);
  778. }   }
  779.     LA4_: ;
  780.     popFrame();
  781. }
  782. N_LIB_PRIVATE N_NIMCALL(void, processConfigure)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0, NIM_BOOL theIsResized) {
  783.     nimfr_("processConfigure", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  784.     nimln_(29, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  785.     {
  786.         NIM_BOOL T3_;
  787.         NIM_BOOL T4_;
  788.         T3_ = (NIM_BOOL)0;
  789.         T4_ = (NIM_BOOL)0;
  790.         T4_ = this_0.myView.IsNull();
  791.         T3_ = !(T4_);
  792.         if (!(T3_)) goto LA5_;
  793.         T3_ = theIsResized;
  794.         LA5_: ;
  795.         if (!T3_) goto LA6_;
  796. {       nimln_(30, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  797.         (void)((* (* this_0.myView).Window()).DoResize());
  798.         nimln_(31, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  799.         (* this_0.myView).MustBeResized();
  800.         nimln_(32, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  801.         (* this_0.myView).Invalidate();
  802.         nimln_(33, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  803.         this_0.FlushViewEvents(this_0.myContext, this_0.myView, NIM_TRUE);
  804. }   }
  805.     LA6_: ;
  806.     popFrame();
  807. }
  808. N_LIB_PRIVATE N_NIMCALL(void, processInput)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0) {
  809.     nimfr_("processInput", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  810.     nimln_(37, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  811.     {
  812.         NIM_BOOL T3_ = this_0.myView.IsNull();
  813.         if (!!(T3_)) goto LA4_;
  814. {       nimln_(38, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  815.         processExpose__viewer4852_47(this_0);
  816. }   }
  817.     LA4_: ;
  818.     popFrame();
  819. }
  820. static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
  821.     void* T1_ = memset(a, v, ((size_t) (size)));
  822. }
  823. static N_INLINE(void, nimZeroMem)(void* p, NI size) {
  824.     nimSetMem__systemZmemory_7(p, ((int) 0), size);
  825. }
  826. static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
  827.     NI result;
  828.     nimfr_("-%", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  829.     result = (NI)0;
  830.     nimln_(414, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  831.     nimln_(418, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  832.     result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
  833.     popFrame();
  834.     return result;
  835. }
  836. static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
  837.     NIM_BOOL result;
  838.     nimfr_("<%", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
  839.     result = (NIM_BOOL)0;
  840.     nimln_(186, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
  841.     nimln_(188, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
  842.     result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
  843.     popFrame();
  844.     return result;
  845. }
  846. static N_INLINE(void, rtlAddZCT__system_5356)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
  847.     nimfr_("rtlAddZCT", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  848.     nimln_(243, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  849.     addZCT__system_5307(gch__system_5260.zct, c);
  850.     popFrame();
  851. }
  852. static N_INLINE(void, decRef__system_5358)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
  853.     nimfr_("decRef", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  854.     nimln_(248, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  855.     (*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
  856.     nimln_(249, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  857.     {
  858.         NIM_BOOL T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
  859.         if (!T3_) goto LA4_;
  860. {       nimln_(250, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  861.         rtlAddZCT__system_5356(c);
  862. }   }
  863.     LA4_: ;
  864.     popFrame();
  865. }
  866. static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5313)(void* usr) {
  867.     tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
  868.     nimfr_("usrToCell", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  869.     result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
  870.     nimln_(177, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  871.     NI T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
  872.     result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
  873.     popFrame();
  874.     return result;
  875. }
  876. static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
  877.     nimfr_("nimGCunrefNoCycle", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  878.     nimln_(276, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  879.     tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_ = usrToCell__system_5313(p);
  880.     decRef__system_5358(T1_);
  881.     popFrame();
  882. }
  883. static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
  884.     NI result;
  885.     nimfr_("+%", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  886.     result = (NI)0;
  887.     nimln_(403, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  888.     nimln_(407, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  889.     result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
  890.     popFrame();
  891.     return result;
  892. }
  893. static N_INLINE(void, incRef__system_5351)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
  894.     nimfr_("incRef", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  895.     nimln_(231, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  896.     (*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
  897.     popFrame();
  898. }
  899. static N_INLINE(void, asgnRef)(void** dest, void* src) {
  900.     nimfr_("asgnRef", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  901.     nimln_(286, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  902.     {
  903.         if (!!((src == NIM_NIL))) goto LA3_;
  904. {       tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_ = usrToCell__system_5313(src);
  905.         incRef__system_5351(T5_);
  906. }   }
  907.     LA3_: ;
  908.     nimln_(287, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  909.     {
  910.         if (!!(((*dest) == NIM_NIL))) goto LA8_;
  911. {       tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_ = usrToCell__system_5313((*dest));
  912.         decRef__system_5358(T10_);
  913. }   }
  914.     LA8_: ;
  915.     nimln_(288, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  916.     (*dest) = src;
  917.     popFrame();
  918. }
  919. N_LIB_PRIVATE N_NIMCALL(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA, getContextAndView__viewer4852_100)(void) {
  920.     tyTuple__mOcJMV5G9c4Xbhu28ljzjXA result;
  921.     nimfr_("getContextAndView", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  922. {   nimZeroMem((void*)(&result), sizeof(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA));
  923.     nimln_(46, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  924.     TY__keu8dJZTmN1bTjmh2YTMeA aDisplay((new Aspect_DisplayConnection()));
  925.     nimln_(47, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  926.     TY__FZHdszn6vruH9aCoz9aCktYQ aDriverOpenGl((new OpenGl_GraphicDriver(aDisplay, NIM_TRUE)));
  927.     nimln_(48, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  928.     OpenGl_GraphicDriver* T1_ = aDriverOpenGl.get();
  929.     TY__WzQHB9c9cwo6CTGferBwI78g aDriver(((Graphic3d_GraphicDriver*) (T1_)));
  930.     nimln_(53, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  931.     TY__47tV2K1aaSZXiNrxUNujaw aViewer((new V3d_Viewer(aDriver)));
  932.     nimln_(54, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  933.     (* aViewer).SetDefaultLights();
  934.     nimln_(55, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  935.     (* aViewer).SetLightOn();
  936.     nimln_(58, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  937.     TY__icTQkUhVkd9cEc0gJ9c2VwPg myView((new V3d_View(aViewer, ((V3d_TypeOfView) 0))));
  938.     nimln_(59, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  939.     TY__LyS0CtE7Da8V9c3SncboSbA aWindow((new Xw_Window(aDisplay, "OCCT Viewer", ((int) 100), ((int) 100), ((int) 512), ((int) 512))));
  940.     nimln_(60, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  941.     Xw_Window* T2_ = aWindow.get();
  942.     TY__yB86VfuSyzthqado7ziZgg aWinAspect(((Aspect_Window*) (T2_)));
  943.     nimln_(62, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  944.     (* myView).SetWindow(aWinAspect, ((tyObject_NSOpenGLContext__cXoy3V9c0amLPn8ieCuKwyA*) NIM_NIL));
  945.     nimln_(63, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  946.     (* myView).SetBackgroundColor(Quantity_Color(((Quantity_NameOfColor) 182)));
  947.     nimln_(64, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  948.     (* myView).TriedronDisplay(((Aspect_TypeOfTriedronPosition) 6), Quantity_Color(((Quantity_NameOfColor) 508)), 0.1f, ((V3d_TypeOfVisualization) 0));
  949.     nimln_(65, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  950.     (* myView).ChangeRenderingParams().RenderResolutionScale = 2.0f;
  951.     nimln_(68, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  952.     TY__U9azJ3jnkWQljuWXj5dG30g myContext((new AIS_InteractiveContext(aViewer)));
  953.     nimln_(71, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  954.     BRepPrimAPI_MakeBox mybox(1.0f, 2.0f, 3.0f);
  955.     nimln_(72, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  956.     mybox.Build();
  957.     nimln_(73, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  958.     TopoDS_Solid solid = mybox.Solid();
  959.     nimln_(74, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  960.     {
  961.         tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw* T7_;
  962.         NimStringDesc* T8_;
  963.         if (!solid.IsNull()) goto LA5_;
  964. {       T7_ = NIM_NIL;
  965.         T7_ = (tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw*) newObj((&NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_), sizeof(tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw));
  966.         (*T7_).m_type = (&NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_);
  967.         (*T7_).name = "ValueError";
  968.         T8_ = NIM_NIL;
  969.         T8_ = (*T7_).message; (*T7_).message = copyStringRC1(((NimStringDesc*) &TM__wD429azSPMakedXQ1XuV5lw_2));
  970.         if (T8_) nimGCunrefNoCycle(T8_);
  971.         asgnRef((void**) (&(*T7_).parent), ((Exception*) NIM_NIL));
  972.         nimln_(75, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  973.         raiseExceptionEx((Exception*)T7_, "ValueError", "getContextAndView", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim", 75);
  974. }   }
  975.     LA5_: ;
  976.     nimln_(77, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  977.     TopoDS_Shape aShape = solid;
  978.     nimln_(78, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  979.     TY__0sNjvi6cy22LOUKb6aOHyA aShapeAis((new AIS_Shape(aShape)));
  980.     nimln_(79, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  981.     AIS_Shape* T9_ = aShapeAis.get();
  982.     TY__9cLINH5i7M3YCUgLs46CBaA aShapePrs(((AIS_InteractiveObject*) (T9_)));
  983.     nimln_(80, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  984.     (* myContext).Display(aShapeAis, ((int) 1), ((int) 0), NIM_FALSE, ((AIS_DisplayStatus) 2));
  985.     nimln_(81, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  986.     (* myView).FitAll(0.01f, NIM_FALSE);
  987.     nimln_(83, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  988.     (* aWindow).Map();
  989.     nimln_(84, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  990.     (* myView).Redraw();
  991.     nimln_(85, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  992.     TY__U9azJ3jnkWQljuWXj5dG30g colontmp_ = myContext;
  993.     TY__icTQkUhVkd9cEc0gJ9c2VwPg colontmp__2 = myView;
  994.     result.Field0 = colontmp_;
  995.     result.Field1 = colontmp__2;
  996.     goto BeforeRet_;
  997.     }BeforeRet_: ;
  998.     popFrame();
  999.     return result;
  1000. }
  1001. N_LIB_PRIVATE N_NIMCALL(TY__icTQkUhVkd9cEc0gJ9c2VwPg, view__viewer4852_20)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg* this_0) {
  1002.     TY__icTQkUhVkd9cEc0gJ9c2VwPg result;
  1003.     nimfr_("view", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1004. {   nimln_(19, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1005.     result = (*this_0).myView;
  1006.     goto BeforeRet_;
  1007.     }BeforeRet_: ;
  1008.     popFrame();
  1009.     return result;
  1010. }
  1011. N_LIB_PRIVATE N_NIMCALL(tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q*, toDisplay__viewer4852_463)(Aspect_XDisplay* display) {
  1012.     tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* result;
  1013.     nimfr_("toDisplay", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1014.     result = (tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q*)0;
  1015.     nimln_(93, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1016.     result = ((tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q*) (display));
  1017.     popFrame();
  1018.     return result;
  1019. }
  1020. N_LIB_PRIVATE N_NIMCALL(void, main__viewer4852_466)(void) {
  1021.     tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg aViewer;
  1022.     tyObject_XEvent__EZvRvOUywFnBp4PzilZBoA event;
  1023.     nimfr_("main", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1024.     nimZeroMem((void*)(&aViewer), sizeof(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg));
  1025.     nimln_(97, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1026.     tyTuple__mOcJMV5G9c4Xbhu28ljzjXA T1_ = getContextAndView__viewer4852_100();
  1027.     tyTuple__mOcJMV5G9c4Xbhu28ljzjXA _ = T1_;
  1028.     aViewer.myContext = _.Field0;
  1029.     aViewer.myView = _.Field1;
  1030.     nimln_(99, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1031.     TY__icTQkUhVkd9cEc0gJ9c2VwPg T2_ = view__viewer4852_20((&aViewer));
  1032.     Aspect_Window* T3_ = (* T2_).Window().get();
  1033.     TY__LyS0CtE7Da8V9c3SncboSbA aWindow(((Xw_Window*) (T3_)));
  1034.     nimln_(100, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1035.     TY__icTQkUhVkd9cEc0gJ9c2VwPg T4_ = view__viewer4852_20((&aViewer));
  1036.     TY__keu8dJZTmN1bTjmh2YTMeA aDispConn = (* (* (* T4_).Viewer()).Driver()).GetDisplayConnection();
  1037.     nimln_(101, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1038.     Aspect_XDisplay* display = (* aDispConn).GetDisplayAspect();
  1039.     nimZeroMem((void*)(&event), sizeof(tyObject_XEvent__EZvRvOUywFnBp4PzilZBoA));
  1040.     {
  1041.         nimln_(105, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1042.         while (1) {
  1043.             tyArray__nHXaesL0DJZHyVS07ARPRA T9_;
  1044.             tyArray__nHXaesL0DJZHyVS07ARPRA T10_;
  1045.             tyArray__nHXaesL0DJZHyVS07ARPRA T11_;
  1046.             nimln_(106, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1047.             tyObject_XDisplay__pUEYXk7cKlFR9bAMzuMcK1Q* T7_ = toDisplay__viewer4852_463(display);
  1048.             int T8_ = Dl_30819748081_(T7_, (&event));
  1049.             int tmp = T8_;
  1050.             nimln_(107, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1051.             nimZeroMem((void*)T9_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
  1052.             T9_[0] = dollar___systemZdollars_3(((NI) (event.theType)));
  1053.             echoBinSafe(T9_, 1);
  1054.             nimln_(108, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1055.             nimZeroMem((void*)T10_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
  1056.             T10_[0] = dollar___viewer4852_592((&aViewer));
  1057.             echoBinSafe(T10_, 1);
  1058.             nimln_(109, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1059.             nimZeroMem((void*)T11_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
  1060.             T11_[0] = dollar___viewer4852_719((* aWindow));
  1061.             echoBinSafe(T11_, 1);
  1062.             nimln_(110, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1063.             (void)((* aWindow).ProcessMessage((Aspect_WindowInputListener &) aViewer, (XEvent &) event));
  1064.         }
  1065.     }
  1066.     popFrame();
  1067. }
  1068. static N_INLINE(void, initStackBottomWith)(void* locals) {
  1069.     nimGC_setStackBottom(locals);
  1070. }
  1071. N_LIB_PRIVATE N_NIMCALL(void, processExpose__viewer4852_47)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0) {
  1072.     nimfr_("processExpose", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1073.     nimln_(23, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1074.     processExpose(this_0);
  1075.     popFrame();
  1076. }
  1077. N_LIB_PRIVATE N_NIMCALL(void, processConfigure__viewer4852_93)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0, NIM_BOOL theIsResized) {
  1078.     nimfr_("processConfigure", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1079.     nimln_(28, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1080.     processConfigure(this_0, theIsResized);
  1081.     popFrame();
  1082. }
  1083. N_LIB_PRIVATE N_NIMCALL(void, processInput__viewer4852_99)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg& this_0) {
  1084.     nimfr_("processInput", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1085.     nimln_(36, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1086.     processInput(this_0);
  1087.     popFrame();
  1088. }
  1089.  
  1090. N_LIB_PRIVATE void PreMainInner(void) {
  1091. }
  1092.  
  1093. N_LIB_PRIVATE int cmdCount;
  1094. N_LIB_PRIVATE char** cmdLine;
  1095. N_LIB_PRIVATE char** gEnv;
  1096. N_LIB_PRIVATE void PreMain(void) {
  1097.     void (*volatile inner)(void);
  1098.     inner = PreMainInner;
  1099.     systemDatInit000();
  1100.     initStackBottomWith((void *)&inner);
  1101.     systemInit000();
  1102.     x11_xlibDatInit000();
  1103.     (*inner)();
  1104. }
  1105.  
  1106. N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
  1107.     NimMainModule();
  1108. }
  1109.  
  1110. N_CDECL(void, NimMain)(void) {
  1111.     void (*volatile inner)(void);
  1112.     PreMain();
  1113.     inner = NimMainInner;
  1114.     initStackBottomWith((void *)&inner);
  1115.     (*inner)();
  1116. }
  1117.  
  1118. int main(int argc, char** args, char** env) {
  1119.     cmdLine = args;
  1120.     cmdCount = argc;
  1121.     gEnv = env;
  1122.     NimMain();
  1123.     return nim_program_result;
  1124. }
  1125.  
  1126. N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
  1127. {
  1128.     nimfr_("viewer04", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1129.     nimln_(114, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  1130.     main__viewer4852_466();
  1131.     popFrame();
  1132. }
  1133. }
  1134.  
  1135.  
Add Comment
Please, Sign In to add comment