ruby-iup 0.0.1-i386-mswin32 → 0.0.2-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/examples/ctrl/degrade.rb +5 -2
  2. data/examples/ctrl/iupgauge.rb +5 -5
  3. data/examples/ctrl/iupplot2.rb +2 -5
  4. data/examples/dlg/iupalarm.rb +3 -1
  5. data/examples/elem/iupbutton.rb +42 -59
  6. data/examples/elem/iupcanvas.rb +4 -2
  7. data/examples/elem/iupcanvas2.rb +9 -8
  8. data/examples/elem/iupcanvas3.rb +19 -29
  9. data/examples/elem/iupdialog.rb +3 -7
  10. data/examples/elem/progressbar.rb +104 -118
  11. data/ext/iup-win32/cd.dll +0 -0
  12. data/ext/iup-win32/cd.lib +0 -0
  13. data/ext/iup-win32/cdcontextplus.dll +0 -0
  14. data/ext/iup-win32/cdcontextplus.lib +0 -0
  15. data/ext/iup-win32/cdpdf.dll +0 -0
  16. data/ext/iup-win32/cdpdf.lib +0 -0
  17. data/ext/iup-win32/freetype6.dll +0 -0
  18. data/ext/iup-win32/freetype6.lib +0 -0
  19. data/ext/iup-win32/im.dll +0 -0
  20. data/ext/iup-win32/im.lib +0 -0
  21. data/ext/iup-win32/im_avi.dll +0 -0
  22. data/ext/iup-win32/im_avi.lib +0 -0
  23. data/ext/iup-win32/im_capture.dll +0 -0
  24. data/ext/iup-win32/im_capture.lib +0 -0
  25. data/ext/iup-win32/im_fftw.dll +0 -0
  26. data/ext/iup-win32/im_fftw.lib +0 -0
  27. data/ext/iup-win32/im_jp2.dll +0 -0
  28. data/ext/iup-win32/im_jp2.lib +0 -0
  29. data/ext/iup-win32/im_process.dll +0 -0
  30. data/ext/iup-win32/im_process.lib +0 -0
  31. data/ext/iup-win32/im_wmv.dll +0 -0
  32. data/ext/iup-win32/im_wmv.lib +0 -0
  33. data/ext/iup-win32/imlua_capture51.dll +0 -0
  34. data/ext/iup-win32/imlua_capture51.lib +0 -0
  35. data/ext/iup-win32/imlua_wmv51.dll +0 -0
  36. data/ext/iup-win32/imlua_wmv51.lib +0 -0
  37. data/ext/iup-win32/iup.dll +0 -0
  38. data/ext/iup-win32/iup.lib +0 -0
  39. data/ext/iup-win32/iup_pplot.dll +0 -0
  40. data/ext/iup-win32/iup_pplot.lib +0 -0
  41. data/ext/iup-win32/iupcd.dll +0 -0
  42. data/ext/iup-win32/iupcd.lib +0 -0
  43. data/ext/iup-win32/iupcontrols.dll +0 -0
  44. data/ext/iup-win32/iupcontrols.lib +0 -0
  45. data/ext/iup-win32/iupgl.dll +0 -0
  46. data/ext/iup-win32/iupgl.lib +0 -0
  47. data/ext/iup-win32/iupgtk.dll +0 -0
  48. data/ext/iup-win32/iupgtk.lib +0 -0
  49. data/ext/iup-win32/iupim.dll +0 -0
  50. data/ext/iup-win32/iupim.lib +0 -0
  51. data/ext/iup-win32/iupimglib.dll +0 -0
  52. data/ext/iup-win32/iupimglib.lib +0 -0
  53. data/ext/iup-win32/iupole.dll +0 -0
  54. data/ext/iup-win32/iupole.lib +0 -0
  55. data/ext/iup-win32/iupstub.lib +0 -0
  56. data/ext/iup-win32/pdflib.dll +0 -0
  57. data/ext/iup-win32/pdflib.lib +0 -0
  58. data/ext/iup.c +3 -351
  59. data/ext/rb_iup.h +48 -15
  60. data/ext/rb_iupcb.h +1 -0
  61. data/ext/rb_iupcells.h +1 -0
  62. data/ext/rb_iupcolorbar.h +1 -4
  63. data/ext/rb_iupcontrols.h +0 -5
  64. data/ext/rb_iupdial.h +1 -0
  65. data/ext/rb_iupgauge.h +1 -0
  66. data/ext/rb_iupgc.h +0 -1
  67. data/ext/rb_iupmatrix.h +1 -0
  68. data/ext/rb_iupsbox.h +0 -1
  69. data/ext/rb_iuptabs.h +1 -0
  70. data/ext/rb_iuptree.h +1 -0
  71. data/ext/rb_iupval.h +1 -0
  72. data/lib/iup.so +0 -0
  73. metadata +15 -16
  74. data/ext/iup-win32/cdlua51.lib +0 -0
  75. data/ext/iup-win32/cdluacontextplus51.lib +0 -0
  76. data/ext/iup-win32/cdluaim51.lib +0 -0
  77. data/ext/iup-win32/cdluapdf51.lib +0 -0
  78. data/ext/iup-win32/iuplua51.lib +0 -0
  79. data/ext/iup-win32/iuplua_pplot51.lib +0 -0
  80. data/ext/iup-win32/iupluacd51.lib +0 -0
  81. data/ext/iup-win32/iupluacontrols51.lib +0 -0
  82. data/ext/iup-win32/iupluagl51.lib +0 -0
  83. data/ext/iup-win32/iupluaim51.lib +0 -0
  84. data/ext/iup-win32/iupluaimglib51.lib +0 -0
  85. data/ext/iup-win32/iupluaole51.lib +0 -0
  86. data/ext/rb_iupcbox.h +0 -40
  87. data/ext/rb_iupspeech.h +0 -25
data/ext/iup.c CHANGED
@@ -3,7 +3,6 @@
3
3
  #include "rb_iup.h"
4
4
 
5
5
  #include "rb_iupcb.h"
6
- #include "rb_iupcbox.h"
7
6
  #include "rb_iupcells.h"
8
7
  #include "rb_iupcolorbar.h"
9
8
  #include "rb_iupcontrols.h"
@@ -16,7 +15,6 @@
16
15
  #include "rb_iupmask.h"
17
16
  #include "rb_iupmatrix.h"
18
17
  #include "rb_iupsbox.h"
19
- #include "rb_iupspeech.h"
20
18
  #include "rb_iupspin.h"
21
19
  #include "rb_iuptabs.h"
22
20
  #include "rb_iuptree.h"
@@ -32,7 +30,7 @@
32
30
 
33
31
  DLLEXPORT void Init_iup()
34
32
  {
35
- VALUE VERSION = rb_str_new2("0.0.1");
33
+ VALUE VERSION = rb_str_new2("0.0.2");
36
34
  rb_mIup = rb_define_module("Iup");
37
35
  rb_mCd = rb_define_module("Cd");
38
36
  rb_define_const(rb_mIup, "RUBY_IUP_VERSION", VERSION);
@@ -78,6 +76,7 @@ DLLEXPORT void Init_iup()
78
76
  rb_cIupPPlot = rb_define_class_under(rb_mIup, "PPlot", rb_cIupCanvas);
79
77
  rb_cIupVal = rb_define_class_under(rb_mIup, "Val", rb_cIupCanvas);
80
78
  rb_cIupTimer = rb_define_class_under(rb_mIup, "Timer", rb_cIupNode);
79
+ rb_cIupProgressBar = rb_define_class_under(rb_mIup, "ProgressBar", rb_cIupNode);
81
80
 
82
81
  rb_define_const(rb_mIup, "NAME", rb_str_new2(IUP_NAME));
83
82
  rb_define_const(rb_mIup, "COPYRIGHT", rb_str_new2(IUP_COPYRIGHT));
@@ -206,6 +205,7 @@ DLLEXPORT void Init_iup()
206
205
  rb_define_module_function(rb_mIup, "MultiLine", rb_IupMultiLine, -1);
207
206
  rb_define_module_function(rb_mIup, "Toggle", rb_IupToggle, -1);
208
207
  rb_define_module_function(rb_mIup, "Timer", rb_IupTimer, 0);
208
+ rb_define_module_function(rb_mIup, "ProgressBar", rb_IupProgressBar, 0);
209
209
  rb_define_const(rb_mIup, "ERROR", INT2FIX(IUP_ERROR));
210
210
  rb_define_const(rb_mIup, "NOERROR", INT2FIX(IUP_NOERROR));
211
211
  rb_define_const(rb_mIup, "OPENED", INT2FIX(IUP_OPENED));
@@ -229,58 +229,12 @@ DLLEXPORT void Init_iup()
229
229
  rb_define_const(rb_mIup, "BUTTON5", INT2FIX(IUP_BUTTON5));
230
230
 
231
231
  rb_define_module_function(rb_mIup, "ColorBrowser", rb_IupColorBrowser, 0);
232
- rb_define_const(rb_mIup, "RGB", rb_str_new2(IUP_RGB));
233
- rb_define_const(rb_mIup, "CHANGE_CB", rb_str_new2(IUP_CHANGE_CB));
234
- rb_define_const(rb_mIup, "DRAG_CB", rb_str_new2(IUP_DRAG_CB));
235
232
 
236
233
  rb_define_module_function(rb_mIup, "Cbox", rb_IupCboxv, -1);
237
- rb_define_module_function(rb_mIup, "CboxBuilder", rb_IupCboxBuilderv, 1);
238
234
 
239
235
  rb_define_const(rb_mIup, "OUT", INT2FIX(IUP_OUT));
240
- rb_define_const(rb_mIup, "ALL", rb_str_new2(IUP_ALL));
241
- rb_define_const(rb_mIup, "BOXED", rb_str_new2(IUP_BOXED));
242
- rb_define_const(rb_mIup, "CLIPPED", rb_str_new2(IUP_CLIPPED));
243
- rb_define_const(rb_mIup, "TRANSPARENT", rb_str_new2(IUP_TRANSPARENT));
244
- rb_define_const(rb_mIup, "NON_SCROLLABLE_LINES", rb_str_new2(IUP_NON_SCROLLABLE_LINES));
245
- rb_define_const(rb_mIup, "NON_SCROLLABLE_COLS", rb_str_new2(IUP_NON_SCROLLABLE_COLS));
246
- rb_define_const(rb_mIup, "ORIGIN", rb_str_new2(IUP_ORIGIN));
247
- rb_define_const(rb_mIup, "NO_COLOR", rb_str_new2(IUP_NO_COLOR));
248
- rb_define_const(rb_mIup, "FIRST_LINE", rb_str_new2(IUP_FIRST_LINE));
249
- rb_define_const(rb_mIup, "FIRST_COL", rb_str_new2(IUP_FIRST_COL));
250
- rb_define_const(rb_mIup, "DOUBLE_BUFFER", rb_str_new2(IUP_DOUBLE_BUFFER));
251
- rb_define_const(rb_mIup, "BUFFERIZE", rb_str_new2(IUP_BUFFERIZE));
252
- rb_define_const(rb_mIup, "REPAINT", rb_str_new2(IUP_REPAINT));
253
- rb_define_const(rb_mIup, "LIMITS", rb_str_new2(IUP_LIMITS));
254
- rb_define_const(rb_mIup, "CANVAS", rb_str_new2(IUP_CANVAS));
255
- rb_define_const(rb_mIup, "IMAGE_CANVAS", rb_str_new2(IUP_IMAGE_CANVAS));
256
- rb_define_const(rb_mIup, "FULL_VISIBLE", rb_str_new2(IUP_FULL_VISIBLE));
257
- rb_define_const(rb_mIup, "MOUSECLICK_CB", rb_str_new2(IUP_MOUSECLICK_CB));
258
- rb_define_const(rb_mIup, "MOUSEMOTION_CB", rb_str_new2(IUP_MOUSEMOTION_CB));
259
- rb_define_const(rb_mIup, "DRAW_CB", rb_str_new2(IUP_DRAW_CB));
260
- rb_define_const(rb_mIup, "WIDTH_CB", rb_str_new2(IUP_WIDTH_CB));
261
- rb_define_const(rb_mIup, "HEIGHT_CB", rb_str_new2(IUP_HEIGHT_CB));
262
- rb_define_const(rb_mIup, "NLINES_CB", rb_str_new2(IUP_NLINES_CB));
263
- rb_define_const(rb_mIup, "NCOLS_CB", rb_str_new2(IUP_NCOLS_CB));
264
- rb_define_const(rb_mIup, "HSPAN_CB", rb_str_new2(IUP_HSPAN_CB));
265
- rb_define_const(rb_mIup, "VSPAN_CB", rb_str_new2(IUP_VSPAN_CB));
266
- rb_define_const(rb_mIup, "SCROLLING_CB", rb_str_new2(IUP_SCROLLING_CB));
267
236
  rb_define_module_function(rb_mIup, "Cells", rb_IupCells, -1);
268
237
 
269
- rb_define_const(rb_mIup, "NUM_PARTS", rb_str_new2(IUP_NUM_PARTS));
270
- rb_define_const(rb_mIup, "NUM_CELLS", rb_str_new2(IUP_NUM_CELLS));
271
- rb_define_const(rb_mIup, "PREVIEW_SIZE", rb_str_new2(IUP_PREVIEW_SIZE));
272
- rb_define_const(rb_mIup, "SHOW_PREVIEW", rb_str_new2(IUP_SHOW_PREVIEW));
273
- rb_define_const(rb_mIup, "SHOW_SECONDARY", rb_str_new2(IUP_SHOW_SECONDARY));
274
- rb_define_const(rb_mIup, "PRIMARY_CELL", rb_str_new2(IUP_PRIMARY_CELL));
275
- rb_define_const(rb_mIup, "SECONDARY_CELL", rb_str_new2(IUP_SECONDARY_CELL));
276
- rb_define_const(rb_mIup, "ORIENTATION", INT2FIX(IUP_ORIENTATION));
277
- rb_define_const(rb_mIup, "SQUARED", INT2FIX(IUP_SQUARED));
278
- rb_define_const(rb_mIup, "SHADOWED", INT2FIX(IUP_SHADOWED));
279
- rb_define_const(rb_mIup, "TRANSPARENCY", INT2FIX(IUP_TRANSPARENCY));
280
- rb_define_const(rb_mIup, "CELL_CB", rb_str_new2(IUP_CELL_CB));
281
- rb_define_const(rb_mIup, "EXTENDED_CB", rb_str_new2(IUP_EXTENDED_CB));
282
- rb_define_const(rb_mIup, "SELECT_CB", rb_str_new2(IUP_SELECT_CB));
283
- rb_define_const(rb_mIup, "SWITCH_CB", rb_str_new2(IUP_SWITCH_CB));
284
238
  rb_define_const(rb_mIup, "PRIMARY", INT2FIX(IUP_PRIMARY));
285
239
  rb_define_const(rb_mIup, "SECONDARY", INT2FIX(IUP_SECONDARY));
286
240
  rb_define_module_function(rb_mIup, "Colorbar", rb_IupColorbar, 0);
@@ -288,213 +242,7 @@ DLLEXPORT void Init_iup()
288
242
  rb_define_module_function(rb_mIup, "ControlsOpen", rb_IupControlsOpen, 0);
289
243
  rb_define_module_function(rb_mIup, "ControlsClose", rb_IupControlsClose, 0);
290
244
  rb_define_module_function(rb_mIup, "ImageLibOpen", rb_IupImageLibOpen, 0);
291
- rb_define_module_function(rb_mIup, "ImageLibClose", rb_IupImageLibClose, 0);
292
245
 
293
- rb_define_const(rb_mIup, "RUN", rb_str_new2(IUP_RUN));
294
- rb_define_const(rb_mIup, "ENGLISH", rb_str_new2(IUP_ENGLISH));
295
- rb_define_const(rb_mIup, "PORTUGUESE", rb_str_new2(IUP_PORTUGUESE));
296
- rb_define_const(rb_mIup, "SBH", rb_str_new2(IUP_SBH));
297
- rb_define_const(rb_mIup, "SBV", rb_str_new2(IUP_SBV));
298
- rb_define_const(rb_mIup, "DEFAULT_ACTION", rb_str_new2(IUP_DEFAULT_ACTION));
299
- rb_define_const(rb_mIup, "IDLE_ACTION", rb_str_new2(IUP_IDLE_ACTION));
300
- rb_define_const(rb_mIup, "ACTION", rb_str_new2(IUP_ACTION));
301
- rb_define_const(rb_mIup, "GETFOCUS_CB", rb_str_new2(IUP_GETFOCUS_CB));
302
- rb_define_const(rb_mIup, "KILLFOCUS_CB", rb_str_new2(IUP_KILLFOCUS_CB));
303
- rb_define_const(rb_mIup, "K_ANY", rb_str_new2(IUP_K_ANY));
304
- rb_define_const(rb_mIup, "KEYPRESS_CB", rb_str_new2(IUP_KEYPRESS_CB));
305
- rb_define_const(rb_mIup, "HELP_CB", rb_str_new2(IUP_HELP_CB));
306
- rb_define_const(rb_mIup, "SCROLL_CB", rb_str_new2(IUP_SCROLL_CB));
307
- rb_define_const(rb_mIup, "RESIZE_CB", rb_str_new2(IUP_RESIZE_CB));
308
- rb_define_const(rb_mIup, "MOTION_CB", rb_str_new2(IUP_MOTION_CB));
309
- rb_define_const(rb_mIup, "BUTTON_CB", rb_str_new2(IUP_BUTTON_CB));
310
- rb_define_const(rb_mIup, "ENTERWINDOW_CB", rb_str_new2(IUP_ENTERWINDOW_CB));
311
- rb_define_const(rb_mIup, "LEAVEWINDOW_CB", rb_str_new2(IUP_LEAVEWINDOW_CB));
312
- rb_define_const(rb_mIup, "WHEEL_CB", rb_str_new2(IUP_WHEEL_CB));
313
- rb_define_const(rb_mIup, "MASK_CB", rb_str_new2(IUP_MASK_CB));
314
- rb_define_const(rb_mIup, "OPEN_CB", rb_str_new2(IUP_OPEN_CB));
315
- rb_define_const(rb_mIup, "HIGHLIGHT_CB", rb_str_new2(IUP_HIGHLIGHT_CB));
316
- rb_define_const(rb_mIup, "MENUCLOSE_CB", rb_str_new2(IUP_MENUCLOSE_CB));
317
- rb_define_const(rb_mIup, "MAP_CB", rb_str_new2(IUP_MAP_CB));
318
- rb_define_const(rb_mIup, "CLOSE_CB", rb_str_new2(IUP_CLOSE_CB));
319
- rb_define_const(rb_mIup, "SHOW_CB", rb_str_new2(IUP_SHOW_CB));
320
- rb_define_const(rb_mIup, "DROPFILES_CB", rb_str_new2(IUP_DROPFILES_CB));
321
- rb_define_const(rb_mIup, "WOM_CB", rb_str_new2(IUP_WOM_CB));
322
- rb_define_const(rb_mIup, "DIRECTION", rb_str_new2(IUP_DIRECTION));
323
- rb_define_const(rb_mIup, "ACTIVE", rb_str_new2(IUP_ACTIVE));
324
- rb_define_const(rb_mIup, "BGCOLOR", rb_str_new2(IUP_BGCOLOR));
325
- rb_define_const(rb_mIup, "FRAMECOLOR", rb_str_new2(IUP_FRAMECOLOR));
326
- rb_define_const(rb_mIup, "FGCOLOR", rb_str_new2(IUP_FGCOLOR));
327
- rb_define_const(rb_mIup, "COLOR", rb_str_new2(IUP_COLOR));
328
- rb_define_const(rb_mIup, "WID", rb_str_new2(IUP_WID));
329
- rb_define_const(rb_mIup, "SIZE", rb_str_new2(IUP_SIZE));
330
- rb_define_const(rb_mIup, "RASTERSIZE", rb_str_new2(IUP_RASTERSIZE));
331
- rb_define_const(rb_mIup, "TITLE", rb_str_new2(IUP_TITLE));
332
- rb_define_const(rb_mIup, "VALUE", rb_str_new2(IUP_VALUE));
333
- rb_define_const(rb_mIup, "VISIBLE", rb_str_new2(IUP_VISIBLE));
334
- rb_define_const(rb_mIup, "FONT", rb_str_new2(IUP_FONT));
335
- rb_define_const(rb_mIup, "TIP", rb_str_new2(IUP_TIP));
336
- rb_define_const(rb_mIup, "EXPAND", rb_str_new2(IUP_EXPAND));
337
- rb_define_const(rb_mIup, "SEPARATOR", rb_str_new2(IUP_SEPARATOR));
338
- rb_define_const(rb_mIup, "HOTSPOT", rb_str_new2(IUP_HOTSPOT));
339
- rb_define_const(rb_mIup, "HEIGHT", rb_str_new2(IUP_HEIGHT));
340
- rb_define_const(rb_mIup, "WIDTH", rb_str_new2(IUP_WIDTH));
341
- rb_define_const(rb_mIup, "KEY", rb_str_new2(IUP_KEY));
342
- rb_define_const(rb_mIup, "MULTIPLE", rb_str_new2(IUP_MULTIPLE));
343
- rb_define_const(rb_mIup, "DROPDOWN", rb_str_new2(IUP_DROPDOWN));
344
- rb_define_const(rb_mIup, "VISIBLE_ITEMS", rb_str_new2(IUP_VISIBLE_ITEMS));
345
- rb_define_const(rb_mIup, "MARGIN", rb_str_new2(IUP_MARGIN));
346
- rb_define_const(rb_mIup, "GAP", rb_str_new2(IUP_GAP));
347
- rb_define_const(rb_mIup, "ALIGNMENT", rb_str_new2(IUP_ALIGNMENT));
348
- rb_define_const(rb_mIup, "IMAGE", rb_str_new2(IUP_IMAGE));
349
- rb_define_const(rb_mIup, "IMINACTIVE", rb_str_new2(IUP_IMINACTIVE));
350
- rb_define_const(rb_mIup, "IMPRESS", rb_str_new2(IUP_IMPRESS));
351
- rb_define_const(rb_mIup, "SAVEUNDER", rb_str_new2(IUP_SAVEUNDER));
352
- rb_define_const(rb_mIup, "NC", rb_str_new2(IUP_NC));
353
- rb_define_const(rb_mIup, "MASK", rb_str_new2(IUP_MASK));
354
- rb_define_const(rb_mIup, "APPEND", rb_str_new2(IUP_APPEND));
355
- rb_define_const(rb_mIup, "BORDER", rb_str_new2(IUP_BORDER));
356
- rb_define_const(rb_mIup, "CARET", rb_str_new2(IUP_CARET));
357
- rb_define_const(rb_mIup, "SELECTION", rb_str_new2(IUP_SELECTION));
358
- rb_define_const(rb_mIup, "SELECTEDTEXT", rb_str_new2(IUP_SELECTEDTEXT));
359
- rb_define_const(rb_mIup, "INSERT", rb_str_new2(IUP_INSERT));
360
- rb_define_const(rb_mIup, "CONID", rb_str_new2(IUP_CONID));
361
- rb_define_const(rb_mIup, "CURSOR", rb_str_new2(IUP_CURSOR));
362
- rb_define_const(rb_mIup, "ICON", rb_str_new2(IUP_ICON));
363
- rb_define_const(rb_mIup, "MENUBOX", rb_str_new2(IUP_MENUBOX));
364
- rb_define_const(rb_mIup, "MINBOX", rb_str_new2(IUP_MINBOX));
365
- rb_define_const(rb_mIup, "MAXBOX", rb_str_new2(IUP_MAXBOX));
366
- rb_define_const(rb_mIup, "RESIZE", rb_str_new2(IUP_RESIZE));
367
- rb_define_const(rb_mIup, "MENU", rb_str_new2(IUP_MENU));
368
- rb_define_const(rb_mIup, "STARTFOCUS", rb_str_new2(IUP_STARTFOCUS));
369
- rb_define_const(rb_mIup, "PARENTDIALOG", rb_str_new2(IUP_PARENTDIALOG));
370
- rb_define_const(rb_mIup, "SHRINK", rb_str_new2(IUP_SHRINK));
371
- rb_define_const(rb_mIup, "DEFAULTENTER", rb_str_new2(IUP_DEFAULTENTER));
372
- rb_define_const(rb_mIup, "DEFAULTESC", rb_str_new2(IUP_DEFAULTESC));
373
- rb_define_const(rb_mIup, "X", rb_str_new2(IUP_X));
374
- rb_define_const(rb_mIup, "Y", rb_str_new2(IUP_Y));
375
- rb_define_const(rb_mIup, "TOOLBOX", rb_str_new2(IUP_TOOLBOX));
376
- rb_define_const(rb_mIup, "CONTROL", rb_str_new2(IUP_CONTROL));
377
- rb_define_const(rb_mIup, "READONLY", rb_str_new2(IUP_READONLY));
378
- rb_define_const(rb_mIup, "SCROLLBAR", rb_str_new2(IUP_SCROLLBAR));
379
- rb_define_const(rb_mIup, "POSY", rb_str_new2(IUP_POSY));
380
- rb_define_const(rb_mIup, "POSX", rb_str_new2(IUP_POSX));
381
- rb_define_const(rb_mIup, "DX", rb_str_new2(IUP_DX));
382
- rb_define_const(rb_mIup, "DY", rb_str_new2(IUP_DY));
383
- rb_define_const(rb_mIup, "XMAX", rb_str_new2(IUP_XMAX));
384
- rb_define_const(rb_mIup, "XMIN", rb_str_new2(IUP_XMIN));
385
- rb_define_const(rb_mIup, "YMAX", rb_str_new2(IUP_YMAX));
386
- rb_define_const(rb_mIup, "YMIN", rb_str_new2(IUP_YMIN));
387
- rb_define_const(rb_mIup, "RED", rb_str_new2(IUP_RED));
388
- rb_define_const(rb_mIup, "GREEN", rb_str_new2(IUP_GREEN));
389
- rb_define_const(rb_mIup, "BLUE", rb_str_new2(IUP_BLUE));
390
- rb_define_const(rb_mIup, "MIN", rb_str_new2(IUP_MIN));
391
- rb_define_const(rb_mIup, "MAX", rb_str_new2(IUP_MAX));
392
- rb_define_const(rb_mIup, "TIME", rb_str_new2(IUP_TIME));
393
- rb_define_const(rb_mIup, "DRAG", rb_str_new2(IUP_DRAG));
394
- rb_define_const(rb_mIup, "DROP", rb_str_new2(IUP_DROP));
395
- rb_define_const(rb_mIup, "TOPMOST", rb_str_new2(IUP_TOPMOST));
396
- rb_define_const(rb_mIup, "CLIPCHILDREN", rb_str_new2(IUP_CLIPCHILDREN));
397
- rb_define_const(rb_mIup, "DIALOGTYPE", rb_str_new2(IUP_DIALOGTYPE));
398
- rb_define_const(rb_mIup, "FILE", rb_str_new2(IUP_FILE));
399
- rb_define_const(rb_mIup, "MULTIPLEFILES", rb_str_new2(IUP_MULTIPLEFILES));
400
- rb_define_const(rb_mIup, "FILTER", rb_str_new2(IUP_FILTER));
401
- rb_define_const(rb_mIup, "FILTERUSED", rb_str_new2(IUP_FILTERUSED));
402
- rb_define_const(rb_mIup, "FILTERINFO", rb_str_new2(IUP_FILTERINFO));
403
- rb_define_const(rb_mIup, "EXTFILTER", rb_str_new2(IUP_EXTFILTER));
404
- rb_define_const(rb_mIup, "DIRECTORY", rb_str_new2(IUP_DIRECTORY));
405
- rb_define_const(rb_mIup, "ALLOWNEW", rb_str_new2(IUP_ALLOWNEW));
406
- rb_define_const(rb_mIup, "NOOVERWRITEPROMPT", rb_str_new2(IUP_NOOVERWRITEPROMPT));
407
- rb_define_const(rb_mIup, "NOCHANGEDIR", rb_str_new2(IUP_NOCHANGEDIR));
408
- rb_define_const(rb_mIup, "FILEEXIST", rb_str_new2(IUP_FILEEXIST));
409
- rb_define_const(rb_mIup, "STATUS", rb_str_new2(IUP_STATUS));
410
- rb_define_const(rb_mIup, "LOCKLOOP", rb_str_new2(IUP_LOCKLOOP));
411
- rb_define_const(rb_mIup, "SYSTEM", rb_str_new2(IUP_SYSTEM));
412
- rb_define_const(rb_mIup, "DRIVER", rb_str_new2(IUP_DRIVER));
413
- rb_define_const(rb_mIup, "SCREENSIZE", rb_str_new2(IUP_SCREENSIZE));
414
- rb_define_const(rb_mIup, "SYSTEMLANGUAGE", rb_str_new2(IUP_SYSTEMLANGUAGE));
415
- rb_define_const(rb_mIup, "COMPUTERNAME", rb_str_new2(IUP_COMPUTERNAME));
416
- rb_define_const(rb_mIup, "USERNAME", rb_str_new2(IUP_USERNAME));
417
- rb_define_const(rb_mIup, "OPEN", rb_str_new2(IUP_OPEN));
418
- rb_define_const(rb_mIup, "SAVE", rb_str_new2(IUP_SAVE));
419
- rb_define_const(rb_mIup, "DIR", rb_str_new2(IUP_DIR));
420
- rb_define_const(rb_mIup, "HORIZONTAL", rb_str_new2(IUP_HORIZONTAL));
421
- rb_define_const(rb_mIup, "VERTICAL", rb_str_new2(IUP_VERTICAL));
422
- rb_define_const(rb_mIup, "ON", rb_str_new2(IUP_ON));
423
- rb_define_const(rb_mIup, "OFF", rb_str_new2(IUP_OFF));
424
- rb_define_const(rb_mIup, "ACENTER", rb_str_new2(IUP_ACENTER));
425
- rb_define_const(rb_mIup, "ALEFT", rb_str_new2(IUP_ALEFT));
426
- rb_define_const(rb_mIup, "ARIGHT", rb_str_new2(IUP_ARIGHT));
427
- rb_define_const(rb_mIup, "ATOP", rb_str_new2(IUP_ATOP));
428
- rb_define_const(rb_mIup, "ABOTTOM", rb_str_new2(IUP_ABOTTOM));
429
- rb_define_const(rb_mIup, "NORTH", rb_str_new2(IUP_NORTH));
430
- rb_define_const(rb_mIup, "SOUTH", rb_str_new2(IUP_SOUTH));
431
- rb_define_const(rb_mIup, "WEST", rb_str_new2(IUP_WEST));
432
- rb_define_const(rb_mIup, "EAST", rb_str_new2(IUP_EAST));
433
- rb_define_const(rb_mIup, "NE", rb_str_new2(IUP_NE));
434
- rb_define_const(rb_mIup, "SE", rb_str_new2(IUP_SE));
435
- rb_define_const(rb_mIup, "NW", rb_str_new2(IUP_NW));
436
- rb_define_const(rb_mIup, "SW", rb_str_new2(IUP_SW));
437
- rb_define_const(rb_mIup, "FULLSCREEN", rb_str_new2(IUP_FULLSCREEN));
438
- rb_define_const(rb_mIup, "FULL", rb_str_new2(IUP_FULL));
439
- rb_define_const(rb_mIup, "HALF", rb_str_new2(IUP_HALF));
440
- rb_define_const(rb_mIup, "THIRD", rb_str_new2(IUP_THIRD));
441
- rb_define_const(rb_mIup, "QUARTER", rb_str_new2(IUP_QUARTER));
442
- rb_define_const(rb_mIup, "EIGHTH", rb_str_new2(IUP_EIGHTH));
443
- rb_define_const(rb_mIup, "ARROW", rb_str_new2(IUP_ARROW));
444
- rb_define_const(rb_mIup, "BUSY", rb_str_new2(IUP_BUSY));
445
- rb_define_const(rb_mIup, "RESIZE_N", rb_str_new2(IUP_RESIZE_N));
446
- rb_define_const(rb_mIup, "RESIZE_S", rb_str_new2(IUP_RESIZE_S));
447
- rb_define_const(rb_mIup, "RESIZE_E", rb_str_new2(IUP_RESIZE_E));
448
- rb_define_const(rb_mIup, "RESIZE_W", rb_str_new2(IUP_RESIZE_W));
449
- rb_define_const(rb_mIup, "RESIZE_NE", rb_str_new2(IUP_RESIZE_NE));
450
- rb_define_const(rb_mIup, "RESIZE_NW", rb_str_new2(IUP_RESIZE_NW));
451
- rb_define_const(rb_mIup, "RESIZE_SE", rb_str_new2(IUP_RESIZE_SE));
452
- rb_define_const(rb_mIup, "RESIZE_SW", rb_str_new2(IUP_RESIZE_SW));
453
- rb_define_const(rb_mIup, "MOVE", rb_str_new2(IUP_MOVE));
454
- rb_define_const(rb_mIup, "HAND", rb_str_new2(IUP_HAND));
455
- rb_define_const(rb_mIup, "NONE", rb_str_new2(IUP_NONE));
456
- rb_define_const(rb_mIup, "IUP", rb_str_new2(IUP_IUP));
457
- rb_define_const(rb_mIup, "CROSS", rb_str_new2(IUP_CROSS));
458
- rb_define_const(rb_mIup, "PEN", rb_str_new2(IUP_PEN));
459
- rb_define_const(rb_mIup, "TEXT", rb_str_new2(IUP_TEXT));
460
- rb_define_const(rb_mIup, "RESIZE_C", rb_str_new2(IUP_RESIZE_C));
461
- rb_define_const(rb_mIup, "OPENHAND", rb_str_new2(IUP_OPENHAND));
462
- rb_define_const(rb_mIup, "HELVETICA_NORMAL_8", rb_str_new2(IUP_HELVETICA_NORMAL_8));
463
- rb_define_const(rb_mIup, "HELVETICA_ITALIC_8", rb_str_new2(IUP_HELVETICA_ITALIC_8));
464
- rb_define_const(rb_mIup, "HELVETICA_BOLD_8", rb_str_new2(IUP_HELVETICA_BOLD_8));
465
- rb_define_const(rb_mIup, "HELVETICA_NORMAL_10", rb_str_new2(IUP_HELVETICA_NORMAL_10));
466
- rb_define_const(rb_mIup, "HELVETICA_ITALIC_10", rb_str_new2(IUP_HELVETICA_ITALIC_10));
467
- rb_define_const(rb_mIup, "HELVETICA_BOLD_10", rb_str_new2(IUP_HELVETICA_BOLD_10));
468
- rb_define_const(rb_mIup, "HELVETICA_NORMAL_12", rb_str_new2(IUP_HELVETICA_NORMAL_12));
469
- rb_define_const(rb_mIup, "HELVETICA_ITALIC_12", rb_str_new2(IUP_HELVETICA_ITALIC_12));
470
- rb_define_const(rb_mIup, "HELVETICA_BOLD_12", rb_str_new2(IUP_HELVETICA_BOLD_12));
471
- rb_define_const(rb_mIup, "HELVETICA_NORMAL_14", rb_str_new2(IUP_HELVETICA_NORMAL_14));
472
- rb_define_const(rb_mIup, "HELVETICA_ITALIC_14", rb_str_new2(IUP_HELVETICA_ITALIC_14));
473
- rb_define_const(rb_mIup, "HELVETICA_BOLD_14", rb_str_new2(IUP_HELVETICA_BOLD_14));
474
- rb_define_const(rb_mIup, "COURIER_NORMAL_8", rb_str_new2(IUP_COURIER_NORMAL_8));
475
- rb_define_const(rb_mIup, "COURIER_ITALIC_8", rb_str_new2(IUP_COURIER_ITALIC_8));
476
- rb_define_const(rb_mIup, "COURIER_BOLD_8", rb_str_new2(IUP_COURIER_BOLD_8));
477
- rb_define_const(rb_mIup, "COURIER_NORMAL_10", rb_str_new2(IUP_COURIER_NORMAL_10));
478
- rb_define_const(rb_mIup, "COURIER_ITALIC_10", rb_str_new2(IUP_COURIER_ITALIC_10));
479
- rb_define_const(rb_mIup, "COURIER_BOLD_10", rb_str_new2(IUP_COURIER_BOLD_10));
480
- rb_define_const(rb_mIup, "COURIER_NORMAL_12", rb_str_new2(IUP_COURIER_NORMAL_12));
481
- rb_define_const(rb_mIup, "COURIER_ITALIC_12", rb_str_new2(IUP_COURIER_ITALIC_12));
482
- rb_define_const(rb_mIup, "COURIER_BOLD_12", rb_str_new2(IUP_COURIER_BOLD_12));
483
- rb_define_const(rb_mIup, "COURIER_NORMAL_14", rb_str_new2(IUP_COURIER_NORMAL_14));
484
- rb_define_const(rb_mIup, "COURIER_ITALIC_14", rb_str_new2(IUP_COURIER_ITALIC_14));
485
- rb_define_const(rb_mIup, "COURIER_BOLD_14", rb_str_new2(IUP_COURIER_BOLD_14));
486
- rb_define_const(rb_mIup, "TIMES_NORMAL_8", rb_str_new2(IUP_TIMES_NORMAL_8));
487
- rb_define_const(rb_mIup, "TIMES_ITALIC_8", rb_str_new2(IUP_TIMES_ITALIC_8));
488
- rb_define_const(rb_mIup, "TIMES_BOLD_8", rb_str_new2(IUP_TIMES_BOLD_8));
489
- rb_define_const(rb_mIup, "TIMES_NORMAL_10", rb_str_new2(IUP_TIMES_NORMAL_10));
490
- rb_define_const(rb_mIup, "TIMES_ITALIC_10", rb_str_new2(IUP_TIMES_ITALIC_10));
491
- rb_define_const(rb_mIup, "TIMES_BOLD_10", rb_str_new2(IUP_TIMES_BOLD_10));
492
- rb_define_const(rb_mIup, "TIMES_NORMAL_12", rb_str_new2(IUP_TIMES_NORMAL_12));
493
- rb_define_const(rb_mIup, "TIMES_ITALIC_12", rb_str_new2(IUP_TIMES_ITALIC_12));
494
- rb_define_const(rb_mIup, "TIMES_BOLD_12", rb_str_new2(IUP_TIMES_BOLD_12));
495
- rb_define_const(rb_mIup, "TIMES_NORMAL_14", rb_str_new2(IUP_TIMES_NORMAL_14));
496
- rb_define_const(rb_mIup, "TIMES_ITALIC_14", rb_str_new2(IUP_TIMES_ITALIC_14));
497
- rb_define_const(rb_mIup, "TIMES_BOLD_14", rb_str_new2(IUP_TIMES_BOLD_14));
498
246
 
499
247
  rb_define_const(rb_mIup, "ICTL_MOUSEMOVE_CB", rb_str_new2(ICTL_MOUSEMOVE_CB));
500
248
  rb_define_const(rb_mIup, "ICTL_BUTTON_PRESS_CB", rb_str_new2(ICTL_BUTTON_PRESS_CB));
@@ -516,25 +264,6 @@ DLLEXPORT void Init_iup()
516
264
 
517
265
  rb_define_module_function(rb_mIup, "GetParam", rb_IupGetParam, -1);
518
266
 
519
- rb_define_const(rb_mIup, "BUFFER", rb_str_new2(IUP_BUFFER));
520
- rb_define_const(rb_mIup, "STEREO", rb_str_new2(IUP_STEREO));
521
- rb_define_const(rb_mIup, "BUFFER_SIZE", rb_str_new2(IUP_BUFFER_SIZE));
522
- rb_define_const(rb_mIup, "RED_SIZE", rb_str_new2(IUP_RED_SIZE));
523
- rb_define_const(rb_mIup, "GREEN_SIZE", rb_str_new2(IUP_GREEN_SIZE));
524
- rb_define_const(rb_mIup, "BLUE_SIZE", rb_str_new2(IUP_BLUE_SIZE));
525
- rb_define_const(rb_mIup, "ALPHA_SIZE", rb_str_new2(IUP_ALPHA_SIZE));
526
- rb_define_const(rb_mIup, "DEPTH_SIZE", rb_str_new2(IUP_DEPTH_SIZE));
527
- rb_define_const(rb_mIup, "STENCIL_SIZE", rb_str_new2(IUP_STENCIL_SIZE));
528
- rb_define_const(rb_mIup, "ACCUM_RED_SIZE", rb_str_new2(IUP_ACCUM_RED_SIZE));
529
- rb_define_const(rb_mIup, "ACCUM_GREEN_SIZE", rb_str_new2(IUP_ACCUM_GREEN_SIZE));
530
- rb_define_const(rb_mIup, "ACCUM_BLUE_SIZE", rb_str_new2(IUP_ACCUM_BLUE_SIZE));
531
- rb_define_const(rb_mIup, "ACCUM_ALPHA_SIZE", rb_str_new2(IUP_ACCUM_ALPHA_SIZE));
532
- rb_define_const(rb_mIup, "DOUBLE", rb_str_new2(IUP_DOUBLE));
533
- rb_define_const(rb_mIup, "SINGLE", rb_str_new2(IUP_SINGLE));
534
- rb_define_const(rb_mIup, "INDEX", rb_str_new2(IUP_INDEX));
535
- rb_define_const(rb_mIup, "RGBA", rb_str_new2(IUP_RGBA));
536
- rb_define_const(rb_mIup, "YES", rb_str_new2(IUP_YES));
537
- rb_define_const(rb_mIup, "NO", rb_str_new2(IUP_NO));
538
267
  rb_define_module_function(rb_mIup, "GLCanvasOpen", rb_IupGLCanvasOpen, 0);
539
268
  rb_define_module_function(rb_mIup, "GLCanvas", rb_IupGLCanvas, -1);
540
269
  rb_define_module_function(rb_mIup, "GLMakeCurrent", rb_IupGLMakeCurrent, 1);
@@ -818,39 +547,6 @@ DLLEXPORT void Init_iup()
818
547
  rb_define_method(rb_cIupMatrix, "MatGetAttribute", rb_IupMatGetAttribute, 3);
819
548
  rb_define_method(rb_cIupMatrix, "MatGetInt", rb_IupMatGetInt, 3);
820
549
  rb_define_method(rb_cIupMatrix, "MatGetFloat", rb_IupMatGetFloat, 3);
821
- rb_define_const(rb_mIup, "ENTERITEM_CB", rb_str_new2(IUP_ENTERITEM_CB));
822
- rb_define_const(rb_mIup, "LEAVEITEM_CB", rb_str_new2(IUP_LEAVEITEM_CB));
823
- rb_define_const(rb_mIup, "EDITION_CB", rb_str_new2(IUP_EDITION_CB));
824
- rb_define_const(rb_mIup, "CLICK_CB", rb_str_new2(IUP_CLICK_CB));
825
- rb_define_const(rb_mIup, "DROP_CB", rb_str_new2(IUP_DROP_CB));
826
- rb_define_const(rb_mIup, "DROPSELECT_CB", rb_str_new2(IUP_DROPSELECT_CB));
827
- rb_define_const(rb_mIup, "DROPCHECK_CB", rb_str_new2(IUP_DROPCHECK_CB));
828
- rb_define_const(rb_mIup, "VALUE_CB", rb_str_new2(IUP_VALUE_CB));
829
- rb_define_const(rb_mIup, "VALUE_EDIT_CB", rb_str_new2(IUP_VALUE_EDIT_CB));
830
- rb_define_const(rb_mIup, "FIELD_CB", rb_str_new2(IUP_FIELD_CB));
831
- rb_define_const(rb_mIup, "RESIZEMATRIX", rb_str_new2(IUP_RESIZEMATRIX));
832
- rb_define_const(rb_mIup, "ADDLIN", rb_str_new2(IUP_ADDLIN));
833
- rb_define_const(rb_mIup, "ADDCOL", rb_str_new2(IUP_ADDCOL));
834
- rb_define_const(rb_mIup, "DELLIN", rb_str_new2(IUP_DELLIN));
835
- rb_define_const(rb_mIup, "DELCOL", rb_str_new2(IUP_DELCOL));
836
- rb_define_const(rb_mIup, "NUMLIN", rb_str_new2(IUP_NUMLIN));
837
- rb_define_const(rb_mIup, "NUMCOL", rb_str_new2(IUP_NUMCOL));
838
- rb_define_const(rb_mIup, "NUMLIN_VISIBLE", rb_str_new2(IUP_NUMLIN_VISIBLE));
839
- rb_define_const(rb_mIup, "NUMCOL_VISIBLE", rb_str_new2(IUP_NUMCOL_VISIBLE));
840
- rb_define_const(rb_mIup, "MARKED", rb_str_new2(IUP_MARKED));
841
- rb_define_const(rb_mIup, "WIDTHDEF", rb_str_new2(IUP_WIDTHDEF));
842
- rb_define_const(rb_mIup, "HEIGHTDEF", rb_str_new2(IUP_HEIGHTDEF));
843
- rb_define_const(rb_mIup, "AREA", rb_str_new2(IUP_AREA));
844
- rb_define_const(rb_mIup, "MARK_MODE", rb_str_new2(IUP_MARK_MODE));
845
- rb_define_const(rb_mIup, "LIN", rb_str_new2(IUP_LIN));
846
- rb_define_const(rb_mIup, "COL", rb_str_new2(IUP_COL));
847
- rb_define_const(rb_mIup, "LINCOL", rb_str_new2(IUP_LINCOL));
848
- rb_define_const(rb_mIup, "CELL", rb_str_new2(IUP_CELL));
849
- rb_define_const(rb_mIup, "EDIT_MODE", rb_str_new2(IUP_EDIT_MODE));
850
- rb_define_const(rb_mIup, "FOCUS_CELL", rb_str_new2(IUP_FOCUS_CELL));
851
- rb_define_const(rb_mIup, "REDRAW", rb_str_new2(IUP_REDRAW));
852
- rb_define_const(rb_mIup, "PREVIOUSVALUE", rb_str_new2(IUP_PREVIOUSVALUE));
853
- rb_define_const(rb_mIup, "MOUSEMOVE_CB", rb_str_new2(IUP_MOUSEMOVE_CB));
854
550
 
855
551
  //rb_define_module_function(rb_mIup, "OleControl", rb_IupOleControl, 1);
856
552
  //rb_define_module_function(rb_mIup, "OleControlOpen", rb_IupOleControlOpen, 0);
@@ -887,49 +583,6 @@ DLLEXPORT void Init_iup()
887
583
  rb_define_method(rb_mIup, "TreeGetAttribute", rb_IupTreeGetAttribute, 2);
888
584
  rb_define_method(rb_mIup, "TreeGetInt", rb_IupTreeGetInt, 2);
889
585
  rb_define_method(rb_mIup, "TreeGetFloat", rb_IupTreeGetFloat, 2);
890
- rb_define_const(rb_mIup, "ADDLEAF", rb_str_new2(IUP_ADDLEAF));
891
- rb_define_const(rb_mIup, "ADDBRANCH", rb_str_new2(IUP_ADDBRANCH));
892
- rb_define_const(rb_mIup, "DELNODE", rb_str_new2(IUP_DELNODE));
893
- rb_define_const(rb_mIup, "IMAGELEAF", rb_str_new2(IUP_IMAGELEAF));
894
- rb_define_const(rb_mIup, "IMAGEBRANCHCOLLAPSED", rb_str_new2(IUP_IMAGEBRANCHCOLLAPSED));
895
- rb_define_const(rb_mIup, "IMAGEBRANCHEXPANDED", rb_str_new2(IUP_IMAGEBRANCHEXPANDED));
896
- rb_define_const(rb_mIup, "IMAGEEXPANDED", rb_str_new2(IUP_IMAGEEXPANDED));
897
- rb_define_const(rb_mIup, "KIND", rb_str_new2(IUP_KIND));
898
- rb_define_const(rb_mIup, "PARENT", rb_str_new2(IUP_PARENT));
899
- rb_define_const(rb_mIup, "DEPTH", rb_str_new2(IUP_DEPTH));
900
- rb_define_const(rb_mIup, "ADDEXPANDED", rb_str_new2(IUP_ADDEXPANDED));
901
- rb_define_const(rb_mIup, "CTRL", rb_str_new2(IUP_CTRL));
902
- rb_define_const(rb_mIup, "SHIFT", rb_str_new2(IUP_SHIFT));
903
- rb_define_const(rb_mIup, "STATE", rb_str_new2(IUP_STATE));
904
- rb_define_const(rb_mIup, "STARTING", rb_str_new2(IUP_STARTING));
905
- rb_define_const(rb_mIup, "LEAF", rb_str_new2(IUP_LEAF));
906
- rb_define_const(rb_mIup, "BRANCH", rb_str_new2(IUP_BRANCH));
907
- rb_define_const(rb_mIup, "SELECTED", rb_str_new2(IUP_SELECTED));
908
- rb_define_const(rb_mIup, "CHILDREN", rb_str_new2(IUP_CHILDREN));
909
- rb_define_const(rb_mIup, "ROOT", rb_str_new2(IUP_ROOT));
910
- rb_define_const(rb_mIup, "LAST", rb_str_new2(IUP_LAST));
911
- rb_define_const(rb_mIup, "PGUP", rb_str_new2(IUP_PGUP));
912
- rb_define_const(rb_mIup, "PGDN", rb_str_new2(IUP_PGDN));
913
- rb_define_const(rb_mIup, "NEXT", rb_str_new2(IUP_NEXT));
914
- rb_define_const(rb_mIup, "PREVIOUS", rb_str_new2(IUP_PREVIOUS));
915
- rb_define_const(rb_mIup, "INVERT", rb_str_new2(IUP_INVERT));
916
- rb_define_const(rb_mIup, "BLOCK", rb_str_new2(IUP_BLOCK));
917
- rb_define_const(rb_mIup, "CLEARALL", rb_str_new2(IUP_CLEARALL));
918
- rb_define_const(rb_mIup, "MARKALL", rb_str_new2(IUP_MARKALL));
919
- rb_define_const(rb_mIup, "INVERTALL", rb_str_new2(IUP_INVERTALL));
920
- rb_define_const(rb_mIup, "COLLAPSED", rb_str_new2(IUP_COLLAPSED));
921
- rb_define_const(rb_mIup, "EXPANDED", rb_str_new2(IUP_EXPANDED));
922
- rb_define_const(rb_mIup, "SELECTION_CB", rb_str_new2(IUP_SELECTION_CB));
923
- rb_define_const(rb_mIup, "BRANCHOPEN_CB", rb_str_new2(IUP_BRANCHOPEN_CB));
924
- rb_define_const(rb_mIup, "BRANCHCLOSE_CB", rb_str_new2(IUP_BRANCHCLOSE_CB));
925
- rb_define_const(rb_mIup, "RIGHTCLICK_CB", rb_str_new2(IUP_RIGHTCLICK_CB));
926
- rb_define_const(rb_mIup, "EXECUTELEAF_CB", rb_str_new2(IUP_EXECUTELEAF_CB));
927
- rb_define_const(rb_mIup, "RENAMENODE_CB", rb_str_new2(IUP_RENAMENODE_CB));
928
- rb_define_const(rb_mIup, "IMGLEAF", INT2FIX(IUP_IMGLEAF));
929
- rb_define_const(rb_mIup, "IMGCOLLAPSED", INT2FIX(IUP_IMGCOLLAPSED));
930
- rb_define_const(rb_mIup, "IMGEXPANDED", INT2FIX(IUP_IMGEXPANDED));
931
- rb_define_const(rb_mIup, "IMGBLANK", INT2FIX(IUP_IMGBLANK));
932
- rb_define_const(rb_mIup, "IMGPAPER", INT2FIX(IUP_IMGPAPER));
933
586
 
934
587
  rb_define_const(rb_mIup, "ICTL_SHOWTICKS", rb_str_new2(ICTL_SHOWTICKS));
935
588
  rb_define_module_function(rb_mIup, "Val", rb_IupVal, -1);
@@ -1254,7 +907,6 @@ DLLEXPORT void Init_iup()
1254
907
  rb_define_module_function(rb_mCd, "ContextPDF", rb_cdContextPDF, 0);
1255
908
 
1256
909
  rb_IupOpen(rb_mIup);
1257
- IupControlsOpen();
1258
910
  IupSetLanguage(IUP_ENGLISH);
1259
911
 
1260
912
  atexit(exit_handler);
data/ext/rb_iup.h CHANGED
@@ -1,6 +1,7 @@
1
1
  #include <ruby.h>
2
2
  #include "iup.h"
3
3
  #include "iupcontrols.h"
4
+ #include "cd.h"
4
5
 
5
6
  extern VALUE rb_eIupError;
6
7
  static char IdleAction[100];
@@ -32,6 +33,7 @@ VALUE rb_cIupMultiLine;
32
33
  VALUE rb_cIupUser;
33
34
  VALUE rb_cIupControl;
34
35
  VALUE rb_cIupTimer;
36
+ VALUE rb_cIupProgressBar;
35
37
  VALUE rb_cIupFileDlg;
36
38
  VALUE rb_cIupTree;
37
39
  VALUE rb_cIupNode;
@@ -81,7 +83,7 @@ VALUE rb_method_missing(int argc,VALUE *argv, VALUE self)
81
83
  if(!*mname) {
82
84
  rb_raise(rb_eRuntimeError, "fail: unknown method or property");
83
85
  }
84
- n = strlen(mname);
86
+ n = strlen(mname);
85
87
  if(mname[n-1] == '=')
86
88
  mname[n-1] = 0;
87
89
  if(argc==2) {
@@ -931,7 +933,7 @@ static int _idle_cb()
931
933
  return IUP_DEFAULT;
932
934
  }
933
935
 
934
- static int _postdraw_cb(Ihandle* ih, void* cnv)
936
+ static int _postdraw_cb(Ihandle* ih,void *cnv)
935
937
  {
936
938
  char* func = (char*)IupGetAttribute(ih,"RB_POSTDRAW_CB");
937
939
  VALUE v;
@@ -939,16 +941,16 @@ static int _postdraw_cb(Ihandle* ih, void* cnv)
939
941
  VALUE node = (VALUE)IupGetAttribute(ih,"RB_CLASS");
940
942
  if(strcmp(func,"Proc")==0) {
941
943
  VALUE proc = (VALUE)IupGetAttribute(ih,"RB_PROC_POSTDRAW_CB");
942
- v = rb_funcall(proc,rb_intern("call"),2,node,rb_funcall(rb_cCdCanvas,rb_intern("new"),1,INT2FIX(cnv)));
944
+ v = rb_funcall(proc,rb_intern("call"),2,node,rb_funcall(rb_cCdCanvas,rb_intern("new"),1,UINT2NUM((unsigned)cnv)));
943
945
  } else {
944
- v = rb_funcall(rb_cObject,rb_intern(func),2,node,rb_funcall(rb_cCdCanvas,rb_intern("new"),1,INT2FIX(cnv)));
946
+ v = rb_funcall(rb_cObject,rb_intern(func),2,node,rb_funcall(rb_cCdCanvas,rb_intern("new"),1,UINT2NUM((unsigned)cnv)));
945
947
  }
946
948
  return NUM2INT(v);
947
949
  }
948
950
  return IUP_DEFAULT;
949
951
  }
