aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-curses/curses-icons.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-16 22:30:35 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-16 22:30:35 +0200
commit8744502cbe42c98422a798c06f4c8ce033725412 (patch)
tree58141e513fa0a066944be0229cfa3c649f934f8d /src/interface-curses/curses-icons.h
parentbc859a06a13b24daea12d35df2a1ec5114b42180 (diff)
downloadsciteco-8744502cbe42c98422a798c06f4c8ce033725412.tar.gz
Curses: added support for cool Unicode icons (refs #5)
* Practically requires one of the "Nerd Font" fonts, so it's disabled by default. Add 0,512ED to the profile to enable them. * The new ED flag could be used to control Gtk icons as well, but they are left always-enabled for the time being. Is there any reason anybody would like to disable icons in Gtk? * The list of icons has been adapted and extended from exa: https://github.com/ogham/exa/blob/master/src/output/icons.rs * The icons are hardcoded as presorted lists, so we can binary search them. This could change in the future. If there is any demand, they could be made configurable via Q-Registers as well.
Diffstat (limited to 'src/interface-curses/curses-icons.h')
-rw-r--r--src/interface-curses/curses-icons.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/interface-curses/curses-icons.h b/src/interface-curses/curses-icons.h
new file mode 100644
index 0000000..c1be06f
--- /dev/null
+++ b/src/interface-curses/curses-icons.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2012-2024 Robin Haberkorn
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include <glib.h>
+
+/**
+ * Q-Register icon.
+ * 0xf04cf would look more similar to the current Gtk icon.
+ */
+#define TECO_CURSES_ICONS_QREG 0xe236 /*  */
+
+gunichar teco_curses_icons_lookup_file(const gchar *filename);
+gunichar teco_curses_icons_lookup_dir(const gchar *dirname);