iup-ffi 0.13.0-x86_64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/LICENCE.md +21 -0
  3. data/README.md +139 -0
  4. data/lib/iup-ffi-plain.rb +51 -0
  5. data/lib/iup-ffi.rb +70 -0
  6. data/lib/library/linux/libcd.so +0 -0
  7. data/lib/library/linux/libim.so +0 -0
  8. data/lib/library/linux/libiup.so +0 -0
  9. data/lib/library/linux/libiup_scintilla.so +0 -0
  10. data/lib/library/linux/libiupcd.so +0 -0
  11. data/lib/library/linux/libiupcontrols.so +0 -0
  12. data/lib/library/linux/libiupim.so +0 -0
  13. data/lib/library/linux/libiupimglib.so +0 -0
  14. data/lib/plain/iupcdlib.rb +158 -0
  15. data/lib/plain/iupcontrolslib.rb +28 -0
  16. data/lib/plain/iupimglib.rb +15 -0
  17. data/lib/plain/iupimlib.rb +18 -0
  18. data/lib/plain/iuplib.rb +354 -0
  19. data/lib/plain/scintilla-lib.rb +17 -0
  20. data/lib/wrapped/attribute-builders.rb +93 -0
  21. data/lib/wrapped/attribute-reference.rb +27 -0
  22. data/lib/wrapped/background-box.rb +37 -0
  23. data/lib/wrapped/button.rb +152 -0
  24. data/lib/wrapped/callback-setter.rb +78 -0
  25. data/lib/wrapped/canvas.rb +698 -0
  26. data/lib/wrapped/colorbar.rb +212 -0
  27. data/lib/wrapped/colordialog.rb +121 -0
  28. data/lib/wrapped/common-attributes.rb +34 -0
  29. data/lib/wrapped/constants.rb +504 -0
  30. data/lib/wrapped/dial.rb +129 -0
  31. data/lib/wrapped/dialog.rb +309 -0
  32. data/lib/wrapped/drag-drop-attributes.rb +98 -0
  33. data/lib/wrapped/dynamic-fill-methods.rb +22 -0
  34. data/lib/wrapped/expander.rb +128 -0
  35. data/lib/wrapped/filedialog.rb +168 -0
  36. data/lib/wrapped/fill.rb +29 -0
  37. data/lib/wrapped/fontdialog.rb +71 -0
  38. data/lib/wrapped/frame.rb +70 -0
  39. data/lib/wrapped/gridbox.rb +188 -0
  40. data/lib/wrapped/hbox.rb +90 -0
  41. data/lib/wrapped/image-attributes.rb +58 -0
  42. data/lib/wrapped/image.rb +178 -0
  43. data/lib/wrapped/iup-global.rb +46 -0
  44. data/lib/wrapped/label.rb +110 -0
  45. data/lib/wrapped/link.rb +54 -0
  46. data/lib/wrapped/list.rb +567 -0
  47. data/lib/wrapped/matrix.rb +575 -0
  48. data/lib/wrapped/menu.rb +91 -0
  49. data/lib/wrapped/menuitem.rb +150 -0
  50. data/lib/wrapped/messagedialog.rb +127 -0
  51. data/lib/wrapped/progressbar.rb +91 -0
  52. data/lib/wrapped/progressdialog.rb +85 -0
  53. data/lib/wrapped/radio.rb +74 -0
  54. data/lib/wrapped/scintilla.rb +1112 -0
  55. data/lib/wrapped/scrollbar-attributes.rb +178 -0
  56. data/lib/wrapped/scrollbox.rb +40 -0
  57. data/lib/wrapped/separator.rb +24 -0
  58. data/lib/wrapped/splitbox.rb +114 -0
  59. data/lib/wrapped/stretchbox.rb +70 -0
  60. data/lib/wrapped/submenu.rb +58 -0
  61. data/lib/wrapped/tabs.rb +223 -0
  62. data/lib/wrapped/text.rb +382 -0
  63. data/lib/wrapped/timer.rb +82 -0
  64. data/lib/wrapped/toggle.rb +150 -0
  65. data/lib/wrapped/tree.rb +612 -0
  66. data/lib/wrapped/val.rb +162 -0
  67. data/lib/wrapped/vbox.rb +93 -0
  68. data/lib/wrapped/widget.rb +282 -0
  69. data/lib/wrapped/zbox.rb +80 -0
  70. metadata +131 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8edd907aec07e5ed908a4b5f20468f1b7a35a129ba2989304f65f6572d0f0494
