PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tutorial/plugin/mini_gtk/gtk_window.e

http://github.com/tybor/Liberty
Specman e | 68 lines | 57 code | 11 blank | 0 comment | 0 complexity | 5ec9905cafb3f45cd167a0ea7fb5429e MD5 | raw file
 1class GTK_WINDOW
 2
 3insert
 4	GTK_AGENT_LAUNCHER
 5		redefine
 6			make
 7		end
 8
 9creation
10	make
11
12feature {}
13	make is
14		do
15			window := new(toplevel)
16		end
17
18	window: POINTER
19
20feature {ANY}
21	signal_connect (signal: STRING; callback: ROUTINE[TUPLE]) is
22		do
23			g_signal_connect (window, signal.to_external, callback_agent, callback.to_pointer)
24		end
25
26	show is
27		do
28			gtk_widget_show(window)
29		end
30
31feature {}
32	toplevel: INTEGER is
33		external "plug_in"
34		alias "{
35			location: "."
36			module_name: "plugin"
37			feature_name: "GTK_WINDOW_TOPLEVEL"
38			}"
39		end
40
41	new (type: INTEGER): POINTER is
42		external "plug_in"
43		alias "{
44			location: "."
45			module_name: "plugin"
46			feature_name: "gtk_window_new"
47			}"
48		end
49
50	g_signal_connect (object, signal, callback, data: POINTER) is
51		external "plug_in"
52		alias "{
53			location: "."
54			module_name: "plugin"
55			feature_name: "g_signal_connect"
56			}"
57		end
58
59	gtk_widget_show (widget: POINTER) is
60		external "plug_in"
61		alias "{
62			location: "."
63			module_name: "plugin"
64			feature_name: "gtk_widget_show"
65			}"
66		end
67
68end -- class GTK_WINDOW