/* GTK related routines Copyright (C) 2020 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #ifndef GTK_INTER_H #define GTK_INTER_H #include "config.h" #include #include "lisp.h" #ifdef HAVE_GTK4 #include "pgtksubr.h" #else #include "gtkutil.h" #endif #include "frame.h" #ifdef HAVE_GTK3 typedef struct { struct frame *f; int index; } xg_headerbar_item_callback_info; #endif extern GtkAboutDialog * show_about_dialog (gpointer thing, struct frame *f); extern void syms_of_gtkinter (void); extern GtkDialog * #ifndef HAVE_GTK4 build_dialog_n_items (char *fmt, widget_value *wv, GCallback select_cb, GCallback deactivate_cb, GCallback dialog_delete_callback); #else build_dialog_n_items (char *fmt, widget_value *wv, GCallback select_cb, GCallback deactivate_cb); #endif #ifndef HAVE_GTK4 extern GtkDialog * build_dialog_3_items (Lisp_Object fmt, Lisp_Object name_a, Lisp_Object name_b, Lisp_Object name_c, GCallback select_cb, GCallback deactivate_cb, widget_value *wv_a, widget_value *wv_b, widget_value *wv_c, GCallback dialog_delete_callback); extern GtkMessageDialog * build_dialog_2_items (Lisp_Object fmt, Lisp_Object name_a, Lisp_Object name_b, GCallback select_cb, GCallback deactivate_cb, widget_value *wv_a, widget_value *wv_b, GCallback dialog_delete_callback); extern GtkMessageDialog * build_dialog_1_item (Lisp_Object fmt, Lisp_Object name_a, GCallback select_cb, GCallback deactivate_cb, widget_value *wv_a, GCallback dialog_delete_callback); #endif #ifdef HAVE_GTK3 extern void update_frame_header_bar (struct frame *f); extern void xg_notify_header_bar_menu_state_changed (struct frame *f); extern void xg_modify_header_bar_widgets (GtkHeaderBar *w, struct frame *f, widget_value *val, bool deep_p, GCallback select_cb, GCallback deactivate_cb, GCallback highlight_cb); struct xg_tool_bar_entry { Lisp_Object title; Lisp_Object help; Lisp_Object icon; bool enabled; bool selected; Lisp_Object type; int idx; }; #endif #endif