ruby-iup 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. data/Rakefile +1 -1
  2. data/examples/ctrl/degrade.rb +5 -2
  3. data/examples/ctrl/iupgauge.rb +5 -5
  4. data/examples/ctrl/iupplot2.rb +2 -5
  5. data/examples/dlg/iupalarm.rb +3 -1
  6. data/examples/elem/iupbutton.rb +42 -59
  7. data/examples/elem/iupcanvas.rb +4 -2
  8. data/examples/elem/iupcanvas2.rb +9 -8
  9. data/examples/elem/iupcanvas3.rb +19 -29
  10. data/examples/elem/iupdialog.rb +3 -7
  11. data/examples/elem/progressbar.rb +104 -118
  12. data/ext/iup-linux/include/cd.h +494 -494
  13. data/ext/iup-linux/include/cd_canvas.hpp +358 -358
  14. data/ext/iup-linux/include/cd_old.h +158 -158
  15. data/ext/iup-linux/include/cd_private.h +362 -362
  16. data/ext/iup-linux/include/cdcgm.h +34 -34
  17. data/ext/iup-linux/include/cdclipbd.h +22 -22
  18. data/ext/iup-linux/include/cddbuf.h +23 -23
  19. data/ext/iup-linux/include/cddebug.h +24 -24
  20. data/ext/iup-linux/include/cddgn.h +23 -23
  21. data/ext/iup-linux/include/cddxf.h +22 -22
  22. data/ext/iup-linux/include/cdemf.h +22 -22
  23. data/ext/iup-linux/include/cdgdiplus.h +29 -29
  24. data/ext/iup-linux/include/cdimage.h +23 -23
  25. data/ext/iup-linux/include/cdirgb.h +30 -30
  26. data/ext/iup-linux/include/cdiup.h +22 -22
  27. data/ext/iup-linux/include/cdlua.h +39 -39
  28. data/ext/iup-linux/include/cdlua3_private.h +120 -120
  29. data/ext/iup-linux/include/cdlua5_private.h +141 -141
  30. data/ext/iup-linux/include/cdluaim.h +24 -24
  31. data/ext/iup-linux/include/cdluaiup.h +27 -27
  32. data/ext/iup-linux/include/cdluapdf.h +27 -27
  33. data/ext/iup-linux/include/cdmf.h +24 -24
  34. data/ext/iup-linux/include/cdmf_private.h +32 -32
  35. data/ext/iup-linux/include/cdnative.h +26 -26
  36. data/ext/iup-linux/include/cdpdf.h +38 -38
  37. data/ext/iup-linux/include/cdpicture.h +22 -22
  38. data/ext/iup-linux/include/cdprint.h +23 -23
  39. data/ext/iup-linux/include/cdps.h +37 -37
  40. data/ext/iup-linux/include/cdwmf.h +22 -22
  41. data/ext/iup-linux/include/iup.h +318 -255
  42. data/ext/iup-linux/include/iup_pplot.h +40 -40
  43. data/ext/iup-linux/include/iupcb.h +25 -25
  44. data/ext/iup-linux/include/iupcbs.h +43 -42
  45. data/ext/iup-linux/include/iupcells.h +130 -130
  46. data/ext/iup-linux/include/iupcolorbar.h +126 -126
  47. data/ext/iup-linux/include/iupcontrols.h +36 -40
  48. data/ext/iup-linux/include/iupdef.h +520 -520
  49. data/ext/iup-linux/include/iupdial.h +63 -64
  50. data/ext/iup-linux/include/iupgauge.h +57 -57
  51. data/ext/iup-linux/include/iupgetparam.h +1 -1
  52. data/ext/iup-linux/include/iupgl.h +101 -101
  53. data/ext/iup-linux/include/iupim.h +21 -21
  54. data/ext/iup-linux/include/iupkey.h +457 -290
  55. data/ext/iup-linux/include/iuplua.h +41 -41
  56. data/ext/iup-linux/include/iuplua_pplot.h +26 -26
  57. data/ext/iup-linux/include/iupluacontrols.h +27 -27
  58. data/ext/iup-linux/include/iupluagl.h +26 -26
  59. data/ext/iup-linux/include/iupluaim.h +26 -26
  60. data/ext/iup-linux/include/iupluaole.h +26 -26
  61. data/ext/iup-linux/include/iupmask.h +40 -52
  62. data/ext/iup-linux/include/iupmatrix.h +63 -69
  63. data/ext/iup-linux/include/iupole.h +24 -24
  64. data/ext/iup-linux/include/iupspin.h +21 -21
  65. data/ext/iup-linux/include/iuptabs.h +75 -79
  66. data/ext/iup-linux/include/iuptree.h +93 -93
  67. data/ext/iup-linux/include/iupval.h +46 -46
  68. data/ext/iup-linux/include/wd.h +78 -78
  69. data/ext/iup-linux/include/wd_old.h +85 -85
  70. data/ext/iup-linux/libcd.so +0 -0
  71. data/ext/iup-linux/libcdcontextplus.so +0 -0
  72. data/ext/iup-linux/libcdpdf.so +0 -0
  73. data/ext/iup-linux/libim.so +0 -0
  74. data/ext/iup-linux/libim_fftw.so +0 -0
  75. data/ext/iup-linux/libim_jp2.so +0 -0
  76. data/ext/iup-linux/libim_process.so +0 -0
  77. data/ext/iup-linux/libiup.so +0 -0
  78. data/ext/iup-linux/libiup_pplot.so +0 -0
  79. data/ext/iup-linux/libiupcontrols.so +0 -0
  80. data/ext/iup-linux/libiupgl.so +0 -0
  81. data/ext/iup-linux/libiupim.so +0 -0
  82. data/ext/iup-linux/libiupimglib.so +0 -0
  83. data/ext/iup-linux/libiupmot.so +0 -0
  84. data/ext/iup-win32/cd.dll +0 -0
  85. data/ext/iup-win32/cd.lib +0 -0
  86. data/ext/iup-win32/cdcontextplus.dll +0 -0
  87. data/ext/iup-win32/cdcontextplus.lib +0 -0
  88. data/ext/iup-win32/cdpdf.dll +0 -0
  89. data/ext/iup-win32/cdpdf.lib +0 -0
  90. data/ext/iup-win32/freetype6.dll +0 -0
  91. data/ext/iup-win32/freetype6.lib +0 -0
  92. data/ext/iup-win32/im.dll +0 -0
  93. data/ext/iup-win32/im.lib +0 -0
  94. data/ext/iup-win32/im_avi.dll +0 -0
  95. data/ext/iup-win32/im_avi.lib +0 -0
  96. data/ext/iup-win32/im_capture.dll +0 -0
  97. data/ext/iup-win32/im_capture.lib +0 -0
  98. data/ext/iup-win32/im_fftw.dll +0 -0
  99. data/ext/iup-win32/im_fftw.lib +0 -0
  100. data/ext/iup-win32/im_jp2.dll +0 -0
  101. data/ext/iup-win32/im_jp2.lib +0 -0
  102. data/ext/iup-win32/im_process.dll +0 -0
  103. data/ext/iup-win32/im_process.lib +0 -0
  104. data/ext/iup-win32/im_wmv.dll +0 -0
  105. data/ext/iup-win32/im_wmv.lib +0 -0
  106. data/ext/iup-win32/imlua_capture51.dll +0 -0
  107. data/ext/iup-win32/imlua_capture51.lib +0 -0
  108. data/ext/iup-win32/imlua_wmv51.dll +0 -0
  109. data/ext/iup-win32/imlua_wmv51.lib +0 -0
  110. data/ext/iup-win32/include/cd.h +494 -494
  111. data/ext/iup-win32/include/cd_canvas.hpp +358 -358
  112. data/ext/iup-win32/include/cd_old.h +158 -158
  113. data/ext/iup-win32/include/cd_private.h +362 -362
  114. data/ext/iup-win32/include/cdcgm.h +34 -34
  115. data/ext/iup-win32/include/cdclipbd.h +22 -22
  116. data/ext/iup-win32/include/cddbuf.h +23 -23
  117. data/ext/iup-win32/include/cddebug.h +24 -24
  118. data/ext/iup-win32/include/cddgn.h +23 -23
  119. data/ext/iup-win32/include/cddxf.h +22 -22
  120. data/ext/iup-win32/include/cdemf.h +22 -22
  121. data/ext/iup-win32/include/cdgdiplus.h +29 -29
  122. data/ext/iup-win32/include/cdimage.h +23 -23
  123. data/ext/iup-win32/include/cdirgb.h +30 -30
  124. data/ext/iup-win32/include/cdiup.h +22 -22
  125. data/ext/iup-win32/include/cdlua.h +39 -39
  126. data/ext/iup-win32/include/cdlua3_private.h +120 -120
  127. data/ext/iup-win32/include/cdlua5_private.h +141 -141
  128. data/ext/iup-win32/include/cdluaim.h +24 -24
  129. data/ext/iup-win32/include/cdluaiup.h +27 -27
  130. data/ext/iup-win32/include/cdluapdf.h +27 -27
  131. data/ext/iup-win32/include/cdmf.h +24 -24
  132. data/ext/iup-win32/include/cdmf_private.h +32 -32
  133. data/ext/iup-win32/include/cdnative.h +26 -26
  134. data/ext/iup-win32/include/cdpdf.h +38 -38
  135. data/ext/iup-win32/include/cdpicture.h +22 -22
  136. data/ext/iup-win32/include/cdprint.h +23 -23
  137. data/ext/iup-win32/include/cdps.h +37 -37
  138. data/ext/iup-win32/include/cdwmf.h +22 -22
  139. data/ext/iup-win32/include/iup.h +318 -255
  140. data/ext/iup-win32/include/iup_pplot.h +40 -40
  141. data/ext/iup-win32/include/iupcb.h +25 -25
  142. data/ext/iup-win32/include/iupcbs.h +43 -42
  143. data/ext/iup-win32/include/iupcells.h +130 -130
  144. data/ext/iup-win32/include/iupcolorbar.h +126 -126
  145. data/ext/iup-win32/include/iupcontrols.h +36 -40
  146. data/ext/iup-win32/include/iupdef.h +520 -520
  147. data/ext/iup-win32/include/iupdial.h +63 -64
  148. data/ext/iup-win32/include/iupgauge.h +57 -57
  149. data/ext/iup-win32/include/iupgetparam.h +1 -1
  150. data/ext/iup-win32/include/iupgl.h +101 -101
  151. data/ext/iup-win32/include/iupim.h +21 -21
  152. data/ext/iup-win32/include/iupkey.h +457 -290
  153. data/ext/iup-win32/include/iuplua.h +41 -41
  154. data/ext/iup-win32/include/iuplua_pplot.h +26 -26
  155. data/ext/iup-win32/include/iupluacontrols.h +27 -27
  156. data/ext/iup-win32/include/iupluagl.h +26 -26
  157. data/ext/iup-win32/include/iupluaim.h +26 -26
  158. data/ext/iup-win32/include/iupluaole.h +26 -26
  159. data/ext/iup-win32/include/iupmask.h +40 -52
  160. data/ext/iup-win32/include/iupmatrix.h +63 -69
  161. data/ext/iup-win32/include/iupole.h +24 -24
  162. data/ext/iup-win32/include/iupspin.h +21 -21
  163. data/ext/iup-win32/include/iuptabs.h +75 -79
  164. data/ext/iup-win32/include/iuptree.h +93 -93
  165. data/ext/iup-win32/include/iupval.h +46 -46
  166. data/ext/iup-win32/include/wd.h +78 -78
  167. data/ext/iup-win32/include/wd_old.h +85 -85
  168. data/ext/iup-win32/iup.dll +0 -0
  169. data/ext/iup-win32/iup.lib +0 -0
  170. data/ext/iup-win32/iup_pplot.dll +0 -0
  171. data/ext/iup-win32/iup_pplot.lib +0 -0
  172. data/ext/iup-win32/iupcd.dll +0 -0
  173. data/ext/iup-win32/iupcd.lib +0 -0
  174. data/ext/iup-win32/iupcontrols.dll +0 -0
  175. data/ext/iup-win32/iupcontrols.lib +0 -0
  176. data/ext/iup-win32/iupgl.dll +0 -0
  177. data/ext/iup-win32/iupgl.lib +0 -0
  178. data/ext/iup-win32/iupgtk.dll +0 -0
  179. data/ext/iup-win32/iupgtk.lib +0 -0
  180. data/ext/iup-win32/iupim.dll +0 -0
  181. data/ext/iup-win32/iupim.lib +0 -0
  182. data/ext/iup-win32/iupimglib.dll +0 -0
  183. data/ext/iup-win32/iupimglib.lib +0 -0
  184. data/ext/iup-win32/iupole.dll +0 -0
  185. data/ext/iup-win32/iupole.lib +0 -0
  186. data/ext/iup-win32/iupstub.lib +0 -0
  187. data/ext/iup-win32/pdflib.dll +0 -0
  188. data/ext/iup-win32/pdflib.lib +0 -0
  189. data/ext/iup.c +3 -351
  190. data/ext/rb_iup.h +48 -15
  191. data/ext/rb_iupcb.h +1 -0
  192. data/ext/rb_iupcells.h +1 -0
  193. data/ext/rb_iupcolorbar.h +1 -4
  194. data/ext/rb_iupcontrols.h +0 -5
  195. data/ext/rb_iupdial.h +1 -0
  196. data/ext/rb_iupgauge.h +1 -0
  197. data/ext/rb_iupgc.h +0 -1
  198. data/ext/rb_iupmatrix.h +1 -0
  199. data/ext/rb_iupsbox.h +0 -1
  200. data/ext/rb_iuptabs.h +1 -0
  201. data/ext/rb_iuptree.h +1 -0
  202. data/ext/rb_iupval.h +1 -0
  203. metadata +16 -29
  204. data/ext/iup-linux/include/iupcbox.h +0 -23
  205. data/ext/iup-linux/include/iupcompat.h +0 -62
  206. data/ext/iup-linux/include/iupcpi.h +0 -76
  207. data/ext/iup-linux/include/iupgc.h +0 -20
  208. data/ext/iup-linux/include/iupsbox.h +0 -20
  209. data/ext/iup-linux/include/iupspeech.h +0 -23
  210. data/ext/iup-linux/libcdluacontextplus51.so +0 -0
  211. data/ext/iup-win32/cdlua51.lib +0 -0
  212. data/ext/iup-win32/cdluacontextplus51.lib +0 -0
  213. data/ext/iup-win32/cdluaim51.lib +0 -0
  214. data/ext/iup-win32/cdluapdf51.lib +0 -0
  215. data/ext/iup-win32/include/iupcbox.h +0 -23
  216. data/ext/iup-win32/include/iupcompat.h +0 -62
  217. data/ext/iup-win32/include/iupcpi.h +0 -76
  218. data/ext/iup-win32/include/iupgc.h +0 -20
  219. data/ext/iup-win32/include/iupsbox.h +0 -20
  220. data/ext/iup-win32/include/iupspeech.h +0 -23
  221. data/ext/iup-win32/iuplua51.lib +0 -0
  222. data/ext/iup-win32/iuplua_pplot51.lib +0 -0
  223. data/ext/iup-win32/iupluacd51.lib +0 -0
  224. data/ext/iup-win32/iupluacontrols51.lib +0 -0
  225. data/ext/iup-win32/iupluagl51.lib +0 -0
  226. data/ext/iup-win32/iupluaim51.lib +0 -0
  227. data/ext/iup-win32/iupluaimglib51.lib +0 -0
  228. data/ext/iup-win32/iupluaole51.lib +0 -0
  229. data/ext/rb_iupcbox.h +0 -40
  230. data/ext/rb_iupspeech.h +0 -25
