wxruby3 1.1.1 → 1.2.0
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.
- checksums.yaml +4 -4
- data/lib/wx/version.rb +1 -1
- data/rakelib/lib/config/unixish.rb +0 -4
- data/rakelib/lib/config.rb +0 -4
- data/rakelib/lib/core/package.rb +14 -5
- data/rakelib/lib/director/app.rb +1 -1
- data/rakelib/lib/director/dragdrop.rb +49 -0
- data/rakelib/lib/director/utils.rb +3 -0
- data/rakelib/lib/generate/doc.rb +1 -1
- data/rakelib/lib/swig_runner.rb +6 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bac7565182a0ae6badaee56d7b323459bdc2b198281a50639fafd6fcb2d2499
|
4
|
+
data.tar.gz: 5dc08857adaf213871ec7fce09117bac4cc19f00cac50638de552dc2219ea803
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbd4920bcc8ae2085ed85b49ee218642c1eb8a58c6bae7132fd653f479e5af6a60c716f61a9ad38bfdcc5cdc1e3560eb4152365127414bf0c401f266b39228c9
|
7
|
+
data.tar.gz: 60bba874185fe173a83d8878e458721a3f3fe58cbf484be2826c100a6009dff062972af7ecbaa9bc7dd3095d100aafdf326ac2dd994e1e50e7939654673d2466
|
data/lib/wx/version.rb
CHANGED
@@ -218,10 +218,6 @@ module WXRuby3
|
|
218
218
|
@ruby_libs << "-L#{RB_CONFIG['libdir']}" # add ruby lib dir
|
219
219
|
# add ruby defined shared ruby lib(s); not any other flags
|
220
220
|
@ruby_libs.concat RB_CONFIG['LIBRUBYARG_SHARED'].split(' ').select { |s| s.start_with?('-l')}
|
221
|
-
|
222
|
-
# maintain minimum compatibility with ABI 3.0.1
|
223
|
-
@wx_abi_version = [ @wx_version, "3.0.1" ].min
|
224
|
-
@wx_cppflags << "-DwxABI_VERSION=%s" % @wx_abi_version.tr(".", "0")
|
225
221
|
end
|
226
222
|
end
|
227
223
|
end
|
data/rakelib/lib/config.rb
CHANGED
data/rakelib/lib/core/package.rb
CHANGED
@@ -114,11 +114,20 @@ module WXRuby3
|
|
114
114
|
directors.select { |dir| Package.full_docs? || !Config.instance.excluded_module?(dir.spec) }
|
115
115
|
end
|
116
116
|
|
117
|
-
def director_for_class(class_name)
|
118
|
-
dir = included_directors.detect { |dir| dir.spec.module_name == class_name || dir.spec.items.include?(class_name) }
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
def director_for_class(class_name, pkg_stack=[])
|
118
|
+
dir = included_directors.detect { |dir| dir.spec.module_name == class_name || dir.spec.items.include?(dir.spec.classdef_name(class_name)) }
|
119
|
+
pkg_stack << self
|
120
|
+
subpackages.each_value.detect do |spkg|
|
121
|
+
unless pkg_stack.include?(spkg) # should never happen
|
122
|
+
dir = spkg.director_for_class(class_name, pkg_stack)
|
123
|
+
end
|
124
|
+
end if dir.nil?
|
125
|
+
dependencies.detect do |pkgdep|
|
126
|
+
unless pkg_stack.include?(pkgdep)
|
127
|
+
dir = pkgdep.director_for_class(class_name)
|
128
|
+
end
|
129
|
+
end if dir.nil?
|
130
|
+
dir = parent.director_for_class(class_name) if dir.nil? && parent && !pkg_stack.include?(parent)
|
122
131
|
dir
|
123
132
|
end
|
124
133
|
|
data/rakelib/lib/director/app.rb
CHANGED
@@ -69,7 +69,7 @@ module WXRuby3
|
|
69
69
|
wxExit
|
70
70
|
}
|
71
71
|
spec.ignore 'wxApp::GetGUIInstance'
|
72
|
-
unless Config.instance.
|
72
|
+
unless Config.instance.wx_version < '3.2.1'
|
73
73
|
spec.ignore 'wxApp::GTKAllowDiagnosticsControl'
|
74
74
|
end
|
75
75
|
spec.add_extend_code 'wxApp', <<~__HEREDOC
|
@@ -43,6 +43,55 @@ module WXRuby3
|
|
43
43
|
spec.add_swig_code '%markfunc wxDropSource "mark_wxDropSource";',
|
44
44
|
'%markfunc wxDropTarget "mark_wxDropTarget";'
|
45
45
|
spec.extend_interface 'wxDropSource', 'virtual ~wxDropSource()' # correct interface omission
|
46
|
+
# make Ruby director and wrappers use custom implementation
|
47
|
+
spec.use_class_implementation('wxDropTarget', 'wxRubyDropTarget')
|
48
|
+
spec.make_concrete('wxDropTarget')
|
49
|
+
spec.no_proxy %w[wxDropTarget::OnData] # prevent director overload; custom impl handles this
|
50
|
+
spec.add_header_code <<~__HEREDOC
|
51
|
+
class wxRubyDropTarget : public wxDropTarget
|
52
|
+
{
|
53
|
+
public:
|
54
|
+
wxRubyDropTarget(wxDataObject *dataObject = nullptr ) : wxDropTarget(dataObject) {}
|
55
|
+
|
56
|
+
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult dflt) override
|
57
|
+
{
|
58
|
+
static WxRuby_ID on_data_id("on_data");
|
59
|
+
wxDragResult c_result = wxDragError;
|
60
|
+
VALUE SWIGUNUSED result;
|
61
|
+
|
62
|
+
VALUE rb_x = INT2NUM(static_cast< int >(x));
|
63
|
+
VALUE rb_y = INT2NUM(static_cast< int >(y));
|
64
|
+
VALUE rb_dflt = wxRuby_GetEnumValueObject("DragResult", static_cast<int>(dflt));
|
65
|
+
if (rb_dflt == Qnil)
|
66
|
+
{
|
67
|
+
std::cerr << "Unexpected argument error: invalid value for Wx::DragResult in wxDropTarget::OnData [" << dflt << "]" << std::endl;
|
68
|
+
}
|
69
|
+
else
|
70
|
+
{
|
71
|
+
VALUE self = SWIG_RubyInstanceFor(this);
|
72
|
+
bool ex = false;
|
73
|
+
result = wxRuby_Funcall(ex, self, rb_intern("on_data"), 3,rb_x, rb_y, rb_dflt);
|
74
|
+
if (ex)
|
75
|
+
{
|
76
|
+
wxRuby_PrintException(result);
|
77
|
+
}
|
78
|
+
else
|
79
|
+
{
|
80
|
+
int eval;
|
81
|
+
if (!wxRuby_GetEnumValue("DragResult", result, eval))
|
82
|
+
{
|
83
|
+
std::cerr << "Type Error: invalid value for Wx::DragResult returned from Wx::DropTarget#on_data" << std::endl;
|
84
|
+
}
|
85
|
+
else
|
86
|
+
{
|
87
|
+
c_result = static_cast<wxDragResult>(eval);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
return (wxDragResult) c_result;
|
92
|
+
}
|
93
|
+
};
|
94
|
+
__HEREDOC
|
46
95
|
spec.ignore %w[wxFileDropTarget::OnDrop wxTextDropTarget::OnDrop]
|
47
96
|
spec.no_proxy %w[wxFileDropTarget::OnDrop wxFileDropTarget::OnData]
|
48
97
|
spec.no_proxy %w[wxTextDropTarget::OnDrop wxTextDropTarget::OnData]
|
@@ -61,6 +61,9 @@ module WXRuby3
|
|
61
61
|
spec.ignore 'wxGetEmailAddress(char *,int)',
|
62
62
|
'wxGetUserId(char *,int)',
|
63
63
|
'wxGetUserName(char *,int)'
|
64
|
+
if Config.instance.wx_version >= '3.3.0'
|
65
|
+
spec.ignore_unless('WXMSW', 'wxMSWIsOnSecureScreen')
|
66
|
+
end
|
64
67
|
spec.map 'wxMemorySize' => 'Integer' do
|
65
68
|
map_out code: <<~__CODE
|
66
69
|
$result = LL2NUM(wxLongLongNative($1).GetValue());
|
data/rakelib/lib/generate/doc.rb
CHANGED
data/rakelib/lib/swig_runner.rb
CHANGED
@@ -628,7 +628,12 @@ module WXRuby3
|
|
628
628
|
end
|
629
629
|
|
630
630
|
def run
|
631
|
-
|
631
|
+
begin
|
632
|
+
member_map = collect_methods
|
633
|
+
rescue Exception
|
634
|
+
STDERR.puts "#{$!}\n#{$!.backtrace.join("\n")}"
|
635
|
+
exit(1)
|
636
|
+
end
|
632
637
|
return if member_map.empty?
|
633
638
|
|
634
639
|
# create re match list for class names
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wxruby3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Corino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -1191,7 +1191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1191
1191
|
- !ruby/object:Gem::Version
|
1192
1192
|
version: '0'
|
1193
1193
|
requirements: []
|
1194
|
-
rubygems_version: 3.5.
|
1194
|
+
rubygems_version: 3.5.16
|
1195
1195
|
signing_key:
|
1196
1196
|
specification_version: 4
|
1197
1197
|
summary: wxWidgets extension for Ruby
|