[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Customizing the fringe bitmaps
From: |
Kim F. Storm |
Subject: |
Re: Customizing the fringe bitmaps |
Date: |
07 Nov 2001 12:36:48 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Eli Zaretskii <address@hidden> writes:
> > One option is to load the bitmap from a (pbm) file.
> >
> > Another option would be to let the user draw the bitmap like this:
>
> How about both?
Sure, that would be best.
>
> > The major problem with this approach is that it isn't obvious (to me)
> > how to do this through Customize.
>
> Hmm.. couldn't you let the user choose either a bitmap file or a list
> of strings?
Of course! A simple :choice it seems.
Looking at the code (in xterm.c), I think that the current
implementation isn't really optimal as it regenerates the pixmap for
every position in the fringe. On the other hand supports my second
proposal extremely well, as I can freely update the bitmap data and
have them drawn on next refresh.
/* Draw the bitmap. I believe these small pixmaps can be cached
by the server. */
face = FACE_FROM_ID (f, BITMAP_AREA_FACE_ID);
pixmap = XCreatePixmapFromBitmapData (display, window, bits, wd, h,
face->foreground,
face->background, depth);
XCopyArea (display, pixmap, window, gc, 0, 0, wd, h, x, y + dy);
XFreePixmap (display, pixmap);
XSetClipMask (display, gc, None);
Now, would I read the bitmap from a file every time as well (that would
be the simplest solution), or should I "bite the apple" and store the
pixmaps in global variables? Or maybe in the dpy structure?
In any case, I don't understand the comment about caching those pixmaps.
How can it cache something which is explicitly freed?
Oh, and looking at the w32term.c file, I see that I'll have to
duplicate the efforts there.
- Re: Customizing the fringe bitmaps, (continued)
- Re: Customizing the fringe bitmaps, Kim F. Storm, 2001/11/07
- Re: Customizing the fringe bitmaps, Richard Stallman, 2001/11/07
- Re: Customizing the fringe bitmaps, Kim F. Storm, 2001/11/08
- Re: Customizing the fringe bitmaps, Pavel JanÃk, 2001/11/08
- Re: Customizing the fringe bitmaps, Kim F. Storm, 2001/11/08
- Re: Customizing the fringe bitmaps, Alex Schroeder, 2001/11/09
- Re: Customizing the fringe bitmaps, Stefan Monnier, 2001/11/09
- Re: Customizing the fringe bitmaps, Kevin A. Burton, 2001/11/08
- Re: Customizing the fringe bitmaps, Richard Stallman, 2001/11/09
Re: Customizing the fringe bitmaps, Eli Zaretskii, 2001/11/07
- Re: Customizing the fringe bitmaps,
Kim F. Storm <=
Re: Customizing the fringe bitmaps, Richard Stallman, 2001/11/07