Added GetClientSize()
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>21F79</string>
|
||||
<string>22E252</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
@@ -27,19 +27,19 @@
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>13F100</string>
|
||||
<string></string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>12.3</string>
|
||||
<string>13.3</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>21E226</string>
|
||||
<string>22E245</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx12.3</string>
|
||||
<string>macosx13.3</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1341</string>
|
||||
<string>1430</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>13F100</string>
|
||||
<string>14E222b</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.13</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
Binary file not shown.
@@ -104,6 +104,10 @@ UNIWINC_EXPORT BOOL GetSize(Float32* width, Float32* height) {
|
||||
return [LibUniWinC getSizeWithWidth:width height:height];
|
||||
}
|
||||
|
||||
UNIWINC_EXPORT BOOL GetClientSize(Float32* width, Float32* height) {
|
||||
return [LibUniWinC getSizeWithWidth:width height:height];
|
||||
}
|
||||
|
||||
UNIWINC_EXPORT SInt32 GetCurrentMonitor() {
|
||||
return [LibUniWinC getCurrentMonitor];
|
||||
}
|
||||
|
||||
@@ -809,6 +809,23 @@ public class LibUniWinC : NSObject {
|
||||
height.pointee = Float32(currentSize.height)
|
||||
return true
|
||||
}
|
||||
|
||||
/// ウィンドウのクライアント領域サイズを取得
|
||||
/// - Parameters:
|
||||
/// - width: 幅
|
||||
/// - height: 高さ
|
||||
/// - Returns: 成功すれば true
|
||||
@objc public static func getClientSize(width: UnsafeMutablePointer<Float32>, height: UnsafeMutablePointer<Float32>) -> Bool {
|
||||
if (targetWindow == nil) {
|
||||
width.pointee = 0;
|
||||
height.pointee = 0;
|
||||
return false
|
||||
}
|
||||
let currentSize = targetWindow!.contentView!.frame.size
|
||||
width.pointee = Float32(currentSize.width)
|
||||
height.pointee = Float32(currentSize.height)
|
||||
return true
|
||||
}
|
||||
|
||||
@objc public static func registerWindowStyleChangedCallback(callback: @escaping intCallback) -> Bool {
|
||||
windowStyleChangedCallback = callback
|
||||
|
||||
Reference in New Issue
Block a user