; Module/File: Window_GdkWindowFromWindowNo.pb ; Function: Get GdkWindow from Window no. - Linux [gtk2] ; Author: Shardik ; Date: Jan. 10, 2014 ; Version: 0.2 updt. ; Target Compiler: PureBasic 5.22/5.31 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- EnableExplicit ; Object constants #Win_Main = 0 #Txt1 = 0 Global.i gEvent, gQuit Procedure.i GetGdkWindow(Window) Protected *Widget.GtkWidget = WindowID(Window); GtkWindow, needed for structure ProcedureReturn *Widget\window; here's the GdkWindow in PB<5.40 EndProcedure OpenWindow(#Win_Main, 100, 100, 170, 160, "Get gdk_window [gtk2]") TextGadget(#Txt1, 10, 10, 160, 24, "") SetGadgetText(#Txt1, "GdkWindow= " + Str(GetGdkWindow(#Win_Main))) Repeat gEvent= WaitWindowEvent() Select gEvent Case #PB_Event_CloseWindow gQuit= #True EndSelect Until gQuit ; IDE Options = PureBasic 5.45 LTS (Linux - x86) ; Folding = - ; EnableUnicode ; EnableXP ; SubSystem = gtk2