[libdazzle: 1/2] docs: dzl-pango, dzl-rgba, dzl-dnd



commit d82bb6fc22708695626f2a76f915c2c534aa128c
Author: James Westman <flyingpimonster flyingpimonster net>
Date:   Mon Jan 7 18:33:55 2019 +0000

    docs: dzl-pango, dzl-rgba, dzl-dnd

 src/util/dzl-dnd.c   |  8 ++++++++
 src/util/dzl-pango.c |  6 ++++++
 src/util/dzl-rgba.c  | 17 +++++++++++++++++
 3 files changed, 31 insertions(+)
---
diff --git a/src/util/dzl-dnd.c b/src/util/dzl-dnd.c
index dfe06cd..490afcc 100644
--- a/src/util/dzl-dnd.c
+++ b/src/util/dzl-dnd.c
@@ -22,6 +22,12 @@
 
 #include "dzl-dnd.h"
 
+/**
+ * SECTION:dzl-dnd
+ * @title: Drag-and-Drop Utilities
+ * @short_description: Helper functions to use with GTK's drag-and-drop system
+ */
+
 /**
  * dzl_dnd_get_uri_list:
  * @selection_data: the #GtkSelectionData from drag_data_received
@@ -31,6 +37,8 @@
  * Returns: (transfer full): a string array which will hold the uris or
  *   %NULL if there were no valid uris. g_strfreev should be used when
  *   the string array is no longer used
+ *
+ * Deprecated: Use gtk_selection_data_get_uris() instead; it is exactly the same.
  */
 gchar **
 dzl_dnd_get_uri_list (GtkSelectionData *selection_data)
diff --git a/src/util/dzl-pango.c b/src/util/dzl-pango.c
index be88a9d..a0806fb 100644
--- a/src/util/dzl-pango.c
+++ b/src/util/dzl-pango.c
@@ -32,6 +32,12 @@
 #define FONT_WEIGHT  "font-weight"
 #define FONT_SIZE    "font-size"
 
+/**
+ * SECTION:dzl-pango
+ * @title: Pango Utilities
+ * @short_description: Utilities to use with the Pango text layout library
+ */
+
 /**
  * dzl_pango_font_description_to_css:
  *
diff --git a/src/util/dzl-rgba.c b/src/util/dzl-rgba.c
index 56e1287..19fa2e5 100644
--- a/src/util/dzl-rgba.c
+++ b/src/util/dzl-rgba.c
@@ -49,6 +49,12 @@
  */
 
 
+/**
+ * SECTION:dzl-rgba
+ * @title: Color Utilities
+ * @short_description: Basic utilities for working with colors
+ */
+
 static void
 rgb_to_hls (gdouble *r,
             gdouble *g,
@@ -183,6 +189,17 @@ hls_to_rgb (gdouble *h,
     }
 }
 
+/**
+ * dzl_rgba_shade:
+ * @rgba: a #GdkRGBA to shade
+ * @dst: (out): the resulting shade
+ * @k: the factor by which to shade the input color
+ *
+ * Creates a shade of the color @rgba by multiplying its saturation and lightness by @k.
+ *
+ * Values of @k greater than 1 will make the color brighter, while values less than 1 will make it
+ * darker. The alpha value will remain the same.
+ */
 void
 dzl_rgba_shade (const GdkRGBA *rgba,
                 GdkRGBA       *dst,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]