Jelajahi Sumber

add DCCore's media message width and height API to the Wrapper

cyberta 4 tahun lalu
induk
melakukan
a1f9f921d2
1 mengubah file dengan 13 tambahan dan 1 penghapusan
  1. 13 1
      DcCore/DcCore/DC/Wrapper.swift

+ 13 - 1
DcCore/DcCore/DC/Wrapper.swift

@@ -910,7 +910,19 @@ public class DcMsg {
         } else {
             return nil
         }
-        }()
+    }()
+
+    public var messageHeight: CGFloat {
+        return CGFloat(dc_msg_get_height(messagePointer))
+    }
+
+    public var messageWidth: CGFloat {
+        return CGFloat(dc_msg_get_width(messagePointer))
+    }
+
+    public func setLateFilingMediaSize(width: CGFloat, height: CGFloat, duration: Int) {
+        dc_msg_latefiling_mediasize(messagePointer, Int32(width), Int32(height), Int32(duration))
+    }
 
     public var file: String? {
         if let cString = dc_msg_get_file(messagePointer) {