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

https://github.com/avh4/xmlvm · Objective C · 913 lines · 740 code · 91 blank · 82 comment · 15 complexity · a71cbb49a789e8c44442dd55ad87ce9b MD5 · raw file

  1. #include "xmlvm.h"
  2. #include "org_xmlvm_iphone_UIImage.h"
  3. #include "org_xmlvm_iphone_UIEvent.h"
  4. #include "org_xmlvm_iphone_UIFont.h"
  5. #include "org_xmlvm_iphone_CGSize.h"
  6. #include "java_util_Set.h"
  7. #include "org_xmlvm_iphone_UIColor.h"
  8. #include "java_lang_String.h"
  9. #include "org_xmlvm_iphone_UIButton.h"
  10. #define XMLVM_CURRENT_CLASS_NAME UIButton
  11. #define XMLVM_CURRENT_PKG_CLASS_NAME org_xmlvm_iphone_UIButton
  12. __TIB_DEFINITION_org_xmlvm_iphone_UIButton __TIB_org_xmlvm_iphone_UIButton = {
  13. 0, // classInitializationBegan
  14. 0, // classInitialized
  15. -1, // initializerThreadId
  16. __INIT_org_xmlvm_iphone_UIButton, // classInitializer
  17. "org.xmlvm.iphone.UIButton", // className
  18. (__TIB_DEFINITION_TEMPLATE*) &__TIB_org_xmlvm_iphone_UIControl, // extends
  19. sizeof(org_xmlvm_iphone_UIButton), // sizeInstance
  20. XMLVM_TYPE_CLASS};
  21. JAVA_OBJECT __CLASS_org_xmlvm_iphone_UIButton;
  22. JAVA_OBJECT __CLASS_org_xmlvm_iphone_UIButton_1ARRAY;
  23. JAVA_OBJECT __CLASS_org_xmlvm_iphone_UIButton_2ARRAY;
  24. JAVA_OBJECT __CLASS_org_xmlvm_iphone_UIButton_3ARRAY;
  25. //XMLVM_BEGIN_IMPLEMENTATION
  26. #import <UIKit/UIKit.h>
  27. #include "org_xmlvm_iphone_NSString.h"
  28. void org_xmlvm_iphone_UIButton_INTERNAL_CONSTRUCTOR(JAVA_OBJECT me, NSObject* wrappedObjCObj)
  29. {
  30. org_xmlvm_iphone_UIControl_INTERNAL_CONSTRUCTOR(me, wrappedObjCObj);
  31. }
  32. static JAVA_OBJECT __WRAPPER_CREATOR(NSObject* obj)
  33. {
  34. NSString* name = NSStringFromClass([obj class]);
  35. if ([obj class] == [UIButton class] || ([name isEqual:@"UIRoundedRectButton"])) {
  36. JAVA_OBJECT jobj = __NEW_org_xmlvm_iphone_UIButton();
  37. org_xmlvm_iphone_UIButton_INTERNAL_CONSTRUCTOR(jobj, [obj retain]);
  38. return jobj;
  39. }
  40. return JAVA_NULL;
  41. }
  42. //XMLVM_END_IMPLEMENTATION
  43. #include "xmlvm-reflection.h"
  44. static XMLVM_FIELD_REFLECTION_DATA __field_reflection_data[] = {
  45. };
  46. static XMLVM_CONSTRUCTOR_REFLECTION_DATA __constructor_reflection_data[] = {
  47. };
  48. static JAVA_OBJECT constructor_dispatcher(JAVA_OBJECT constructor, JAVA_OBJECT arguments)
  49. {
  50. JAVA_OBJECT obj = __NEW_org_xmlvm_iphone_UIButton();
  51. java_lang_reflect_Constructor* c = (java_lang_reflect_Constructor*) constructor;
  52. org_xmlvm_runtime_XMLVMArray* args = (org_xmlvm_runtime_XMLVMArray*) arguments;
  53. JAVA_ARRAY_OBJECT* argsArray = (JAVA_ARRAY_OBJECT*) args->fields.org_xmlvm_runtime_XMLVMArray.array_;
  54. switch (c->fields.java_lang_reflect_Constructor.slot_) {
  55. default:
  56. XMLVM_INTERNAL_ERROR();
  57. break;
  58. }
  59. return obj;
  60. }
  61. static JAVA_OBJECT* __method0_arg_types[] = {
  62. &__CLASS_int,
  63. };
  64. static JAVA_OBJECT* __method1_arg_types[] = {
  65. &__CLASS_org_xmlvm_iphone_UIFont,
  66. };
  67. static JAVA_OBJECT* __method2_arg_types[] = {
  68. };
  69. static JAVA_OBJECT* __method3_arg_types[] = {
  70. };
  71. static JAVA_OBJECT* __method4_arg_types[] = {
  72. };
  73. static JAVA_OBJECT* __method5_arg_types[] = {
  74. &__CLASS_java_lang_String,
  75. &__CLASS_int,
  76. };
  77. static JAVA_OBJECT* __method6_arg_types[] = {
  78. &__CLASS_int,
  79. };
  80. static JAVA_OBJECT* __method7_arg_types[] = {
  81. };
  82. static JAVA_OBJECT* __method8_arg_types[] = {
  83. &__CLASS_org_xmlvm_iphone_UIColor,
  84. &__CLASS_int,
  85. };
  86. static JAVA_OBJECT* __method9_arg_types[] = {
  87. &__CLASS_int,
  88. };
  89. static JAVA_OBJECT* __method10_arg_types[] = {
  90. };
  91. static JAVA_OBJECT* __method11_arg_types[] = {
  92. &__CLASS_org_xmlvm_iphone_UIColor,
  93. &__CLASS_int,
  94. };
  95. static JAVA_OBJECT* __method12_arg_types[] = {
  96. &__CLASS_int,
  97. };
  98. static JAVA_OBJECT* __method13_arg_types[] = {
  99. };
  100. static JAVA_OBJECT* __method14_arg_types[] = {
  101. &__CLASS_org_xmlvm_iphone_UIImage,
  102. &__CLASS_int,
  103. };
  104. static JAVA_OBJECT* __method15_arg_types[] = {
  105. &__CLASS_int,
  106. };
  107. static JAVA_OBJECT* __method16_arg_types[] = {
  108. };
  109. static JAVA_OBJECT* __method17_arg_types[] = {
  110. &__CLASS_org_xmlvm_iphone_UIImage,
  111. &__CLASS_int,
  112. };
  113. static JAVA_OBJECT* __method18_arg_types[] = {
  114. &__CLASS_int,
  115. };
  116. static JAVA_OBJECT* __method19_arg_types[] = {
  117. };
  118. static JAVA_OBJECT* __method20_arg_types[] = {
  119. &__CLASS_org_xmlvm_iphone_CGSize,
  120. };
  121. static JAVA_OBJECT* __method21_arg_types[] = {
  122. };
  123. static JAVA_OBJECT* __method22_arg_types[] = {
  124. &__CLASS_java_util_Set,
  125. &__CLASS_org_xmlvm_iphone_UIEvent,
  126. };
  127. static JAVA_OBJECT* __method23_arg_types[] = {
  128. &__CLASS_java_util_Set,
  129. &__CLASS_org_xmlvm_iphone_UIEvent,
  130. };
  131. static JAVA_OBJECT* __method24_arg_types[] = {
  132. &__CLASS_float,
  133. };
  134. static JAVA_OBJECT* __method25_arg_types[] = {
  135. };
  136. static JAVA_OBJECT* __method26_arg_types[] = {
  137. &__CLASS_boolean,
  138. };
  139. static JAVA_OBJECT* __method27_arg_types[] = {
  140. };
  141. static JAVA_OBJECT* __method28_arg_types[] = {
  142. &__CLASS_boolean,
  143. };
  144. static JAVA_OBJECT* __method29_arg_types[] = {
  145. };
  146. static JAVA_OBJECT* __method30_arg_types[] = {
  147. &__CLASS_boolean,
  148. };
  149. static XMLVM_METHOD_REFLECTION_DATA __method_reflection_data[] = {
  150. {"buttonWithType",
  151. &__method0_arg_types[0],
  152. sizeof(__method0_arg_types) / sizeof(JAVA_OBJECT*),
  153. JAVA_NULL,
  154. 0,
  155. 0,
  156. "",
  157. JAVA_NULL,
  158. JAVA_NULL},
  159. {"setFont",
  160. &__method1_arg_types[0],
  161. sizeof(__method1_arg_types) / sizeof(JAVA_OBJECT*),
  162. JAVA_NULL,
  163. 0,
  164. 0,
  165. "",
  166. JAVA_NULL,
  167. JAVA_NULL},
  168. {"getFont",
  169. &__method2_arg_types[0],
  170. sizeof(__method2_arg_types) / sizeof(JAVA_OBJECT*),
  171. JAVA_NULL,
  172. 0,
  173. 0,
  174. "",
  175. JAVA_NULL,
  176. JAVA_NULL},
  177. {"getButtonType",
  178. &__method3_arg_types[0],
  179. sizeof(__method3_arg_types) / sizeof(JAVA_OBJECT*),
  180. JAVA_NULL,
  181. 0,
  182. 0,
  183. "",
  184. JAVA_NULL,
  185. JAVA_NULL},
  186. {"getTitleLabel",
  187. &__method4_arg_types[0],
  188. sizeof(__method4_arg_types) / sizeof(JAVA_OBJECT*),
  189. JAVA_NULL,
  190. 0,
  191. 0,
  192. "",
  193. JAVA_NULL,
  194. JAVA_NULL},
  195. {"setTitle",
  196. &__method5_arg_types[0],
  197. sizeof(__method5_arg_types) / sizeof(JAVA_OBJECT*),
  198. JAVA_NULL,
  199. 0,
  200. 0,
  201. "",
  202. JAVA_NULL,
  203. JAVA_NULL},
  204. {"titleForState",
  205. &__method6_arg_types[0],
  206. sizeof(__method6_arg_types) / sizeof(JAVA_OBJECT*),
  207. JAVA_NULL,
  208. 0,
  209. 0,
  210. "",
  211. JAVA_NULL,
  212. JAVA_NULL},
  213. {"getCurrentTitle",
  214. &__method7_arg_types[0],
  215. sizeof(__method7_arg_types) / sizeof(JAVA_OBJECT*),
  216. JAVA_NULL,
  217. 0,
  218. 0,
  219. "",
  220. JAVA_NULL,
  221. JAVA_NULL},
  222. {"setTitleColor",
  223. &__method8_arg_types[0],
  224. sizeof(__method8_arg_types) / sizeof(JAVA_OBJECT*),
  225. JAVA_NULL,
  226. 0,
  227. 0,
  228. "",
  229. JAVA_NULL,
  230. JAVA_NULL},
  231. {"titleColorForState",
  232. &__method9_arg_types[0],
  233. sizeof(__method9_arg_types) / sizeof(JAVA_OBJECT*),
  234. JAVA_NULL,
  235. 0,
  236. 0,
  237. "",
  238. JAVA_NULL,
  239. JAVA_NULL},
  240. {"getCurrentTitleColor",
  241. &__method10_arg_types[0],
  242. sizeof(__method10_arg_types) / sizeof(JAVA_OBJECT*),
  243. JAVA_NULL,
  244. 0,
  245. 0,
  246. "",
  247. JAVA_NULL,
  248. JAVA_NULL},
  249. {"setTitleShadowColor",
  250. &__method11_arg_types[0],
  251. sizeof(__method11_arg_types) / sizeof(JAVA_OBJECT*),
  252. JAVA_NULL,
  253. 0,
  254. 0,
  255. "",
  256. JAVA_NULL,
  257. JAVA_NULL},
  258. {"titleShadowColorForState",
  259. &__method12_arg_types[0],
  260. sizeof(__method12_arg_types) / sizeof(JAVA_OBJECT*),
  261. JAVA_NULL,
  262. 0,
  263. 0,
  264. "",
  265. JAVA_NULL,
  266. JAVA_NULL},
  267. {"getCurrentTitleShadowColor",
  268. &__method13_arg_types[0],
  269. sizeof(__method13_arg_types) / sizeof(JAVA_OBJECT*),
  270. JAVA_NULL,
  271. 0,
  272. 0,
  273. "",
  274. JAVA_NULL,
  275. JAVA_NULL},
  276. {"setImage",
  277. &__method14_arg_types[0],
  278. sizeof(__method14_arg_types) / sizeof(JAVA_OBJECT*),
  279. JAVA_NULL,
  280. 0,
  281. 0,
  282. "",
  283. JAVA_NULL,
  284. JAVA_NULL},
  285. {"imageForState",
  286. &__method15_arg_types[0],
  287. sizeof(__method15_arg_types) / sizeof(JAVA_OBJECT*),
  288. JAVA_NULL,
  289. 0,
  290. 0,
  291. "",
  292. JAVA_NULL,
  293. JAVA_NULL},
  294. {"getCurrentImage",
  295. &__method16_arg_types[0],
  296. sizeof(__method16_arg_types) / sizeof(JAVA_OBJECT*),
  297. JAVA_NULL,
  298. 0,
  299. 0,
  300. "",
  301. JAVA_NULL,
  302. JAVA_NULL},
  303. {"setBackgroundImage",
  304. &__method17_arg_types[0],
  305. sizeof(__method17_arg_types) / sizeof(JAVA_OBJECT*),
  306. JAVA_NULL,
  307. 0,
  308. 0,
  309. "",
  310. JAVA_NULL,
  311. JAVA_NULL},
  312. {"backgroundImageForState",
  313. &__method18_arg_types[0],
  314. sizeof(__method18_arg_types) / sizeof(JAVA_OBJECT*),
  315. JAVA_NULL,
  316. 0,
  317. 0,
  318. "",
  319. JAVA_NULL,
  320. JAVA_NULL},
  321. {"getCurrentBackgroundImage",
  322. &__method19_arg_types[0],
  323. sizeof(__method19_arg_types) / sizeof(JAVA_OBJECT*),
  324. JAVA_NULL,
  325. 0,
  326. 0,
  327. "",
  328. JAVA_NULL,
  329. JAVA_NULL},
  330. {"setTitleShadowOffset",
  331. &__method20_arg_types[0],
  332. sizeof(__method20_arg_types) / sizeof(JAVA_OBJECT*),
  333. JAVA_NULL,
  334. 0,
  335. 0,
  336. "",
  337. JAVA_NULL,
  338. JAVA_NULL},
  339. {"getTitleShadowOffset",
  340. &__method21_arg_types[0],
  341. sizeof(__method21_arg_types) / sizeof(JAVA_OBJECT*),
  342. JAVA_NULL,
  343. 0,
  344. 0,
  345. "",
  346. JAVA_NULL,
  347. JAVA_NULL},
  348. {"touchesBegan",
  349. &__method22_arg_types[0],
  350. sizeof(__method22_arg_types) / sizeof(JAVA_OBJECT*),
  351. JAVA_NULL,
  352. 0,
  353. 0,
  354. "",
  355. JAVA_NULL,
  356. JAVA_NULL},
  357. {"touchesEnded",
  358. &__method23_arg_types[0],
  359. sizeof(__method23_arg_types) / sizeof(JAVA_OBJECT*),
  360. JAVA_NULL,
  361. 0,
  362. 0,
  363. "",
  364. JAVA_NULL,
  365. JAVA_NULL},
  366. {"setAlpha",
  367. &__method24_arg_types[0],
  368. sizeof(__method24_arg_types) / sizeof(JAVA_OBJECT*),
  369. JAVA_NULL,
  370. 0,
  371. 0,
  372. "",
  373. JAVA_NULL,
  374. JAVA_NULL},
  375. {"isAdjustsImageWhenDisabled",
  376. &__method25_arg_types[0],
  377. sizeof(__method25_arg_types) / sizeof(JAVA_OBJECT*),
  378. JAVA_NULL,
  379. 0,
  380. 0,
  381. "",
  382. JAVA_NULL,
  383. JAVA_NULL},
  384. {"setAdjustsImageWhenDisabled",
  385. &__method26_arg_types[0],
  386. sizeof(__method26_arg_types) / sizeof(JAVA_OBJECT*),
  387. JAVA_NULL,
  388. 0,
  389. 0,
  390. "",
  391. JAVA_NULL,
  392. JAVA_NULL},
  393. {"isAdjustsImageWhenHighlighted",
  394. &__method27_arg_types[0],
  395. sizeof(__method27_arg_types) / sizeof(JAVA_OBJECT*),
  396. JAVA_NULL,
  397. 0,
  398. 0,
  399. "",
  400. JAVA_NULL,
  401. JAVA_NULL},
  402. {"setAdjustsImageWhenHighlighted",
  403. &__method28_arg_types[0],
  404. sizeof(__method28_arg_types) / sizeof(JAVA_OBJECT*),
  405. JAVA_NULL,
  406. 0,
  407. 0,
  408. "",
  409. JAVA_NULL,
  410. JAVA_NULL},
  411. {"isShowsTouchWhenHighlighted",
  412. &__method29_arg_types[0],
  413. sizeof(__method29_arg_types) / sizeof(JAVA_OBJECT*),
  414. JAVA_NULL,
  415. 0,
  416. 0,
  417. "",
  418. JAVA_NULL,
  419. JAVA_NULL},
  420. {"setShowsTouchWhenHighlighted",
  421. &__method30_arg_types[0],
  422. sizeof(__method30_arg_types) / sizeof(JAVA_OBJECT*),
  423. JAVA_NULL,
  424. 0,
  425. 0,
  426. "",
  427. JAVA_NULL,
  428. JAVA_NULL},
  429. };
  430. static JAVA_OBJECT method_dispatcher(JAVA_OBJECT method, JAVA_OBJECT receiver, JAVA_OBJECT arguments)
  431. {
  432. JAVA_OBJECT result = JAVA_NULL; //TODO need to set result
  433. java_lang_Object* obj = receiver;
  434. java_lang_reflect_Method* m = (java_lang_reflect_Method*) method;
  435. org_xmlvm_runtime_XMLVMArray* args = (org_xmlvm_runtime_XMLVMArray*) arguments;
  436. JAVA_ARRAY_OBJECT* argsArray = (JAVA_ARRAY_OBJECT*) args->fields.org_xmlvm_runtime_XMLVMArray.array_;
  437. switch (m->fields.java_lang_reflect_Method.slot_) {
  438. case 0:
  439. org_xmlvm_iphone_UIButton_buttonWithType___int(((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  440. break;
  441. case 1:
  442. org_xmlvm_iphone_UIButton_setFont___org_xmlvm_iphone_UIFont(receiver, argsArray[0]);
  443. break;
  444. case 2:
  445. org_xmlvm_iphone_UIButton_getFont__(receiver);
  446. break;
  447. case 3:
  448. org_xmlvm_iphone_UIButton_getButtonType__(receiver);
  449. break;
  450. case 4:
  451. org_xmlvm_iphone_UIButton_getTitleLabel__(receiver);
  452. break;
  453. case 5:
  454. org_xmlvm_iphone_UIButton_setTitle___java_lang_String_int(receiver, argsArray[0], ((java_lang_Integer*) argsArray[1])->fields.java_lang_Integer.value_);
  455. break;
  456. case 6:
  457. org_xmlvm_iphone_UIButton_titleForState___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  458. break;
  459. case 7:
  460. org_xmlvm_iphone_UIButton_getCurrentTitle__(receiver);
  461. break;
  462. case 8:
  463. org_xmlvm_iphone_UIButton_setTitleColor___org_xmlvm_iphone_UIColor_int(receiver, argsArray[0], ((java_lang_Integer*) argsArray[1])->fields.java_lang_Integer.value_);
  464. break;
  465. case 9:
  466. org_xmlvm_iphone_UIButton_titleColorForState___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  467. break;
  468. case 10:
  469. org_xmlvm_iphone_UIButton_getCurrentTitleColor__(receiver);
  470. break;
  471. case 11:
  472. org_xmlvm_iphone_UIButton_setTitleShadowColor___org_xmlvm_iphone_UIColor_int(receiver, argsArray[0], ((java_lang_Integer*) argsArray[1])->fields.java_lang_Integer.value_);
  473. break;
  474. case 12:
  475. org_xmlvm_iphone_UIButton_titleShadowColorForState___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  476. break;
  477. case 13:
  478. org_xmlvm_iphone_UIButton_getCurrentTitleShadowColor__(receiver);
  479. break;
  480. case 14:
  481. org_xmlvm_iphone_UIButton_setImage___org_xmlvm_iphone_UIImage_int(receiver, argsArray[0], ((java_lang_Integer*) argsArray[1])->fields.java_lang_Integer.value_);
  482. break;
  483. case 15:
  484. org_xmlvm_iphone_UIButton_imageForState___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  485. break;
  486. case 16:
  487. org_xmlvm_iphone_UIButton_getCurrentImage__(receiver);
  488. break;
  489. case 17:
  490. org_xmlvm_iphone_UIButton_setBackgroundImage___org_xmlvm_iphone_UIImage_int(receiver, argsArray[0], ((java_lang_Integer*) argsArray[1])->fields.java_lang_Integer.value_);
  491. break;
  492. case 18:
  493. org_xmlvm_iphone_UIButton_backgroundImageForState___int(receiver, ((java_lang_Integer*) argsArray[0])->fields.java_lang_Integer.value_);
  494. break;
  495. case 19:
  496. org_xmlvm_iphone_UIButton_getCurrentBackgroundImage__(receiver);
  497. break;
  498. case 20:
  499. org_xmlvm_iphone_UIButton_setTitleShadowOffset___org_xmlvm_iphone_CGSize(receiver, argsArray[0]);
  500. break;
  501. case 21:
  502. org_xmlvm_iphone_UIButton_getTitleShadowOffset__(receiver);
  503. break;
  504. case 22:
  505. org_xmlvm_iphone_UIButton_touchesBegan___java_util_Set_org_xmlvm_iphone_UIEvent(receiver, argsArray[0], argsArray[1]);
  506. break;
  507. case 23:
  508. org_xmlvm_iphone_UIButton_touchesEnded___java_util_Set_org_xmlvm_iphone_UIEvent(receiver, argsArray[0], argsArray[1]);
  509. break;
  510. case 24:
  511. org_xmlvm_iphone_UIButton_setAlpha___float(receiver, ((java_lang_Float*) argsArray[0])->fields.java_lang_Float.value_);
  512. break;
  513. case 25:
  514. org_xmlvm_iphone_UIButton_isAdjustsImageWhenDisabled__(receiver);
  515. break;
  516. case 26:
  517. org_xmlvm_iphone_UIButton_setAdjustsImageWhenDisabled___boolean(receiver, ((java_lang_Boolean*) argsArray[0])->fields.java_lang_Boolean.value_);
  518. break;
  519. case 27:
  520. org_xmlvm_iphone_UIButton_isAdjustsImageWhenHighlighted__(receiver);
  521. break;
  522. case 28:
  523. org_xmlvm_iphone_UIButton_setAdjustsImageWhenHighlighted___boolean(receiver, ((java_lang_Boolean*) argsArray[0])->fields.java_lang_Boolean.value_);
  524. break;
  525. case 29:
  526. org_xmlvm_iphone_UIButton_isShowsTouchWhenHighlighted__(receiver);
  527. break;
  528. case 30:
  529. org_xmlvm_iphone_UIButton_setShowsTouchWhenHighlighted___boolean(receiver, ((java_lang_Boolean*) argsArray[0])->fields.java_lang_Boolean.value_);
  530. break;
  531. default:
  532. XMLVM_INTERNAL_ERROR();
  533. break;
  534. }
  535. return result;
  536. }
  537. void __INIT_org_xmlvm_iphone_UIButton()
  538. {
  539. staticInitializerLock(&__TIB_org_xmlvm_iphone_UIButton);
  540. // While the static initializer mutex is locked, locally store the value of
  541. // whether class initialization began or not
  542. int initBegan = __TIB_org_xmlvm_iphone_UIButton.classInitializationBegan;
  543. // Whether or not class initialization had already began, it has begun now
  544. __TIB_org_xmlvm_iphone_UIButton.classInitializationBegan = 1;
  545. staticInitializerUnlock(&__TIB_org_xmlvm_iphone_UIButton);
  546. JAVA_LONG curThreadId = (JAVA_LONG)pthread_self();
  547. if (initBegan) {
  548. if (__TIB_org_xmlvm_iphone_UIButton.initializerThreadId != curThreadId) {
  549. // Busy wait until the other thread finishes initializing this class
  550. while (!__TIB_org_xmlvm_iphone_UIButton.classInitialized) {
  551. // do nothing
  552. }
  553. }
  554. } else {
  555. __TIB_org_xmlvm_iphone_UIButton.initializerThreadId = curThreadId;
  556. __INIT_IMPL_org_xmlvm_iphone_UIButton();
  557. }
  558. }
  559. void __INIT_IMPL_org_xmlvm_iphone_UIButton()
  560. {
  561. // Initialize base class if necessary
  562. if (!__TIB_org_xmlvm_iphone_UIControl.classInitialized) __INIT_org_xmlvm_iphone_UIControl();
  563. __TIB_org_xmlvm_iphone_UIButton.newInstanceFunc = __NEW_INSTANCE_org_xmlvm_iphone_UIButton;
  564. // Copy vtable from base class
  565. XMLVM_MEMCPY(__TIB_org_xmlvm_iphone_UIButton.vtable, __TIB_org_xmlvm_iphone_UIControl.vtable, sizeof(__TIB_org_xmlvm_iphone_UIControl.vtable));
  566. // Initialize vtable for this class
  567. __TIB_org_xmlvm_iphone_UIButton.vtable[6] = (VTABLE_PTR) &org_xmlvm_iphone_UIButton_touchesBegan___java_util_Set_org_xmlvm_iphone_UIEvent;
  568. __TIB_org_xmlvm_iphone_UIButton.vtable[7] = (VTABLE_PTR) &org_xmlvm_iphone_UIButton_touchesEnded___java_util_Set_org_xmlvm_iphone_UIEvent;
  569. __TIB_org_xmlvm_iphone_UIButton.vtable[9] = (VTABLE_PTR) &org_xmlvm_iphone_UIButton_setAlpha___float;
  570. // Initialize interface information
  571. __TIB_org_xmlvm_iphone_UIButton.numImplementedInterfaces = 0;
  572. __TIB_org_xmlvm_iphone_UIButton.implementedInterfaces = (__TIB_DEFINITION_TEMPLATE* (*)[1]) XMLVM_MALLOC(sizeof(__TIB_DEFINITION_TEMPLATE*) * 0);
  573. // Initialize interfaces if necessary and assign tib to implementedInterfaces
  574. __TIB_org_xmlvm_iphone_UIButton.declaredFields = &__field_reflection_data[0];
  575. __TIB_org_xmlvm_iphone_UIButton.numDeclaredFields = sizeof(__field_reflection_data) / sizeof(XMLVM_FIELD_REFLECTION_DATA);
  576. __TIB_org_xmlvm_iphone_UIButton.constructorDispatcherFunc = constructor_dispatcher;
  577. __TIB_org_xmlvm_iphone_UIButton.declaredConstructors = &__constructor_reflection_data[0];
  578. __TIB_org_xmlvm_iphone_UIButton.numDeclaredConstructors = sizeof(__constructor_reflection_data) / sizeof(XMLVM_CONSTRUCTOR_REFLECTION_DATA);
  579. __TIB_org_xmlvm_iphone_UIButton.methodDispatcherFunc = method_dispatcher;
  580. __TIB_org_xmlvm_iphone_UIButton.declaredMethods = &__method_reflection_data[0];
  581. __TIB_org_xmlvm_iphone_UIButton.numDeclaredMethods = sizeof(__method_reflection_data) / sizeof(XMLVM_METHOD_REFLECTION_DATA);
  582. __CLASS_org_xmlvm_iphone_UIButton = XMLVM_CREATE_CLASS_OBJECT(&__TIB_org_xmlvm_iphone_UIButton);
  583. __TIB_org_xmlvm_iphone_UIButton.clazz = __CLASS_org_xmlvm_iphone_UIButton;
  584. __TIB_org_xmlvm_iphone_UIButton.baseType = JAVA_NULL;
  585. __CLASS_org_xmlvm_iphone_UIButton_1ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_xmlvm_iphone_UIButton);
  586. __CLASS_org_xmlvm_iphone_UIButton_2ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_xmlvm_iphone_UIButton_1ARRAY);
  587. __CLASS_org_xmlvm_iphone_UIButton_3ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_xmlvm_iphone_UIButton_2ARRAY);
  588. //XMLVM_BEGIN_WRAPPER[__INIT_org_xmlvm_iphone_UIButton]
  589. xmlvm_register_wrapper_creator(__WRAPPER_CREATOR);
  590. //XMLVM_END_WRAPPER
  591. __TIB_org_xmlvm_iphone_UIButton.classInitialized = 1;
  592. }
  593. void __DELETE_org_xmlvm_iphone_UIButton(void* me, void* client_data)
  594. {
  595. //XMLVM_BEGIN_WRAPPER[__DELETE_org_xmlvm_iphone_UIButton]
  596. __DELETE_org_xmlvm_iphone_UIControl(me, client_data);
  597. //XMLVM_END_WRAPPER
  598. }
  599. void __INIT_INSTANCE_MEMBERS_org_xmlvm_iphone_UIButton(JAVA_OBJECT me, int derivedClassWillRegisterFinalizer)
  600. {
  601. __INIT_INSTANCE_MEMBERS_org_xmlvm_iphone_UIControl(me, 0 || derivedClassWillRegisterFinalizer);
  602. //XMLVM_BEGIN_WRAPPER[__INIT_INSTANCE_MEMBERS_org_xmlvm_iphone_UIButton]
  603. //XMLVM_END_WRAPPER
  604. }
  605. JAVA_OBJECT __NEW_org_xmlvm_iphone_UIButton()
  606. {
  607. if (!__TIB_org_xmlvm_iphone_UIButton.classInitialized) __INIT_org_xmlvm_iphone_UIButton();
  608. org_xmlvm_iphone_UIButton* me = (org_xmlvm_iphone_UIButton*) XMLVM_MALLOC(sizeof(org_xmlvm_iphone_UIButton));
  609. me->tib = &__TIB_org_xmlvm_iphone_UIButton;
  610. __INIT_INSTANCE_MEMBERS_org_xmlvm_iphone_UIButton(me, 0);
  611. //XMLVM_BEGIN_WRAPPER[__NEW_org_xmlvm_iphone_UIButton]
  612. //XMLVM_END_WRAPPER
  613. return me;
  614. }
  615. JAVA_OBJECT __NEW_INSTANCE_org_xmlvm_iphone_UIButton()
  616. {
  617. JAVA_OBJECT me = JAVA_NULL;
  618. return me;
  619. }
  620. JAVA_OBJECT org_xmlvm_iphone_UIButton_buttonWithType___int(JAVA_INT n1)
  621. {
  622. if (!__TIB_org_xmlvm_iphone_UIButton.classInitialized) __INIT_org_xmlvm_iphone_UIButton();
  623. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_buttonWithType___int]
  624. NSAutoreleasePool* p = [[NSAutoreleasePool alloc] init];
  625. UIButton* button = [UIButton buttonWithType: (UIButtonType) n1];
  626. JAVA_OBJECT jbutton = xmlvm_get_associated_c_object(button);
  627. [p release];
  628. return jbutton;
  629. //XMLVM_END_WRAPPER
  630. }
  631. void org_xmlvm_iphone_UIButton_setFont___org_xmlvm_iphone_UIFont(JAVA_OBJECT me, JAVA_OBJECT n1)
  632. {
  633. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setFont___org_xmlvm_iphone_UIFont]
  634. XMLVM_VAR_IOS(UIButton, button, me);
  635. XMLVM_VAR_IOS(UIFont, font, n1);
  636. [button setFont:font];
  637. //XMLVM_END_WRAPPER
  638. }
  639. JAVA_OBJECT org_xmlvm_iphone_UIButton_getFont__(JAVA_OBJECT me)
  640. {
  641. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_getFont__]
  642. XMLVM_VAR_THIZ;
  643. if (!__TIB_org_xmlvm_iphone_UIFont.classInitialized) __INIT_org_xmlvm_iphone_UIFont();
  644. return xmlvm_get_associated_c_object(thiz.font);
  645. //XMLVM_END_WRAPPER
  646. }
  647. JAVA_INT org_xmlvm_iphone_UIButton_getButtonType__(JAVA_OBJECT me)
  648. {
  649. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_getButtonType__]
  650. XMLVM_NOT_IMPLEMENTED();
  651. //XMLVM_END_WRAPPER
  652. }
  653. JAVA_OBJECT org_xmlvm_iphone_UIButton_getTitleLabel__(JAVA_OBJECT me)
  654. {
  655. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_getTitleLabel__]
  656. XMLVM_NOT_IMPLEMENTED();
  657. //XMLVM_END_WRAPPER
  658. }
  659. void org_xmlvm_iphone_UIButton_setTitle___java_lang_String_int(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_INT n2)
  660. {
  661. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setTitle___java_lang_String_int]
  662. XMLVM_VAR_THIZ;
  663. XMLVM_VAR_NSString(title, n1);
  664. XMLVM_VAR_INT(state, n2);
  665. [thiz setTitle:title forState:state];
  666. [title release];
  667. //XMLVM_END_WRAPPER
  668. }
  669. JAVA_OBJECT org_xmlvm_iphone_UIButton_titleForState___int(JAVA_OBJECT me, JAVA_INT n1)
  670. {
  671. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_titleForState___int]
  672. XMLVM_NOT_IMPLEMENTED();
  673. //XMLVM_END_WRAPPER
  674. }
  675. JAVA_OBJECT org_xmlvm_iphone_UIButton_getCurrentTitle__(JAVA_OBJECT me)
  676. {
  677. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_getCurrentTitle__]
  678. XMLVM_NOT_IMPLEMENTED();
  679. //XMLVM_END_WRAPPER
  680. }
  681. void org_xmlvm_iphone_UIButton_setTitleColor___org_xmlvm_iphone_UIColor_int(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_INT n2)
  682. {
  683. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setTitleColor___org_xmlvm_iphone_UIColor_int]
  684. XMLVM_VAR_THIZ;
  685. XMLVM_VAR_IOS(UIColor, color, n1);
  686. XMLVM_VAR_INT(state, n2);
  687. [thiz setTitleColor:color forState:state];
  688. //XMLVM_END_WRAPPER
  689. }
  690. JAVA_OBJECT org_xmlvm_iphone_UIButton_titleColorForState___int(JAVA_OBJECT me, JAVA_INT n1)
  691. {
  692. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_titleColorForState___int]
  693. XMLVM_NOT_IMPLEMENTED();
  694. //XMLVM_END_WRAPPER
  695. }
  696. JAVA_OBJECT org_xmlvm_iphone_UIButton_getCurrentTitleColor__(JAVA_OBJECT me)
  697. {
  698. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_getCurrentTitleColor__]
  699. XMLVM_NOT_IMPLEMENTED();
  700. //XMLVM_END_WRAPPER
  701. }
  702. void org_xmlvm_iphone_UIButton_setTitleShadowColor___org_xmlvm_iphone_UIColor_int(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_INT n2)
  703. {
  704. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setTitleShadowColor___org_xmlvm_iphone_UIColor_int]
  705. XMLVM_NOT_IMPLEMENTED();
  706. //XMLVM_END_WRAPPER
  707. }
  708. JAVA_OBJECT org_xmlvm_iphone_UIButton_titleShadowColorForState___int(JAVA_OBJECT me, JAVA_INT n1)
  709. {
  710. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_titleShadowColorForState___int]
  711. XMLVM_NOT_IMPLEMENTED();
  712. //XMLVM_END_WRAPPER
  713. }
  714. JAVA_OBJECT org_xmlvm_iphone_UIButton_getCurrentTitleShadowColor__(JAVA_OBJECT me)
  715. {
  716. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_getCurrentTitleShadowColor__]
  717. XMLVM_NOT_IMPLEMENTED();
  718. //XMLVM_END_WRAPPER
  719. }
  720. void org_xmlvm_iphone_UIButton_setImage___org_xmlvm_iphone_UIImage_int(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_INT n2)
  721. {
  722. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setImage___org_xmlvm_iphone_UIImage_int]
  723. XMLVM_NOT_IMPLEMENTED();
  724. //XMLVM_END_WRAPPER
  725. }
  726. JAVA_OBJECT org_xmlvm_iphone_UIButton_imageForState___int(JAVA_OBJECT me, JAVA_INT n1)
  727. {
  728. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_imageForState___int]
  729. XMLVM_NOT_IMPLEMENTED();
  730. //XMLVM_END_WRAPPER
  731. }
  732. JAVA_OBJECT org_xmlvm_iphone_UIButton_getCurrentImage__(JAVA_OBJECT me)
  733. {
  734. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_getCurrentImage__]
  735. XMLVM_NOT_IMPLEMENTED();
  736. //XMLVM_END_WRAPPER
  737. }
  738. void org_xmlvm_iphone_UIButton_setBackgroundImage___org_xmlvm_iphone_UIImage_int(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_INT n2)
  739. {
  740. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setBackgroundImage___org_xmlvm_iphone_UIImage_int]
  741. XMLVM_NOT_IMPLEMENTED();
  742. //XMLVM_END_WRAPPER
  743. }
  744. JAVA_OBJECT org_xmlvm_iphone_UIButton_backgroundImageForState___int(JAVA_OBJECT me, JAVA_INT n1)
  745. {
  746. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_backgroundImageForState___int]
  747. XMLVM_NOT_IMPLEMENTED();
  748. //XMLVM_END_WRAPPER
  749. }
  750. JAVA_OBJECT org_xmlvm_iphone_UIButton_getCurrentBackgroundImage__(JAVA_OBJECT me)
  751. {
  752. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_getCurrentBackgroundImage__]
  753. XMLVM_NOT_IMPLEMENTED();
  754. //XMLVM_END_WRAPPER
  755. }
  756. void org_xmlvm_iphone_UIButton_setTitleShadowOffset___org_xmlvm_iphone_CGSize(JAVA_OBJECT me, JAVA_OBJECT n1)
  757. {
  758. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setTitleShadowOffset___org_xmlvm_iphone_CGSize]
  759. XMLVM_NOT_IMPLEMENTED();
  760. //XMLVM_END_WRAPPER
  761. }
  762. JAVA_OBJECT org_xmlvm_iphone_UIButton_getTitleShadowOffset__(JAVA_OBJECT me)
  763. {
  764. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_getTitleShadowOffset__]
  765. XMLVM_NOT_IMPLEMENTED();
  766. //XMLVM_END_WRAPPER
  767. }
  768. void org_xmlvm_iphone_UIButton_touchesBegan___java_util_Set_org_xmlvm_iphone_UIEvent(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_OBJECT n2)
  769. {
  770. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_touchesBegan___java_util_Set_org_xmlvm_iphone_UIEvent]
  771. XMLVM_NOT_IMPLEMENTED();
  772. //XMLVM_END_WRAPPER
  773. }
  774. void org_xmlvm_iphone_UIButton_touchesEnded___java_util_Set_org_xmlvm_iphone_UIEvent(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_OBJECT n2)
  775. {
  776. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_touchesEnded___java_util_Set_org_xmlvm_iphone_UIEvent]
  777. XMLVM_NOT_IMPLEMENTED();
  778. //XMLVM_END_WRAPPER
  779. }
  780. void org_xmlvm_iphone_UIButton_setAlpha___float(JAVA_OBJECT me, JAVA_FLOAT n1)
  781. {
  782. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setAlpha___float]
  783. XMLVM_VAR_IOS(UIButton, button, me);
  784. [button setAlpha:n1];
  785. //XMLVM_END_WRAPPER
  786. }
  787. JAVA_BOOLEAN org_xmlvm_iphone_UIButton_isAdjustsImageWhenDisabled__(JAVA_OBJECT me)
  788. {
  789. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_isAdjustsImageWhenDisabled__]
  790. XMLVM_NOT_IMPLEMENTED();
  791. //XMLVM_END_WRAPPER
  792. }
  793. void org_xmlvm_iphone_UIButton_setAdjustsImageWhenDisabled___boolean(JAVA_OBJECT me, JAVA_BOOLEAN n1)
  794. {
  795. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setAdjustsImageWhenDisabled___boolean]
  796. XMLVM_NOT_IMPLEMENTED();
  797. //XMLVM_END_WRAPPER
  798. }
  799. JAVA_BOOLEAN org_xmlvm_iphone_UIButton_isAdjustsImageWhenHighlighted__(JAVA_OBJECT me)
  800. {
  801. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_isAdjustsImageWhenHighlighted__]
  802. XMLVM_NOT_IMPLEMENTED();
  803. //XMLVM_END_WRAPPER
  804. }
  805. void org_xmlvm_iphone_UIButton_setAdjustsImageWhenHighlighted___boolean(JAVA_OBJECT me, JAVA_BOOLEAN n1)
  806. {
  807. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setAdjustsImageWhenHighlighted___boolean]
  808. XMLVM_NOT_IMPLEMENTED();
  809. //XMLVM_END_WRAPPER
  810. }
  811. JAVA_BOOLEAN org_xmlvm_iphone_UIButton_isShowsTouchWhenHighlighted__(JAVA_OBJECT me)
  812. {
  813. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_isShowsTouchWhenHighlighted__]
  814. XMLVM_NOT_IMPLEMENTED();
  815. //XMLVM_END_WRAPPER
  816. }
  817. void org_xmlvm_iphone_UIButton_setShowsTouchWhenHighlighted___boolean(JAVA_OBJECT me, JAVA_BOOLEAN n1)
  818. {
  819. //XMLVM_BEGIN_WRAPPER[org_xmlvm_iphone_UIButton_setShowsTouchWhenHighlighted___boolean]
  820. XMLVM_NOT_IMPLEMENTED();
  821. //XMLVM_END_WRAPPER
  822. }