#!/usr/bin/env python

import pygtk
pygtk.require('2.0')
import gtk

from keyboard import Keyboard

class Window(gtk.Window):
	def destroy(self, widget):
		gtk.main_quit()

	def __init__(self):
		gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
		self.set_title("Keyboard Demo")
		self.window_x = 800
		self.window_y = 600
		self.set_size_request(self.window_x, self.window_y)
		self.connect("destroy", self.destroy)

		

			
			
def main():
	gtk.main()
		
if __name__ == "__main__":
	window = Window()
	layout = gtk.Fixed()
	keys = Keyboard(300, 150, 29, "midi")	#width (px), height (px), number of notes
	layout.put(keys, 200, 100)
	window.add(layout)
	keys.show()
	layout.show()
	window.show()
	main()
