+#ifdef HAVE_XFACE
+/**********************************************************************
+ * X-Face *
+ **********************************************************************/
+
+static void
+xface_validate (Lisp_Object instantiator)
+{
+ file_or_data_must_be_present (instantiator);
+}
+
+static Lisp_Object
+xface_normalize (Lisp_Object inst, Lisp_Object console_type)
+{
+ /* This function can call lisp */
+ Lisp_Object file = Qnil, mask_file = Qnil;
+ struct gcpro gcpro1, gcpro2, gcpro3;
+ Lisp_Object alist = Qnil;
+
+ GCPRO3 (file, mask_file, alist);
+
+ /* Now, convert any file data into inline data for both the regular
+ data and the mask data. At the end of this, `data' will contain
+ the inline data (if any) or Qnil, and `file' will contain
+ the name this data was derived from (if known) or Qnil.
+ Likewise for `mask_file' and `mask_data'.
+
+ Note that if we cannot generate any regular inline data, we
+ skip out. */
+
+ file = potential_pixmap_file_instantiator (inst, Q_file, Q_data,
+ console_type);
+ mask_file = potential_pixmap_file_instantiator (inst, Q_mask_file,
+ Q_mask_data, console_type);
+
+ if (CONSP (file)) /* failure locating filename */
+ signal_double_file_error ("Opening bitmap file",
+ "no such file or directory",
+ Fcar (file));
+
+ if (NILP (file) && NILP (mask_file)) /* no conversion necessary */
+ RETURN_UNGCPRO (inst);
+
+ alist = tagged_vector_to_alist (inst);
+
+ {
+ Lisp_Object data = make_string_from_file (file);
+ alist = remassq_no_quit (Q_file, alist);
+ /* there can't be a :data at this point. */
+ alist = Fcons (Fcons (Q_file, file),
+ Fcons (Fcons (Q_data, data), alist));
+ }
+
+ alist = xbm_mask_file_munging (alist, file, mask_file, console_type);
+
+ {
+ Lisp_Object result = alist_to_tagged_vector (Qxface, alist);
+ free_alist (alist);
+ RETURN_UNGCPRO (result);
+ }
+}
+
+static int
+xface_possible_dest_types (void)
+{
+ return
+ IMAGE_MONO_PIXMAP_MASK |
+ IMAGE_COLOR_PIXMAP_MASK |
+ IMAGE_POINTER_MASK;
+}
+
+#endif /* HAVE_XFACE */
+
+\f