@@ -1,23 +1,23 @@
1
- /** \file
2
- * \brief Printer driver
3
- *
4
- * See Copyright Notice in cd.h
5
- */
6
-
7
- #ifndef __CD_PRINTER_H
8
- #define __CD_PRINTER_H
9
-
10
- #ifdef __cplusplus
11
- extern "C" {
12
- #endif
13
-
14
- cdContext* cdContextPrinter(void);
15
-
16
- #define CD_PRINTER cdContextPrinter()
17
-
18
- #ifdef __cplusplus
19
- }
20
- #endif
21
-
22
- #endif /* ifndef __CD_PRINTER_ */
23
-
1
+ /** \file
2
+ * \brief Printer driver
3
+ *
4
+ * See Copyright Notice in cd.h
5
+ */
6
+
7
+ #ifndef __CD_PRINTER_H
8
+ #define __CD_PRINTER_H
9
+
10
+ #ifdef __cplusplus
11
+ extern "C" {
12
+ #endif
13
+
14
+ cdContext* cdContextPrinter(void);
15
+
16
+ #define CD_PRINTER cdContextPrinter()
17
+
18
+ #ifdef __cplusplus
19
+ }
20
+ #endif
21
+
22
+ #endif /* ifndef __CD_PRINTER_ */
23
+
@@ -1,37 +1,37 @@
1
- /** \file
2
- * \brief PS driver
3
- *
4
- * See Copyright Notice in cd.h
5
- */
6
-
7
- #ifndef __CD_PS_H
8
- #define __CD_PS_H
9
-
10
- #ifdef __cplusplus
11
- extern "C" {
12
- #endif
13
-
14
- cdContext* cdContextPS(void);
15
-
16
- #define CD_PS cdContextPS()
17
-
18
- #ifndef CD_PAPERSIZE
19
- #define CD_PAPERSIZE
20
- enum { /* paper sizes */
21
- CD_A0,
22
- CD_A1,
23
- CD_A2,
24
- CD_A3,
25
- CD_A4,
26
- CD_A5,
27
- CD_LETTER,
28
- CD_LEGAL
29
- };
30
- #endif
31
-
32
- #ifdef __cplusplus
33
- }
34
- #endif
35
-
36
- #endif /* ifndef __CD_PS_ */
37
-
1
+ /** \file
2
+ * \brief PS driver
3
+ *
4
+ * See Copyright Notice in cd.h
5
+ */
6
+
7
+ #ifndef __CD_PS_H
8
+ #define __CD_PS_H
9
+
10
+ #ifdef __cplusplus
11
+ extern "C" {
12
+ #endif
13
+
14
+ cdContext* cdContextPS(void);
15
+
16
+ #define CD_PS cdContextPS()
17
+
18
+ #ifndef CD_PAPERSIZE
19
+ #define CD_PAPERSIZE
20
+ enum { /* paper sizes */
21
+ CD_A0,
22
+ CD_A1,
23
+ CD_A2,
24
+ CD_A3,
25
+ CD_A4,
26
+ CD_A5,
27
+ CD_LETTER,
28
+ CD_LEGAL
29
+ };
30
+ #endif
31
+
32
+ #ifdef __cplusplus
33
+ }
34
+ #endif
35
+
36
+ #endif /* ifndef __CD_PS_ */
37
+
@@ -1,22 +1,22 @@
1
- /** \file
2
- * \brief WMF driver
3
- *
4
- * See Copyright Notice in cd.h
5
- */
6
-
7
- #ifndef __CD_WMF_H
8
- #define __CD_WMF_H
9
-
10
- #ifdef __cplusplus
11
- extern "C" {
12
- #endif
13
-
14
- cdContext* cdContextWMF(void);
15
-
16
- #define CD_WMF cdContextWMF()
17
-
18
- #ifdef __cplusplus
19
- }
20
- #endif
21
-
22
- #endif
1
+ /** \file
2
+ * \brief WMF driver
3
+ *
4
+ * See Copyright Notice in cd.h
5
+ */
6
+
7
+ #ifndef __CD_WMF_H
8
+ #define __CD_WMF_H
9
+
10
+ #ifdef __cplusplus
11
+ extern "C" {
12
+ #endif
13
+
14
+ cdContext* cdContextWMF(void);
15
+
16
+ #define CD_WMF cdContextWMF()
17
+
18
+ #ifdef __cplusplus
19
+ }
20
+ #endif
21
+
22
+ #endif
@@ -1,255 +1,318 @@
1
- /** \file
2
- * \brief User API
3
- * IUP - A Portable User Interface Toolkit
4
- * Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
5
- * http://www.tecgraf.puc-rio.br/iup mailto:iup@tecgraf.puc-rio.br
6
- *
7
- * See Copyright Notice at the end of this file
8
- */
9
-
10
- #ifndef __IUP_H
11
- #define __IUP_H
12
-
13
- #include <iupkey.h>
14
- #include <iupdef.h>
15
-
16
- #ifdef __cplusplus
17
- extern "C" {
18
- #endif
19
-
20
-
21
- #define IUP_NAME "IUP - Portable User Interface"
22
- #define IUP_COPYRIGHT "Copyright (C) 1994-2008 Tecgraf, PUC-Rio."
23
- #define IUP_DESCRIPTION "Portable toolkit for building graphical user interfaces."
24
- #define IUP_VERSION "2.7.0"
25
- #define IUP_VERSION_DATE "2008/10/14"
26
- #define IUP_VERSION_NUMBER 207000
27
-
28
- typedef struct Ihandle_ Ihandle;
29
- typedef int (*Icallback)(Ihandle*);
30
-
31
- /************************************************************************/
32
- /* pre-definided dialogs */
33
- /************************************************************************/
34
- Ihandle* IupFileDlg(void);
35
-
36
- int IupGetFile (char *arq);
37
- void IupMessage (const char *title, const char *msg);
38
- void IupMessagef (const char *title, const char *format, ...);
39
- int IupAlarm (const char *title, const char *msg, const char *b1, const char *b2, const char *b3);
40
- int IupScanf (const char *format, ...);
41
- int IupListDialog (int type, const char *title, int size, const char *lst[],
42
- int op, int col, int line, int marks[]);
43
- int IupGetText (const char* title, char* text);
44
-
45
- /************************************************************************/
46
- /* Functions */
47
- /************************************************************************/
48
-
49
- int IupOpen (int *argc, char ***argv);
50
- void IupClose (void);
51
-
52
- int IupMainLoop (void);
53
- int IupLoopStep (void);
54
- void IupFlush (void);
55
- void IupExitLoop (void);
56
-
57
- void IupUpdate (Ihandle* ih);
58
- void IupRefresh (Ihandle* ih);
59
- char* IupMapFont (const char *iupfont);
60
- char* IupUnMapFont (const char *driverfont);
61
- int IupHelp (const char* url);
62
- char * IupLoad (const char *filename);
63
-
64
- char* IupVersion (void);
65
- char* IupVersionDate (void);
66
- int IupVersionNumber (void);
67
- void IupSetLanguage (const char *lng);
68
- char* IupGetLanguage (void);
69
-
70
- void IupDestroy (Ihandle *ih);
71
- void IupDetach (Ihandle *child);
72
- Ihandle* IupAppend (Ihandle *ih, Ihandle *child);
73
- Ihandle* IupGetNextChild (Ihandle *ih, Ihandle *child);
74
- Ihandle* IupGetBrother (Ihandle *ih);
75
- Ihandle* IupGetParent (Ihandle *ih);
76
- Ihandle* IupGetDialog (Ihandle *ih);
77
-
78
- int IupPopup (Ihandle *ih, int x, int y);
79
- int IupShow (Ihandle *ih);
80
- int IupShowXY (Ihandle *ih, int x, int y);
81
- int IupHide (Ihandle *ih);
82
- int IupMap (Ihandle *ih);
83
-
84
- void IupSetAttribute (Ihandle *ih, const char* name, const char* value);
85
- void IupStoreAttribute(Ihandle *ih, const char* name, const char* value);
86
- Ihandle* IupSetAttributes (Ihandle *ih, const char *str);
87
- char* IupGetAttribute (Ihandle *ih, const char* name);
88
- char* IupGetAttributes (Ihandle *ih);
89
- int IupGetInt (Ihandle *ih, const char* name);
90
- int IupGetInt2 (Ihandle *ih, const char* name);
91
- float IupGetFloat (Ihandle *ih, const char* name);
92
- void IupSetfAttribute (Ihandle *ih, const char* name, const char* format, ...);
93
-
94
- void IupSetGlobal (const char* name, const char* value);
95
- void IupStoreGlobal (const char* name, const char* value);
96
- char* IupGetGlobal (const char* name);
97
-
98
- Ihandle* IupSetFocus (Ihandle *ih);
99
- Ihandle* IupGetFocus (void);
100
- Ihandle* IupPreviousField (Ihandle *ih);
101
- Ihandle* IupNextField (Ihandle *ih);
102
-
103
- Icallback IupGetCallback(Ihandle *ih, const char *name);
104
- Icallback IupSetCallback(Ihandle *ih, const char *name, Icallback func);
105
- Ihandle* IupSetCallbacks(Ihandle* ih, ...);
106
-
107
- Icallback IupGetFunction (const char *name);
108
- Icallback IupSetFunction (const char *name, Icallback func);
109
- const char* IupGetActionName (void);
110
-
111
- Ihandle* IupGetHandle (const char *name);
112
- Ihandle* IupSetHandle (const char *name, Ihandle *ih);
113
- int IupGetAllNames (char *names[], int n);
114
- int IupGetAllDialogs (char *names[], int n);
115
- char* IupGetName (Ihandle* ih);
116
-
117
- void IupSetAttributeHandle (Ihandle *ih, const char* name, Ihandle *ih_named);
118
- Ihandle* IupGetAttributeHandle(Ihandle *ih, const char* name);
119
-
120
- char* IupGetClassName (Ihandle *ih);
121
-
122
- Ihandle* IupCreate (const char *name);
123
- Ihandle* IupCreatev (const char *name, void* *params);
124
- Ihandle* IupCreatep (const char *name, void* first, ...);
125
-
126
- Ihandle* IupFill (void);
127
- Ihandle* IupRadio (Ihandle *child);
128
- Ihandle* IupVbox (Ihandle* child, ...);
129
- Ihandle* IupVboxv (Ihandle* *children);
130
- Ihandle* IupZbox (Ihandle* child, ...);
131
- Ihandle* IupZboxv (Ihandle* *children);
132
- Ihandle* IupHbox (Ihandle* child,...);
133
- Ihandle* IupHboxv (Ihandle* *children);
134
-
135
-
136
- Ihandle* IupFrame (Ihandle* child);
137
-
138
- Ihandle* IupImage (int width, int height, const unsigned char *pixmap);
139
- Ihandle* IupButton (const char* title, const char* action);
140
- Ihandle* IupCanvas (const char* action);
141
- Ihandle* IupDialog (Ihandle* child);
142
- Ihandle* IupUser (void);
143
- Ihandle* IupItem (const char* title, const char* action);
144
- Ihandle* IupSubmenu (const char* title, Ihandle* child);
145
- Ihandle* IupSeparator (void);
146
- Ihandle* IupLabel (const char* title);
147
- Ihandle* IupList (const char* action);
148
- Ihandle* IupMenu (Ihandle *child,...);
149
- Ihandle* IupMenuv (Ihandle **children);
150
- Ihandle* IupText (const char* action);
151
- Ihandle* IupMultiLine (const char* action);
152
- Ihandle* IupToggle (const char* title, const char* action);
153
- Ihandle* IupTimer (void);
154
-
155
- #ifdef __cplusplus
156
- }
157
- #endif
158
-
159
- /************************************************************************/
160
- /* Common Return Values */
161
- /************************************************************************/
162
- #define IUP_ERROR 1
163
- #define IUP_NOERROR 0
164
- #define IUP_OPENED -1
165
- #define IUP_INVALID -1
166
-
167
- /************************************************************************/
168
- /* Callback Return Values */
169
- /************************************************************************/
170
- #define IUP_IGNORE -1
171
- #define IUP_DEFAULT -2
172
- #define IUP_CLOSE -3
173
- #define IUP_CONTINUE -4
174
-
175
- /************************************************************************/
176
- /* IupPopup and IupShowXY Parameter Values */
177
- /************************************************************************/
178
- #define IUP_CENTER 0xFFFF /* 65535 */
179
- #define IUP_LEFT 0xFFFE /* 65534 */
180
- #define IUP_RIGHT 0xFFFD /* 65533 */
181
- #define IUP_MOUSEPOS 0xFFFC /* 65532 */
182
- #define IUP_CURRENT 0xFFFB /* 65531 */
183
- #define IUP_CENTERPARENT 0xFFFA
184
- #define IUP_TOP IUP_LEFT
185
- #define IUP_BOTTOM IUP_RIGHT
186
-
187
- /************************************************************************/
188
- /* SHOW_CB Callback Values */
189
- /************************************************************************/
190
- enum{IUP_SHOW, IUP_RESTORE, IUP_MINIMIZE, IUP_MAXIMIZE, IUP_HIDE};
191
-
192
- /************************************************************************/
193
- /* SCROLL_CB Callback Values */
194
- /************************************************************************/
195
- enum{IUP_SBUP, IUP_SBDN, IUP_SBPGUP, IUP_SBPGDN, IUP_SBPOSV, IUP_SBDRAGV,
196
- IUP_SBLEFT, IUP_SBRIGHT, IUP_SBPGLEFT, IUP_SBPGRIGHT, IUP_SBPOSH, IUP_SBDRAGH};
197
-
198
- /************************************************************************/
199
- /* Mouse Button Values and Macros */
200
- /************************************************************************/
201
- #define IUP_BUTTON1 '1'
202
- #define IUP_BUTTON2 '2'
203
- #define IUP_BUTTON3 '3'
204
- #define IUP_BUTTON4 '4'
205
- #define IUP_BUTTON5 '5'
206
-
207
- #define isshift(_s) (_s[0]=='S')
208
- #define iscontrol(_s) (_s[1]=='C')
209
- #define isbutton1(_s) (_s[2]=='1')
210
- #define isbutton2(_s) (_s[3]=='2')
211
- #define isbutton3(_s) (_s[4]=='3')
212
- #define isdouble(_s) (_s[5]=='D')
213
- #define isalt(_s) (_s[6]=='A')
214
- #define issys(_s) (_s[7]=='Y')
215
- #define isbutton4(_s) (_s[8]=='4')
216
- #define isbutton5(_s) (_s[9]=='5')
217
-
218
-
219
- /************************************************************************/
220
- /* Replacement for the WinMain in Windows, */
221
- /* this allows the application to start from "main". */
222
- /************************************************************************/
223
- #if defined (__WATCOMC__) || defined (__MWERKS__)
224
- #ifdef __cplusplus
225
- extern "C" {
226
- int IupMain (int argc, char** argv); /* In C++ we have to declare the prototype */
227
- }
228
- #endif
229
- #define main IupMain /* this is the trick for Watcom and MetroWerks */
230
- #endif
231
-
232
- /******************************************************************************
233
- * Copyright (C) 1994-2008 Tecgraf, PUC-Rio.
234
- *
235
- * Permission is hereby granted, free of charge, to any person obtaining
236
- * a copy of this software and associated documentation files (the
237
- * "Software"), to deal in the Software without restriction, including
238
- * without limitation the rights to use, copy, modify, merge, publish,
239
- * distribute, sublicense, and/or sell copies of the Software, and to
240
- * permit persons to whom the Software is furnished to do so, subject to
241
- * the following conditions:
242
- *
243
- * The above copyright notice and this permission notice shall be
244
- * included in all copies or substantial portions of the Software.
245
- *
246
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
247
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
248
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
249
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
250
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
251
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
252
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
253
- ******************************************************************************/
254
-
255
- #endif
1
+ /** \file
2
+ * \brief User API
3
+ * IUP - A Portable User Interface Toolkit
4
+ * Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
5
+ * http://www.tecgraf.puc-rio.br/iup mailto:iup@tecgraf.puc-rio.br
6
+ *
7
+ * See Copyright Notice at the end of this file
8
+ */
9
+
10
+ #ifndef __IUP_H
11
+ #define __IUP_H
12
+
13
+ #include <iupkey.h>
14
+ #include <iupdef.h>
15
+
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+
20
+
21
+ #define IUP_NAME "IUP - Portable User Interface"
22
+ #define IUP_COPYRIGHT "Copyright (C) 1994-2008 Tecgraf, PUC-Rio."
23
+ #define IUP_DESCRIPTION "Portable toolkit for building graphical user interfaces."
24
+ #define IUP_VERSION "3.0beta1"
25
+ #define IUP_VERSION_DATE "2008/12/03"
26
+ #define IUP_VERSION_NUMBER 300000
27
+
28
+ typedef struct Ihandle_ Ihandle;
29
+ typedef int (*Icallback)(Ihandle*);
30
+
31
+ /************************************************************************/
32
+ /* pre-definided dialogs */
33
+ /************************************************************************/
34
+ Ihandle* IupFileDlg(void);
35
+ Ihandle* IupMessageDlg(void);
36
+ Ihandle* IupColorDlg(void);
37
+ Ihandle* IupFontDlg(void);
38
+
39
+ int IupGetFile(char *arq);
40
+ void IupMessage(const char *title, const char *msg);
41
+ void IupMessagef(const char *title, const char *format, ...);
42
+ int IupAlarm(const char *title, const char *msg, const char *b1, const char *b2, const char *b3);
43
+ int IupScanf(const char *format, ...);
44
+ int IupListDialog(int type, const char *title, int size, const char *lst[],
45
+ int op, int col, int line, int marks[]);
46
+ int IupGetText(const char* title, char* text);
47
+ int IupGetColor(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);
48
+
49
+
50
+ /************************************************************************/
51
+ /* Functions */
52
+ /************************************************************************/
53
+
54
+ int IupOpen (int *argc, char ***argv);
55
+ void IupClose (void);
56
+ void IupImageLibOpen (void);
57
+
58
+ int IupMainLoop (void);
59
+ int IupLoopStep (void);
60
+ int IupMainLoopLevel (void);
61
+ void IupFlush (void);
62
+ void IupExitLoop (void);
63
+
64
+ void IupUpdate (Ihandle* ih);
65
+ void IupUpdateChildren(Ihandle* ih);
66
+ void IupRefresh (Ihandle* ih);
67
+
68
+ char* IupMapFont (const char *iupfont);
69
+ char* IupUnMapFont (const char *driverfont);
70
+ int IupHelp (const char* url);
71
+ char* IupLoad (const char *filename);
72
+
73
+ char* IupVersion (void);
74
+ char* IupVersionDate (void);
75
+ int IupVersionNumber (void);
76
+ void IupSetLanguage (const char *lng);
77
+ char* IupGetLanguage (void);
78
+
79
+ void IupDestroy (Ihandle* ih);
80
+ void IupDetach (Ihandle* child);
81
+ Ihandle* IupAppend (Ihandle* ih, Ihandle* child);
82
+ Ihandle* IupInsert (Ihandle* ih, Ihandle* ref_child, Ihandle* child);
83
+ Ihandle* IupGetChild (Ihandle* ih, int pos);
84
+ int IupGetChildPos (Ihandle* ih, Ihandle* child);
85
+ int IupGetChildCount(Ihandle* ih);
86
+ Ihandle* IupGetNextChild (Ihandle* ih, Ihandle* child);
87
+ Ihandle* IupGetBrother (Ihandle* ih);
88
+ Ihandle* IupGetParent (Ihandle* ih);
89
+ Ihandle* IupGetDialog (Ihandle* ih);
90
+ Ihandle* IupGetDialogChild(Ihandle* ih, const char* name);
91
+ int IupReparent (Ihandle* ih, Ihandle* new_parent);
92
+
93
+ int IupPopup (Ihandle* ih, int x, int y);
94
+ int IupShow (Ihandle* ih);
95
+ int IupShowXY (Ihandle* ih, int x, int y);
96
+ int IupHide (Ihandle* ih);
97
+ int IupMap (Ihandle* ih);
98
+ void IupUnmap (Ihandle *ih);
99
+
100
+ void IupSetAttribute (Ihandle* ih, const char* name, const char* value);
101
+ void IupStoreAttribute(Ihandle* ih, const char* name, const char* value);
102
+ Ihandle* IupSetAttributes (Ihandle* ih, const char *str);
103
+ char* IupGetAttribute (Ihandle* ih, const char* name);
104
+ char* IupGetAttributes (Ihandle* ih);
105
+ int IupGetInt (Ihandle* ih, const char* name);
106
+ int IupGetInt2 (Ihandle* ih, const char* name);
107
+ int IupGetIntInt (Ihandle *ih, const char* name, int *i1, int *i2);
108
+ float IupGetFloat (Ihandle* ih, const char* name);
109
+ void IupSetfAttribute (Ihandle* ih, const char* name, const char* format, ...);
110
+ int IupGetAllAttributes(Ihandle* ih, char *names[], int n);
111
+
112
+ void IupSetGlobal (const char* name, const char* value);
113
+ void IupStoreGlobal (const char* name, const char* value);
114
+ char* IupGetGlobal (const char* name);
115
+
116
+ Ihandle* IupSetFocus (Ihandle* ih);
117
+ Ihandle* IupGetFocus (void);
118
+ Ihandle* IupPreviousField (Ihandle* ih);
119
+ Ihandle* IupNextField (Ihandle* ih);
120
+
121
+ Icallback IupGetCallback(Ihandle* ih, const char *name);
122
+ Icallback IupSetCallback(Ihandle* ih, const char *name, Icallback func);
123
+ Ihandle* IupSetCallbacks(Ihandle* ih, const char *name, Icallback func, ...);
124
+
125
+ Icallback IupGetFunction (const char *name);
126
+ Icallback IupSetFunction (const char *name, Icallback func);
127
+ const char* IupGetActionName (void);
128
+
129
+ Ihandle* IupGetHandle (const char *name);
130
+ Ihandle* IupSetHandle (const char *name, Ihandle* ih);
131
+ int IupGetAllNames (char *names[], int n);
132
+ int IupGetAllDialogs (char *names[], int n);
133
+ char* IupGetName (Ihandle* ih);
134
+
135
+ void IupSetAttributeHandle(Ihandle* ih, const char* name, Ihandle* ih_named);
136
+ Ihandle* IupGetAttributeHandle(Ihandle* ih, const char* name);
137
+
138
+ char* IupGetClassName(Ihandle* ih);
139
+ char* IupGetClassType(Ihandle* ih);
140
+ int IupGetClassAttributes(Ihandle* ih, char *names[], int n);
141
+ void IupSaveClassAttributes(Ihandle* ih);
142
+
143
+ Ihandle* IupCreate (const char *name);
144
+ Ihandle* IupCreatev(const char *name, void* *params);
145
+ Ihandle* IupCreatep(const char *name, void *first, ...);
146
+
147
+ Ihandle* IupFill (void);
148
+ Ihandle* IupRadio (Ihandle* child);
149
+ Ihandle* IupVbox (Ihandle* child, ...);
150
+ Ihandle* IupVboxv (Ihandle* *children);
151
+ Ihandle* IupZbox (Ihandle* child, ...);
152
+ Ihandle* IupZboxv (Ihandle* *children);
153
+ Ihandle* IupHbox (Ihandle* child,...);
154
+ Ihandle* IupHboxv (Ihandle* *children);
155
+
156
+ Ihandle* IupNormalizer (Ihandle* ih_first, ...);
157
+ Ihandle* IupNormalizerv(Ihandle* *ih_list);
158
+
159
+ Ihandle* IupCbox (Ihandle* child, ...);
160
+ Ihandle* IupCboxv (Ihandle* *children);
161
+ Ihandle* IupSbox (Ihandle *child);
162
+
163
+ Ihandle* IupFrame (Ihandle* child);
164
+
165
+ Ihandle* IupImage (int width, int height, const unsigned char *pixmap);
166
+ Ihandle* IupImageRGB (int width, int height, const unsigned char *pixmap);
167
+ Ihandle* IupImageRGBA (int width, int height, const unsigned char *pixmap);
168
+ Ihandle* IupButton (const char* title, const char* action);
169
+ Ihandle* IupCanvas (const char* action);
170
+ Ihandle* IupDialog (Ihandle* child);
171
+ Ihandle* IupUser (void);
172
+ Ihandle* IupItem (const char* title, const char* action);
173
+ Ihandle* IupSubmenu (const char* title, Ihandle* child);
174
+ Ihandle* IupSeparator (void);
175
+ Ihandle* IupLabel (const char* title);
176
+ Ihandle* IupList (const char* action);
177
+ Ihandle* IupMenu (Ihandle* child,...);
178
+ Ihandle* IupMenuv (Ihandle* *children);
179
+ Ihandle* IupText (const char* action);
180
+ Ihandle* IupMultiLine (const char* action);
181
+ Ihandle* IupToggle (const char* title, const char* action);
182
+ Ihandle* IupTimer (void);
183
+
184
+ Ihandle* IupProgressBar(void);
185
+ Ihandle* IupVal (const char *type);
186
+ Ihandle* IupTabs (Ihandle* child, ...);
187
+ Ihandle* IupTabsv (Ihandle* *children);
188
+
189
+ void IupTextConvertXYToChar(Ihandle* ih, int x, int y, int *lin, int *col, int *pos);
190
+ void IupListConvertXYToItem(Ihandle* ih, int x, int y, int *pos);
191
+
192
+
193
+ #ifdef __cplusplus
194
+ }
195
+ #endif
196
+
197
+ /************************************************************************/
198
+ /* Common Return Values */
199
+ /************************************************************************/
200
+ #define IUP_ERROR 1
201
+ #define IUP_NOERROR 0
202
+ #define IUP_OPENED -1
203
+ #define IUP_INVALID -1
204
+
205
+ /************************************************************************/
206
+ /* Callback Return Values */
207
+ /************************************************************************/
208
+ #define IUP_IGNORE -1
209
+ #define IUP_DEFAULT -2
210
+ #define IUP_CLOSE -3
211
+ #define IUP_CONTINUE -4
212
+
213
+ /************************************************************************/
214
+ /* IupPopup and IupShowXY Parameter Values */
215
+ /************************************************************************/
216
+ #define IUP_CENTER 0xFFFF /* 65535 */
217
+ #define IUP_LEFT 0xFFFE /* 65534 */
218
+ #define IUP_RIGHT 0xFFFD /* 65533 */
219
+ #define IUP_MOUSEPOS 0xFFFC /* 65532 */
220
+ #define IUP_CURRENT 0xFFFB /* 65531 */
221
+ #define IUP_CENTERPARENT 0xFFFA /* 65530 */
222
+ #define IUP_TOP IUP_LEFT
223
+ #define IUP_BOTTOM IUP_RIGHT
224
+
225
+ /************************************************************************/
226
+ /* SHOW_CB Callback Values */
227
+ /************************************************************************/
228
+ enum{IUP_SHOW, IUP_RESTORE, IUP_MINIMIZE, IUP_MAXIMIZE, IUP_HIDE};
229
+
230
+ /************************************************************************/
231
+ /* SCROLL_CB Callback Values */
232
+ /************************************************************************/
233
+ enum{IUP_SBUP, IUP_SBDN, IUP_SBPGUP, IUP_SBPGDN, IUP_SBPOSV, IUP_SBDRAGV,
234
+ IUP_SBLEFT, IUP_SBRIGHT, IUP_SBPGLEFT, IUP_SBPGRIGHT, IUP_SBPOSH, IUP_SBDRAGH};
235
+
236
+ /************************************************************************/
237
+ /* Mouse Button Values and Macros */
238
+ /************************************************************************/
239
+ #define IUP_BUTTON1 '1'
240
+ #define IUP_BUTTON2 '2'
241
+ #define IUP_BUTTON3 '3'
242
+ #define IUP_BUTTON4 '4'
243
+ #define IUP_BUTTON5 '5'
244
+
245
+ #define iup_isshift(_s) (_s[0]=='S')
246
+ #define iup_iscontrol(_s) (_s[1]=='C')
247
+ #define iup_isbutton1(_s) (_s[2]=='1')
248
+ #define iup_isbutton2(_s) (_s[3]=='2')
249
+ #define iup_isbutton3(_s) (_s[4]=='3')
250
+ #define iup_isdouble(_s) (_s[5]=='D')
251
+ #define iup_isalt(_s) (_s[6]=='A')
252
+ #define iup_issys(_s) (_s[7]=='Y')
253
+ #define iup_isbutton4(_s) (_s[8]=='4')
254
+ #define iup_isbutton5(_s) (_s[9]=='5')
255
+ #define isshift iup_isshift
256
+ #define iscontrol iup_iscontrol
257
+ #define isbutton1 iup_isbutton1
258
+ #define isbutton2 iup_isbutton2
259
+ #define isbutton3 iup_isbutton3
260
+ #define isdouble iup_isdouble
261
+ #define isalt iup_isalt
262
+ #define issys iup_issys
263
+ #define isbutton4 iup_isbutton4
264
+ #define isbutton5 iup_isbutton5
265
+
266
+
267
+ /************************************************************************/
268
+ /* Pre-Defined Masks */
269
+ /************************************************************************/
270
+ #define IUP_MASK_FLOAT "[+/-]?(/d+/.?/d*|/./d+)"
271
+ #define IUP_MASK_UFLOAT "(/d+/.?/d*|/./d+)"
272
+ #define IUP_MASK_EFLOAT "[+/-]?(/d+/.?/d*|/./d+)([eE][+/-]?/d+)?"
273
+ #define IUP_MASK_INT "[+/-]?/d+"
274
+ #define IUP_MASK_UINT "/d+"
275
+ #define IUPMASK_FLOAT IUP_MASK_FLOAT
276
+ #define IUPMASK_UFLOAT IUP_MASK_UFLOAT
277
+ #define IUPMASK_EFLOAT IUP_MASK_EFLOAT
278
+ #define IUPMASK_INT IUP_MASK_INT
279
+ #define IUPMASK_UINT IUP_MASK_UINT
280
+
281
+
282
+ /************************************************************************/
283
+ /* Replacement for the WinMain in Windows, */
284
+ /* this allows the application to start from "main". */
285
+ /************************************************************************/
286
+ #if defined (__WATCOMC__) || defined (__MWERKS__)
287
+ #ifdef __cplusplus
288
+ extern "C" {
289
+ int IupMain (int argc, char** argv); /* In C++ we have to declare the prototype */
290
+ }
291
+ #endif
292
+ #define main IupMain /* this is the trick for Watcom and MetroWerks */
293
+ #endif
294
+
295
+ /******************************************************************************
296
+ * Copyright (C) 1994-2008 Tecgraf, PUC-Rio.
297
+ *
298
+ * Permission is hereby granted, free of charge, to any person obtaining
299
+ * a copy of this software and associated documentation files (the
300
+ * "Software"), to deal in the Software without restriction, including
301
+ * without limitation the rights to use, copy, modify, merge, publish,
302
+ * distribute, sublicense, and/or sell copies of the Software, and to
303
+ * permit persons to whom the Software is furnished to do so, subject to
304
+ * the following conditions:
305
+ *
306
+ * The above copyright notice and this permission notice shall be
307
+ * included in all copies or substantial portions of the Software.
308
+ *
309
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
310
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
311
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
312
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
313
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
314
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
315
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
316
+ ******************************************************************************/
317
+
318
+ #endif