Mercurial > hg > xemacs-beta
comparison src/redisplay-msw.c @ 272:c5d627a313b1 r21-0b34
Import from CVS: tag r21-0b34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:28:48 +0200 |
parents | b2472a1930f2 |
children | 6330739388db |
comparison
equal
deleted
inserted
replaced
271:c7b7086b0a39 | 272:c5d627a313b1 |
---|---|
24 | 24 |
25 /* Authorship: | 25 /* Authorship: |
26 | 26 |
27 Chuck Thompson | 27 Chuck Thompson |
28 Lots of work done by Ben Wing for Mule | 28 Lots of work done by Ben Wing for Mule |
29 Partially rewritten for mswindows by Jonathan Harris, November 1997 for 20.4. | 29 Partially rewritten for mswindows by Jonathan Harris, November 1997 for 21.0. |
30 */ | 30 */ |
31 | 31 |
32 #include <config.h> | 32 #include <config.h> |
33 #include "lisp.h" | 33 #include "lisp.h" |
34 | 34 |
425 Emchar_dynarr *buf, int xpos, int xoffset, int clip_start, | 425 Emchar_dynarr *buf, int xpos, int xoffset, int clip_start, |
426 int width, face_index findex) | 426 int width, face_index findex) |
427 { | 427 { |
428 struct frame *f = XFRAME (w->frame); | 428 struct frame *f = XFRAME (w->frame); |
429 /* struct device *d = XDEVICE (f->device);*/ | 429 /* struct device *d = XDEVICE (f->device);*/ |
430 Lisp_Object window = Qnil; | 430 Lisp_Object window; |
431 HDC hdc = FRAME_MSWINDOWS_DC (f); | 431 HDC hdc = FRAME_MSWINDOWS_DC (f); |
432 int clip_end; | 432 int clip_end; |
433 Lisp_Object bg_pmap; | 433 Lisp_Object bg_pmap; |
434 int len = Dynarr_length (buf); | 434 int len = Dynarr_length (buf); |
435 unsigned char *text_storage = (unsigned char *) alloca (2 * len); | 435 unsigned char *text_storage = (unsigned char *) alloca (2 * len); |
552 Lisp_Object image_instance, int xpos, int xoffset, | 552 Lisp_Object image_instance, int xpos, int xoffset, |
553 int start_pixpos, int width, face_index findex, | 553 int start_pixpos, int width, face_index findex, |
554 int cursor_start, int cursor_width, int cursor_height) | 554 int cursor_start, int cursor_width, int cursor_height) |
555 { | 555 { |
556 struct frame *f = XFRAME (w->frame); | 556 struct frame *f = XFRAME (w->frame); |
557 struct device *d = XDEVICE (f->device); | |
558 HDC hdc = FRAME_MSWINDOWS_DC (f); | 557 HDC hdc = FRAME_MSWINDOWS_DC (f); |
559 struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); | 558 struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); |
560 Lisp_Object window; | 559 Lisp_Object window; |
561 | 560 |
562 int lheight = dl->ascent + dl->descent - dl->clip; | 561 int lheight = dl->ascent + dl->descent - dl->clip; |
657 #endif | 656 #endif |
658 mswindows_output_dibitmap (f, p, xpos - xoffset, dl->ypos - dl->ascent, | 657 mswindows_output_dibitmap (f, p, xpos - xoffset, dl->ypos - dl->ascent, |
659 clip_x, clip_y, clip_width, clip_height, | 658 clip_x, clip_y, clip_width, clip_height, |
660 pwidth, pheight, pixmap_offset); | 659 pwidth, pheight, pixmap_offset); |
661 } | 660 } |
662 | |
663 #if 0 | |
664 /* Draw a cursor over top of the pixmap. */ | |
665 if (cursor_width && cursor_height && (cursor_start >= xpos) | |
666 && !NILP (w->text_cursor_visible_p) | |
667 && (cursor_start < xpos + pwidth)) | |
668 { | |
669 int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d)); | |
670 int y = dl->ypos - dl->ascent; | |
671 struct face_cachel *cursor_cachel = | |
672 WINDOW_FACE_CACHEL (w, | |
673 get_builtin_face_cache_index | |
674 (w, Vtext_cursor_face)); | |
675 | |
676 mswindows_update_dc(hdc, Qnil, cursor_cachel->background, Qnil, | |
677 Qnil); | |
678 | |
679 if (cursor_width > xpos + pwidth - cursor_start) | |
680 cursor_width = xpos + pwidth - cursor_start; | |
681 | |
682 if (focus) | |
683 { | |
684 RECT rect={cursor_start, y + cursor_height, | |
685 cursor_start + cursor_width, y}; | |
686 FrameRect(hdc, &rect, | |
687 COLOR_INSTANCE_MSWINDOWS_BRUSH | |
688 (XCOLOR_INSTANCE(cursor_cachel->background))); | |
689 } | |
690 else | |
691 { | |
692 Rectangle (hdc, cursor_start, y, cursor_width, | |
693 cursor_height); | |
694 } | |
695 } | |
696 #endif | |
697 } | 661 } |
698 | 662 |
699 #ifdef HAVE_SCROLLBARS | 663 #ifdef HAVE_SCROLLBARS |
700 /* | 664 /* |
701 * This function paints window's deadbox, a rectangle between window | 665 * This function paints window's deadbox, a rectangle between window |