950
952
 
951
- static int _predraw_cb(Ihandle* ih, void* cnv)
953
+ static int _predraw_cb(Ihandle* ih,void *cnv)
952
954
  {
953
955
  char* func = (char*)IupGetAttribute(ih,"RB_PREDRAW_CB");
954
956
  VALUE v;
@@ -956,9 +958,9 @@ static int _predraw_cb(Ihandle* ih, void* cnv)
956
958
  VALUE node = (VALUE)IupGetAttribute(ih,"RB_CLASS");
957
959
  if(strcmp(func,"Proc")==0) {
958
960
  VALUE proc = (VALUE)IupGetAttribute(ih,"RB_PROC_PREDRAW_CB");
959
- v = rb_funcall(proc,rb_intern("call"),2,node,rb_funcall(rb_cCdCanvas,rb_intern("new"),1,INT2FIX(cnv)));
961
+ v = rb_funcall(proc,rb_intern("call"),2,node,rb_funcall(rb_cCdCanvas,rb_intern("new"),1,UINT2NUM((unsigned)cnv)));
960
962
  } else {
961
- v = rb_funcall(rb_cObject,rb_intern(func),2,node,rb_funcall(rb_cCdCanvas,rb_intern("new"),1,INT2FIX(cnv)));
963
+ v = rb_funcall(rb_cObject,rb_intern(func),2,node,rb_funcall(rb_cCdCanvas,rb_intern("new"),1,UINT2NUM((unsigned)cnv)));
962
964
  }
963
965
  return NUM2INT(v);
964
966
  }
