eiffel-iup.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. // The MIT License (MIT)
  2. // Copyright (c) 2016, 2017 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. #include <stdlib.h>
  21. #include <iup.h>
  22. #include <iupkey.h>
  23. #include <im.h>
  24. #include <im_image.h>
  25. #include <iupim.h>
  26. #include <iup_config.h>
  27. #include <iupcontrols.h>
  28. // For eiffel-cd
  29. #include <cd.h>
  30. #include <wd.h>
  31. #include <cdiup.h>
  32. int iup_init(int argc, char *argv[]);
  33. void iup_main_loop();
  34. void iup_close();
  35. int get_param_dialog (const char* title, void* user_data, const char* format, int param_count, int param_extra, void** param_data);
  36. int param_action(Ihandle* dialog, int param_index, void* user_data);
  37. void config_recent_init (Ihandle* ih, Ihandle* menu, int max_recent);
  38. void connect_function (const char *name, int operation);
  39. void connect_callback (Ihandle* ih, const char *name, const char *type, int operation);
  40. int callback_idle_action(void);
  41. int callback_idle_action(void);
  42. void callback_help_cb(Ihandle *ih);
  43. int callback_map_cb(Ihandle *ih);
  44. int callback_unmap_cb(Ihandle *ih);
  45. int callback_destroy_cb(Ihandle *ih);
  46. int callback_ldestroy_cb(Ihandle *ih);
  47. int callback_getfocus_cb(Ihandle *ih);
  48. int callback_killfocus_cb(Ihandle *ih);
  49. int callback_enterwindow_cb(Ihandle *ih);
  50. int callback_leavewindow_cb(Ihandle *ih);
  51. int callback_k_any(Ihandle *ih, int c);
  52. int callback_action_Fn(Ihandle *object);
  53. int callback_close_cb(Ihandle *ih);
  54. int callback_copydata_cb(Ihandle *ih, char* cmdLine, int size);
  55. int callback_dropfiles_cb(Ihandle *ih, char* filename, int num, int x, int y);
  56. int callback_mdiactivate_cb(Ihandle *ih);
  57. int callback_move_cb(Ihandle *ih, int x, int y);
  58. int callback_resize_cb(Ihandle *ih, int width, int height);
  59. int callback_show_cb(Ihandle *ih, int state);
  60. int callback_trayclick_cb(Ihandle *ih, int but, int pressed, int dclick);
  61. int callback_file_cb(Ihandle *ih, char* file_name, char* status);
  62. int callback_colorupdate_cb (Ihandle *ih);
  63. int callback_cancel_cb (Ihandle* ih);
  64. int callback_tabchange_cb(Ihandle *ih, Ihandle* new_tab, Ihandle* old_tab);
  65. int callback_tabchangepos_cb(Ihandle *ih, int new_pos, int old_pos);
  66. int callback_tabclose_cb(Ihandle *ih, int pos);
  67. int callback_rightclick_cb(Ihandle *ih, int pos);
  68. int callback_detached_cb(Ihandle *ih, Ihandle *new_parent, int x, int y);
  69. int callback_restored_cb(Ihandle *ih, Ihandle *old_parent, int x, int y);
  70. int callback_openclose_cb(Ihandle *ih, int state);
  71. int callback_extrabutton_cb(Ihandle *ih, Ihandle *new_parent, int button, int pressed);
  72. int callback_valuechanged_cb(Ihandle *ih);
  73. int callback_button_cb(Ihandle *ih, int button, int pressed, int x, int y, char* status);
  74. int callback_action_Fnff(Ihandle *ih, float posx, float posy);
  75. int callback_focus_cb(Ihandle *ih, int focus);
  76. int callback_motion_cb(Ihandle *ih, int x, int y, char *status);
  77. int callback_keypress_cb(Ihandle *ih, int c, int press);
  78. int callback_scroll_cb(Ihandle *ih, int op, float posx, float posy);
  79. int callback_wheel_cb(Ihandle *ih, float delta, int x, int y, char *status);
  80. int callback_click_cb(Ihandle *ih, char *url);
  81. int callback_action_Fnsii(Ihandle *ih, char *text, int item, int state);
  82. int callback_caret_cb(Ihandle *ih, int lin, int col, int pos);
  83. int callback_dblclick_cb(Ihandle *ih, int item, char *text);
  84. int callback_dragdrop_cb(Ihandle *ih, int drag_id, int drop_id, int isshift, int iscontrol);
  85. int callback_dropdown_cb(Ihandle *ih, int state);
  86. int callback_edit_cb(Ihandle *ih, int c, char *new_value);
  87. int callback_multiselect_cb(Ihandle *ih, char *value);
  88. int callback_spin_cb(Ihandle *ih, int inc);
  89. int callback_action_Fnis(Ihandle *ih, int c, char *new_value);
  90. int callback_action_Fni(Ihandle* ih, int state);
  91. int callback_selection_cb (Ihandle *ih, int id, int status);
  92. int callback_multiselection_cb (Ihandle *ih, int* ids, int n);
  93. int callback_multiunselection_cb (Ihandle *ih, int* ids, int n);
  94. int callback_branchopen_cb (Ihandle *ih, int id);
  95. int callback_branchclose_cb (Ihandle *ih, int id);
  96. int callback_executeleaf_cb (Ihandle *ih, int id);
  97. int callback_showrename_cb (Ihandle *ih, int id);
  98. int callback_rename_cb (Ihandle *ih, int id, char *title);
  99. int callback_noderemoved_cb (Ihandle *ih, void* userdata);
  100. int callback_togglevalue_cb_Fnii (Ihandle *ih, int id, int state);
  101. int callback_highlight_cb (Ihandle *ih);
  102. int callback_open_cb (Ihandle *ih);
  103. int callback_menuclose_cb (Ihandle *ih);
  104. int callback_dragbegin_cb (Ihandle* ih, int x, int y);
  105. int callback_dragdatasize_cb (Ihandle* ih, char* type);
  106. int callback_dragdata_cb (Ihandle* ih, char* type, void* data, int size);
  107. int callback_dragend_cb (Ihandle* ih, int action);
  108. int callback_dropdata_cb (Ihandle* ih, char* type, void* data, int size, int x, int y);
  109. int callback_dropmotion_cb (Ihandle *ih, int x, int y, char *status);
  110. int callback_recent_cb (Ihandle *ih);
  111. int callback_flat_action_Fn(Ihandle *object);
  112. int callback_flat_button_cb(Ihandle *ih, int button, int pressed, int x, int y, char* status);
  113. int callback_flat_focus_cb(Ihandle *ih, int focus);
  114. int callback_flat_enterwindow_cb(Ihandle *ih);
  115. int callback_flat_leavewindow_cb(Ihandle *ih);
  116. int callback_draw_cb(Ihandle* ih, int line, int column, int xmin, int xmax, int ymin, int ymax, cdCanvas* canvas);
  117. int callback_height_cb(Ihandle* ih, int line);
  118. int callback_hspan_cb(Ihandle* ih, int line, int column);
  119. int callback_mouseclick_cb(Ihandle* ih, int button, int pressed, int line, int column, int x, int y, char* status);
  120. int callback_mousemotion_cb(Ihandle *ih, int line, int column, int x, int y, char *r);
  121. int callback_ncols_cb(Ihandle* ih);
  122. int callback_nlines_cb(Ihandle* ih);
  123. int callback_scrolling_cb(Ihandle* ih, int line, int column);
  124. int callback_vspan_cb(Ihandle* ih, int line, int column);
  125. int callback_width_cb(Ihandle* ih, int column);
  126. char* callback_cell_cb(Ihandle* ih, int cell);
  127. int callback_extended_cb(Ihandle* ih, int cell);
  128. int callback_select_cb(Ihandle* ih, int cell, int type);
  129. int callback_switch_cb(Ihandle* ih, int prim_cell, int sec_cell);
  130. int callback_action_Fniiiis(Ihandle *ih, int key, int lin, int col, int edition, char* value);
  131. int callback_click_cb_Fniis (Ihandle *ih, int lin, int col, char *status);
  132. int callback_colresize_cb (Ihandle *ih, int col);
  133. int callback_release_cb (Ihandle *ih, int lin, int col, char *status);
  134. int callback_resizematrix_cb (Ihandle *ih, int width, int height);
  135. int callback_mousemove_cb (Ihandle *ih, int lin, int col);
  136. int callback_enteritem_cb (Ihandle *ih, int lin, int col);
  137. int callback_leaveitem_cb (Ihandle *ih, int lin, int col);
  138. int callback_scrolltop_cb (Ihandle *ih, int lin, int col);
  139. int callback_bgcolor_cb (Ihandle *ih, int lin, int col, int *red, int *green, int *blue);
  140. int callback_fgcolor_cb (Ihandle *ih, int lin, int col, int *red, int *green, int *blue);
  141. char* callback_font_cb (Ihandle* ih, int lin, int col);
  142. char* callback_type_cb (Ihandle* ih, int lin, int col);
  143. int callback_dropcheck_cb (Ihandle *ih, int lin, int col);
  144. char* callback_translatevalue_cb (Ihandle* ih, int lin, int col, char* value);
  145. int callback_togglevalue_cb_Fniii (Ihandle *ih, int lin, int col, int status);
  146. int callback_drop_cb (Ihandle *ih, Ihandle *drop, int lin, int col);
  147. int callback_menudrop_cb (Ihandle *ih, Ihandle *drop, int lin, int col);
  148. int callback_dropselect_cb (Ihandle *ih, int lin, int col, Ihandle *drop, char *t, int i, int v);
  149. int callback_edition_cb (Ihandle *ih, int lin, int col, int mode, int update);
  150. char* callback_value_cb (Ihandle* ih, int lin, int col);
  151. int callback_value_edit_cb (Ihandle *ih, int lin, int col, char* newval);
  152. int callback_mark_cb (Ihandle* ih, int lin, int col);
  153. int callback_markedit_cb (Ihandle *ih, int lin, int col, int marked);
  154. int callback_flat_motion_cb(Ihandle *ih, int x, int y, char *status);