unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Alex Gramiak <agrambot@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Universal functions to manage multiple window caches.
Date: Sat, 20 Apr 2019 13:29:56 -0700	[thread overview]
Message-ID: <m2wojo1ku3.wl%esq@lawlist.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

Thank you, Alex, for the suggested edits.  I moved the enum for cache types into the main struct for multiple_cursor_cache, and also moved the sections that apply to w->mc_elts into the MC_CACHE case instead of the CH_CACHE case.  Attached is the updated diff for the new cache management design.

struct multiple_cursor_cache
{
  ptrdiff_t allocated;
  ptrdiff_t used;
  struct items
  {
    int x;
    int fx;
    int y;
    int fy;
    int hpos;
    int vpos;
    int wd;
    int h;
    int cursor_type;
    int cursor_width;
    struct RGB
    {
      double red;
      double green;
      double blue;
    } foreground, background;
    bool active_p;
    int glyph_flavor;
    bool enabled_p;
  } *caches;
  enum type_of_cache
  {
    NO_CACHE,
    MC_CACHE,
    CH_CACHE,
    FC_CACHE
  } cache_type;
};

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

> Date: [04-20-2019 10:17:01] <20 Apr 2019 11:17:01 -0600>
> From: Alex Gramiak <agrambot@gmail.com>
> To: Keith David Bershatsky <esq@lawlist.com>
> Cc: emacs-devel@gnu.org
> Subject: Re: Universal functions to manage multiple window caches.
> 
>* * *
> 
> Looks about what I expected, yeah (you could also have the enum be an
> element of each cache type instead of it being global, but it's up to
> preference). Though is it your intention to be using w->mc_elts in the
> CH_CACHE case instead of w->ch_elts?


[-- Attachment #2: cache_rewrite_003.diff --]
[-- Type: application/diff, Size: 10595 bytes --]

             reply	other threads:[~2019-04-20 20:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-20 20:29 Keith David Bershatsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-04-20  6:58 Universal functions to manage multiple window caches Keith David Bershatsky
2019-04-20 17:17 ` Alex Gramiak
2019-04-19  1:44 Keith David Bershatsky
2019-04-19 13:59 ` Alex Gramiak
2019-04-18  3:17 Keith David Bershatsky
2019-04-17 20:03 Keith David Bershatsky
2019-04-18 21:02 ` Alex Gramiak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wojo1ku3.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=agrambot@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).