[gtk+] docs: Add wayland documentation to Gdk reference



commit 40c5d373403ef20d4956d78f3b3a0d70ccb6eb2c
Author: Jan Arne Petersen <jpetersen openismus com>
Date:   Wed Mar 20 16:40:26 2013 +0100

    docs: Add wayland documentation to Gdk reference

 docs/reference/gdk/gdk-docs.sgml     |    1 +
 docs/reference/gdk/gdk3-sections.txt |   49 ++++++++++++++++++++++++++++++++++
 gdk/wayland/gdkdisplay-wayland.c     |   34 +++++++++++++++++++++++
 3 files changed, 84 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gdk/gdk-docs.sgml b/docs/reference/gdk/gdk-docs.sgml
index 7d012c9..a5107dc 100644
--- a/docs/reference/gdk/gdk-docs.sgml
+++ b/docs/reference/gdk/gdk-docs.sgml
@@ -43,6 +43,7 @@
     <xi:include href="xml/pango_interaction.xml" />
     <xi:include href="xml/cairo_interaction.xml" />
     <xi:include href="xml/x_interaction.xml" />
+    <xi:include href="xml/wayland_interaction.xml" />
     <xi:include href="xml/gdkapplaunchcontext.xml" />
     <xi:include href="xml/gdktestutils.xml" />
   </reference>
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 34069e4..a8d0ddd 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -52,6 +52,7 @@ gdk_error_trap_pop_ignored
 GDK_WINDOWING_X11
 GDK_WINDOWING_WIN32
 GDK_WINDOWING_QUARTZ
+GDK_WINDOWING_WAYLAND
 
 <SUBSECTION>
 GDK_VERSION_3_0
@@ -1129,6 +1130,54 @@ gdk_window_impl_x11_get_type
 </SECTION>
 
 <SECTION>
+<INCLUDE>gdk/gdkwayland.h</INCLUDE>
+<TITLE>Wayland Interaction</TITLE>
+<FILE>wayland_interaction</FILE>
+gdk_wayland_device_get_wl_keyboard
+gdk_wayland_device_get_wl_pointer
+gdk_wayland_device_get_wl_seat
+gdk_wayland_display_get_wl_compositor
+gdk_wayland_display_get_wl_display
+gdk_wayland_display_get_wl_shell
+gdk_wayland_window_get_wl_shell_surface
+gdk_wayland_window_get_wl_surface
+gdk_wayland_window_set_use_custom_surface
+
+<SUBSECTION Standard>
+GDK_TYPE_WAYLAND_DEVICE
+GDK_WAYLAND_DEVICE
+GDK_WAYLAND_DEVICE_CLASS
+GDK_WAYLAND_DEVICE_GET_CLASS
+GDK_IS_WAYLAND_DEVICE
+GDK_IS_WAYLAND_DEVICE_CLASS
+GDK_TYPE_WAYLAND_DISPLAY
+GDK_WAYLAND_DISPLAY
+GDK_WAYLAND_DISPLAY_CLASS
+GDK_WAYLAND_DISPLAY_GET_CLASS
+GDK_IS_WAYLAND_DISPLAY
+GDK_IS_WAYLAND_DISPLAY_CLASS
+GDK_TYPE_WAYLAND_DISPLAY_MANAGER
+GDK_WAYLAND_DISPLAY_MANAGER
+GDK_WAYLAND_DISPLAY_MANAGER_CLASS
+GDK_WAYLAND_DISPLAY_MANAGER_GET_CLASS
+GDK_IS_WAYLAND_DISPLAY_MANAGER
+GDK_IS_WAYLAND_DISPLAY_MANAGER_CLASS
+GDK_TYPE_WAYLAND_WINDOW
+GDK_WAYLAND_WINDOW
+GDK_WAYLAND_WINDOW_CLASS
+GDK_WAYLAND_WINDOW_GET_CLASS
+GDK_IS_WAYLAND_WINDOW
+GDK_IS_WAYLAND_WINDOW_CLASS
+
+<SUBSECTION Private>
+gdk_wayland_device_get_type
+gdk_wayland_display_get_type
+gdk_wayland_display_manager_get_type
+gdk_wayland_window_get_type
+
+</SECTION>
+
+<SECTION>
 <TITLE>Application launching</TITLE>
 <FILE>gdkapplaunchcontext</FILE>
 GdkAppLaunchContext
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 22d282d..0dbf91f 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -34,6 +34,40 @@
 #include "gdkkeysprivate.h"
 #include "gdkprivate-wayland.h"
 
+/**
+ * SECTION:wayland_interaction
+ * @Short_description: Wayland backend-specific functions
+ * @Title: Wayland Interaction
+ *
+ * The functions in this section are specific to the GDK Wayland backend.
+ * To use them, you need to include the <literal>&lt;gdk/gdkwayland.h&gt;</literal>
+ * header and use the Wayland-specific pkg-config files to build your
+ * application (either <literal>gdk-wayland-3.0</literal> or
+ * <literal>gtk+-wayland-3.0</literal>).
+ *
+ * To make your code compile with other GDK backends, guard backend-specific
+ * calls by an ifdef as follows. Since GDK may be built with multiple
+ * backends, you should also check for the backend that is in use (e.g. by
+ * using the GDK_IS_WAYLAND_DISPLAY() macro).
+ * |[
+ * #ifdef GDK_WINDOWING_WAYLAND
+ *   if (GDK_IS_WAYLAND_DISPLAY (display))
+ *     {
+ *       /&ast; make Wayland-specific calls here &ast;/
+ *     }
+ *   else
+ * #endif
+ * #ifdef GDK_WINDOWING_X11
+ *   if (GDK_IS_X11_DISPLAY (display))
+ *     {
+ *       /&ast; make X11-specific calls here &ast;/
+ *     }
+ *   else
+ * #endif
+ *   g_error ("Unsupported GDK backend");
+ * ]|
+ */
+
 static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *wayland_display);
 
 G_DEFINE_TYPE (GdkWaylandDisplay, gdk_wayland_display, GDK_TYPE_DISPLAY)


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