; Module/File: System_GetGtkVersions_gtk3.pb ; Function: Check gtk3 version, sub-versions & compatibility with gtk - Linux gtk3 ; Author: Omi ; Date: Oct. 27, 2017 ; Version: 0.1 ; Target Compiler: PureBasic 5.22/5.3/5.4/5.5/5.6 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- EnableExplicit ImportC "" gtk_get_major_version() gtk_get_minor_version() gtk_get_micro_version() gtk_check_version(required_major.l, required_minor.l, required_micro.l) EndImport ; Object constants #Win_Main = 0 Global.i gEvent, gQuit Procedure Create_WinMain() If OpenWindow(#Win_Main, 300, 200, 400, 200, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) Protected.s S= "Compatiblity-problem: " Debug "gtk-major-version: " + gtk_get_major_version() Debug "gtk-minor-version: " + gtk_get_minor_version() Debug "gtk-micro-version: " + gtk_get_micro_version() If gtk_check_version(3, 4, 0); currently needed from PB S+ PeekS(gtk_check_version(3, 4, 0), -1, #PB_UTF8) Else S+ "-" EndIf Debug S EndIf EndProcedure Create_WinMain() Repeat gEvent= WaitWindowEvent() Select gEvent Case #PB_Event_CloseWindow gQuit= #True EndSelect Until gQuit ; IDE Options = PureBasic 5.46 LTS Beta 1 (Linux - x86) ; CursorPosition = 34 ; Folding = - ; EnableUnicode ; EnableXP