changeset 617:19b195954ec3

misc: improve docs
author David Demelier <markand@malikania.fr>
date Mon, 21 Aug 2023 20:23:35 +0200
parents dae4cdc6a984
children 509b395171f2
files libmlk-core/mlk/core/window.c libmlk-ui/mlk/ui/frame.h libmlk-ui/mlk/ui/label.h
diffstat 3 files changed, 30 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libmlk-core/mlk/core/window.c	Mon Aug 21 20:15:53 2023 +0200
+++ b/libmlk-core/mlk/core/window.c	Mon Aug 21 20:23:35 2023 +0200
@@ -107,9 +107,9 @@
 	assert(cursor < MLK_WINDOW_CURSOR_LAST);
 
 	if (cursor == MLK_WINDOW_CURSOR_OFF)
-		SDL_ShowCursor();
+		SDL_HideCursor();
 	else {
-		SDL_HideCursor();
+		SDL_ShowCursor();
 		SDL_SetCursor(cursors[cursor]);
 	}
 }
--- a/libmlk-ui/mlk/ui/frame.h	Mon Aug 21 20:15:53 2023 +0200
+++ b/libmlk-ui/mlk/ui/frame.h	Mon Aug 21 20:23:35 2023 +0200
@@ -69,11 +69,28 @@
  * \brief Frame style.
  */
 struct mlk_frame_style {
+	/**
+	 * (read-write)
+	 *
+	 * Background color.
+	 */
 	unsigned long background;
+
+	/**
+	 * (read-write)
+	 *
+	 * Border color.
+	 */
 	unsigned long border;
+
+	/**
+	 * (read-write)
+	 *
+	 * Border size.
+	 */
 	unsigned int border_size;
 
-	/*
+	/**
 	 * (read-write, borrowed, optional)
 	 *
 	 * Arbitrary user data.
--- a/libmlk-ui/mlk/ui/label.h	Mon Aug 21 20:15:53 2023 +0200
+++ b/libmlk-ui/mlk/ui/label.h	Mon Aug 21 20:23:35 2023 +0200
@@ -80,6 +80,13 @@
 	 * Font to use.
 	 */
 	struct mlk_font *font;
+	
+	/**
+	 * (read-write, borrowed, optional)
+	 *
+	 * Arbitrary user data.
+	 */
+	void *data;
 
 	/**
 	 * Check the required size for this label.
@@ -136,19 +143,19 @@
 #endif
 
 /**
- * Invoke ::mlk_label_if::query.
+ * Invoke ::mlk_label_style::query.
  */
 int
 mlk_label_query(struct mlk_label *label, unsigned int *w, unsigned int *h);
 
 /**
- * Invoke ::mlk_label_if::update.
+ * Invoke ::mlk_label_style::update.
  */
 void
 mlk_label_update(struct mlk_label *label, unsigned int ticks);
 
 /**
- * Invoke ::mlk_label_if::draw.
+ * Invoke ::mlk_label_style::draw.
  */
 void
 mlk_label_draw(struct mlk_label *label);