]> git.mdlowis.com Git - proto/labwc.git/commitdiff
ssd: update comments referencing ssd_part/ssd_part_type
authorJohn Lindgren <john@jlindgren.net>
Sat, 6 Sep 2025 18:04:21 +0000 (14:04 -0400)
committerJohn Lindgren <john@jlindgren.net>
Sat, 6 Sep 2025 20:00:20 +0000 (16:00 -0400)
include/input/cursor.h
include/ssd-internal.h
include/theme.h

index 8dd8a2745e55161da3373fce2ed16a631c03b9f1..e6cfb4487f5f3fe17a16b1312b5e18776466173a 100644 (file)
@@ -41,25 +41,25 @@ struct cursor_context {
  *
  * Behavior if node points to a surface:
  *  - If surface is a layer-surface, type will be
- *    set to LAB_SSD_LAYER_SURFACE and view will be NULL.
+ *    set to LAB_NODE_LAYER_SURFACE and view will be NULL.
  *
  *  - If surface is a 'lost' unmanaged xsurface (one
  *    with a never-mapped parent view), type will
- *    be set to LAB_SSD_UNMANAGED and view will be NULL.
+ *    be set to LAB_NODE_UNMANAGED and view will be NULL.
  *
  *    'Lost' unmanaged xsurfaces are usually caused by
  *    X11 applications opening popups without setting
  *    the main window as parent. Example: VLC submenus.
  *
  *  - Any other surface will cause type to be set to
- *    LAB_SSD_CLIENT and return the attached view.
+ *    LAB_NODE_CLIENT and return the attached view.
  *
  * Behavior if node points to internal elements:
  *  - type will be set to the appropriate enum value
  *    and view will be NULL if the node is not part of the SSD.
  *
  * If no node is found for the given layout coordinates,
- * type will be set to LAB_SSD_ROOT and view will be NULL.
+ * type will be set to LAB_NODE_ROOT and view will be NULL.
  *
  */
 struct cursor_context get_cursor_context(struct server *server);
index 22f8ae4502b31875cbd773ec8fcc626ef5bf98ae..db8d02a62555f015c5674a9664455cbde64500db 100644 (file)
@@ -13,21 +13,22 @@ struct ssd_state_title_width {
 };
 
 /*
- * The scene-graph of SSD looks like below. The parentheses indicate the type of
- * ssd_part attached to the node.
+ * The scene-graph of SSD looks like below. The parentheses indicate the
+ * type of each node (enum lab_node_type, stored in the node_descriptor
+ * attached to the wlr_scene_node).
  *
- * ssd->tree (LAB_SSD_NONE)
- * +--titlebar (LAB_SSD_PART_TITLEBAR)
+ * ssd->tree (LAB_NODE_NONE)
+ * +--titlebar (LAB_NODE_TITLEBAR)
  * |  +--inactive
  * |  |  +--background bar
  * |  |  +--left corner
  * |  |  +--right corner
- * |  |  +--title (LAB_SSD_PART_TITLE)
- * |  |  +--iconify button (LAB_SSD_BUTTON_ICONIFY)
+ * |  |  +--title (LAB_NODE_TITLE)
+ * |  |  +--iconify button (LAB_NODE_BUTTON_ICONIFY)
  * |  |  |  +--normal close icon image
  * |  |  |  +--hovered close icon image
  * |  |  |  +--...
- * |  |  +--window icon (LAB_SSD_BUTTON_WINDOW_ICON)
+ * |  |  +--window icon (LAB_NODE_BUTTON_WINDOW_ICON)
  * |  |  |  +--window icon image
  * |  |  +--...
  * |  +--active
@@ -103,9 +104,8 @@ struct ssd {
                        struct wlr_scene_buffer *corner_right;
                        struct wlr_scene_buffer *bar;
                        struct scaled_font_buffer *title;
-                       /* List of ssd_parts that represent buttons */
-                       struct wl_list buttons_left;
-                       struct wl_list buttons_right;
+                       struct wl_list buttons_left; /* ssd_button.link */
+                       struct wl_list buttons_right; /* ssd_button.link */
                } subtrees[2]; /* indexed by enum ssd_active_state */
        } titlebar;
 
@@ -149,9 +149,8 @@ struct ssd_button {
         * img_buffers[state_set] is displayed. Some of these can be NULL
         * (e.g. img_buffers[LAB_BS_ROUNDED] is set only for corner buttons).
         *
-        * When the type of ssd_part pointing to ssd_button is
-        * LAB_SSD_BUTTON_WINDOW_ICON, these are all NULL and window_icon is
-        * used instead.
+        * When the button type is LAB_NODE_BUTTON_WINDOW_ICON,
+        * these are all NULL and window_icon is used instead.
         */
        struct scaled_img_buffer *img_buffers[LAB_BS_ALL + 1];
 
index 4e9f470569ec74fc3135ae0272fb5602e2722510..0df661e5eb3608c36cc27cf5f066c6ba9bca3089 100644 (file)
@@ -104,9 +104,9 @@ struct theme {
                 * The texture of a window buttons for each hover/toggled/rounded
                 * state. This can be accessed like:
                 *
-                * buttons[LAB_SSD_BUTTON_ICONIFY][LAB_BS_HOVERED | LAB_BS_TOGGLED]
+                * buttons[LAB_NODE_BUTTON_ICONIFY][LAB_BS_HOVERED | LAB_BS_TOGGLED]
                 *
-                * Elements in buttons[0] are all NULL since LAB_SSD_BUTTON_FIRST is 1.
+                * Elements in buttons[0] are all NULL since LAB_NODE_BUTTON_FIRST is 1.
                 */
                struct lab_img *button_imgs
                        [LAB_NODE_BUTTON_LAST + 1][LAB_BS_ALL + 1];