#!/usr/bin/ginsbasic001


//-- load  file and show the window
gins_glade("gtkfunctions2.glade")
gtk(  "gtk_rc_parse","test.gtkrc" , 0 , 0 ,0 ,0 ,0)
gins_main()


//-- manipulate a widget, e.g. move the window
gins_set("window1" , "10" , "100" , "<uposition>")


//-- get information about a widget
a = gins_get("button1" , "label" , "<str>")
print a


//-- mainloop with eventhandling
while 1

  widget , event , pdata = gins_event()

  if widget != Nothing then
   ' print widget
   ' print event
   ' print pdata

    if event = "GDK_DELETE" then
      gins_exit()
      end
    end if

    if event = "GDK_BUTTON_PRESS" then
      if widget = "button1" then


        a = gtk( "gtk_check_version", "1" , "2" ,"10" ,0 ,0 ,0)
        print "versioncheck1-" & a
        a = gtk( "gtk_check_version", "2" , "9" , "0" ,0 ,0 ,0)
        print "versioncheck2-" & a

        a = gtk( "gtk_label_set_selectable" ,"label1" , "1" , 0 ,0 ,0 ,0)
        print "-" & a

        a = gtk( "gtk_label_get_selectable" ,"label1" , 0 , 0 ,0 ,0 ,0)
        print "--" & a

        a = gtk( "gtk_button_get_alignment" ,"button1" , "10" , "10" ,0 ,0 ,0)
        print "---" & a

        a = gtk( "gtk_label_get_text" ,"label1" , 0 , 0 ,0 ,0 ,0)
        print "----" & a


// this function does not exist, as it returns gchar**, that I can't handle it
        a = gtk( "gtk_rc_get_default_files" ," " , 0 , 0 ,0 ,0 ,0)
        print "-----" & a


        print

      end if
    end if

  end if

  xwin_usleep(10000)

wend
