bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#34885: [PATCH] Define macros to abstract support for external menu/t


From: Alex
Subject: bug#34885: [PATCH] Define macros to abstract support for external menu/tool-bars
Date: Sat, 16 Mar 2019 13:29:58 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

close 34885
quit

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Alex <agrambot@gmail.com>
>> Date: Sat, 16 Mar 2019 12:12:13 -0600
>> 
>> This should help readability and to ease possible addition of new window
>> systems that support external menu bars or tool-bars.
>> 
>> Is this okay to apply?
>
> LGTM, thanks.  Except that...

Pushed as cc06d76865.

>> diff --git a/src/window.h b/src/window.h
>> index b450173eb2..8090096fb8 100644
>> --- a/src/window.h
>> +++ b/src/window.h
>> @@ -728,6 +728,17 @@ wset_next_buffers (struct window *w, Lisp_Object val)
>>    (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
>>     + WINDOW_RIGHT_PIXEL_EDGE (W))
>>  
>> +/* Define if the windowing system provides a menu bar.  */
>> +#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
>> +  || defined (HAVE_NS) || defined (USE_GTK)
>> +#define HAVE_EXT_MENU_BAR true
>> +#endif
>> +
>> +/* Define if the windowing system provides a tool-bar.  */
>> +#if defined (USE_GTK) || defined (HAVE_NS)
>> +#define HAVE_EXT_TOOL_BAR true
>> +#endif
>
> ... please put these in lisp.h, not in window.h.

I originally put them in frame.h before realizing that window.h needs
them as well. I figured that one of frame/window.h was more fitting than
a more "generic" place like lisp.h, but perhaps some files that use them
in the future might not want to include either.

I put them by the window/frame forward-declarations in lisp.h, as that
seems fitting enough.





reply via email to

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