/[emacs]/emacs/src/w32term.c
ViewVC logotype

Diff of /emacs/src/w32term.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.193.4.7 by miles, Fri Aug 27 07:00:32 2004 UTC revision 1.193.4.8 by miles, Thu Sep 30 01:20:36 2004 UTC
# Line 64  Boston, MA 02111-1307, USA.  */ Line 64  Boston, MA 02111-1307, USA.  */
64    
65  /* Fringe bitmaps.  */  /* Fringe bitmaps.  */
66    
67  static HBITMAP fringe_bmp[MAX_FRINGE_BITMAPS];  static int max_fringe_bmp = 0;
68    static HBITMAP *fringe_bmp = 0;
69    
70  /* Non-nil means Emacs uses toolkit scroll bars.  */  /* Non-nil means Emacs uses toolkit scroll bars.  */
71    
# Line 731  w32_draw_fringe_bitmap (w, row, p) Line 732  w32_draw_fringe_bitmap (w, row, p)
732                       p->bx, p->by, p->nx, p->ny);                       p->bx, p->by, p->nx, p->ny);
733      }      }
734    
735    if (p->which)    if (p->which && p->which < max_fringe_bmp)
736      {      {
737        HBITMAP pixmap = fringe_bmp[p->which];        HBITMAP pixmap = fringe_bmp[p->which];
738        HDC compat_hdc;        HDC compat_hdc;
# Line 794  w32_define_fringe_bitmap (which, bits, h Line 795  w32_define_fringe_bitmap (which, bits, h
795       unsigned short *bits;       unsigned short *bits;
796       int h, wd;       int h, wd;
797  {  {
798      if (which >= max_fringe_bmp)
799        {
800          int i = max_fringe_bmp;
801          max_fringe_bmp = which + 20;
802          fringe_bmp = (HBITMAP *) xrealloc (fringe_bmp, max_fringe_bmp * sizeof (HBITMAP));
803          while (i < max_fringe_bmp)
804            fringe_bmp[i++] = 0;
805        }
806    
807    fringe_bmp[which] = CreateBitmap (wd, h, 1, 1, bits);    fringe_bmp[which] = CreateBitmap (wd, h, 1, 1, bits);
808  }  }
809    
# Line 801  static void Line 811  static void
811  w32_destroy_fringe_bitmap (which)  w32_destroy_fringe_bitmap (which)
812       int which;       int which;
813  {  {
814      if (which >= max_fringe_bmp)
815        return;
816    
817    if (fringe_bmp[which])    if (fringe_bmp[which])
818      DeleteObject (fringe_bmp[which]);      DeleteObject (fringe_bmp[which]);
819    fringe_bmp[which] = 0;    fringe_bmp[which] = 0;

Legend:
Removed from v.1.193.4.7  
changed lines
  Added in v.1.193.4.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26