#include Once "window9.bi"

Sub Windowcolor(hw As HWND , BGR_color As Long) Export
	
	Dim As GdkColor color_ 
	
	color_.red = Cast(Short,((BGR_color And &h000000FF)Shl 8) Or (BGR_color And &h000000FF))
	
	color_.blue =  Cast(Short,((BGR_color And &h00FF0000) Shr 8) Or (BGR_color And &h00FF0000)Shr 16)
	
	color_.green =  Cast(Short,(BGR_color And &h0000FF00) Or (BGR_color And &h0000FF00) Shr 8)
	
	Dim As ListT Ptr pListTemp
	
	Dim As Any Ptr mainBox
	
	pListTemp = Cast(ListT Ptr,pGlobalTypeWindow9->ListWinAndContainers->findNodeFunc(Cint(hw)))
	
	If pListTemp Then
		
		mainBox = Cast(hwnd , pListTemp->anyTwoData)
		
		If g_object_get_data (Cast(Any Ptr, pGlobalTypeWindow9->CurentHwnd), "SCROLL") Then
			
			gtk_widget_modify_bg (gtk_widget_get_parent(mainBox), GTK_STATE_NORMAL, @color_)
			
		Else
		
			gtk_widget_modify_bg (mainBox, GTK_STATE_NORMAL, @color_)
			
		Endif
		
	Endif

End Sub