/src/xmlvm2c/compat-lib/iphone/org_xmlvm_iphone_UITextField.m

https://github.com/avh4/xmlvm · Objective C · 980 lines · 787 code · 107 blank · 86 comment · 10 complexity · b0cf8b1107efadd8fe535408b4230f95 MD5 · raw file

  1. #include "xmlvm.h"
  2. #include "org_xmlvm_iphone_UITextFieldDelegate.h"
  3. #include "org_xmlvm_iphone_UIFont.h"
  4. #include "org_xmlvm_iphone_CGRect.h"
  5. #include "org_xmlvm_iphone_UIColor.h"
  6. #include "java_lang_String.h"
  7. #include "org_xmlvm_iphone_UITextField.h"
  8. #define XMLVM_CURRENT_CLASS_NAME UITextField
  9. #define XMLVM_CURRENT_PKG_CLASS_NAME org_xmlvm_iphone_UITextField
  10. __TIB_DEFINITION_org_xmlvm_iphone_UITextField __TIB_org_xmlvm_iphone_UITextField = {
  11. 0, // classInitializationBegan
  12. 0, // classInitialized
  13. -1, // initializerThreadId
  14. __INIT_org_xmlvm_iphone_UITextField, // classInitializer
  15. "org.xmlvm.iphone.UITextField", // className
  16. (__TIB_DEFINITION_TEMPLATE*) &__TIB_org_xmlvm_iphone_UIView, // extends
  17. sizeof(org_xmlvm_iphone_UITextField), // sizeInstance
  18. XMLVM_TYPE_CLASS};
  19. JAVA_OBJECT __CLASS_org_xmlvm_iphone_UITextField;
  20. JAVA_OBJECT __CLASS_org_xmlvm_iphone_UITextField_1ARRAY;
  21. JAVA_OBJECT __CLASS_org_xmlvm_iphone_UITextField_2ARRAY;
  22. JAVA_OBJECT __CLASS_org_xmlvm_iphone_UITextField_3ARRAY;
  23. //XMLVM_BEGIN_IMPLEMENTATION
  24. #import <UIKit/UIKit.h>
  25. #import <UIKit/UITextField.h>
  26. #import "org_xmlvm_iphone_UIControl.h"
  27. #include "org_xmlvm_iphone_NSString.h"
  28. void org_xmlvm_iphone_UITextField_INTERNAL_CONSTRUCTOR(JAVA_OBJECT me, NSObject* wrappedObj)
  29. {
  30. org_xmlvm_iphone_UIView_INTERNAL_CONSTRUCTOR(me, wrappedObj);
  31. }
  32. //XMLVM_END_IMPLEMENTATION
  33. #include "xmlvm-reflection.h"
  34. static XMLVM_FIELD_REFLECTION_DATA __field_reflection_data[] = {
  35. };
  36. static JAVA_OBJECT* __constructor0_arg_types[] = {
  37. };
  38. static JAVA_OBJECT* __constructor1_arg_types[] = {
  39. &__CLASS_org_xmlvm_iphone_CGRect,
  40. };
  41. static XMLVM_CONSTRUCTOR_REFLECTION_DATA __constructor_reflection_data[] = {
  42. {&__constructor0_arg_types[0],
  43. sizeof(__constructor0_arg_types) / sizeof(JAVA_OBJECT*),
  44. JAVA_NULL,
  45. 0,
  46. 0,
  47. "",
  48. JAVA_NULL,
  49. JAVA_NULL},
  50. {&__constructor1_arg_types[0],
  51. sizeof(__constructor1_arg_types) / sizeof(JAVA_OBJECT*),
  52. JAVA_NULL,
  53. 0,
  54. 0,
  55. "",
  56. JAVA_NULL,
  57. JAVA_NULL},
  58. };
  59. static JAVA_OBJECT constructor_dispatcher(JAVA_OBJECT constructor, JAVA_OBJECT arguments)
  60. {
  61. JAVA_OBJECT obj = __NEW_org_xmlvm_iphone_UITextField();
  62. java_lang_reflect_Constructor* c = (java_lang_reflect_Constructor*) constructor;
  63. org_xmlvm_runtime_XMLVMArray* args = (org_xmlvm_runtime_XMLVMArray*) arguments;
  64. JAVA_ARRAY_OBJECT* argsArray = (JAVA_ARRAY_OBJECT*) args->fields.org_xmlvm_runtime_XMLVMArray.array_;
  65. switch (c->fields.java_lang_reflect_Constructor.slot_) {
  66. case 0:
  67. org_xmlvm_iphone_UITextField___INIT___(obj);
  68. break;
  69. case 1:
  70. org_xmlvm_iphone_UITextField___INIT____org_xmlvm_iphone_CGRect(obj, argsArray[0]);
  71. break;
  72. default:
  73. XMLVM_INTERNAL_ERROR();
  74. break;
  75. }
  76. return obj;
  77. }
  78. static JAVA_OBJECT* __method0_arg_types[] = {
  79. };
  80. static JAVA_OBJECT* __method1_arg_types[] = {
  81. &__CLASS_int,
  82. };
  83. static JAVA_OBJECT* __method2_arg_types[] = {
  84. };
  85. static JAVA_OBJECT* __method3_arg_types[] = {
  86. &__CLASS_int,
  87. };
  88. static JAVA_OBJECT* __method4_arg_types[] = {
  89. };
  90. static JAVA_OBJECT* __method5_arg_types[] = {
  91. &__CLASS_boolean,
  92. };
  93. static JAVA_OBJECT* __method6_arg_types[] = {
  94. };
  95. static JAVA_OBJECT* __method7_arg_types[] = {
  96. &__CLASS_int,
  97. };
  98. static JAVA_OBJECT* __method8_arg_types[] = {
  99. };
  100. static JAVA_OBJECT* __method9_arg_types[] = {
  101. &__CLASS_int,
  102. };
  103. static JAVA_OBJECT* __method10_arg_types[] = {
  104. };
  105. static JAVA_OBJECT* __method11_arg_types[] = {
  106. &__CLASS_int,
  107. };
  108. static JAVA_OBJECT* __method12_arg_types[] = {
  109. };
  110. static JAVA_OBJECT* __method13_arg_types[] = {
  111. &__CLASS_boolean,
  112. };
  113. static JAVA_OBJECT* __method14_arg_types[] = {
  114. &__CLASS_java_lang_String,
  115. };
  116. static JAVA_OBJECT* __method15_arg_types[] = {
  117. };
  118. static JAVA_OBJECT* __method16_arg_types[] = {
  119. &__CLASS_org_xmlvm_iphone_UIColor,
  120. };
  121. static JAVA_OBJECT* __method17_arg_types[] = {
  122. };
  123. static JAVA_OBJECT* __method18_arg_types[] = {
  124. &__CLASS_int,
  125. };
  126. static JAVA_OBJECT* __method19_arg_types[] = {
  127. };
  128. static JAVA_OBJECT* __method20_arg_types[] = {
  129. };
  130. static JAVA_OBJECT* __method21_arg_types[] = {
  131. &__CLASS_org_xmlvm_iphone_UIFont,
  132. };
  133. static JAVA_OBJECT* __method22_arg_types[] = {
  134. };
  135. static JAVA_OBJECT* __method23_arg_types[] = {
  136. &__CLASS_boolean,
  137. };
  138. static JAVA_OBJECT* __method24_arg_types[] = {
  139. };
  140. static JAVA_OBJECT* __method25_arg_types[] = {
  141. &__CLASS_int,
  142. };
  143. static JAVA_OBJECT* __method26_arg_types[] = {
  144. &__CLASS_char,
  145. };
  146. static JAVA_OBJECT* __method27_arg_types[] = {
  147. &__CLASS_java_lang_String,
  148. };
  149. static JAVA_OBJECT* __method28_arg_types[] = {
  150. };
  151. static JAVA_OBJECT* __method29_arg_types[] = {
  152. &__CLASS_org_xmlvm_iphone_UITextFieldDelegate,
  153. };
  154. static JAVA_OBJECT* __method30_arg_types[] = {
  155. };
  156. static XMLVM_METHOD_REFLECTION_DATA __method_reflection_data[] = {
  157. {"getAutocapitalizationType",
  158. &__method0_arg_types[0],
  159. sizeof(__method0_arg_types) / sizeof(JAVA_OBJECT*),
  160. JAVA_NULL,
  161. 0,
  162. 0,
  163. "",
  164. JAVA_NULL,
  165. JAVA_NULL},
  166. {"setAutocapitalizationType",
  167. &__method1_arg_types[0],
  168. sizeof(__method1_arg_types) / sizeof(JAVA_OBJECT*),
  169. JAVA_NULL,
  170. 0,
  171. 0,
  172. "",
  173. JAVA_NULL,
  174. JAVA_NULL},
  175. {"getAutocorrectionType",
  176. &__method2_arg_types[0],
  177. sizeof(__method2_arg_types) / sizeof(JAVA_OBJECT*),
  178. JAVA_NULL,
  179. 0,
  180. 0,
  181. "",
  182. JAVA_NULL,
  183. JAVA_NULL},
  184. {"setAutocorrectionType",
  185. &__method3_arg_types[0],
  186. sizeof(__method3_arg_types) / sizeof(JAVA_OBJECT*),
  187. JAVA_NULL,
  188. 0,
  189. 0,
  190. "",
  191. JAVA_NULL,
  192. JAVA_NULL},
  193. {"isEnablesReturnKeyAutomatically",
  194. &__method4_arg_types[0],
  195. sizeof(__method4_arg_types) / sizeof(JAVA_OBJECT*),
  196. JAVA_NULL,
  197. 0,
  198. 0,
  199. "",
  200. JAVA_NULL,
  201. JAVA_NULL},
  202. {"setEnablesReturnKeyAutomatically",
  203. &__method5_arg_types[0],
  204. sizeof(__method5_arg_types) / sizeof(JAVA_OBJECT*),
  205. JAVA_NULL,
  206. 0,
  207. 0,
  208. "",
  209. JAVA_NULL,
  210. JAVA_NULL},
  211. {"getKeyboardAppearance",
  212. &__method6_arg_types[0],
  213. sizeof(__method6_arg_types) / sizeof(JAVA_OBJECT*),
  214. JAVA_NULL,
  215. 0,
  216. 0,
  217. "",
  218. JAVA_NULL,
  219. JAVA_NULL},
  220. {"setKeyboardAppearance",
  221. &__method7_arg_types[0],
  222. sizeof(__method7_arg_types) / sizeof(JAVA_OBJECT*),
  223. JAVA_NULL,
  224. 0,
  225. 0,
  226. "",
  227. JAVA_NULL,
  228. JAVA_NULL},
  229. {"getKeyboardType",
  230. &__method8_arg_types[0],
  231. sizeof(__method8_arg_types) / sizeof(JAVA_OBJECT*),
  232. JAVA_NULL,
  233. 0,
  234. 0,
  235. "",
  236. JAVA_NULL,
  237. JAVA_NULL},
  238. {"setKeyboardType",
  239. &__method9_arg_types[0],
  240. sizeof(__method9_arg_types) / sizeof(JAVA_OBJECT*),
  241. JAVA_NULL,
  242. 0,
  243. 0,
  244. "",
  245. JAVA_NULL,
  246. JAVA_NULL},
  247. {"getReturnKeyType",
  248. &__method10_arg_types[0],
  249. sizeof(__method10_arg_types) / sizeof(JAVA_OBJECT*),
  250. JAVA_NULL,
  251. 0,
  252. 0,
  253. "",
  254. JAVA_NULL,
  255. JAVA_NULL},
  256. {"setReturnKeyType",
  257. &__method11_arg_types[0],
  258. sizeof(__method11_arg_types) / sizeof(JAVA_OBJECT*),
  259. JAVA_NULL,
  260. 0,
  261. 0,
  262. "",
  263. JAVA_NULL,
  264. JAVA_NULL},
  265. {"isSecureTextEntry",
  266. &__method12_arg_types[0],
  267. sizeof(__method12_arg_types) / sizeof(JAVA_OBJECT*),
  268. JAVA_NULL,
  269. 0,
  270. 0,
  271. "",
  272. JAVA_NULL,
  273. JAVA_NULL},
  274. {"setSecureTextEntry",
  275. &__method13_arg_types[0],
  276. sizeof(__method13_arg_types) / sizeof(JAVA_OBJECT*),
  277. JAVA_NULL,
  278. 0,
  279. 0,
  280. "",
  281. JAVA_NULL,
  282. JAVA_NULL},
  283. {"setText",
  284. &__method14_arg_types[0],
  285. sizeof(__method14_arg_types) / sizeof(JAVA_OBJECT*),
  286. JAVA_NULL,
  287. 0,
  288. 0,
  289. "",
  290. JAVA_NULL,
  291. JAVA_NULL},
  292. {"getText",
  293. &__method15_arg_types[0],
  294. sizeof(__method15_arg_types) / sizeof(JAVA_OBJECT*),
  295. JAVA_NULL,
  296. 0,
  297. 0,
  298. "",
  299. JAVA_NULL,
  300. JAVA_NULL},
  301. {"setTextColor",
  302. &__method16_arg_types[0],
  303. sizeof(__method16_arg_types) / sizeof(JAVA_OBJECT*),
  304. JAVA_NULL,
  305. 0,
  306. 0,
  307. "",
  308. JAVA_NULL,
  309. JAVA_NULL},
  310. {"getTextColor",
  311. &__method17_arg_types[0],
  312. sizeof(__method17_arg_types) / sizeof(JAVA_OBJECT*),
  313. JAVA_NULL,
  314. 0,
  315. 0,
  316. "",
  317. JAVA_NULL,
  318. JAVA_NULL},
  319. {"setBorderStyle",
  320. &__method18_arg_types[0],
  321. sizeof(__method18_arg_types) / sizeof(JAVA_OBJECT*),
  322. JAVA_NULL,
  323. 0,
  324. 0,
  325. "",
  326. JAVA_NULL,
  327. JAVA_NULL},
  328. {"getBorderStyle",
  329. &__method19_arg_types[0],
  330. sizeof(__method19_arg_types) / sizeof(JAVA_OBJECT*),
  331. JAVA_NULL,
  332. 0,
  333. 0,
  334. "",
  335. JAVA_NULL,
  336. JAVA_NULL},
  337. {"getFont",
  338. &__method20_arg_types[0],
  339. sizeof(__method20_arg_types) / sizeof(JAVA_OBJECT*),
  340. JAVA_NULL,
  341. 0,
  342. 0,
  343. "",
  344. JAVA_NULL,
  345. JAVA_NULL},
  346. {"setFont",
  347. &__method21_arg_types[0],
  348. sizeof(__method21_arg_types) / sizeof(JAVA_OBJECT*),
  349. JAVA_NULL,
  350. 0,
  351. 0,
  352. "",
  353. JAVA_NULL,
  354. JAVA_NULL},
  355. {"isAdjustsFontSizeToFitWidth",
  356. &__method22_arg_types[0],
  357. sizeof(__method22_arg_types) / sizeof(JAVA_OBJECT*),
  358. JAVA_NULL,
  359. 0,
  360. 0,
  361. "",
  362. JAVA_NULL,
  363. JAVA_NULL},
  364. {"setAdjustsFontSizeToFitWidth",
  365. &__method23_arg_types[0],
  366. sizeof(__method23_arg_types) / sizeof(JAVA_OBJECT*),
  367. JAVA_NULL,
  368. 0,
  369. 0,
  370. "",
  371. JAVA_NULL,
  372. JAVA_NULL},
  373. {"getTextAlignment",
  374. &__method24_arg_types[0],
  375. sizeof(__method24_arg_types) / sizeof(JAVA_OBJECT*),
  376. JAVA_NULL,
  377. 0,
  378. 0,
  379. "",
  380. JAVA_NULL,
  381. JAVA_NULL},
  382. {"setTextAlignment",
  383. &__method25_arg_types[0],
  384. sizeof(__method25_arg_types) / sizeof(JAVA_OBJECT*),
  385. JAVA_NULL,
  386. 0,
  387. 0,
  388. "",
  389. JAVA_NULL,
  390. JAVA_NULL},
  391. {"xmlvmKeyTyped",
  392. &__method26_arg_types[0],
  393. sizeof(__method26_arg_types) / sizeof(JAVA_OBJECT*),
  394. JAVA_NULL,
  395. 0,
  396. 0,
  397. "",
  398. JAVA_NULL,
  399. JAVA_NULL},
  400. {"setPlaceholder",
  401. &__method27_arg_types[0],
  402. sizeof(__method27_arg_types) / sizeof(JAVA_OBJECT*),
  403. JAVA_NULL,
  404. 0,
  405. 0,
  406. "",
  407. JAVA_NULL,
  408. JAVA_NULL},
  409. {"getPlaceholder",
  410. &__method28_arg_types[0],
  411. sizeof(__method28_arg_types) / sizeof(JAVA_OBJECT*),
  412. JAVA_NULL,
  413. 0,
  414. 0,
  415. "",
  416. JAVA_NULL,
  417. JAVA_NULL},
  418. {"setDelegate",
  419. &__method29_arg_types[0],
  420. sizeof(__method29_arg_types) / sizeof(JAVA_OBJECT*),
  421. JAVA_NULL,
  422. 0,
  423. 0,
  424. "",
  425. JAVA_NULL,
  426. JAVA_NULL},
  427. {"getDelegate",
  428. &__method30_arg_types[0],
  429. sizeof(__method30_arg_types) / sizeof(JAVA_OBJECT*),
  430. JAVA_NULL,
  431. 0,
  432. 0,
  433. "",
  434. JAVA_NULL,
  435. JAVA_NULL},
  436. };
  437. static JAVA_OBJECT method_dispatcher(JAVA_OBJECT method, JAVA_OBJECT receiver, JAVA_OBJECT arguments)
  438. {
  439. JAVA_OBJECT result = JAVA_NULL; //TODO need to set result
  440. java_lang_Object* obj = receiver;
  441. java_lang_reflect_Method* m = (java_lang_reflect_Method*) method;
  442. org_xmlvm_runtime_XMLVMArray* args = (org_xmlvm_runtime_XMLVMArray*) arguments;
  443. JAVA_ARRAY_OBJECT* argsArray = (JAVA_ARRAY_OBJECT*) args->fields.org_xmlvm_runtime_XMLVMArray.array_;
  444. switch (m->fields.java_lang_reflect_Method.slot_) {
  445. case 0:
  446. org_xmlvm_iphone_UITextField_getAutocapitalizationType__(receiver);
  447. break;
  448. case 1:
  449. org_xmlvm_iphone_UITextField_setAutocapitalizationType___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  450. break;
  451. case 2:
  452. org_xmlvm_iphone_UITextField_getAutocorrectionType__(receiver);
  453. break;
  454. case 3:
  455. org_xmlvm_iphone_UITextField_setAutocorrectionType___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  456. break;
  457. case 4:
  458. org_xmlvm_iphone_UITextField_isEnablesReturnKeyAutomatically__(receiver);
  459. break;
  460. case 5:
  461. org_xmlvm_iphone_UITextField_setEnablesReturnKeyAutomatically___boolean(receiver, ((java_lang_Boolean*) argsArray[0])->fields.java_lang_Boolean.value_);
  462. break;
  463. case 6:
  464. org_xmlvm_iphone_UITextField_getKeyboardAppearance__(receiver);
  465. break;
  466. case 7:
  467. org_xmlvm_iphone_UITextField_setKeyboardAppearance___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  468. break;
  469. case 8:
  470. org_xmlvm_iphone_UITextField_getKeyboardType__(receiver);
  471. break;
  472. case 9:
  473. org_xmlvm_iphone_UITextField_setKeyboardType___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  474. break;
  475. case 10:
  476. org_xmlvm_iphone_UITextField_getReturnKeyType__(receiver);
  477. break;
  478. case 11:
  479. org_xmlvm_iphone_UITextField_setReturnKeyType___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  480. break;
  481. case 12:
  482. org_xmlvm_iphone_UITextField_isSecureTextEntry__(receiver);
  483. break;
  484. case 13:
  485. org_xmlvm_iphone_UITextField_setSecureTextEntry___boolean(receiver, ((java_lang_Boolean*) argsArray[0])->fields.java_lang_Boolean.value_);
  486. break;
  487. case 14:
  488. org_xmlvm_iphone_UITextField_setText___java_lang_String(receiver, argsArray[0]);
  489. break;
  490. case 15:
  491. org_xmlvm_iphone_UITextField_getText__(receiver);
  492. break;
  493. case 16:
  494. org_xmlvm_iphone_UITextField_setTextColor___org_xmlvm_iphone_UIColor(receiver, argsArray[0]);
  495. break;
  496. case 17:
  497. org_xmlvm_iphone_UITextField_getTextColor__(receiver);
  498. break;
  499. case 18:
  500. org_xmlvm_iphone_UITextField_setBorderStyle___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  501. break;
  502. case 19:
  503. org_xmlvm_iphone_UITextField_getBorderStyle__(receiver);
  504. break;
  505. case 20:
  506. org_xmlvm_iphone_UITextField_getFont__(receiver);
  507. break;
  508. case 21:
  509. org_xmlvm_iphone_UITextField_setFont___org_xmlvm_iphone_UIFont(receiver, argsArray[0]);
  510. break;
  511. case 22:
  512. org_xmlvm_iphone_UITextField_isAdjustsFontSizeToFitWidth__(receiver);
  513. break;
  514. case 23:
  515. org_xmlvm_iphone_UITextField_setAdjustsFontSizeToFitWidth___boolean(receiver, ((java_lang_Boolean*) argsArray[0])->fields.java_lang_Boolean.value_);
  516. break;
  517. case 24:
  518. org_xmlvm_iphone_UITextField_getTextAlignment__(receiver);
  519. break;
  520. case 25:
  521. org_xmlvm_iphone_UITextField_setTextAlignment___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  522. break;
  523. case 26:
  524. org_xmlvm_iphone_UITextField_xmlvmKeyTyped___char(receiver, ((java_lang_Character*) argsArray[0])->fields.java_lang_Character.value_);
  525. break;
  526. case 27:
  527. org_xmlvm_iphone_UITextField_setPlaceholder___java_lang_String(receiver, argsArray[0]);
  528. break;
  529. case 28:
  530. org_xmlvm_iphone_UITextField_getPlaceholder__(receiver);
  531. break;
  532. case 29:
  533. org_xmlvm_iphone_UITextField_setDelegate___org_xmlvm_iphone_UITextFieldDelegate(receiver, argsArray[0]);
  534. break;
  535. case 30:
  536. org_xmlvm_iphone_UITextField_getDelegate__(receiver);
  537. break;
  538. default:
  539. XMLVM_INTERNAL_ERROR();
  540. break;
  541. }
  542. return result;
  543. }
  544. void __INIT_org_xmlvm_iphone_UITextField()
  545. {
  546. staticInitializerLock(&__TIB_org_xmlvm_iphone_UITextField);
  547. // While the static initializer mutex is locked, locally store the value of
  548. // whether class initialization began or not
  549. int initBegan = __TIB_org_xmlvm_iphone_UITextField.classInitializationBegan;
  550. // Whether or not class initialization had already began, it has begun now
  551. __TIB_org_xmlvm_iphone_UITextField.classInitializationBegan = 1;
  552. staticInitializerUnlock(&__TIB_org_xmlvm_iphone_UITextField);
  553. JAVA_LONG curThreadId = (JAVA_LONG)pthread_self();
  554. if (initBegan) {
  555. if (__TIB_org_xmlvm_iphone_UITextField.initializerThreadId != curThreadId) {
  556. // Busy wait until the other thread finishes initializing this class
  557. while (!__TIB_org_xmlvm_iphone_UITextField.classInitialized) {
  558. // do nothing
  559. }
  560. }
  561. } else {
  562. __TIB_org_xmlvm_iphone_UITextField.initializerThreadId = curThreadId;
  563. __INIT_IMPL_org_xmlvm_iphone_UITextField();
  564. }
  565. }
  566. void __INIT_IMPL_org_xmlvm_iphone_UITextField()
  567. {
  568. // Initialize base class if necessary
  569. if (!__TIB_org_xmlvm_iphone_UIView.classInitialized) __INIT_org_xmlvm_iphone_UIView();
  570. __TIB_org_xmlvm_iphone_UITextField.newInstanceFunc = __NEW_INSTANCE_org_xmlvm_iphone_UITextField;
  571. // Copy vtable from base class
  572. XMLVM_MEMCPY(__TIB_org_xmlvm_iphone_UITextField.vtable, __TIB_org_xmlvm_iphone_UIView.vtable, sizeof(__TIB_org_xmlvm_iphone_UIView.vtable));
  573. // Initialize vtable for this class
  574. // Initialize interface information
  575. __TIB_org_xmlvm_iphone_UITextField.numImplementedInterfaces = 0;
  576. __TIB_org_xmlvm_iphone_UITextField.implementedInterfaces = (__TIB_DEFINITION_TEMPLATE* (*)[1]) XMLVM_MALLOC(sizeof(__TIB_DEFINITION_TEMPLATE*) * 0);
  577. // Initialize interfaces if necessary and assign tib to implementedInterfaces
  578. __TIB_org_xmlvm_iphone_UITextField.declaredFields = &__field_reflection_data[0];
  579. __TIB_org_xmlvm_iphone_UITextField.numDeclaredFields = sizeof(__field_reflection_data) / sizeof(XMLVM_FIELD_REFLECTION_DATA);
  580. __TIB_org_xmlvm_iphone_UITextField.constructorDispatcherFunc = constructor_dispatcher;
  581. __TIB_org_xmlvm_iphone_UITextField.declaredConstructors = &__constructor_reflection_data[0];
  582. __TIB_org_xmlvm_iphone_UITextField.numDeclaredConstructors = sizeof(__constructor_reflection_data) / sizeof(XMLVM_CONSTRUCTOR_REFLECTION_DATA);
  583. __TIB_org_xmlvm_iphone_UITextField.methodDispatcherFunc = method_dispatcher;
  584. __TIB_org_xmlvm_iphone_UITextField.declaredMethods = &__method_reflection_data[0];
  585. __TIB_org_xmlvm_iphone_UITextField.numDeclaredMethods = sizeof(__method_reflection_data) / sizeof(XMLVM_METHOD_REFLECTION_DATA);
  586. __CLASS_org_xmlvm_iphone_UITextField = XMLVM_CREATE_CLASS_OBJECT(&__TIB_org_xmlvm_iphone_UITextField);
  587. __TIB_org_xmlvm_iphone_UITextField.clazz = __CLASS_org_xmlvm_iphone_UITextField;
  588. __TIB_org_xmlvm_iphone_UITextField.baseType = JAVA_NULL;
  589. __CLASS_org_xmlvm_iphone_UITextField_1ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_xmlvm_iphone_UITextField);
  590. __CLASS_org_xmlvm_iphone_UITextField_2ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_xmlvm_iphone_UITextField_1ARRAY);
  591. __CLASS_org_xmlvm_iphone_UITextField_3ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_xmlvm_iphone_UITextField_2ARRAY);
  592. //XMLVM_BEGIN_WRAPPER[__INIT_org_xmlvm_iphone_UITextField]
  593. //XMLVM_END_WRAPPER
  594. __TIB_org_xmlvm_iphone_UITextField.classInitialized = 1;
  595. }
  596. void __DELETE_org_xmlvm_iphone_UITextField(void* me, void* client_data)
  597. {
  598. //XMLVM_BEGIN_WRAPPER[__DELETE_org_xmlvm_iphone_UITextField]
  599. __DELETE_org_xmlvm_iphone_UIControl(me, client_data);
  600. //XMLVM_END_WRAPPER
  601. }
  602. void __INIT_INSTANCE_MEMBERS_org_xmlvm_iphone_UITextField(JAVA_OBJECT me, int derivedClassWillRegisterFinalizer)
  603. {
  604. __INIT_INSTANCE_MEMBERS_org_xmlvm_iphone_UIView(me, 0 || derivedClassWillRegisterFinalizer);
  605. //XMLVM_BEGIN_WRAPPER[__INIT_INSTANCE_MEMBERS_org_xmlvm_iphone_UITextField]
  606. //XMLVM_END_WRAPPER
  607. }
  608. JAVA_OBJECT __NEW_org_xmlvm_iphone_UITextField()
  609. {
  610. if (!__TIB_org_xmlvm_iphone_UITextField.classInitialized) __INIT_org_xmlvm_iphone_UITextField();
  611. org_xmlvm_iphone_UITextField* me = (org_xmlvm_iphone_UITextField*) XMLVM_MALLOC(sizeof(org_xmlvm_iphone_UITextField));
  612. me->tib = &__TIB_org_xmlvm_iphone_UITextField;
  613. __INIT_INSTANCE_MEMBERS_org_xmlvm_iphone_UITextField(me, 0);
  614. //XMLVM_BEGIN_WRAPPER[__NEW_org_xmlvm_iphone_UITextField]
  615. //XMLVM_END_WRAPPER
  616. return me;
  617. }
  618. JAVA_OBJECT __NEW_INSTANCE_org_xmlvm_iphone_UITextField()
  619. {
  620. JAVA_OBJECT me = JAVA_NULL;
  621. me = __NEW_org_xmlvm_iphone_UITextField();
  622. org_xmlvm_iphone_UITextField___INIT___(me);
  623. return me;
  624. }
  625. void org_xmlvm_iphone_UITextField___INIT___(JAVA_OBJECT me)
  626. {
  627. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField___INIT___]
  628. UITextField* obj = [[UITextField alloc] init];
  629. org_xmlvm_iphone_UIControl_INTERNAL_CONSTRUCTOR(me, obj);
  630. //XMLVM_END_WRAPPER
  631. }
  632. void org_xmlvm_iphone_UITextField___INIT____org_xmlvm_iphone_CGRect(JAVA_OBJECT me, JAVA_OBJECT n1)
  633. {
  634. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField___INIT____org_xmlvm_iphone_CGRect]
  635. UITextField* obj = [[UITextField alloc] initWithFrame: toCGRect(n1)];
  636. org_xmlvm_iphone_UIControl_INTERNAL_CONSTRUCTOR(me, obj);
  637. //XMLVM_END_WRAPPER
  638. }
  639. JAVA_INT org_xmlvm_iphone_UITextField_getAutocapitalizationType__(JAVA_OBJECT me)
  640. {
  641. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getAutocapitalizationType__]
  642. XMLVM_VAR_THIZ;
  643. return [thiz autocapitalizationType];
  644. //XMLVM_END_WRAPPER
  645. }
  646. void org_xmlvm_iphone_UITextField_setAutocapitalizationType___int(JAVA_OBJECT me, JAVA_INT n1)
  647. {
  648. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setAutocapitalizationType___int]
  649. XMLVM_VAR_THIZ;
  650. XMLVM_VAR_INT(autocapitalizationType, n1);
  651. [thiz setAutocapitalizationType:autocapitalizationType];
  652. //XMLVM_END_WRAPPER
  653. }
  654. JAVA_INT org_xmlvm_iphone_UITextField_getAutocorrectionType__(JAVA_OBJECT me)
  655. {
  656. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getAutocorrectionType__]
  657. XMLVM_VAR_THIZ;
  658. return [thiz autocorrectionType];
  659. //XMLVM_END_WRAPPER
  660. }
  661. void org_xmlvm_iphone_UITextField_setAutocorrectionType___int(JAVA_OBJECT me, JAVA_INT n1)
  662. {
  663. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setAutocorrectionType___int]
  664. XMLVM_VAR_THIZ;
  665. XMLVM_VAR_INT(autocorrectionType, n1);
  666. [thiz setAutocorrectionType:autocorrectionType];
  667. //XMLVM_END_WRAPPER
  668. }
  669. JAVA_BOOLEAN org_xmlvm_iphone_UITextField_isEnablesReturnKeyAutomatically__(JAVA_OBJECT me)
  670. {
  671. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_isEnablesReturnKeyAutomatically__]
  672. XMLVM_VAR_THIZ;
  673. return [thiz enablesReturnKeyAutomatically];
  674. //XMLVM_END_WRAPPER
  675. }
  676. void org_xmlvm_iphone_UITextField_setEnablesReturnKeyAutomatically___boolean(JAVA_OBJECT me, JAVA_BOOLEAN n1)
  677. {
  678. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setEnablesReturnKeyAutomatically___boolean]
  679. XMLVM_VAR_THIZ;
  680. XMLVM_VAR_BOOLEAN(enablesReturnKeyAutomatically, n1);
  681. [thiz setEnablesReturnKeyAutomatically:enablesReturnKeyAutomatically];
  682. //XMLVM_END_WRAPPER
  683. }
  684. JAVA_INT org_xmlvm_iphone_UITextField_getKeyboardAppearance__(JAVA_OBJECT me)
  685. {
  686. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getKeyboardAppearance__]
  687. XMLVM_VAR_THIZ;
  688. return [thiz keyboardAppearance];
  689. //XMLVM_END_WRAPPER
  690. }
  691. void org_xmlvm_iphone_UITextField_setKeyboardAppearance___int(JAVA_OBJECT me, JAVA_INT n1)
  692. {
  693. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setKeyboardAppearance___int]
  694. XMLVM_VAR_THIZ;
  695. XMLVM_VAR_INT(keyboardAppearance, n1);
  696. [thiz setKeyboardAppearance:keyboardAppearance];
  697. //XMLVM_END_WRAPPER
  698. }
  699. JAVA_INT org_xmlvm_iphone_UITextField_getKeyboardType__(JAVA_OBJECT me)
  700. {
  701. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getKeyboardType__]
  702. XMLVM_VAR_THIZ;
  703. return [thiz keyboardType];
  704. //XMLVM_END_WRAPPER
  705. }
  706. void org_xmlvm_iphone_UITextField_setKeyboardType___int(JAVA_OBJECT me, JAVA_INT n1)
  707. {
  708. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setKeyboardType___int]
  709. XMLVM_VAR_THIZ;
  710. XMLVM_VAR_INT(keyboardType, n1);
  711. [thiz setKeyboardType:keyboardType];
  712. //XMLVM_END_WRAPPER
  713. }
  714. JAVA_INT org_xmlvm_iphone_UITextField_getReturnKeyType__(JAVA_OBJECT me)
  715. {
  716. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getReturnKeyType__]
  717. XMLVM_VAR_THIZ;
  718. return [thiz returnKeyType];
  719. //XMLVM_END_WRAPPER
  720. }
  721. void org_xmlvm_iphone_UITextField_setReturnKeyType___int(JAVA_OBJECT me, JAVA_INT n1)
  722. {
  723. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setReturnKeyType___int]
  724. XMLVM_VAR_THIZ;
  725. [thiz setReturnKeyType:n1];
  726. //XMLVM_END_WRAPPER
  727. }
  728. JAVA_BOOLEAN org_xmlvm_iphone_UITextField_isSecureTextEntry__(JAVA_OBJECT me)
  729. {
  730. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_isSecureTextEntry__]
  731. XMLVM_VAR_THIZ;
  732. return [thiz isSecureTextEntry];
  733. //XMLVM_END_WRAPPER
  734. }
  735. void org_xmlvm_iphone_UITextField_setSecureTextEntry___boolean(JAVA_OBJECT me, JAVA_BOOLEAN n1)
  736. {
  737. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setSecureTextEntry___boolean]
  738. XMLVM_VAR_THIZ;
  739. XMLVM_VAR_BOOLEAN(secureFlag, n1);
  740. thiz.secureTextEntry = secureFlag;
  741. //XMLVM_END_WRAPPER
  742. }
  743. void org_xmlvm_iphone_UITextField_setText___java_lang_String(JAVA_OBJECT me, JAVA_OBJECT n1)
  744. {
  745. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setText___java_lang_String]
  746. XMLVM_VAR_THIZ;
  747. XMLVM_VAR_NSString(text, n1);
  748. thiz.text = text;
  749. [text release];
  750. //XMLVM_END_WRAPPER
  751. }
  752. JAVA_OBJECT org_xmlvm_iphone_UITextField_getText__(JAVA_OBJECT me)
  753. {
  754. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getText__]
  755. XMLVM_VAR_THIZ;
  756. return toJavaString(thiz.text);
  757. //XMLVM_END_WRAPPER
  758. }
  759. void org_xmlvm_iphone_UITextField_setTextColor___org_xmlvm_iphone_UIColor(JAVA_OBJECT me, JAVA_OBJECT n1)
  760. {
  761. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setTextColor___org_xmlvm_iphone_UIColor]
  762. XMLVM_VAR_THIZ;
  763. XMLVM_VAR_IOS(UIColor, color, n1);
  764. thiz.textColor = color;
  765. //XMLVM_END_WRAPPER
  766. }
  767. JAVA_OBJECT org_xmlvm_iphone_UITextField_getTextColor__(JAVA_OBJECT me)
  768. {
  769. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getTextColor__]
  770. XMLVM_VAR_THIZ;
  771. UIColor* color = [thiz.textColor retain];
  772. JAVA_OBJECT jcolor = __NEW_org_xmlvm_iphone_UIColor();
  773. org_xmlvm_iphone_UIColor_INTERNAL_CONSTRUCTOR(jcolor, color);
  774. return jcolor;
  775. //XMLVM_END_WRAPPER
  776. }
  777. void org_xmlvm_iphone_UITextField_setBorderStyle___int(JAVA_OBJECT me, JAVA_INT n1)
  778. {
  779. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setBorderStyle___int]
  780. XMLVM_VAR_THIZ;
  781. XMLVM_VAR_INT(style, n1);
  782. thiz.borderStyle = style;
  783. //XMLVM_END_WRAPPER
  784. }
  785. JAVA_INT org_xmlvm_iphone_UITextField_getBorderStyle__(JAVA_OBJECT me)
  786. {
  787. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getBorderStyle__]
  788. XMLVM_VAR_THIZ;
  789. return thiz.borderStyle;
  790. //XMLVM_END_WRAPPER
  791. }
  792. JAVA_OBJECT org_xmlvm_iphone_UITextField_getFont__(JAVA_OBJECT me)
  793. {
  794. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getFont__]
  795. XMLVM_VAR_THIZ;
  796. UIFont* font = [thiz.font retain];
  797. JAVA_OBJECT jfont = __NEW_org_xmlvm_iphone_UIFont();
  798. org_xmlvm_iphone_UIFont_INTERNAL_CONSTRUCTOR(jfont, font);
  799. return jfont;
  800. //XMLVM_END_WRAPPER
  801. }
  802. void org_xmlvm_iphone_UITextField_setFont___org_xmlvm_iphone_UIFont(JAVA_OBJECT me, JAVA_OBJECT n1)
  803. {
  804. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setFont___org_xmlvm_iphone_UIFont]
  805. XMLVM_VAR_THIZ;
  806. XMLVM_VAR_IOS(UIFont, font, n1);
  807. thiz.font = font;
  808. //XMLVM_END_WRAPPER
  809. }
  810. JAVA_BOOLEAN org_xmlvm_iphone_UITextField_isAdjustsFontSizeToFitWidth__(JAVA_OBJECT me)
  811. {
  812. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_isAdjustsFontSizeToFitWidth__]
  813. XMLVM_NOT_IMPLEMENTED();
  814. //XMLVM_END_WRAPPER
  815. }
  816. void org_xmlvm_iphone_UITextField_setAdjustsFontSizeToFitWidth___boolean(JAVA_OBJECT me, JAVA_BOOLEAN n1)
  817. {
  818. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setAdjustsFontSizeToFitWidth___boolean]
  819. XMLVM_NOT_IMPLEMENTED();
  820. //XMLVM_END_WRAPPER
  821. }
  822. JAVA_INT org_xmlvm_iphone_UITextField_getTextAlignment__(JAVA_OBJECT me)
  823. {
  824. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getTextAlignment__]
  825. XMLVM_NOT_IMPLEMENTED();
  826. //XMLVM_END_WRAPPER
  827. }
  828. void org_xmlvm_iphone_UITextField_setTextAlignment___int(JAVA_OBJECT me, JAVA_INT n1)
  829. {
  830. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setTextAlignment___int]
  831. XMLVM_VAR_IOS(UITextField, textField, me);
  832. [textField setTextAlignment:n1];
  833. //XMLVM_END_WRAPPER
  834. }
  835. void org_xmlvm_iphone_UITextField_xmlvmKeyTyped___char(JAVA_OBJECT me, JAVA_CHAR n1)
  836. {
  837. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_xmlvmKeyTyped___char]
  838. XMLVM_NOT_IMPLEMENTED();
  839. //XMLVM_END_WRAPPER
  840. }
  841. void org_xmlvm_iphone_UITextField_setPlaceholder___java_lang_String(JAVA_OBJECT me, JAVA_OBJECT n1)
  842. {
  843. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setPlaceholder___java_lang_String]
  844. XMLVM_VAR_THIZ;
  845. XMLVM_VAR_NSString(text, n1);
  846. thiz.placeholder = text;
  847. [text release];
  848. //XMLVM_END_WRAPPER
  849. }
  850. JAVA_OBJECT org_xmlvm_iphone_UITextField_getPlaceholder__(JAVA_OBJECT me)
  851. {
  852. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getPlaceholder__]
  853. XMLVM_VAR_THIZ;
  854. return toJavaString(thiz.placeholder);
  855. //XMLVM_END_WRAPPER
  856. }
  857. void org_xmlvm_iphone_UITextField_setDelegate___org_xmlvm_iphone_UITextFieldDelegate(JAVA_OBJECT me, JAVA_OBJECT n1)
  858. {
  859. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_setDelegate___org_xmlvm_iphone_UITextFieldDelegate]
  860. XMLVM_VAR_THIZ;
  861. org_xmlvm_iphone_UITextFieldDelegate* jdelegate = n1;
  862. UITextFieldDelegateWrapper* delegate = jdelegate->fields.org_xmlvm_iphone_NSObject.wrappedObjCObj;
  863. jthiz->fields.org_xmlvm_iphone_UITextField.delegate_ = jdelegate;
  864. [delegate addSource: jthiz: thiz];
  865. [thiz setDelegate: delegate];
  866. //XMLVM_END_WRAPPER
  867. }
  868. JAVA_OBJECT org_xmlvm_iphone_UITextField_getDelegate__(JAVA_OBJECT me)
  869. {
  870. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UITextField_getDelegate__]
  871. XMLVM_NOT_IMPLEMENTED();
  872. //XMLVM_END_WRAPPER
  873. }