eiffel-iup.h 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543
  1. // The MIT License (MIT)
  2. // Copyright (c) 2016, 2017, 2019, 2020 by German A. Arias
  3. // Permission is hereby granted, free of charge, to any person obtaining a copy
  4. // of this software and associated documentation files (the "Software"), to deal
  5. // in the Software without restriction, including without limitation the rights
  6. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. // copies of the Software, and to permit persons to whom the Software is
  8. // furnished to do so, subject to the following conditions:
  9. //
  10. // The above copyright notice and this permission notice shall be included in
  11. // all copies or substantial portions of the Software.
  12. //
  13. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  19. // SOFTWARE.
  20. // IUP
  21. #include <stdlib.h>
  22. #include <iup/iup.h>
  23. #include <iup/iupkey.h>
  24. #include <iup/iup_config.h>
  25. #include <iup/iupcontrols.h>
  26. // For IM
  27. #include <im/im.h>
  28. #include <im/im_image.h>
  29. #include <iup/iupim.h>
  30. // For CD
  31. #include <cd/cd.h>
  32. #include <cd/wd.h>
  33. #include <cd/cdiup.h>
  34. #include <cd/cdim.h>
  35. #ifndef _library_eiffel_iup_h
  36. # define _library_eiffel_iup_h
  37. # if defined(_MSC_VER) && (_MSC_VER >= 1020)
  38. # pragma once
  39. # endif
  40. EIF_OBJECT obj = NULL;
  41. EIF_PROC help_cb_Fn,
  42. // Common callback
  43. idle_action_Fidle,
  44. // Common callbacks
  45. map_cb_Fn,
  46. unmap_cb_Fn,
  47. destroy_cb_Fn,
  48. ldestroy_cb_Fn,
  49. getfocus_cb_Fn,
  50. killfocus_cb_Fn,
  51. enterwindow_cb_Fn,
  52. leavewindow_cb_Fn,
  53. action_Fn,
  54. // Common callback
  55. k_any_Fni,
  56. // Dialog and progress d
  57. close_cb_Fn,
  58. copydata_cb_Fnsi,
  59. dropfiles_cb_Fnsiii,
  60. mdiactivate_cb_Fn,
  61. move_cb_Fnii,
  62. resize_cb_Fnii,
  63. show_cb_Fni,
  64. trayclick_cb_Fniii,
  65. // File dialog callback
  66. file_cb_Fnss,
  67. // Color dialog callback
  68. colorupdate_cb_Fn,
  69. // Progress dialog callb
  70. cancel_cb_Fn,
  71. // Tabs callback
  72. tabchange_cb_Fnnn,
  73. tabchangepos_cb_Fnii,
  74. tabclose_cb_Fni,
  75. rightclick_cb_Fni,
  76. // DetachedBox callback
  77. detached_cb_Fnnii,
  78. restored_cb_Fnnii,
  79. // Expander callback
  80. openclose_cb_Fni,
  81. extrabutton_cb_Fnii,
  82. // Split callback
  83. valuechanged_cb_Fn,
  84. // Button callback
  85. button_cb_Fniiiis,
  86. // Canvas callback
  87. action_Fnff,
  88. focus_cb_Fni,
  89. motion_cb_Fniis,
  90. keypress_cb_Fnii,
  91. scroll_cb_Fniff,
  92. wheel_cb_Fndiis,
  93. // Link callback
  94. click_cb_Fns,
  95. // List callbacks
  96. action_Fnsii,
  97. caret_cb_Fniii,
  98. dblclick_cb_Fnis,
  99. dragdrop_cb_Fniiii,
  100. dropdown_cb_Fni,
  101. edit_cb_Fnis,
  102. multiselect_cb_Fns,
  103. // Spin callback
  104. spin_cb_Fni,
  105. // Callback for text
  106. action_Fnis,
  107. // Callback for toggle
  108. action_Fni,
  109. // Callbacks for tree
  110. selection_cb_Fnii,
  111. multiselection_cb_Fnpi,
  112. multiunselection_cb_Fnpi,
  113. branchopen_cb_Fni,
  114. branchclose_cb_Fni,
  115. executeleaf_cb_Fni,
  116. showrename_cb_Fni,
  117. rename_cb_Fnis,
  118. noderemoved_cb_Fns,
  119. togglevalue_cb_Fnii,
  120. // Callbacks for menu
  121. highlight_cb_Fn,
  122. open_cb_Fn,
  123. menuclose_cb_Fn,
  124. // Drag & Drop callbacks
  125. dragbegin_cb_Fnii,
  126. dragdatasize_cb_Fns,
  127. dragdata_cb_FnsVi,
  128. dragend_cb_Fni,
  129. dropdata_cb_FnsViii,
  130. dropmotion_cb_Fniis,
  131. // Menu recent files
  132. recent_cb_Fn,
  133. // Get Param
  134. param_cb_FniV,
  135. // Flat button
  136. flat_action_Fn,
  137. flat_button_cb_Fniiiis,
  138. flat_focus_cb_Fni,
  139. flat_enterwindow_cb_Fn,
  140. flat_leavewindow_cb_Fn,
  141. // Cells
  142. draw_cb_Fniiiiiic,
  143. height_cb_Fni,
  144. hspan_cb_Fnii,
  145. mouseclick_cb_Fniiiiiis,
  146. mousemotion_cb_Fniiiis,
  147. ncols_cb_Fn,
  148. nlines_cb_Fn,
  149. scrolling_cb_Fnii,
  150. vspan_cb_Fnii,
  151. width_cb_Fni,
  152. // Color bar
  153. cell_cb_Fni,
  154. extended_cb_Fni,
  155. select_cb_Fnii,
  156. switch_cb_Fnii,
  157. // Matrix
  158. action_Fniiiis,
  159. click_cb_Fniis,
  160. colresize_cb_Fni,
  161. release_cb_Fniis,
  162. resizematrix_cb_Fnii,
  163. mousemove_cb_Fnii,
  164. enteritem_cb_Fnii,
  165. leaveitem_cb_Fnii,
  166. scrolltop_cb_Fnii,
  167. bgcolor_cb_FniiVVV,
  168. fgcolor_cb_FniiVVV,
  169. // font_cb_Fnii,
  170. // type_cb_Fnii,
  171. dropcheck_cb_Fnii,
  172. // translatevalue_cb_Fniis,
  173. togglevalue_cb_Fniii,
  174. drop_cb_Fnnii,
  175. menudrop_cb_Fnnii,
  176. dropselect_cb_Fniinsii,
  177. edition_cb_Fniiii,
  178. // value_cb_Fnii,
  179. value_edit_cb_Fniis,
  180. mark_cb_Fnii,
  181. markedit_cb_Fniii,
  182. // Flat tabs
  183. flat_motion_cb_Fniis,
  184. // Drop button
  185. flat_dropshow_cb_Fni,
  186. // Dial
  187. button_press_cb_Fnd,
  188. button_release_cb_Fnd,
  189. mousemove_cb_Fnd,
  190. // Color browser
  191. change_cb_FnVVV,
  192. drag_cb_FnVVV,
  193. font_cb_Fnii,
  194. type_cb_Fnii,
  195. translatevalue_cb_Fniis,
  196. value_cb_Fnii;
  197. // Convert const char* to char*
  198. char* unconst_char (const char* s) {
  199. int i;
  200. char* res;
  201. if (s != NULL) {
  202. for (i = 0; s[i] != '\0'; i++) {
  203. res[i] = s[i];
  204. }
  205. res[i] = '\0';
  206. }
  207. return res;
  208. }
  209. void set_callbacks (EIF_REFERENCE iup_obj,
  210. EIF_PROC launch_help_cb_fn, EIF_PROC launch_idle_action_fidle, EIF_PROC launch_map_cb_fn,
  211. EIF_PROC launch_unmap_cb_fn, EIF_PROC launch_destroy_cb_fn, EIF_PROC launch_ldestroy_cb_fn,
  212. EIF_PROC launch_getfocus_cb_fn, EIF_PROC launch_killfocus_cb_fn, EIF_PROC launch_enterwindow_cb_fn,
  213. EIF_PROC launch_leavewindow_cb_fn, EIF_PROC launch_action_fn, EIF_PROC launch_k_any_fni,
  214. EIF_PROC launch_close_cb_fn, EIF_PROC launch_copydata_cb_fnsi, EIF_PROC launch_dropfiles_cb_fnsiii,
  215. EIF_PROC launch_mdiactivate_cb_fn, EIF_PROC launch_move_cb_fnii, EIF_PROC launch_resize_cb_fnii,
  216. EIF_PROC launch_show_cb_fni, EIF_PROC launch_trayclick_cb_fniii, EIF_PROC launch_file_cb_fnss,
  217. EIF_PROC launch_colorupdate_cb_fn, EIF_PROC launch_cancel_cb_fn, EIF_PROC launch_tabchange_cb_fnnn,
  218. EIF_PROC launch_tabchangepos_cb_fnii, EIF_PROC launch_tabclose_cb_fni, EIF_PROC launch_rightclick_cb_fni,
  219. EIF_PROC launch_detached_cb_fnnii, EIF_PROC launch_restored_cb_fnnii, EIF_PROC launch_openclose_cb_fni,
  220. EIF_PROC launch_extrabutton_cb_fnii, EIF_PROC launch_valuechanged_cb_fn, EIF_PROC launch_button_cb_fniiiis,
  221. EIF_PROC launch_action_fnff, EIF_PROC launch_focus_cb_fni, EIF_PROC launch_motion_cb_fniis, EIF_PROC launch_keypress_cb_fnii,
  222. EIF_PROC launch_scroll_cb_fniff, EIF_PROC launch_wheel_cb_fndiis, EIF_PROC launch_click_cb_fns,
  223. EIF_PROC launch_action_fnsii, EIF_PROC launch_caret_cb_fniii, EIF_PROC launch_dblclick_cb_fnis,
  224. EIF_PROC launch_dragdrop_cb_fniiii, EIF_PROC launch_dropdown_cb_fni, EIF_PROC launch_edit_cb_fnis,
  225. EIF_PROC launch_multiselect_cb_fns, EIF_PROC launch_spin_cb_fni, EIF_PROC launch_action_fnis,
  226. EIF_PROC launch_action_fni, EIF_PROC launch_selection_cb_fnii, EIF_PROC launch_multiselection_cb_fnpi,
  227. EIF_PROC launch_multiunselection_cb_fnpi, EIF_PROC launch_branchopen_cb_fni, EIF_PROC launch_branchclose_cb_fni,
  228. EIF_PROC launch_executeleaf_cb_fni, EIF_PROC launch_showrename_cb_fni, EIF_PROC launch_rename_cb_fnis,
  229. EIF_PROC launch_noderemoved_cb_fns, EIF_PROC launch_togglevalue_cb_fnii, EIF_PROC launch_highlight_cb_fn,
  230. EIF_PROC launch_open_cb_fn, EIF_PROC launch_menuclose_cb_fn, EIF_PROC launch_dragbegin_cb_fnii,
  231. EIF_PROC launch_dragdatasize_cb_fns, EIF_PROC launch_dragdata_cb_fnsvi, EIF_PROC launch_dragend_cb_fni,
  232. EIF_PROC launch_dropdata_cb_fnsviii, EIF_PROC launch_dropmotion_cb_fniis, EIF_PROC launch_recent_cb_fn,
  233. EIF_PROC launch_param_cb_fniv, EIF_PROC launch_flat_action_fn, EIF_PROC launch_flat_button_cb_fniiiis,
  234. EIF_PROC launch_flat_focus_cb_fni, EIF_PROC launch_flat_enterwindow_cb_fn, EIF_PROC launch_flat_leavewindow_cb_fn,
  235. EIF_PROC launch_draw_cb_fniiiiiic, EIF_PROC launch_height_cb_fni, EIF_PROC launch_hspan_cb_fnii,
  236. EIF_PROC launch_mouseclick_cb_fniiiiiis, EIF_PROC launch_mousemotion_cb_fniiiis, EIF_PROC launch_ncols_cb_fn,
  237. EIF_PROC launch_nlines_cb_fn, EIF_PROC launch_scrolling_cb_fnii, EIF_PROC launch_vspan_cb_fnii,
  238. EIF_PROC launch_width_cb_fni, EIF_PROC launch_cell_fni, EIF_PROC launch_extended_fni,
  239. EIF_PROC launch_select_fnii, EIF_PROC launch_switch_fnii, EIF_PROC launch_action_fniiiis,
  240. EIF_PROC launch_click_fniis, EIF_PROC launch_colresize_fni, EIF_PROC launch_release_fniis,
  241. EIF_PROC launch_resizematrix_fnii, EIF_PROC launch_mousemove_fnii, EIF_PROC launch_enteritem_fnii,
  242. EIF_PROC launch_leaveitem_fnii, EIF_PROC launch_scrolltop_fnii, EIF_PROC launch_bgcolor_fniivvv,
  243. EIF_PROC launch_fgcolor_fniivvv, EIF_PROC launch_font_fnii, EIF_PROC launch_type_fnii,
  244. EIF_PROC launch_dropcheck_fnii, EIF_PROC launch_translatevalue_fniis, EIF_PROC launch_togglevalue_fniii,
  245. EIF_PROC launch_drop_fnnii, EIF_PROC launch_menudrop_fnnii, EIF_PROC launch_dropselect_fniinsii,
  246. EIF_PROC launch_edition_fniiii, EIF_PROC launch_value_fnii, EIF_PROC launch_value_edit_fniis,
  247. EIF_PROC launch_mark_fnii, EIF_PROC launch_markedit_fniii, EIF_PROC launch_flat_motion_cb_fniis,
  248. EIF_PROC launch_dropshow_cb_fni, EIF_PROC launch_button_press_cb_fnd, EIF_PROC launch_button_release_cb_fnd,
  249. EIF_PROC launch_mousemove_cb_fnd, EIF_PROC launch_change_cb_fnvvv, EIF_PROC launch_drag_cb_fnvvv)
  250. {
  251. if (obj != NULL)
  252. { eif_wean (obj); }
  253. obj = eif_protect (iup_obj);
  254. //Commoncallback
  255. help_cb_Fn = launch_help_cb_fn;
  256. //Commoncallback
  257. idle_action_Fidle = launch_idle_action_fidle;
  258. //Commoncallbacks
  259. map_cb_Fn = launch_map_cb_fn;
  260. unmap_cb_Fn = launch_unmap_cb_fn;
  261. destroy_cb_Fn = launch_destroy_cb_fn;
  262. ldestroy_cb_Fn = launch_ldestroy_cb_fn;
  263. getfocus_cb_Fn = launch_getfocus_cb_fn;
  264. killfocus_cb_Fn = launch_killfocus_cb_fn;
  265. enterwindow_cb_Fn = launch_enterwindow_cb_fn;
  266. leavewindow_cb_Fn = launch_leavewindow_cb_fn;
  267. action_Fn = launch_action_fn;
  268. //Commoncallback
  269. k_any_Fni = launch_k_any_fni;
  270. //Dialogandprogressdialogcallback
  271. close_cb_Fn = launch_close_cb_fn;
  272. copydata_cb_Fnsi = launch_copydata_cb_fnsi;
  273. dropfiles_cb_Fnsiii = launch_dropfiles_cb_fnsiii;
  274. mdiactivate_cb_Fn = launch_mdiactivate_cb_fn;
  275. move_cb_Fnii = launch_move_cb_fnii;
  276. resize_cb_Fnii = launch_resize_cb_fnii;
  277. show_cb_Fni = launch_show_cb_fni;
  278. trayclick_cb_Fniii = launch_trayclick_cb_fniii;
  279. //Filedialogcallback
  280. file_cb_Fnss = launch_file_cb_fnss;
  281. //Colordialogcallback
  282. colorupdate_cb_Fn = launch_colorupdate_cb_fn;
  283. //Progressdialogcallback
  284. cancel_cb_Fn = launch_cancel_cb_fn;
  285. //Tabscallback
  286. tabchange_cb_Fnnn = launch_tabchange_cb_fnnn;
  287. tabchangepos_cb_Fnii = launch_tabchangepos_cb_fnii;
  288. tabclose_cb_Fni = launch_tabclose_cb_fni;
  289. rightclick_cb_Fni = launch_rightclick_cb_fni;
  290. //DetachedBoxcallback
  291. detached_cb_Fnnii = launch_detached_cb_fnnii;
  292. restored_cb_Fnnii = launch_restored_cb_fnnii;
  293. //Expandercallback
  294. openclose_cb_Fni = launch_openclose_cb_fni;
  295. extrabutton_cb_Fnii = launch_extrabutton_cb_fnii;
  296. //Splitcallback
  297. valuechanged_cb_Fn = launch_valuechanged_cb_fn;
  298. //Buttoncallback
  299. button_cb_Fniiiis = launch_button_cb_fniiiis;
  300. //Canvascallback
  301. action_Fnff = launch_action_fnff;
  302. focus_cb_Fni = launch_focus_cb_fni;
  303. motion_cb_Fniis = launch_motion_cb_fniis;
  304. keypress_cb_Fnii = launch_keypress_cb_fnii;
  305. scroll_cb_Fniff = launch_scroll_cb_fniff;
  306. wheel_cb_Fndiis = launch_wheel_cb_fndiis;
  307. //Linkcallback
  308. click_cb_Fns = launch_click_cb_fns;
  309. //Listcallbacks
  310. action_Fnsii = launch_action_fnsii;
  311. caret_cb_Fniii = launch_caret_cb_fniii;
  312. dblclick_cb_Fnis = launch_dblclick_cb_fnis;
  313. dragdrop_cb_Fniiii = launch_dragdrop_cb_fniiii;
  314. dropdown_cb_Fni = launch_dropdown_cb_fni;
  315. edit_cb_Fnis = launch_edit_cb_fnis;
  316. multiselect_cb_Fns = launch_multiselect_cb_fns;
  317. //Spincallback
  318. spin_cb_Fni = launch_spin_cb_fni;
  319. //Callbackfortext
  320. action_Fnis = launch_action_fnis;
  321. //Callbackfortoggle
  322. action_Fni = launch_action_fni;
  323. //Callbacksfortree
  324. selection_cb_Fnii = launch_selection_cb_fnii;
  325. multiselection_cb_Fnpi = launch_multiselection_cb_fnpi;
  326. multiunselection_cb_Fnpi = launch_multiunselection_cb_fnpi;
  327. branchopen_cb_Fni = launch_branchopen_cb_fni;
  328. branchclose_cb_Fni = launch_branchclose_cb_fni;
  329. executeleaf_cb_Fni = launch_executeleaf_cb_fni;
  330. showrename_cb_Fni = launch_showrename_cb_fni;
  331. rename_cb_Fnis = launch_rename_cb_fnis;
  332. noderemoved_cb_Fns = launch_noderemoved_cb_fns;
  333. togglevalue_cb_Fnii = launch_togglevalue_cb_fnii;
  334. //Callbacksformenuitem
  335. highlight_cb_Fn = launch_highlight_cb_fn;
  336. open_cb_Fn = launch_open_cb_fn;
  337. menuclose_cb_Fn = launch_menuclose_cb_fn;
  338. //Drag&Dropcallbacks
  339. dragbegin_cb_Fnii = launch_dragbegin_cb_fnii;
  340. dragdatasize_cb_Fns = launch_dragdatasize_cb_fns;
  341. dragdata_cb_FnsVi = launch_dragdata_cb_fnsvi;
  342. dragend_cb_Fni = launch_dragend_cb_fni;
  343. dropdata_cb_FnsViii = launch_dropdata_cb_fnsviii;
  344. dropmotion_cb_Fniis = launch_dropmotion_cb_fniis;
  345. //Menurecentfiles
  346. recent_cb_Fn = launch_recent_cb_fn;
  347. //GetParam
  348. param_cb_FniV = launch_param_cb_fniv;
  349. //Flatbutton
  350. flat_action_Fn = launch_flat_action_fn;
  351. flat_button_cb_Fniiiis = launch_flat_button_cb_fniiiis;
  352. flat_focus_cb_Fni = launch_flat_focus_cb_fni;
  353. flat_enterwindow_cb_Fn = launch_flat_enterwindow_cb_fn;
  354. flat_leavewindow_cb_Fn = launch_flat_leavewindow_cb_fn;
  355. //Cells
  356. draw_cb_Fniiiiiic = launch_draw_cb_fniiiiiic;
  357. height_cb_Fni = launch_height_cb_fni;
  358. hspan_cb_Fnii = launch_hspan_cb_fnii;
  359. mouseclick_cb_Fniiiiiis = launch_mouseclick_cb_fniiiiiis;
  360. mousemotion_cb_Fniiiis = launch_mousemotion_cb_fniiiis;
  361. ncols_cb_Fn = launch_ncols_cb_fn;
  362. nlines_cb_Fn = launch_nlines_cb_fn;
  363. scrolling_cb_Fnii = launch_scrolling_cb_fnii;
  364. vspan_cb_Fnii = launch_vspan_cb_fnii;
  365. width_cb_Fni = launch_width_cb_fni;
  366. //Colorbar
  367. cell_cb_Fni = launch_cell_fni;
  368. extended_cb_Fni = launch_extended_fni;
  369. select_cb_Fnii = launch_select_fnii;
  370. switch_cb_Fnii = launch_switch_fnii;
  371. //Matrix
  372. action_Fniiiis = launch_action_fniiiis;
  373. click_cb_Fniis = launch_click_fniis;
  374. colresize_cb_Fni = launch_colresize_fni;
  375. release_cb_Fniis = launch_release_fniis;
  376. resizematrix_cb_Fnii = launch_resizematrix_fnii;
  377. mousemove_cb_Fnii = launch_mousemove_fnii;
  378. enteritem_cb_Fnii = launch_enteritem_fnii;
  379. leaveitem_cb_Fnii = launch_leaveitem_fnii;
  380. scrolltop_cb_Fnii = launch_scrolltop_fnii;
  381. bgcolor_cb_FniiVVV = launch_bgcolor_fniivvv;
  382. fgcolor_cb_FniiVVV = launch_fgcolor_fniivvv;
  383. font_cb_Fnii = launch_font_fnii;
  384. type_cb_Fnii = launch_type_fnii;
  385. dropcheck_cb_Fnii = launch_dropcheck_fnii;
  386. translatevalue_cb_Fniis = launch_translatevalue_fniis;
  387. togglevalue_cb_Fniii = launch_togglevalue_fniii;
  388. drop_cb_Fnnii = launch_drop_fnnii;
  389. menudrop_cb_Fnnii = launch_menudrop_fnnii;
  390. dropselect_cb_Fniinsii = launch_dropselect_fniinsii;
  391. edition_cb_Fniiii = launch_edition_fniiii;
  392. value_cb_Fnii = launch_value_fnii;
  393. value_edit_cb_Fniis = launch_value_edit_fniis;
  394. mark_cb_Fnii = launch_mark_fnii;
  395. markedit_cb_Fniii = launch_markedit_fniii;
  396. //Flattabs
  397. flat_motion_cb_Fniis = launch_flat_motion_cb_fniis;
  398. //Dropbutton
  399. flat_dropshow_cb_Fni = launch_dropshow_cb_fni;
  400. //Dial
  401. button_press_cb_Fnd = launch_button_press_cb_fnd;
  402. button_release_cb_Fnd = launch_button_release_cb_fnd;
  403. mousemove_cb_Fnd = launch_mousemove_cb_fnd;
  404. //Colorbrowser
  405. change_cb_FnVVV = launch_change_cb_fnvvv;
  406. drag_cb_FnVVV = launch_drag_cb_fnvvv;
  407. }
  408. int param_action(Ihandle* dialog, int param_index, void* user_data) {
  409. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_POINTER)) param_cb_FniV) (eif_access (obj), dialog, param_index, user_data);
  410. }
  411. int get_param_dialog (const char* title, void* user_data, const char* format, int param_count, int param_extra, void** param_data) {
  412. return IupGetParamv(title, param_action, user_data, format, param_count, param_extra, param_data);
  413. }
  414. // One function for each type of event
  415. // Common callbacks
  416. int callback_idle_action(void) {
  417. return ((int (*) (EIF_REFERENCE)) idle_action_Fidle) (eif_access (obj));
  418. }
  419. void callback_help_cb(Ihandle *ih) {
  420. ((void(*) (EIF_REFERENCE, EIF_POINTER)) help_cb_Fn) (eif_access (obj), ih);
  421. }
  422. int callback_map_cb(Ihandle *ih) {
  423. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) map_cb_Fn) (eif_access (obj), ih);
  424. }
  425. int callback_unmap_cb(Ihandle *ih) {
  426. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) unmap_cb_Fn) (eif_access (obj), ih);
  427. }
  428. int callback_destroy_cb(Ihandle *ih) {
  429. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) destroy_cb_Fn) (eif_access (obj), ih);
  430. }
  431. int callback_ldestroy_cb(Ihandle *ih) {
  432. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) ldestroy_cb_Fn) (eif_access (obj), ih);
  433. }
  434. int callback_getfocus_cb(Ihandle *ih) {
  435. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) getfocus_cb_Fn) (eif_access (obj), ih);
  436. }
  437. int callback_killfocus_cb(Ihandle *ih) {
  438. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) killfocus_cb_Fn) (eif_access (obj), ih);
  439. }
  440. int callback_enterwindow_cb(Ihandle *ih) {
  441. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) enterwindow_cb_Fn) (eif_access (obj), ih);
  442. }
  443. int callback_leavewindow_cb(Ihandle *ih) {
  444. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) leavewindow_cb_Fn) (eif_access (obj), ih);
  445. }
  446. int callback_k_any(Ihandle *ih, int c) {
  447. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) k_any_Fni) (eif_access (obj), ih, c);
  448. }
  449. // Action callbacks
  450. int callback_action_Fn(Ihandle *ih) {
  451. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) action_Fn) (eif_access (obj), ih);
  452. }
  453. // Dialog and progress dialog callback
  454. int callback_close_cb(Ihandle *ih) {
  455. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) close_cb_Fn) (eif_access (obj), ih);
  456. }
  457. int callback_copydata_cb(Ihandle *ih, char* cmdLine, int size) {
  458. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32)) copydata_cb_Fnsi) (eif_access (obj), ih, cmdLine, size);
  459. }
  460. int callback_dropfiles_cb(Ihandle *ih, char* filename, int num, int x, int y) {
  461. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) dropfiles_cb_Fnsiii) (eif_access (obj), ih, filename, num, x, y);
  462. }
  463. int callback_mdiactivate_cb(Ihandle *ih) {
  464. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) mdiactivate_cb_Fn) (eif_access (obj), ih);
  465. }
  466. int callback_move_cb(Ihandle *ih, int x, int y) {
  467. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) move_cb_Fnii) (eif_access (obj), ih, x, y);
  468. }
  469. int callback_resize_cb(Ihandle *ih, int width, int height) {
  470. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) resize_cb_Fnii) (eif_access (obj), ih, width, height);
  471. }
  472. int callback_show_cb(Ihandle *ih, int state) {
  473. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) show_cb_Fni) (eif_access (obj), ih, state);
  474. }
  475. int callback_trayclick_cb(Ihandle *ih, int but, int pressed, int dclick) {
  476. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) trayclick_cb_Fniii) (eif_access (obj), ih, but, pressed, dclick);
  477. }
  478. // File dialog callback
  479. int callback_file_cb(Ihandle *ih, char* file_name, char* status) {
  480. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_POINTER)) file_cb_Fnss) (eif_access (obj), ih, file_name, status);
  481. }
  482. // Color dialog callback
  483. int callback_colorupdate_cb (Ihandle* ih) {
  484. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) colorupdate_cb_Fn) (eif_access (obj), ih);
  485. }
  486. // Progress dialog callback
  487. int callback_cancel_cb (Ihandle* ih) {
  488. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) cancel_cb_Fn) (eif_access (obj), ih);
  489. }
  490. /*
  491. // Get param dialog callback
  492. int callback_getparam(Ihandle* dialog, int param_index, void* user_data) {
  493. return getparam_FniV(iup_object(0), dialog, param_index, user_data);
  494. }
  495. */
  496. // Tabs callbacks
  497. int callback_tabchange_cb(Ihandle *ih, Ihandle* new_tab, Ihandle* old_tab) {
  498. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_POINTER)) tabchange_cb_Fnnn) (eif_access (obj), ih, new_tab, old_tab);
  499. }
  500. int callback_tabchangepos_cb(Ihandle *ih, int new_pos, int old_pos) {
  501. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) tabchangepos_cb_Fnii) (eif_access (obj), ih, new_pos, old_pos);
  502. }
  503. int callback_tabclose_cb(Ihandle *ih, int pos) {
  504. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) tabclose_cb_Fni) (eif_access (obj), ih, pos);
  505. }
  506. int callback_rightclick_cb(Ihandle *ih, int pos) {
  507. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) rightclick_cb_Fni) (eif_access (obj), ih, pos);
  508. }
  509. // Detach box callback
  510. int callback_detached_cb(Ihandle *ih, Ihandle *new_parent, int x, int y) {
  511. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) detached_cb_Fnnii) (eif_access (obj), ih, new_parent, x, y);
  512. }
  513. int callback_restored_cb(Ihandle *ih, Ihandle *old_parent, int x, int y) {
  514. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) restored_cb_Fnnii) (eif_access (obj), ih, old_parent, x, y);
  515. }
  516. // Expander callbacks
  517. int callback_openclose_cb(Ihandle *ih, int state) {
  518. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) openclose_cb_Fni) (eif_access (obj), ih, state);
  519. }
  520. int callback_extrabutton_cb(Ihandle *ih, Ihandle *new_parent, int button, int pressed) {
  521. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) extrabutton_cb_Fnii) (eif_access (obj), ih, new_parent, button, pressed);
  522. }
  523. // Val callback
  524. int callback_valuechanged_cb(Ihandle *ih) {
  525. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) valuechanged_cb_Fn) (eif_access (obj), ih); // Also matrix
  526. }
  527. // Button callback
  528. int callback_button_cb(Ihandle *ih, int button, int pressed, int x, int y, char* status) {
  529. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) button_cb_Fniiiis) (eif_access (obj), ih, button, pressed, x, y, status);
  530. }
  531. // Canvas callbacks
  532. int callback_action_Fnff(Ihandle *ih, float posx, float posy) {
  533. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_REAL_32, EIF_REAL_32)) action_Fnff) (eif_access (obj), ih, posx, posy);
  534. }
  535. // Also Dialog
  536. int callback_focus_cb(Ihandle *ih, int focus) {
  537. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) focus_cb_Fni) (eif_access (obj), ih, focus);
  538. }
  539. int callback_motion_cb(Ihandle *ih, int x, int y, char *status) {
  540. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) motion_cb_Fniis) (eif_access (obj), ih, x, y, status);
  541. }
  542. int callback_keypress_cb(Ihandle *ih, int c, int press) {
  543. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) keypress_cb_Fnii) (eif_access (obj), ih, c, press);
  544. }
  545. int callback_scroll_cb(Ihandle *ih, int op, float posx, float posy) {
  546. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_REAL_32, EIF_REAL_32)) scroll_cb_Fniff) (eif_access (obj), ih, op, posx, posy);
  547. }
  548. int callback_wheel_cb(Ihandle *ih, float delta, int x, int y, char *status) {
  549. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_REAL_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) wheel_cb_Fndiis) (eif_access (obj), ih, delta, x, y, status);
  550. }
  551. int callback_click_cb(Ihandle *ih, char *url) {
  552. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER)) click_cb_Fns) (eif_access (obj), ih, url);
  553. }
  554. // List callbacks
  555. int callback_action_Fnsii(Ihandle *ih, char *text, int item, int state) {
  556. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) action_Fnsii) (eif_access (obj), ih, text, item, state);
  557. }
  558. int callback_caret_cb(Ihandle *ih, int lin, int col, int pos) {
  559. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) caret_cb_Fniii) (eif_access (obj), ih, lin, col, pos);
  560. }
  561. int callback_dblclick_cb(Ihandle *ih, int item, char *text) {
  562. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_POINTER)) dblclick_cb_Fnis) (eif_access (obj), ih, item, text);
  563. }
  564. int callback_dragdrop_cb(Ihandle *ih, int drag_id, int drop_id, int isshift, int iscontrol) {
  565. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) dragdrop_cb_Fniiii) (eif_access (obj), ih, drag_id, drop_id, isshift, iscontrol);
  566. }
  567. int callback_dropdown_cb(Ihandle *ih, int state) {
  568. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) dropdown_cb_Fni) (eif_access (obj), ih, state);
  569. }
  570. int callback_edit_cb(Ihandle *ih, int c, char *new_value) {
  571. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_POINTER)) edit_cb_Fnis) (eif_access (obj), ih, c, new_value);
  572. }
  573. int callback_multiselect_cb(Ihandle *ih, char *value) {
  574. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER)) multiselect_cb_Fns) (eif_access (obj), ih, value);
  575. }
  576. // Spin callback
  577. int callback_spin_cb(Ihandle *ih, int inc) {
  578. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) spin_cb_Fni) (eif_access (obj), ih, inc);
  579. }
  580. // Text callback
  581. int callback_action_Fnis(Ihandle *ih, int c, char *new_value) {
  582. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_POINTER)) action_Fnis) (eif_access (obj), ih, c, new_value);
  583. }
  584. // Toggle callback
  585. int callback_action_Fni(Ihandle* ih, int state) {
  586. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) action_Fni) (eif_access (obj), ih, state);
  587. }
  588. // Tree callbacks
  589. int callback_selection_cb (Ihandle *ih, int id, int status) {
  590. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) selection_cb_Fnii) (eif_access (obj), ih, id, status);
  591. }
  592. int callback_multiselection_cb (Ihandle *ih, int* ids, int n) {
  593. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32)) multiselection_cb_Fnpi) (eif_access (obj), ih, ids, n);
  594. }
  595. int callback_multiunselection_cb (Ihandle *ih, int* ids, int n) {
  596. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32)) multiunselection_cb_Fnpi) (eif_access (obj), ih, ids, n);
  597. }
  598. int callback_branchopen_cb (Ihandle *ih, int id) {
  599. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) branchopen_cb_Fni) (eif_access (obj), ih, id);
  600. }
  601. int callback_branchclose_cb (Ihandle *ih, int id) {
  602. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) branchclose_cb_Fni) (eif_access (obj), ih, id);
  603. }
  604. int callback_executeleaf_cb (Ihandle *ih, int id) {
  605. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) executeleaf_cb_Fni) (eif_access (obj), ih, id);
  606. }
  607. int callback_showrename_cb (Ihandle *ih, int id) {
  608. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) showrename_cb_Fni) (eif_access (obj), ih, id);
  609. }
  610. int callback_rename_cb (Ihandle *ih, int id, char *title) {
  611. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_POINTER)) rename_cb_Fnis) (eif_access (obj), ih, id, title);
  612. }
  613. int callback_noderemoved_cb (Ihandle *ih, void* userdata) {
  614. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER)) noderemoved_cb_Fns) (eif_access (obj), ih, userdata);
  615. }
  616. int callback_togglevalue_cb_Fnii (Ihandle *ih, int id, int state) {
  617. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) togglevalue_cb_Fnii) (eif_access (obj), ih, id, state);
  618. }
  619. // Menu callbacks
  620. int callback_highlight_cb (Ihandle *ih) {
  621. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) highlight_cb_Fn) (eif_access (obj), ih);
  622. }
  623. int callback_open_cb (Ihandle *ih) {
  624. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) open_cb_Fn) (eif_access (obj), ih);
  625. }
  626. int callback_menuclose_cb (Ihandle *ih) {
  627. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) menuclose_cb_Fn) (eif_access (obj), ih);
  628. }
  629. // Drag&Drop callbacks
  630. int callback_dragbegin_cb (Ihandle* ih, int x, int y) {
  631. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) dragbegin_cb_Fnii) (eif_access (obj), ih, x, y);
  632. }
  633. int callback_dragdatasize_cb (Ihandle* ih, char* type) {
  634. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER)) dragdatasize_cb_Fns) (eif_access (obj), ih, type);
  635. }
  636. int callback_dragdata_cb (Ihandle* ih, char* type, void* data, int size) {
  637. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32)) dragdata_cb_FnsVi) (eif_access (obj), ih, type, data, size);
  638. }
  639. int callback_dragend_cb (Ihandle* ih, int action) {
  640. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) dragend_cb_Fni) (eif_access (obj), ih, action);
  641. }
  642. int callback_dropdata_cb (Ihandle* ih, char* type, void* data, int size, int x, int y) {
  643. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) dropdata_cb_FnsViii) (eif_access (obj), ih, type, data, size, x, y);
  644. }
  645. int callback_dropmotion_cb (Ihandle *ih, int x, int y, char *status) {
  646. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) dropmotion_cb_Fniis) (eif_access (obj), ih, x, y, status);
  647. }
  648. // Menu recent files
  649. int callback_recent_cb (Ihandle *ih) {
  650. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) recent_cb_Fn) (eif_access (obj), ih);
  651. }
  652. void config_recent_init (Ihandle* ih, Ihandle* menu, int max_recent) {
  653. IupConfigRecentInit(ih, menu, (Icallback) callback_recent_cb, max_recent);
  654. }
  655. // Flat button
  656. int callback_flat_action_Fn(Ihandle *ih) {
  657. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) flat_action_Fn) (eif_access (obj), ih);
  658. }
  659. int callback_flat_button_cb(Ihandle *ih, int button, int pressed, int x, int y, char* status) {
  660. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) flat_button_cb_Fniiiis) (eif_access (obj), ih, button, pressed, x, y, status);
  661. }
  662. int callback_flat_focus_cb(Ihandle *ih, int focus) {
  663. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) flat_focus_cb_Fni) (eif_access (obj), ih, focus);
  664. }
  665. int callback_flat_enterwindow_cb(Ihandle *ih) {
  666. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) flat_enterwindow_cb_Fn) (eif_access (obj), ih);
  667. }
  668. int callback_flat_leavewindow_cb(Ihandle *ih) {
  669. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) flat_leavewindow_cb_Fn) (eif_access (obj), ih);
  670. }
  671. // Cells
  672. int callback_draw_cb(Ihandle* ih, int line, int column, int xmin, int xmax, int ymin, int ymax, cdCanvas* canvas) {
  673. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) draw_cb_Fniiiiiic) (eif_access (obj), ih, line, column, xmin, xmax, ymin, ymax, canvas);
  674. }
  675. int callback_height_cb(Ihandle* ih, int line) {
  676. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) height_cb_Fni) (eif_access (obj), ih, line);
  677. }
  678. int callback_hspan_cb(Ihandle* ih, int line, int column) {
  679. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) hspan_cb_Fnii) (eif_access (obj), ih, line, column);
  680. }
  681. int callback_mouseclick_cb(Ihandle* ih, int button, int pressed, int line, int column, int x, int y, char* status) {
  682. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) mouseclick_cb_Fniiiiiis) (eif_access (obj), ih, button, pressed, line, column, x, y, status);
  683. }
  684. int callback_mousemotion_cb(Ihandle *ih, int line, int column, int x, int y, char *r) {
  685. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) mousemotion_cb_Fniiiis) (eif_access (obj), ih, line, column, x, y, r);
  686. }
  687. int callback_ncols_cb(Ihandle* ih) {
  688. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) ncols_cb_Fn) (eif_access (obj), ih);
  689. }
  690. int callback_nlines_cb(Ihandle* ih) {
  691. return ((int (*) (EIF_REFERENCE, EIF_POINTER)) nlines_cb_Fn) (eif_access (obj), ih);
  692. }
  693. int callback_scrolling_cb(Ihandle* ih, int line, int column) {
  694. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) scrolling_cb_Fnii) (eif_access (obj), ih, line, column);
  695. }
  696. int callback_vspan_cb(Ihandle* ih, int line, int column) {
  697. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) vspan_cb_Fnii) (eif_access (obj), ih, line, column);
  698. }
  699. int callback_width_cb(Ihandle* ih, int column) {
  700. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) width_cb_Fni) (eif_access (obj), ih, column);
  701. }
  702. // Color bar
  703. char* callback_cell_cb(Ihandle* ih, int cell) {
  704. unsigned char r, g, b;
  705. long int cl;
  706. static char str[30];
  707. cl = ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) cell_cb_Fni) (eif_access (obj), ih, cell);
  708. if (cl == -1)
  709. {
  710. return NULL;
  711. }
  712. else
  713. {
  714. cdDecodeColor(cl, &r, &g, &b);
  715. sprintf(str, "%d %d %d", (int)r, (int)g, (int)b);
  716. return str;
  717. }
  718. }
  719. int callback_extended_cb(Ihandle* ih, int cell) {
  720. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) extended_cb_Fni) (eif_access (obj), ih, cell);
  721. }
  722. int callback_select_cb(Ihandle* ih, int cell, int type) {
  723. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) select_cb_Fnii) (eif_access (obj), ih, cell, type);
  724. }
  725. int callback_switch_cb(Ihandle* ih, int prim_cell, int sec_cell) {
  726. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) switch_cb_Fnii) (eif_access (obj), ih, prim_cell, sec_cell);
  727. }
  728. // Matrix
  729. int callback_action_Fniiiis(Ihandle *ih, int key, int lin, int col, int edition, char* value) {
  730. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) action_Fniiiis) (eif_access (obj), ih, key, lin, col, edition, value);
  731. }
  732. int callback_click_cb_Fniis (Ihandle *ih, int lin, int col, char *status) {
  733. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) click_cb_Fniis) (eif_access (obj), ih, lin, col, status);
  734. }
  735. int callback_colresize_cb (Ihandle *ih, int col) {
  736. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) colresize_cb_Fni) (eif_access (obj), ih, col);
  737. }
  738. int callback_release_cb (Ihandle *ih, int lin, int col, char *status) {
  739. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) release_cb_Fniis) (eif_access (obj), ih, lin, col, status);
  740. }
  741. int callback_resizematrix_cb (Ihandle *ih, int width, int height) {
  742. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) resizematrix_cb_Fnii) (eif_access (obj), ih, width, height);
  743. }
  744. int callback_mousemove_cb (Ihandle *ih, int lin, int col) {
  745. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) mousemove_cb_Fnii) (eif_access (obj), ih, lin, col);
  746. }
  747. int callback_enteritem_cb (Ihandle *ih, int lin, int col) {
  748. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) enteritem_cb_Fnii) (eif_access (obj), ih, lin, col);
  749. }
  750. int callback_leaveitem_cb (Ihandle *ih, int lin, int col) {
  751. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) leaveitem_cb_Fnii) (eif_access (obj), ih, lin, col);
  752. }
  753. int callback_scrolltop_cb (Ihandle *ih, int lin, int col) {
  754. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) scrolltop_cb_Fnii) (eif_access (obj), ih, lin, col);
  755. }
  756. int callback_bgcolor_cb (Ihandle *ih, int lin, int col, int *red, int *green, int *blue) {
  757. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER, EIF_POINTER, EIF_POINTER)) bgcolor_cb_FniiVVV) (eif_access (obj), ih, lin, col, red, green, blue);
  758. }
  759. int callback_fgcolor_cb (Ihandle *ih, int lin, int col, int *red, int *green, int *blue) {
  760. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER, EIF_POINTER, EIF_POINTER)) fgcolor_cb_FniiVVV) (eif_access (obj), ih, lin, col, red, green, blue);
  761. }
  762. char* callback_font_cb (Ihandle* ih, int lin, int col) {
  763. return ((char* (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) font_cb_Fnii) (eif_access (obj), ih, lin, col);
  764. }
  765. char* callback_type_cb (Ihandle* ih, int lin, int col) {
  766. return ((char* (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) type_cb_Fnii) (eif_access (obj), ih, lin, col);
  767. }
  768. int callback_dropcheck_cb (Ihandle *ih, int lin, int col) {
  769. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) dropcheck_cb_Fnii) (eif_access (obj), ih, lin, col);
  770. }
  771. char* callback_translatevalue_cb (Ihandle* ih, int lin, int col, char* value) {
  772. return ((char* (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) translatevalue_cb_Fniis) (eif_access (obj), ih, lin, col, value);
  773. }
  774. int callback_togglevalue_cb_Fniii (Ihandle *ih, int lin, int col, int status) {
  775. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) togglevalue_cb_Fniii) (eif_access (obj), ih, lin, col, status);
  776. }
  777. int callback_drop_cb (Ihandle *ih, Ihandle *drop, int lin, int col) {
  778. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) drop_cb_Fnnii) (eif_access (obj), ih, drop, lin, col);
  779. }
  780. int callback_menudrop_cb (Ihandle *ih, Ihandle *drop, int lin, int col) {
  781. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) menudrop_cb_Fnnii) (eif_access (obj), ih, drop, lin, col);
  782. }
  783. int callback_dropselect_cb (Ihandle *ih, int lin, int col, Ihandle *drop, char *t, int i, int v) {
  784. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) dropselect_cb_Fniinsii) (eif_access (obj), ih, lin, col, drop, t, i, v);
  785. }
  786. int callback_edition_cb (Ihandle *ih, int lin, int col, int mode, int update) {
  787. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) edition_cb_Fniiii) (eif_access (obj), ih, lin, col, mode, update);
  788. }
  789. char* callback_value_cb (Ihandle* ih, int lin, int col) {
  790. return ((char* (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) value_cb_Fnii) (eif_access (obj), ih, lin, col);
  791. }
  792. int callback_value_edit_cb (Ihandle *ih, int lin, int col, char* newval) {
  793. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) value_edit_cb_Fniis) (eif_access (obj), ih, lin, col, newval);
  794. }
  795. int callback_mark_cb (Ihandle* ih, int lin, int col) {
  796. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32)) mark_cb_Fnii) (eif_access (obj), ih, lin, col);
  797. }
  798. int callback_markedit_cb (Ihandle *ih, int lin, int col, int marked) {
  799. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) markedit_cb_Fniii) (eif_access (obj), ih, lin, col, marked);
  800. }
  801. // Flat tabs
  802. int callback_flat_motion_cb(Ihandle *ih, int x, int y, char *status) {
  803. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_POINTER)) flat_motion_cb_Fniis) (eif_access (obj), ih, x, y, status);
  804. }
  805. // Drop button
  806. int callback_flat_dropshow_cb (Ihandle *ih, int state) {
  807. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32)) flat_dropshow_cb_Fni) (eif_access (obj), ih, state);
  808. }
  809. // Dial
  810. int callback_button_press_cb (Ihandle *ih, double angle) {
  811. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_REAL_32)) button_press_cb_Fnd) (eif_access (obj), ih, angle);
  812. }
  813. int callback_button_release_cb (Ihandle *ih, double angle) {
  814. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_REAL_32)) button_release_cb_Fnd) (eif_access (obj), ih, angle);
  815. }
  816. int callback_mousemove_cb_Fnd (Ihandle *ih, double angle) {
  817. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_REAL_32)) mousemove_cb_Fnd) (eif_access (obj), ih, angle);
  818. }
  819. // Color browse
  820. int callback_change_cb (Ihandle *ih, unsigned char r, unsigned char g, unsigned char b) {
  821. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) change_cb_FnVVV) (eif_access (obj), ih, r, g, b);
  822. }
  823. int callback_drag_cb (Ihandle *ih, unsigned char r, unsigned char g, unsigned char b) {
  824. return ((int (*) (EIF_REFERENCE, EIF_POINTER, EIF_INTEGER_32, EIF_INTEGER_32, EIF_INTEGER_32)) drag_cb_FnVVV) (eif_access (obj), ih, r, g, b);
  825. }
  826. // Set callbacks
  827. void connect_function (const char *name, int operation) {
  828. if (strcmp("IDLE_ACTION",name) == 0)
  829. {
  830. if (operation == 1)
  831. {
  832. IupSetFunction(name, (Icallback) callback_idle_action);
  833. }
  834. else
  835. {
  836. IupSetFunction(name, NULL);
  837. }
  838. }
  839. else
  840. {
  841. printf("Unknown function.");
  842. }
  843. }
  844. void connect_callback (Ihandle* ih, const char *name, const char *type, int operation) {
  845. if (operation == 0)
  846. {
  847. IupSetCallback(ih, name, NULL);
  848. return;
  849. }
  850. if (strcmp("HELP_CB",name) == 0)
  851. {
  852. IupSetCallback(ih, name, (Icallback) callback_help_cb);
  853. }
  854. else if (strcmp("MAP_CB",name) == 0)
  855. {
  856. IupSetCallback(ih, name, (Icallback) callback_map_cb);
  857. }
  858. else if (strcmp("UNMAP_CB",name) == 0)
  859. {
  860. IupSetCallback(ih, name, (Icallback) callback_unmap_cb);
  861. }
  862. else if (strcmp("DESTROY_CB",name) == 0)
  863. {
  864. IupSetCallback(ih, name, (Icallback) callback_destroy_cb);
  865. }
  866. else if (strcmp("LDESTROY_CB",name) == 0)
  867. {
  868. IupSetCallback(ih, name, (Icallback) callback_ldestroy_cb);
  869. }
  870. else if (strcmp("GETFOCUS_CB",name) == 0)
  871. {
  872. IupSetCallback(ih, name, (Icallback) callback_getfocus_cb);
  873. }
  874. else if (strcmp("KILLFOCUS_CB",name) == 0)
  875. {
  876. IupSetCallback(ih, name, (Icallback) callback_killfocus_cb);
  877. }
  878. else if (strcmp("ENTERWINDOW_CB",name) == 0)
  879. {
  880. IupSetCallback(ih, name, (Icallback) callback_enterwindow_cb);
  881. }
  882. else if (strcmp("LEAVEWINDOW_CB",name) == 0)
  883. {
  884. IupSetCallback(ih, name, (Icallback) callback_leavewindow_cb);
  885. }
  886. else if (strcmp("K_ANY",name) == 0)
  887. {
  888. IupSetCallback(ih, name, (Icallback) callback_k_any);
  889. }
  890. else if (strcmp("ACTION",name) == 0)
  891. {
  892. if (strcmp("Fn", type) == 0)
  893. {
  894. IupSetCallback(ih, name, (Icallback) callback_action_Fn);
  895. }
  896. else if (strcmp("Fnff", type) == 0)
  897. {
  898. IupSetCallback(ih, name, (Icallback) callback_action_Fnff);
  899. }
  900. else if (strcmp("Fns", type) == 0)
  901. {
  902. IupSetCallback(ih, name, (Icallback) callback_click_cb);
  903. }
  904. else if (strcmp("Fnsii", type) == 0)
  905. {
  906. IupSetCallback(ih, name, (Icallback) callback_action_Fnsii);
  907. }
  908. else if (strcmp("Fnis", type) == 0)
  909. {
  910. IupSetCallback(ih, name, (Icallback) callback_action_Fnis);
  911. }
  912. else if (strcmp("Fni", type) == 0)
  913. {
  914. IupSetCallback(ih, name, (Icallback) callback_action_Fni);
  915. }
  916. }
  917. else if (strcmp("CLOSE_CB",name) == 0)
  918. {
  919. IupSetCallback(ih, name, (Icallback) callback_close_cb);
  920. }
  921. else if (strcmp("COPYDATA_CB",name) == 0)
  922. {
  923. IupSetCallback(ih, name, (Icallback) callback_copydata_cb);
  924. }
  925. else if (strcmp("DROPFILES_CB",name) == 0)
  926. {
  927. IupSetCallback(ih, name, (Icallback) callback_dropfiles_cb);
  928. }
  929. // Skeep CUSTOMFRAME_CB
  930. else if (strcmp("MDIACTIVATE_CB",name) == 0)
  931. {
  932. IupSetCallback(ih, name, (Icallback) callback_mdiactivate_cb);
  933. }
  934. else if (strcmp("MOVE_CB",name) == 0)
  935. {
  936. IupSetCallback(ih, name, (Icallback) callback_move_cb);
  937. }
  938. else if (strcmp("RESIZE_CB",name) == 0)
  939. {
  940. IupSetCallback(ih, name, (Icallback) callback_resize_cb);
  941. }
  942. else if (strcmp("SHOW_CB",name) == 0)
  943. {
  944. IupSetCallback(ih, name, (Icallback) callback_show_cb);
  945. }
  946. else if (strcmp("TRAYCLICK_CB",name) == 0)
  947. {
  948. IupSetCallback(ih, name, (Icallback) callback_trayclick_cb);
  949. }
  950. else if (strcmp("FILE_CB",name) == 0)
  951. {
  952. IupSetCallback(ih, name, (Icallback) callback_file_cb);
  953. }
  954. else if (strcmp("COLORUPDATE_CB",name) == 0)
  955. {
  956. IupSetCallback(ih, name, (Icallback) callback_colorupdate_cb);
  957. }
  958. else if (strcmp("CANCEL_CB",name) == 0)
  959. {
  960. IupSetCallback(ih, name, (Icallback) callback_cancel_cb);
  961. }
  962. else if (strcmp("GETPARAM",name) == 0)
  963. {
  964. }
  965. else if (strcmp("TABCHANGE_CB",name) == 0)
  966. {
  967. IupSetCallback(ih, name, (Icallback) callback_tabchange_cb);
  968. }
  969. else if (strcmp("TABCHANGEPOS_CB",name) == 0)
  970. {
  971. IupSetCallback(ih, name, (Icallback) callback_tabchangepos_cb);
  972. }
  973. else if (strcmp("TABCLOSE_CB",name) == 0)
  974. {
  975. IupSetCallback(ih, name, (Icallback) callback_tabclose_cb);
  976. }
  977. else if (strcmp("RIGHTCLICK_CB",name) == 0)
  978. {
  979. IupSetCallback(ih, name, (Icallback) callback_rightclick_cb);
  980. }
  981. else if (strcmp("DETACHED_CB",name) == 0)
  982. {
  983. IupSetCallback(ih, name, (Icallback) callback_detached_cb);
  984. }
  985. else if (strcmp("RESTORED_CB",name) == 0)
  986. {
  987. IupSetCallback(ih, name, (Icallback) callback_restored_cb);
  988. }
  989. else if (strcmp("OPENCLOSE_CB",name) == 0)
  990. {
  991. IupSetCallback(ih, name, (Icallback) callback_openclose_cb);
  992. }
  993. else if (strcmp("EXTRABUTTON_CB",name) == 0)
  994. {
  995. IupSetCallback(ih, name, (Icallback) callback_extrabutton_cb);
  996. }
  997. else if (strcmp("VALUECHANGED_CB",name) == 0)
  998. {
  999. IupSetCallback(ih, name, (Icallback) callback_valuechanged_cb);
  1000. }
  1001. else if (strcmp("BUTTON_CB",name) == 0)
  1002. {
  1003. IupSetCallback(ih, name, (Icallback) callback_button_cb);
  1004. }
  1005. else if (strcmp("FOCUS_CB",name) == 0)
  1006. {
  1007. IupSetCallback(ih, name, (Icallback) callback_focus_cb);
  1008. }
  1009. else if (strcmp("MOTION_CB",name) == 0)
  1010. {
  1011. IupSetCallback(ih, name, (Icallback) callback_motion_cb);
  1012. }
  1013. else if (strcmp("KEYPRESS_CB",name) == 0)
  1014. {
  1015. IupSetCallback(ih, name, (Icallback) callback_keypress_cb);
  1016. }
  1017. else if (strcmp("SCROLL_CB",name) == 0)
  1018. {
  1019. IupSetCallback(ih, name, (Icallback) callback_scroll_cb);
  1020. }
  1021. // TOUCH_CB and MULTITOUCH_CB
  1022. else if (strcmp("WHEEL_CB",name) == 0)
  1023. {
  1024. IupSetCallback(ih, name, (Icallback) callback_wheel_cb);
  1025. }
  1026. // WOM_CB
  1027. else if (strcmp("CARET_CB",name) == 0)
  1028. {
  1029. IupSetCallback(ih, name, (Icallback) callback_caret_cb);
  1030. }
  1031. else if (strcmp("DBLCLICK_CB",name) == 0)
  1032. {
  1033. IupSetCallback(ih, name, (Icallback) callback_dblclick_cb);
  1034. }
  1035. else if (strcmp("DRAGDROP_CB",name) == 0)
  1036. {
  1037. IupSetCallback(ih, name, (Icallback) callback_dragdrop_cb);
  1038. }
  1039. else if (strcmp("DROPDOWN_CB",name) == 0)
  1040. {
  1041. IupSetCallback(ih, name, (Icallback) callback_dropdown_cb);
  1042. }
  1043. else if (strcmp("EDIT_CB",name) == 0)
  1044. {
  1045. IupSetCallback(ih, name, (Icallback) callback_edit_cb);
  1046. }
  1047. else if (strcmp("MULTISELECT_CB",name) == 0)
  1048. {
  1049. IupSetCallback(ih, name, (Icallback) callback_multiselect_cb);
  1050. }
  1051. else if (strcmp("SPIN_CB",name) == 0)
  1052. {
  1053. IupSetCallback(ih, name, (Icallback) callback_spin_cb);
  1054. }
  1055. else if (strcmp("SELECTION_CB",name) == 0)
  1056. {
  1057. IupSetCallback(ih, name, (Icallback) callback_selection_cb);
  1058. }
  1059. else if (strcmp("MULTISELECTION_CB",name) == 0)
  1060. {
  1061. IupSetCallback(ih, name, (Icallback) callback_multiselection_cb);
  1062. }
  1063. else if (strcmp("MULTIUNSELECTION_CB",name) == 0)
  1064. {
  1065. IupSetCallback(ih, name, (Icallback) callback_multiunselection_cb);
  1066. }
  1067. else if (strcmp("BRANCHOPEN_CB",name) == 0)
  1068. {
  1069. IupSetCallback(ih, name, (Icallback) callback_branchopen_cb);
  1070. }
  1071. else if (strcmp("BRANCHCLOSE_CB",name) == 0)
  1072. {
  1073. IupSetCallback(ih, name, (Icallback) callback_branchclose_cb);
  1074. }
  1075. else if (strcmp("EXECUTELEAF_CB",name) == 0)
  1076. {
  1077. IupSetCallback(ih, name, (Icallback) callback_executeleaf_cb);
  1078. }
  1079. else if (strcmp("SHOWRENAME_CB",name) == 0)
  1080. {
  1081. IupSetCallback(ih, name, (Icallback) callback_showrename_cb);
  1082. }
  1083. else if (strcmp("RENAME_CB",name) == 0)
  1084. {
  1085. IupSetCallback(ih, name, (Icallback) callback_rename_cb);
  1086. }
  1087. else if (strcmp("NODEREMOVED_CB",name) == 0)
  1088. {
  1089. IupSetCallback(ih, name, (Icallback) callback_noderemoved_cb);
  1090. }
  1091. else if (strcmp("TOGGLEVALUE_CB",name) == 0)
  1092. {
  1093. if (strcmp("Fnii", type) == 0)
  1094. {
  1095. IupSetCallback(ih, name, (Icallback) callback_togglevalue_cb_Fnii);
  1096. }
  1097. // Matrix
  1098. else if (strcmp("Fniii", type) == 0)
  1099. {
  1100. IupSetCallback(ih, name, (Icallback) callback_togglevalue_cb_Fniii);
  1101. }
  1102. }
  1103. else if (strcmp("HIGHLIGHT_CB",name) == 0)
  1104. {
  1105. IupSetCallback(ih, name, (Icallback) callback_highlight_cb);
  1106. }
  1107. else if (strcmp("OPEN_CB",name) == 0)
  1108. {
  1109. IupSetCallback(ih, name, (Icallback) callback_open_cb);
  1110. }
  1111. else if (strcmp("MENUCLOSE_CB",name) == 0)
  1112. {
  1113. IupSetCallback(ih, name, (Icallback) callback_menuclose_cb);
  1114. }
  1115. else if (strcmp("DRAGBEGIN_CB",name) == 0)
  1116. {
  1117. IupSetCallback(ih, name, (Icallback) callback_dragbegin_cb);
  1118. }
  1119. else if (strcmp("DRAGDATASIZE_CB",name) == 0)
  1120. {
  1121. IupSetCallback(ih, name, (Icallback) callback_dragdatasize_cb);
  1122. }
  1123. else if (strcmp("DRAGDATA_CB",name) == 0)
  1124. {
  1125. IupSetCallback(ih, name, (Icallback) callback_dragdata_cb);
  1126. }
  1127. else if (strcmp("DRAGEND_CB",name) == 0)
  1128. {
  1129. IupSetCallback(ih, name, (Icallback) callback_dragend_cb);
  1130. }
  1131. else if (strcmp("DROPDATA_CB",name) == 0)
  1132. {
  1133. IupSetCallback(ih, name, (Icallback) callback_dropdata_cb);
  1134. }
  1135. else if (strcmp("DROPMOTION_CB",name) == 0)
  1136. {
  1137. IupSetCallback(ih, name, (Icallback) callback_dropmotion_cb);
  1138. }
  1139. else if (strcmp("FLAT_ACTION",name) == 0)
  1140. {
  1141. IupSetCallback(ih, name, (Icallback) callback_flat_action_Fn);
  1142. }
  1143. else if (strcmp("FLAT_BUTTON_CB",name) == 0)
  1144. {
  1145. IupSetCallback(ih, name, (Icallback) callback_flat_button_cb);
  1146. }
  1147. else if (strcmp("FLAT_FOCUS_CB",name) == 0)
  1148. {
  1149. IupSetCallback(ih, name, (Icallback) callback_flat_focus_cb);
  1150. }
  1151. else if (strcmp("FLAT_ENTERWINDOW_CB",name) == 0)
  1152. {
  1153. IupSetCallback(ih, name, (Icallback) callback_flat_enterwindow_cb);
  1154. }
  1155. else if (strcmp("FLAT_LEAVEWINDOW_CB",name) == 0)
  1156. {
  1157. IupSetCallback(ih, name, (Icallback) callback_flat_leavewindow_cb);
  1158. }
  1159. // Cells
  1160. else if (strcmp("DRAW_CB",name) == 0) // Also Matrix
  1161. {
  1162. IupSetCallback(ih, name, (Icallback) callback_draw_cb);
  1163. }
  1164. else if (strcmp("HEIGHT_CB",name) == 0)
  1165. {
  1166. IupSetCallback(ih, name, (Icallback) callback_height_cb);
  1167. }
  1168. else if (strcmp("HSPAN_CB",name) == 0)
  1169. {
  1170. IupSetCallback(ih, name, (Icallback) callback_hspan_cb);
  1171. }
  1172. else if (strcmp("MOUSECLICK_CB",name) == 0)
  1173. {
  1174. IupSetCallback(ih, name, (Icallback) callback_mouseclick_cb);
  1175. }
  1176. else if (strcmp("MOUSEMOTION_CB",name) == 0)
  1177. {
  1178. IupSetCallback(ih, name, (Icallback) callback_mousemotion_cb);
  1179. }
  1180. else if (strcmp("NCOLS_CB",name) == 0)
  1181. {
  1182. IupSetCallback(ih, name, (Icallback) callback_ncols_cb);
  1183. }
  1184. else if (strcmp("NLINES_CB",name) == 0)
  1185. {
  1186. IupSetCallback(ih, name, (Icallback) callback_nlines_cb);
  1187. }
  1188. else if (strcmp("SCROLLING_CB",name) == 0)
  1189. {
  1190. IupSetCallback(ih, name, (Icallback) callback_scrolling_cb);
  1191. }
  1192. else if (strcmp("VSPAN_CB",name) == 0)
  1193. {
  1194. IupSetCallback(ih, name, (Icallback) callback_vspan_cb);
  1195. }
  1196. else if (strcmp("WIDTH_CB",name) == 0)
  1197. {
  1198. IupSetCallback(ih, name, (Icallback) callback_width_cb);
  1199. }
  1200. else if (strcmp("CELL_CB",name) == 0)
  1201. {
  1202. IupSetCallback(ih, name, (Icallback) callback_cell_cb);
  1203. }
  1204. else if (strcmp("EXTENDED_CB",name) == 0)
  1205. {
  1206. IupSetCallback(ih, name, (Icallback) callback_extended_cb);
  1207. }
  1208. else if (strcmp("SELECT_CB",name) == 0)
  1209. {
  1210. IupSetCallback(ih, name, (Icallback) callback_select_cb);
  1211. }
  1212. else if (strcmp("SWITCH_CB",name) == 0)
  1213. {
  1214. IupSetCallback(ih, name, (Icallback) callback_switch_cb);
  1215. }
  1216. // Matrix (Interaction)
  1217. else if (strcmp("ACTION_CB", name) == 0)
  1218. {
  1219. if (strcmp("Fniiiis", type) == 0)
  1220. {
  1221. IupSetCallback(ih, name, (Icallback) callback_action_Fniiiis);
  1222. }
  1223. else if (strcmp("Fn", type) == 0)
  1224. {
  1225. IupSetCallback(ih, name, (Icallback) callback_action_Fn);
  1226. }
  1227. }
  1228. else if (strcmp("CLICK_CB",name) == 0)
  1229. {
  1230. IupSetCallback(ih, name, (Icallback) callback_click_cb_Fniis);
  1231. }
  1232. else if (strcmp("COLRESIZE_CB",name) == 0)
  1233. {
  1234. IupSetCallback(ih, name, (Icallback) callback_colresize_cb);
  1235. }
  1236. else if (strcmp("RELEASE_CB",name) == 0)
  1237. {
  1238. IupSetCallback(ih, name, (Icallback) callback_release_cb);
  1239. }
  1240. else if (strcmp("RESIZEMATRIX_CB",name) == 0)
  1241. {
  1242. IupSetCallback(ih, name, (Icallback) callback_resizematrix_cb);
  1243. }
  1244. else if (strcmp("MOUSEMOVE_CB",name) == 0)
  1245. {
  1246. if (strcmp("Fnd", type) == 0)
  1247. {
  1248. IupSetCallback(ih, name, (Icallback) callback_mousemove_cb_Fnd);
  1249. }
  1250. else
  1251. {
  1252. IupSetCallback(ih, name, (Icallback) callback_mousemove_cb);
  1253. }
  1254. }
  1255. else if (strcmp("ENTERITEM_CB",name) == 0)
  1256. {
  1257. IupSetCallback(ih, name, (Icallback) callback_enteritem_cb);
  1258. }
  1259. else if (strcmp("LEAVEITEM_CB",name) == 0)
  1260. {
  1261. IupSetCallback(ih, name, (Icallback) callback_leaveitem_cb);
  1262. }
  1263. else if (strcmp("SCROLLTOP_CB",name) == 0)
  1264. {
  1265. IupSetCallback(ih, name, (Icallback) callback_scrolltop_cb);
  1266. }
  1267. else if (strcmp("BGCOLOR_CB",name) == 0)
  1268. {
  1269. IupSetCallback(ih, name, (Icallback) callback_bgcolor_cb);
  1270. }
  1271. else if (strcmp("FGCOLOR_CB",name) == 0)
  1272. {
  1273. IupSetCallback(ih, name, (Icallback) callback_fgcolor_cb);
  1274. }
  1275. else if (strcmp("FONT_CB",name) == 0)
  1276. {
  1277. IupSetCallback(ih, name, (Icallback) callback_font_cb);
  1278. }
  1279. else if (strcmp("TYPE_CB",name) == 0)
  1280. {
  1281. IupSetCallback(ih, name, (Icallback) callback_type_cb);
  1282. }
  1283. else if (strcmp("DROPCHECK_CB",name) == 0)
  1284. {
  1285. IupSetCallback(ih, name, (Icallback) callback_dropcheck_cb);
  1286. }
  1287. else if (strcmp("TRANSLATEVALUE_CB",name) == 0)
  1288. {
  1289. IupSetCallback(ih, name, (Icallback) callback_translatevalue_cb);
  1290. }
  1291. else if (strcmp("DROP_CB",name) == 0)
  1292. {
  1293. IupSetCallback(ih, name, (Icallback) callback_drop_cb);
  1294. }
  1295. else if (strcmp("MENUDROP_CB",name) == 0)
  1296. {
  1297. IupSetCallback(ih, name, (Icallback) callback_menudrop_cb);
  1298. }
  1299. else if (strcmp("DROPSELECT_CB",name) == 0)
  1300. {
  1301. IupSetCallback(ih, name, (Icallback) callback_dropselect_cb);
  1302. }
  1303. else if (strcmp("EDITION_CB",name) == 0)
  1304. {
  1305. IupSetCallback(ih, name, (Icallback) callback_edition_cb);
  1306. }
  1307. else if (strcmp("VALUE_CB",name) == 0)
  1308. {
  1309. IupSetCallback(ih, name, (Icallback) callback_value_cb);
  1310. }
  1311. else if (strcmp("VALUE_EDIT_CB",name) == 0)
  1312. {
  1313. IupSetCallback(ih, name, (Icallback) callback_value_edit_cb);
  1314. }
  1315. else if (strcmp("MARK_CB",name) == 0)
  1316. {
  1317. IupSetCallback(ih, name, (Icallback) callback_mark_cb);
  1318. }
  1319. else if (strcmp("MARKEDIT_CB",name) == 0)
  1320. {
  1321. IupSetCallback(ih, name, (Icallback) callback_markedit_cb);
  1322. }
  1323. // Flat tabs
  1324. else if (strcmp("FLAT_MOTION_CB",name) == 0)
  1325. {
  1326. IupSetCallback(ih, name, (Icallback) callback_flat_motion_cb);
  1327. }
  1328. // Drop button
  1329. else if (strcmp("DROPSHOW_CB",name) == 0)
  1330. {
  1331. IupSetCallback(ih, name, (Icallback) callback_flat_dropshow_cb);
  1332. }
  1333. // Dial
  1334. else if (strcmp("BUTTON_PRESS_CB",name) == 0)
  1335. {
  1336. IupSetCallback(ih, name, (Icallback) callback_button_press_cb);
  1337. }
  1338. else if (strcmp("BUTTON_RELEASE_CB",name) == 0)
  1339. {
  1340. IupSetCallback(ih, name, (Icallback) callback_button_release_cb);
  1341. }
  1342. // Color browse
  1343. else if (strcmp("CHANGE_CB",name) == 0)
  1344. {
  1345. IupSetCallback(ih, name, (Icallback) callback_change_cb);
  1346. }
  1347. else if (strcmp("DRAG_CB",name) == 0)
  1348. {
  1349. IupSetCallback(ih, name, (Icallback) callback_drag_cb);
  1350. }
  1351. else
  1352. {
  1353. printf("Unknown function.");
  1354. }
  1355. }
  1356. #endif