fxruby 1.6.20-x86-mingw32 → 1.6.22.pre2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/README.txt +2 -1
- data/Rakefile +43 -35
- data/TODO +4 -4
- data/doap.rdf +2 -2
- data/ext/fox16/FXRbDataTarget.cpp +2 -2
- data/ext/fox16/FXRuby.cpp +31 -96
- data/ext/fox16/core_wrap.cpp +5 -1
- data/ext/fox16/dialogs_wrap.cpp +4 -4
- data/ext/fox16/extconf.rb +15 -7
- data/ext/fox16/frames_wrap.cpp +1 -1
- data/ext/fox16/fx3d_wrap.cpp +1 -1
- data/ext/fox16/iconlist_wrap.cpp +2 -2
- data/ext/fox16/include/FXRbApp.h +2 -2
- data/ext/fox16/include/FXRbCommon.h +2 -0
- data/ext/fox16/list_wrap.cpp +3 -3
- data/ext/fox16/markfuncs.cpp +1 -0
- data/ext/fox16/treelist_wrap.cpp +2 -2
- data/ext/fox16/ui_wrap.cpp +3 -3
- data/lib/1.8/fox16.so +0 -0
- data/lib/1.9/fox16.so +0 -0
- data/lib/fox16/accel_table.rb +16 -3
- data/lib/fox16/bitmapview.rb +7 -8
- data/lib/fox16/core.rb +5 -5
- data/lib/fox16/kwargs.rb +877 -879
- data/lib/fox16/scintilla.rb +1321 -45
- data/lib/fox16/version.rb +1 -1
- data/scripts/generate_kwargs_lib.rb +2 -4
- data/swig-interfaces/FXMemoryStream.i +9 -5
- data/swig-interfaces/ruby-typemaps.i +4 -4
- data/test/TC_FXAccelTable.rb +2 -2
- data/test/TC_FXApp.rb +48 -2
- data/test/TC_FXArc.rb +2 -2
- data/test/TC_FXBMPIcon.rb +2 -2
- data/test/TC_FXBMPImage.rb +2 -2
- data/test/TC_FXButton.rb +2 -2
- data/test/TC_FXCheckButton.rb +2 -2
- data/test/TC_FXComboBox.rb +2 -2
- data/test/TC_FXDC.rb +2 -2
- data/test/TC_FXDCPrint.rb +6 -5
- data/test/TC_FXDCWindow.rb +5 -3
- data/test/TC_FXDataTarget.rb +2 -2
- data/test/TC_FXDialogBox.rb +2 -2
- data/test/TC_FXDirList.rb +2 -2
- data/test/TC_FXExtentd.rb +2 -2
- data/test/TC_FXExtentf.rb +2 -2
- data/test/TC_FXFileAssoc.rb +2 -2
- data/test/TC_FXFileStream.rb +2 -2
- data/test/TC_FXFoldingList.rb +2 -2
- data/test/TC_FXFont.rb +2 -2
- data/test/TC_FXFontDesc.rb +2 -2
- data/test/TC_FXGLGroup.rb +2 -2
- data/test/TC_FXGLShape.rb +2 -2
- data/test/TC_FXGLViewer.rb +2 -2
- data/test/TC_FXGradientBar.rb +2 -2
- data/test/TC_FXHeader.rb +2 -2
- data/test/TC_FXHiliteStyle.rb +2 -2
- data/test/TC_FXIconDict.rb +2 -2
- data/test/TC_FXIconList.rb +2 -2
- data/test/TC_FXId.rb +2 -2
- data/test/TC_FXImage.rb +2 -2
- data/test/TC_FXLight.rb +2 -2
- data/test/TC_FXList.rb +2 -2
- data/test/TC_FXListBox.rb +2 -2
- data/test/TC_FXMainWindow.rb +2 -2
- data/test/TC_FXMat4f.rb +2 -2
- data/test/TC_FXMaterial.rb +2 -16
- data/test/TC_FXMemoryStream.rb +6 -6
- data/test/TC_FXMenuCheck.rb +2 -2
- data/test/TC_FXMenuCommand.rb +2 -2
- data/test/TC_FXMenuRadio.rb +7 -7
- data/test/TC_FXMessageBox.rb +2 -2
- data/test/TC_FXPoint.rb +2 -2
- data/test/TC_FXQuatf.rb +2 -2
- data/test/TC_FXRadioButton.rb +2 -2
- data/test/TC_FXRanged.rb +2 -2
- data/test/TC_FXRangef.rb +2 -2
- data/test/TC_FXRectangle.rb +2 -2
- data/test/TC_FXRegion.rb +2 -2
- data/test/TC_FXRegistry.rb +2 -2
- data/test/TC_FXScrollArea.rb +2 -2
- data/test/TC_FXScrollWindow.rb +2 -2
- data/test/TC_FXSegment.rb +2 -2
- data/test/TC_FXSettings.rb +2 -2
- data/test/TC_FXShell.rb +2 -2
- data/test/TC_FXSize.rb +2 -2
- data/test/TC_FXStream.rb +2 -2
- data/test/TC_FXTable.rb +47 -47
- data/test/TC_FXTableItem.rb +4 -4
- data/test/TC_FXText.rb +4 -4
- data/test/TC_FXTopWindow.rb +2 -2
- data/test/TC_FXTreeList.rb +2 -2
- data/test/TC_FXTreeListBox.rb +2 -2
- data/test/TC_FXUndoList.rb +3 -3
- data/test/TC_FXVec2d.rb +2 -2
- data/test/TC_FXVec2f.rb +2 -2
- data/test/TC_FXVec3d.rb +2 -2
- data/test/TC_FXVec3f.rb +2 -2
- data/test/TC_FXVec4f.rb +2 -2
- data/test/TC_FXViewport.rb +2 -2
- data/test/TC_FXXBMIcon.rb +2 -2
- data/test/TC_FXXBMImage.rb +2 -2
- data/test/TC_FXXPMIcon.rb +2 -2
- data/test/TC_FXXPMImage.rb +2 -2
- data/test/TC_downcast.rb +2 -2
- metadata +110 -75
data/lib/fox16/version.rb
CHANGED
@@ -108,9 +108,7 @@ class Generator
|
|
108
108
|
|
109
109
|
def generate_preamble(out)
|
110
110
|
out.puts <<-END
|
111
|
-
|
112
|
-
|
113
|
-
$VERBOSE = nil
|
111
|
+
old_verbose = $VERBOSE; $VERBOSE = nil
|
114
112
|
|
115
113
|
module Fox
|
116
114
|
|
@@ -132,7 +130,7 @@ END
|
|
132
130
|
def generate_closing(out)
|
133
131
|
out.puts "end"
|
134
132
|
out.puts ""
|
135
|
-
out.puts "$VERBOSE =
|
133
|
+
out.puts "$VERBOSE = old_verbose"
|
136
134
|
end
|
137
135
|
|
138
136
|
def scan_for_descriptions(filename)
|
@@ -44,7 +44,7 @@ public:
|
|
44
44
|
return self->open(save_or_load,data);
|
45
45
|
}
|
46
46
|
}
|
47
|
-
|
47
|
+
|
48
48
|
// Take buffer away from stream
|
49
49
|
VALUE takeBuffer() {
|
50
50
|
FXuchar* buffer;
|
@@ -54,19 +54,23 @@ public:
|
|
54
54
|
FXFREE(&buffer);
|
55
55
|
return result;
|
56
56
|
}
|
57
|
-
|
57
|
+
|
58
58
|
/// Give buffer to stream
|
59
59
|
void giveBuffer(VALUE str){
|
60
|
+
FXuchar* copy = NULL;
|
60
61
|
Check_Type(str,T_STRING);
|
61
62
|
FXuchar* buffer=reinterpret_cast<FXuchar*>(StringValuePtr(str));
|
62
63
|
FXuval sp=RSTRING_LEN(str);
|
63
|
-
|
64
|
+
if( FXMALLOC(©, FXuchar *, sp)) {
|
65
|
+
memcpy(copy, buffer, sp);
|
66
|
+
self->giveBuffer(copy,sp);
|
67
|
+
}
|
64
68
|
}
|
65
69
|
}
|
66
|
-
|
70
|
+
|
67
71
|
/// Get position
|
68
72
|
FXlong position() const;
|
69
|
-
|
73
|
+
|
70
74
|
/// Destructor
|
71
75
|
virtual ~FXMemoryStream();
|
72
76
|
};
|
@@ -184,7 +184,7 @@ inline FXbool to_FXbool(VALUE obj){
|
|
184
184
|
$1 = NULL;
|
185
185
|
if(!NIL_P($input)){
|
186
186
|
Check_Type($input, T_ARRAY);
|
187
|
-
if (FXMALLOC(&$1, FXchar *, RARRAY_LEN($input)
|
187
|
+
if (FXMALLOC(&$1, FXchar *, RARRAY_LEN($input)+1)) {
|
188
188
|
for (long i = 0; i < RARRAY_LEN($input); i++) {
|
189
189
|
VALUE e = rb_ary_entry($input, i);
|
190
190
|
$1[i] = (FXchar *) StringValuePtr(e);
|
@@ -201,7 +201,7 @@ inline FXbool to_FXbool(VALUE obj){
|
|
201
201
|
$1 = NULL;
|
202
202
|
if(!NIL_P($input)){
|
203
203
|
Check_Type($input, T_ARRAY);
|
204
|
-
if (FXMALLOC(&$1, FXColor, RARRAY_LEN($input)
|
204
|
+
if (FXMALLOC(&$1, FXColor, RARRAY_LEN($input)+1)) {
|
205
205
|
for (long i = 0; i < RARRAY_LEN($input); i++) {
|
206
206
|
$1[i] = static_cast<FXColor>(NUM2ULONG(rb_ary_entry($input, i)));
|
207
207
|
}
|
@@ -599,7 +599,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
599
599
|
|
600
600
|
/* Output typemap for FXViewport instances */
|
601
601
|
%typemap(out) FXViewport {
|
602
|
-
FXViewport* resultptr = new FXViewport($1);
|
602
|
+
FXViewport* resultptr = new FXViewport($1);
|
603
603
|
$result = FXRbGetRubyObj(resultptr, "FXViewport *");
|
604
604
|
}
|
605
605
|
|
@@ -731,7 +731,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
731
731
|
* be able to pass either zero, -1, or a window to that function and get
|
732
732
|
* the same behavior as in FOX.
|
733
733
|
*/
|
734
|
-
|
734
|
+
|
735
735
|
%typemap(in) FXWindow* TOOLBAR_DOCK_AFTER {
|
736
736
|
if (TYPE($input) == T_FIXNUM) {
|
737
737
|
$1 = reinterpret_cast<FXWindow *>(static_cast<long>(NUM2INT($input)));
|
data/test/TC_FXAccelTable.rb
CHANGED
data/test/TC_FXApp.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
require 'test/unit'
|
2
2
|
require 'fox16'
|
3
|
-
|
4
|
-
|
3
|
+
require 'testcase'
|
4
|
+
require 'socket'
|
5
5
|
|
6
6
|
class TC_FXApp < Test::Unit::TestCase
|
7
|
+
include Fox
|
8
|
+
|
7
9
|
def test_exception_for_second_app
|
8
10
|
app = FXApp.new
|
9
11
|
mainWindow = FXMainWindow.new(app, "")
|
@@ -14,3 +16,47 @@ class TC_FXApp < Test::Unit::TestCase
|
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
19
|
+
class TC_FXApp2 < Fox::TestCase
|
20
|
+
include Fox
|
21
|
+
|
22
|
+
def setup
|
23
|
+
super(self.class.name)
|
24
|
+
end
|
25
|
+
|
26
|
+
def check_events(pipe_rd, pipe_wr)
|
27
|
+
app.addInput(pipe_wr, INPUT_WRITE, app, FXApp::ID_QUIT)
|
28
|
+
app.run
|
29
|
+
app.removeInput(pipe_wr, INPUT_WRITE)
|
30
|
+
|
31
|
+
app.addInput(pipe_rd, INPUT_READ, app, FXApp::ID_QUIT)
|
32
|
+
data_sent = false
|
33
|
+
app.addTimeout(1) do
|
34
|
+
data_sent = true
|
35
|
+
pipe_wr.write " "
|
36
|
+
end
|
37
|
+
app.run
|
38
|
+
assert data_sent, "the read input event shouldn't fire before some data is available"
|
39
|
+
|
40
|
+
app.removeInput(pipe_rd, INPUT_READ)
|
41
|
+
pipe_wr.close
|
42
|
+
pipe_rd.close unless pipe_rd.closed?
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_addInput_on_pipe
|
46
|
+
check_events *IO.pipe
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_addInput_on_socket
|
50
|
+
s = TCPServer.open 'localhost', 0
|
51
|
+
pipe_wr = TCPSocket.open 'localhost', s.addr[1]
|
52
|
+
pipe_rd = s.accept
|
53
|
+
s.close
|
54
|
+
|
55
|
+
check_events pipe_rd, pipe_wr
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_addInput_on_popen
|
59
|
+
pipe_rdwr = IO.popen("cat", "r+")
|
60
|
+
check_events pipe_rdwr, pipe_rdwr
|
61
|
+
end
|
62
|
+
end
|
data/test/TC_FXArc.rb
CHANGED
data/test/TC_FXBMPIcon.rb
CHANGED
data/test/TC_FXBMPImage.rb
CHANGED
data/test/TC_FXButton.rb
CHANGED
data/test/TC_FXCheckButton.rb
CHANGED
@@ -2,9 +2,9 @@ require 'test/unit'
|
|
2
2
|
require 'testcase'
|
3
3
|
require 'fox16'
|
4
4
|
|
5
|
-
|
5
|
+
class TC_FXCheckButton < Fox::TestCase
|
6
|
+
include Fox
|
6
7
|
|
7
|
-
class TC_FXCheckButton < TestCase
|
8
8
|
def setup
|
9
9
|
super("TC_FXCheckButton")
|
10
10
|
@checkButton = FXCheckButton.new(mainWindow, "cbText")
|
data/test/TC_FXComboBox.rb
CHANGED
data/test/TC_FXDC.rb
CHANGED
data/test/TC_FXDCPrint.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require 'test/unit'
|
2
2
|
|
3
3
|
require 'fox16'
|
4
|
-
|
5
|
-
include Fox
|
4
|
+
require 'fileutils'
|
6
5
|
|
7
6
|
class TC_FXDCPrint < Test::Unit::TestCase
|
7
|
+
include Fox
|
8
|
+
|
8
9
|
private
|
9
10
|
def printJob
|
10
11
|
job = FXPrinter.new
|
@@ -25,7 +26,7 @@ private
|
|
25
26
|
job.flags = PRINT_DEST_FILE
|
26
27
|
job
|
27
28
|
end
|
28
|
-
|
29
|
+
|
29
30
|
def hexdump(ios)
|
30
31
|
count = 0
|
31
32
|
ios.each_byte do |byte|
|
@@ -48,7 +49,7 @@ private
|
|
48
49
|
File.open(actual, 'rb') { |f| actual_contents = crlf_to_lf(f.read) }
|
49
50
|
assert_equal(expected_contents, actual_contents)
|
50
51
|
end
|
51
|
-
|
52
|
+
|
52
53
|
public
|
53
54
|
def setup
|
54
55
|
if FXApp.instance.nil?
|
@@ -92,7 +93,7 @@ public
|
|
92
93
|
end
|
93
94
|
# assert_same_file_contents("howdypage.ps", printJob.name)
|
94
95
|
end
|
95
|
-
|
96
|
+
|
96
97
|
def teardown
|
97
98
|
if File.exists?("output.ps")
|
98
99
|
FileUtils.rm_f("output.ps")
|
data/test/TC_FXDCWindow.rb
CHANGED
@@ -2,21 +2,23 @@ require 'test/unit'
|
|
2
2
|
require 'testcase'
|
3
3
|
require 'fox16'
|
4
4
|
|
5
|
-
|
5
|
+
class TC_FXDCWindow < Fox::TestCase
|
6
|
+
include Fox
|
6
7
|
|
7
|
-
class TC_FXDCWindow < TestCase
|
8
8
|
def setup
|
9
9
|
super(self.class.name)
|
10
10
|
app.create
|
11
11
|
mainWindow.create
|
12
12
|
end
|
13
|
+
|
13
14
|
def test_new
|
14
15
|
dc = FXDCWindow.new(mainWindow)
|
15
16
|
dc.drawPoint(0, 0)
|
16
17
|
dc.end
|
17
18
|
end
|
19
|
+
|
18
20
|
def test_new_with_block
|
19
|
-
|
21
|
+
FXDCWindow.new(mainWindow) do |dc|
|
20
22
|
dc.drawPoint(0, 0)
|
21
23
|
end
|
22
24
|
end
|
data/test/TC_FXDataTarget.rb
CHANGED
data/test/TC_FXDialogBox.rb
CHANGED
data/test/TC_FXDirList.rb
CHANGED
data/test/TC_FXExtentd.rb
CHANGED
data/test/TC_FXExtentf.rb
CHANGED
data/test/TC_FXFileAssoc.rb
CHANGED
data/test/TC_FXFileStream.rb
CHANGED
data/test/TC_FXFoldingList.rb
CHANGED
data/test/TC_FXFont.rb
CHANGED
data/test/TC_FXFontDesc.rb
CHANGED
data/test/TC_FXGLGroup.rb
CHANGED
data/test/TC_FXGLShape.rb
CHANGED
data/test/TC_FXGLViewer.rb
CHANGED
data/test/TC_FXGradientBar.rb
CHANGED
data/test/TC_FXHeader.rb
CHANGED
data/test/TC_FXHiliteStyle.rb
CHANGED
data/test/TC_FXIconDict.rb
CHANGED
data/test/TC_FXIconList.rb
CHANGED
data/test/TC_FXId.rb
CHANGED
data/test/TC_FXImage.rb
CHANGED
data/test/TC_FXLight.rb
CHANGED
data/test/TC_FXList.rb
CHANGED
data/test/TC_FXListBox.rb
CHANGED
data/test/TC_FXMainWindow.rb
CHANGED