*-------------------------------------------------------------------
*/
-typedef struct _ExifWin ExifWin;
-struct _ExifWin
+struct ExifWin
{
GtkWidget *window;
GtkWidget *vbox;
-typedef struct _PaneCommentData PaneCommentData;
-struct _PaneCommentData
+struct PaneCommentData
{
PaneData pane;
GtkWidget *widget;
*-------------------------------------------------------------------
*/
-typedef struct _ExifEntry ExifEntry;
-typedef struct _PaneExifData PaneExifData;
+struct PaneExifData;
-struct _ExifEntry
+struct ExifEntry
{
GtkWidget *ebox;
GtkWidget *box;
};
-struct _PaneExifData
+struct PaneExifData
{
PaneData pane;
GtkWidget *vbox;
FileData *fd;
};
-typedef struct _ConfDialogData ConfDialogData;
-struct _ConfDialogData
+struct ConfDialogData
{
GtkWidget *widget; /* pane or entry, devidet by presenceof "pane_data" or "entry_data" */
-typedef struct _PaneHistogramData PaneHistogramData;
-struct _PaneHistogramData
+struct PaneHistogramData
{
PaneData pane;
GtkWidget *widget;
static GType filter_keyword_column_types[] = {G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN};
-typedef struct _PaneKeywordsData PaneKeywordsData;
-struct _PaneKeywordsData
+struct PaneKeywordsData
{
PaneData pane;
GtkWidget *widget;
GtkWidget *autocomplete;
};
-typedef struct _ConfDialogData ConfDialogData;
-struct _ConfDialogData
+struct ConfDialogData
{
PaneKeywordsData *pkd;
GtkTreePath *click_tpath;
* 1 to 5 Rating value
*/
-typedef struct _PaneRatingData PaneRatingData;
-struct _PaneRatingData
+struct PaneRatingData
{
PaneData pane;
GtkWidget *widget;
*-------------------------------------------------------------------
*/
-typedef struct _SortData SortData;
-struct _SortData
+struct SortData
{
GtkWidget *vbox;
GtkWidget *bookmarks;
/**
* @brief Sets the bar_sort_enabled flag
- * @param lw
- * @param attribute_names
- * @param attribute_values
- *
+ * @param lw
+ * @param attribute_names
+ * @param attribute_values
+ *
* Called from rcfile when processing geeqierc.xml on start-up.
* It is necessary to set the bar_sort_enabled flag because
* the sort manager and desktop files are set up in the idle loop, and
#include "ui-menu.h"
#include "ui-misc.h"
-typedef struct _KnownPanes KnownPanes;
-struct _KnownPanes
+struct KnownPanes
{
PaneType type;
const gchar *id;
{PANE_UNDEF, nullptr, nullptr, nullptr}
};
-typedef struct _BarData BarData;
-struct _BarData
+struct BarData
{
GtkWidget *widget;
GtkWidget *vbox;
#ifndef BAR_H
#define BAR_H
-typedef enum {
+enum PaneType {
PANE_UNDEF = 0,
PANE_COMMENT,
PANE_EXIF,
PANE_KEYWORDS,
PANE_GPS,
PANE_RATING
-} PaneType;
-
-typedef struct _PaneData PaneData;
+};
-struct _PaneData {
+struct PaneData {
void (*pane_set_fd)(GtkWidget *pane, FileData *fd); /**< filled in by pane */
void (*pane_notify_selection)(GtkWidget *pane, gint count); /**< filled in by pane */
gint (*pane_event)(GtkWidget *pane, GdkEvent *event); /**< filled in by pane */
#include "image-load.h"
-typedef struct _CacheLoader CacheLoader;
+struct CacheLoader;
-typedef void (* CacheLoaderDoneFunc)(CacheLoader *cl, gint error, gpointer data);
+using CacheLoaderDoneFunc = void (*)(CacheLoader *, gint, gpointer);
-typedef enum {
- CACHE_LOADER_NONE = 0,
- CACHE_LOADER_DIMENSIONS = 1 << 0,
- CACHE_LOADER_DATE = 1 << 1,
- CACHE_LOADER_MD5SUM = 1 << 2,
- CACHE_LOADER_SIMILARITY = 1 << 3
-} CacheDataType;
+enum CacheDataType {
+ CACHE_LOADER_NONE = 0,
+ CACHE_LOADER_DIMENSIONS = 1 << 0,
+ CACHE_LOADER_DATE = 1 << 1,
+ CACHE_LOADER_MD5SUM = 1 << 2,
+ CACHE_LOADER_SIMILARITY = 1 << 3
+};
-struct _CacheLoader {
+struct CacheLoader {
FileData *fd;
CacheData *cd;
#include "window.h"
-typedef struct _CMData CMData;
-struct _CMData
+struct CMData
{
GList *list;
GList *done_list;
* @param metadata TRUE - work on metadata cache, FALSE - work on thumbnail cache
* @param clear TRUE - clear cache, FALSE - delete orphaned cached items
* @param func Function called when idle loop function terminates
- *
- *
+ *
+ *
*/
void cache_maintain_home_remote(gboolean metadata, gboolean clear, GDestroyNotify *func)
{
*-------------------------------------------------------------------
*/
-typedef struct _CacheManager CacheManager;
-struct _CacheManager
+struct CacheManager
{
GenericDialog *dialog;
GtkWidget *folder_entry;
gint count_done;
};
-typedef struct _CacheOpsData CacheOpsData;
-struct _CacheOpsData
+struct CacheOpsData
{
GenericDialog *gd;
ThumbLoaderStd *tl;
/**
* @brief Create thumbnails
* @param path Path to image folder
- * @param recurse
+ * @param recurse
* @param local Create thumbnails in same folder as images
* @param func Function called when idle loop function terminates
- *
- *
+ *
+ *
*/
void cache_manager_render_remote(const gchar *path, gboolean recurse, gboolean local, GDestroyNotify *func)
{
/**
* @brief Generate .sim files
* @param path Path to image folder
- * @param recurse
+ * @param recurse
* @param func Function called when idle loop function terminates
- *
- *
+ *
+ *
*/
void cache_manager_sim_remote(const gchar *path, gboolean recurse, GDestroyNotify *func)
{
#define GQ_CACHE_EXT_XMP_METADATA ".gq.xmp"
-typedef enum {
+enum CacheType {
CACHE_TYPE_THUMB,
CACHE_TYPE_SIM,
CACHE_TYPE_METADATA,
CACHE_TYPE_XMP_METADATA
-} CacheType;
+};
-typedef struct _CacheData CacheData;
-struct _CacheData
+struct CacheData
{
gchar *path;
gint width;
#define GQV_IS_CELL_RENDERER_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GQV_TYPE_CELL_RENDERER_ICON))
#define GQV_CELL_RENDERER_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GQV_TYPE_CELL_RENDERER_ICON, GQvCellRendererIconClass))
-typedef struct _GQvCellRendererIcon GQvCellRendererIcon;
-typedef struct _GQvCellRendererIconClass GQvCellRendererIconClass;
-
-struct _GQvCellRendererIcon
+struct GQvCellRendererIcon
{
GtkCellRenderer parent;
};
-struct _GQvCellRendererIconClass
+struct GQvCellRendererIconClass
{
GtkCellRendererClass parent_class;
#define GQ_COLLECTION_FAIL_PERCENT 98
#define GQ_COLLECTION_READ_BUFSIZE 4096
-typedef struct _CollectManagerEntry CollectManagerEntry;
+struct CollectManagerEntry;
static void collection_load_thumb_step(CollectionData *cd);
static gboolean collection_save_private(CollectionData *cd, const gchar *path);
#define COLLECT_MANAGER_ACTIONS_PER_IDLE 1000
#define COLLECT_MANAGER_FLUSH_DELAY 10000
-struct _CollectManagerEntry
+struct CollectManagerEntry
{
gchar *path;
GList *add_list;
gboolean empty;
};
-typedef enum {
+enum CollectManagerType {
COLLECTION_MANAGER_UPDATE,
COLLECTION_MANAGER_ADD,
COLLECTION_MANAGER_REMOVE
-} CollectManagerType;
+};
-typedef struct _CollectManagerAction CollectManagerAction;
-struct _CollectManagerAction
+struct CollectManagerAction
{
gchar *oldpath;
gchar *newpath;
#ifndef COLLECT_IO_H
#define COLLECT_IO_H
-typedef enum {
+enum CollectionLoadFlags {
COLLECTION_LOAD_NONE = 0,
COLLECTION_LOAD_APPEND = 1 << 0,
COLLECTION_LOAD_FLUSH = 1 << 1,
COLLECTION_LOAD_GEOMETRY= 1 << 2,
-} CollectionLoadFlags;
+};
gboolean collection_load(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
*-----------------------------------------------------------------------------
*/
-typedef struct _ColumnData ColumnData;
-struct _ColumnData
+struct ColumnData
{
CollectTable *ct;
gint number;
#ifndef COLOR_MAN_H
#define COLOR_MAN_H
-typedef enum {
+enum ColorManProfileType {
COLOR_PROFILE_NONE = -1,
COLOR_PROFILE_MEM = -2,
COLOR_PROFILE_SRGB = 0,
COLOR_PROFILE_ADOBERGB,
COLOR_PROFILE_FILE,
-} ColorManProfileType;
+};
-typedef enum {
+enum ColorManReturnType {
COLOR_RETURN_SUCCESS = 0,
COLOR_RETURN_ERROR,
COLOR_RETURN_IMAGE_CHANGED
-} ColorManReturnType;
+};
-typedef struct _ColorMan ColorMan;
-typedef void (* ColorManDoneFunc)(ColorMan *cm, ColorManReturnType success, gpointer data);
+struct ColorMan;
+using ColorManDoneFunc = void (*)(ColorMan *, ColorManReturnType, gpointer);
-struct _ColorMan {
+struct ColorMan {
ImageWindow *imd;
GdkPixbuf *pixbuf;
gint incremental_sync;
-typedef struct _EditorWindow EditorWindow;
-struct _EditorWindow
+struct EditorWindow
{
GtkWidget *window;
GtkWidget *entry;
gboolean modified;
};
-typedef struct _EditorListWindow EditorListWindow;
-struct _EditorListWindow
+struct EditorListWindow
{
GtkWidget *window;
GtkWidget *view;
GtkWidget *edit_button;
};
-typedef struct _EditorWindowDel_Data EditorWindowDel_Data;
-struct _EditorWindowDel_Data
+struct EditorWindowDel_Data
{
EditorListWindow *ewl;
gchar *path;
DUPE_COLUMN_COUNT /**< total columns */
};
-typedef enum {
+enum DUPE_CHECK_RESULT {
DUPE_MATCH = 0,
DUPE_NO_MATCH,
DUPE_NAME_MATCH
-} DUPE_CHECK_RESULT;
+};
-typedef struct _DupeQueueItem DupeQueueItem;
/** Used for similarity checks. One for each item pushed
* onto the thread pool.
*/
-struct _DupeQueueItem
+struct DupeQueueItem
{
DupeItem *needle;
DupeWindow *dw;
gint index; /**< The order items pushed onto thread pool. Used to sort returned matches */
};
-typedef struct _DupeSearchMatch DupeSearchMatch;
/** Used for similarity checks thread. One for each pair match found.
*/
-struct _DupeSearchMatch
+struct DupeSearchMatch
{
DupeItem *a; /**< \a a / \a b matched pair found */
DupeItem *b; /**< \a a / \a b matched pair found */
*-------------------------------------------------------------------
*/
-typedef struct {
+struct CDupeConfirmD {
DupeWindow *dw;
GList *list;
-} CDupeConfirmD;
+};
static void confirm_dir_list_cancel(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
{
*-------------------------------------------------------------------
*/
- typedef enum {
+enum SeparatorType {
EXPORT_CSV = 0,
EXPORT_TSV
-} SeparatorType;
+};
-typedef struct _ExportDupesData ExportDupesData;
-struct _ExportDupesData
+struct ExportDupesData
{
FileDialog *dialog;
SeparatorType separator;
/** @typedef DupeMatchType
* match methods
*/
-typedef enum
+enum DupeMatchType
{
DUPE_MATCH_NONE = 0,
DUPE_MATCH_NAME = 1 << 0,
DUPE_MATCH_NAME_CONTENT = 1 << 11, /**< same name, but different content */
DUPE_MATCH_NAME_CI_CONTENT = 1 << 12, /**< same name - case insensitive, but different content */
DUPE_MATCH_ALL = 1 << 13 /**< N.B. this is used as a clamp value in rcfile.cc */
-} DupeMatchType;
+};
-typedef enum
+enum DupeSelectType
{
DUPE_SELECT_NONE,
DUPE_SELECT_GROUP1,
DUPE_SELECT_GROUP2
-} DupeSelectType;
+};
-typedef struct _DupeItem DupeItem;
-struct _DupeItem
+struct DupeItem
{
CollectionData *collection; /**< NULL if from #DupeWindow->files */
CollectInfo *info;
gint second;
};
-typedef struct _DupeMatch DupeMatch;
-struct _DupeMatch
+struct DupeMatch
{
DupeItem *di;
gdouble rank;
};
-typedef struct _DupeWindow DupeWindow;
-struct _DupeWindow
+struct DupeWindow
{
GList *list; /**< one entry for each dropped file in 1st set window (#DupeItem) */
GList *dupes; /**< list of dupes (#DupeItem, grouping the #DupeMatch-es) */
-typedef struct _EditorVerboseData EditorVerboseData;
-struct _EditorVerboseData {
+struct EditorVerboseData {
GenericDialog *gd;
GtkWidget *button_close;
GtkWidget *button_stop;
GtkWidget *spinner;
};
-typedef struct _EditorData EditorData;
-struct _EditorData {
+struct EditorData {
EditorFlags flags;
GPid pid;
GList *list;
return TRUE;
}
-typedef enum {
+enum PathType {
PATH_FILE,
PATH_FILE_URL,
PATH_DEST
-} PathType;
+};
static gchar *editor_command_path_parse(const FileData *fd, gboolean consider_sidecars, PathType type, const EditorDescription *editor)
#define EDITORS_H
-typedef enum {
+enum EditorFlags {
EDITOR_KEEP_FS = 0x00000001,
EDITOR_VERBOSE = 0x00000002,
EDITOR_VERBOSE_MULTI = 0x00000004,
EDITOR_ERROR_SKIPPED = 0x00800000,
/**< mask to match errors only */
EDITOR_ERROR_MASK = ~0xffff,
-} EditorFlags;
+};
struct _EditorDescription {
gchar *key; /**< desktop file name, not including path, including extension */
* @param list - list of processed #FileData structures, typically single file or whole list passed to start_editor_* @n
* @param data - generic pointer
*/
-typedef gint (*EditorCallback) (gpointer ed, EditorFlags flags, GList *list, gpointer data);
+using EditorCallback = gint (*)(gpointer, EditorFlags, GList *, gpointer);
void editor_resume(gpointer ed);
*-----------------------------------------------------------------------------
*/
-typedef enum {
+enum ExifByteOrder {
EXIF_BYTE_ORDER_INTEL,
EXIF_BYTE_ORDER_MOTOROLA
-} ExifByteOrder;
+};
-typedef struct _ExifFormatAttrib ExifFormatAttrib;
-struct _ExifFormatAttrib
+struct ExifFormatAttrib
{
ExifFormatType type;
guint size;
*-----------------------------------------------------------------------------
*/
-typedef struct _ExifMarker ExifMarker;
-typedef struct _ExifTextList ExifTextList;
-
-struct _ExifData
+struct ExifData
{
gchar *path;
GList *items; /**< list of (ExifItem *) */
GList *current; /**< for exif_get_next_item */
};
-
-struct _ExifItem
+struct ExifTextList
{
- ExifFormatType format;
- guint tag;
- const ExifMarker *marker;
- guint elements;
- gpointer data;
- guint data_len;
+ gint value;
+ const gchar *description;
};
-struct _ExifMarker
+struct ExifMarker
{
guint tag;
ExifFormatType format;
ExifTextList *list;
};
-#define EXIF_MARKER_LIST_END { 0x0000, EXIF_FORMAT_UNKNOWN, 0, NULL, NULL, NULL }
-
-struct _ExifTextList
+struct ExifItem
{
- gint value;
- const gchar *description;
+ ExifFormatType format;
+ guint tag;
+ const ExifMarker *marker;
+ guint elements;
+ gpointer data;
+ guint data_len;
};
+#define EXIF_MARKER_LIST_END { 0x0000, EXIF_FORMAT_UNKNOWN, 0, NULL, NULL, NULL }
+
#define EXIF_TEXT_LIST_END { -1, NULL }
return g_list_append(NULL, str);
}
-typedef struct _UnmapData UnmapData;
-struct _UnmapData
+struct UnmapData
{
guchar *ptr;
guchar *map_data;
{
}
#else
-typedef int dummy_variable;
+using dummy_variable = int;
#endif
/* not HAVE_EXIV2 */
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
#define EXIF_FORMAT_COUNT 13
-typedef enum {
+enum ExifFormatType {
EXIF_FORMAT_UNKNOWN = 0,
EXIF_FORMAT_BYTE_UNSIGNED = 1,
EXIF_FORMAT_STRING = 2,
EXIF_FORMAT_RATIONAL = 10,
EXIF_FORMAT_FLOAT = 11,
EXIF_FORMAT_DOUBLE = 12
-} ExifFormatType;
+};
/*
*-----------------------------------------------------------------------------
*/
-typedef struct _ExifItem ExifItem;
+struct ExifItem;
-typedef struct _ExifRational ExifRational;
-struct _ExifRational
+struct ExifRational
{
guint32 num;
guint32 den;
/* enums useful for image manipulation */
-typedef enum {
+enum ExifOrientationType {
EXIF_ORIENTATION_UNKNOWN = 0,
EXIF_ORIENTATION_TOP_LEFT = 1,
EXIF_ORIENTATION_TOP_RIGHT = 2,
EXIF_ORIENTATION_RIGHT_TOP = 6,
EXIF_ORIENTATION_RIGHT_BOTTOM = 7,
EXIF_ORIENTATION_LEFT_BOTTOM = 8
-} ExifOrientationType;
+};
-typedef enum {
+enum ExifUnitType {
EXIF_UNIT_UNKNOWN = 0,
EXIF_UNIT_NOUNIT = 1,
EXIF_UNIT_INCH = 2,
EXIF_UNIT_CENTIMETER = 3
-} ExifUnitType;
+};
-typedef struct _ExifFormattedText ExifFormattedText;
-struct _ExifFormattedText
+struct ExifFormattedText
{
const gchar *key;
const gchar *description;
#define AutoPtr UniquePtr
#endif
-typedef struct _AltKey AltKey;
-
-struct _AltKey
+struct AltKey
{
const gchar *xmp_key;
const gchar *exif_key;
#define debug_exception(e) _debug_exception(__FILE__, __LINE__, __func__, e)
-struct _ExifData
+struct ExifData
{
Exiv2::ExifData::const_iterator exifIter; /* for exif_get_next_item */
Exiv2::IptcData::const_iterator iptcIter; /* for exif_get_next_item */
Exiv2::XmpData::const_iterator xmpIter; /* for exif_get_next_item */
#endif
- virtual ~_ExifData() = default;
+ virtual ~ExifData() = default;
virtual void writeMetadata(gchar *UNUSED(path) = nullptr)
{
};
// This allows read-only access to the original metadata
-struct _ExifDataOriginal : public _ExifData
+struct ExifDataOriginal : public ExifData
{
protected:
Exiv2::Image::AutoPtr image_;
#endif
public:
- _ExifDataOriginal(Exiv2::Image::AutoPtr image)
+ ExifDataOriginal(Exiv2::Image::AutoPtr image)
{
cp_data_ = nullptr;
cp_length_ = 0;
valid_ = TRUE;
}
- _ExifDataOriginal(gchar *path)
+ ExifDataOriginal(gchar *path)
{
cp_data_ = nullptr;
cp_length_ = 0;
}
}
- ~_ExifDataOriginal() override
+ ~ExifDataOriginal() override
{
if (cp_data_) g_free(cp_data_);
if (pathl_) g_free(pathl_);
static void _ExifDataProcessed_update_xmp(gpointer key, gpointer value, gpointer data);
// This allows read-write access to the metadata
-struct _ExifDataProcessed : public _ExifData
+struct ExifDataProcessed : public ExifData
{
protected:
- std::unique_ptr<_ExifDataOriginal> imageData_;
- std::unique_ptr<_ExifDataOriginal> sidecarData_;
+ std::unique_ptr<ExifDataOriginal> imageData_;
+ std::unique_ptr<ExifDataOriginal> sidecarData_;
Exiv2::ExifData exifData_;
Exiv2::IptcData iptcData_;
#endif
public:
- _ExifDataProcessed(gchar *path, gchar *sidecar_path, GHashTable *modified_xmp)
+ ExifDataProcessed(gchar *path, gchar *sidecar_path, GHashTable *modified_xmp)
{
- imageData_ = std::make_unique<_ExifDataOriginal>(path);
+ imageData_ = std::make_unique<ExifDataOriginal>(path);
sidecarData_ = nullptr;
#if EXIV2_TEST_VERSION(0,16,0)
if (sidecar_path)
{
- sidecarData_ = std::make_unique<_ExifDataOriginal>(sidecar_path);
+ sidecarData_ = std::make_unique<ExifDataOriginal>(sidecar_path);
xmpData_ = sidecarData_->xmpData();
}
else
{
DEBUG_1("exif read %s, sidecar: %s", path, sidecar_path ? sidecar_path : "-");
try {
- return new _ExifDataProcessed(path, sidecar_path, modified_xmp);
+ return new ExifDataProcessed(path, sidecar_path, modified_xmp);
}
catch (Exiv2::AnyError& e) {
debug_exception(e);
void exif_free(ExifData *exif)
{
if (!exif) return;
- g_assert(dynamic_cast<_ExifDataProcessed *>(exif)); // this should not be called on ExifDataOriginal
+ g_assert(dynamic_cast<ExifDataProcessed *>(exif)); // this should not be called on ExifDataOriginal
delete exif;
}
unsigned long offset;
};
-typedef struct _UnmapData UnmapData;
-struct _UnmapData
+struct UnmapData
{
guchar *ptr;
guchar *map_data;
gulong size;
};
-typedef struct _FileCacheEntry FileCacheEntry;
-struct _FileCacheEntry {
+struct FileCacheEntry {
FileData *fd;
gulong size;
};
#include "main.h"
#include "filedata.h"
-typedef struct _FileCacheData FileCacheData;
-typedef void (*FileCacheReleaseFunc)(FileData *fd);
+using FileCacheData = struct _FileCacheData;
+using FileCacheReleaseFunc = void (*)(FileData *);
FileCacheData *file_cache_new(FileCacheReleaseFunc release, gulong max_size);
implementation in view-file-list.cc */
-typedef struct _NotifyIdleData NotifyIdleData;
-
-struct _NotifyIdleData {
+struct NotifyIdleData {
FileData *fd;
NotifyType type;
};
-typedef struct _NotifyData NotifyData;
-
-struct _NotifyData {
+struct NotifyData {
FileDataNotifyFunc func;
gpointer data;
NotifyPriority priority;
GList *filelist_recursive(FileData *dir_fd);
GList *filelist_recursive_full(FileData *dir_fd, SortType method, gboolean ascend);
-typedef gboolean (* FileDataGetMarkFunc)(FileData *fd, gint n, gpointer data);
-typedef gboolean (* FileDataSetMarkFunc)(FileData *fd, gint n, gboolean value, gpointer data);
+using FileDataGetMarkFunc = gboolean (*)(FileData *, gint, gpointer);
+using FileDataSetMarkFunc = gboolean (*)(FileData *, gint, gboolean, gpointer);
gboolean file_data_register_mark_func(gint n, FileDataGetMarkFunc get_mark_func, FileDataSetMarkFunc set_mark_func, gpointer data, GDestroyNotify notify);
void file_data_get_registered_mark_func(gint n, FileDataGetMarkFunc *get_mark_func, FileDataSetMarkFunc *set_mark_func, gpointer *data);
GList *file_data_process_groups_in_selection(GList *list, gboolean ungroup, GList **ungrouped);
-typedef void (*FileDataNotifyFunc)(FileData *fd, NotifyType type, gpointer data);
+using FileDataNotifyFunc = void (*)(FileData *, NotifyType, gpointer);
gboolean file_data_register_notify_func(FileDataNotifyFunc func, gpointer data, NotifyPriority priority);
gboolean file_data_unregister_notify_func(FileDataNotifyFunc func, gpointer data);
void file_data_send_notification(FileData *fd, NotifyType type);
#define FILEFILTER_H
-typedef struct _FilterEntry FilterEntry;
-struct _FilterEntry {
+struct FilterEntry {
gchar *key;
gchar *description;
gchar *extensions;
}
#else
-typedef int dummy_variable;
+using dummy_variable = int;
#endif
/* not HAVE_EXIV2 */
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
return TRUE;
}
#else
-typedef int dummy_variable;
+using dummy_variable = int;
#endif
/* not HAVE_EXIV2 */
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
}
#else
-typedef int dummy_variable;
+using dummy_variable = int;
#endif
/* not HAVE_EXIV2 */
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
}
#else
-typedef int dummy_variable;
+using dummy_variable = int;
#endif
/* not HAVE_EXIV2 */
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
}
#endif
#else
-typedef int dummy_variable;
+using dummy_variable = int;
#endif
/* not HAVE_EXIV2 */
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
#include "exif-int.h"
-typedef enum {
+enum FormatRawMatchType {
FORMAT_RAW_MATCH_MAGIC,
FORMAT_RAW_MATCH_TIFF_MAKE
-} FormatRawMatchType;
+};
-typedef enum {
+enum FormatRawExifType {
FORMAT_RAW_EXIF_NONE,
FORMAT_RAW_EXIF_TIFF,
FORMAT_RAW_EXIF_JPEG,
FORMAT_RAW_EXIF_IFD_II,
FORMAT_RAW_EXIF_IFD_MM,
FORMAT_RAW_EXIF_PROPRIETARY
-} FormatRawExifType;
+};
typedef gboolean (* FormatRawParseFunc)(guchar *data, const guint len,
guint *image_offset, guint *exif_offset);
FormatRawExifParseFunc *exif_parse_func);
-typedef enum {
+enum FormatExifMatchType {
FORMAT_EXIF_MATCH_MAKE,
FORMAT_EXIF_MATCH_MAKERNOTE
-} FormatExifMatchType;
+};
typedef gint (* FormatExifParseFunc)(ExifData *exif, guchar *tiff, guint offset,
guint size, ExifByteOrder bo);
* 102 screen 0, monitor 1 \n
* 201 screen 1, monitor 0 \n
*/
-typedef struct _ScreenData ScreenData;
-struct _ScreenData {
+struct ScreenData {
gint number;
gchar *description;
gint x;
* Pressing the Back and Forward buttons moves along the chain, but does
* not make additions to the chain.
* The chain always increases and is deleted at the end of the session
- *
+ *
*-----------------------------------------------------------------------------
*/
/**
* @brief Appends a path to the history chain
* @param path Path selected
- *
+ *
* Each time the user selects a new path it is appended to the chain
* except when it is identical to the current last entry
* The pointer is always moved to the end of the chain
* Pressing the Image Back and Image Forward buttons moves along the chain,
* but does not make additions to the chain.
* The chain always increases and is deleted at the end of the session
- *
+ *
*-----------------------------------------------------------------------------
*/
static GList *image_chain = nullptr;
/**
* @brief Appends a path to the image history chain
* @param path Image path selected
- *
+ *
* Each time the user selects a new image it is appended to the chain
* except when it is identical to the current last entry
* The pointer is always moved to the end of the chain
*-----------------------------------------------------------------------------
*/
-typedef struct _HistoryData HistoryData;
-struct _HistoryData
+struct HistoryData
{
gchar *key;
GList *list;
#include "misc.h"
#include "ui-fileops.h"
-typedef struct _ImageLoaderCOLLECTION ImageLoaderCOLLECTION;
-struct _ImageLoaderCOLLECTION {
+struct ImageLoaderCOLLECTION {
ImageLoaderBackendCbAreaUpdated area_updated_cb;
ImageLoaderBackendCbSize size_cb;
ImageLoaderBackendCbAreaPrepared area_prepared_cb;
#include <jpeglib.h>
#include <jerror.h>
-typedef struct _ImageLoaderJpeg ImageLoaderJpeg;
-struct _ImageLoaderJpeg {
+struct ImageLoaderJpeg {
ImageLoaderBackendCbAreaUpdated area_updated_cb;
ImageLoaderBackendCbSize size_cb;
ImageLoaderBackendCbAreaPrepared area_prepared_cb;
#include "image-load.h"
#include "image-load-dds.h"
-typedef struct _ImageLoaderDDS ImageLoaderDDS;
-struct _ImageLoaderDDS {
+struct ImageLoaderDDS {
ImageLoaderBackendCbAreaUpdated area_updated_cb;
ImageLoaderBackendCbSize size_cb;
ImageLoaderBackendCbAreaPrepared area_prepared_cb;
#include "misc.h"
#include "ui-fileops.h"
-typedef struct _ImageLoaderExternal ImageLoaderExternal;
-struct _ImageLoaderExternal {
+struct ImageLoaderExternal {
ImageLoaderBackendCbAreaUpdated area_updated_cb;
ImageLoaderBackendCbSize size_cb;
ImageLoaderBackendCbAreaPrepared area_prepared_cb;
#ifdef HAVE_FFMPEGTHUMBNAILER
#include <libffmpegthumbnailer/videothumbnailerc.h>
-typedef struct _ImageLoaderFT ImageLoaderFT;
-struct _ImageLoaderFT {
+struct ImageLoaderFT {
ImageLoaderBackendCbAreaUpdated area_updated_cb;
ImageLoaderBackendCbSize size_cb;
ImageLoaderBackendCbAreaPrepared area_prepared_cb;
#include <jpeglib.h>
#include <jerror.h>
-typedef struct _ImageLoaderJpeg ImageLoaderJpeg;
-struct _ImageLoaderJpeg {
+struct ImageLoaderJpeg {
ImageLoaderBackendCbAreaUpdated area_updated_cb;
ImageLoaderBackendCbSize size_cb;
ImageLoaderBackendCbAreaPrepared area_prepared_cb;
#include "image-load.h"
#include "image-load-psd.h"
-typedef struct _ImageLoaderPSD ImageLoaderPSD;
-struct _ImageLoaderPSD {
+struct ImageLoaderPSD {
ImageLoaderBackendCbAreaUpdated area_updated_cb;
ImageLoaderBackendCbSize size_cb;
ImageLoaderBackendCbAreaPrepared area_prepared_cb;
gboolean abort;
};
-typedef struct
+struct PsdHeader
{
guchar signature[4]; /* file ID, always "8BPS" */
guint16 version; /* version number, always 1 */
guint32 columns; /* width of image in pixels (1-30000) */
guint16 depth; /* number of bits per channel (1, 8, 16 or 32) */
guint16 color_mode; /* color mode as defined below */
-} PsdHeader;
+};
#define PSD_HEADER_SIZE 26
-typedef enum
+enum PsdColorMode
{
PSD_MODE_MONO = 0,
PSD_MODE_GRAYSCALE = 1,
PSD_MODE_MULTICHANNEL = 7,
PSD_MODE_DUOTONE = 8,
PSD_MODE_LAB = 9,
-} PsdColorMode;
+};
-typedef enum
+enum PsdCompressionType
{
PSD_COMPRESSION_NONE = 0,
PSD_COMPRESSION_RLE = 1
-} PsdCompressionType;
+};
-typedef enum
+enum PsdReadState
{
PSD_STATE_HEADER,
PSD_STATE_COLOR_MODE_BLOCK,
PSD_STATE_LINES_LENGTHS,
PSD_STATE_CHANNEL_DATA,
PSD_STATE_DONE
-} PsdReadState;
+};
-typedef struct
+struct PsdContext
{
PsdReadState state;
guint pos;
guint16* lines_lengths;
gboolean finalized;
-} PsdContext;
+};
static guint16
#include "image-load.h"
#include "image-load-zxscr.h"
-typedef struct _ImageLoaderZXSCR ImageLoaderZXSCR;
-struct _ImageLoaderZXSCR {
+struct ImageLoaderZXSCR {
ImageLoaderBackendCbAreaUpdated area_updated_cb;
ImageLoaderBackendCbSize size_cb;
ImageLoaderBackendCbAreaPrepared area_prepared_cb;
/**************************************************************************************/
/* send signals via idle calbacks - the callback are executed in the main thread */
-typedef struct _ImageLoaderAreaParam ImageLoaderAreaParam;
-struct _ImageLoaderAreaParam {
+struct ImageLoaderAreaParam {
ImageLoader *il;
guint x;
guint y;
#define TYPE_IMAGE_LOADER (image_loader_get_type())
-typedef void (*ImageLoaderBackendCbAreaPrepared)(gpointer loader, gpointer data);
-typedef void (*ImageLoaderBackendCbSize)(gpointer loader, gint width, gint height, gpointer data);
-typedef void (*ImageLoaderBackendCbAreaUpdated)(gpointer loader, guint x, guint y, guint w, guint h, gpointer data);
-
-typedef gpointer (*ImageLoaderBackendFuncLoaderNew)(ImageLoaderBackendCbAreaUpdated, ImageLoaderBackendCbSize, ImageLoaderBackendCbAreaPrepared, gpointer data);
-typedef void (*ImageLoaderBackendFuncSetSize)(gpointer loader, int width, int height);
-typedef gboolean (*ImageLoaderBackendFuncLoad)(gpointer loader, const guchar *buf, gsize count, GError **error); /* optional, load whole image at once */
-typedef gboolean (*ImageLoaderBackendFuncWrite)(gpointer loader, const guchar *buf, gsize count, GError **error);
-typedef GdkPixbuf* (*ImageLoaderBackendFuncGetPixbuf)(gpointer loader);
-typedef gboolean (*ImageLoaderBackendFuncClose)(gpointer loader, GError **error);
-typedef void (*ImageLoaderBackendFuncAbort)(gpointer loader);
-typedef void (*ImageLoaderBackendFuncFree)(gpointer loader);
-typedef gchar* (*ImageLoaderBackendFuncGetFormatName)(gpointer loader);
-typedef gchar** (*ImageLoaderBackendFuncGetFormatMimeTypes)(gpointer loader);
-typedef void (*ImageLoaderBackendFuncSetPageNum)(gpointer loader, gint page_num);
-typedef gint (*ImageLoaderBackendFuncGetPageTotal)(gpointer loader);
-
-typedef struct _ImageLoaderBackend ImageLoaderBackend;
+using ImageLoaderBackendCbAreaPrepared = void (*)(gpointer, gpointer);
+using ImageLoaderBackendCbSize = void (*)(gpointer, gint, gint, gpointer);
+using ImageLoaderBackendCbAreaUpdated = void (*)(gpointer, guint, guint, guint, guint, gpointer);
+
+using ImageLoaderBackendFuncLoaderNew = gpointer (*)(ImageLoaderBackendCbAreaUpdated, ImageLoaderBackendCbSize, ImageLoaderBackendCbAreaPrepared, gpointer);
+using ImageLoaderBackendFuncSetSize = void (*)(gpointer, int, int);
+using ImageLoaderBackendFuncLoad = gboolean (*)(gpointer, const guchar *, gsize, GError **); /* optional, load whole image at once */
+using ImageLoaderBackendFuncWrite = gboolean (*)(gpointer, const guchar *, gsize, GError **);
+using ImageLoaderBackendFuncGetPixbuf = GdkPixbuf *(*)(gpointer);
+using ImageLoaderBackendFuncClose = gboolean (*)(gpointer, GError **);
+using ImageLoaderBackendFuncAbort = void (*)(gpointer);
+using ImageLoaderBackendFuncFree = void (*)(gpointer);
+using ImageLoaderBackendFuncGetFormatName = gchar *(*)(gpointer);
+using ImageLoaderBackendFuncGetFormatMimeTypes = gchar **(*)(gpointer);
+using ImageLoaderBackendFuncSetPageNum = void (*)(gpointer, gint);
+using ImageLoaderBackendFuncGetPageTotal = gint (*)(gpointer);
+
+using ImageLoaderBackend = struct _ImageLoaderBackend;
struct _ImageLoaderBackend
{
ImageLoaderBackendFuncLoaderNew loader_new;
ImageLoaderBackendFuncGetPageTotal get_page_total;
};
-typedef enum {
+enum ImageLoaderPreview {
IMAGE_LOADER_PREVIEW_NONE = 0,
IMAGE_LOADER_PREVIEW_EXIF = 1,
IMAGE_LOADER_PREVIEW_LIBRAW = 2
-} ImageLoaderPreview;
+};
//typedef struct _ImageLoader ImageLoader;
-typedef struct _ImageLoaderClass ImageLoaderClass;
+using ImageLoaderClass = struct _ImageLoaderClass;
struct _ImageLoader
{
*/
-typedef struct _OverlayStateData OverlayStateData;
-struct _OverlayStateData {
+struct OverlayStateData {
ImageWindow *imd;
ImageState changed_states;
NotifyType notify;
};
-typedef struct _OSDIcon OSDIcon;
-struct _OSDIcon {
+struct OSDIcon {
gboolean reset; /* reset on new image */
gint x; /* x, y offset */
gint y;
#ifndef IMAGE_OVERLAY_H
#define IMAGE_OVERLAY_H
-typedef enum {
+enum ImageOSDFlag {
IMAGE_OSD_NONE = 0,
IMAGE_OSD_ROTATE_USER,
IMAGE_OSD_ROTATE_AUTO,
IMAGE_OSD_LAST,
IMAGE_OSD_ICON,
IMAGE_OSD_COUNT
-} ImageOSDFlag;
+};
-typedef enum {
+enum OsdShowFlags {
OSD_SHOW_NOTHING = 0,
OSD_SHOW_INFO = 1 << 0,
OSD_SHOW_STATUS = 1 << 1,
OSD_SHOW_HISTOGRAM = 1 << 2
-} OsdShowFlags;
+};
void set_image_overlay_template_string(gchar **template_string, const gchar *value);
void set_default_image_overlay_template_string(gchar **template_string);
#include "utilops.h"
#include "window.h"
-typedef struct _ViewWindow ViewWindow;
-struct _ViewWindow
+struct ViewWindow
{
GtkWidget *window;
ImageWindow *imd;
*-------------------------------------------------------------------
*/
-typedef struct {
+struct CViewConfirmD {
ViewWindow *vw;
GList *list;
-} CViewConfirmD;
+};
static void view_dir_list_cancel(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
{
}
-typedef enum {
+enum TiffByteOrder {
TIFF_BYTE_ORDER_INTEL,
TIFF_BYTE_ORDER_MOTOROLA
-} TiffByteOrder;
+};
#define TIFF_TIFD_OFFSET_TAG 0
#define TIFF_TIFD_OFFSET_FORMAT 2
return (*offset < len);
}
-typedef gint (* FuncParseIFDEntry)(const guchar *tiff, guint offset,
- guint size, TiffByteOrder bo,
- gpointer data);
+using FuncParseIFDEntry = gint (*)(const guchar *, guint, guint, TiffByteOrder, gpointer);
gint tiff_parse_IFD_table(const guchar *tiff, guint offset,
guint *seg_offset, guint *seg_length);
-typedef struct _MPOData MPOData;
-typedef struct _MPOEntry MPOEntry;
-
-struct _MPOEntry {
+struct MPOEntry {
guint type_code;
gboolean representative;
gboolean dependent_child;
double YawAngle;
double PitchAngle;
double RollAngle;
-
};
-struct _MPOData {
+struct MPOData {
guint mpo_offset;
guint version;
};
-typedef struct _LayoutStyle LayoutStyle;
-struct _LayoutStyle
+struct LayoutStyle
{
LayoutLocation a, b, c;
};
-typedef struct _LayoutConfig LayoutConfig;
-struct _LayoutConfig
+struct LayoutConfig
{
GtkWidget *box;
* window layout menu
*-----------------------------------------------------------------------------
*/
-typedef struct _WindowNames WindowNames;
-struct _WindowNames
+struct WindowNames
{
gboolean displayed;
gchar *name;
gchar *path;
};
-typedef struct _RenameWindow RenameWindow;
-struct _RenameWindow
+struct RenameWindow
{
GenericDialog *gd;
LayoutWindow *lw;
GtkWidget *window_name_entry;
};
-typedef struct _DeleteWindow DeleteWindow;
-struct _DeleteWindow
+struct DeleteWindow
{
GenericDialog *gd;
LayoutWindow *lw;
{
if (lw->menu_bar) gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(lw->menu_bar)), lw->menu_bar);
for (i = 0; i < TOOLBAR_COUNT; i++)
- if (lw->toolbar[i]) gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(lw->toolbar[i])), lw->toolbar[i]);
+ if (lw->toolbar[i]) gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(lw->toolbar[i])), lw->toolbar[i]);
}
/* clear it all */
#define CONFIG_WINDOW_DEF_WIDTH 600
#define CONFIG_WINDOW_DEF_HEIGHT 400
-typedef struct _LayoutConfig LayoutConfig;
-struct _LayoutConfig
+struct LayoutConfig
{
LayoutWindow *lw;
#include "ui-misc.h"
#include "window.h"
-typedef struct _LogWindow LogWindow;
-
-struct _LogWindow
+struct LogWindow
{
GtkWidget *window;
GtkWidget *scrolledwin;
gboolean highlight_all;
};
-typedef enum {
+enum LogWindowSearchDirection {
LOGWINDOW_SEARCH_BACKWARDS,
LOGWINDOW_SEARCH_FORWARDS
-} LogWindowSearchDirection;
+};
static LogWindow *logwindow = nullptr;
/**
* @brief Handle escape and F1 keys
- * @param UNUSED
- * @param event
- * @param logwin
- * @returns
- *
+ * @param UNUSED
+ * @param event
+ * @param logwin
+ * @returns
+ *
* If escape key pressed, hide log window. \n
* If no text selected, form a selection bounded by space characters or
* start and end of line. \n
* If F1 pressed, execute command line program: \n
* <options->log_window.action> <selected text>
- *
+ *
*/
static gboolean key_pressed(GtkWidget *UNUSED(widget), GdkEventKey *event, LogWindow *logwin)
{
log_window_show(logwindow);
}
-typedef struct _LogMsg LogMsg;
-
-struct _LogMsg {
+struct LogMsg {
gchar *text;
LogType type;
};
#ifndef LOGWINDOW_H
#define LOGWINDOW_H
-typedef enum
+enum LogType
{
LOG_NORMAL = 0,
LOG_MSG,
LOG_WARN,
LOG_ERROR,
LOG_COUNT
-} LogType;
+};
void log_window_new(LayoutWindow *lw);
return data;
}
#else
-typedef int dummy_variable;
+using dummy_variable = int;
#endif
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
#include <glib.h>
-typedef struct _MD5Context {
+struct MD5Context {
guint32 buf[4];
guint32 bits[2];
guchar in[64];
gint doByteReverse;
-} MD5Context;
+};
/* raw routines */
#include "layout-util.h"
#include "rcfile.h"
-typedef enum {
+enum MetadataKey {
MK_NONE,
MK_KEYWORDS,
MK_COMMENT
-} MetadataKey;
+};
/* If contents change, keep GuideOptionsMetadata.xml up to date */
/**
#ifndef OPTIONS_H
#define OPTIONS_H
-typedef struct _ConfOptions ConfOptions;
-
-struct _ConfOptions
+struct ConfOptions
{
/* ui */
gboolean progressive_key_scrolling;
{ const_cast<gchar *>("text/plain"), GTK_TARGET_SAME_APP, TARGET_TEXT_PLAIN }
};
-typedef struct _TagData TagData;
-struct _TagData
+struct TagData
{
gchar *key;
gchar *title;
#ifndef OSD_H
#define OSD_H
-typedef enum {
+enum OsdTemplateFlags {
OSDT_NONE = 0,
OSDT_FREE = 1 << 0,
OSDT_NO_DUP = 1 << 1
-} OsdTemplateFlags;
+};
GtkWidget *osd_new(gint max_cols, GtkWidget *template_view);
gchar *image_osd_mkinfo(const gchar *str, FileData *fd, GHashTable *vars);
if (height) *height = y2 - y1;
}
-typedef struct _FlowerGroup FlowerGroup;
-struct _FlowerGroup {
+struct FlowerGroup {
GList *items;
GList *children;
gint x;
gint x, gint y, gint width, gint height);
// Alignment
-typedef struct _PanTextAlignment PanTextAlignment;
-struct _PanTextAlignment {
+struct PanTextAlignment {
PanWindow *pw;
GList *column1;
-typedef enum {
+enum PanLayoutType {
PAN_LAYOUT_TIMELINE = 0,
PAN_LAYOUT_CALENDAR,
PAN_LAYOUT_FOLDERS_LINEAR,
PAN_LAYOUT_FOLDERS_FLOWER,
PAN_LAYOUT_GRID,
PAN_LAYOUT_COUNT
-} PanLayoutType;
+};
-typedef enum {
+enum PanImageSize {
PAN_IMAGE_SIZE_THUMB_DOTS = 0,
PAN_IMAGE_SIZE_THUMB_NONE,
PAN_IMAGE_SIZE_THUMB_SMALL,
PAN_IMAGE_SIZE_50,
PAN_IMAGE_SIZE_100,
PAN_IMAGE_SIZE_COUNT
-} PanImageSize;
+};
-typedef enum {
+enum PanItemType {
PAN_ITEM_NONE,
PAN_ITEM_THUMB,
PAN_ITEM_BOX,
PAN_ITEM_TRIANGLE,
PAN_ITEM_TEXT,
PAN_ITEM_IMAGE
-} PanItemType;
+};
-typedef enum {
+enum PanTextAttrType {
PAN_TEXT_ATTR_NONE = 0,
PAN_TEXT_ATTR_BOLD = 1 << 0,
PAN_TEXT_ATTR_HEADING = 1 << 1,
PAN_TEXT_ATTR_MARKUP = 1 << 2
-} PanTextAttrType;
+};
-typedef enum {
+enum PanBorderType {
PAN_BORDER_NONE = 0,
PAN_BORDER_1 = 1 << 0,
PAN_BORDER_2 = 1 << 1,
PAN_BORDER_3 = 1 << 2,
PAN_BORDER_4 = 1 << 3
-} PanBorderType;
+};
#define PAN_BORDER_TOP PAN_BORDER_1
#define PAN_BORDER_RIGHT PAN_BORDER_2
#define PAN_BORDER_LEFT PAN_BORDER_4
-typedef struct _PanItem PanItem;
-struct _PanItem {
+struct PanItem {
PanItemType type;
gint x;
gint y;
gboolean queued;
};
-typedef struct _PanViewSearchUi PanViewSearchUi;
-struct _PanViewSearchUi
+struct PanViewSearchUi
{
GtkWidget *search_box;
GtkWidget *search_entry;
* @typedef _PanViewFilterUi
* Defined in pan-view-filter.h
*/
-typedef struct _PanViewFilterUi PanViewFilterUi;
+using PanViewFilterUi = struct _PanViewFilterUi;
-typedef struct _PanWindow PanWindow;
-struct _PanWindow
+struct PanWindow
{
GtkWidget *window;
ImageWindow *imd;
gint idle_id;
};
-typedef struct _PanGrid PanGrid;
-struct _PanGrid {
+struct PanGrid {
gint x;
gint y;
gint w;
GList *list;
};
-typedef struct _PanCacheData PanCacheData;
-struct _PanCacheData {
+struct PanCacheData {
FileData *fd;
CacheData *cd;
};
#include "main.h"
#include "pan-types.h"
-typedef enum {
+enum PanDateLengthType {
PAN_DATE_LENGTH_EXACT,
PAN_DATE_LENGTH_HOUR,
PAN_DATE_LENGTH_DAY,
PAN_DATE_LENGTH_WEEK,
PAN_DATE_LENGTH_MONTH,
PAN_DATE_LENGTH_YEAR
-} PanDateLengthType;
+};
gboolean pan_date_compare(time_t a, time_t b, PanDateLengthType length);
gint pan_date_value(time_t d, PanDateLengthType length);
#include "main.h"
#include "pan-types.h"
-typedef enum {
+enum PanViewFilterMode {
PAN_VIEW_FILTER_REQUIRE,
PAN_VIEW_FILTER_EXCLUDE,
PAN_VIEW_FILTER_INCLUDE,
PAN_VIEW_FILTER_GROUP
-} PanViewFilterMode;
+};
-typedef struct _PanViewFilterElement PanViewFilterElement;
-struct _PanViewFilterElement
+struct PanViewFilterElement
{
PanViewFilterMode mode;
gchar *keyword;
GRegex *kw_regex;
};
-typedef struct _PanFilterCallbackState PanFilterCallbackState;
-struct _PanFilterCallbackState
+struct PanFilterCallbackState
{
PanWindow *pw;
GList *filter_element;
#include "pixbuf-util.h"
#include "exif.h"
#else
-typedef enum {
+enum ExifOrientationType {
EXIF_ORIENTATION_UNKNOWN = 0,
EXIF_ORIENTATION_TOP_LEFT = 1,
EXIF_ORIENTATION_TOP_RIGHT = 2,
EXIF_ORIENTATION_RIGHT_TOP = 6,
EXIF_ORIENTATION_RIGHT_BOTTOM = 7,
EXIF_ORIENTATION_LEFT_BOTTOM = 8
-} ExifOrientationType;
+};
#endif
PROP_ENLARGEMENT_LIMIT_VALUE
};
-typedef enum {
+enum PrZoomFlags {
PR_ZOOM_NONE = 0,
PR_ZOOM_FORCE = 1 << 0,
PR_ZOOM_NEW = 1 << 1,
PR_ZOOM_CENTER = 1 << 2,
PR_ZOOM_INVALIDATE = 1 << 3,
PR_ZOOM_LAZY = 1 << 4 /* wait with redraw for pixbuf_renderer_area_changed */
-} PrZoomFlags;
+};
static guint signals[SIGNAL_COUNT] = { 0 };
static GtkEventBoxClass *parent_class = nullptr;
#define ROUND_DOWN(A,B) ((gint)(((A))/(B))*(B))
-typedef struct _RendererFuncs RendererFuncs;
+using RendererFuncs = struct _RendererFuncs;
-typedef struct _PixbufRenderer PixbufRenderer;
-typedef struct _PixbufRendererClass PixbufRendererClass;
+using PixbufRenderer = struct _PixbufRenderer;
+using PixbufRendererClass = struct _PixbufRendererClass;
-typedef gint (* PixbufRendererTileRequestFunc)(PixbufRenderer *pr, gint x, gint y,
- gint width, gint height, GdkPixbuf *pixbuf, gpointer user_data);
-typedef void (* PixbufRendererTileDisposeFunc)(PixbufRenderer *pr, gint x, gint y,
- gint width, gint height, GdkPixbuf *pixbuf, gpointer user_data);
+using PixbufRendererTileRequestFunc = gint (*)(PixbufRenderer *, gint, gint, gint, gint, GdkPixbuf *, gpointer);
+using PixbufRendererTileDisposeFunc = void (*)(PixbufRenderer *, gint, gint, gint, gint, GdkPixbuf *, gpointer);
-typedef void (* PixbufRendererPostProcessFunc)(PixbufRenderer *pr, GdkPixbuf **pixbuf, gint x, gint y,
- gint width, gint height, gpointer user_data);
+using PixbufRendererPostProcessFunc = void (*)(PixbufRenderer *, GdkPixbuf **, gint, gint, gint, gint, gpointer);
-typedef enum {
+enum PixbufRendererScrollResetType {
PR_SCROLL_RESET_TOPLEFT = 0,
PR_SCROLL_RESET_CENTER,
PR_SCROLL_RESET_NOCHANGE,
PR_SCROLL_RESET_COUNT,
-} PixbufRendererScrollResetType;
+};
-typedef enum {
+enum ImageRenderType {
TILE_RENDER_NONE = 0, /**< do nothing */
TILE_RENDER_AREA, /**< render an area of the tile */
TILE_RENDER_ALL /**< render the whole tile */
-} ImageRenderType;
+};
-typedef enum {
+enum OverlayRendererFlags {
OVL_NORMAL = 0,
OVL_RELATIVE = 1 << 0, /**< x,y coordinates are relative, negative values start bottom right */
/* OVL_HIDE_ON_SCROLL = 1 << 1*/ /**< hide temporarily when scrolling (not yet implemented) */
-} OverlayRendererFlags;
+};
struct _RendererFuncs
{
* @struct _SourceTile
* protected - for renderer use only
*/
-typedef struct _SourceTile SourceTile;
+using SourceTile = struct _SourceTile;
struct _SourceTile
{
gint x;
*-----------------------------------------------------------------------------
*/
-typedef struct _PixbufInline PixbufInline;
-struct _PixbufInline
+struct PixbufInline
{
const gchar *key;
const gchar *data;
GtkWidget *keyword_text;
static void config_tab_keywords_save();
-typedef struct _ThumbSize ThumbSize;
-struct _ThumbSize
+struct ThumbSize
{
gint w;
gint h;
gtk_widget_show(combo);
}
-typedef struct _UseableMouseItems UseableMouseItems;
-struct _UseableMouseItems
+struct UseableMouseItems
{
const gchar *name; /* GtkActionEntry terminology */
const gchar *label;
/* general options tab */
static void timezone_database_install_cb(GtkWidget *widget, gpointer data);
-typedef struct _TZData TZData;
-struct _TZData
+struct TZData
{
GenericDialog *gd;
GCancellable *cancellable;
/* keywords tab */
-typedef struct _KeywordFindData KeywordFindData;
-struct _KeywordFindData
+struct KeywordFindData
{
GenericDialog *gd;
#define PRINT_MAX_INTERP GDK_INTERP_BILINEAR
/* reverse order is important */
-typedef enum {
+enum TextPosition {
FOOTER_2,
FOOTER_1,
HEADER_2,
HEADER_1
-} TextPosition;
+};
-typedef struct _PrintWindow PrintWindow;
-struct _PrintWindow
+struct PrintWindow
{
GtkWidget *vbox;
GList *source_selection;
#define READ_DUMMY(_target_, _name_, _msg_) read_dummy_option(option, #_name_, _msg_)
-typedef struct _GQParserFuncData GQParserFuncData;
-typedef struct _GQParserData GQParserData;
-typedef void (* GQParserStartFunc)(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error);
-typedef void (* GQParserEndFunc)(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, gpointer data, GError **error);
+using GQParserFuncData = struct _GQParserFuncData;
+using GQParserData = struct _GQParserData;
+using GQParserStartFunc = void (*)(GQParserData *, GMarkupParseContext *, const gchar *, const gchar **, const gchar **, gpointer, GError **);
+using GQParserEndFunc = void (*)(GQParserData *, GMarkupParseContext *, const gchar *, gpointer, GError **);
void options_parse_func_push(GQParserData *parser_data, GQParserStartFunc start_func, GQParserEndFunc end_func, gpointer data);
void options_parse_func_pop(GQParserData *parser_data);
static LayoutWindow *lw_id = nullptr; /* points to the window set by the --id option */
-typedef struct _RemoteClient RemoteClient;
-struct _RemoteClient {
+struct RemoteClient {
gint fd;
guint channel_id; /* event source id */
RemoteConnection *rc;
};
-typedef struct _RemoteData RemoteData;
-struct _RemoteData {
+struct RemoteData {
CollectionData *command_collection;
GList *file_list;
gboolean single_dir;
}
#endif
-typedef struct _RemoteCommandEntry RemoteCommandEntry;
-struct _RemoteCommandEntry {
+struct RemoteCommandEntry {
const gchar *opt_s;
const gchar *opt_l;
void (*func)(const gchar *text, GIOChannel *channel, gpointer data);
#define REMOTE_H
-typedef struct _RemoteConnection RemoteConnection;
+struct RemoteConnection;
-typedef void RemoteReadFunc(RemoteConnection *rc, const gchar *text, GIOChannel *channel, gpointer data);
+using RemoteReadFunc = void (RemoteConnection *, const gchar *, GIOChannel *, gpointer);
-struct _RemoteConnection {
+struct RemoteConnection {
gint server;
gint fd;
gchar *path;
#include "pixbuf-util.h"
#include "exif.h"
#else
-typedef enum {
+enum ExifOrientationType {
EXIF_ORIENTATION_UNKNOWN = 0,
EXIF_ORIENTATION_TOP_LEFT = 1,
EXIF_ORIENTATION_TOP_RIGHT = 2,
EXIF_ORIENTATION_RIGHT_TOP = 6,
EXIF_ORIENTATION_RIGHT_BOTTOM = 7,
EXIF_ORIENTATION_LEFT_BOTTOM = 8
-} ExifOrientationType;
+};
#endif
-typedef struct _ImageTile ImageTile;
-typedef struct _QueueData QueueData;
+using QueueData = struct _QueueData;
-struct _ImageTile
+struct ImageTile
{
cairo_surface_t *surface; /* off screen buffer */
GdkPixbuf *pixbuf; /* pixbuf area for zooming */
gboolean new_data;
};
-typedef struct _OverlayData OverlayData;
-struct _OverlayData
+struct OverlayData
{
gint id;
OverlayRendererFlags flags;
};
-typedef struct _RendererTiles RendererTiles;
-
-struct _RendererTiles
+struct RendererTiles
{
RendererFuncs f;
PixbufRenderer *pr;
}
/**
- * @brief
- * @param has_alpha
- * @param ignore_alpha
- * @param src
- * @param dest
- * @param pb_x
- * @param pb_y
- * @param pb_w
- * @param pb_h
- * @param offset_x
- * @param offset_y
- * @param scale_x
- * @param scale_y
- * @param interp_type
- * @param check_x
- * @param check_y
+ * @brief
+ * @param has_alpha
+ * @param ignore_alpha
+ * @param src
+ * @param dest
+ * @param pb_x
+ * @param pb_y
+ * @param pb_w
+ * @param pb_h
+ * @param offset_x
+ * @param offset_y
+ * @param scale_x
+ * @param scale_y
+ * @param interp_type
+ * @param check_x
+ * @param check_y
* @param wide_image Used as a work-around for a GdkPixbuf problem. Set when image width is > 32767. Problem exhibited with gdk_pixbuf_copy_area() and GDK_INTERP_NEAREST. See #772 on GitHub Geeqie
- *
- *
+ *
+ *
*/
static void rt_tile_get_region(gboolean has_alpha, gboolean ignore_alpha,
const GdkPixbuf *src, GdkPixbuf *dest,
rt_tile_invalidate_all(static_cast<RendererTiles *>(renderer));
if (!lazy)
{
- renderer_redraw(static_cast<_RendererTiles *>(renderer), 0, 0, pr->width, pr->height, TRUE, TILE_RENDER_ALL, TRUE, FALSE);
+ renderer_redraw(static_cast<RendererTiles *>(renderer), 0, 0, pr->width, pr->height, TRUE, TILE_RENDER_ALL, TRUE, FALSE);
}
rt_border_clear(rt);
}
SAR_COUNT
};
-typedef struct _SarData SarData;
-struct _SarData
+struct SarData
{
GtkWidget *window;
GtkWidget *vbox;
#define FORMAT_CLASS_BROKEN static_cast<FileFormatClass>(FILE_FORMAT_CLASSES + 1)
-typedef enum {
+enum MatchType {
SEARCH_MATCH_NONE,
SEARCH_MATCH_EQUAL,
SEARCH_MATCH_CONTAINS,
SEARCH_MATCH_ALL,
SEARCH_MATCH_ANY,
SEARCH_MATCH_COLLECTION
-} MatchType;
+};
enum {
SEARCH_COLUMN_POINTER = 0,
SEARCH_COLUMN_COUNT /* total columns */
};
-typedef struct _SearchData SearchData;
-struct _SearchData
+struct SearchData
{
GtkWidget *window;
};
-typedef struct _MatchFileData MatchFileData;
-struct _MatchFileData
+struct MatchFileData
{
FileData *fd;
gint width;
gint rank;
};
-typedef struct _MatchList MatchList;
-struct _MatchList
+struct MatchList
{
const gchar *text;
const MatchType type;
#include "ui-fileops.h"
#include "ui-misc.h"
-typedef struct _ShortcutsData ShortcutsData;
-struct _ShortcutsData
+struct ShortcutsData
{
GtkWidget *vbox;
GtkWidget *bookmarks;
#define SIMILAR_H
-typedef struct _ImageSimilarityData ImageSimilarityData;
-struct _ImageSimilarityData
+struct ImageSimilarityData
{
guint8 avg_r[1024];
guint8 avg_g[1024];
}
-typedef struct _ThumbValidate ThumbValidate;
-struct _ThumbValidate
+struct ThumbValidate
{
ThumbLoaderStd *tl;
gchar *path;
g_free(uri);
}
-typedef struct _TMaintMove TMaintMove;
-struct _TMaintMove
+struct TMaintMove
{
gchar *source;
gchar *dest;
#define THUMB_NAME_EXTENSION ".png"
-typedef struct _ThumbLoaderStd ThumbLoaderStd;
-typedef void (* ThumbLoaderStdFunc)(ThumbLoaderStd *tl, gpointer data);
+using ThumbLoaderStd = struct _ThumbLoaderStd;
+using ThumbLoaderStdFunc = void (*)(ThumbLoaderStd *, gpointer);
struct _ThumbLoaderStd
{
* Called from the Preferences/toolbar tab
**/
-typedef struct _ToolbarData ToolbarData;
-struct _ToolbarData
+struct ToolbarData
{
GtkWidget *widget;
GtkWidget *vbox;
LayoutWindow *lw;
};
-typedef struct _ToolbarButtonData ToolbarButtonData;
-struct _ToolbarButtonData
+struct ToolbarButtonData
{
GtkWidget *button;
GtkWidget *button_label;
static ToolbarData *toolbarlist[2];
-typedef struct _UseableToolbarItems UseableToolbarItems;
-struct _UseableToolbarItems
+struct UseableToolbarItems
{
const gchar *name; /* GtkActionEntry terminology */
const gchar *label;
#ifndef TYPEDEFS_H
#define TYPEDEFS_H
-typedef enum {
+enum ZoomMode {
ZOOM_RESET_ORIGINAL = 0,
ZOOM_RESET_FIT_WINDOW = 1,
ZOOM_RESET_NONE = 2
-} ZoomMode;
+};
-typedef enum {
+enum ZoomStyle {
ZOOM_GEOMETRIC = 0,
ZOOM_ARITHMETIC = 1
-} ZoomStyle;
+};
-typedef enum {
+enum ClipboardDestination {
CLIPBOARD_TEXT_PLAIN = 0,
CLIPBOARD_TEXT_URI_LIST = 1,
CLIPBOARD_X_SPECIAL_GNOME_COPIED_FILES = 2,
CLIPBOARD_UTF8_STRING = 3
-} ClipboardDestination;
+};
-typedef enum {
+enum ClipboardSelection {
CLIPBOARD_PRIMARY = 0,
CLIPBOARD_CLIPBOARD = 1,
CLIPBOARD_BOTH = 2
-} ClipboardSelection;
+};
-typedef enum {
+enum MouseButton {
MOUSE_BUTTON_LEFT = 1,
MOUSE_BUTTON_MIDDLE = 2,
MOUSE_BUTTON_RIGHT = 3,
MOUSE_BUTTON_WHEEL_DOWN = 5,
MOUSE_BUTTON_8 = 8,
MOUSE_BUTTON_9 = 9
-} MouseButton;
+};
-typedef enum {
+enum DirViewType {
DIRVIEW_LIST,
DIRVIEW_TREE,
DIRVIEW_LAST = DIRVIEW_TREE /**< Keep this up to date! */
-} DirViewType;
+};
-typedef enum {
+enum FileViewType {
FILEVIEW_LIST,
FILEVIEW_ICON,
FILEVIEW_LAST = FILEVIEW_ICON /**< Keep this up to date! */
-} FileViewType;
+};
#define CMD_COPY "geeqie-copy-command.desktop"
#define CMD_MOVE "geeqie-move-command.desktop"
#define CMD_DELETE "geeqie-delete-command.desktop"
#define CMD_FOLDER "geeqie-folder-command.desktop"
-typedef enum {
+enum SortType {
SORT_NONE,
SORT_NAME,
SORT_SIZE,
SORT_EXIFTIMEDIGITIZED,
SORT_RATING,
SORT_CLASS
-} SortType;
+};
/**
* @typedef DnDAction
* drag and drop default action
*/
-typedef enum {
+enum DnDAction {
DND_ACTION_ASK,
DND_ACTION_COPY,
DND_ACTION_MOVE
-} DnDAction;
+};
-typedef enum {
+enum AlterType {
ALTER_NONE, /**< do nothing */
ALTER_ROTATE_90,
ALTER_ROTATE_90_CC, /**< counterclockwise */
ALTER_ROTATE_180,
ALTER_MIRROR,
ALTER_FLIP,
-} AlterType;
+};
-typedef enum {
+enum LayoutLocation {
LAYOUT_HIDE = 0,
LAYOUT_LEFT = 1 << 0,
LAYOUT_RIGHT = 1 << 1,
LAYOUT_TOP = 1 << 2,
LAYOUT_BOTTOM = 1 << 3
-} LayoutLocation;
+};
-typedef enum {
+enum ImageState {
IMAGE_STATE_NONE = 0,
IMAGE_STATE_IMAGE = 1 << 0,
IMAGE_STATE_LOADING = 1 << 1,
IMAGE_STATE_ROTATE_AUTO = 1 << 4,
IMAGE_STATE_ROTATE_USER = 1 << 5,
IMAGE_STATE_DELAY_FLIP = 1 << 6
-} ImageState;
+};
-typedef enum {
+enum ImageSplitMode {
SPLIT_NONE = 0,
SPLIT_VERT,
SPLIT_HOR,
SPLIT_TRIPLE,
SPLIT_QUAD,
-} ImageSplitMode;
+};
-typedef enum {
+enum FileDataChangeType {
FILEDATA_CHANGE_DELETE,
FILEDATA_CHANGE_MOVE,
FILEDATA_CHANGE_RENAME,
FILEDATA_CHANGE_COPY,
FILEDATA_CHANGE_UNSPECIFIED,
FILEDATA_CHANGE_WRITE_METADATA
-} FileDataChangeType;
+};
-typedef enum {
+enum MarkToSelectionMode {
MTS_MODE_MINUS,
MTS_MODE_SET,
MTS_MODE_OR,
MTS_MODE_AND
-} MarkToSelectionMode;
+};
-typedef enum {
+enum SelectionToMarkMode {
STM_MODE_RESET,
STM_MODE_SET,
STM_MODE_TOGGLE
-} SelectionToMarkMode;
+};
-typedef enum {
+enum FileFormatClass {
FORMAT_CLASS_UNKNOWN,
FORMAT_CLASS_IMAGE,
FORMAT_CLASS_RAWIMAGE,
FORMAT_CLASS_DOCUMENT,
FORMAT_CLASS_ARCHIVE,
FILE_FORMAT_CLASSES
-} FileFormatClass;
+};
extern const gchar *format_class_list[]; /**< defined in preferences.cc */
* @typedef SecureSaveErrno
* see err field in #SecureSaveInfo
*/
-typedef enum {
+enum SecureSaveErrno {
SS_ERR_NONE = 0,
SS_ERR_DISABLED, /**< secsave is disabled. */
SS_ERR_OUT_OF_MEM, /**< memory allocation failure */
SS_ERR_MKSTEMP,
SS_ERR_RENAME,
SS_ERR_OTHER,
-} SecureSaveErrno;
+};
-typedef enum {
+enum NotifyPriority {
NOTIFY_PRIORITY_HIGH = 0,
NOTIFY_PRIORITY_MEDIUM,
NOTIFY_PRIORITY_LOW
-} NotifyPriority;
+};
-typedef enum {
+enum NotifyType {
NOTIFY_MARKS = 1 << 1, /**< changed marks */
NOTIFY_PIXBUF = 1 << 2, /**< image was read into fd->pixbuf */
NOTIFY_HISTMAP = 1 << 3, /**< histmap was read into fd->histmap */
NOTIFY_GROUPING = 1 << 6, /**< change in fd->sidecar_files or fd->parent */
NOTIFY_REREAD = 1 << 7, /**< changed file size, date, etc., file name remains unchanged */
NOTIFY_CHANGE = 1 << 8 /**< generic change described by fd->change */
-} NotifyType;
+};
-typedef enum {
+enum ChangeError {
CHANGE_OK = 0,
CHANGE_WARN_DEST_EXISTS = 1 << 0,
CHANGE_WARN_NO_WRITE_PERM = 1 << 1,
CHANGE_DEST_EXISTS = 1 << 13,
CHANGE_NO_SRC = 1 << 14,
CHANGE_GENERIC_ERROR = 1 << 16
-} ChangeError;
+};
-typedef enum {
+enum MetadataFormat {
METADATA_PLAIN = 0, /**< format that can be edited and written back */
METADATA_FORMATTED = 1 /**< for display only */
-} MetadataFormat;
+};
-typedef enum {
+enum StartUpPath {
STARTUP_PATH_CURRENT = 0,
STARTUP_PATH_LAST,
STARTUP_PATH_HOME,
-} StartUpPath;
+};
-typedef enum {
+enum ToolbarType {
TOOLBAR_MAIN,
TOOLBAR_STATUS,
TOOLBAR_COUNT
-} ToolbarType;
+};
-typedef enum {
+enum PixbufRendererStereoMode {
PR_STEREO_NONE = 0, /**< do nothing */
PR_STEREO_DUAL = 1 << 0, /**< independent stereo buffers, for example nvidia opengl */
PR_STEREO_FIXED = 1 << 1, /**< custom position */
PR_STEREO_SWAP = 1 << 18, /**< swap left and right buffers */
PR_STEREO_TEMP_DISABLE = 1 << 19, /**< temporarily disable stereo mode if source image is not stereo */
PR_STEREO_HALF = 1 << 20
-} PixbufRendererStereoMode;
+};
-typedef enum {
+enum StereoPixbufData {
STEREO_PIXBUF_DEFAULT = 0,
STEREO_PIXBUF_SBS = 1,
STEREO_PIXBUF_CROSS = 2,
STEREO_PIXBUF_NONE = 3
-} StereoPixbufData;
+};
-typedef enum {
+enum SortModeType {
BAR_SORT_MODE_FOLDER = 0,
BAR_SORT_MODE_COLLECTION,
BAR_SORT_MODE_COUNT
-} SortModeType;
+};
-typedef enum {
+enum SortActionType {
BAR_SORT_COPY = 0,
BAR_SORT_MOVE,
BAR_SORT_FILTER,
BAR_SORT_ACTION_COUNT
-} SortActionType;
+};
-typedef enum {
+enum SortSelectionType {
BAR_SORT_SELECTION_IMAGE = 0,
BAR_SORT_SELECTION_SELECTED,
BAR_SORT_SELECTION_COUNT
-} SortSelectionType;
+};
#define MAX_SPLIT_IMAGES 4
-typedef enum {
+enum SelectionType {
SELECTION_NONE = 0,
SELECTION_SELECTED = 1 << 0,
SELECTION_PRELIGHT = 1 << 1,
SELECTION_FOCUS = 1 << 2
-} SelectionType;
+};
-typedef struct _ImageLoader ImageLoader;
-typedef struct _ThumbLoader ThumbLoader;
+using ImageLoader = struct _ImageLoader;
+using ThumbLoader = struct _ThumbLoader;
-typedef struct _AnimationData AnimationData;
+using AnimationData = struct _AnimationData;
-typedef struct _CollectInfo CollectInfo;
-typedef struct _CollectionData CollectionData;
-typedef struct _CollectTable CollectTable;
-typedef struct _CollectWindow CollectWindow;
+using CollectInfo = struct _CollectInfo;
+using CollectionData = struct _CollectionData;
+using CollectTable = struct _CollectTable;
+using CollectWindow = struct _CollectWindow;
-typedef struct _ImageWindow ImageWindow;
+using ImageWindow = struct _ImageWindow;
-typedef struct _FileData FileData;
-typedef struct _FileDataChangeInfo FileDataChangeInfo;
+using FileData = struct _FileData;
+using FileDataChangeInfo = struct _FileDataChangeInfo;
-typedef struct _LayoutWindow LayoutWindow;
-typedef struct _LayoutOptions LayoutOptions;
+using LayoutWindow = struct _LayoutWindow;
+using LayoutOptions = struct _LayoutOptions;
-typedef struct _ViewDir ViewDir;
-typedef struct _ViewDirInfoList ViewDirInfoList;
-typedef struct _ViewDirInfoTree ViewDirInfoTree;
+using ViewDir = struct _ViewDir;
+using ViewDirInfoList = struct _ViewDirInfoList;
+using ViewDirInfoTree = struct _ViewDirInfoTree;
-typedef struct _ViewFile ViewFile;
-typedef struct _ViewFileInfoList ViewFileInfoList;
-typedef struct _ViewFileInfoIcon ViewFileInfoIcon;
+using ViewFile = struct _ViewFile;
+using ViewFileInfoList = struct _ViewFileInfoList;
+using ViewFileInfoIcon = struct _ViewFileInfoIcon;
-typedef struct _SlideShowData SlideShowData;
-typedef struct _FullScreenData FullScreenData;
+using SlideShowData = struct _SlideShowData;
+using FullScreenData = struct _FullScreenData;
-typedef struct _PixmapFolders PixmapFolders;
-typedef struct _Histogram Histogram;
-typedef struct _HistMap HistMap;
+using PixmapFolders = struct _PixmapFolders;
+using Histogram = struct _Histogram;
+using HistMap = struct _HistMap;
-typedef struct _SecureSaveInfo SecureSaveInfo;
+using SecureSaveInfo = struct _SecureSaveInfo;
-typedef struct _ExifData ExifData;
+struct ExifData;
-typedef struct _EditorDescription EditorDescription;
+using EditorDescription = struct _EditorDescription;
-typedef struct _CommandLine CommandLine;
+using CommandLine = struct _CommandLine;
struct _Histogram {
gint histogram_channel; /**< drawing mode for histogram */
struct _ImageLoader;
-typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
+using ThumbLoaderFunc = void (*)(ThumbLoader *, gpointer);
-typedef void (* FileUtilDoneFunc)(gboolean success, const gchar *done_path, gpointer data);
+using FileUtilDoneFunc = void (*)(gboolean, const gchar *, gpointer);
struct _ThumbLoader
{
CollectionData *cd;
};
-typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
- gint width, gint height, GdkPixbuf *pixbuf, gpointer);
-typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
- gint width, gint height, GdkPixbuf *pixbuf, gpointer);
+using ImageTileRequestFunc = gint (*)(ImageWindow *, gint, gint, gint, gint, GdkPixbuf *, gpointer);
+using ImageTileDisposeFunc = void (*)(ImageWindow *, gint, gint, gint, gint, GdkPixbuf *, gpointer);
struct _ImageWindow
{
/**
* @struct _hard_coded_window_keys
* @brief hard coded window shortcut keys
- *
+ *
* Used for two purposes:\n
* to display the shortcuts keys in popup menus\n
* used by ./doc/create-shortcuts-xml.sh to generate shortcut documentation in the Help files
- *
+ *
*/
-typedef struct _hard_coded_window_keys hard_coded_window_keys;
+using hard_coded_window_keys = struct _hard_coded_window_keys;
struct _hard_coded_window_keys {
GdkModifierType mask; /**< modifier key mask */
guint key_value; /**< GDK_keyval */
#define MARKER_PATH "[path]"
#define MARKER_ICON "[icon]"
-typedef struct _BookMarkData BookMarkData;
-typedef struct _BookButtonData BookButtonData;
-typedef struct _BookPropData BookPropData;
+struct BookButtonData;
-struct _BookMarkData
+struct BookMarkData
{
GtkWidget *widget;
GtkWidget *box;
BookButtonData *active_button;
};
-struct _BookButtonData
+struct BookButtonData
{
GtkWidget *button;
GtkWidget *image;
gchar *parent;
};
-struct _BookPropData
+struct BookPropData
{
GtkWidget *name_entry;
GtkWidget *path_entry;
*-----------------------------------------------------------------------------
*/
-typedef struct _HistoryComboData HistoryComboData;
-struct _HistoryComboData
+struct HistoryComboData
{
GtkWidget *combo;
GtkWidget *entry;
/* Download web file
*/
-typedef struct _WebData WebData;
-struct _WebData
+struct WebData
{
GenericDialog *gd;
GCancellable *cancellable;
* @brief Retrieves the internal scale factor that maps from window coordinates to the actual device pixels
* @param -
* @returns scale factor
- *
- *
+ *
+ *
*/
gint scale_factor()
{
#define DATE_SELECION_KEY "date_selection_data"
-typedef struct _DateSelection DateSelection;
-struct _DateSelection
+struct DateSelection
{
GtkWidget *box;
time_t date_selection_time_get(GtkWidget *widget);
-typedef enum {
+enum SizerPositionType {
SIZER_POS_LEFT = 1 << 0,
SIZER_POS_RIGHT = 1 << 1,
SIZER_POS_TOP = 1 << 2,
SIZER_POS_BOTTOM = 1 << 3
-} SizerPositionType;
+};
void sizer_set_limits(GtkWidget *sizer,
gint hsize_min, gint hsize_max,
FILTER_COLUMN_FILTER
};
-typedef struct _Dest_Data Dest_Data;
-struct _Dest_Data
+struct Dest_Data
{
GtkWidget *d_view;
GtkWidget *f_view;
GenericDialog *gd; /* any open confirm dialogs ? */
};
-typedef struct _DestDel_Data DestDel_Data;
-struct _DestDel_Data
+struct DestDel_Data
{
Dest_Data *dd;
gchar *path;
*-----------------------------------------------------------------------------
*/
-typedef struct _SpinnerData SpinnerData;
-struct _SpinnerData {
+struct SpinnerData {
GtkWidget *image;
GList *list; /* list of pixbufs */
guint frame;
* ----------------------------------------------------------------
*/
-typedef struct _TabCompData TabCompData;
-struct _TabCompData
+struct TabCompData
{
GtkWidget *entry;
gchar *dir_path;
#define AUTO_SCROLL_DEFAULT_SPEED 100
#define AUTO_SCROLL_DEFAULT_REGION 20
-typedef struct _AutoScrollData AutoScrollData;
-struct _AutoScrollData
+struct AutoScrollData
{
guint timer_id; /* event source id */
gint region_size;
#define UI_TREE_EDIT_H
-typedef struct _TreeEditData TreeEditData;
-struct _TreeEditData
+struct TreeEditData
{
GtkWidget *window;
GtkWidget *entry;
*-----------------------------------------------------------------------------
*/
-typedef struct _DialogWindow DialogWindow;
-struct _DialogWindow
+struct DialogWindow
{
gint x;
gint y;
* 2. arm AppImage - e.g. Geeqie-v2.0+20221025-aarch64.AppImage
*/
-typedef struct _AppImageData AppImageData;
-struct _AppImageData
+struct AppImageData
{
GFile *version_file;
GDataInputStream *data_input_stream;
#define GENERIC_DIALOG(gd) ((GenericDialog *)gd)
-typedef struct _GenericDialog GenericDialog;
-struct _GenericDialog
+struct GenericDialog
{
GtkWidget *dialog; /**< window */
GtkWidget *vbox; /**< place to add widgets */
};
-typedef struct _FileDialog FileDialog;
-struct _FileDialog
+struct FileDialog
{
GenericDialog gd;
};
static gint target_types_n = 4;
-typedef struct _ClipboardData ClipboardData;
-struct _ClipboardData
+struct ClipboardData
{
GList *path_list; /**< g_strdup(fd->path) */
gboolean quoted;
-typedef enum {
+enum UtilityType {
UTILITY_TYPE_COPY,
UTILITY_TYPE_MOVE,
UTILITY_TYPE_RENAME,
UTILITY_TYPE_DELETE_FOLDER,
UTILITY_TYPE_CREATE_FOLDER,
UTILITY_TYPE_WRITE_METADATA
-} UtilityType;
+};
-typedef enum {
+enum UtilityPhase {
UTILITY_PHASE_START = 0,
UTILITY_PHASE_INTERMEDIATE,
UTILITY_PHASE_ENTERING,
UTILITY_PHASE_DONE,
UTILITY_PHASE_CANCEL,
UTILITY_PHASE_DISCARD
-} UtilityPhase;
+};
enum {
UTILITY_RENAME = 0,
UTILITY_RENAME_FORMATTED
};
-typedef struct _UtilityDataMessages UtilityDataMessages;
-struct _UtilityDataMessages {
+struct UtilityDataMessages {
const gchar *title;
const gchar *question;
const gchar *desc_flist;
const gchar *fail;
};
-typedef struct _UtilityData UtilityData;
-
-struct _UtilityData {
+struct UtilityData {
UtilityType type;
UtilityPhase phase;
UTILITY_COLUMN_COUNT
};
-typedef struct _UtilityDelayData UtilityDelayData;
-
-struct _UtilityDelayData {
+struct UtilityDelayData {
UtilityType type;
UtilityPhase phase;
GList *flist;
#define VDTREE(_vd_) ((ViewDirInfoTree *)(_vd_->info))
-typedef struct _PathData PathData;
-struct _PathData
+struct PathData
{
gchar *name;
FileData *node;
#ifndef VIEW_DIR_TREE_H
#define VIEW_DIR_TREE_H
-typedef struct _NodeData NodeData;
-struct _NodeData
+struct NodeData
{
FileData *fd;
gboolean expanded;
*-----------------------------------------------------------------------------
*/
-typedef struct _ColumnData ColumnData;
-struct _ColumnData
+struct ColumnData
{
ViewFile *vf;
gint number;
* misc
*-----------------------------------------------------------------------------
*/
-typedef struct {
+struct ViewFileFindRowData {
FileData *fd;
GtkTreeIter *iter;
gboolean found;
gint row;
-} ViewFileFindRowData;
+};
static gboolean vflist_find_row_cb(GtkTreeModel *model, GtkTreePath *UNUSED(path), GtkTreeIter *iter, gpointer data)
{
vf_refresh_idle(vf);
}
-typedef struct _MarksTextEntry MarksTextEntry;
-struct _MarksTextEntry {
+struct MarksTextEntry {
GenericDialog *gd;
gint mark_no;
GtkWidget *edit_widget;
*-----------------------------------------------------------------------------
*/
-typedef struct _HelpSearchData HelpSearchData;
-struct _HelpSearchData {
+struct HelpSearchData {
GenericDialog *gd;
GtkWidget *edit_widget;
gchar *text_entry;
#endif
#endif
-typedef enum {
+enum ZDLookupResult {
ZD_LOOKUP_IGNORE = -3,
ZD_LOOKUP_END = -2,
ZD_LOOKUP_PARSE_ERROR = -1,
ZD_LOOKUP_IN_EXCLUDED_ZONE = 2,
ZD_LOOKUP_ON_BORDER_VERTEX = 3,
ZD_LOOKUP_ON_BORDER_SEGMENT = 4
-} ZDLookupResult;
+};
-typedef struct {
+struct ZoneDetectResult {
ZDLookupResult lookupResult;
uint32_t polygonId;
uint8_t numFields;
char **fieldNames;
char **data;
-} ZoneDetectResult;
+};
struct ZoneDetectOpaque;
-typedef struct ZoneDetectOpaque ZoneDetect;
+using ZoneDetect = struct ZoneDetectOpaque;
#ifdef __cplusplus
extern "C" {