@@ -1078,10 +1080,10 @@ static int _draw_cb(Ihandle* ih, void* cnv)
1078
1080
  if(strcmp(func,"Proc")==0) {
1079
1081
  VALUE proc = (VALUE)IupGetAttribute(ih,"RB_PROC_DRAW_CB");
1080
1082
  v = rb_funcall(proc,rb_intern("call"),2,node,
1081
- rb_funcall(rb_cCdCanvas,rb_intern("new"),1,INT2FIX(cnv)));
1083
+ rb_funcall(rb_cCdCanvas,rb_intern("new"),1,UINT2NUM((unsigned)cnv)));
1082
1084
  } else {
1083
1085
  v = rb_funcall(rb_cObject,rb_intern(func),2,node,
1084
- rb_funcall(rb_cCdCanvas,rb_intern("new"),1,INT2FIX(cnv)));
1086
+ rb_funcall(rb_cCdCanvas,rb_intern("new"),1,UINT2NUM((unsigned)cnv)));
1085
1087
  }
1086
1088
  return NUM2INT(v);
1087
1089
  }
@@ -1335,20 +1337,21 @@ static int _motion_cb(Ihandle* ih,int x, int y, char* status)
1335
1337
  return IUP_DEFAULT;
1336
1338
  }
1337
1339
 
