Mercurial > emacs
comparison src/xfns.c @ 25715:feaedc03dbc8
(x_set_background_color): Remove unused variable(s).
(x_set_border_pixel): Ditto.
(x_set_menu_bar_lines): Put local variable used only for
non-toolkit case in #ifdef/#endif.
(x_figure_window_size): Remove unused variable(s).
(x_figure_window_size, x_window, lookup_image,
xbm_read_bitmap_file_data, x_build_heuristic_mask, pbm_load,
png_load, jpeg_load, gif_load, x_create_tip_frame,
x_create_tip_frame, Fx_show_tip, x_set_border_pixel): Ditto.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 14 Sep 1999 13:09:43 +0000 |
parents | 815efc48a80b |
children | 609695887d08 |
comparison
equal
deleted
inserted
replaced
25714:790503d553e1 | 25715:feaedc03dbc8 |
---|---|
1412 void | 1412 void |
1413 x_set_background_color (f, arg, oldval) | 1413 x_set_background_color (f, arg, oldval) |
1414 struct frame *f; | 1414 struct frame *f; |
1415 Lisp_Object arg, oldval; | 1415 Lisp_Object arg, oldval; |
1416 { | 1416 { |
1417 Pixmap temp; | |
1418 int mask; | |
1419 | |
1420 unsigned long pixel | 1417 unsigned long pixel |
1421 = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); | 1418 = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); |
1422 | 1419 |
1423 unload_color (f, f->output_data.x->background_pixel); | 1420 unload_color (f, f->output_data.x->background_pixel); |
1424 f->output_data.x->background_pixel = pixel; | 1421 f->output_data.x->background_pixel = pixel; |
1671 unload_color (f, f->output_data.x->border_pixel); | 1668 unload_color (f, f->output_data.x->border_pixel); |
1672 f->output_data.x->border_pixel = pix; | 1669 f->output_data.x->border_pixel = pix; |
1673 | 1670 |
1674 if (FRAME_X_WINDOW (f) != 0 && f->output_data.x->border_width > 0) | 1671 if (FRAME_X_WINDOW (f) != 0 && f->output_data.x->border_width > 0) |
1675 { | 1672 { |
1676 Pixmap temp; | |
1677 int mask; | |
1678 | |
1679 BLOCK_INPUT; | 1673 BLOCK_INPUT; |
1680 XSetWindowBorder (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 1674 XSetWindowBorder (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
1681 (unsigned long)pix); | 1675 (unsigned long)pix); |
1682 UNBLOCK_INPUT; | 1676 UNBLOCK_INPUT; |
1683 | 1677 |
1932 x_set_menu_bar_lines (f, value, oldval) | 1926 x_set_menu_bar_lines (f, value, oldval) |
1933 struct frame *f; | 1927 struct frame *f; |
1934 Lisp_Object value, oldval; | 1928 Lisp_Object value, oldval; |
1935 { | 1929 { |
1936 int nlines; | 1930 int nlines; |
1931 #ifndef USE_X_TOOLKIT | |
1937 int olines = FRAME_MENU_BAR_LINES (f); | 1932 int olines = FRAME_MENU_BAR_LINES (f); |
1933 #endif | |
1938 | 1934 |
1939 /* Right now, menu bars don't work properly in minibuf-only frames; | 1935 /* Right now, menu bars don't work properly in minibuf-only frames; |
1940 most of the commands try to apply themselves to the minibuffer | 1936 most of the commands try to apply themselves to the minibuffer |
1941 frame itself, and get an error because you can't switch buffers | 1937 frame itself, and get an error because you can't switch buffers |
1942 in or split the minibuffer window. */ | 1938 in or split the minibuffer window. */ |
2863 x_figure_window_size (f, parms) | 2859 x_figure_window_size (f, parms) |
2864 struct frame *f; | 2860 struct frame *f; |
2865 Lisp_Object parms; | 2861 Lisp_Object parms; |
2866 { | 2862 { |
2867 register Lisp_Object tem0, tem1, tem2; | 2863 register Lisp_Object tem0, tem1, tem2; |
2868 int height, width, left, top; | |
2869 register int geometry; | |
2870 long window_prompting = 0; | 2864 long window_prompting = 0; |
2871 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 2865 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
2872 | 2866 |
2873 /* Default values if we fall through. | 2867 /* Default values if we fall through. |
2874 Actually, if that happens we should get | 2868 Actually, if that happens we should get |
3142 int menubar_size | 3136 int menubar_size |
3143 = (f->output_data.x->menubar_widget | 3137 = (f->output_data.x->menubar_widget |
3144 ? (f->output_data.x->menubar_widget->core.height | 3138 ? (f->output_data.x->menubar_widget->core.height |
3145 + f->output_data.x->menubar_widget->core.border_width) | 3139 + f->output_data.x->menubar_widget->core.border_width) |
3146 : 0); | 3140 : 0); |
3147 extern char *lwlib_toolkit_type; | |
3148 | 3141 |
3149 #if 0 /* Experimentally, we now get the right results | 3142 #if 0 /* Experimentally, we now get the right results |
3150 for -geometry -0-0 without this. 24 Aug 96, rms. */ | 3143 for -geometry -0-0 without this. 24 Aug 96, rms. */ |
3151 if (FRAME_EXTERNAL_MENU_BAR (f)) | 3144 if (FRAME_EXTERNAL_MENU_BAR (f)) |
3152 { | 3145 { |
6075 break; | 6068 break; |
6076 | 6069 |
6077 /* If not found, create a new image and cache it. */ | 6070 /* If not found, create a new image and cache it. */ |
6078 if (img == NULL) | 6071 if (img == NULL) |
6079 { | 6072 { |
6080 extern Lisp_Object QCenable, QCselect; | |
6081 Lisp_Object tem; | |
6082 int loading_failed_p; | 6073 int loading_failed_p; |
6083 | 6074 |
6084 img = make_image (spec, hash); | 6075 img = make_image (spec, hash); |
6085 cache_image (f, img); | 6076 cache_image (f, img); |
6086 loading_failed_p = img->type->load (f, img) == 0; | 6077 loading_failed_p = img->type->load (f, img) == 0; |
6344 static int xbm_load_image_from_file P_ ((struct frame *f, struct image *img, | 6335 static int xbm_load_image_from_file P_ ((struct frame *f, struct image *img, |
6345 Lisp_Object file)); | 6336 Lisp_Object file)); |
6346 static int xbm_image_p P_ ((Lisp_Object object)); | 6337 static int xbm_image_p P_ ((Lisp_Object object)); |
6347 static int xbm_read_bitmap_file_data P_ ((char *, int *, int *, | 6338 static int xbm_read_bitmap_file_data P_ ((char *, int *, int *, |
6348 unsigned char **)); | 6339 unsigned char **)); |
6349 static int xbm_read_hexint P_ ((FILE *)); | |
6350 | 6340 |
6351 | 6341 |
6352 /* Indices of image specification fields in xbm_format, below. */ | 6342 /* Indices of image specification fields in xbm_format, below. */ |
6353 | 6343 |
6354 enum xbm_keyword_index | 6344 enum xbm_keyword_index |
6643 LA1 = xbm_scan (fp, buffer, &value); | 6633 LA1 = xbm_scan (fp, buffer, &value); |
6644 | 6634 |
6645 /* Parse defines for width, height and hot-spots. */ | 6635 /* Parse defines for width, height and hot-spots. */ |
6646 while (LA1 == '#') | 6636 while (LA1 == '#') |
6647 { | 6637 { |
6648 char *p; | |
6649 | |
6650 match (); | 6638 match (); |
6651 expect_ident ("define"); | 6639 expect_ident ("define"); |
6652 expect (XBM_TK_IDENT); | 6640 expect (XBM_TK_IDENT); |
6653 | 6641 |
6654 if (LA1 == XBM_TK_NUMBER); | 6642 if (LA1 == XBM_TK_NUMBER); |
7526 Lisp_Object file; | 7514 Lisp_Object file; |
7527 struct image *img; | 7515 struct image *img; |
7528 Lisp_Object how; | 7516 Lisp_Object how; |
7529 { | 7517 { |
7530 Display *dpy = FRAME_X_DISPLAY (f); | 7518 Display *dpy = FRAME_X_DISPLAY (f); |
7531 Window win = FRAME_X_WINDOW (f); | |
7532 XImage *ximg, *mask_img; | 7519 XImage *ximg, *mask_img; |
7533 int x, y, rc, look_at_corners_p; | 7520 int x, y, rc, look_at_corners_p; |
7534 unsigned long bg; | 7521 unsigned long bg; |
7535 | 7522 |
7536 BLOCK_INPUT; | 7523 BLOCK_INPUT; |
7739 struct image *img; | 7726 struct image *img; |
7740 { | 7727 { |
7741 FILE *fp; | 7728 FILE *fp; |
7742 char magic[2]; | 7729 char magic[2]; |
7743 int raw_p, x, y; | 7730 int raw_p, x, y; |
7744 int width, height, max_color_idx = 0, value; | 7731 int width, height, max_color_idx = 0; |
7745 XImage *ximg; | 7732 XImage *ximg; |
7746 Lisp_Object file, specified_file; | 7733 Lisp_Object file, specified_file; |
7747 enum {PBM_MONO, PBM_GRAY, PBM_COLOR} type; | 7734 enum {PBM_MONO, PBM_GRAY, PBM_COLOR} type; |
7748 struct gcpro gcpro1; | 7735 struct gcpro gcpro1; |
7749 | 7736 |
8039 png_load (f, img) | 8026 png_load (f, img) |
8040 struct frame *f; | 8027 struct frame *f; |
8041 struct image *img; | 8028 struct image *img; |
8042 { | 8029 { |
8043 Lisp_Object file, specified_file; | 8030 Lisp_Object file, specified_file; |
8044 int rc, x, y, i; | 8031 int x, y, i; |
8045 XImage *ximg, *mask_img = NULL; | 8032 XImage *ximg, *mask_img = NULL; |
8046 struct gcpro gcpro1; | 8033 struct gcpro gcpro1; |
8047 png_struct *png_ptr = NULL; | 8034 png_struct *png_ptr = NULL; |
8048 png_info *info_ptr = NULL, *end_info = NULL; | 8035 png_info *info_ptr = NULL, *end_info = NULL; |
8049 FILE *fp; | 8036 FILE *fp; |
8452 Lisp_Object file, specified_file; | 8439 Lisp_Object file, specified_file; |
8453 FILE *fp; | 8440 FILE *fp; |
8454 JSAMPARRAY buffer; | 8441 JSAMPARRAY buffer; |
8455 int row_stride, x, y; | 8442 int row_stride, x, y; |
8456 XImage *ximg = NULL; | 8443 XImage *ximg = NULL; |
8457 int rc, value; | 8444 int rc; |
8458 unsigned long *colors; | 8445 unsigned long *colors; |
8459 int width, height; | 8446 int width, height; |
8460 struct gcpro gcpro1; | 8447 struct gcpro gcpro1; |
8461 | 8448 |
8462 /* Open the JPEG file. */ | 8449 /* Open the JPEG file. */ |
8864 unsigned long pixel_colors[256]; | 8851 unsigned long pixel_colors[256]; |
8865 GifFileType *gif; | 8852 GifFileType *gif; |
8866 struct gcpro gcpro1; | 8853 struct gcpro gcpro1; |
8867 Lisp_Object image; | 8854 Lisp_Object image; |
8868 int ino, image_left, image_top, image_width, image_height; | 8855 int ino, image_left, image_top, image_width, image_height; |
8869 int bg; | |
8870 | 8856 |
8871 specified_file = image_spec_value (img->spec, QCfile, NULL); | 8857 specified_file = image_spec_value (img->spec, QCfile, NULL); |
8872 file = x_find_image_file (specified_file); | 8858 file = x_find_image_file (specified_file); |
8873 GCPRO1 (file); | 8859 GCPRO1 (file); |
8874 if (!STRINGP (file)) | 8860 if (!STRINGP (file)) |
9526 Lisp_Object parms; | 9512 Lisp_Object parms; |
9527 { | 9513 { |
9528 struct frame *f; | 9514 struct frame *f; |
9529 Lisp_Object frame, tem; | 9515 Lisp_Object frame, tem; |
9530 Lisp_Object name; | 9516 Lisp_Object name; |
9531 int minibuffer_only = 0; | |
9532 long window_prompting = 0; | 9517 long window_prompting = 0; |
9533 int width, height; | 9518 int width, height; |
9534 int count = specpdl_ptr - specpdl; | 9519 int count = specpdl_ptr - specpdl; |
9535 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 9520 struct gcpro gcpro1, gcpro2, gcpro3; |
9536 struct kboard *kb; | 9521 struct kboard *kb; |
9537 | 9522 |
9538 check_x (); | 9523 check_x (); |
9539 | 9524 |
9540 /* Use this general default value to start with until we know if | 9525 /* Use this general default value to start with until we know if |
9768 Lisp_Object string, frame, parms; | 9753 Lisp_Object string, frame, parms; |
9769 { | 9754 { |
9770 struct frame *f; | 9755 struct frame *f; |
9771 struct window *w; | 9756 struct window *w; |
9772 Window root, child; | 9757 Window root, child; |
9773 struct it it; | |
9774 Lisp_Object buffer; | 9758 Lisp_Object buffer; |
9775 struct buffer *old_buffer; | 9759 struct buffer *old_buffer; |
9776 struct text_pos pos; | 9760 struct text_pos pos; |
9777 int i, width, height; | 9761 int i, width, height; |
9778 int root_x, root_y, win_x, win_y; | 9762 int root_x, root_y, win_x, win_y; |