From: Eli Zaretskii <eliz@gnu.org>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: emacs-devel@gnu.org
Subject: Re: How to walk a Lisp_String?
Date: Fri, 02 Sep 2022 18:33:34 +0300 [thread overview]
Message-ID: <835yi5pz8x.fsf@gnu.org> (raw)
In-Reply-To: <87fsh96cxd.fsf@elite.giraud> (message from Manuel Giraud on Fri, 02 Sep 2022 16:58:22 +0200)
> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: emacs-devel@gnu.org
> Date: Fri, 02 Sep 2022 16:58:22 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> [...]
>
> > However, you still didn't answer my original question: where does the
> > face information (colors and fonts) come from? The APIs I mention
> > above will allow you to put the information on a Lisp string, but
> > where will you get the information you need to put on those strings?
>
> Hum, I don't know. So far, I've initialized like this:
> --8<---------------cut here---------------start------------->8---
> struct frame *f = XFRAME (frame);
> struct face *face = FACE_FROM_ID (f, MENU_FACE_ID);
> --8<---------------cut here---------------end--------------->8---
>
> And it seems to work as intended (at least for fonts). What am I
> missing?
MENU_FACE_ID is the _basic_ face for menus, but it isn't the only
face. By itself, it's used only for the menu bar.
See term.c:tty_menu_activate for how we set up faces for the menu
items: you will see that we use special faces for that. You will need
either to introduce new faces for your case, or perhaps construct it
from relevant X resources.
prev parent reply other threads:[~2022-09-02 15:33 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 15:34 How to walk a Lisp_String? Manuel Giraud
2022-09-01 15:42 ` Stefan Monnier
2022-09-01 15:42 ` Eli Zaretskii
2022-09-01 15:49 ` Eli Zaretskii
2022-09-01 20:45 ` Manuel Giraud
2022-09-02 1:08 ` Po Lu
2022-09-02 6:32 ` Eli Zaretskii
2022-09-02 8:27 ` Po Lu
2022-09-02 10:36 ` Eli Zaretskii
2022-09-02 11:03 ` Po Lu
2022-09-02 11:15 ` Eli Zaretskii
2022-09-02 12:48 ` Po Lu
2022-09-02 13:17 ` Eli Zaretskii
2022-09-02 6:51 ` Manuel Giraud
2022-09-02 7:20 ` Eli Zaretskii
2022-09-02 8:31 ` Po Lu
2022-09-02 6:43 ` Eli Zaretskii
2022-09-02 7:18 ` Manuel Giraud
2022-09-02 7:30 ` Eli Zaretskii
2022-09-02 8:56 ` Manuel Giraud
2022-09-02 10:52 ` Eli Zaretskii
2022-09-02 11:40 ` Manuel Giraud
2022-09-02 12:51 ` Po Lu
2022-09-02 15:07 ` Manuel Giraud
2022-09-03 0:58 ` Po Lu
2022-09-03 5:46 ` Tomas Hlavaty
2022-09-03 6:19 ` Po Lu
2022-09-03 8:05 ` Tomas Hlavaty
2022-09-02 13:08 ` Eli Zaretskii
2022-09-02 14:58 ` Manuel Giraud
2022-09-02 15:33 ` Eli Zaretskii [this message]
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=835yi5pz8x.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=manuel@ledu-giraud.fr \
/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).