purebasic.o: In Funktion `PB_EndFunctions':
(.text+0x4c2e2): Nicht definierter Verweis auf `gdk_pixbuf_render_pixmap_and_mask'
collect2: error: ld returned 1 exit status
Code: Select all
Procedure SetWindowBackgroundImage(hWnd.i, hImage.i)
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Linux
betriebssystem="linux"
Protected *Background
Protected FixedBox.i
Protected *Style.GtkStyle
;####################################################
gdk_pixbuf_render_pixmap_and_mask_(hImage, @*Background, 0, 0) ;<<------- does not work with 5.40, with 5.31 it works well
;####################################################
*Style = gtk_style_new_()
*Style\bg_pixmap[0] = *Background
FixedBox = g_list_nth_data_(gtk_container_get_children_(gtk_bin_get_child_(hWnd)), 0)
gtk_widget_set_style_(FixedBox, *Style)
CompilerCase #PB_OS_Windows
betriebssystem="windows"
Protected hBrush = CreatePatternBrush_(hImage)
If hBrush
SetClassLongPtr_(hWnd, #GCL_HBRBACKGROUND, hBrush)
InvalidateRect_(hWnd, 0, #True)
UpdateWindow_(hWnd)
EndIf
CompilerCase #PB_OS_MacOS
betriebssystem="mac"
CocoaMessage(0, hWnd, "setBackgroundColor:",
CocoaMessage(0, 0, "NSColor colorWithPatternImage:", hImage))
CompilerEndSelect
EndProcedure