@@ -147,6 +147,7 @@ pub const Symbols = struct {
147147 cairo_fill : ? * const fn (* common.cairo_t ) callconv (.c ) void = null ,
148148 cairo_region_destroy : ? * const fn (* common.cairo_region_t ) callconv (.c ) void = null ,
149149
150+ /// \Uload for.
150151 pub fn loadFor (target : RuntimeTarget ) ! Symbols {
151152 var syms : Symbols = undefined ;
152153 try syms .loadDynLibs (target );
@@ -155,6 +156,7 @@ pub const Symbols = struct {
155156 return syms ;
156157 }
157158
159+ /// Releases resources owned by this value.
158160 pub fn deinit (self : * Symbols ) void {
159161 _ = self ;
160162 // Intentionally do not dlclose GTK/WebKit/GLib stacks at runtime.
@@ -165,6 +167,7 @@ pub const Symbols = struct {
165167 // Process-exit cleanup is sufficient for this host runtime.
166168 }
167169
170+ /// Returns init toolkit.
168171 pub fn initToolkit (self : * const Symbols ) void {
169172 if (self .gtk_api == .gtk4 ) {
170173 if (self .gtk_init_gtk4 ) | init | {
@@ -175,13 +178,15 @@ pub const Symbols = struct {
175178 if (self .gtk_init_gtk3 ) | init | init (null , null );
176179 }
177180
181+ /// Returns new top level window.
178182 pub fn newTopLevelWindow (self : * const Symbols ) ? * common.GtkWidget {
179183 return switch (self .gtk_api ) {
180184 .gtk3 = > if (self .gtk_window_new_gtk3 ) | create | create (common .GTK_WINDOW_TOPLEVEL ) else null ,
181185 .gtk4 = > if (self .gtk_window_new_gtk4 ) | create | create () else null ,
182186 };
183187 }
184188
189+ /// Returns add window child.
185190 pub fn addWindowChild (self : * const Symbols , window_widget : * common.GtkWidget , child_widget : * common.GtkWidget ) ? * common.GtkWidget {
186191 switch (self .gtk_api ) {
187192 .gtk3 = > {
@@ -212,15 +217,18 @@ pub const Symbols = struct {
212217 }
213218 }
214219
220+ /// \Ushow window.
215221 pub fn showWindow (self : * const Symbols , window_widget : * common.GtkWidget , child_widget : * common.GtkWidget ) void {
216222 self .gtk_widget_show (child_widget );
217223 self .gtk_widget_show (window_widget );
218224 }
219225
226+ /// \Uqueue widget draw.
220227 pub fn queueWidgetDraw (self : * const Symbols , widget : * common.GtkWidget ) void {
221228 if (self .gtk_widget_queue_draw ) | queue_draw | queue_draw (widget );
222229 }
223230
231+ /// \Udestroy window.
224232 pub fn destroyWindow (self : * const Symbols , window_widget : * common.GtkWidget ) void {
225233 switch (self .gtk_api ) {
226234 .gtk3 = > {
@@ -241,14 +249,17 @@ pub const Symbols = struct {
241249 }
242250 }
243251
252+ /// \Uset window position center.
244253 pub fn setWindowPositionCenter (self : * const Symbols , window : * common.GtkWindow ) void {
245254 if (self .gtk_window_set_position ) | set_pos | set_pos (window , common .GTK_WIN_POS_CENTER );
246255 }
247256
257+ /// \Uset window position.
248258 pub fn setWindowPosition (self : * const Symbols , window : * common.GtkWindow , x : c_int , y : c_int ) void {
249259 if (self .gtk_window_move ) | move | move (window , x , y );
250260 }
251261
262+ /// \Uapply transparent visual.
252263 pub fn applyTransparentVisual (self : * const Symbols , window_widget : * common.GtkWidget ) void {
253264 switch (self .gtk_api ) {
254265 .gtk3 = > {
@@ -269,6 +280,7 @@ pub const Symbols = struct {
269280 }
270281 }
271282
283+ /// \Uapply gtk4 window style.
272284 pub fn applyGtk4WindowStyle (
273285 self : * const Symbols ,
274286 window_widget : * common.GtkWidget ,
@@ -318,6 +330,7 @@ pub const Symbols = struct {
318330 }
319331 }
320332
333+ /// \Uminimize window.
321334 pub fn minimizeWindow (self : * const Symbols , window : * common.GtkWindow ) void {
322335 if (self .gtk_window_iconify ) | iconify | {
323336 iconify (window );
@@ -326,6 +339,7 @@ pub const Symbols = struct {
326339 if (self .gtk_window_minimize ) | minimize | minimize (window );
327340 }
328341
342+ /// \Uset window min size.
329343 pub fn setWindowMinSize (self : * const Symbols , window_widget : * common.GtkWidget , min_size : ? common.Size ) void {
330344 const set_size = self .gtk_widget_set_size_request orelse return ;
331345 if (min_size ) | size | {
@@ -335,6 +349,7 @@ pub const Symbols = struct {
335349 }
336350 }
337351
352+ /// \Uset window kiosk.
338353 pub fn setWindowKiosk (self : * const Symbols , window : * common.GtkWindow , enabled : bool ) void {
339354 if (enabled ) {
340355 if (self .gtk_window_fullscreen ) | fullscreen | fullscreen (window );
@@ -343,6 +358,7 @@ pub const Symbols = struct {
343358 }
344359 }
345360
361+ /// \Uset window high contrast.
346362 pub fn setWindowHighContrast (
347363 self : * const Symbols ,
348364 window_widget : * common.GtkWidget ,
@@ -380,6 +396,7 @@ pub const Symbols = struct {
380396 }
381397 }
382398
399+ /// \Uset window icon from path.
383400 pub fn setWindowIconFromPath (self : * const Symbols , window_widget : * common.GtkWidget , path_z : [* :0 ]const u8 ) void {
384401 const window : * common.GtkWindow = @ptrCast (window_widget );
385402
@@ -421,6 +438,7 @@ pub const Symbols = struct {
421438 set_icon_list (@ptrCast (surface ), list );
422439 }
423440
441+ /// \Uclear window icon.
424442 pub fn clearWindowIcon (self : * const Symbols , window_widget : * common.GtkWidget ) void {
425443 const window : * common.GtkWindow = @ptrCast (window_widget );
426444
@@ -440,6 +458,7 @@ pub const Symbols = struct {
440458 set_icon_list (@ptrCast (surface ), null );
441459 }
442460
461+ /// Returns whether the rounded shape.
443462 pub fn supportsRoundedShape (self : * const Symbols ) bool {
444463 return self .gtk_widget_shape_combine_region != null and
445464 self .gtk_widget_input_shape_combine_region != null and
@@ -458,6 +477,7 @@ pub const Symbols = struct {
458477 self .cairo_region_destroy != null ;
459478 }
460479
480+ /// \Uset rounded region.
461481 pub fn setRoundedRegion (self : * const Symbols , window_widget : * common.GtkWidget , region : ? * common.cairo_region_t ) void {
462482 if (self .gtk_widget_shape_combine_region ) | shape | shape (window_widget , region );
463483 if (self .gtk_widget_input_shape_combine_region ) | input_shape | input_shape (window_widget , region );
0 commit comments