[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] Using a display_info union instead of a typedef Display_Info

From: Alex Gramiak
Subject: [RFC] Using a display_info union instead of a typedef Display_Info
Date: Fri, 12 Apr 2019 10:50:09 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

In the process of doing the bulk rename of non-X x_* procedures, the
issue of using multiple display types independently has come up in the
discussions. It has now also come up in generalizing of the GUI resource
database part of frame.c. I created a new topic here to discuss this
work as it involves introducing a (significant in the long-term) new
global type.

The jist of the attached patch is that generalizes x_get_string_resource
into a terminal hook, and in the process changes several procedures to
use union display_info instead of the typedef Display_Info, which is
display system-dependent. One uses DISPLAY_INFO (dpyinfo) to access the
common structure of the union, and there are macros
U_DISPLAY_INFO_<suffix> to convert from a specific display_info to the
union. There is also a procedure gui_frame_display_info, that grabs a
window system display_info from a frame.

I've also included a new procedure decode_display_info, which takes the
role of the display system-dependent check_x_display_info. I've left out
the removal of the check_x_display_info since I'm not sure if this patch
will be accepted. I've also left out NS support until a later stage.


Attachment: 0001-Generalize-x_get_arg-to-multiple-display-types.patch
Description: union display_info

reply via email to

[Prev in Thread] Current Thread [Next in Thread]