; Module/File: Window_SetTitleGdk.pb ; Function: Set Window title with gdk - Linux gtk2/gtk3 ; Author: Omi ; Date: Jan. 10, 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 ;-------------------------------------------------------------- EnableExplicit ImportC "" gdk_window_set_title(*window.GtkWindow, title.p-utf8) gtk_widget_get_window(*widget.GtkWidget) EndImport ; Object constants #MainWin = 0 #Text1 = 0 Global.i gEvent, gQuit Procedure.i GetGdkWindow(Window) ProcedureReturn gtk_widget_get_window(WindowID(Window)) EndProcedure If OpenWindow(#MainWin, 300, 200, 200, 200, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) TextGadget(#Text1, 5, 5, 190, 60, "See the more usefull 'Window_SetTitleGtk.pb' e.g. to set MessageBox-Window-Title!") gdk_window_set_title(GetGdkWindow(#MainWin), "Title set with gdk") Repeat gEvent= WaitWindowEvent() Select gEvent Case #PB_Event_CloseWindow gQuit= #True Case #PB_Event_Gadget EndSelect Until gQuit EndIf ; IDE Options = PureBasic 5.45 LTS (Linux - x86) ; CursorPosition = 18 ; Folding = - ; EnableUnicode ; EnableXP