summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-05-20 09:16:19 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-05-21 13:53:38 -0400
commit09965527082cf819e1109e738635976a447d02fc (patch)
tree37ef13ef60dbd6203d9faca618f712fc2e6ac6c8
parentf5bd9f721cb9ea39393d3541e9ab60b14d26076c (diff)
downloadgtk+-09965527082cf819e1109e738635976a447d02fc.tar.gz
demos: Clean up doc comments
These don't show up anywhere, but might still clean them up.
-rw-r--r--demos/gtk-demo/gskshaderpaintable.c33
-rw-r--r--demos/gtk-demo/gtkfishbowl.c4
-rw-r--r--demos/gtk-demo/listview_applauncher.c30
3 files changed, 32 insertions, 35 deletions
diff --git a/demos/gtk-demo/gskshaderpaintable.c b/demos/gtk-demo/gskshaderpaintable.c
index 3eb0cbc89f..f165358e34 100644
--- a/demos/gtk-demo/gskshaderpaintable.c
+++ b/demos/gtk-demo/gskshaderpaintable.c
@@ -23,13 +23,10 @@
#include "gskshaderpaintable.h"
/**
- * SECTION:gskshaderpaintable
- * @Short_description: Drawing with shaders
- * @Title: GskShaderPaintable
- * @see_also: #GdkPaintable
+ * GskShaderPaintable:
*
- * GskShaderPaintable is an implementation of the #GdkPaintable interface
- * that uses a #GskGLShader to create pixels.
+ * `GskShaderPaintable` is an implementation of the `GdkPaintable` interface
+ * that uses a `GskGLShader` to create pixels.
*
* You can set the uniform data that the shader needs for rendering
* using gsk_shader_paintable_set_args(). This function can
@@ -38,7 +35,7 @@
*
* Commonly, time is passed to shaders as a float uniform containing
* the elapsed time in seconds. The convenience API
- * gsk_shader_paintable_update_time() can be called from a #GtkTickCallback
+ * gsk_shader_paintable_update_time() can be called from a `GtkTickCallback`
* to update the time based on the frame time of the frame clock.
*/
@@ -186,7 +183,7 @@ gsk_shader_paintable_init (GskShaderPaintable *self)
* pixels. The shader must not require input textures.
* If @data is %NULL, all uniform values are set to zero.
*
- * Returns: (transfer full): a new #GskShaderPaintable
+ * Returns: (transfer full): a new `GskShaderPaintable`
*/
GdkPaintable *
gsk_shader_paintable_new (GskGLShader *shader,
@@ -215,8 +212,8 @@ gsk_shader_paintable_new (GskGLShader *shader,
/**
* gsk_shader_paintable_set_shader:
- * @self: a #GskShaderPaintable
- * @shader: the #GskGLShader to use
+ * @self: a `GskShaderPaintable`
+ * @shader: the `GskGLShader` to use
*
* Sets the shader that the paintable will use
* to create pixels. The shader must not require
@@ -241,11 +238,11 @@ gsk_shader_paintable_set_shader (GskShaderPaintable *self,
/**
* gsk_shader_paintable_get_shader:
- * @self: a #GskShaderPaintable
+ * @self: a `GskShaderPaintable`
*
* Returns the shader that the paintable is using.
*
- * Returns: (transfer none): the #GskGLShader that is used
+ * Returns: (transfer none): the `GskGLShader` that is used
*/
GskGLShader *
gsk_shader_paintable_get_shader (GskShaderPaintable *self)
@@ -257,12 +254,12 @@ gsk_shader_paintable_get_shader (GskShaderPaintable *self)
/**
* gsk_shader_paintable_set_args:
- * @self: a #GskShaderPaintable
+ * @self: a `GskShaderPaintable`
* @data: Data block with uniform data for the shader
*
* Sets the uniform data that will be passed to the
* shader when rendering. The @data will typically
- * be produced by a #GskUniformDataBuilder.
+ * be produced by a `GskUniformDataBuilder`.
*
* Note that the @data should be considered immutable
* after it has been passed to this function.
@@ -284,7 +281,7 @@ gsk_shader_paintable_set_args (GskShaderPaintable *self,
/**
* gsk_shader_paintable_get_args:
- * @self: a #GskShaderPaintable
+ * @self: a `GskShaderPaintable`
*
* Returns the uniform data set with
* gsk_shader_paintable_get_args().
@@ -301,9 +298,9 @@ gsk_shader_paintable_get_args (GskShaderPaintable *self)
/**
* gsk_shader_paintable_update_time:
- * @self: a #GskShaderPaintable
+ * @self: a `GskShaderPaintable`
* @time_idx: the index of the uniform for time in seconds as float
- * @frame_time: the current frame time, as returned by #GdkFrameClock
+ * @frame_time: the current frame time, as returned by `GdkFrameClock`
*
* This function is a convenience wrapper for
* gsk_shader_paintable_set_args() that leaves all
@@ -311,7 +308,7 @@ gsk_shader_paintable_get_args (GskShaderPaintable *self)
* index @time_idx, which will be set to the elapsed time
* in seconds, since the first call to this function.
*
- * This function is usually called from a #GtkTickCallback.
+ * This function is usually called from a `GtkTickCallback`.
*/
void
gsk_shader_paintable_update_time (GskShaderPaintable *self,
diff --git a/demos/gtk-demo/gtkfishbowl.c b/demos/gtk-demo/gtkfishbowl.c
index e0ee9037e6..abcb65e55b 100644
--- a/demos/gtk-demo/gtkfishbowl.c
+++ b/demos/gtk-demo/gtkfishbowl.c
@@ -74,9 +74,9 @@ gtk_fishbowl_init (GtkFishbowl *fishbowl)
/**
* gtk_fishbowl_new:
*
- * Creates a new #GtkFishbowl.
+ * Creates a new `GtkFishbowl`.
*
- * Returns: a new #GtkFishbowl.
+ * Returns: a new `GtkFishbowl`.
*/
GtkWidget*
gtk_fishbowl_new (void)
diff --git a/demos/gtk-demo/listview_applauncher.c b/demos/gtk-demo/listview_applauncher.c
index a05c32b963..3194e05e21 100644
--- a/demos/gtk-demo/listview_applauncher.c
+++ b/demos/gtk-demo/listview_applauncher.c
@@ -8,8 +8,8 @@
#include <gtk/gtk.h>
-/* This is the function that creates the #GListModel that we need.
- * GTK list widgets need a #GListModel to display, as models support change
+/* This is the function that creates the GListModel that we need.
+ * GTK list widgets need a GListModel to display, as models support change
* notifications.
* Unfortunately various older APIs do not provide list models, so we create
* our own.
@@ -20,10 +20,10 @@ create_application_list (void)
GListStore *store;
GList *apps, *l;
- /* We use a #GListStore here, which is a simple array-like list implementation
+ /* We use a GListStore here, which is a simple array-like list implementation
* for manual management.
* List models need to know what type of data they provide, so we need to
- * provide the type here. As we want to do a list of applications, #GAppInfo
+ * provide the type here. As we want to do a list of applications, GAppInfo
* is the object we provide.
*/
store = g_list_store_new (G_TYPE_APP_INFO);
@@ -39,7 +39,7 @@ create_application_list (void)
}
/* This is the function we use for setting up new listitems to display.
- * We add just an #GtkImage and a #GtkLabel here to display the application's
+ * We add just an GtkImage and a GtkLabel here to display the application's
* icon and name, as this is just a simple demo.
*/
static void
@@ -61,8 +61,8 @@ setup_listitem_cb (GtkListItemFactory *factory,
/* Here we need to prepare the listitem for displaying its item. We get the
* listitem already set up from the previous function, so we can reuse the
- * #GtkImage widget we set up above.
- * We get the item - which we know is a #GAppInfo because it comes out of
+ * GtkImage widget we set up above.
+ * We get the item - which we know is a GAppInfo because it comes out of
* the model we set up above, grab its icon and display it.
*/
static void
@@ -85,7 +85,7 @@ bind_listitem_cb (GtkListItemFactory *factory,
* the listitem, but this is simple code, so the default implementations are
* enough. If we had connected signals, this step would have been necessary.
*
- * The #GtkSignalListItemFactory documentation contains more information about
+ * The GtkSignalListItemFactory documentation contains more information about
* this step.
*/
@@ -108,8 +108,8 @@ activate_cb (GtkListView *list,
app_info = g_list_model_get_item (G_LIST_MODEL (gtk_list_view_get_model (list)), position);
/* Prepare the context for launching the application and launch it. This
- * code is explained in detail in the documentation for #GdkAppLaunchContext
- * and #GAppInfo.
+ * code is explained in detail in the documentation for GdkAppLaunchContext
+ * and GAppInfo.
*/
context = gdk_display_get_app_launch_context (gtk_widget_get_display (GTK_WIDGET (list)));
if (!g_app_info_launch (app_info,
@@ -155,13 +155,13 @@ do_listview_applauncher (GtkWidget *do_widget)
gtk_window_set_title (GTK_WINDOW (window), "Application Launcher");
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *) &window);
- /* The #GtkListitemFactory is what is used to create #GtkListItems
+ /* The GtkListitemFactory is what is used to create GtkListItems
* to display the data from the model. So it is absolutely necessary
* to create one.
- * We will use a #GtkSignalListItemFactory because it is the simplest
+ * We will use a GtkSignalListItemFactory because it is the simplest
* one to use. Different ones are available for different use cases.
- * The most powerful one is #GtkBuilderListItemFactory which uses
- * #GtkBuilder .ui files, so it requires little code.
+ * The most powerful one is GtkBuilderListItemFactory which uses
+ * GtkBuilder .ui files, so it requires little code.
*/
factory = gtk_signal_list_item_factory_new ();
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
@@ -184,7 +184,7 @@ do_listview_applauncher (GtkWidget *do_widget)
*/
g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
- /* List widgets should always be contained in a #GtkScrolledWindow,
+ /* List widgets should always be contained in a GtkScrolledWindow,
* because otherwise they might get too large or they might not
* be scrollable.
*/