Mercurial > hg > xemacs-beta
comparison src/glyphs-gtk.c @ 563:183866b06e0b
[xemacs-hg @ 2001-05-24 07:50:48 by ben]
Makefile.in.in, abbrev.c, alloc.c, buffer.c, bytecode.c, callint.c, callproc.c, casetab.c, chartab.c, cmdloop.c, cmds.c, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console.c, data.c, database.c, debug.c, device-gtk.c, device-msw.c, device-tty.c, device-x.c, device.c, dialog-gtk.c, dialog-msw.c, dialog-x.c, dialog.c, dired-msw.c, dired.c, doc.c, doprnt.c, dragdrop.c, editfns.c, eldap.c, eldap.h, elhash.c, emacs-widget-accessors.c, emacs.c, emodules.c, esd.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, filelock.c, floatfns.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, general-slots.h, glade.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-gtk.c, gui-x.c, gui.c, gutter.c, hpplay.c, indent.c, input-method-xlib.c, insdel.c, intl.c, keymap.c, libsst.c, libsst.h, linuxplay.c, lisp.h, lread.c, lstream.c, lstream.h, macros.c, marker.c, md5.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, miscplay.c, miscplay.h, mule-ccl.c, mule-charset.c, mule-wnnfns.c, mule.c, nas.c, ntplay.c, ntproc.c, objects-gtk.c, objects-msw.c, objects-x.c, objects.c, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay.c, scrollbar.c, search.c, select-gtk.c, select-x.c, select.c, sgiplay.c, sheap.c, sound.c, specifier.c, sunplay.c, symbols.c, symeval.h, symsinit.h, syntax.c, sysdep.c, toolbar-msw.c, toolbar.c, tooltalk.c, ui-byhand.c, ui-gtk.c, undo.c, unexaix.c, unexapollo.c, unexconvex.c, unexec.c, widget.c, win32.c, window.c:
-- defsymbol -> DEFSYMBOL.
-- add an error type to all errors.
-- eliminate the error functions in eval.c that let you just
use Qerror as the type.
-- redo the error API to be more consistent, sensibly named,
and easier to use.
-- redo the error hierarchy somewhat. create new errors:
structure-formation-error, gui-error, invalid-constant,
stack-overflow, out-of-memory, process-error, network-error,
sound-error, printing-unreadable-object, base64-conversion-
error; coding-system-error renamed to text-conversion error;
some others.
-- fix Mule problems in error strings in emodules.c, tooltalk.c.
-- fix error handling in mswin open-network-stream.
-- Mule-ize all sound files and clean up the headers.
-- nativesound.h -> sound.h and used for all sound files.
-- move some shared stuff into glyphs-shared.c: first attempt
at eliminating some of the massive GTK code duplication.
xemacs.mak: add glyphs-shared.c.
xemacs-faq.texi: document how to debug X errors
subr.el: fix doc string to reflect reality
author | ben |
---|---|
date | Thu, 24 May 2001 07:51:33 +0000 |
parents | 0784d089fdc9 |
children | fec27b06b4e5 |
comparison
equal
deleted
inserted
replaced
562:c775bd016b32 | 563:183866b06e0b |
---|---|
151 #endif | 151 #endif |
152 | 152 |
153 #include "bitmaps.h" | 153 #include "bitmaps.h" |
154 | 154 |
155 DEFINE_IMAGE_INSTANTIATOR_FORMAT (gtk_resource); | 155 DEFINE_IMAGE_INSTANTIATOR_FORMAT (gtk_resource); |
156 Lisp_Object Q_resource_type, Q_resource_id; | |
157 Lisp_Object Qgtk_resource; | 156 Lisp_Object Qgtk_resource; |
158 #ifdef HAVE_WIDGETS | 157 #ifdef HAVE_WIDGETS |
159 Lisp_Object Qgtk_widget_instantiate_internal, Qgtk_widget_property_internal; | 158 Lisp_Object Qgtk_widget_instantiate_internal, Qgtk_widget_property_internal; |
160 Lisp_Object Qgtk_widget_redisplay_internal, Qgtk_widget_set_style; | 159 Lisp_Object Qgtk_widget_redisplay_internal, Qgtk_widget_set_style; |
161 #endif | 160 #endif |
622 unsigned int best_width, best_height; | 621 unsigned int best_width, best_height; |
623 if (! XQueryBestCursor (DisplayOfScreen (xs), RootWindowOfScreen (xs), | 622 if (! XQueryBestCursor (DisplayOfScreen (xs), RootWindowOfScreen (xs), |
624 width, height, &best_width, &best_height)) | 623 width, height, &best_width, &best_height)) |
625 /* this means that an X error of some sort occurred (we trap | 624 /* this means that an X error of some sort occurred (we trap |
626 these so they're not fatal). */ | 625 these so they're not fatal). */ |
627 signal_simple_error ("XQueryBestCursor() failed?", instantiator); | 626 gui_error ("XQueryBestCursor() failed?", instantiator); |
628 | 627 |
629 if (width > best_width || height > best_height) | 628 if (width > best_width || height > best_height) |
630 error_with_frob (instantiator, | 629 signal_ferror_with_frob (Qgui_error, instantiator, |
631 "pointer too large (%dx%d): " | 630 "pointer too large (%dx%d): " |
632 "server requires %dx%d or smaller", | 631 "server requires %dx%d or smaller", |
633 width, height, best_width, best_height); | 632 width, height, best_width, best_height); |
634 #endif | 633 #endif |
635 } | 634 } |
636 | 635 |
637 static void | 636 static void |
638 generate_cursor_fg_bg (Lisp_Object device, Lisp_Object *foreground, | 637 generate_cursor_fg_bg (Lisp_Object device, Lisp_Object *foreground, |
725 GdkGC *gc; | 724 GdkGC *gc; |
726 GdkWindow *d; | 725 GdkWindow *d; |
727 GdkPixmap *pixmap; | 726 GdkPixmap *pixmap; |
728 | 727 |
729 if (!DEVICE_GTK_P (XDEVICE (device))) | 728 if (!DEVICE_GTK_P (XDEVICE (device))) |
730 signal_simple_error ("Not a Gtk device", device); | 729 gui_error ("Not a Gtk device", device); |
731 | 730 |
732 d = GET_GTK_WIDGET_WINDOW (DEVICE_GTK_APP_SHELL (XDEVICE (device))); | 731 d = GET_GTK_WIDGET_WINDOW (DEVICE_GTK_APP_SHELL (XDEVICE (device))); |
733 | 732 |
734 if (!(dest_mask & IMAGE_COLOR_PIXMAP_MASK)) | 733 if (!(dest_mask & IMAGE_COLOR_PIXMAP_MASK)) |
735 incompatible_image_types (instantiator, dest_mask, | 734 incompatible_image_types (instantiator, dest_mask, |
736 IMAGE_COLOR_PIXMAP_MASK); | 735 IMAGE_COLOR_PIXMAP_MASK); |
737 | 736 |
738 pixmap = gdk_pixmap_new (d, gdk_image->width, gdk_image->height, gdk_image->depth); | 737 pixmap = gdk_pixmap_new (d, gdk_image->width, gdk_image->height, gdk_image->depth); |
739 if (!pixmap) | 738 if (!pixmap) |
740 signal_simple_error ("Unable to create pixmap", instantiator); | 739 gui_error ("Unable to create pixmap", instantiator); |
741 | 740 |
742 gc = gdk_gc_new (pixmap); | 741 gc = gdk_gc_new (pixmap); |
743 if (!gc) | 742 if (!gc) |
744 { | 743 { |
745 gdk_pixmap_unref (pixmap); | 744 gdk_pixmap_unref (pixmap); |
746 signal_simple_error ("Unable to create GC", instantiator); | 745 gui_error ("Unable to create GC", instantiator); |
747 } | 746 } |
748 | 747 |
749 gdk_draw_image (GDK_DRAWABLE (pixmap), gc, gdk_image, | 748 gdk_draw_image (GDK_DRAWABLE (pixmap), gc, gdk_image, |
750 0, 0, 0, 0, gdk_image->width, gdk_image->height); | 749 0, 0, 0, 0, gdk_image->width, gdk_image->height); |
751 | 750 |
818 d = GET_GTK_WIDGET_WINDOW (DEVICE_GTK_APP_SHELL (XDEVICE (device))); | 817 d = GET_GTK_WIDGET_WINDOW (DEVICE_GTK_APP_SHELL (XDEVICE (device))); |
819 | 818 |
820 pixmap = gdk_pixmap_new (d, gdk_image->width, gdk_image->height, gdk_image->depth); | 819 pixmap = gdk_pixmap_new (d, gdk_image->width, gdk_image->height, gdk_image->depth); |
821 | 820 |
822 if (!pixmap) | 821 if (!pixmap) |
823 signal_simple_error ("Unable to create pixmap", instantiator); | 822 gui_error ("Unable to create pixmap", instantiator); |
824 | 823 |
825 gc = gdk_gc_new (pixmap); | 824 gc = gdk_gc_new (pixmap); |
826 | 825 |
827 if (!gc) | 826 if (!gc) |
828 { | 827 { |
829 gdk_pixmap_unref (pixmap); | 828 gdk_pixmap_unref (pixmap); |
830 signal_simple_error ("Unable to create GC", instantiator); | 829 gui_error ("Unable to create GC", instantiator); |
831 } | 830 } |
832 | 831 |
833 gdk_draw_image (GDK_DRAWABLE (pixmap), gc, gdk_image, 0, 0, 0, 0, | 832 gdk_draw_image (GDK_DRAWABLE (pixmap), gc, gdk_image, 0, 0, 0, 0, |
834 gdk_image->width, gdk_image->height); | 833 gdk_image->width, gdk_image->height); |
835 | 834 |
921 | 920 |
922 gdk_color_black(cmap, &black); | 921 gdk_color_black(cmap, &black); |
923 gdk_color_white(cmap, &white); | 922 gdk_color_white(cmap, &white); |
924 | 923 |
925 if (!DEVICE_GTK_P (XDEVICE (device))) | 924 if (!DEVICE_GTK_P (XDEVICE (device))) |
926 signal_simple_error ("Not a Gtk device", device); | 925 gui_error ("Not a Gtk device", device); |
927 | 926 |
928 if ((dest_mask & IMAGE_MONO_PIXMAP_MASK) && | 927 if ((dest_mask & IMAGE_MONO_PIXMAP_MASK) && |
929 (dest_mask & IMAGE_COLOR_PIXMAP_MASK)) | 928 (dest_mask & IMAGE_COLOR_PIXMAP_MASK)) |
930 { | 929 { |
931 if (!NILP (foreground) || !NILP (background)) | 930 if (!NILP (foreground) || !NILP (background)) |
1118 int old_errno = errno; | 1117 int old_errno = errno; |
1119 fclose (tmpfil); | 1118 fclose (tmpfil); |
1120 unlink (filename_out); | 1119 unlink (filename_out); |
1121 errno = old_errno; | 1120 errno = old_errno; |
1122 } | 1121 } |
1123 report_file_error ("Creating temp file", | 1122 report_file_error ("Creating temp file", build_string (filename_out)); |
1124 list1 (build_string (filename_out))); | |
1125 } | 1123 } |
1126 | 1124 |
1127 CHECK_STRING (string); | 1125 CHECK_STRING (string); |
1128 get_string_range_byte (string, Qnil, Qnil, &bstart, &bend, | 1126 get_string_range_byte (string, Qnil, Qnil, &bstart, &bend, |
1129 GB_HISTORICAL_STRING_BEHAVIOR); | 1127 GB_HISTORICAL_STRING_BEHAVIOR); |
1179 #ifdef FILE_CODING | 1177 #ifdef FILE_CODING |
1180 Lstream_delete (costr); | 1178 Lstream_delete (costr); |
1181 #endif | 1179 #endif |
1182 | 1180 |
1183 if (fubar) | 1181 if (fubar) |
1184 report_file_error ("Writing temp file", | 1182 report_file_error ("Writing temp file", build_string (filename_out)); |
1185 list1 (build_string (filename_out))); | |
1186 } | 1183 } |
1187 | 1184 |
1188 struct color_symbol | 1185 struct color_symbol |
1189 { | 1186 { |
1190 char* name; | 1187 char* name; |
1277 enum image_instance_type type; | 1274 enum image_instance_type type; |
1278 int force_mono; | 1275 int force_mono; |
1279 unsigned int w, h; | 1276 unsigned int w, h; |
1280 | 1277 |
1281 if (!DEVICE_GTK_P (XDEVICE (device))) | 1278 if (!DEVICE_GTK_P (XDEVICE (device))) |
1282 signal_simple_error ("Not a Gtk device", device); | 1279 gui_error ("Not a Gtk device", device); |
1283 | 1280 |
1284 if (dest_mask & IMAGE_COLOR_PIXMAP_MASK) | 1281 if (dest_mask & IMAGE_COLOR_PIXMAP_MASK) |
1285 type = IMAGE_COLOR_PIXMAP; | 1282 type = IMAGE_COLOR_PIXMAP; |
1286 else if (dest_mask & IMAGE_MONO_PIXMAP_MASK) | 1283 else if (dest_mask & IMAGE_MONO_PIXMAP_MASK) |
1287 type = IMAGE_MONO_PIXMAP; | 1284 type = IMAGE_MONO_PIXMAP; |
1452 emsg = "uncompface: excess data ignored"; | 1449 emsg = "uncompface: excess data ignored"; |
1453 break; | 1450 break; |
1454 } | 1451 } |
1455 | 1452 |
1456 if (emsg) | 1453 if (emsg) |
1457 signal_simple_error_2 (emsg, data, Qimage); | 1454 gui_error_2 (emsg, data, Qimage); |
1458 | 1455 |
1459 bp = bits = (char *) alloca (PIXELS / 8); | 1456 bp = bits = (char *) alloca (PIXELS / 8); |
1460 | 1457 |
1461 /* the compface library exports char F[], which uses a single byte per | 1458 /* the compface library exports char F[], which uses a single byte per |
1462 pixel to represent a 48x48 bitmap. Yuck. */ | 1459 pixel to represent a 48x48 bitmap. Yuck. */ |
1487 if ((NILP (find_keyword_in_vector (instantiator, Q_file)) | 1484 if ((NILP (find_keyword_in_vector (instantiator, Q_file)) |
1488 && | 1485 && |
1489 NILP (find_keyword_in_vector (instantiator, Q_resource_id))) | 1486 NILP (find_keyword_in_vector (instantiator, Q_resource_id))) |
1490 || | 1487 || |
1491 NILP (find_keyword_in_vector (instantiator, Q_resource_type))) | 1488 NILP (find_keyword_in_vector (instantiator, Q_resource_type))) |
1492 signal_simple_error ("Must supply :file, :resource-id and :resource-type", | 1489 sferror ("Must supply :file, :resource-id and :resource-type", |
1493 instantiator); | 1490 instantiator); |
1494 } | 1491 } |
1495 | 1492 |
1496 static Lisp_Object | 1493 static Lisp_Object |
1497 gtk_resource_normalize (Lisp_Object inst, Lisp_Object console_type, Lisp_Object dest_mask) | 1494 gtk_resource_normalize (Lisp_Object inst, Lisp_Object console_type, |
1498 { | 1495 Lisp_Object dest_mask) |
1499 /* This function can call lisp */ | 1496 { |
1500 Lisp_Object file = Qnil; | 1497 return shared_resource_normalize (inst, console_type, dest_mask, |
1501 struct gcpro gcpro1, gcpro2; | 1498 Qgtk_resource); |
1502 Lisp_Object alist = Qnil; | |
1503 | |
1504 GCPRO2 (file, alist); | |
1505 | |
1506 file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, | |
1507 console_type); | |
1508 | |
1509 if (CONSP (file)) /* failure locating filename */ | |
1510 signal_double_file_error ("Opening pixmap file", | |
1511 "no such file or directory", | |
1512 Fcar (file)); | |
1513 | |
1514 if (NILP (file)) /* no conversion necessary */ | |
1515 RETURN_UNGCPRO (inst); | |
1516 | |
1517 alist = tagged_vector_to_alist (inst); | |
1518 | |
1519 { | |
1520 alist = remassq_no_quit (Q_file, alist); | |
1521 alist = Fcons (Fcons (Q_file, file), alist); | |
1522 } | |
1523 | |
1524 { | |
1525 Lisp_Object result = alist_to_tagged_vector (Qgtk_resource, alist); | |
1526 free_alist (alist); | |
1527 RETURN_UNGCPRO (result); | |
1528 } | |
1529 } | 1499 } |
1530 | 1500 |
1531 static int | 1501 static int |
1532 gtk_resource_possible_dest_types (void) | 1502 gtk_resource_possible_dest_types (void) |
1533 { | 1503 { |
1570 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); | 1540 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); |
1571 Lisp_Object resource_type = find_keyword_in_vector (instantiator, Q_resource_type); | 1541 Lisp_Object resource_type = find_keyword_in_vector (instantiator, Q_resource_type); |
1572 Lisp_Object resource_id = find_keyword_in_vector (instantiator, Q_resource_id); | 1542 Lisp_Object resource_id = find_keyword_in_vector (instantiator, Q_resource_id); |
1573 | 1543 |
1574 if (!DEVICE_GTK_P (XDEVICE (device))) | 1544 if (!DEVICE_GTK_P (XDEVICE (device))) |
1575 signal_simple_error ("Not a GTK device", device); | 1545 gui_error ("Not a GTK device", device); |
1576 | 1546 |
1577 type = resource_symbol_to_type (resource_type); | 1547 type = resource_symbol_to_type (resource_type); |
1578 | 1548 |
1579 // if (dest_mask & IMAGE_POINTER_MASK && type == IMAGE_POINTER_MASK) | 1549 // if (dest_mask & IMAGE_POINTER_MASK && type == IMAGE_POINTER_MASK) |
1580 // iitype = IMAGE_POINTER; | 1550 // iitype = IMAGE_POINTER; |
1597 static void | 1567 static void |
1598 check_valid_resource_symbol (Lisp_Object data) | 1568 check_valid_resource_symbol (Lisp_Object data) |
1599 { | 1569 { |
1600 CHECK_SYMBOL (data); | 1570 CHECK_SYMBOL (data); |
1601 if (!resource_symbol_to_type (data)) | 1571 if (!resource_symbol_to_type (data)) |
1602 signal_simple_error ("invalid resource type", data); | 1572 invalid_constant ("invalid resource type", data); |
1603 } | 1573 } |
1604 | 1574 |
1605 static void | 1575 static void |
1606 check_valid_resource_id (Lisp_Object data) | 1576 check_valid_resource_id (Lisp_Object data) |
1607 { | 1577 { |
1611 #if 0 | 1581 #if 0 |
1612 && | 1582 && |
1613 !resource_name_to_resource (data, IMAGE_BITMAP) | 1583 !resource_name_to_resource (data, IMAGE_BITMAP) |
1614 #endif | 1584 #endif |
1615 ) | 1585 ) |
1616 signal_simple_error ("invalid resource identifier", data); | 1586 invalid_constant ("invalid resource identifier", data); |
1617 } | 1587 } |
1618 | 1588 |
1619 #if 0 | 1589 #if 0 |
1620 void | 1590 void |
1621 check_valid_string_or_int (Lisp_Object data) | 1591 check_valid_string_or_int (Lisp_Object data) |
1807 int source_char, mask_char; | 1777 int source_char, mask_char; |
1808 int count; | 1778 int count; |
1809 Lisp_Object foreground, background; | 1779 Lisp_Object foreground, background; |
1810 | 1780 |
1811 if (!DEVICE_GTK_P (XDEVICE (device))) | 1781 if (!DEVICE_GTK_P (XDEVICE (device))) |
1812 signal_simple_error ("Not a Gtk device", device); | 1782 gui_error ("Not a Gtk device", device); |
1813 | 1783 |
1814 if (!STRINGP (data) || | 1784 if (!STRINGP (data) || |
1815 strncmp ("FONT ", (char *) XSTRING_DATA (data), 5)) | 1785 strncmp ("FONT ", (char *) XSTRING_DATA (data), 5)) |
1816 signal_simple_error ("Invalid font-glyph instantiator", | 1786 invalid_argument ("Invalid font-glyph instantiator", |
1817 instantiator); | 1787 instantiator); |
1818 | 1788 |
1819 if (!(dest_mask & IMAGE_POINTER_MASK)) | 1789 if (!(dest_mask & IMAGE_POINTER_MASK)) |
1820 incompatible_image_types (instantiator, dest_mask, IMAGE_POINTER_MASK); | 1790 incompatible_image_types (instantiator, dest_mask, IMAGE_POINTER_MASK); |
1821 | 1791 |
1835 /* Allow "%s %d %d" as well... */ | 1805 /* Allow "%s %d %d" as well... */ |
1836 if (count == 3 && (1 == sscanf (mask_name, "%d %c", &mask_char, &dummy))) | 1806 if (count == 3 && (1 == sscanf (mask_name, "%d %c", &mask_char, &dummy))) |
1837 count = 4, mask_name[0] = 0; | 1807 count = 4, mask_name[0] = 0; |
1838 | 1808 |
1839 if (count != 2 && count != 4) | 1809 if (count != 2 && count != 4) |
1840 signal_simple_error ("invalid cursor specification", data); | 1810 syntax_error ("invalid cursor specification", data); |
1841 source = gdk_font_load (source_name); | 1811 source = gdk_font_load (source_name); |
1842 if (! source) | 1812 if (! source) |
1843 signal_simple_error_2 ("couldn't load font", | 1813 gui_error_2 ("couldn't load font", |
1844 build_string (source_name), | 1814 build_string (source_name), |
1845 data); | 1815 data); |
1846 if (count == 2) | 1816 if (count == 2) |
1847 mask = 0; | 1817 mask = 0; |
1848 else if (!mask_name[0]) | 1818 else if (!mask_name[0]) |
1850 else | 1820 else |
1851 { | 1821 { |
1852 mask = gdk_font_load (mask_name); | 1822 mask = gdk_font_load (mask_name); |
1853 if (!mask) | 1823 if (!mask) |
1854 /* continuable */ | 1824 /* continuable */ |
1855 Fsignal (Qerror, list3 (build_string ("couldn't load font"), | 1825 Fsignal (Qgui_error, list3 (build_string ("couldn't load font"), |
1856 build_string (mask_name), data)); | 1826 build_string (mask_name), data)); |
1857 } | 1827 } |
1858 if (!mask) | 1828 if (!mask) |
1859 mask_char = 0; | 1829 mask_char = 0; |
1860 | 1830 |
1861 /* #### call XQueryTextExtents() and check_pointer_sizes() here. */ | 1831 /* #### call XQueryTextExtents() and check_pointer_sizes() here. */ |
1989 int i; | 1959 int i; |
1990 CONST char *name_ext; | 1960 CONST char *name_ext; |
1991 Lisp_Object foreground, background; | 1961 Lisp_Object foreground, background; |
1992 | 1962 |
1993 if (!DEVICE_GTK_P (XDEVICE (device))) | 1963 if (!DEVICE_GTK_P (XDEVICE (device))) |
1994 signal_simple_error ("Not a Gtk device", device); | 1964 gui_error ("Not a Gtk device", device); |
1995 | 1965 |
1996 if (!(dest_mask & IMAGE_POINTER_MASK)) | 1966 if (!(dest_mask & IMAGE_POINTER_MASK)) |
1997 incompatible_image_types (instantiator, dest_mask, IMAGE_POINTER_MASK); | 1967 incompatible_image_types (instantiator, dest_mask, IMAGE_POINTER_MASK); |
1998 | 1968 |
1999 TO_EXTERNAL_FORMAT (LISP_STRING, data, | 1969 TO_EXTERNAL_FORMAT (LISP_STRING, data, |
2000 C_STRING_ALLOCA, name_ext, | 1970 C_STRING_ALLOCA, name_ext, |
2001 Qfile_name); | 1971 Qfile_name); |
2002 | 1972 |
2003 if ((i = cursor_name_to_index (name_ext)) == -1) | 1973 if ((i = cursor_name_to_index (name_ext)) == -1) |
2004 signal_simple_error ("Unrecognized cursor-font name", data); | 1974 invalid_argument ("Unrecognized cursor-font name", data); |
2005 | 1975 |
2006 gtk_initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER); | 1976 gtk_initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER); |
2007 IMAGE_INSTANCE_GTK_CURSOR (ii) = gdk_cursor_new (i); | 1977 IMAGE_INSTANCE_GTK_CURSOR (ii) = gdk_cursor_new (i); |
2008 foreground = find_keyword_in_vector (instantiator, Q_foreground); | 1978 foreground = find_keyword_in_vector (instantiator, Q_foreground); |
2009 if (NILP (foreground)) | 1979 if (NILP (foreground)) |
2218 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 2188 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
2219 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); | 2189 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); |
2220 Lisp_Object frame = DOMAIN_FRAME (domain); | 2190 Lisp_Object frame = DOMAIN_FRAME (domain); |
2221 | 2191 |
2222 if (!DEVICE_GTK_P (XDEVICE (device))) | 2192 if (!DEVICE_GTK_P (XDEVICE (device))) |
2223 signal_simple_error ("Not a GTK device", device); | 2193 gui_error ("Not a GTK device", device); |
2224 | 2194 |
2225 IMAGE_INSTANCE_TYPE (ii) = IMAGE_SUBWINDOW; | 2195 IMAGE_INSTANCE_TYPE (ii) = IMAGE_SUBWINDOW; |
2226 | 2196 |
2227 ii->data = xnew_and_zero (struct gtk_subwindow_data); | 2197 ii->data = xnew_and_zero (struct gtk_subwindow_data); |
2228 | 2198 |
2569 /* initialization */ | 2539 /* initialization */ |
2570 /************************************************************************/ | 2540 /************************************************************************/ |
2571 void | 2541 void |
2572 syms_of_glyphs_gtk (void) | 2542 syms_of_glyphs_gtk (void) |
2573 { | 2543 { |
2574 defkeyword (&Q_resource_id, ":resource-id"); | |
2575 defkeyword (&Q_resource_type, ":resource-type"); | |
2576 #ifdef HAVE_WIDGETS | 2544 #ifdef HAVE_WIDGETS |
2577 defsymbol (&Qgtk_widget_instantiate_internal, "gtk-widget-instantiate-internal"); | 2545 DEFSYMBOL (Qgtk_widget_instantiate_internal); |
2578 defsymbol (&Qgtk_widget_property_internal, "gtk-widget-property-internal"); | 2546 DEFSYMBOL (Qgtk_widget_property_internal); |
2579 defsymbol (&Qgtk_widget_redisplay_internal, "gtk-widget-redisplay-internal"); | 2547 DEFSYMBOL (Qgtk_widget_redisplay_internal); |
2580 defsymbol (&Qgtk_widget_set_style, "gtk-widget-set-style"); | 2548 DEFSYMBOL (Qgtk_widget_set_style); |
2581 #endif | 2549 #endif |
2582 } | 2550 } |
2583 | 2551 |
2584 void | 2552 void |
2585 console_type_create_glyphs_gtk (void) | 2553 console_type_create_glyphs_gtk (void) |