KMCommonDefine.swift 879 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // KMCommonDefine.swift
  3. // PDF Master
  4. //
  5. // Created by tangchao on 2023/3/28.
  6. //
  7. import Foundation
  8. /*  KMCommonDefine [共用的定义] 
  9. ** 用于定义一些共用的函数、共用的通知名称、其他
  10. */
  11. // MARK: - 共用的函数
  12. public func KMPrint(_ items: Any..., separator: String = " ", terminator: String = "\n") {
  13. #if DEBUG
  14. print(items, separator: separator, terminator: terminator)
  15. #endif
  16. }
  17. // MARK: - 共用的通知名称
  18. // MARK: - 共用的Block
  19. typealias KMItemClickBlock<T> = (_ item: T?, _ index: Int)->()
  20. typealias KMCommonClickBlock = (_ index: Int, _ params: Any...)->()
  21. typealias KMCommonBlock = (_ params: Any...)->()
  22. typealias KMValueDidChangeBlock = (_ value: Any?, _ change: [NSKeyValueChangeKey : Any]?)->()
  23. // MARK: - 其他
  24. let kKMLocalForDraggedTypes = NSPasteboard.PasteboardType(rawValue: "KMLocalForDraggedTypes")