added eugtk examples
This commit is contained in:
29
eugtk/examples/test74.ex
Normal file
29
eugtk/examples/test74.ex
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
--------------------------------------------------
|
||||
--# Display dimensions
|
||||
--------------------------------------------------
|
||||
|
||||
include GtkEngine.e
|
||||
|
||||
atom disp = create(GdkDisplay)
|
||||
atom scrn = get(disp,"default screen")
|
||||
|
||||
constant win = create(GtkWindow,"size=200x100,border_width=5,position=1,$destroy=Quit")
|
||||
|
||||
constant panel = create(GtkBox,VERTICAL)
|
||||
add(win,panel)
|
||||
|
||||
object icon = valid_icon_name({"video-display","computer","screen","cs-screen"})
|
||||
add(panel,create(GtkImage,icon,GTK_ICON_SIZE_DIALOG))
|
||||
|
||||
constant lbl = create(GtkLabel,
|
||||
sprintf("Screen Dimensions:\n %d x %d",{get(scrn,"width"),get(scrn,"height")}))
|
||||
add(panel,lbl)
|
||||
|
||||
constant btn = create(GtkButton,"gtk-quit","Quit")
|
||||
pack(panel,-btn)
|
||||
|
||||
show_all(win)
|
||||
main()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user