@@ -62,149 +62,6 @@ class CNativeApiBindings {
6262 late final _native_accessibility_manager_is_enabled =
6363 _native_accessibility_manager_is_enabledPtr.asFunction< bool Function ()> ();
6464
65- /// Window creation and destruction
66- ffi.Pointer <native_window_options_t> native_window_options_create () {
67- return _native_window_options_create ();
68- }
69-
70- late final _native_window_options_createPtr =
71- _lookup<
72- ffi.NativeFunction <ffi.Pointer <native_window_options_t> Function ()>
73- > ('native_window_options_create' );
74- late final _native_window_options_create = _native_window_options_createPtr
75- .asFunction< ffi.Pointer <native_window_options_t> Function ()> ();
76-
77- void native_window_options_destroy (
78- ffi.Pointer <native_window_options_t> options,
79- ) {
80- return _native_window_options_destroy (options);
81- }
82-
83- late final _native_window_options_destroyPtr =
84- _lookup<
85- ffi.NativeFunction <
86- ffi.Void Function (ffi.Pointer <native_window_options_t>)
87- >
88- > ('native_window_options_destroy' );
89- late final _native_window_options_destroy = _native_window_options_destroyPtr
90- .asFunction< void Function (ffi.Pointer <native_window_options_t>)> ();
91-
92- bool native_window_options_set_title (
93- ffi.Pointer <native_window_options_t> options,
94- ffi.Pointer <ffi.Char > title,
95- ) {
96- return _native_window_options_set_title (options, title);
97- }
98-
99- late final _native_window_options_set_titlePtr =
100- _lookup<
101- ffi.NativeFunction <
102- ffi.Bool Function (
103- ffi.Pointer <native_window_options_t>,
104- ffi.Pointer <ffi.Char >,
105- )
106- >
107- > ('native_window_options_set_title' );
108- late final _native_window_options_set_title =
109- _native_window_options_set_titlePtr
110- .asFunction<
111- bool Function (
112- ffi.Pointer <native_window_options_t>,
113- ffi.Pointer <ffi.Char >,
114- )
115- > ();
116-
117- void native_window_options_set_size (
118- ffi.Pointer <native_window_options_t> options,
119- double width,
120- double height,
121- ) {
122- return _native_window_options_set_size (options, width, height);
123- }
124-
125- late final _native_window_options_set_sizePtr =
126- _lookup<
127- ffi.NativeFunction <
128- ffi.Void Function (
129- ffi.Pointer <native_window_options_t>,
130- ffi.Double ,
131- ffi.Double ,
132- )
133- >
134- > ('native_window_options_set_size' );
135- late final _native_window_options_set_size =
136- _native_window_options_set_sizePtr
137- .asFunction<
138- void Function (ffi.Pointer <native_window_options_t>, double , double )
139- > ();
140-
141- void native_window_options_set_minimum_size (
142- ffi.Pointer <native_window_options_t> options,
143- double width,
144- double height,
145- ) {
146- return _native_window_options_set_minimum_size (options, width, height);
147- }
148-
149- late final _native_window_options_set_minimum_sizePtr =
150- _lookup<
151- ffi.NativeFunction <
152- ffi.Void Function (
153- ffi.Pointer <native_window_options_t>,
154- ffi.Double ,
155- ffi.Double ,
156- )
157- >
158- > ('native_window_options_set_minimum_size' );
159- late final _native_window_options_set_minimum_size =
160- _native_window_options_set_minimum_sizePtr
161- .asFunction<
162- void Function (ffi.Pointer <native_window_options_t>, double , double )
163- > ();
164-
165- void native_window_options_set_maximum_size (
166- ffi.Pointer <native_window_options_t> options,
167- double width,
168- double height,
169- ) {
170- return _native_window_options_set_maximum_size (options, width, height);
171- }
172-
173- late final _native_window_options_set_maximum_sizePtr =
174- _lookup<
175- ffi.NativeFunction <
176- ffi.Void Function (
177- ffi.Pointer <native_window_options_t>,
178- ffi.Double ,
179- ffi.Double ,
180- )
181- >
182- > ('native_window_options_set_maximum_size' );
183- late final _native_window_options_set_maximum_size =
184- _native_window_options_set_maximum_sizePtr
185- .asFunction<
186- void Function (ffi.Pointer <native_window_options_t>, double , double )
187- > ();
188-
189- void native_window_options_set_centered (
190- ffi.Pointer <native_window_options_t> options,
191- bool centered,
192- ) {
193- return _native_window_options_set_centered (options, centered);
194- }
195-
196- late final _native_window_options_set_centeredPtr =
197- _lookup<
198- ffi.NativeFunction <
199- ffi.Void Function (ffi.Pointer <native_window_options_t>, ffi.Bool )
200- >
201- > ('native_window_options_set_centered' );
202- late final _native_window_options_set_centered =
203- _native_window_options_set_centeredPtr
204- .asFunction<
205- void Function (ffi.Pointer <native_window_options_t>, bool )
206- > ();
207-
20865 /// Window basic operations
20966 int native_window_get_id (native_window_t window) {
21067 return _native_window_get_id (window);
@@ -3705,25 +3562,18 @@ class CNativeApiBindings {
37053562 late final _native_tray_icon_list_free = _native_tray_icon_list_freePtr
37063563 .asFunction< void Function (native_tray_icon_list_t)> ();
37073564
3708- /// Create a new window with the specified options
3709- /// @param options Window creation options
3565+ /// Create a new window with default settings
37103566 /// @return Window handle, or NULL if creation failed
3711- native_window_t native_window_manager_create (
3712- ffi.Pointer <native_window_options_t> options,
3713- ) {
3714- return _native_window_manager_create (options);
3567+ native_window_t native_window_manager_create () {
3568+ return _native_window_manager_create ();
37153569 }
37163570
37173571 late final _native_window_manager_createPtr =
3718- _lookup<
3719- ffi.NativeFunction <
3720- native_window_t Function (ffi.Pointer <native_window_options_t>)
3721- >
3722- > ('native_window_manager_create' );
3572+ _lookup< ffi.NativeFunction <native_window_t Function ()>> (
3573+ 'native_window_manager_create' ,
3574+ );
37233575 late final _native_window_manager_create = _native_window_manager_createPtr
3724- .asFunction<
3725- native_window_t Function (ffi.Pointer <native_window_options_t>)
3726- > ();
3576+ .asFunction< native_window_t Function ()> ();
37273577
37283578 /// Get a window by its ID
37293579 /// @param window_id The window ID
@@ -3983,25 +3833,6 @@ enum native_placement_t {
39833833 };
39843834}
39853835
3986- /// Window options structure for creating windows
3987- final class native_window_options_t extends ffi.Struct {
3988- /// Window title
3989- external ffi.Pointer <ffi.Char > title;
3990-
3991- /// Initial window size
3992- external native_size_t size;
3993-
3994- /// Minimum window size
3995- external native_size_t minimum_size;
3996-
3997- /// Maximum window size
3998- external native_size_t maximum_size;
3999-
4000- /// Whether to center the window on screen
4001- @ffi .Bool ()
4002- external bool centered;
4003- }
4004-
40053836/// Window list structure
40063837final class native_window_list_t extends ffi.Struct {
40073838 external ffi.Pointer <native_window_t> windows;
@@ -4493,29 +4324,25 @@ final class native_tray_icon_list_t extends ffi.Struct {
44934324
44944325/// Window event types
44954326enum native_window_event_type_t {
4496- NATIVE_WINDOW_EVENT_CREATED (0 ),
4497- NATIVE_WINDOW_EVENT_CLOSED (1 ),
4498- NATIVE_WINDOW_EVENT_FOCUSED (2 ),
4499- NATIVE_WINDOW_EVENT_BLURRED (3 ),
4500- NATIVE_WINDOW_EVENT_MINIMIZED (4 ),
4501- NATIVE_WINDOW_EVENT_MAXIMIZED (5 ),
4502- NATIVE_WINDOW_EVENT_RESTORED (6 ),
4503- NATIVE_WINDOW_EVENT_MOVED (7 ),
4504- NATIVE_WINDOW_EVENT_RESIZED (8 );
4327+ NATIVE_WINDOW_EVENT_FOCUSED (0 ),
4328+ NATIVE_WINDOW_EVENT_BLURRED (1 ),
4329+ NATIVE_WINDOW_EVENT_MINIMIZED (2 ),
4330+ NATIVE_WINDOW_EVENT_MAXIMIZED (3 ),
4331+ NATIVE_WINDOW_EVENT_RESTORED (4 ),
4332+ NATIVE_WINDOW_EVENT_MOVED (5 ),
4333+ NATIVE_WINDOW_EVENT_RESIZED (6 );
45054334
45064335 final int value;
45074336 const native_window_event_type_t (this .value);
45084337
45094338 static native_window_event_type_t fromValue (int value) => switch (value) {
4510- 0 => NATIVE_WINDOW_EVENT_CREATED ,
4511- 1 => NATIVE_WINDOW_EVENT_CLOSED ,
4512- 2 => NATIVE_WINDOW_EVENT_FOCUSED ,
4513- 3 => NATIVE_WINDOW_EVENT_BLURRED ,
4514- 4 => NATIVE_WINDOW_EVENT_MINIMIZED ,
4515- 5 => NATIVE_WINDOW_EVENT_MAXIMIZED ,
4516- 6 => NATIVE_WINDOW_EVENT_RESTORED ,
4517- 7 => NATIVE_WINDOW_EVENT_MOVED ,
4518- 8 => NATIVE_WINDOW_EVENT_RESIZED ,
4339+ 0 => NATIVE_WINDOW_EVENT_FOCUSED ,
4340+ 1 => NATIVE_WINDOW_EVENT_BLURRED ,
4341+ 2 => NATIVE_WINDOW_EVENT_MINIMIZED ,
4342+ 3 => NATIVE_WINDOW_EVENT_MAXIMIZED ,
4343+ 4 => NATIVE_WINDOW_EVENT_RESTORED ,
4344+ 5 => NATIVE_WINDOW_EVENT_MOVED ,
4345+ 6 => NATIVE_WINDOW_EVENT_RESIZED ,
45194346 _ => throw ArgumentError (
45204347 "Unknown value for native_window_event_type_t: $value " ,
45214348 ),
0 commit comments