4
+ data.tar.gz: dcbe30a536bcb097cecd1dda0a53600b11d225c34523ae93a3a7cd0ae8ff1c17
5
+ SHA512:
6
+ metadata.gz: 0bcd15aef23b41fc7bab2efbe43ed6ef9125e937482990adc45e30fe843f23d8c8447a37eca80f892ae7a8cce2f3dbfc1c3886225bff1eb96fe15df9b0bdc489
7
+ data.tar.gz: 9341a856b6949d9a21c7a830066772de7546567c2f599afd4728cd5861888ef4fad4d6d965a45ad7382d6df933dd1e5ffbfe33d6d08a5294fd3c6a9a5f98f07d
data/LICENCE.md ADDED
@@ -0,0 +1,21 @@
1
+ # The MIT Licence (MIT)
2
+
3
+ Copyright (c) 2014-26, Peter Lane.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,139 @@
1
+ # iup-ffi
2
+
3
+ FFI binding for Ruby to [Tecgraf's IUP](http://www.tecgraf.puc-rio.br/iup/)
4
+ portable user interface toolkit; IUP is a multi-platform toolkit for building
5
+ graphical user interfaces. The library provides both a low-level binding to
6
+ the C library calls, and a high-level wrapping of most widgets to give a more
7
+ natural Ruby syntax.
8
+
9
+ This library is available as a [rubygem](https://rubygems.org/gems/iup-ffi) or
10
+ in [source](https://codeberg.org/peterlane/iup-ffi) format.
11
+
12
+ [Tecgraf's IUP](http://www.tecgraf.puc-rio.br/iup/) documentation (Version
13
+ 3.32) should be read along with the API documentation for iup-ffi. A number of
14
+ examples can be found in the source, or downloaded with the latest tagged
15
+ [version](https://codeberg.org/peterlane/iup-ffi/tags).
16
+
17
+ ## Description
18
+
19
+ The module Iup provides a Ruby-flavoured syntax for creating a GUI, wrapping
20
+ each IUP component in a Ruby class with suitable mutators/accessors for the
21
+ attributes and associated methods. For example:
22
+
23
+ ```
24
+ require "iup-ffi"
25
+
26
+ Iup.mainloop do
27
+ btn = Iup::Button.new("click me", ->{ puts "clicked" }) do |b|
28
+ b.font = "Times, Bold 18"
29
+ end
30
+ puts "Button font is: ", btn.font
31
+
32
+ Iup::Dialog.new(btn) do |d|
33
+ d.title = "Example program"
34
+ end.show
35
+ end
36
+ ```
37
+
38
+ For direct access to the shared libraries, the bound functions for IUP, CD and
39
+ IM are available in separate modules (names ending in "Lib"). These low-level
40
+ functions provide a direct mapping to the C API of IUP. This can be useful
41
+ when converting code from other sources or when something is missing from the
42
+ wrapper. For example, the C program
43
+ (https://www.tecgraf.puc-rio.br/iup/examples/C/message.c):
44
+
45
+ ```
46
+ /* IupMessage Example */
47
+
48
+ #include <stdlib.h>
49
+ #include <stdio.h>
50
+
51
+ /* IUP libraries include */
52
+ #include <iup.h>
53
+
54
+ /* Main program */
55
+ int main(int argc, char **argv)
56
+ {
57
+ /* Initializes IUP */
58
+ IupOpen(&argc, &argv);
59
+
60
+ /* Executes IupMessage */
61
+ IupMessage("IupMessage Example", "Press the button");
62
+
63
+ /* Finishes IUP */
64
+ IupClose ();
65
+
66
+ /* Program finished successfully */
67
+ return EXIT_SUCCESS;
68
+
69
+ }
70
+ ```
71
+
72
+ is translated into Ruby as:
73
+
74
+ ```
75
+ require "iup-ffi" # or "iup-ffi-plain" for just the low-level bindings
76
+
77
+ IupLib.IupOpen(0, nil)
78
+ IupLib.IupMessage("IupMessage Example", "Press the button")
79
+ IupLib.IupClose
80
+ ```
81
+
82
+ ## Supported Widgets
83
+
84
+ (As IUP is a large library and continues to be expanded, the list of supported
85
+ widgets and their properties is at best partial.)
86
+
87
+ Top-level containers:
88
+
89
+ * Iup::ColorDialog, Iup::Dialog, Iup::FileDialog,
90
+ Iup::FontDialog, Iup::MessageDialog, Iup::ProgressDialog
91
+
92
+ Layout containers to arrange child widgets:
93
+
94
+ * Iup::Fill, Iup::GridBox, Iup::HBox, Iup::VBox, Iup::ZBox, Iup::ScrollBox, Iup::SplitBox, Iup::StretchBox,
95
+
96
+ Grouping containers to organise related controls:
97
+
98
+ * Iup::BackgroundBox, Iup::Expander, Iup::Frame, Iup::Radio, Iup::Tabs
99
+
100
+ Information controls to display data:
101
+
102
+ * Iup::Image, Iup::ImageRGB, Iup::ImageRGBA, Iup::Label, Iup::Link, Iup::ProgressBar
103
+
104
+ Interactive controls:
105
+
106
+ * Iup::Button, Iup::ColorBar, Iup::Dial, Iup::List, Iup::Text, Iup::Toggle, Iup::Tree, Iup::Val
107
+
108
+ Specialised/complex widgets:
109
+
110
+ * Iup::Canvas, Iup::Matrix, Iup::Scintilla
111
+
112
+ Non-visual controls and menus:
113
+
114
+ * Iup::Menu, Iup::MenuItem, Iup::Separator, Iup::SubMenu, Iup::Timer
115
+
116
+ ## Installation
117
+
118
+ Pre-built binaries are supported on Linux and Windows (x64) platforms:
119
+
120
+ ```
121
+ $ gem install iup-ffi
122
+ ```
123
+
124
+ * Windows gem does not include Iup::Scintilla.
125
+
126
+ From source, download the CD, IM and IUP shared libraries from
127
+ https://www.tecgraf.puc-rio.br/iup/en/download_tips.html into the appropriate
128
+ "lib/library" folder: Linux68_64 and Win64_dllw6 are used in the pre-built
129
+ binaries.
130
+
131
+ ## Support
132
+
133
+ File bugs at the [codeberg issues page](https://codeberg.org/peterlane/iup-ffi/issues), or send an email to `peterlane@gmx.com`.
134
+
135
+ ## Copyright/Licence
136
+
137
+ iup-ffi is copyright (c) 2014-26 Peter Lane, and released under the [MIT Licence](https://opensource.org/license/MIT).
138
+ Tecgraf IUP products are also released under the MIT licence: https://www.tecgraf.puc-rio.br/iup/en/copyright.html
139
+
@@ -0,0 +1,51 @@
1
+ # Provides the direct bindings through FFI to the IUP libraries.
2
+
3
+ require 'ffi'
4
+ require 'rbconfig'
5
+ require "securerandom"
6
+
7
+ module Iup
8
+ # :nodoc:
9
+ library_base = File.expand_path("../library", __FILE__)
10
+ IUP_LIBS = case RbConfig::CONFIG['host_os']
11
+ when /linux|cygwin/
12
+ library_path = File.join(library_base, "linux")
13
+ [
14
+ "gobject-2.0", "pango-1.0",
15
+ File.join(library_path, 'libcd.so'),
16
+ File.join(library_path, 'libim.so'),
17
+ File.join(library_path, "libiup.so"),
18
+ File.join(library_path, 'libiupcd.so'),
19
+ File.join(library_path, 'libiupcontrols.so'),
20
+ File.join(library_path, 'libiupim.so'),
21
+ File.join(library_path, 'libiupimglib.so'),
22
+ File.join(library_path, 'libiup_scintilla.so')
23
+ ]
24
+ when /mswin|mingw/
25
+ library_path = File.join(library_base, "windows")
26
+ [
27
+ File.join(library_path, "freetype6.dll"),
28
+ File.join(library_path, "zlib1.dll"),
29
+ File.join(library_path, 'cd.dll'),
30
+ File.join(library_path, 'im.dll'),
31
+ File.join(library_path, "iup.dll"),
32
+ File.join(library_path, 'iupcd.dll'),
33
+ File.join(library_path, 'iupcontrols.dll'),
34
+ File.join(library_path, 'iupim.dll'),
35
+ File.join(library_path, 'iupimglib.dll') #,
36
+ # File.join(library_path, 'iup_scintilla.dll')
37
+ ]
38
+ else
39
+ raise Exception,
40
+ 'iup libraries not found this platform',
41
+ RbConfig::CONFIG['host_os']
42
+ end
43
+ end
44
+
45
+ require 'wrapped/constants'
46
+ require 'plain/iuplib'
47
+ require 'plain/iupcdlib'
48
+ require 'plain/iupcontrolslib'
49
+ require 'plain/iupimlib'
50
+ require 'plain/iupimglib'
51
+ require 'plain/scintilla-lib' unless /mswin|mingw/ === RbConfig::CONFIG['host_os']
data/lib/iup-ffi.rb ADDED
@@ -0,0 +1,70 @@
1
+ # Requires files needed for wrapping the plain Iup libraries.
2
+ #
3
+ require 'iup-ffi-plain'
4
+
5
+ # helper code
6
+ require 'wrapped/attribute-builders'
7
+ require 'wrapped/attribute-reference'
8
+ require 'wrapped/dynamic-fill-methods'
9
+ require 'wrapped/common-attributes'
10
+ require 'wrapped/image-attributes'
11
+ require 'wrapped/callback-setter'
12
+ require 'wrapped/drag-drop-attributes'
13
+ require 'wrapped/scrollbar-attributes'
14
+
15
+ # the wrapper classes themselves
16
+ # -- core libraries
17
+ require 'wrapped/widget'
18
+ require 'wrapped/button'
19
+ require 'wrapped/canvas'
20
+ require 'wrapped/frame'
21
+ require 'wrapped/label'
22
+ require 'wrapped/link'
23
+ require 'wrapped/list'
24
+ require 'wrapped/progressbar'
25
+ require 'wrapped/tabs'
26
+ require 'wrapped/text'
27
+ require 'wrapped/toggle'
28
+ require 'wrapped/tree'
29
+ require 'wrapped/val'
30
+
31
+ # -- dialogs
32
+ require 'wrapped/dialog'
33
+ require 'wrapped/colordialog'
34
+ require 'wrapped/filedialog'
35
+ require 'wrapped/fontdialog'
36
+ require 'wrapped/messagedialog'
37
+ require 'wrapped/progressdialog'
38
+
39
+ # -- resources
40
+ require 'wrapped/image'
41
+ require 'wrapped/menu'
42
+ require 'wrapped/menuitem'
43
+ require 'wrapped/separator'
44
+ require 'wrapped/submenu'
45
+ require 'wrapped/timer'
46
+
47
+ # -- layout
48
+ require 'wrapped/background-box'
49
+ require 'wrapped/expander'
50
+ require 'wrapped/fill'
51
+ require 'wrapped/gridbox'
52
+ require 'wrapped/hbox'
53
+ require 'wrapped/radio'
54
+ require 'wrapped/scrollbox'
55
+ require 'wrapped/splitbox'
56
+ require 'wrapped/stretchbox'
57
+ require 'wrapped/vbox'
58
+ require 'wrapped/zbox'
59
+
60
+ # -- extensions
61
+ require 'wrapped/scintilla'
62
+
63
+ # -- additional controls
64
+ require 'wrapped/colorbar'
65
+ require 'wrapped/dial'
66
+ require 'wrapped/matrix'
67
+
68
+ # -- global methods
69
+ require 'wrapped/iup-global'
70
+
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,158 @@
1
+ # Binding to the iupcd shared library: CD is a vector graphics
2
+ # toolkit.
3
+ # This module can be used to access features not available
4
+ # in Iup.
5
+ #
6
+ # For reference, the following functions are bound:
7
+ #
8
+ # * cdContextIup, [], :pointer
9
+ # * cdCreateCanvas, [:pointer, :pointer], :pointer
10
+ # * cdKillCanvas, [:pointer], :void
11
+ # * cdCanvasActivate, [:pointer], :int
12
+ # * cdCanvasDeactivate, [:pointer], :void
13
+ # * cdUseContextPlus, [:int], :int
14
+ # * cdCanvasGetContext, [:pointer], :pointer
15
+ # * cdContextCaps, [:pointer], :int
16
+ # * cdContextType, [:pointer], :int
17
+ # * cdContextIsPlus, [:pointer], :int
18
+ # * cdCanvasSimulate, [:pointer, :int], :int
19
+ # * wdCanvasViewport, [:pointer, :int, :int, :int, :int], :void
20
+ # * wdCanvasWindow, [:pointer, :double, :double, :double, :double], :void
21
+ # * cdCanvasForeground, [:pointer, :long], :long
22
+ # * cdCanvasBackground, [:pointer, :long], :long
23
+ # * cdCanvasWriteMode, [:pointer, :int], :int
24
+ # * cdCanvasClear, [:pointer], :int
25
+ # * cdCanvasBegin, [:pointer, :int], :void
26
+ # * cdCanvasVertex, [:pointer, :int, :int], :void
27
+ # * cdCanvasEnd, [:pointer], :void
28
+ # * cdCanvasPathSet, [:pointer, :int], :void
29
+ # * cdCanvasPixel, [:pointer, :int, :int], :void
30
+ # * cdCanvasMark, [:pointer, :int, :int], :void
31
+ # * cdCanvasMarkType, [:pointer, :int], :int
32
+ # * cdCanvasMarkSize, [:pointer, :int], :int
33
+ # * cdCanvasLine, [:pointer, :int, :int, :int, :int], :void
34
+ # * cdCanvasRect, [:pointer, :int, :int, :int, :int], :void
35
+ # * cdCanvasArc, [:pointer, :int, :int, :int, :int, :double, :double], :void
36
+ # * cdCanvasLineStyle, [:pointer, :int], :int
37
+ # * cdCanvasLineWidth, [:pointer, :int], :int
38
+ # * cdCanvasLineJoin, [:pointer, :int], :int
39
+ # * cdCanvasLineCap, [:pointer, :int], :int
40
+ # * cdCanvasBox, [:pointer, :int, :int, :int, :int], :void
41
+ # * cdCanvasSector, [:pointer, :int, :int, :int, :int, :double, :double], :int
42
+ # * cdCanvasChord, [:pointer, :int, :int, :int, :int, :double, :double], :int
43
+ # * cdCanvasBackOpacity, [:pointer, :int], :int
44
+ # * cdCanvasFillMode, [:pointer, :int], :int
45
+ # * cdCanvasInteriorStyle, [:pointer, :int], :int
46
+ # * cdCanvasHatch, [:pointer, :int], :int
47
+ # * cdCanvasStipple, [:pointer, :int, :int, :string], :void
48
+ # * cdCanvasText, [:pointer, :int, :int, :string], :void
49
+ # * cdCanvasFont, [:pointer, :string, :int, :int], :void
50
+ # * cdCanvasNativeFont, [:pointer, :string], :string
51
+ # * cdCanvasTextAlignment, [:pointer, :int], :int
52
+ # * cdCanvasTextOrientation, [:pointer, :double], :double
53
+ # * cdCanvasVectorText, [:pointer, :int, :int, :string], :void
54
+ # * cdCanvasVectorTextDirection, [:pointer, :int, :int, :int, :int], :void
55
+ # * cdCanvasVectorTextSize, [:pointer, :int, :int, :string], :void
56
+ # * cdCanvasVectorCharSize, [:pointer, :int], :void
57
+ # * cdCanvasVectorFontSize, [:pointer, :double, :double], :void
58
+ # * cdCanvasVectorFont, [:pointer, :string], :string
59
+ # * cdEncodeColor, [:int, :int, :int], :long
60
+ #
61
+ # TODO:
62
+ # - images
63
+ # - various get functions
64
+ #
65
+ module CdLib
66
+ extend FFI::Library
67
+
68
+ ffi_lib *Iup::IUP_LIBS
69
+
70
+ attach_function :cdContextIup, [], :pointer
71
+
72
+ # -- initialisation
73
+
74
+ attach_function :cdCreateCanvas, [:pointer, :pointer], :pointer
75
+ attach_function :cdKillCanvas, [:pointer], :void
76
+ attach_function :cdCanvasActivate, [:pointer], :int
77
+ attach_function :cdCanvasDeactivate, [:pointer], :void
78
+ attach_function :cdUseContextPlus, [:int], :int
79
+ # attach_function :cdInitContextPlus, [:void], :void
80
+ attach_function :cdCanvasGetContext, [:pointer], :pointer
81
+ attach_function :cdContextCaps, [:pointer], :int
82
+ attach_function :cdContextType, [:pointer], :int
83
+ attach_function :cdContextIsPlus, [:pointer], :int
84
+ attach_function :cdCanvasSimulate, [:pointer, :int], :int
85
+
86
+ attach_function :wdCanvasViewport, [:pointer, :int, :int, :int, :int], :void
87
+ attach_function :wdCanvasWindow, [:pointer, :double, :double, :double, :double], :void
88
+
89
+ # -- general attributes
90
+ attach_function :cdCanvasForeground, [:pointer, :long], :long
91
+ attach_function :cdCanvasBackground, [:pointer, :long], :long
92
+ attach_function :cdCanvasWriteMode, [:pointer, :int], :int
93
+
94
+ # -- control
95
+
96
+ attach_function :cdCanvasClear, [:pointer], :int
97
+
98
+ # -- begin/end blocks
99
+ attach_function :cdCanvasBegin, [:pointer, :int], :void
100
+ attach_function :cdCanvasVertex, [:pointer, :int, :int], :void
101
+ attach_function :cdCanvasEnd, [:pointer], :void
102
+ attach_function :cdCanvasPathSet, [:pointer, :int], :void
103
+
104
+ # --- marks
105
+ attach_function :cdCanvasPixel, [:pointer, :int, :int], :void
106
+ attach_function :cdCanvasMark, [:pointer, :int, :int], :void
107
+ attach_function :cdCanvasMarkType, [:pointer, :int], :int
108
+ attach_function :cdCanvasMarkSize, [:pointer, :int], :int
109
+
110
+ # --- lines
111
+
112
+ attach_function :cdCanvasLine, [:pointer, :int, :int, :int, :int], :void
113
+ attach_function :cdCanvasRect, [:pointer, :int, :int, :int, :int], :void
114
+ attach_function :cdCanvasArc, [:pointer, :int, :int, :int, :int, :double, :double], :void
115
+ attach_function :cdCanvasLineStyle, [:pointer, :int], :int
116
+ # attach_function :cdCanvasLineStyleDashes, [:pointer, :pointer, :int], :void # TODO: pointer to int array?
117
+ attach_function :cdCanvasLineWidth, [:pointer, :int], :int
118
+ attach_function :cdCanvasLineJoin, [:pointer, :int], :int
119
+ attach_function :cdCanvasLineCap, [:pointer, :int], :int
120
+
121
+ # --- filled areas
122
+
123
+ attach_function :cdCanvasBox, [:pointer, :int, :int, :int, :int], :void
124
+ attach_function :cdCanvasSector, [:pointer, :int, :int, :int, :int, :double, :double], :int
125
+ attach_function :cdCanvasChord, [:pointer, :int, :int, :int, :int, :double, :double], :int
126
+ attach_function :cdCanvasBackOpacity, [:pointer, :int], :int
127
+ attach_function :cdCanvasFillMode, [:pointer, :int], :int
128
+ attach_function :cdCanvasInteriorStyle, [:pointer, :int], :int
129
+ attach_function :cdCanvasHatch, [:pointer, :int], :int
130
+ attach_function :cdCanvasStipple, [:pointer, :int, :int, :string], :void
131
+
132
+ # --- text
133
+
134
+ attach_function :cdCanvasText, [:pointer, :int, :int, :string], :void
135
+ attach_function :cdCanvasFont, [:pointer, :string, :int, :int], :void
136
+ attach_function :cdCanvasNativeFont, [:pointer, :string], :string
137
+ attach_function :cdCanvasTextAlignment, [:pointer, :int], :int
138
+ attach_function :cdCanvasTextOrientation, [:pointer, :double], :double
139
+ # TODO: Get functions
140
+
141
+ # --- vector text
142
+
143
+ attach_function :cdCanvasVectorText, [:pointer, :int, :int, :string], :void
144
+ attach_function :cdCanvasVectorTextDirection, [:pointer, :int, :int, :int, :int], :void
145
+ attach_function :cdCanvasVectorTextSize, [:pointer, :int, :int, :string], :void
146
+ attach_function :cdCanvasVectorCharSize, [:pointer, :int], :void
147
+ attach_function :cdCanvasVectorFontSize, [:pointer, :double, :double], :void
148
+ attach_function :cdCanvasVectorFont, [:pointer, :string], :string
149
+ # TODO: Get functions
150
+
151
+ # --- client images
152
+
153
+ # --- server images
154
+
155
+ # -- colour functions
156
+
157
+ attach_function :cdEncodeColor, [:int, :int, :int], :long
158
+ end
@@ -0,0 +1,28 @@
1
+ # Binding to the iupcontrols shared library.
2
+ # This module can be used to access features not available
3
+ # in Iup.
4
+ #
5
+ # For reference, the following functions are bound:
6
+ #
7
+ # * IupControlsOpen, [], :int
8
+ # * IupColorbar, [], :pointer
9
+ # * IupDial, [:string], :pointer
10
+ # * IupMatrix, [:string], :pointer
11
+ #
12
+ module ControlsLib
13
+ extend FFI::Library
14
+
15
+ ffi_lib *Iup::IUP_LIBS
16
+
17
+ attach_function :IupControlsOpen, [], :int
18
+
19
+ # -- additional
20
+ # attach_function :IupCells, [], :pointer
21
+ attach_function :IupColorbar, [], :pointer
22
+ # attach_function :IupColorBrowser, [], :pointer
23
+ attach_function :IupDial, [:string], :pointer
24
+ attach_function :IupMatrix, [:string], :pointer
25
+ # attach_function :IupMatrixList, [], :pointer
26
+ # attach_function :IupMatrixEx, [], :pointer
27
+ # attach_function :IupWebBrowser, [], :pointer
28
+ end
@@ -0,0 +1,15 @@
1
+ # Binding to the iupimglib shared library.
2
+ # This module can be used to access features not available
3
+ # in Iup.
4
+ #
5
+ # For reference, the following functions are bound:
6
+ #
7
+ # * IupImageLibOpen, [], :void
8
+ #
9
+ module ImgLib
10
+ extend FFI::Library
11
+
12
+ ffi_lib *Iup::IUP_LIBS
13
+
14
+ attach_function :IupImageLibOpen, [], :void
15
+ end
@@ -0,0 +1,18 @@
1
+ # Binding to the imlib shared library: IM is a toolkit for images.
2
+ # This module can be used to access features not available
3
+ # in Iup.
4
+ #
5
+ # For reference, the following functions are bound:
6
+ #
7
+ # * IupLoadImage, [:string], :pointer
8
+ # * IupSaveImage, [:string, :string], :int
9
+ #
10
+ module ImLib
11
+ extend FFI::Library
12
+
13
+ ffi_lib *Iup::IUP_LIBS
14
+
15
+ attach_function :IupLoadImage, [:string], :pointer
16
+ attach_function :IupSaveImage, [:string, :string], :int
17
+
18
+ end