Sha256: c4543b550ef8c9c641085e7c3866fd75ae6c470bf5d913087b64ad6abefe23cc
Contents?: true
Size: 1.46 KB
Versions: 16
Compression:
Stored size: 1.46 KB
Contents
# Copyright (c) 2023 M.J.N. Corino, The Netherlands # # This software is released under the MIT license. ### # wxRuby3 wxWidgets interface director ### module WXRuby3 class Director class RegionIterator < Director def setup super spec.gc_never spec.disable_proxies spec.make_abstract 'wxRegionIterator' # not useful in wxRuby spec.ignore 'wxRegionIterator::Reset(const wxRegion &)', 'wxRegionIterator::operator bool' # add iteration control methods spec.add_extend_code 'wxRegionIterator', <<~__HEREDOC void next_rect() { $self->operator ++(); } __HEREDOC # add custom factory method spec.add_extend_code 'wxRegionIterator', <<~__HEREDOC static void for_region(const wxRegion& region) { wxRegionIterator region_it(region); if (rb_block_given_p()) { wxRegionIterator *p_region_it = ®ion_it; VALUE rb_region_it = SWIG_NewPointerObj(SWIG_as_voidptr(p_region_it), SWIGTYPE_p_wxRegionIterator, 0); rb_yield(rb_region_it); SWIG_RubyRemoveTracking((void *)p_region_it); DATA_PTR(rb_region_it) = NULL; } } __HEREDOC spec.do_not_generate :functions, :variables, :defines, :enums end end # class RegionIterator end # class Director end # module WXRuby3
Version data entries
16 entries across 16 versions & 1 rubygems