--- /dev/null
+[
+ { include: [ "<bits/types/sig_atomic_t.h>", private, "<csignal>", public ] },
+
+ { include: [ "\"cairo.h\"", private, "<cairo.h>", public ] },
+
+ { include: [ "@\"champlain/champlain-[a-z-]+.h\"", private, "<champlain/champlain.h>", public ] },
+
+ { include: [ "@<exiv2/[a-z_]+.hpp>", private, "<exiv2/exiv2.hpp>", public ] },
+ { include: [ "<exiv2/exv_conf.h>", private, "<exiv2/exiv2.hpp>", public ] },
+ { include: [ "<exiv2/xmp_exiv2.hpp>", private, "<exiv2/exiv2.hpp>", public ] },
+
+ { include: [ "\"gdk/gdkkeysyms.h\"", private, "<gdk/gdk.h>", public ] },
+
+ { include: [ "@\"gobject/.*\"", private, "<glib-object.h>", public ] },
+
+ { include: [ "<glib/gtypes.h>", private, "<glib.h>", public ] },
+
+ { include: [ "\"gtk/gtkcssprovider.h\"", private, "<gtk/gtk.h>", public ] },
+
+ { include: [ "<jmorecfg.h>", private, "<jpeglib.h>", public ] },
+
+ { include: [ "\"libraw_types.h\"", private, "<libraw/libraw.h>", public ] },
+
+ { include: [ "<lauxlib.h>", private, "<lua.hpp>", public ] },
+ { include: [ "<lua.h>", private, "<lua.hpp>", public ] },
+ { include: [ "<lualib.h>", private, "<lua.hpp>", public ] },
+
+ { include: [ "@\"pango/pango-[a-z]+.h\"", private, "<pango/pango.h>", public ] },
+ { include: [ "\"pango/pangocairo.h\"", private, "<pango/pangocairo.h>", public ] },
+
+ { include: [ "@\"poppler-[a-z]+.h\"", private, "<poppler.h>", public ] },
+]
# Create the define constants used in the sources. Set via config.h.in
conf_data = configuration_data()
-conf_data.set_quoted('VERSION', meson.project_version())
conf_data.set('DEBUG', debug)
+conf_data.set('HAVE_GTK4', 0)
option = get_option('gtk4')
if option.enabled()
gtk_dep = dependency('gtk4', required: true)
glib_dep = dependency('glib-2.0', version : '>=2.52', required: true)
# Required only when backward-cpp is used
+conf_data.set('HAVE_DEVELOPER', 0)
libdw_dep = []
libunwind_dep = []
option = get_option('devel')
endif
# Required only for seg. fault stacktrace and backtrace debugging
+conf_data.set('HAVE_EXECINFO_H', 0)
option = get_option('execinfo')
libexecinfo_dep = []
if not option.disabled()
summary({'execinfo' : ['stacktrace supported:', false]}, section : 'Debugging', bool_yn : true)
endif
+conf_data.set('HAVE_ARCHIVE', 0)
libarchive_dep = []
req_version = '>=3.4.0'
option = get_option('archive')
summary({'archive' : ['disabled - archive files e.g. .zip supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_LCMS', 0)
+conf_data.set('HAVE_LCMS2', 0)
lcms_dep = []
req_version = '>=2.0'
option = get_option('cms')
summary({'cms' : ['disabled - color management supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_DJVU', 0)
ddjvuapi_dep = []
req_version = '>=2.5.27'
option = get_option('djvu')
endif
# Required only for seg. fault stacktrace and backtrace debugging
+conf_data.set('HAVE_EXECINFO_H', 0)
option = get_option('execinfo')
if not option.disabled()
result = cc.check_header('execinfo.h')
summary({'execinfo' : ['stacktrace supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_EXIV2', 0)
exiv2_dep = []
req_version = '>=0.18'
option = get_option('exiv2')
summary({'exiv2' : ['disabled - image data processed by exiv2:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_CLUTTER', 0)
+conf_data.set('HAVE_LIBCHAMPLAIN', 0)
+conf_data.set('HAVE_LIBCHAMPLAIN_GTK', 0)
champlain_dep = []
champlain_gtk_dep = []
clutter_dep = []
summary({'gps-map' : ['disabled - GPS map displayed:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_HEIF', 0)
libheif_dep = []
req_version = '>=1.3.2'
option = get_option('heif')
summary({'heif' : ['disabled - heif files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_J2K', 0)
libopenjp2_dep = []
req_version = '>=2.3.0'
option = get_option('j2k')
summary({'j2k' : ['disabled - j2k files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_JPEG', 0)
libjpeg_dep = []
option = get_option('jpeg')
if not option.disabled()
-libjpeg_dep = dependency('libjpeg', required : get_option('jpeg'))
+ libjpeg_dep = dependency('libjpeg', required : get_option('jpeg'))
if libjpeg_dep.found()
if cc.has_function('jpeg_destroy_decompress', dependencies : libjpeg_dep)
conf_data.set('HAVE_JPEG', 1)
summary({'jpeg' : ['disabled - jpeg files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_JPEGXL', 0)
libjxl_dep = []
req_version = '>=0.3.7'
option = get_option('jpegxl')
summary({'jpegxl' : ['disabled - jpegxl files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_RAW', 0)
libraw_dep = []
req_version = '>=0.20'
option = get_option('libraw')
summary({'libraw' : ['disabled - .cr3 files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_LUA', 0)
lua_dep = []
req_version = '>=5.3'
option = get_option('lua')
endif
install_data('README.md', 'COPYING', 'TODO', install_dir : helpdir)
+conf_data.set('HAVE_PDF', 0)
poppler_glib_dep = []
req_version = '>=0.62'
option = get_option('pdf')
summary({'pdf' : ['disabled - pdf files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_SPELL', 0)
gspell_dep = []
req_version = '>=1.6'
option = get_option('spell')
summary({'spell' : ['disabled - spelling checks enabled', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_TIFF', 0)
tiff_dep = []
option = get_option('tiff')
if not option.disabled()
summary({'tiff' : ['disabled - tiff files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_FFMPEGTHUMBNAILER', 0)
+conf_data.set('HAVE_FFMPEGTHUMBNAILER_METADATA', 0)
+conf_data.set('HAVE_FFMPEGTHUMBNAILER_RGB', 0)
+conf_data.set('HAVE_FFMPEGTHUMBNAILER_WH', 0)
libffmpegthumbnailer_dep = []
req_version = '>=2.1.0'
option = get_option('videothumbnailer')
summary({'videothumbnailer' : ['disabled -thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
endif
+conf_data.set('HAVE_WEBP', 0)
libwebp_dep = []
req_version = '>=0.6.1'
option = get_option('webp')
endif
# Check for nl_langinfo and _NL_TIME_FIRST_WEEKDAY
+conf_data.set('HAVE__NL_TIME_FIRST_WEEKDAY', 0)
code = '''#include <langinfo.h>
#include<stdio.h>
int main (int argc, char ** argv) {
#include "advanced-exif.h"
+#include <cstring>
+
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <pango/pango.h>
+
#include <config.h>
#include "compat.h"
#include "history-list.h"
#include "intl.h"
#include "layout-util.h"
+#include "layout.h"
#include "misc.h"
+#include "options.h"
#include "ui-misc.h"
#include "window.h"
+struct ExifData;
+struct ExifItem;
+
enum {
ADVANCED_EXIF_DATA_COLUMN_WIDTH = 200
};
return ret;
}
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
static gboolean advanced_exif_mouseclick(GtkWidget *, GdkEventButton *, gpointer data)
{
/* @FIXME GTK4 stub */
#include "bar-comment.h"
+#include <cstring>
+
#include <config.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#if HAVE_SPELL
+# include <gspell/gspell.h>
+#endif
+
#include "bar.h"
#include "compat.h"
#include "debug.h"
#include "layout.h"
#include "main-defines.h"
#include "metadata.h"
+#include "options.h"
#include "rcfile.h"
+#include "typedefs.h"
#include "ui-menu.h"
#include "ui-misc.h"
-#ifdef HAVE_SPELL
-#include <gspell/gspell.h>
-#endif
-
static void bar_pane_comment_changed(GtkTextBuffer *buffer, gpointer data);
/*
FileData *fd;
gchar *key;
gint height;
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
GspellTextView *gspell_view;
#endif
};
auto pcd = static_cast<PaneCommentData *>(data);
file_data_unregister_notify_func(bar_pane_comment_notify_cb, pcd);
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
g_object_unref(pcd->gspell_view);
#endif
file_data_unref(pcd->fd);
pcd->pane.title = bar_pane_expander_title(title);
pcd->pane.id = g_strdup(id);
pcd->pane.type = PANE_COMMENT;
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
pcd->gspell_view = nullptr;
#endif
pcd->pane.expanded = expanded;
G_CALLBACK(bar_pane_comment_populate_popup), pcd);
gtk_widget_show(pcd->comment_view);
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
if (g_strcmp0(key, "Xmp.xmp.Rating") != 0)
{
if (options->metadata.check_spelling)
#ifndef BAR_COMMENT_H
#define BAR_COMMENT_H
+#include <glib.h>
#include <gtk/gtk.h>
GtkWidget *bar_pane_comment_new_from_config(const gchar **attribute_names, const gchar **attribute_values);
#include "bar-exif.h"
+#include <cstring>
+
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <pango/pango.h>
+
#include <config.h>
#include "bar.h"
#include "metadata.h"
#include "misc.h"
#include "rcfile.h"
+#include "typedefs.h"
#include "ui-menu.h"
#include "ui-misc.h"
#include "ui-utildlg.h"
g_object_unref(entry);
}
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
static void bar_pane_exif_copy_entry_cb(GtkWidget *, gpointer data)
{
/* @FIXME GTK4 stub */
return FALSE;
}
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
static gboolean bar_pane_exif_copy_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer)
{
/* @FIXME GTK4 stub */
#ifndef BAR_EXIF_H
#define BAR_EXIF_H
+#include <glib.h>
#include <gtk/gtk.h>
GtkWidget *bar_pane_exif_new_from_config(const gchar **attribute_names, const gchar **attribute_values);
#include <config.h>
-#ifdef HAVE_LIBCHAMPLAIN
-#ifdef HAVE_LIBCHAMPLAIN_GTK
+#if HAVE_LIBCHAMPLAIN
+#if HAVE_LIBCHAMPLAIN_GTK
#include "bar-gps.h"
+#include <cstring>
+
+#include <cairo.h>
+#include <champlain-gtk/champlain-gtk.h>
+#include <champlain/champlain.h>
+#include <clutter-gtk/clutter-gtk.h>
+#include <clutter/clutter.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <pango/pango.h>
+
#include "bar.h"
#include "compat.h"
#include "debug.h"
#include "intl.h"
#include "layout.h"
#include "main-defines.h"
-#include "menu.h"
#include "metadata.h"
#include "misc.h"
#include "rcfile.h"
#include "thumb.h"
+#include "typedefs.h"
#include "ui-menu.h"
#include "ui-utildlg.h"
#include "uri-utils.h"
-#include <champlain-gtk/champlain-gtk.h>
-#include <champlain/champlain.h>
-#include <clutter-gtk/clutter-gtk.h>
-
#define MARKER_COLOUR 0x00, 0x00, 0xff, 0xff
#define TEXT_COLOUR 0x00, 0x00, 0x00, 0xff
#define THUMB_COLOUR 0xff, 0xff, 0xff, 0xff
g_string_free(message, TRUE);
}
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
static gboolean bar_pane_gps_map_keypress_cb(GtkWidget *, GdkEventButton *bevent, gpointer data)
{
/* @FIXME GTK4 stub */
gtk_container_add(GTK_CONTAINER(frame), vbox);
status = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
slider = gtk_scale_button_new(1, 17, 1, slider_icons);
#else
slider = gtk_scale_button_new(GTK_ICON_SIZE_SMALL_TOOLBAR, 1, 17, 1, slider_icons);
bar_update_expander(pane);
}
-#endif
-#endif
+#endif // HAVE_LIBCHAMPLAIN_GTK
+#endif // HAVE_LIBCHAMPLAIN
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
#ifndef BAR_GPS_H
#define BAR_GPS_H
+#include <glib.h>
#include <gtk/gtk.h>
GtkWidget *bar_pane_gps_new(const gchar *id, const gchar *title, const gchar *map_id, gint zoom,
#include "bar-histogram.h"
+#include <cairo.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+
#include <config.h>
#include "bar.h"
#include "histogram.h"
#include "intl.h"
#include "rcfile.h"
+#include "typedefs.h"
#include "ui-menu.h"
#include "ui-misc.h"
+struct HistMap;
+
/*
*-------------------------------------------------------------------
* keyword / comment utils
gtk_widget_add_events(phd->drawing_area, GDK_BUTTON_PRESS_MASK);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
gesture = gtk_gesture_click_new();
gtk_widget_add_controller(phd->drawing_area, GTK_EVENT_CONTROLLER(gesture));
#else
#ifndef BAR_HISTOGRAM_H
#define BAR_HISTOGRAM_H
+#include <glib.h>
#include <gtk/gtk.h>
GtkWidget *bar_pane_histogram_new_from_config(const gchar **attribute_names, const gchar **attribute_values);
#include "bar-keywords.h"
-#include <config.h>
+#include <cstdio>
+#include <cstring>
+
+#include <gdk/gdk.h>
+#include <glib-object.h>
#include "bar.h"
#include "compat.h"
#include "main-defines.h"
#include "metadata.h"
#include "misc.h"
+#include "options.h"
#include "rcfile.h"
#include "secure-save.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "ui-menu.h"
#include "ui-misc.h"
#ifndef BAR_KEYWORDS_H
#define BAR_KEYWORDS_H
+#include <glib.h>
#include <gtk/gtk.h>
struct LayoutWindow;
#include "bar-rating.h"
+#include <glib-object.h>
+
#include <config.h>
#include "bar.h"
#include "intl.h"
#include "metadata.h"
#include "rcfile.h"
+#include "typedefs.h"
#include "ui-misc.h"
/**
auto prd = static_cast<PaneRatingData *>(data);
gchar *rating;
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
const gchar *rating_label;
rating_label = gtk_check_button_get_label(checkbutton);
row_1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
gq_gtk_box_pack_start(GTK_BOX(prd->widget), row_1, FALSE, FALSE, 0);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
radio_rejected = gtk_check_button_new_with_label(_("Rejected"));
#else
radio_rejected = gtk_radio_button_new_with_label(nullptr, _("Rejected"));
g_signal_connect(radio_rejected, "released", G_CALLBACK(bar_pane_rating_selected_cb), prd);
prd->rating_buttons[0] = GTK_CHECK_BUTTON(radio_rejected);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
radio_unrated = gtk_check_button_new_with_label(_("Unrated"));
gtk_check_button_set_group(GTK_CHECK_BUTTON(radio_unrated), GTK_CHECK_BUTTON(radio_rejected));
#else
{
i_str = g_strdup_printf("%d", i - 1);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
radio_rating = gtk_check_button_new_with_label(i_str);
gtk_check_button_set_group(GTK_CHECK_BUTTON(radio_rating), GTK_CHECK_BUTTON(radio_rejected));
#else
#ifndef BAR_RATING_H
#define BAR_RATING_H
+#include <glib.h>
#include <gtk/gtk.h>
GtkWidget *bar_pane_rating_new_from_config(const gchar **attribute_names, const gchar **attribute_values);
#include "bar-sort.h"
-#include <config.h>
+#include <cstring>
+
+#include <gdk/gdk.h>
+#include <glib-object.h>
#include "collect-io.h"
#include "collect.h"
#include "layout.h"
#include "main-defines.h"
#include "misc.h"
+#include "options.h"
#include "rcfile.h"
+#include "typedefs.h"
#include "ui-bookmark.h"
#include "ui-fileops.h"
#include "ui-misc.h"
+#include "ui-utildlg.h"
#include "utilops.h"
#include "window.h"
#ifndef BAR_SORT_H
#define BAR_SORT_H
+#include <glib.h>
#include <gtk/gtk.h>
struct LayoutWindow;
#include "bar.h"
+#include <cstring>
+
+#include <glib-object.h>
+#include <pango/pango.h>
+
#include <config.h>
-#include "bar-histogram.h"
#include "compat.h"
#include "debug.h"
#include "filedata.h"
#include "main-defines.h"
#include "metadata.h"
#include "rcfile.h"
+#include "typedefs.h"
#include "ui-menu.h"
#include "ui-misc.h"
" </layout>"
"</gq>";
-#ifdef HAVE_LIBCHAMPLAIN
-#ifdef HAVE_LIBCHAMPLAIN_GTK
+#if HAVE_LIBCHAMPLAIN
+#if HAVE_LIBCHAMPLAIN_GTK
static const gchar default_config_gps[] =
"<gq>"
" <layout id = '_current_'>"
{PANE_EXIF, "file_info", N_("File info"), default_config_file_info},
{PANE_EXIF, "location", N_("Location and GPS"), default_config_location},
{PANE_EXIF, "copyright", N_("Copyright"), default_config_copyright},
-#ifdef HAVE_LIBCHAMPLAIN
-#ifdef HAVE_LIBCHAMPLAIN_GTK
+#if HAVE_LIBCHAMPLAIN
+#if HAVE_LIBCHAMPLAIN_GTK
{PANE_GPS, "gps", N_("GPS Map"), default_config_gps},
#endif
#endif
list = gtk_container_get_children(GTK_CONTAINER(expander));
data_box = static_cast<GtkWidget *>(list->data);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
window = gtk_window_new();
#else
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_free(bd);
}
-#ifdef HAVE_LIBCHAMPLAIN_GTK
+#if HAVE_LIBCHAMPLAIN_GTK
/**
@FIXME this is an ugly hack that works around this bug:
https://bugzilla.gnome.org/show_bug.cgi?id=590692
_("Add Pane"), G_CALLBACK(bar_menu_add_cb), bd);
gtk_widget_show(add_box);
-#ifdef HAVE_LIBCHAMPLAIN_GTK
+#if HAVE_LIBCHAMPLAIN_GTK
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN(scrolled))), "unrealize", G_CALLBACK(bar_unrealize_clutter_fix_cb), NULL);
#endif
#ifndef BAR_H
#define BAR_H
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
struct FileData;
#include "cache-loader.h"
-#include <config.h>
+#include <sys/types.h>
+#include <cstdio>
+#include <cstring>
+#include <ctime>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+
+#include "cache.h"
#include "filedata.h"
+#include "image-load.h"
#include "metadata.h"
#include "options.h"
+#include "similar.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#ifndef CACHE_LOADER_H
#define CACHE_LOADER_H
+#include <glib.h>
-#include "cache.h"
-#include "image-load.h"
-
+struct CacheData;
struct FileData;
+struct ImageLoader;
enum CacheDataType {
CACHE_LOADER_NONE = 0,
#include "cache-maint.h"
-#include <config.h>
+#include <dirent.h>
+#include <sys/types.h>
+
+#include <cstdlib>
+#include <cstring>
+
+#include <glib-object.h>
#include "cache-loader.h"
+#include "cache.h"
#include "compat.h"
#include "debug.h"
#include "filedata.h"
#include "main-defines.h"
#include "main.h"
#include "misc.h"
+#include "options.h"
#include "pixbuf-util.h"
#include "thumb-standard.h"
#include "thumb.h"
#ifndef CACHE_MAINT_H
#define CACHE_MAINT_H
+#include <glib.h>
#include <gtk/gtk.h>
#include "typedefs.h"
#include "cache.h"
+#include <sys/stat.h>
+#include <unistd.h>
+#include <utime.h>
+
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
#include <config.h>
#include "debug.h"
#include "md5-util.h"
#include "options.h"
#include "secure-save.h"
+#include "similar.h"
#include "thumb-standard.h"
#include "ui-fileops.h"
-#include <utime.h>
-
/**
* @file
#ifndef CACHE_H
#define CACHE_H
+#include <sys/types.h>
-#include "similar.h"
+#include <glib.h>
+struct ImageSimilarityData;
#define GQ_CACHE_THUMB "thumbnails"
#define GQ_CACHE_METADATA "metadata"
#include "cellrenderericon.h"
-#include <config.h>
+#include <cstddef>
+
+#include <cairo.h>
+#include <gdk/gdk.h>
enum {
FIXED_ICON_SIZE_MAX = 512
#ifndef __GQV_CELL_RENDERER_ICON_H__
#define __GQV_CELL_RENDERER_ICON_H__
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include <gtk/gtk.h>
+#include <pango/pango.h>
+
+struct GQvCellRendererIcon;
#define TOGGLE_WIDTH 13
#define TOGGLE_SPACING 16
#include "collect-dlg.h"
-#include <memory>
-
-#include <config.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
#include "collect-io.h"
#include "collect.h"
#include "main-defines.h"
#include "misc.h"
#include "ui-fileops.h"
+#include "ui-utildlg.h"
#include "utilops.h"
enum {
#include "collect-io.h"
+#include <cstdio>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+
#include <config.h>
#include "collect.h"
#include "intl.h"
#include "layout-util.h"
#include "main-defines.h"
+#include "options.h"
#include "secure-save.h"
#include "thumb.h"
#include "ui-fileops.h"
#ifndef COLLECT_IO_H
#define COLLECT_IO_H
+#include <glib.h>
+
#include "typedefs.h"
struct CollectionData;
#include "collect-table.h"
-#include <config.h>
+#include <cstddef>
+
+#include <cairo.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gio/gio.h>
+#include <glib-object.h>
#include "cellrenderericon.h"
#include "collect-dlg.h"
#include "collect-io.h"
+#include "collect.h"
#include "compat.h"
#include "debug.h"
#include "dnd.h"
#include "menu.h"
#include "metadata.h"
#include "misc.h"
-#include "pixbuf-util.h"
+#include "options.h"
#include "print.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "ui-menu.h"
#include "ui-tree-edit.h"
#ifndef COLLECT_TABLE_H
#define COLLECT_TABLE_H
-#include "collect.h"
+#include <gdk/gdk.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+
+struct CollectInfo;
+struct CollectionData;
struct CollectTable
{
#include "collect.h"
-#include <config.h>
+#include <sys/stat.h>
+
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#include <glib-object.h>
#include "collect-dlg.h"
#include "collect-io.h"
#include "intl.h"
#include "layout-image.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "misc.h"
+#include "options.h"
#include "pixbuf-util.h"
#include "print.h"
#include "ui-fileops.h"
#include "ui-tree-edit.h"
+#include "ui-utildlg.h"
#include "utilops.h"
#include "window.h"
#ifndef COLLECT_H
#define COLLECT_H
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
#include "typedefs.h"
#include <config.h>
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
/*** color support enabled ***/
+#include <cstdint>
+#include <cstring>
#include <vector>
-#ifdef HAVE_LCMS2
-#include <lcms2.h>
+#include <glib-object.h>
+
+#if HAVE_LCMS2
+# include <lcms2.h>
#else
-#include <lcms.h>
+# include <lcms.h>
#endif
#include "debug.h"
if (init_done) return;
init_done = TRUE;
-#ifndef HAVE_LCMS2
+#if !HAVE_LCMS2
cmsErrorAction(LCMS_ERROR_IGNORE);
#endif
}
static cmsHPROFILE color_man_create_adobe_comp()
{
/* ClayRGB1998 is AdobeRGB compatible */
-#include "ClayRGB1998_icc.h"
+#include "ClayRGB1998_icc.h" // IWYU pragma: keep
return cmsOpenProfileFromMem(ClayRGB1998_icc, ClayRGB1998_icc_len);
}
case COLOR_PROFILE_FILE:
if (profile)
{
-#ifdef HAVE_LCMS2
+#if HAVE_LCMS2
char buffer[20];
buffer[0] = '\0';
cmsGetProfileInfoASCII(profile, cmsInfoDescription, "en", "US", buffer, 20);
color_man_cache_reset();
}
-#ifdef HAVE_HEIF
+#if HAVE_HEIF
#include <cmath>
#include <libheif/heif.h>
#define COLOR_MAN_H
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib.h>
struct FileData;
struct ImageWindow;
#include <config.h>
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
void gq_gtk_container_add(GtkWidget *container, GtkWidget *widget)
{
if (GTK_IS_BUTTON(container))
#define MAP_ANON MAP_ANONYMOUS
#endif
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
#define gq_gtk_box_pack_end(box, child, expand, fill, padding) gtk_box_append(box, child)
#define gq_gtk_box_pack_start(box, child, expand, fill, padding) gtk_box_prepend(box, child)
#define gq_gtk_frame_set_shadow_type(frame, type) ;
#include "debug.h"
+#include <regex.h>
+#include <sys/time.h>
+
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
#include <config.h>
+#if HAVE_EXECINFO_H
+# include <execinfo.h>
+#endif
+
#include "filedata.h"
#include "intl.h"
#include "logwindow.h"
#include "options.h"
#include "ui-fileops.h"
-#ifdef HAVE_EXECINFO_H
-#include <execinfo.h>
-#endif
-
-#include <regex.h>
-
/*
* Logging functions
*/
return g_strdup(regexp);
}
-#ifdef HAVE_EXECINFO_H
+#if HAVE_EXECINFO_H
/**
* @brief Backtrace of geeqie files
* @param file
#include "desktop-file.h"
-#include <config.h>
+#include <unistd.h>
+
+#include <cstring>
+
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
#include "compat.h"
#include "debug.h"
#include "main-defines.h"
#include "main.h"
#include "misc.h"
+#include "options.h"
#include "pixbuf-util.h"
#include "ui-fileops.h"
#include "ui-misc.h"
+#include "ui-utildlg.h"
#include "utilops.h"
#include "window.h"
#include "dnd.h"
-#include <config.h>
+#include <glib-object.h>
+#include <pango/pango.h>
#include "compat.h"
-#include "main-defines.h"
#include "options.h"
#include "pixbuf-util.h"
#ifndef DND_H
#define DND_H
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
+#include "main-defines.h"
+
#define TARGET_APP_COLLECTION_MEMBER_STRING "application/x-" GQ_APPNAME_LC "-collection-member"
#define TARGET_APP_EXIF_ENTRY_STRING "application/x-" GQ_APPNAME_LC "-exif-entry"
#define TARGET_APP_KEYWORD_PATH_STRING "application/x-" GQ_APPNAME_LC "-keyword-path"
#include "dupe.h"
+#include <sys/time.h>
+#include <sys/types.h>
+
#include <cinttypes>
#include <cmath>
+#include <cstdlib>
+#include <cstring>
-#include <config.h>
+#include <gdk/gdk.h>
+#include <gio/gio.h>
+#include <glib-object.h>
#include "cache.h"
#include "collect-table.h"
+#include "collect.h"
#include "compat.h"
#include "debug.h"
#include "dnd.h"
#include "intl.h"
#include "layout-image.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "md5-util.h"
#include "menu.h"
#include "misc.h"
-#include "pixbuf-util.h"
+#include "options.h"
#include "print.h"
+#include "similar.h"
#include "thumb.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "ui-menu.h"
#include "ui-misc.h"
#include "ui-tree-edit.h"
+#include "ui-utildlg.h"
#include "uri-utils.h"
#include "utilops.h"
#include "window.h"
#ifndef DUPE_H
#define DUPE_H
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib.h>
#include <gtk/gtk.h>
-#include "similar.h"
-
struct CollectInfo;
struct CollectionData;
struct FileData;
struct ImageLoader;
+struct ImageSimilarityData;
struct ThumbLoader;
/** @enum DupeMatchType
#include "editors.h"
-#include <config.h>
+#include <dirent.h>
+#include <unistd.h>
+
+#include <cstdlib>
+#include <cstring>
+
+#include <glib-object.h>
#include "compat.h"
#include "debug.h"
#include "main.h"
#include "options.h"
#include "pixbuf-util.h"
+#include "typedefs.h"
#include "ui-fileops.h"
+#include "ui-utildlg.h"
#include "utilops.h"
enum {
#ifndef EDITORS_H
#define EDITORS_H
+#include <glib.h>
#include <gtk/gtk.h>
struct FileData;
#define _XOPEN_SOURCE
#endif
+#include <sys/stat.h>
+
#include <cmath>
#include <cstdlib>
#include <cstring>
+#include <ctime>
-#ifdef HAVE_LCMS
-/*** color support enabled ***/
+#include <glib.h>
-#ifdef HAVE_LCMS2
-#include <lcms2.h>
-#else
-#include <lcms.h>
-#endif
+#if HAVE_LCMS
+/*** color support enabled ***/
+# if HAVE_LCMS2
+# include <lcms2.h>
+# else
+# include <lcms.h>
+# endif
#endif
#include "cache.h"
#include "debug.h"
#include "exif.h"
#include "filecache.h"
+#include "filedata.h"
#include "glua.h"
#include "intl.h"
#include "jpeg-parser.h"
#include "main-defines.h"
#include "misc.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "zonedetect.h"
+struct ExifData;
+struct ExifItem;
+struct FileCacheData;
+struct ZoneDetect;
+
static gdouble exif_rational_to_double(ExifRational *r, gint sign)
{
static gchar *exif_build_formatted_ColorProfile(ExifData *exif)
{
-#ifdef HAVE_LCMS2
+#if HAVE_LCMS2
cmsUInt8Number profileID[17];
#endif
const gchar *name = "";
else
{
source = _("embedded");
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
{
cmsHPROFILE profile;
profile = cmsOpenProfileFromMem(profile_data, profile_len);
if (profile)
{
-#ifdef HAVE_LCMS2
+#if HAVE_LCMS2
profileID[16] = '\0';
cmsGetHeaderProfileID(profile, profileID);
name = reinterpret_cast<gchar *>(profileID);
* not writable directly, thus it should contain the most up-to-date version */
sidecar_path = nullptr;
-#ifdef HAVE_EXIV2
+#if HAVE_EXIV2
/* we are not able to handle XMP sidecars without exiv2 */
sidecar_path = cache_find_location(CACHE_TYPE_XMP_METADATA, fd->path);
return g_strdup("");
}
-#ifdef HAVE_LUA
+#if HAVE_LUA
gchar *metadata_lua_info(FileData *fd, const gchar *key, MetadataFormat)
{
gchar *script_name;
#include <config.h>
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
#include <cmath>
#include <cstdio>
#include <config.h>
-#ifdef HAVE_EXIV2
+#if HAVE_EXIV2
-// Don't include the <exiv2/version.hpp> file directly
-// Early Exiv2 versions didn't have version.hpp and the macros.
-#include <exiv2/exiv2.hpp>
-#include <iostream>
-#include <string>
-
-#if EXIV2_TEST_VERSION(0,27,0)
-#define HAVE_EXIV2_ERROR_CODE
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
+#include "exif.h"
-#if EXIV2_TEST_VERSION(0,27,0)
-#define EXV_PACKAGE "exiv2"
-#endif
+#include <algorithm>
+#include <cstdint>
+#include <cstring>
+#include <exception>
+#include <list>
+#include <memory>
+#include <string>
+#include <utility>
+#include <vector>
+#include <exiv2/exiv2.hpp>
#include <glib.h>
-
-#include "exif.h"
+#ifdef ENABLE_NLS
+# include <libintl.h>
+#endif
#include "debug.h"
#include "filedata.h"
#include "filefilter.h"
#include "misc.h"
#include "options.h"
+#include "typedefs.h"
#include "ui-fileops.h"
+struct ExifItem;
+
+#if EXIV2_TEST_VERSION(0,27,0)
+#define HAVE_EXIV2_ERROR_CODE
+#endif
+
+#if EXIV2_TEST_VERSION(0,27,0)
+#define EXV_PACKAGE "exiv2"
+#endif
+
#if EXIV2_TEST_VERSION(0,28,0)
#define AnyError Error
#define AutoPtr UniquePtr
#include "filecache.h"
-#include <config.h>
-
#include "debug.h"
+#include "filedata.h"
+#include "typedefs.h"
/* Set to TRUE to add file cache dumps to the debug output */
const gboolean debug_file_cache = FALSE;
#ifndef FILECACHE_H
#define FILECACHE_H
-#include "filedata.h"
+#include <glib.h>
struct FileCacheData;
-using FileCacheReleaseFunc = void (*)(FileData *);
+struct FileData;
+using FileCacheReleaseFunc = void (*)(FileData *);
FileCacheData *file_cache_new(FileCacheReleaseFunc release, gulong max_size);
gboolean file_cache_get(FileCacheData *fc, FileData *fd);
#include "filedata.h"
+#include <dirent.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#include <glib-object.h>
+#include <grp.h>
+#include <pwd.h>
+
#include <config.h>
#include "cache.h"
#include "debug.h"
+#include "exif.h"
#include "filefilter.h"
#include "histogram.h"
#include "intl.h"
#include "main-defines.h"
#include "main.h"
#include "metadata.h"
+#include "misc.h"
#include "options.h"
#include "secure-save.h"
#include "thumb-standard.h"
#include "trash.h"
#include "ui-fileops.h"
-#include "exif.h"
-#include "misc.h"
-
-#include <grp.h>
-#include <pwd.h>
-
#ifdef DEBUG_FILEDATA
gint global_file_data_count = 0;
#endif
* it's location regardless of the user's preference.
*/
gchar *metadata_path = nullptr;
-#ifdef HAVE_EXIV2
+#if HAVE_EXIV2
/* but ignore XMP if we are not able to write it */
metadata_path = cache_find_location(CACHE_TYPE_XMP_METADATA, fd->path);
#endif
#ifndef FILEDATA_H
#define FILEDATA_H
+#include <sys/types.h>
+
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib.h>
#include <config.h>
#include "filefilter.h"
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
#include <config.h>
#include "cache.h"
#include "debug.h"
#include "main-defines.h"
+#include "options.h"
#include "rcfile.h"
#include "ui-fileops.h"
{
/* formats supported by custom loaders */
filter_add_if_missing("dds", "DirectDraw Surface", ".dds", FORMAT_CLASS_IMAGE, FALSE, FALSE, TRUE);
-#ifdef HAVE_PDF
+#if HAVE_PDF
filter_add_if_missing("pdf", "Portable Document Format", ".pdf", FORMAT_CLASS_DOCUMENT, FALSE, FALSE, TRUE);
#endif
-#ifdef HAVE_HEIF
+#if HAVE_HEIF
filter_add_if_missing("heif/avif", "HEIF/AVIF Image", ".heif;.heic;.avif", FORMAT_CLASS_IMAGE, FALSE, TRUE, TRUE);
#endif
-#ifdef HAVE_WEBP
+#if HAVE_WEBP
filter_add_if_missing("webp", "WebP Format", ".webp", FORMAT_CLASS_IMAGE, TRUE, FALSE, TRUE);
#endif
-#ifdef HAVE_DJVU
+#if HAVE_DJVU
filter_add_if_missing("djvu", "DjVu Format", ".djvu;.djv", FORMAT_CLASS_DOCUMENT, FALSE, FALSE, TRUE);
#endif
-#ifdef HAVE_JPEGXL
+#if HAVE_JPEGXL
filter_add_if_missing("jxl", "JXL", ".jxl", FORMAT_CLASS_IMAGE, FALSE, TRUE, TRUE);
#endif
-#ifdef HAVE_J2K
+#if HAVE_J2K
filter_add_if_missing("jp2", "JPEG 2000", ".jp2", FORMAT_CLASS_IMAGE, FALSE, FALSE, TRUE);
#endif
-#ifdef HAVE_ARCHIVE
+#if HAVE_ARCHIVE
filter_add_if_missing("zip", "Archive files", ".zip;.rar;.tar;.tar.gz;.tar.bz2;.tar.xz;.tgz;.tbz;.txz;.cbr;.cbz;.gz;.bz2;.xz;.lzh;.lza;.7z", FORMAT_CLASS_ARCHIVE, FALSE, FALSE, TRUE);
#endif
filter_add_if_missing("scr", "ZX Spectrum screen Format", ".scr", FORMAT_CLASS_IMAGE, FALSE, FALSE, TRUE);
#ifndef FILEFILTER_H
#define FILEFILTER_H
+#include <glib.h>
+
#include "typedefs.h"
struct FilterEntry {
#include <config.h>
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
#include "format-canon.h"
#include <config.h>
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
#include "format-fuji.h"
#include <config.h>
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
#include "format-nikon.h"
#include <config.h>
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
#include "format-olympus.h"
#include <config.h>
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
#include "format-raw.h"
#include "fullscreen.h"
#include <algorithm>
+#include <cstddef>
#include <string>
#include <vector>
-#include <config.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
#include "compat.h"
#include "debug.h"
#ifndef FULLSCREEN_H
#define FULLSCREEN_H
+#include <glib.h>
#include <gtk/gtk.h>
struct ImageWindow;
#include <config.h>
-#ifdef HAVE_LUA
+#if HAVE_LUA
#include <glib.h>
#include "histogram.h"
-#include <config.h>
+#include <cmath>
+
+#include <glib-object.h>
#include "debug.h"
#include "filedata.h"
#include "intl.h"
#include "pixbuf-util.h"
-#include <cmath>
-
/*
*----------------------------------------------------------------------------
* image histogram
#define HISTOGRAM_H
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib.h>
#include "typedefs.h"
#include "history-list.h"
-#include <config.h>
+#include <cstdio>
+#include <cstring>
#include "debug.h"
#include "intl.h"
#include "image-load-collection.h"
-#include <config.h>
+#include <unistd.h>
+
+#include <cstdio>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include "cache.h"
#include "filedata.h"
/** @FIXME This is just a copy of image-load-jpeg.cc, with an adjusted
* start address for a .cr3 file
*/
+#include <config.h>
+
+#if HAVE_JPEG
#include "image-load-cr3.h"
-#include <config.h>
+#include <csetjmp>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <jerror.h>
+#include <jpeglib.h>
#include "debug.h"
#include "image-load.h"
#include "jpeg-parser.h"
#include "typedefs.h"
-#ifdef HAVE_JPEG
-
-#include <csetjmp>
-#include <jerror.h>
-#include <jpeglib.h>
-
struct ImageLoaderJpeg {
ImageLoaderBackendCbAreaUpdated area_updated_cb;
ImageLoaderBackendCbSize size_cb;
#include <config.h>
-#ifdef HAVE_JPEG
+#if HAVE_JPEG
struct ImageLoaderBackend;
void image_loader_backend_set_cr3(ImageLoaderBackend *funcs);
#include "image-load-dds.h"
-#include <config.h>
+#include <sys/types.h>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include "image-load.h"
#include <config.h>
-#ifdef HAVE_DJVU
+#if HAVE_DJVU
#include <cairo.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include <libdjvu/ddjvuapi.h>
-#include <libdjvu/miniexp.h>
#include "image-load.h"
#include <config.h>
-#ifdef HAVE_DJVU
+#if HAVE_DJVU
struct ImageLoaderBackend;
void image_loader_backend_set_djvu(ImageLoaderBackend *funcs);
#include "image-load-external.h"
-#include <config.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include "filedata.h"
#include "image-load.h"
#include <config.h>
-#ifdef HAVE_FFMPEGTHUMBNAILER
-#include <libffmpegthumbnailer/videothumbnailerc.h>
+#if HAVE_FFMPEGTHUMBNAILER
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <libffmpegthumbnailer/ffmpegthumbnailertypes.h>
+#include <libffmpegthumbnailer/imagetypes.h>
+#include <libffmpegthumbnailer/videothumbnailerc.h> //TODO Use videothumbnailer.h?
#include "debug.h"
#include "filedata.h"
image_data *image = video_thumbnailer_create_image_data();
-#ifdef HAVE_FFMPEGTHUMBNAILER_WH
+#if HAVE_FFMPEGTHUMBNAILER_WH
video_thumbnailer_set_size(lft->vt, lft->requested_width, lft->requested_height);
#else
lft->vt->thumbnail_size = MAX(lft->requested_width,lft->requested_height);
#endif
-#ifdef HAVE_FFMPEGTHUMBNAILER_METADATA
+#if HAVE_FFMPEGTHUMBNAILER_METADATA
lft->vt->prefer_embedded_metadata = options->thumbnails.use_ft_metadata ? 1 : 0;
#endif
#include <config.h>
-#ifdef HAVE_FFMPEGTHUMBNAILER
+#if HAVE_FFMPEGTHUMBNAILER
struct ImageLoaderBackend;
void image_loader_backend_set_ft(ImageLoaderBackend *funcs);
#include "image-load-gdk.h"
-#include <config.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include "filedata.h"
#include "image-load.h"
#include <config.h>
-#ifdef HAVE_HEIF
+#if HAVE_HEIF
#include <vector>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include <libheif/heif.h>
#include "debug.h"
#include <config.h>
-#ifdef HAVE_HEIF
+#if HAVE_HEIF
struct ImageLoaderBackend;
void image_loader_backend_set_heif(ImageLoaderBackend *funcs);
#include <config.h>
-#ifdef HAVE_J2K
+#if HAVE_J2K
#include "image-load-j2k.h"
+#include <cstdlib>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include <openjpeg.h>
#include "debug.h"
#include <config.h>
-#ifdef HAVE_J2K
+#if HAVE_J2K
struct ImageLoaderBackend;
void image_loader_backend_set_j2k(ImageLoaderBackend *funcs);
#include <config.h>
-#ifdef HAVE_JPEG
+#if HAVE_JPEG
#include "image-load-jpeg.h"
#include <csetjmp>
#include <cstdio> // for FILE and size_t in jpeglib.h
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include <jerror.h>
#include <jpeglib.h>
#include <config.h>
-#ifdef HAVE_JPEG
+#if HAVE_JPEG
struct ImageLoaderBackend;
void image_loader_backend_set_jpeg(ImageLoaderBackend *funcs);
#include <config.h>
-#ifdef HAVE_JPEGXL
+#if HAVE_JPEGXL
#include "image-load-jpegxl.h"
+#include <cstdint>
+#include <cstdlib>
#include <memory>
-#include <jxl/decode.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <jxl/codestream_header.h>
+#include <jxl/decode.h> //TODO Use decode_cxx.h?
+#include <jxl/types.h>
#include "debug.h"
#include "image-load.h"
#include <config.h>
-#ifdef HAVE_JPEGXL
+#if HAVE_JPEGXL
struct ImageLoaderBackend;
void image_loader_backend_set_jpegxl(ImageLoaderBackend *funcs);
#include "image-load.h"
-#ifdef HAVE_RAW
+#if HAVE_RAW
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
+#include <unistd.h>
#include <libraw/libraw.h>
#include "debug.h"
#include "filedata.h"
#include "filefilter.h"
+#include "typedefs.h"
struct UnmapData
{
#include <config.h>
-#ifdef HAVE_PDF
+#if HAVE_PDF
#include "image-load-pdf.h"
+#include <cairo.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
-#include <poppler/glib/poppler.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <poppler.h>
#include "debug.h"
#include "image-load.h"
#include <config.h>
-#ifdef HAVE_PDF
+#if HAVE_PDF
struct ImageLoaderBackend;
void image_loader_backend_set_pdf(ImageLoaderBackend *funcs);
#include "image-load-psd.h"
-#include <config.h>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include "debug.h"
#include "image-load.h"
#include "image-load-svgz.h"
-#include <config.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include "image-load.h"
#include <config.h>
-#ifdef HAVE_TIFF
+#if HAVE_TIFF
#include "image-load-tiff.h"
+#include <cstddef>
+#include <cstdio>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <tiff.h>
#include <tiffio.h>
#include "debug.h"
#include <config.h>
-#ifdef HAVE_TIFF
+#if HAVE_TIFF
struct ImageLoaderBackend;
void image_loader_backend_set_tiff(ImageLoaderBackend *funcs);
#include <config.h>
-#ifdef HAVE_WEBP
+#if HAVE_WEBP
#include "image-load-webp.h"
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include <webp/decode.h>
#include "debug.h"
#include <config.h>
-#ifdef HAVE_WEBP
+#if HAVE_WEBP
struct ImageLoaderBackend;
void image_loader_backend_set_webp(ImageLoaderBackend *funcs);
#include "image-load-zxscr.h"
-#include <config.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
#include "debug.h"
#include "image-load.h"
#include "image-load.h"
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <cstring>
+
#include <config.h>
#include "debug.h"
#include "gq-marshal.h"
#include "image-load-collection.h"
#include "image-load-dds.h"
+#if HAVE_DJVU
+# include "image-load-djvu.h"
+#endif
#include "image-load-external.h"
+#if HAVE_FFMPEGTHUMBNAILER
+# include "image-load-ffmpegthumbnailer.h"
+#endif
#include "image-load-gdk.h"
+#if HAVE_HEIF
+# include "image-load-heif.h"
+#endif
+#if HAVE_J2K
+# include "image-load-j2k.h"
+#endif
+#if HAVE_JPEG
+# if !HAVE_RAW
+# include "image-load-cr3.h"
+# endif
+# include "image-load-jpeg.h"
+#endif
+#if HAVE_JPEGXL
+# include "image-load-jpegxl.h"
+#endif
#include "image-load-libraw.h"
+#if HAVE_PDF
+# include "image-load-pdf.h"
+#endif
#include "image-load-psd.h"
#include "image-load-svgz.h"
+#if HAVE_TIFF
+# include "image-load-tiff.h"
+#endif
#include "image-load-webp.h"
#include "image-load-zxscr.h"
#include "misc.h"
#include "options.h"
+#include "typedefs.h"
#include "ui-fileops.h"
-#ifdef HAVE_DJVU
- #include "image-load-djvu.h"
-#endif
-#ifdef HAVE_FFMPEGTHUMBNAILER
- #include "image-load-ffmpegthumbnailer.h"
-#endif
-#ifdef HAVE_HEIF
- #include "image-load-heif.h"
-#endif
-#ifdef HAVE_J2K
- #include "image-load-j2k.h"
-#endif
-#ifdef HAVE_JPEG
- #include "image-load-cr3.h"
- #include "image-load-jpeg.h"
-#endif
-#ifdef HAVE_JPEGXL
- #include "image-load-jpegxl.h"
-#endif
-#ifdef HAVE_PDF
- #include "image-load-pdf.h"
-#endif
-#ifdef HAVE_TIFF
- #include "image-load-tiff.h"
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
+struct ExifData;
enum {
IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT = 4096,
}
g_mutex_unlock(il->data_mutex);
-#ifdef HAVE_FFMPEGTHUMBNAILER
+#if HAVE_FFMPEGTHUMBNAILER
if (il->fd->format_class == FORMAT_CLASS_VIDEO)
scale = TRUE;
#endif
}
else
{
-#ifdef HAVE_FFMPEGTHUMBNAILER
+#if HAVE_FFMPEGTHUMBNAILER
if (il->fd->format_class == FORMAT_CLASS_VIDEO)
{
DEBUG_1("Using custom ffmpegthumbnailer loader");
}
else
#endif
-#ifdef HAVE_PDF
+#if HAVE_PDF
if (il->bytes_total >= 4 &&
(memcmp(il->mapped_file + 0, "%PDF", 4) == 0))
{
}
else
#endif
-#ifdef HAVE_HEIF
+#if HAVE_HEIF
if (il->bytes_total >= 12 &&
((memcmp(il->mapped_file + 4, "ftypheic", 8) == 0) ||
(memcmp(il->mapped_file + 4, "ftypheix", 8) == 0) ||
}
else
#endif
- #ifdef HAVE_WEBP
+ #if HAVE_WEBP
if (il->bytes_total >= 12 &&
(memcmp(il->mapped_file, "RIFF", 4) == 0) &&
(memcmp(il->mapped_file + 8, "WEBP", 4) == 0))
}
else
#endif
-#ifdef HAVE_DJVU
+#if HAVE_DJVU
if (il->bytes_total >= 16 &&
(memcmp(il->mapped_file, "AT&TFORM", 8) == 0) &&
(memcmp(il->mapped_file + 12, "DJV", 3) == 0))
}
else
#endif
-#ifdef HAVE_JPEG
+#if HAVE_JPEG
if (il->bytes_total >= 2 && il->mapped_file[0] == 0xff && il->mapped_file[1] == 0xd8)
{
DEBUG_1("Using custom jpeg loader");
image_loader_backend_set_jpeg(&il->backend);
}
-#ifndef HAVE_RAW
+#if !HAVE_RAW
else
if (il->bytes_total >= 11 &&
(memcmp(il->mapped_file + 4, "ftypcrx", 7) == 0) &&
#endif
else
#endif
-#ifdef HAVE_TIFF
+#if HAVE_TIFF
if (il->bytes_total >= 10 &&
(memcmp(il->mapped_file, "MM\0*", 4) == 0 ||
memcmp(il->mapped_file, "MM\0+\0\x08\0\0", 8) == 0 ||
image_loader_backend_set_psd(&il->backend);
}
else
-#ifdef HAVE_J2K
+#if HAVE_J2K
if (il->bytes_total >= 12 &&
(memcmp(il->mapped_file, "\0\0\0\x0CjP\x20\x20\x0D\x0A\x87\x0A", 12) == 0))
{
}
else
#endif
-#ifdef HAVE_JPEGXL
+#if HAVE_JPEGXL
if (il->bytes_total >= 12 &&
(memcmp(il->mapped_file, "\0\0\0\x0C\x4A\x58\x4C\x20\x0D\x0A\x87\x0A", 12) == 0))
{
il->loader = static_cast<void **>(il->backend.loader_new(image_loader_area_updated_cb, image_loader_size_cb, image_loader_area_prepared_cb, il));
-#ifdef HAVE_TIFF
+#if HAVE_TIFF
format = il->backend.get_format_name(il->loader);
if (g_strcmp0(format, "tiff") == 0)
{
g_free(format);
#endif
-#ifdef HAVE_PDF
+#if HAVE_PDF
format = il->backend.get_format_name(il->loader);
if (g_strcmp0(format, "pdf") == 0)
{
g_free(format);
#endif
-#ifdef HAVE_HEIF
+#if HAVE_HEIF
format = il->backend.get_format_name(il->loader);
if (g_strcmp0(format, "heif") == 0)
{
g_free(format);
#endif
-#ifdef HAVE_DJVU
+#if HAVE_DJVU
format = il->backend.get_format_name(il->loader);
if (g_strcmp0(format, "djvu") == 0)
{
return FALSE;
}
-#ifdef HAVE_PDF
+#if HAVE_PDF
format = il->backend.get_format_name(il->loader);
if (g_strcmp0(format, "pdf") == 0)
{
}
g_free(format);
#endif
-#ifdef HAVE_HEIF
+#if HAVE_HEIF
format = il->backend.get_format_name(il->loader);
if (g_strcmp0(format, "heif") == 0)
{
}
g_free(format);
#endif
-#ifdef HAVE_DJVU
+#if HAVE_DJVU
format = il->backend.get_format_name(il->loader);
if (g_strcmp0(format, "djvu") == 0)
{
}
g_free(format);
#endif
-#ifdef HAVE_TIFF
+#if HAVE_TIFF
format = il->backend.get_format_name(il->loader);
if (g_strcmp0(format, "tiff") == 0)
{
#define IMAGE_LOAD_H
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
struct FileData;
#include "image-overlay.h"
-#include <config.h>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <pango/pango.h>
#include "collect.h"
#include "debug.h"
#include "intl.h"
#include "layout.h"
#include "main-defines.h"
+#include "options.h"
#include "osd.h"
#include "pixbuf-renderer.h"
#include "pixbuf-util.h"
#include "slideshow.h"
+#include "typedefs.h"
#include "ui-fileops.h"
+struct HistMap;
+
/*
*----------------------------------------------------------------------------
* image overlay
#include "image.h"
-#include <config.h>
+#include <cmath>
+#include <cstring>
+
+#include <cairo.h>
+#include <glib-object.h>
#include "collect-table.h"
+#include "collect.h"
#include "color-man.h"
#include "compat.h"
#include "debug.h"
#include "exif.h"
#include "filecache.h"
+#include "filedata.h"
#include "history-list.h"
#include "image-load.h"
#include "intl.h"
#include "layout-image.h"
#include "layout.h"
#include "metadata.h"
+#include "options.h"
#include "pixbuf-renderer.h"
#include "pixbuf-util.h"
#include "ui-fileops.h"
#include "ui-misc.h"
-#include <cmath>
+struct ExifData;
+struct FileCacheData;
static GList *image_list = nullptr;
#ifndef IMAGE_H
#define IMAGE_H
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
#include "typedefs.h"
#include "img-view.h"
-#include <config.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
#include "collect-io.h"
#include "collect.h"
#include "image.h"
#include "intl.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "main.h"
#include "menu.h"
#include "misc.h"
+#include "options.h"
#include "pixbuf-util.h"
#include "print.h"
#include "slideshow.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "ui-menu.h"
+#include "ui-utildlg.h"
#include "uri-utils.h"
#include "utilops.h"
#include "window.h"
#include "jpeg-parser.h"
-#include <config.h>
+#include <cstring>
#include "debug.h"
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <cstddef>
-
const char *keymap_template [] = {
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>",
"<!-- Created with Inkscape (http://www.inkscape.org/) -->",
#include "layout-config.h"
+#include <cstring>
+
+#include <glib-object.h>
+
#include <config.h>
#include "compat.h"
if (group)
{
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
group = gtk_toggle_button_new();
gtk_toggle_button_set_group(button, group);
#else
}
else
{
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
group = gtk_toggle_button_new();
#else
group = gtk_radio_button_new(nullptr);
#ifndef LAYOUT_CONFIG_H
#define LAYOUT_CONFIG_H
-
+#include <glib.h>
#include <gtk/gtk.h>
#include "layout.h"
#include "layout-image.h"
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <gio/gio.h>
+#include <glib-object.h>
+#include <pango/pango.h>
+
#include <config.h>
#include "collect.h"
#include "img-view.h"
#include "intl.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "menu.h"
#include "metadata.h"
#include "misc.h"
+#include "options.h"
#include "pixbuf-renderer.h"
-#include "pixbuf-util.h"
#include "slideshow.h"
#include "ui-fileops.h"
#include "ui-menu.h"
+#include "ui-utildlg.h"
#include "uri-utils.h"
#include "utilops.h"
#include "view-file.h"
file_util_copy_path_to_clipboard(layout_image_get_fd(lw), FALSE);
}
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
static void li_pop_menu_copy_image_cb(GtkWidget *, gpointer data)
{
/* @FIXME GTK4 stub */
#ifndef LAYOUT_IMAGE_H
#define LAYOUT_IMAGE_H
+#include <glib.h>
#include <gtk/gtk.h>
#include "typedefs.h"
#include "layout-util.h"
-#include <sys/wait.h>
+#include <dirent.h>
+#include <unistd.h>
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#include <gio/gio.h>
+#include <glib-object.h>
#include <config.h>
#include "bar-sort.h"
#include "bar.h"
#include "cache-maint.h"
-#include "collect-dlg.h"
#include "collect-io.h"
#include "collect.h"
#include "color-man.h"
#include "intl.h"
#include "keymap-template.h"
#include "layout-image.h"
+#include "layout.h"
#include "logwindow.h"
#include "main-defines.h"
#include "main.h"
#include "metadata.h"
#include "misc.h"
+#include "options.h"
#include "pan-view.h"
#include "pixbuf-util.h"
#include "preferences.h"
#include "ui-fileops.h"
#include "ui-menu.h"
#include "ui-misc.h"
+#include "ui-utildlg.h"
#include "utilops.h"
#include "view-dir.h"
#include "view-file.h"
* color profile button (and menu)
*-----------------------------------------------------------------------------
*/
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
static void layout_color_menu_enable_cb(GtkToggleAction *action, gpointer data)
{
auto lw = static_cast<LayoutWindow *>(data);
}
#endif
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
static void layout_color_menu_use_image_cb(GtkToggleAction *action, gpointer data)
{
auto lw = static_cast<LayoutWindow *>(data);
}
#endif
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
static void layout_color_menu_input_cb(GtkRadioAction *action, GtkRadioAction *, gpointer data)
{
auto lw = static_cast<LayoutWindow *>(data);
gboolean use_image = FALSE;
gint i;
gchar action_name[15];
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
gchar *image_profile;
gchar *screen_profile;
#endif
use_color = layout_image_color_profile_get_use(lw);
action = gtk_action_group_get_action(lw->action_group, "UseColorProfiles");
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), use_color);
if (layout_image_color_profile_get_status(lw, &image_profile, &screen_profile))
{
#ifndef LAYOUT_UTIL_H
#define LAYOUT_UTIL_H
+#include <gdk/gdk.h>
+#include <glib.h>
+#include <gtk/gtk.h>
-#include "layout.h"
+#include "typedefs.h"
+
+struct LayoutWindow;
gboolean layout_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
#include "layout.h"
-#include <config.h>
+#include <unistd.h>
+
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <pango/pango.h>
#include "bar-sort.h"
#include "bar.h"
#ifndef LAYOUT_H
#define LAYOUT_H
+#include <glib.h>
#include <gtk/gtk.h>
#include "options.h"
+#include "typedefs.h"
struct AnimationData;
struct FileData;
#include "logwindow.h"
#include <algorithm>
+#include <cstring>
#include <deque>
#include <string>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
#include <config.h>
#include "compat.h"
#include "layout.h"
#include "main-defines.h"
#include "misc.h"
+#include "options.h"
#include "ui-misc.h"
#include "window.h"
#include <config.h>
-#ifdef HAVE_LUA
+#if HAVE_LUA
#define _XOPEN_SOURCE
#include "glua.h"
-#include <cstdio>
+#include <unistd.h>
+
#include <cstring>
#include <ctime>
#include <memory>
+#include <utility>
#include <glib.h>
#include <lua.hpp>
#include "debug.h"
#include "exif.h"
#include "filedata.h"
-#include "main-defines.h"
#include "main.h"
#include "ui-fileops.h"
+struct ExifData;
+
/**
* @file
* User API consists of the following namespaces:
#include "main.h"
-#include <sys/mman.h>
+#include <unistd.h>
#include <clocale>
#include <csignal>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
#include <config.h>
-#ifdef HAVE_CLUTTER
-#include <clutter-gtk/clutter-gtk.h>
+#if HAVE_CLUTTER
+# include <clutter-gtk/clutter-gtk.h>
+# include <clutter/clutter.h>
#endif
-#ifdef HAVE_EXECINFO_H
+#if HAVE_EXECINFO_H
#include <execinfo.h>
#endif
-#ifdef G_OS_UNIX
-#include <pwd.h>
+#include <gio/gio.h>
+#include <glib-object.h>
+
+#ifdef ENABLE_NLS
+# include <libintl.h>
#endif
-#ifdef HAVE_DEVELOPER
+#if HAVE_DEVELOPER
#include "backward.h"
#endif
#include "intl.h"
#include "layout-image.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "metadata.h"
#include "misc.h"
+#include "options.h"
#include "pixbuf-util.h"
#include "rcfile.h"
#include "remote.h"
guint64 addr;
guint64 char_index;
ssize_t len;
-#ifdef HAVE_EXECINFO_H
+#if HAVE_EXECINFO_H
gint bt_size;
void *bt[1024];
#endif
len = write(STDERR_FILENO, "\n", 1);
}
-#ifdef HAVE_EXECINFO_H
+#if HAVE_EXECINFO_H
bt_size = backtrace(bt, 1024);
backtrace_symbols_fd(bt, bt_size, STDERR_FILENO);
#endif
#else /* defined(SA_SIGINFO) */
void sig_handler_cb(int)
{
-#ifdef HAVE_EXECINFO_H
+#if HAVE_EXECINFO_H
gint bt_size;
void *bt[1024];
#endif
write(STDERR_FILENO, "Geeqie fatal error\n", 19);
write(STDERR_FILENO, "Signal: Segmentation fault\n", 27);
-#ifdef HAVE_EXECINFO_H
+#if HAVE_EXECINFO_H
bt_size = backtrace(bt, 1024);
backtrace_symbols_fd(bt, bt_size, STDERR_FILENO);
#endif
#endif
}
-#ifdef HAVE_CLUTTER
+#if HAVE_CLUTTER
static gboolean parse_command_line_for_clutter_option(gint argc, gchar *argv[])
{
const gchar *clutter_option = "--disable-clutter";
}
#pragma GCC diagnostic pop
-#ifndef HAVE_DEVELOPER
+#if !HAVE_DEVELOPER
static void setup_sig_handler()
{
struct sigaction sigsegv_action;
gdk_threads_enter();
/* seg. fault handler */
-#ifdef HAVE_DEVELOPER
+#if HAVE_DEVELOPER
backward::SignalHandling sh{};
#else
setup_sig_handler();
exif_init();
-#ifdef HAVE_LUA
+#if HAVE_LUA
lua_init();
#endif
parse_command_line_for_debug_option(argc, argv);
DEBUG_1("%s main: gtk_init", get_exec_time());
-#ifdef HAVE_CLUTTER
+#if HAVE_CLUTTER
if (parse_command_line_for_clutter_option(argc, argv))
{
disable_clutter = TRUE;
filter_rebuild();
}
- #ifdef HAVE_CLUTTER
+ #if HAVE_CLUTTER
/** @FIXME For the background of this see:
* https://github.com/BestImageViewer/geeqie/issues/397
* The feature CLUTTER_FEATURE_SWAP_EVENTS indictates if the
#define MAIN_H
#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
extern gboolean thumb_format_changed;
#include "md5-util.h"
#include <cstdio>
-#include <cstring>
#include <memory>
using GQChecksumPtr = std::unique_ptr<GChecksum, decltype(&g_checksum_free)>;
#include "menu.h"
-#include <config.h>
+#include <gdk/gdk.h>
#include "collect-io.h"
#include "collect-table.h"
+#include "collect.h"
#include "editors.h"
#include "intl.h"
#include "main-defines.h"
#include "pixbuf-util.h"
-#include "ui-fileops.h"
#include "ui-menu.h"
static GtkWidget *real_submenu_add_alter(GtkWidget *menu, GCallback func, gpointer data,
#ifndef MENU_H
#define MENU_H
+#include <glib-object.h>
+#include <glib.h>
#include <gtk/gtk.h>
#include "typedefs.h"
project_sources += gq_marshal_pragma
-if conf_data.has('HAVE_LCMS')
+if conf_data.get('HAVE_LCMS', 0) == 1
xxd_sh = find_program('generate-ClayRGB1998-icc-h.sh', dirs : join_paths(meson.project_source_root(), 'scripts'))
ClayRGB1998_icc_h = custom_target('ClayRGB1998',
#include "metadata.h"
+#include <unistd.h>
+
#include <clocale>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#include <glib-object.h>
#include <config.h>
#include "layout-util.h"
#include "main-defines.h"
#include "misc.h"
+#include "options.h"
#include "rcfile.h"
#include "secure-save.h"
#include "ui-fileops.h"
#include "utilops.h"
+struct ExifData;
+
enum MetadataKey {
MK_NONE,
MK_KEYWORDS,
g_free(metadata_path);
}
-#ifdef HAVE_EXIV2
+#if HAVE_EXIV2
/* without exiv2: do not delete xmp metadata because we are not able to convert it,
just ignore it */
metadata_path = cache_find_location(CACHE_TYPE_XMP_METADATA, fd->path);
{
return g_list_append(nullptr, metadata_file_info(fd, key, format));
}
-#ifdef HAVE_LUA
+#if HAVE_LUA
else if (strncmp(key, "lua.", 4) == 0)
{
return g_list_append(nullptr, metadata_lua_info(fd, key, format));
#ifndef METADATA_H
#define METADATA_H
+#include <glib.h>
#include <gtk/gtk.h>
#include "typedefs.h"
#include "misc.h"
-#include <clocale>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <cerrno>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <memory>
+#include <langinfo.h>
+#include <pwd.h>
+
#include <config.h>
#include "debug.h"
#include "options.h"
#include "ui-fileops.h"
-#include <langinfo.h>
-#include <pwd.h>
-
gdouble get_zoom_increment()
{
return ((options->image.zoom_increment != 0) ? static_cast<gdouble>(options->image.zoom_increment) / 100.0 : 1.0);
*/
gint date_get_first_day_of_week()
{
-#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
+#if HAVE__NL_TIME_FIRST_WEEKDAY
return nl_langinfo(_NL_TIME_FIRST_WEEKDAY)[0];
#else
gchar *dot;
return sysconf(_SC_NPROCESSORS_ONLN);
}
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
void convert_gdkcolor_to_gdkrgba(gpointer data, GdkRGBA *gdk_rgba)
{
/* @FIXME GTK4 stub */
/* Copied from the libarchive .repo. examples */
-#ifndef HAVE_ARCHIVE
+#if !HAVE_ARCHIVE
gchar *open_archive(FileData *)
{
log_printf("%s", _("Warning: libarchive not installed"));
#ifndef MISC_H
#define MISC_H
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
#include <config.h>
void gq_gtk_grid_attach_default(GtkGrid *grid, GtkWidget *child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach);
void gq_gtk_grid_attach(GtkGrid *grid, GtkWidget *child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach, GtkAttachOptions, GtkAttachOptions, guint, guint);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
void convert_gdkcolor_to_gdkrgba(gpointer data, GdkRGBA *gdk_rgba);
#else
void convert_gdkcolor_to_gdkrgba(gpointer data, GdkRGBA *gdk_rgba);
#include "options.h"
-#include <config.h>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include "debug.h"
#include "histogram.h" /* HCHAN_RGB */
#ifndef OPTIONS_H
#define OPTIONS_H
+#include <cairo.h>
#include <gdk/gdk.h>
+#include <glib.h>
#include "typedefs.h"
#include "osd.h"
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
+
+#include <gdk/gdk.h>
+#include <glib-object.h>
+
#include <config.h>
#include "compat.h"
#include "glua.h"
#include "intl.h"
#include "metadata.h"
-#include "ui-fileops.h"
+#include "typedefs.h"
#include "ui-misc.h"
-#include <cmath>
-
static const gchar *predefined_tags[][2] = {
{"%name%", N_("Name")},
{"%path:60%", N_("Path")},
{
data = metadata_read_string(fd, RATING_KEY, METADATA_PLAIN);
}
-#ifdef HAVE_LUA
+#if HAVE_LUA
else if (strncmp(name, "lua/", 4) == 0)
{
gchar *tmp;
#ifndef OSD_H
#define OSD_H
+#include <glib.h>
#include <gtk/gtk.h>
struct FileData;
#include "pan-calendar.h"
#include <cmath>
+#include <cstring>
+#include <ctime>
#include "debug.h"
+#include "filedata.h"
#include "misc.h"
#include "pan-item.h"
+#include "pan-types.h"
#include "pan-util.h"
#include "pan-view-filter.h"
#include "pan-view.h"
#include "pixbuf-util.h"
+#include "typedefs.h"
#define PAN_CAL_POPUP_COLOR 220, 220, 220
enum {
#ifndef PAN_VIEW_PAN_CALENDAR_H
#define PAN_VIEW_PAN_CALENDAR_H
-#include "pan-types.h"
+#include <glib.h>
+
+struct FileData;
+struct PanItem;
+struct PanWindow;
void pan_calendar_update(PanWindow *pw, PanItem *pi_day);
void pan_calendar_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height);
#include <cmath>
+#include "filedata.h"
#include "pan-item.h"
+#include "pan-types.h"
#include "pan-util.h"
#include "pan-view-filter.h"
+#include "typedefs.h"
static void pan_flower_size(PanWindow *pw, gint *width, gint *height)
{
#ifndef PAN_VIEW_PAN_FOLDER_H
#define PAN_VIEW_PAN_FOLDER_H
-#include "pan-types.h"
+#include <glib.h>
+
+struct FileData;
+struct PanWindow;
void pan_flower_compute(PanWindow *pw, FileData *dir_fd,
gint *width, gint *height,
#include <cmath>
#include "pan-item.h"
+#include "pan-types.h"
#include "pan-util.h"
#include "pan-view-filter.h"
+#include "typedefs.h"
void pan_grid_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height)
{
#ifndef PAN_VIEW_PAN_GRID_H
#define PAN_VIEW_PAN_GRID_H
-#include "pan-types.h"
+#include <glib.h>
+
+struct FileData;
+struct PanWindow;
void pan_grid_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height);
#include "pan-item.h"
+#include <cstring>
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <pango/pango.h>
+
+#include "cache.h"
+#include "filedata.h"
#include "image.h"
+#include "pan-types.h"
#include "pixbuf-util.h"
#include "ui-misc.h"
#ifndef PAN_VIEW_PAN_ITEM_H
#define PAN_VIEW_PAN_ITEM_H
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib.h>
+
#include "pan-types.h"
-#include "pixbuf-renderer.h"
+
+struct FileData;
+struct PixbufRenderer;
void pan_item_free(PanItem *pi);
#include "pan-timeline.h"
+#include <ctime>
+
+#include "filedata.h"
#include "pan-item.h"
+#include "pan-types.h"
#include "pan-util.h"
#include "pan-view-filter.h"
#include "pan-view.h"
+#include "typedefs.h"
void pan_timeline_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height)
{
#ifndef PAN_VIEW_PAN_TIMELINE_H
#define PAN_VIEW_PAN_TIMELINE_H
-#include "pan-types.h"
+#include <glib.h>
+
+struct FileData;
+struct PanWindow;
void pan_timeline_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height);
#include "pan-util.h"
-#include <config.h>
+#include <features.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <cstring>
+
+#include "filedata.h"
#include "main-defines.h"
#include "ui-fileops.h"
#ifndef PAN_VIEW_PAN_UTIL_H
#define PAN_VIEW_PAN_UTIL_H
-#include "pan-types.h"
+#include <ctime>
+
+#include <glib.h>
+
+#include "typedefs.h"
+
+struct FileData;
enum PanDateLengthType {
PAN_DATE_LENGTH_EXACT,
#include "pan-view-filter.h"
-#include <config.h>
+#include <cstddef>
+
+#include <glib-object.h>
#include "compat.h"
+#include "filedata.h"
#include "image.h"
#include "intl.h"
#include "main-defines.h"
#include "metadata.h"
#include "misc.h"
+#include "pan-types.h"
#include "pan-view.h"
-#include "ui-fileops.h"
#include "ui-misc.h"
#include "ui-tabcomp.h"
#ifndef PAN_VIEW_PAN_VIEW_FILTER_H
#define PAN_VIEW_PAN_VIEW_FILTER_H
-#include "pan-types.h"
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include "typedefs.h"
+
+struct PanWindow;
enum PanViewFilterMode {
PAN_VIEW_FILTER_REQUIRE,
#include "pan-view-search.h"
-#include <config.h>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#include <glib-object.h>
#include "compat.h"
+#include "filedata.h"
#include "image.h"
#include "intl.h"
#include "main-defines.h"
#include "misc.h"
#include "pan-calendar.h"
#include "pan-item.h"
+#include "pan-types.h"
#include "pan-util.h"
#include "pan-view.h"
#include "ui-misc.h"
#ifndef PAN_VIEW_PAN_VIEW_SEARCH_H
#define PAN_VIEW_PAN_VIEW_SEARCH_H
-#include "pan-types.h"
+#include <glib.h>
+#include <gtk/gtk.h>
+
+struct PanViewSearchUi;
+struct PanWindow;
void pan_search_toggle_visible(PanWindow *pw, gboolean enable);
void pan_search_activate(PanWindow *pw);
#include "pan-view.h"
-#include <config.h>
+#include <cmath>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
#include "bar-exif.h"
+#include "cache-loader.h"
+#include "cache.h"
#include "compat.h"
#include "debug.h"
#include "dnd.h"
#include "editors.h"
#include "exif.h"
+#include "filedata.h"
#include "fullscreen.h"
+#include "image-load.h"
#include "image.h"
#include "img-view.h"
#include "intl.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "main.h"
#include "menu.h"
#include "metadata.h"
#include "misc.h"
+#include "options.h"
#include "pan-calendar.h"
#include "pan-folder.h"
#include "pan-grid.h"
#include "pan-item.h"
#include "pan-timeline.h"
+#include "pan-types.h"
#include "pan-util.h"
#include "pan-view-filter.h"
#include "pan-view-search.h"
#include "ui-menu.h"
#include "ui-misc.h"
#include "ui-tabcomp.h"
+#include "ui-utildlg.h"
#include "uri-utils.h"
#include "utilops.h"
#include "window.h"
-#include <cmath>
-
enum {
PAN_WINDOW_DEFAULT_WIDTH = 720,
#ifndef PAN_VIEW_PAN_VIEW_H
#define PAN_VIEW_PAN_VIEW_H
-#include "pan-types.h"
+#include <glib.h>
+
+#include "typedefs.h"
+
+struct PanItem;
+struct PanWindow;
void pan_layout_update(PanWindow *pw);
GList *pan_layout_intersect(PanWindow *pw, gint x, gint y, gint width, gint height);
#include <cstdlib>
#include <cstring>
-#include <config.h>
-
#include "debug.h"
#include "main-defines.h"
#include "options.h"
#ifndef PIXBUF_RENDERER_H
#define PIXBUF_RENDERER_H
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
#include <gtk/gtk.h>
#include "typedefs.h"
+struct PixbufRenderer;
+
#define TYPE_PIXBUF_RENDERER (pixbuf_renderer_get_type())
#define PIXBUF_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_PIXBUF_RENDERER, PixbufRenderer))
#define PIXBUF_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_PIXBUF_RENDERER, PixbufRendererClass))
#define ROUND_DOWN(A,B) ((gint)(((A))/(B))*(B))
-struct RendererFuncs;
-
-struct PixbufRenderer;
-struct PixbufRendererClass;
-
-
using PixbufRendererTileRequestFunc = gint (*)(PixbufRenderer *, gint, gint, gint, gint, GdkPixbuf *, gpointer);
using PixbufRendererTileDisposeFunc = void (*)(PixbufRenderer *, gint, gint, gint, gint, GdkPixbuf *, gpointer);
#include "pixbuf-util.h"
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
+
+#include <cairo.h>
+#include <gio/gio.h>
+#include <glib-object.h>
+#include <pango/pangocairo.h>
+
#include <config.h>
#include "debug.h"
#include "exif.h"
#include "filedata.h"
#include "main-defines.h"
+#include "typedefs.h"
#include "ui-fileops.h"
-#include <cmath>
-
/*
*-----------------------------------------------------------------------------
#ifndef PIXBUF_UTIL_H
#define PIXBUF_UTIL_H
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib.h>
#include <gtk/gtk.h>
+#include <pango/pango.h>
struct FileData;
#include <config.h>
+#include <cstdlib>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <gio/gio.h>
+#include <glib-object.h>
+
+#if HAVE_SPELL
+#include <gspell/gspell.h>
+#endif
+
+#if HAVE_LCMS
+#if HAVE_LCMS2
+#include <lcms2.h>
+#else
+#include <lcms.h>
+#endif
+#endif
+
+#include <pango/pango.h>
+
#include "bar-keywords.h"
#include "cache.h"
#include "color-man.h"
#include "img-view.h"
#include "intl.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "main.h"
#include "metadata.h"
#include "misc.h"
+#include "options.h"
#include "osd.h"
#include "pixbuf-util.h"
#include "rcfile.h"
#include "slideshow.h"
#include "toolbar.h"
#include "trash.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "ui-misc.h"
#include "ui-tabcomp.h"
+#include "ui-utildlg.h"
#include "utilops.h"
#include "window.h"
#include "zonedetect.h"
-#ifdef HAVE_LCMS
-#ifdef HAVE_LCMS2
-#include <lcms2.h>
-#else
-#include <lcms.h>
-#endif
-#endif
-
-#ifdef HAVE_SPELL
-#include <gspell/gspell.h>
-#endif
+struct ZoneDetect;
enum {
EDITOR_NAME_MAX_LENGTH = 32,
static void config_window_apply()
{
gboolean refresh = FALSE;
-#ifdef HAVE_LCMS2
+#if HAVE_LCMS2
int i = 0;
#endif
config_entry_to_option(log_window_f1_entry, &options->log_window.action, nullptr);
#endif
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
for (i = 0; i < COLOR_PROFILE_INPUTS; i++)
{
config_entry_to_option(color_profile_input_name_entry[i], &options->color_profile.input_name[i], nullptr);
options->thumbnails.collection_preview, &c_options->thumbnails.collection_preview);
gtk_widget_set_tooltip_text(spin, _("The maximum number of thumbnails shown in a Collection preview montage"));
-#ifdef HAVE_FFMPEGTHUMBNAILER_METADATA
+#if HAVE_FFMPEGTHUMBNAILER_METADATA
pref_checkbox_new_int(group, _("Use embedded metadata in video files as thumbnails when available"),
options->thumbnails.use_ft_metadata, &c_options->thumbnails.use_ft_metadata);
#endif
group = pref_group_new(vbox, FALSE, _("Metadata writing sequence"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
label = pref_label_new(group, _("Warning: Geeqie is built without Exiv2. Some options are disabled."));
#endif
label = pref_label_new(group, _("When writing metadata, Geeqie will follow these steps, if selected. This process will stop when the first successful write occurs."));
gtk_widget_set_tooltip_markup(ct_button, markup);
g_free(markup);
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
gtk_widget_set_sensitive(ct_button, FALSE);
#endif
pref_spacer(group, PREF_PAD_GROUP);
group = pref_group_new(vbox, FALSE, _("Step 1 Options:"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
gtk_widget_set_sensitive(group, FALSE);
#endif
pref_spacer(group, PREF_PAD_GROUP);
group = pref_group_new(vbox, FALSE, _("Steps 2 and 3 Option:"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
gtk_widget_set_sensitive(group, FALSE);
#endif
ct_button = pref_checkbox_new_int(group, _("Write altered image orientation to the metadata"), options->metadata.write_orientation, &c_options->metadata.write_orientation);
gtk_widget_set_tooltip_text(ct_button, _("If checked, the results of orientation commands (Rotate, Mirror and Flip) issued on an image will be written to metadata\nNote: If this option is not checked, the results of orientation commands will be lost when Geeqie closes"));
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
gtk_widget_set_sensitive(ct_button, FALSE);
#endif
pref_spacer(group, PREF_PAD_GROUP);
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
group = pref_group_new(vbox, FALSE, _("Spelling checks"), GTK_ORIENTATION_VERTICAL);
ct_button = pref_checkbox_new_int(group, _("Check spelling - Requires restart"), options->metadata.check_spelling, &c_options->metadata.check_spelling);
GtkTextIter iter;
GtkTextBuffer *buffer;
gchar *tmp;
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
GspellTextView *gspell_view;
#endif
gq_gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0);
gtk_widget_show(scrolled);
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
if (options->metadata.check_spelling)
{
gspell_view = gspell_text_view_get_from_gtk_text_view(GTK_TEXT_VIEW(keyword_text));
}
/* metadata tab */
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
static void intent_menu_cb(GtkWidget *combo, gpointer data)
{
auto option = static_cast<gint *>(data);
vbox = scrolled_notebook_page(notebook, _("Color management"));
group = pref_group_new(vbox, FALSE, _("Input profiles"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_LCMS
+#if !HAVE_LCMS
gtk_widget_set_sensitive(pref_group_parent(group), FALSE);
#endif
}
group = pref_group_new(vbox, FALSE, _("Screen profile"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_LCMS
+#if !HAVE_LCMS
gtk_widget_set_sensitive(pref_group_parent(group), FALSE);
#endif
pref_checkbox_new_int(group, _("Use system screen profile if available"),
options->color_profile.screen_file, nullptr, ".icc", "ICC Files", nullptr);
tab_completion_add_select_button(color_profile_screen_file_entry, _("Select color profile"), FALSE);
gtk_widget_set_size_request(color_profile_screen_file_entry, 160, -1);
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
add_intent_menu(table, 0, 1, _("Render Intent:"), options->color_profile.render_intent, &c_options->color_profile.render_intent);
#endif
gq_gtk_grid_attach(GTK_GRID(table), tabcomp, 1, 2, 0, 1, static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
#ifndef PREFERENCES_H
#define PREFERENCES_H
+#include <glib.h>
#include <gtk/gtk.h>
struct LayoutWindow;
#include "print.h"
-#include <config.h>
+#include <cstddef>
+
+#include <cairo.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <pango/pango.h>
+#include <pango/pangocairo.h>
#include "compat.h"
#include "debug.h"
#ifndef PRINT_H
#define PRINT_H
+#include <glib.h>
#include <gtk/gtk.h>
struct FileData;
#include "rcfile.h"
+#include <cstdlib>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gtk/gtk.h>
+
#include <config.h>
#include "bar-comment.h"
#include "filefilter.h"
#include "intl.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "metadata.h"
+#include "options.h"
#include "pixbuf-renderer.h"
#include "secure-save.h"
#include "slideshow.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "ui-utildlg.h"
static void write_color_profile(GString *outstr, gint indent)
{
gint i;
-#ifndef HAVE_LCMS
+#if !HAVE_LCMS
g_string_append_printf(outstr, "<!-- NOTICE: %s was not built with support for color profiles,\n"
" color profile options will have no effect.\n-->\n", GQ_APPNAME);
#endif
static void options_parse_global_end(GQParserData *, GMarkupParseContext *, const gchar *, gpointer, GError **)
{
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
/* some options do not work without exiv2 */
options->metadata.save_in_image_file = FALSE;
options->metadata.save_legacy_format = TRUE;
}
options_parse_func_push(parser_data, options_parse_leaf, nullptr, nullptr);
}
-#ifdef HAVE_LIBCHAMPLAIN
-#ifdef HAVE_LIBCHAMPLAIN_GTK
+#if HAVE_LIBCHAMPLAIN
+#if HAVE_LIBCHAMPLAIN_GTK
else if (g_ascii_strcasecmp(element_name, "pane_gps") == 0)
{
/* Use this flag to determine if --disable-clutter has been issued */
#ifndef RCFILE_H
#define RCFILE_H
-#include "options.h"
+#include <gdk/gdk.h>
+#include <glib.h>
+struct ConfOptions;
+struct GQParserData;
struct LayoutWindow;
void write_indent(GString *str, gint indent);
#define READ_DUMMY(_target_, _name_, _msg_) read_dummy_option(option, #_name_, _msg_)
-struct GQParserFuncData;
-struct GQParserData;
using GQParserStartFunc = void (*)(GQParserData *, GMarkupParseContext *, const gchar *, const gchar **, const gchar **, gpointer, GError **);
using GQParserEndFunc = void (*)(GQParserData *, GMarkupParseContext *, const gchar *, gpointer, GError **);
#include "remote.h"
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/un.h>
+#include <unistd.h>
+
+#include <cerrno>
+#include <csignal>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
#include <config.h>
+#include <gtk/gtk.h>
+
#include "cache-maint.h"
#include "collect-io.h"
#include "collect.h"
#include "exif.h"
#include "filedata.h"
#include "filefilter.h"
+#include "glua.h"
#include "image.h"
#include "img-view.h"
#include "intl.h"
#include "layout-image.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "main.h"
#include "misc.h"
+#include "options.h"
#include "pixbuf-renderer.h"
#include "rcfile.h"
#include "slideshow.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "ui-misc.h"
#include "utilops.h"
#include "view-file.h"
-#include <csignal>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include "glua.h"
-
enum {
SERVER_MAX_CLIENTS = 8
};
g_io_channel_write_chars(channel, "<gq_end_of_command>", -1, nullptr, nullptr);
}
-#ifdef HAVE_LUA
+#if HAVE_LUA
static void gr_lua(const gchar *text, GIOChannel *channel, gpointer)
{
gchar *result = nullptr;
{ nullptr, "--last", gr_image_last, FALSE, FALSE, nullptr, N_("last image") },
{ nullptr, "--list-add:", gr_list_add, TRUE, FALSE, N_("<FILE>"), N_("add FILE to command line collection list") },
{ nullptr, "--list-clear", gr_list_clear, FALSE, FALSE, nullptr, N_("clear command line collection list") },
-#ifdef HAVE_LUA
+#if HAVE_LUA
{ nullptr, "--lua:", gr_lua, TRUE, FALSE, N_("<FILE>,<lua script>"), N_("run lua script on FILE") },
#endif
{ nullptr, "--new-window", gr_new_window, FALSE, FALSE, nullptr, N_("new window") },
#include <cstdlib>
#include <cstring>
-#include <config.h>
+#include <cairo.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
#include "debug.h"
#include "options.h"
+#include "pixbuf-renderer.h"
+#include "typedefs.h"
/* comment this out if not using this from within Geeqie
* defining GQ_BUILD does these things:
#ifndef RENDERER_TILES_H
#define RENDERER_TILES_H
-#include <pixbuf-renderer.h>
-
+struct PixbufRenderer;
+struct RendererFuncs;
RendererFuncs *renderer_tiles_new(PixbufRenderer *pr);
#include "search-and-run.h"
-#include <config.h>
+#include <cstddef>
+
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <pango/pango.h>
#include "compat.h"
#include "debug.h"
#include "layout.h"
#include "main-defines.h"
-#include "ui-misc.h"
-#include "window.h"
enum {
SAR_LABEL,
#include "search.h"
-#include <config.h>
+#include <sys/types.h>
+
+#include <cmath>
+#include <cstdio>
+#include <cstring>
+#include <ctime>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
#include "bar-keywords.h"
#include "cache.h"
#include "collect-table.h"
+#include "collect.h"
#include "compat.h"
#include "debug.h"
#include "dnd.h"
#include "img-view.h"
#include "intl.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
#include "menu.h"
#include "metadata.h"
#include "misc.h"
-#include "pixbuf-util.h"
+#include "options.h"
#include "print.h"
+#include "similar.h"
#include "thumb.h"
+#include "typedefs.h"
#include "ui-bookmark.h"
#include "ui-fileops.h"
#include "ui-menu.h"
#include "ui-misc.h"
#include "ui-tabcomp.h"
#include "ui-tree-edit.h"
+#include "ui-utildlg.h"
#include "uri-utils.h"
#include "utilops.h"
#include "window.h"
-#include <cmath>
-
enum {
DEF_SEARCH_WIDTH = 700,
DEF_SEARCH_HEIGHT = 650
#include "secure-save.h"
+#include <cerrno>
+#include <cstdarg>
#include <memory>
-#include <glib/gprintf.h>
#include <sys/stat.h>
+#include <unistd.h>
#include <utime.h>
+#include <glib/gprintf.h>
+
#include <config.h>
#include "debug.h"
/* Not a regular file, secure_save is disabled. */
ssi->secure_save = FALSE;
} else {
-#ifdef HAVE_ACCESS
+#if HAVE_ACCESS
/* XXX: access() do not work with setuid programs. */
if (access(ssi->file_name, R_OK | W_OK) < 0) {
ssi->err = errno;
if (ssi->secure_save) {
gboolean fail = FALSE;
-#ifdef HAVE_FFLUSH
+#if HAVE_FFLUSH
fail = (fflush(ssi->fp) == EOF);
#endif
-#ifdef HAVE_FSYNC
+#if HAVE_FSYNC
if (!fail) fail = fsync(fileno(ssi->fp));
#endif
#include "shortcuts.h"
-#include <config.h>
+#include <glib-object.h>
+#include <glib.h>
#include "collect.h"
#include "compat.h"
#include "ui-bookmark.h"
#include "ui-fileops.h"
#include "ui-misc.h"
+#include "ui-utildlg.h"
#include "utilops.h"
struct ShortcutsData
#include "similar.h"
-#include <config.h>
+#include <cstdlib>
#include "options.h"
#define SIMILAR_H
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib.h>
struct ImageSimilarityData
{
#include "slideshow.h"
-#include <config.h>
+#include <cstdlib>
#include "collect.h"
#include "filedata.h"
#include "image.h"
#include "layout-image.h"
#include "layout.h"
+#include "options.h"
static void slideshow_timer_stop(SlideShowData *ss);
#include "thumb-standard.h"
+#include <sys/stat.h>
+
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#include <glib-object.h>
+
#include <config.h>
#include "cache.h"
#include "metadata.h"
#include "options.h"
#include "pixbuf-util.h"
+#include "typedefs.h"
#include "ui-fileops.h"
+struct ExifData;
/**
* @file
#ifndef THUMB_STANDARD_H
#define THUMB_STANDARD_H
+#include <sys/types.h>
+
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib.h>
+
+#include <config.h>
#include "main-defines.h"
#include "thumb.h"
-#include <config.h>
+#include <sys/types.h>
+#include <utime.h>
+
+#include <cstdio>
+#include <cstring>
+
+#include <glib-object.h>
#include "cache.h"
#include "debug.h"
#include "thumb-standard.h"
#include "ui-fileops.h"
-#include <utime.h>
-
static void thumb_loader_error_cb(ImageLoader *il, gpointer data);
static void thumb_loader_setup(ThumbLoader *tl, FileData *fd);
#define THUMB_H
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib.h>
#include "typedefs.h"
#include "toolbar.h"
+#include <cstddef>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <glib.h>
+
#include <config.h>
#include "compat.h"
#include "editors.h"
#include "intl.h"
#include "layout-util.h"
+#include "layout.h"
#include "main-defines.h"
-#include "pixbuf-util.h"
#include "ui-fileops.h"
#include "ui-menu.h"
#include "ui-misc.h"
toolbar_entry->name = g_strdup(name);
toolbar_entry->stock_id = g_strdup(stock_id);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
gesture = gtk_gesture_click_new();
gtk_widget_add_controller(toolbar_entry->button, GTK_EVENT_CONTROLLER(gesture));
#else
#include "trash.h"
-#include <config.h>
+#include <unistd.h>
-#include "utilops.h"
-#include "window.h"
+#include <cstdlib>
+
+#include <gio/gio.h>
#include "debug.h"
#include "editors.h"
#include "intl.h"
#include "main-defines.h"
#include "options.h"
+#include "typedefs.h"
#include "ui-fileops.h"
+#include "ui-utildlg.h"
+#include "utilops.h"
+#include "window.h"
/*
*--------------------------------------------------------------------------
#include "ui-bookmark.h"
+#include <cstdlib>
#include <cstring>
#include <memory>
-#include <config.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <pango/pango.h>
#include "compat.h"
#include "debug.h"
#ifndef UI_BOOKMARK_H
#define UI_BOOKMARK_H
+#include <glib.h>
#include <gtk/gtk.h>
/* bookmarks */
#include "ui-fileops.h"
+#include <sys/stat.h>
+#include <unistd.h>
+#include <utime.h>
+
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <memory>
-#include <unistd.h>
-#include <utime.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
#include <config.h>
#include "layout.h"
#include "main-defines.h"
#include "md5-util.h"
+#include "options.h"
#include "secure-save.h"
+#include "typedefs.h"
+#include "ui-utildlg.h"
#include "utilops.h"
/*
#ifndef UI_FILEOPS_H
#define UI_FILEOPS_H
-#include <sys/stat.h>
-#include <sys/time.h>
#include <sys/types.h>
-#include <time.h>
+
+#include <ctime>
#include <gio/gio.h>
+#include <glib.h>
#include <config.h>
+#ifdef DEBUG
+#define GQ_DEBUG_PATH_UTF8 1
+#endif
+
void print_term(gboolean err, const gchar *text_utf8);
#define printf_term(err, ...) \
#include <cstdio>
#include <cstring>
-#include <config.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
#include "compat.h"
#include "debug.h"
#ifndef UI_HELP_H
#define UI_HELP_H
+#include <glib.h>
#include <gtk/gtk.h>
GtkWidget *help_window_new(const gchar *title,
#include "ui-menu.h"
-#include <config.h>
+#include <cstddef>
+
+#include <pango/pango.h>
#include "layout.h"
#ifndef UI_MENU_H
#define UI_MENU_H
-
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
#include <gtk/gtk.h>
/**
#include "ui-misc.h"
+#include <langinfo.h>
+
#include <cstdlib>
#include <cstring>
+#include <pango/pango.h>
+
#include <config.h>
#include "compat.h"
#include "layout.h"
#include "main-defines.h"
#include "misc.h"
+#include "options.h"
+#include "typedefs.h"
#include "utilops.h"
-#include <langinfo.h>
-
/*
*-----------------------------------------------------------------------------
* widget and layout utilities
GCallback func, gpointer data)
{
GtkWidget *button;
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
GtkToggleButton *group;;
#else
GSList *group;
if (sibling)
{
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
group = sibling;
#else
group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(sibling));
if (mnemonic_text)
{
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
button = gtk_toggle_button_new_with_mnemonic(text);
gtk_toggle_button_set_group(button, group);
#else
}
else
{
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
button = gtk_toggle_button_new_with_label(text);
gtk_toggle_button_set_group(button, group);
#else
gtk_widget_show(ds->calendar);
date = date_selection_get(ds->box);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
gtk_calendar_select_day(GTK_CALENDAR(ds->calendar), date);
#else
gtk_calendar_select_month(GTK_CALENDAR(ds->calendar), g_date_time_get_month(date), g_date_time_get_year(date));
#ifndef UI_MISC_H
#define UI_MISC_H
+#include <ctime>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <time.h>
-
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
#include <gtk/gtk.h>
/* these values are per GNOME HIG */
#include <dirent.h>
#include <sys/stat.h>
-#include <sys/types.h>
-#include <config.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
#include "compat.h"
#include "debug.h"
#include "main-defines.h"
#include "misc.h"
#include "options.h"
+#include "typedefs.h"
#include "ui-bookmark.h"
#include "ui-fileops.h"
#include "ui-menu.h"
#include "ui-misc.h"
#include "ui-tabcomp.h"
#include "ui-tree-edit.h"
+#include "ui-utildlg.h"
#include "uri-utils.h"
#include "utilops.h"
#ifndef UI_PATHSEL_H
#define UI_PATHSEL_H
-
+#include <glib.h>
#include <gtk/gtk.h>
GtkWidget *path_selection_new_with_files(GtkWidget *entry, const gchar *path,
#include "ui-tabcomp.h"
-#include <cstring>
#include <dirent.h>
-#include <sys/types.h>
-#include <config.h>
+#include <cstring>
+
+#include <gdk/gdk.h>
+#include <glib-object.h>
#include "compat.h"
#include "debug.h"
#ifndef UI_TABCOMP_H
#define UI_TABCOMP_H
+#include <glib.h>
#include <gtk/gtk.h>
GtkWidget *tab_completion_new_with_history(GtkWidget **entry, const gchar *text,
#include <cstring>
-#include <config.h>
+#include <glib-object.h>
#include "compat.h"
#include "misc.h"
#ifndef UI_TREE_EDIT_H
#define UI_TREE_EDIT_H
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
struct TreeEditData
#include "ui-utildlg.h"
+#include <cstdint>
+#include <cstdio>
#include <cstring>
+#include <ctime>
+
+#include <gdk/gdk.h>
+#include <gio/gio.h>
+#include <glib-object.h>
#include <config.h>
#include "intl.h"
#include "main-defines.h"
#include "misc.h"
+#include "options.h"
#include "rcfile.h"
#include "ui-fileops.h"
#include "ui-misc.h"
#ifndef UI_UTILDLG_H
#define UI_UTILDLG_H
+#include <glib.h>
#include <gtk/gtk.h>
struct FileData;
-#define GENERIC_DIALOG(gd) ((GenericDialog *)gd)
-
struct GenericDialog
{
GtkWidget *dialog; /**< window */
};
+#define GENERIC_DIALOG(gd) ((GenericDialog *)gd)
+
struct FileDialog
{
GenericDialog gd;
#include "uri-utils.h"
-#include <config.h>
-
#include "debug.h"
#include "filedata.h"
#include "intl.h"
#ifndef URI_UTILS_H
#define URI_UTILS_H
+#include <glib.h>
#include <gtk/gtk.h>
void warning_dialog_dnd_uri_error(GList *uri_error_list);
#include "utilops.h"
+#include <unistd.h>
+
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+
#include <config.h>
#include "cache.h"
#include "filefilter.h"
#include "image.h"
#include "intl.h"
+#include "main-defines.h"
#include "metadata.h"
#include "misc.h"
#include "options.h"
#include "ui-bookmark.h"
#include "ui-fileops.h"
#include "ui-misc.h"
+#include "ui-utildlg.h"
namespace
{
GdkPixbuf *apply;
};
-GdkPixbuf *file_util_get_error_icon(FileData *fd, GList *list, GtkWidget *widget)
+GdkPixbuf *file_util_get_error_icon(FileData *fd, GList *list, GtkWidget *)
{
- static PixmapErrors pe = [widget]() -> PixmapErrors
+ static PixmapErrors pe = []() -> PixmapErrors
{
GtkIconTheme *icon_theme = gtk_icon_theme_get_default();
*
*
*/
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
static void clipboard_get_func(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer data)
{
/* @FIXME GTK4 stub */
#ifndef UTILOPS_H
#define UTILOPS_H
+#include <glib.h>
+#include <gtk/gtk.h>
+
#include "typedefs.h"
-#include "ui-utildlg.h"
struct FileData;
+struct FileDialog;
+struct GenericDialog;
void file_maint_renamed(FileData *fd);
void file_maint_moved(FileData *fd, GList *ignore_list);
#include "view-dir-list.h"
-#include <config.h>
+#include <unistd.h>
+
+#include <cstdlib>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
#include "filedata.h"
#include "layout.h"
+#include "options.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "ui-tree-edit.h"
#include "view-dir.h"
#ifndef VIEW_DIR_LIST_H
#define VIEW_DIR_LIST_H
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
struct FileData;
#include "view-dir-tree.h"
-#include <config.h>
+#include <unistd.h>
+
+#include <cstdlib>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
#include "debug.h"
#include "filedata.h"
#include "layout.h"
+#include "options.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "ui-tree-edit.h"
#include "view-dir.h"
#ifndef VIEW_DIR_TREE_H
#define VIEW_DIR_TREE_H
+#include <ctime>
+
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
struct FileData;
#include "view-dir.h"
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <cstring>
+
+#include <glib-object.h>
+
#include <config.h>
#include "compat.h"
#include "layout.h"
#include "main-defines.h"
#include "menu.h"
+#include "options.h"
#include "ui-fileops.h"
#include "ui-menu.h"
#include "ui-misc.h"
static GdkRGBA color;
static GtkWidget *done = nullptr;
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
/* @FIXME GTK4 no background color */
#else
if (done != widget)
#ifndef VIEW_DIR_H
#define VIEW_DIR_H
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
#include "typedefs.h"
#ifndef VIEW_FILE_H
#define VIEW_FILE_H
+#include <ctime>
+
+#include <glib.h>
#include <gtk/gtk.h>
#include "typedefs.h"
#include "view-file-icon.h"
-#include <config.h>
+#include <cstring>
+
+#include <glib-object.h>
#include "cellrenderericon.h"
#include "collect.h"
#include "compat.h"
#include "debug.h"
#include "dnd.h"
+#include "filedata.h"
#include "img-view.h"
#include "intl.h"
#include "layout-image.h"
#ifndef VIEW_FILE_VIEW_FILE_ICON_H
#define VIEW_FILE_VIEW_FILE_ICON_H
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
-#include "filedata.h"
+#include "typedefs.h"
+struct FileData;
struct ViewFile;
gboolean vficon_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
#include "view-file-list.h"
-#include <config.h>
+#include <cstring>
+#include <vector>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
#include "collect.h"
#include "debug.h"
#include "dnd.h"
+#include "filedata.h"
#include "img-view.h"
#include "intl.h"
#include "layout-image.h"
#include "main-defines.h"
#include "metadata.h"
#include "misc.h"
+#include "options.h"
#include "ui-fileops.h"
#include "ui-misc.h"
#include "ui-tree-edit.h"
#include "utilops.h"
#include "view-file.h"
-#include <vector>
-
/* Index to tree store */
enum {
FILE_COLUMN_POINTER = 0,
#ifndef VIEW_FILE_VIEW_FILE_LIST_H
#define VIEW_FILE_VIEW_FILE_LIST_H
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
-#include "filedata.h"
+#include "typedefs.h"
+struct FileData;
struct ViewFile;
gboolean vflist_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
#include "view-file.h"
-#include <config.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
#include "compat.h"
#include "debug.h"
#include "dupe.h"
+#include "filedata.h"
#include "history-list.h"
#include "intl.h"
#include "layout.h"
#include "main.h"
#include "menu.h"
#include "misc.h"
-#include "pixbuf-util.h"
+#include "options.h"
#include "thumb.h"
#include "ui-fileops.h"
#include "ui-menu.h"
#include "ui-misc.h"
+#include "ui-utildlg.h"
#include "utilops.h"
#include "view-file/view-file-icon.h"
#include "view-file/view-file-list.h"
#include "window.h"
+#include <cstdio>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+
#include <config.h>
#include "debug.h"
gchar *title;
GtkWidget *window;
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
window = gtk_window_new();
#else
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
#ifndef WINDOW_H
#define WINDOW_H
+#include <glib.h>
#include <gtk/gtk.h>
GtkWidget *window_new(const gchar *role, const gchar *icon,