init (Raggle::Interfaces::NcursesInterface)

    # File raggle, line 4205
          def NcursesInterface::init
            # immediately set up resize queue and resize thread
            $resize_queue ||= Queue.new
            $resize_thread ||= Thread.new($resize_queue) { |q|
              loop {
                q.pop
                Ncurses::endwin
                # Ncurses::refresh
                # Ncurses::initscr
                NcursesInterface::resize_term
                $update_wins = true
              }
            }

            # trap window change events
            trap('WINCH') { $resize_queue << '1' }

            # initialize screen & keyboard
            Ncurses::initscr
            Ncurses::use_default_colors if Ncurses.respond_to?(:use_default_colors)
            Ncurses::raw if $config['use_raw_mode']
            Ncurses::keypad Ncurses::stdscr, 1
            Ncurses::noecho if $config['use_noecho']
            Ncurses::start_color
            # Ncurses::mousemask(Ncurses::ALL_MOUSE_EVENTS | Ncurses::REPORT_MOUSE_POSITION, [])

            # exit(-1) unless Ncurses::has_colors?

            # initialize color pairs
            $config['color_palette'].each { |ary| Ncurses::init_pair(*ary) }

            # get screen coordinates
            h = []; w = []
            Ncurses::getmaxyx Ncurses::stdscr, h, w
            $config['w'] = w[0]
            $config['h'] = h[0] - 1

            # draw menu bar
            # c_msg = $config['msg_close']
            # msg = (' ' * ($config['w'] - c_msg.length)) << c_msg
            # Ncurses::wcolor_set Ncurses::stdscr, $config['menu_bar_cols'], nil
            # Ncurses::mvprintw 0, 0, msg.escape_format
            # Ncurses::refresh

            # draw status bar
            $new_status = ''
            NcursesInterface::set_status($config['msg_welcome'] % [$VERSION])

            # create windows
            $a_win = 0
            $wins = []
            $config['theme']['window_order'].each { |i|
              case i
                when /feed/:  cl = NcursesInterface::ListWindow
                when /item/:  cl = NcursesInterface::ListWindow
                when /desc/:  cl = NcursesInterface::TextWindow
              else
                raise "Unknown window #{i}"
              end
              $wins << cl.new($config['theme']["win_#{i}"])
              # $wins[-1].draw LONG_STRING
            }
            NcursesInterface::set_active_win(0)

            $a_feed, $a_item = 0, 0

            # populate feed window
            NcursesInterface::populate_feed_win

            NcursesInterface::select_feed(0)
            NcursesInterface::set_active_win(0)
          end