#!/usr/bin/ruby -w
# Encoding: UTF-8
# frozen_string_literal: true
# =========================================================================== #
# $GTK_PARADISE/examples/gtk3/sockets.rb
# =========================================================================== #
require 'gtk3'

socket = Gtk::Socket.new
socket.show
window = Gtk::Window.new
window.add(socket)
window.signal_connect(:delete_event) { Gtk.main_quit }
window.move(0, 0)
# The following call is only necessary if one of
# the ancestors of the socket is not yet visible.
socket.realize
puts
puts "The ID of the sockets window is: #{socket.id}"
puts