1338
- static int _cell_draw_cb(Ihandle* ih,int line, int column, int xmin, int xmax, int ymin, int ymax, void* cnv)
1340
+ static int _cell_draw_cb(Ihandle* ih,int line, int column, int xmin, int xmax, int ymin, int ymax)
1339
1341
  {
1340
1342
  char* func = (char*)IupGetAttribute(ih,"RB_DRAW_CB");
1341
1343
  VALUE v;
1344
+ void *cnv = (void*)cdActiveCanvas();
1342
1345
  if(func) {
1343
1346
  VALUE node = (VALUE)IupGetAttribute(ih,"RB_CLASS");
1344
1347
  if(strcmp(func,"Proc")==0) {
1345
1348
  VALUE proc = (VALUE)IupGetAttribute(ih,"RB_PROC_DRAW_CB");
1346
1349
  v = rb_funcall(proc,rb_intern("call"),8,node,
1347
1350
  INT2FIX(line),INT2FIX(column),INT2FIX(xmin),INT2FIX(xmax),INT2FIX(ymin),INT2FIX(ymax),
1348
- rb_funcall(rb_cCdCanvas,rb_intern("new"),1,INT2FIX(cnv)));
1351
+ rb_funcall(rb_cCdCanvas,rb_intern("new"),1,UINT2NUM((unsigned)cnv)));
1349
1352
  } else {
1350
1353
  v = rb_funcall(rb_cObject,rb_intern(func),8,node,
1351
- INT2FIX(line),INT2FIX(column),INT2FIX(xmin),INT2FIX(xmax),INT2FIX(ymin),INT2FIX(ymax),rb_funcall(rb_cCdCanvas,rb_intern("new"),1,INT2FIX(cnv)));
1354
+ INT2FIX(line),INT2FIX(column),INT2FIX(xmin),INT2FIX(xmax),INT2FIX(ymin),INT2FIX(ymax),rb_funcall(rb_cCdCanvas,rb_intern("new"),1,UINT2NUM((unsigned)cnv)));
1352
1355
  }
