File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ let package = Package(
1616 path: " Sources/libnativeapi " ,
1717 exclude: [
1818 " examples " ,
19- " src/screen_retriever_linux .cpp " ,
20- " src/screen_retriever_windows .cpp " ,
19+ " src/display_manager_linux .cpp " ,
20+ " src/display_manager_windows .cpp " ,
2121 ] ,
2222 linkerSettings: [
2323 . linkedFramework( " Cocoa " ) ,
Original file line number Diff line number Diff line change 11import nativeapi
22
3- var screenRetriever = nativeapi. ScreenRetriever ( )
4- let cursorPoint = screenRetriever . GetCursorScreenPoint ( )
5- let primaryDisplay = screenRetriever . GetPrimaryDisplay ( )
6- let allDisplays = screenRetriever . GetAllDisplays ( )
3+ var displayManager = nativeapi. DisplayManager ( )
4+ let allDisplays = displayManager . GetAll ( )
5+ let primaryDisplay = displayManager . GetPrimary ( )
6+ let cursorPosition = displayManager . GetCursorPosition ( )
77
8- print ( cursorPoint )
8+ print ( cursorPosition )
99print ( primaryDisplay)
1010print ( allDisplays)
1111
12- print ( primaryDisplay. id )
13- print ( primaryDisplay. name )
12+ print ( primaryDisplay. width )
13+ print ( primaryDisplay. height )
You can’t perform that action at this time.
0 commit comments