Mercurial > hg > xemacs-beta
comparison src/objects.c @ 2527:491f8cf78a9c
[xemacs-hg @ 2005-01-28 02:58:38 by ben]
Abstract font-list/color-list
font-menu.el, font.el, frame.el, gtk-font-menu.el, minibuf.el, msw-faces.el, msw-font-menu.el, obsolete.el, x-faces.el, x-font-menu.el: list-fonts->font-list. Create color-list. Abstract out
x/msw-specific versions and obsolete the x/msw-specific Lisp
functions.
console-impl.h, objects-gtk.c, objects-msw.c, objects-tty.c, objects-x.c, objects.c: list-fonts->font-list. Create color-list. Abstract out
x/msw-specific versions and obsolete the x/msw-specific Lisp
functions.
author | ben |
---|---|
date | Fri, 28 Jan 2005 02:58:52 +0000 |
parents | de9952d2ed18 |
children | 9f70af3ac939 |
comparison
equal
deleted
inserted
replaced
2526:902d5bd9b75c | 2527:491f8cf78a9c |
---|---|
1 /* Generic Objects and Functions. | 1 /* Generic Objects and Functions. |
2 Copyright (C) 1995 Free Software Foundation, Inc. | 2 Copyright (C) 1995 Free Software Foundation, Inc. |
3 Copyright (C) 1995 Board of Trustees, University of Illinois. | 3 Copyright (C) 1995 Board of Trustees, University of Illinois. |
4 Copyright (C) 1995, 1996, 2002 Ben Wing. | 4 Copyright (C) 1995, 1996, 2002, 2004 Ben Wing. |
5 | 5 |
6 This file is part of XEmacs. | 6 This file is part of XEmacs. |
7 | 7 |
8 XEmacs is free software; you can redistribute it and/or modify it | 8 XEmacs is free software; you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License as published by the | 9 under the terms of the GNU General Public License as published by the |
246 | 246 |
247 CHECK_STRING (color); | 247 CHECK_STRING (color); |
248 return MAYBE_INT_DEVMETH (d, valid_color_name_p, (d, color)) ? Qt : Qnil; | 248 return MAYBE_INT_DEVMETH (d, valid_color_name_p, (d, color)) ? Qt : Qnil; |
249 } | 249 } |
250 | 250 |
251 DEFUN ("color-list", Fcolor_list, 0, 1, 0, /* | |
252 Return a list of color names. | |
253 DEVICE specifies which device to return names for, and defaults to the | |
254 currently selected device. | |
255 */ | |
256 (device)) | |
257 { | |
258 device = wrap_device (decode_device (device)); | |
259 | |
260 return MAYBE_LISP_DEVMETH (XDEVICE (device), color_list, ()); | |
261 } | |
262 | |
251 | 263 |
252 /*************************************************************************** | 264 /*************************************************************************** |
253 * Font-Instance Object * | 265 * Font-Instance Object * |
254 ***************************************************************************/ | 266 ***************************************************************************/ |
255 | 267 |
504 | 516 |
505 return MAYBE_LISP_DEVMETH (XDEVICE (f->device), | 517 return MAYBE_LISP_DEVMETH (XDEVICE (f->device), |
506 font_instance_properties, (f)); | 518 font_instance_properties, (f)); |
507 } | 519 } |
508 | 520 |
509 DEFUN ("list-fonts", Flist_fonts, 1, 3, 0, /* | 521 DEFUN ("font-list", Ffont_list, 1, 3, 0, /* |
510 Return a list of font names matching the given pattern. | 522 Return a list of font names matching the given pattern. |
511 DEVICE specifies which device to search for names, and defaults to the | 523 DEVICE specifies which device to search for names, and defaults to the |
512 currently selected device. | 524 currently selected device. |
513 */ | 525 */ |
514 (pattern, device, maxnumber)) | 526 (pattern, device, maxnumber)) |
515 { | 527 { |
516 CHECK_STRING (pattern); | 528 CHECK_STRING (pattern); |
517 device = wrap_device (decode_device (device)); | 529 device = wrap_device (decode_device (device)); |
518 | 530 |
519 return MAYBE_LISP_DEVMETH (XDEVICE (device), list_fonts, (pattern, device, | 531 return MAYBE_LISP_DEVMETH (XDEVICE (device), font_list, (pattern, device, |
520 maxnumber)); | 532 maxnumber)); |
521 } | 533 } |
522 | 534 |
523 | 535 |
524 /**************************************************************************** | 536 /**************************************************************************** |
1119 DEFSUBR (Fmake_color_instance); | 1131 DEFSUBR (Fmake_color_instance); |
1120 DEFSUBR (Fcolor_instance_p); | 1132 DEFSUBR (Fcolor_instance_p); |
1121 DEFSUBR (Fcolor_instance_name); | 1133 DEFSUBR (Fcolor_instance_name); |
1122 DEFSUBR (Fcolor_instance_rgb_components); | 1134 DEFSUBR (Fcolor_instance_rgb_components); |
1123 DEFSUBR (Fvalid_color_name_p); | 1135 DEFSUBR (Fvalid_color_name_p); |
1136 DEFSUBR (Fcolor_list); | |
1124 | 1137 |
1125 DEFSYMBOL_MULTIWORD_PREDICATE (Qfont_instancep); | 1138 DEFSYMBOL_MULTIWORD_PREDICATE (Qfont_instancep); |
1126 DEFSUBR (Fmake_font_instance); | 1139 DEFSUBR (Fmake_font_instance); |
1127 DEFSUBR (Ffont_instance_p); | 1140 DEFSUBR (Ffont_instance_p); |
1128 DEFSUBR (Ffont_instance_name); | 1141 DEFSUBR (Ffont_instance_name); |
1130 DEFSUBR (Ffont_instance_descent); | 1143 DEFSUBR (Ffont_instance_descent); |
1131 DEFSUBR (Ffont_instance_width); | 1144 DEFSUBR (Ffont_instance_width); |
1132 DEFSUBR (Ffont_instance_proportional_p); | 1145 DEFSUBR (Ffont_instance_proportional_p); |
1133 DEFSUBR (Ffont_instance_truename); | 1146 DEFSUBR (Ffont_instance_truename); |
1134 DEFSUBR (Ffont_instance_properties); | 1147 DEFSUBR (Ffont_instance_properties); |
1135 DEFSUBR (Flist_fonts); | 1148 DEFSUBR (Ffont_list); |
1136 | 1149 |
1137 /* Qcolor, Qfont defined in general.c */ | 1150 /* Qcolor, Qfont defined in general.c */ |
1138 DEFSYMBOL (Qface_boolean); | 1151 DEFSYMBOL (Qface_boolean); |
1139 } | 1152 } |
1140 | 1153 |