# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.

###
# wxRuby3 wxWidgets interface director
###

require_relative './window'

module WXRuby3

  class Director

    class RibbonGallery < Window

      include Typemap::ClientData

      def setup
        super
        spec.ignore 'wxRibbonGallery::SetItemClientData',
                    'wxRibbonGallery::GetItemClientData',
                    'wxRibbonGallery::Append(const wxBitmap &, int, void *)'
        spec.map 'wxRibbonGalleryItem*' => 'Integer' do
          map_out code: '$result = ULL2NUM(reinterpret_cast<uintptr_t> ($1));'
          map_directorout code: '$result = reinterpret_cast<wxRibbonGalleryItem*> ((uintptr_t)NUM2ULL($1));'
          map_in code: '$1 = reinterpret_cast<wxRibbonGalleryItem*> ((uintptr_t)NUM2ULL($input));'
          map_directorin code: '$input = ULL2NUM(reinterpret_cast<uintptr_t> ($1));'
          map_typecheck precedence: 'INTEGER', code: '$1 = (TYPE($input) == T_FIXNUM);'
        end
      end
    end # class RibbonGallery

  end # class Director

end # module WXRuby3
