mirror of
				https://github.com/Ryujinx/GtkSharp.git
				synced 2025-11-04 08:24:56 +00:00 
			
		
		
		
	Fixed Container.ChildGetProperty
Properly marshal `gtk_container_class_find_child_property` with return type of pointer instead of struct. When marshal pointer to struct manually.
This commit is contained in:
		
							parent
							
								
									bc3a55f71b
								
							
						
					
					
						commit
						7dbde29178
					
				| 
						 | 
				
			
			@ -28,7 +28,7 @@ namespace Gtk
 | 
			
		|||
    public partial class Container : IEnumerable
 | 
			
		||||
    {
 | 
			
		||||
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
 | 
			
		||||
		delegate GParamSpec d_gtk_container_class_find_child_property(IntPtr cclass, string property_name);
 | 
			
		||||
        delegate IntPtr d_gtk_container_class_find_child_property(IntPtr cclass, string property_name);
 | 
			
		||||
        static d_gtk_container_class_find_child_property gtk_container_class_find_child_property = FuncLoader.LoadFunction<d_gtk_container_class_find_child_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_class_find_child_property"));
 | 
			
		||||
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
 | 
			
		||||
        delegate void d_gtk_container_child_get_property(IntPtr container, IntPtr child, string property_name, ref GLib.Value value);
 | 
			
		||||
| 
						 | 
				
			
			@ -59,7 +59,8 @@ namespace Gtk
 | 
			
		|||
        {
 | 
			
		||||
            var value = new GLib.Value();
 | 
			
		||||
            var cclass = ((GTypeInstance)Marshal.PtrToStructure(Handle, typeof(GTypeInstance))).GTypeClass;
 | 
			
		||||
            var prop = gtk_container_class_find_child_property(cclass, property_name);
 | 
			
		||||
            var propPtr = gtk_container_class_find_child_property(cclass, property_name);
 | 
			
		||||
            var prop = (GParamSpec)Marshal.PtrToStructure(propPtr, typeof(GParamSpec));
 | 
			
		||||
 | 
			
		||||
            value.Init(prop.value_type);
 | 
			
		||||
            gtk_container_child_get_property(Handle, child.Handle, property_name, ref value);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue