; Module/File: Window_SetIconify.pb ; Function: Set WindowIconify on command - Linux gtk2/gtk3 ; Author: Omi/Shardik ; Date: Sep. 18, 2014 ; Version: 0.1 ; Target Compiler: PureBasic 5.22/5.31/5.40 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- ;depends on installation EnableExplicit ; Object constants #MainWin = 0 #Button1 = 0 #WinX=100 #WinY=100 #WinW=170 #WinH=160 Global.i gEvent, gQuit OpenWindow(#MainWin, 100, 100, 170, 160, "gtk_window iconify") ButtonGadget(#Button1, 10, 10, WindowWidth(0) - 20, 24, "iconify") Repeat gEvent= WaitWindowEvent() Select gEvent Case #PB_Event_CloseWindow gQuit= #True Case #PB_Event_Gadget Select EventGadget() Case #Button1 gtk_window_iconify_(WindowID(#MainWin)) AddWindowTimer(#MainWin, 0, 2000) EndSelect Case #PB_Event_Timer If EventTimer()= 0 gtk_window_deiconify_(WindowID(#MainWin)) RemoveWindowTimer(#MainWin, 0) EndIf EndSelect Until gQuit ; IDE Options = PureBasic 5.40 LTS (Linux - x86) ; CursorPosition = 1 ; EnableUnicode ; EnableXP