[gnome-settings-daemon] Fix font-rendering schema to build



commit 07902dd0ff1621dd7aebffff0579e4dc5d0175ac
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Oct 8 14:57:56 2010 +0100

    Fix font-rendering schema to build

 data/Makefile.am                                   |    4 ++
 data/gsd-enums.h                                   |   50 ++++++++++++++++++++
 ....gnome.desktop.font-rendering.gschema.xml.in.in |   16 +++---
 3 files changed, 62 insertions(+), 8 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 0bff918..643d0c1 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,5 +1,8 @@
 NULL =
 
+gsettings_ENUM_NAMESPACE = org.gnome.desktop
+gsettings_ENUM_FILES = gsd-enums.h
+
 gsettings_SCHEMAS =							\
 	org.gnome.desktop.font-rendering.gschema.xml			\
 	org.gnome.desktop.keybindings.gschema.xml			\
@@ -40,6 +43,7 @@ EXTRA_DIST = 					\
 	$(service_in_files)			\
 	$(desktop_in_files)			\
 	$(xml_in_files)				\
+	$(gsettings_ENUM_FILES)			\
 	gnome-settings-daemon.pc.in		\
 	$(NULL)
 
diff --git a/data/gsd-enums.h b/data/gsd-enums.h
new file mode 100644
index 0000000..d131ffe
--- /dev/null
+++ b/data/gsd-enums.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright © 2010 Bastien Nocera <hadess hadess net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ * Authors:
+ *	Bastien Nocera <hadess hadess net>
+ */
+
+#ifndef __gsd_enums_h__
+#define __gsd_enums_h__
+
+typedef enum
+{
+  GSD_FONT_ANTIALIASING_MODE_NONE,
+  GSD_FONT_ANTIALIASING_MODE_GRAYSCALE,
+  GSD_FONT_ANTIALIASING_MODE_RGBA
+} GsdFontAntialiasingMode;
+
+typedef enum
+{
+  GSD_FONT_HINTING_NONE,
+  GSD_FONT_HINTING_SLIGHT,
+  GSD_FONT_HINTING_MEDIUM,
+  GSD_FONT_HINTING_FULL
+} GsdFontHinting;
+
+typedef enum
+{
+  GSD_FONT_RGBA_ORDER_RGBA,
+  GSD_FONT_RGBA_ORDER_RGB,
+  GSD_FONT_RGBA_ORDER_BGR,
+  GSD_FONT_RGBA_ORDER_VRGB,
+  GSD_FONT_RGBA_ORDER_VBGR
+} GsdFontRgbaOrder;
+
+#endif /* __gsd_enums_h__ */
diff --git a/data/org.gnome.desktop.font-rendering.gschema.xml.in.in b/data/org.gnome.desktop.font-rendering.gschema.xml.in.in
index fb78264..4f268b8 100644
--- a/data/org.gnome.desktop.font-rendering.gschema.xml.in.in
+++ b/data/org.gnome.desktop.font-rendering.gschema.xml.in.in
@@ -1,22 +1,22 @@
 <schemalist>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.desktop.font-rendering" path="/desktop/gnome/font-rendering/">
-    <key name="antialiasing" type="s">
-      <default>grayscale</default>
+    <key name="antialiasing" enum="org.gnome.desktop.GsdFontAntialiasingMode">
+      <default>'grayscale'</default>
       <_summary>Antialiasing</_summary>
       <_description>The type of antialiasing to use when rendering fonts. Possible values are: "none" for no antialiasing, "grayscale" for standard grayscale antialiasing, and "rgba" for subpixel antialiasing (LCD screens only).</_description>
     </key>
-    <key name="dpi" type="f">
-      <default></default>
+    <key name="dpi" type="d">
+      <default>96.0</default>
       <_summary>DPI</_summary>
       <_description>The resolution used for converting font sizes to pixel sizes, in dots per inch.</_description>
     </key>
-    <key name="hinting" type="s">
-      <default>medium</default>
+    <key name="hinting" enum="org.gnome.desktop.GsdFontHinting">
+      <default>'medium'</default>
       <_summary>Hinting</_summary>
       <_description>The type of hinting to use when rendering fonts. Possible values are: "none" for no hinting, "slight" for basic, "medium" for moderate, and "full" for maximum hinting (may cause distortion of letter forms).</_description>
     </key>
-    <key name="rgba-order" type="s">
-      <default>rgb</default>
+    <key name="rgba-order" enum="org.gnome.desktop.GsdFontRgbaOrder">
+      <default>'rgb'</default>
       <_summary>RGBA order</_summary>
       <_description>The order of subpixel elements on an LCD screen; only used when antialiasing is set to "rgba". Possible values are: "rgb" for red on left (most common), "bgr" for blue on left, "vrgb" for red on top, "vbgr" for red on bottom.</_description>
     </key>



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