Commit 1d11414
committed
Add window centering functionality
Introduces a new method to center windows on the primary display in the Dart API, updates native bindings to expose `native_window_center`, and includes necessary C++ implementation files in iOS and macOS builds. This improves window management and user experience by allowing easy window centering.1 parent 41556ae commit 1d11414
7 files changed
Lines changed: 42 additions & 3 deletions
File tree
- packages
- cnativeapi
- ios/cnativeapi/Sources/cnativeapi
- include
- lib/src
- macos/cnativeapi/Sources/cnativeapi
- include
- nativeapi/lib/src
- src/capi/window_c.cpp+8
- src/capi/window_c.h+3
- src/foundation/object_registry.h+112
- src/platform/android/window_android.cpp+6
- src/platform/android/window_manager_android.cpp+14-21
- src/platform/ios/window_ios.mm+21
- src/platform/ios/window_manager_ios.mm+8-15
- src/platform/linux/window_linux.cpp+29
- src/platform/linux/window_manager_linux.cpp+196-35
- src/platform/macos/window_macos.mm+8
- src/platform/macos/window_manager_macos.mm+23-22
- src/platform/ohos/window_manager_ohos.cpp+14-21
- src/platform/ohos/window_ohos.cpp+8
- src/platform/windows/window_manager_windows.cpp+303-29
- src/platform/windows/window_windows.cpp+24
- src/window.h+9
- src/window_manager.h+1-7
- src/window_registry.cpp+40
- src/window_registry.h+30
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
589 | 600 | | |
590 | 601 | | |
591 | 602 | | |
| |||
3823 | 3834 | | |
3824 | 3835 | | |
3825 | 3836 | | |
3826 | | - | |
| 3837 | + | |
| 3838 | + | |
3827 | 3839 | | |
3828 | 3840 | | |
3829 | 3841 | | |
| |||
3851 | 3863 | | |
3852 | 3864 | | |
3853 | 3865 | | |
3854 | | - | |
| 3866 | + | |
| 3867 | + | |
3855 | 3868 | | |
3856 | 3869 | | |
3857 | 3870 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
239 | 259 | | |
240 | 260 | | |
241 | 261 | | |
| |||
0 commit comments