diff libmlk-ui/ui/align.h @ 298:196264679079

misc: remove usage of bool
author David Demelier <markand@malikania.fr>
date Wed, 10 Mar 2021 18:49:08 +0100
parents 08ab73b32832
children d01e83210ca2
line wrap: on
line diff
--- a/libmlk-ui/ui/align.h	Wed Mar 10 18:49:00 2021 +0100
+++ b/libmlk-ui/ui/align.h	Wed Mar 10 18:49:08 2021 +0100
@@ -19,89 +19,33 @@
 #ifndef MOLKO_UI_ALIGN_H
 #define MOLKO_UI_ALIGN_H
 
-/**
- * \file align.h
- * \brief User interface alignment.
- */
-
 #include <core/core.h>
 
-/**
- * \brief Label alignment in bounding box.
- *
- * The alignment is described as following:
- *
- * ```
- * +---------------------+
- * | 2        3        4 |
- * |                     |
- * | 9        1        5 |
- * |                     |
- * | 8        7        6 |
- * +---------------------+
- * ```
- *
- * The default value of 0 (LABEL_ALIGN_NONE) means the alignment isn't used.
- */
 enum align {
-	ALIGN_NONE,             /*!< No alignment. */
-	ALIGN_CENTER,           /*!< Align to the center. */
-	ALIGN_TOP_LEFT,         /*!< Top left. */
-	ALIGN_TOP,              /*!< Top center (aligned horizontally). */
-	ALIGN_TOP_RIGHT,        /*!< Top right. */
-	ALIGN_RIGHT,            /*!< Right (aligned vertically). */
-	ALIGN_BOTTOM_RIGHT,     /*!< Bottom right. */
-	ALIGN_BOTTOM,           /*!< Bottom (aligned horizontally). */
-	ALIGN_BOTTOM_LEFT,      /*!< Bottom left. */
-	ALIGN_LEFT              /*!< Left (aligned vertically). */
+	ALIGN_NONE,
+	ALIGN_CENTER,
+	ALIGN_TOP_LEFT,
+	ALIGN_TOP,
+	ALIGN_TOP_RIGHT,
+	ALIGN_RIGHT,
+	ALIGN_BOTTOM_RIGHT,
+	ALIGN_BOTTOM,
+	ALIGN_BOTTOM_LEFT,
+	ALIGN_LEFT
 };
 
 CORE_BEGIN_DECLS
 
-/**
- * Align the given object relative to its parent region.
- *
- * The arguments are described as following:
- *
- * ```
- * Example of ALIGN_LEFT (centered vertically but placed on the left.)
- *
- *    px, py
- *      +----------pw----------+
- *      |                      |
- *      | x, y                 |
- *      | +---w---+            |
- *     ph h       |            |
- *      | +-------+            |
- *      |                      |
- *      |                      |
- *      +----------------------+
- * ```
- *
- * As a convenience, x and y are left untouched if align is ALIGN_NONE which
- * means you can set the coordinates to default values and still call the align
- * function without need to check.
- *
- * \param align the desired alignment
- * \param x the pointer to x coordinate to modify (may be NULL)
- * \param y the pointer yo y coordinate to modify (may be NULL)
- * \param w the object width
- * \param h the object height
- * \param px the parent region start
- * \param py the parent region start
- * \param pw the parent region width
- * \param ph the parent region height
- */
 void
-align(enum align align,
-      int *x,
-      int *y,
-      unsigned int w,
-      unsigned int h,
-      int px,
-      int py,
-      unsigned int pw,
-      unsigned int ph);
+align(enum align,
+      int *,
+      int *,
+      unsigned int,
+      unsigned int,
+      int,
+      int,
+      unsigned int,
+      unsigned int);
 
 CORE_END_DECLS