summaryrefslogtreecommitdiff
path: root/contrib/gdk-pixbuf-xlib
diff options
context:
space:
mode:
authorJon Nordby <jononor@gmail.com>2011-03-01 00:20:55 +0000
committerJon Nordby <jononor@gmail.com>2011-03-06 19:27:19 +0000
commit80ad1d60b40f73b5b1b78e84affed2e0f207f5ae (patch)
tree6ac6abe1ea386f193ec12a58b69d71a8fcbae80c /contrib/gdk-pixbuf-xlib
parentaebd645908d6c28dc08335f6a828382aa213107b (diff)
downloadgdk-pixbuf-80ad1d60b40f73b5b1b78e84affed2e0f207f5ae.tar.gz
Documentation: Migrate from old tmpl files.
This puts all the docs that existed in tmpl files when gdk-pixbuf was moved out of gtk into inline comments. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=635643
Diffstat (limited to 'contrib/gdk-pixbuf-xlib')
-rw-r--r--contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c16
-rw-r--r--contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-render.c13
-rw-r--r--contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.c15
-rw-r--r--contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c12
-rw-r--r--contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h25
5 files changed, 80 insertions, 1 deletions
diff --git a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c
index ea6d8c25e..5daec9ac4 100644
--- a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c
+++ b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c
@@ -33,6 +33,22 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+/**
+ * SECTION:gdk-pixbuf-xlib-from-drawables
+ * @Short_description: Getting parts of an X drawable's image data into a pixbuf.
+ * @Title: X Drawables to Pixbufs
+ *
+ * The functions in this section allow you to take the image data
+ * from an X drawable and dump it into a #GdkPixbuf. This can be
+ * used for screenshots and other special effects. Note that these
+ * operations can be expensive, since the image data has to be
+ * transferred from the X server to the client program and converted.
+ *
+ *
+ * These functions are analogous to those for the GDK version of
+ * &gdk-pixbuf;.
+ */
+
#if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
#define LITTLE
#endif
diff --git a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-render.c b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-render.c
index ea64f30f3..f6f264a5c 100644
--- a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-render.c
+++ b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-render.c
@@ -25,6 +25,19 @@
#include "config.h"
#include "gdk-pixbuf-xlib-private.h"
+/**
+ * SECTION:gdk-pixbuf-xlib-rendering
+ * @Short_description: Rendering a pixbuf to an X drawable.
+ * @Title: Xlib Rendering
+ *
+ * The &gdk-pixbuf; Xlib library provides several convenience
+ * functions to render pixbufs to X drawables. It uses XlibRGB to
+ * render the image data.
+ *
+ *
+ * These functions are analogous to those for the GDK version of
+ * &gdk-pixbuf;.
+ */
/**
diff --git a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.c b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.c
index e2d17e316..ceb9d1ef5 100644
--- a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.c
+++ b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.c
@@ -22,6 +22,21 @@
#include <X11/Xlib.h>
#include "gdk-pixbuf-xlib-private.h"
+/**
+ * SECTION:gdk-pixbuf-xlib-init
+ * @Short_description: Initializing the &gdk-pixbuf; Xlib library.
+ * @Title: &gdk-pixbuf; Xlib initialization
+ * @See_also: XlibRGB
+ *
+ * In addition to the normal Gdk-specific functions, the &gdk-pixbuf;
+ * package provides a small library that lets Xlib-only applications
+ * use #GdkPixbuf structures and render them to X drawables. The
+ * functions in this section are used to initialize the &gdk-pixbuf;
+ * Xlib library. This library must be initialized near the beginning
+ * of the program or before calling any of the other &gdk-pixbuf;
+ * Xlib functions.
+ */
+
Display *gdk_pixbuf_dpy = NULL;
int gdk_pixbuf_screen = -1;
diff --git a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
index 701f34a9d..ff749c5fc 100644
--- a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
+++ b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
@@ -47,6 +47,18 @@
* Shawn T. Amundson <amundson@gtk.org>
*/
+/**
+ * SECTION:gdk-pixbuf-xlib-rgb
+ * @Short_description: Rendering RGB buffers to X drawables.
+ * @Title: XlibRGB
+ * @See_also: GdkRGB
+ *
+ * The XlibRGB set of functions is a port of the #GdkRGB library to
+ * use plain Xlib and X drawables. You can use these functions to
+ * render RGB buffers into drawables very quickly with high-quality
+ * dithering.
+ */
+
#if HAVE_CONFIG_H
# include <config.h>
# if STDC_HEADERS
diff --git a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h
index 9433aeacc..f838ea807 100644
--- a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h
+++ b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h
@@ -58,8 +58,14 @@ G_BEGIN_DECLS
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+/**
+ * XlibRgbCmap:
+ * @colors: FIXME.
+ * @lut: FIXME.
+ *
+ * FIXME: Describe this.
+ */
typedef struct _XlibRgbCmap XlibRgbCmap;
-
struct _XlibRgbCmap {
unsigned int colors[256];
unsigned char lut[256]; /* for 8-bit modes */
@@ -79,6 +85,23 @@ xlib_rgb_gc_set_foreground (GC gc, guint32 rgb);
void
xlib_rgb_gc_set_background (GC gc, guint32 rgb);
+/**
+ * XlibRgbDither:
+ * @XLIB_RGB_DITHER_NONE: Specifies no dithering.
+ * @XLIB_RGB_DITHER_NORMAL: Specifies dithering only on pseudocolor
+ * displays.
+ * @XLIB_RGB_DITHER_MAX: Specifies dithering on high color displays.
+ *
+ * These values are used to specify which dithering method should be
+ * used. <symbol>XLIB_RGB_DITHER_NONE</symbol> will use no dithering
+ * and simply map the colors in an RGB buffer to the closest colors
+ * that the display can provide.
+ * <symbol>XLIB_RGB_DITHER_NORMAL</symbol> will provide dithering
+ * only on pseudocolor displays.
+ * <symbol>XLIB_RGB_DITHER_MAX</symbol> will provide dithering on
+ * pseudocolor and 16-bit truecolor or &ldquo;high color&rdquo;
+ * displays.
+ */
typedef enum
{
XLIB_RGB_DITHER_NONE,