1353
1356
  return NUM2INT(v);
1354
1357
  }
@@ -1535,12 +1538,12 @@ static int _rightclick_cb(Ihandle* ih, int id)
1535
1538
 
1536
1539
  static int _k_any_cb(Ihandle* ih, int c)
1537
1540
  {
1538
- extern char *iupKeyEncode(int c);
1541
+ extern char *iupKeyCodeToName(int c);
1539
1542
  char* func = NULL;
1540
1543
  VALUE v;
1541
1544
  static char key[100];
1542
1545
  static char pkey[100];
1543
- sprintf(key,"RB_%s",(char*)iupKeyEncode(c));
1546
+ sprintf(key,"RB_%s",(char*)iupKeyCodeToName(c));
1544
1547
  func = (char*)IupGetAttribute(ih,key);
1545
1548
  if(func==NULL) {
1546
1549
  func = (char*)IupGetAttribute(ih,"RB_K_ANY");
@@ -1806,7 +1809,7 @@ VALUE rb_IupSetCallback(VALUE node,VALUE v_name,VALUE v_func)
1806
1809
  v = (Icallback)_button_release_cb;
1807
1810
  else if(strcmp(name,"MOUSEMOVE_CB")==0)
1808
1811
  v = (Icallback)_mousemove_cb;
1809
- else if(strcmp(name,"SCROLL_CB")==0)
1812
+ else if(strcmp(name,"SCROLL_CB")==0)
1810
1813
  v = (Icallback)_scroll_cb;
1811
1814
  else if(strcmp(name,"RESIZE_CB")==0)
1812
1815
  v = (Icallback)_resize_cb;
@@ -2444,3 +2447,33 @@ VALUE rb_IupTimer(VALUE self)
2444
2447
  return Qnil;
2445
2448
  }
2446
2449
 
2450
+ VALUE rb_IupProgressBar(VALUE self)
2451
+ {
2452
+ Ihandle* v;
2453
+ v = IupProgressBar();
2454
+ if(v)
2455
+ return rb_funcall(rb_cIupProgressBar,rb_intern("new"),1,UINT2NUM((unsigned)v));
2456
+ return Qnil;
2457
+ }
2458
+
2459
+ VALUE rb_IupCboxv(int argc,VALUE *argv,VALUE self)
2460
+ {
2461
+ extern VALUE rb_cIupCbox;
2462
+ Ihandle* v;
2463
+ int i;
2464
+ Ihandle *params[100];
2465
+ VALUE v_params,v_hash;
2466
+ VALUE node;
2467
+ rb_scan_args(argc,argv,"11",&v_params,&v_hash);
2468
+ for(i=0;i<RARRAY(v_params)->len;i++) {
2469
+ node = RARRAY(v_params)->ptr[i];
2470
+ params[i] = (Ihandle*)NUM2UINT(rb_iv_get(node,"@ihandle"));
2471
+ }
2472
+ params[i] = NULL;
2473
+ v = IupCboxv(params);
2474
+ if(TYPE(v_hash)==T_HASH)
2475
+ rb_set_attribute(v,v_hash);
2476
+ if(v)
2477
+ return rb_funcall(rb_cIupCbox,rb_intern("new"),1,UINT2NUM((unsigned)v));
2478
+ return Qnil;
2479
+ }
data/ext/rb_iupcb.h CHANGED
@@ -6,6 +6,7 @@ VALUE rb_IupColorBrowser(VALUE self)
6
6
  {
7
7
  extern VALUE rb_cIupColorBrowser;
8
8
  Ihandle* v;
9
+ IupControlsOpen();
9
10
  v = IupColorBrowser();
10
11
  if(v)
11
12
  return rb_funcall(rb_cIupColorBrowser,rb_intern("new"),1,UINT2NUM((unsigned)v));
data/ext/rb_iupcells.h CHANGED
@@ -6,6 +6,7 @@ VALUE rb_IupCells(int argc,VALUE *argv, VALUE self)
6
6
  {
7
7
  extern VALUE rb_cIupCells;
8
8
  Ihandle* v;
9
+ IupControlsOpen();
9
10
  v = IupCells();
10
11
  if(argc==1 && TYPE(argv[0])==T_HASH)
11
12
  rb_set_attribute(v,argv[0]);
data/ext/rb_iupcolorbar.h CHANGED
@@ -4,13 +4,10 @@
4
4
 
5
5
  VALUE rb_IupColorbar(VALUE self)
6
6
  {
7
- extern char* iupGetEnv(Ihandle* n,const char* a);
8
- unsigned *obj;
9
7
  extern VALUE rb_cIupColorbar;
10
8
  Ihandle* v;
9
+ IupControlsOpen();
11
10
  v = IupColorbar();
12
- obj = (unsigned*)iupGetEnv(v,"_IUPCOLORBAR_DATA");
13
- obj[4] = 0; /* initialize cddbuffer to NULL */
14
11
  if(v)
15
12
  return rb_funcall(rb_cIupColorbar,rb_intern("new"),1,UINT2NUM((unsigned)v));
16
13
  return Qnil;
data/ext/rb_iupcontrols.h CHANGED
@@ -21,8 +21,3 @@ VALUE rb_IupImageLibOpen(VALUE self)
21
21
  return Qnil;
22
22
  }
23
23
 
24
- VALUE rb_IupImageLibClose(VALUE self)
25
- {
26
- IupImageLibClose();
27
- return Qnil;
28
- }
data/ext/rb_iupdial.h CHANGED
@@ -15,6 +15,7 @@ VALUE rb_IupDial(int argc,VALUE *argv,VALUE self)
15
15
  }
16
16
  if(v_type!=Qnil)
17
17
  type = RSTRING(v_type)->ptr;
18
+ IupControlsOpen();
18
19
  v = IupDial(type);
19
20
  if(argc==1 && TYPE(argv[0])==T_HASH)
20
21
  rb_set_attribute(v,argv[0]);
data/ext/rb_iupgauge.h CHANGED
@@ -6,6 +6,7 @@ VALUE rb_IupGauge(int argc,VALUE *argv,VALUE self)
6
6
  {
7
7
  extern VALUE rb_cIupGauge;
8
8
  Ihandle* v;
9
+ IupControlsOpen();
9
10
  v = IupGauge();
10
11
  if(argc==1 && TYPE(argv[0])==T_HASH)
11
12
  rb_set_attribute(v,argv[0]);