* 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#endif
+#ifdef GDK_WINDOWING_QUARTZ
+
+static gboolean
+check_quartz_special_cases (GtkIMContextSimple *context_simple,
+ gint n_compose)
+{
+ GtkIMContextSimplePrivate *priv = context_simple->priv;
+ guint value = 0;
+
+ if (n_compose == 2)
+ {
+ switch (priv->compose_buffer[0])
+ {
+ case GDK_KEY_dead_doubleacute:
+ switch (priv->compose_buffer[1])
+ {
+ case GDK_KEY_dead_doubleacute:
+ case GDK_KEY_space:
+ value = GDK_KEY_quotedbl; break;
+
+ case 'a': value = GDK_KEY_adiaeresis; break;
+ case 'A': value = GDK_KEY_Adiaeresis; break;
+ case 'e': value = GDK_KEY_ediaeresis; break;
+ case 'E': value = GDK_KEY_Ediaeresis; break;
+ case 'i': value = GDK_KEY_idiaeresis; break;
+ case 'I': value = GDK_KEY_Idiaeresis; break;
+ case 'o': value = GDK_KEY_odiaeresis; break;
+ case 'O': value = GDK_KEY_Odiaeresis; break;
+ case 'u': value = GDK_KEY_udiaeresis; break;
+ case 'U': value = GDK_KEY_Udiaeresis; break;
+ case 'y': value = GDK_KEY_ydiaeresis; break;
+ case 'Y': value = GDK_KEY_Ydiaeresis; break;
+ }
+ break;
+
+ case GDK_KEY_dead_acute:
+ switch (priv->compose_buffer[1])
+ {
+ case 'c': value = GDK_KEY_ccedilla; break;
+ case 'C': value = GDK_KEY_Ccedilla; break;
+ }
+ break;
+ }
+ }
+
+ if (value > 0)
+ {
+ gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple),
+ gdk_keyval_to_unicode (value));
+ priv->compose_buffer[0] = 0;
+
+ GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+#endif
+
static gboolean
check_compact_table (GtkIMContextSimple *context_simple,
const GtkComposeTableCompact *table,
}
/* This function receives a sequence of Unicode characters and tries to
- * normalize it (NFC). We check for the case the the resulting string
+ * normalize it (NFC). We check for the case where the resulting string
* has length 1 (single character).
* NFC normalisation normally rearranges diacritic marks, unless these
* belong to the same Canonical Combining Class.
return TRUE;
#endif
+#ifdef GDK_WINDOWING_QUARTZ
+ if (check_quartz_special_cases (context_simple, n_compose))
+ return TRUE;
+#endif
+
if (check_compact_table (context_simple, >k_compose_table_compact, n_compose))
return TRUE;