; Module/File: Window_GetGdkType.pb ; Function: Get the window-GdkType - Linux gtk/gtk3 ; Author: Omi ; Date: Nov. 03, 2014 ; Version: 0.2 updt. gtk3 ; Target Compiler: PureBasic 5.22/5.31/5.40 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- ; #GDK_WINDOW_ROOT = 0 ; #GDK_WINDOW_TOPLEVEL = 1 ; #GDK_WINDOW_CHILD = 2 ; #GDK_WINDOW_TEMP = 3 ; #GDK_WINDOW_FOREIGN = 4 ; #GDK_WINDOW_OFFSCREEN= 5 EnableExplicit ImportC "" gtk_widget_get_window(*widget.GtkWidget) EndImport ; Object constants #MainWin = 0 #But1 = 0 Global.i gEvent, gQuit Procedure GetWindowGdkType(Window) ProcedureReturn gdk_window_get_window_type_(gtk_widget_get_window(WindowID(Window))) EndProcedure If OpenWindow(#MainWin, 300, 200, 200, 200, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) ButtonGadget(#But1, 5, 5, 100, 26, "gdktype") Repeat gEvent= WaitWindowEvent() Select gEvent Case #PB_Event_CloseWindow gQuit= #True Case #PB_Event_Gadget If EventGadget()= #But1 Debug GetWindowGdkType(#MainWin) EndIf EndSelect Until gQuit EndIf ; IDE Options = PureBasic 5.40 LTS (Linux - x86) ; CursorPosition = 28 ; Folding = - ; EnableUnicode ; EnableXP