commit 9874689
shrub
·
2026-04-29 17:11:15 +0000 UTC
parent 504e3ab
grammar in swc.h
1 files changed,
+19,
-19
+19,
-19
1@@ -38,11 +38,11 @@ struct wl_event_loop;
2 struct wld_buffer;
3
4 /**
5- * gett the current cursor position
6+ * Get the current cursor position.
7 *
8 * The returned coordinates are in compositor-global space, in wl_fixed_t
9 * (24.8) fixed-point units, but exposed as raw int32_t to avoid needing
10- * wayland headers
11+ * wayland headers.
12 *
13 */
14 bool
15@@ -86,7 +86,7 @@ enum swc_cursor_mode {
16 };
17
18 /**
19- * override the compositor's internal cursor
20+ * Override the compositor's internal cursor.
21 *
22 * this is intended for window managers to show mode cursors
23 * (move/resize/select) like the ones in hevel If a client has set its own
24@@ -96,7 +96,7 @@ void
25 swc_set_cursor(enum swc_cursor_kind kind);
26
27 /**
28- * control whether client cursor surfaces are honored
29+ * Control whether client cursor surfaces are honored.
30 */
31 void
32 swc_set_cursor_mode(enum swc_cursor_mode mode);
33@@ -393,7 +393,7 @@ swc_window_set_border(struct swc_window *window, uint32_t inner_border_color,
34 /*window decor things*/
35
36 /**
37- * Select which decor edge a text slot is rendered on
38+ * Select which decor edge a text slot is rendered on.
39 */
40 enum swc_decor_edge {
41 SWC_DECOR_EDGE_TOP,
42@@ -403,7 +403,7 @@ enum swc_decor_edge {
43 };
44
45 /**
46- * choose text alignment within the selected decor edge.
47+ * Choose text alignment within the selected decor edge.
48 *
49 * for top and bottom edges, alignment is horizontal
50 * for left and right edges, alignment is vertical
51@@ -415,12 +415,12 @@ enum swc_decor_align {
52 };
53
54 /**
55- * describe a window decor text slot.
56+ * Describe a window decor text slot.
57 *
58 * if enabled is false, no text is drawn.
59 *
60 * the wm supplies some string to be rendered in this decor slot. swc
61- * copies the string when swc_window_set_decor() is called, so caller doesnt
62+ * copies the string when swc_window_set_decor() is called, so caller doesn't
63 * need to keep it after the call returns.
64 *
65 * for top and bottom edges, text is drawn horizontally
66@@ -428,7 +428,7 @@ enum swc_decor_align {
67 * per row.
68 *
69 * the font field accepts some fontconfig pattern such as "sans-serif:size=10".
70- * if font is NULL, a default font is used (dont be a loser, pick a cool font)
71+ * if font is NULL, a default font is used.
72 */
73 struct swc_decor_text {
74 bool enabled;
75@@ -442,12 +442,12 @@ struct swc_decor_text {
76 };
77
78 /**
79- * describes one wm-supplied decor pixel block
80+ * Describes one wm-supplied decor pixel block.
81 *
82 * swc copies the pixel data when swc_window_set_decor() is called, so caller
83- * doesnt need to keep it after the call returns
84+ * doesn't need to keep it after the call returns.
85 *
86- * pixel data is expected to be ARGB8888 with the provided stride.
87+ * Pixel data is expected to be ARGB8888 with the provided stride.
88 */
89 struct swc_decor_part {
90 uint32_t width, height;
91@@ -456,7 +456,7 @@ struct swc_decor_part {
92 };
93
94 /**
95- * describes optional pixel blocks for the outer frame of a decor.
96+ * Describes optional pixel blocks for the outer frame of a decor.
97 *
98 * corner parts are drawn once at their matching corner
99 * edge parts are tiled to fill the remaining edge area between corners.
100@@ -473,12 +473,12 @@ struct swc_decor_parts {
101 };
102
103 /**
104- * describe decor around a window's edges.
105+ * Describe decor around a window's edges.
106 *
107 * The edge sizes extend outward from the window content geometry.
108- * if you put 0 it won't be visible
109+ * if you put 0 it won't be visible.
110 *
111- * the title field controls an optional text slot rendered on one edge
112+ * The title field controls an optional text slot rendered on one edge.
113 */
114 struct swc_decor {
115 uint32_t color;
116@@ -488,14 +488,14 @@ struct swc_decor {
117 };
118
119 /**
120- * set window decor around the window.
121+ * Set window decor around the window.
122 *
123 * the dimensions are independent for each edge and extend outward from the
124 * window content geometry.
125 *
126- * swc copies any decor text string needed by the configuration
127+ * swc copies any decor text string needed by the configuration.
128 *
129- * passing NULL disables window dcor
130+ * passing NULL disables window decor.
131 */
132 void
133 swc_window_set_decor(struct swc_window *window, const struct swc_decor *decor);