├── DCO.txt
├── editor
├── po
│ ├── LINGUAS
│ ├── meson.build
│ └── POTFILES
├── src
│ ├── config.rs.in
│ ├── lib
│ │ ├── mod.rs
│ │ └── closeable_tab.rs
│ ├── components
│ │ ├── window
│ │ │ ├── sidebar.rs
│ │ │ ├── window.blp
│ │ │ ├── imp.rs
│ │ │ ├── mod.rs
│ │ │ ├── window.ui
│ │ │ ├── menu.blp
│ │ │ ├── menubar.rs
│ │ │ ├── workspace.rs
│ │ │ └── file.rs
│ │ ├── mod.rs
│ │ ├── editor
│ │ │ ├── editor.blp
│ │ │ ├── imp.rs
│ │ │ └── mod.rs
│ │ ├── tab_label
│ │ │ └── tab-label.ui
│ │ └── sidebar
│ │ │ ├── mod.rs
│ │ │ ├── imp.rs
│ │ │ └── sidebar.blp
│ ├── echidna.gresource.xml
│ ├── main.rs
│ └── meson.build
├── data
│ ├── io.fortressia.Echidna.desktop.in
│ ├── io.fortressia.Echidna.gschema.xml
│ ├── icons
│ │ ├── meson.build
│ │ └── hicolor
│ │ │ └── scalable
│ │ │ └── apps
│ │ │ └── io.fortressia.Echidna.svg
│ ├── io.fortressia.Echidna.appdata.xml.in
│ └── meson.build
├── Cargo.toml
├── meson.build
└── build-aux
│ └── cargo.sh
├── Cargo.toml
├── assets
└── io.fortressia.Echidna.Source.png
├── subprojects
└── blueprint-compiler.wrap
├── .gitignore
├── .pre-commit-config.yaml
├── .gitea
├── PULL_REQUEST_TEMPLATE.md
└── issue_templates
│ ├── Feature Request.md
│ └── Bug.md
├── .vscode
└── settings.json
├── meson.build
├── io.fortressia.Echidna.json
├── CONTRIBUTING.md
├── README.md
├── COPYING
└── Cargo.lock
/DCO.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/editor/po/LINGUAS:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [workspace]
2 |
3 | members = [
4 | "editor"
5 | ]
--------------------------------------------------------------------------------
/editor/po/meson.build:
--------------------------------------------------------------------------------
1 | i18n.gettext('echidna', preset: 'glib')
2 |
--------------------------------------------------------------------------------
/editor/po/POTFILES:
--------------------------------------------------------------------------------
1 | data/io.fortressia.Echidna.gschema.xml
2 | src/window/window.ui
3 |
--------------------------------------------------------------------------------
/assets/io.fortressia.Echidna.Source.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asteria-archive-otori/Echidna/HEAD/assets/io.fortressia.Echidna.Source.png
--------------------------------------------------------------------------------
/editor/src/config.rs.in:
--------------------------------------------------------------------------------
1 | pub static VERSION: &str = @VERSION@;
2 | pub static GETTEXT_PACKAGE: &str = @GETTEXT_PACKAGE@;
3 | pub static LOCALEDIR: &str = @LOCALEDIR@;
4 | pub static PKGDATADIR: &str = @PKGDATADIR@;
5 |
--------------------------------------------------------------------------------
/editor/data/io.fortressia.Echidna.desktop.in:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=Echidna Code
3 | Exec=echidna
4 | Icon=io.Echidna.Fortressia
5 | Terminal=false
6 | Type=Application
7 | Categories=GTK;Technology
8 | StartupNotify=true
9 |
--------------------------------------------------------------------------------
/editor/data/io.fortressia.Echidna.gschema.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/subprojects/blueprint-compiler.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = blueprint-compiler
3 | url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git
4 | revision = main
5 | depth = 1
6 |
7 | [provide]
8 | program_names = blueprint-compiler
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | editor/src/config.rs
3 | /subprojects/*
4 | build
5 | !/subprojects/*.wrap
6 | # Flatpak
7 | .flatpak-builder
8 | build-dir
9 | _build
10 | .flatpak
11 |
12 |
13 | /subprojects/blueprint-compiler
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | repos:
2 | - repo: https://github.com/commitizen-tools/commitizen
3 | rev: v2.20.0
4 | hooks:
5 | - id: commitizen
6 | stages: [commit-msg]
7 | - repo: https://github.com/doublify/pre-commit-rust
8 | rev: v1.0
9 | hooks:
10 | - id: fmt
11 | - id: cargo-check
12 |
--------------------------------------------------------------------------------
/.gitea/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | # Description
2 |
3 | Please write down a clear and concise description of this Merge Request.
4 |
5 | # Closes
6 |
7 | Please write down the issues that this MR closes.
8 |
9 | # Implementation Insight
10 |
11 | Please write down how did you implement this in a clear and concise manner.
12 |
13 | # TO-DOs
14 |
15 | A list of TO-DOs of things you have did before the MR is undrafted.
--------------------------------------------------------------------------------
/editor/src/lib/mod.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | // We're using libadwaita now, no need for a custom closeable_tab
6 | // pub mod closeable_tab;
7 |
8 | pub mod prelude {
9 | // pub use super::closeable_tab::*;
10 | }
11 |
--------------------------------------------------------------------------------
/editor/src/components/window/sidebar.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | trait SidebarImplementedEditor {
6 | fn setup_sidebar();
7 | }
8 |
9 | impl SidebarImplementedEditor for super::imp::EchidnaEditor {
10 | fn setup_sidebar() {}
11 | }
12 |
--------------------------------------------------------------------------------
/editor/data/icons/meson.build:
--------------------------------------------------------------------------------
1 | application_id = 'io.fortressia.Echidna'
2 |
3 | scalable_dir = join_paths('hicolor', 'scalable', 'apps')
4 | install_data(
5 | join_paths(scalable_dir, ('@0@.svg').format(application_id)),
6 | install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir)
7 | )
8 |
9 | #symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
10 | #install_data(
11 | # join_paths(symbolic_dir, ('@0@-symbolic.svg').format(application_id)),
12 | # install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir)
13 | #)
14 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.watcherExclude": {
3 | "**/.git/objects/**": true,
4 | "**/.git/subtree-cache/**": true,
5 | "**/node_modules/*/**": true,
6 | "**/.hg/store/**": true,
7 | ".flatpak/**": true,
8 | "_build/**": true
9 | },
10 | "mesonbuild.configureOnOpen": false,
11 | "mesonbuild.buildFolder": "_build",
12 |
13 | "rust-analyzer.runnables.cargoExtraArgs": [
14 | "--target-dir=_build/src"
15 | ],
16 | "rust-analyzer.files.excludeDirs": [
17 | ".flatpak"
18 | ]
19 | }
--------------------------------------------------------------------------------
/editor/src/components/mod.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | pub mod editor;
6 | pub mod sidebar;
7 | // pub mod tab_label;
8 | pub mod window;
9 |
10 | pub use editor::EchidnaCoreEditor;
11 | pub use sidebar::EchidnaSidebar;
12 | // pub use tab_label::TabLabel;
13 | pub use window::EchidnaWindow;
14 |
15 | pub mod prelude {
16 | pub use super::window::{file::*, menubar::*};
17 | }
18 |
--------------------------------------------------------------------------------
/editor/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "echidna"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 |
8 | [dependencies]
9 | serde_json = "^1.0.68"
10 | serde = { version = "^1.0.130", features = ["derive"] }
11 | adw = { package = "libadwaita", version = "^0.1" }
12 | relative-path = "^1.5.0"
13 | sourceview = { package = "sourceview5", version = "^0.4" }
14 | once_cell = "1"
15 | gtk = { package = "gtk4", version = "^0.4" }
16 | gettext-rs = { version = "0.7", features = ["gettext-system"] }
17 |
--------------------------------------------------------------------------------
/editor/src/components/editor/editor.blp:
--------------------------------------------------------------------------------
1 | using Gtk 4.0;
2 | using GtkSource 5;
3 | template EchidnaCoreEditor : Gtk.Box {
4 | vexpand: true;
5 | hexpand: true;
6 | orientation: horizontal;
7 |
8 | Gtk.ScrolledWindow {
9 | GtkSource.View sourceview {
10 | vexpand: true;
11 | hexpand: true;
12 | show-line-numbers: true;
13 | show-line-marks: true;
14 | buffer: GtkSource.Buffer {
15 |
16 | };
17 | }
18 | }
19 | GtkSource.Map minimap {
20 | view: sourceview;
21 | }
22 | }
--------------------------------------------------------------------------------
/editor/meson.build:
--------------------------------------------------------------------------------
1 | project('echidna', 'rust',
2 | version: '0.1.0',
3 | meson_version: '>= 0.59.0',
4 | default_options: [ 'warning_level=2',
5 | ],
6 | )
7 |
8 | i18n = import('i18n')
9 |
10 | gnome = import('gnome')
11 |
12 | dependency('gtk4')
13 | dependency('libadwaita-1')
14 | dependency('gio-2.0', version: '>=2.66')
15 | dependency('glib-2.0', version: '>=2.66')
16 | dependency('gtksourceview-5')
17 |
18 |
19 | subdir('data')
20 | subdir('src')
21 | subdir('po')
22 |
23 | gnome.post_install(
24 | glib_compile_schemas: true,
25 | gtk_update_icon_cache: true,
26 | update_desktop_database: true,
27 | )
28 |
--------------------------------------------------------------------------------
/editor/src/echidna.gresource.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | components/window/window.ui
5 | components/sidebar/sidebar.ui
6 | components/editor/editor.ui
7 | components/tab_label/tab-label.ui
8 | components/window/menu.ui
9 |
10 |
--------------------------------------------------------------------------------
/editor/data/io.fortressia.Echidna.appdata.xml.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | io.fortressia.Echidna
5 | CC0-1.0
6 | MPL-2.0
7 |
8 | A cross-platform code editor that's designed to be user-friendly.
9 |
10 | Designed for the GNOME desktop. Works on all systems.
11 |
12 |
13 | echidna
14 |
15 |
16 | https://github.com/EchidnaHQ/Echidna
17 | Nefo Fortressia
18 |
19 |
--------------------------------------------------------------------------------
/meson.build:
--------------------------------------------------------------------------------
1 | project('echidna', 'rust',
2 | version: '0.1.0',
3 | meson_version: '>= 0.59.0',
4 | default_options: [ 'warning_level=2',
5 | ],
6 | )
7 |
8 |
9 | dependency('gtk4')
10 | dependency('libadwaita-1')
11 | dependency('gio-2.0', version: '>=2.66')
12 | dependency('glib-2.0', version: '>=2.66')
13 | dependency('gtksourceview-5')
14 |
15 | i18n = import('i18n')
16 |
17 | gnome = import('gnome')
18 |
19 |
20 | subdir(join_paths('editor', 'data'))
21 | subdir(join_paths('editor', 'src'))
22 | subdir(join_paths('editor', 'po'))
23 |
24 | gnome.post_install(
25 | glib_compile_schemas: true,
26 | gtk_update_icon_cache: true,
27 | update_desktop_database: true,
28 | )
29 |
--------------------------------------------------------------------------------
/editor/src/components/tab_label/tab-label.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 | GTK_ORIENTATION_HORIZONTAL
10 |
11 |
12 | 0
13 | window-close-symbolic
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/editor/build-aux/cargo.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | export MESON_BUILD_ROOT="$1"
4 |
5 | export CARGO_HOME="$MESON_BUILD_ROOT/cargo-home"
6 |
7 | export MESON_SOURCE_ROOT="$2"
8 | export CARGO_TARGET_DIR="$MESON_BUILD_ROOT"/target
9 | export OUTPUT="$3"
10 | export BUILDTYPE="$4"
11 | export APP_BIN="$5"
12 |
13 |
14 | if [ $BUILDTYPE = "release" ]
15 | then
16 | echo "RELEASE MODE"
17 | cargo build --manifest-path \
18 | "$MESON_SOURCE_ROOT"/editor/Cargo.toml --release && \
19 | cp "$CARGO_TARGET_DIR"/release/"$APP_BIN" "$OUTPUT"
20 | else
21 |
22 | echo "DEBUG MODE"
23 | cargo build --manifest-path \
24 | "$MESON_SOURCE_ROOT"/editor/Cargo.toml && \
25 | cp "$CARGO_TARGET_DIR"/debug/"$APP_BIN" "$OUTPUT"
26 | fi
27 |
28 |
--------------------------------------------------------------------------------
/editor/src/components/sidebar/mod.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | pub mod imp;
6 | use crate::prelude::*;
7 | glib::wrapper! {
8 | pub struct EchidnaSidebar(ObjectSubclass)
9 | @extends gtk::Box, gtk::Widget,
10 | @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Orientable;
11 | }
12 |
13 | impl EchidnaSidebar {
14 | pub fn new() -> Self {
15 | glib::Object::new(&[]).expect("Failed to create 'EchidnaSidebar' component.")
16 | }
17 | }
18 |
19 | impl Default for EchidnaSidebar {
20 | #[inline]
21 | fn default() -> Self {
22 | Self::new()
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/editor/src/components/sidebar/imp.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 | use crate::prelude::*;
5 |
6 | use gtk::subclass::prelude::*;
7 | use gtk::CompositeTemplate;
8 |
9 | #[derive(Default, CompositeTemplate)]
10 | #[template(resource = "/io/fortressia/Echidna/components/sidebar/sidebar.ui")]
11 | pub struct EchidnaSidebar {}
12 |
13 | #[glib::object_subclass]
14 | impl ObjectSubclass for EchidnaSidebar {
15 | const NAME: &'static str = "EchidnaSidebar";
16 | type Type = super::EchidnaSidebar;
17 | type ParentType = gtk::Box;
18 |
19 | #[inline]
20 | fn class_init(klass: &mut Self::Class) {
21 | Self::bind_template(klass);
22 | }
23 |
24 | #[inline]
25 | fn instance_init(obj: &glib::subclass::InitializingObject) {
26 | obj.init_template();
27 | }
28 | }
29 |
30 | impl ObjectImpl for EchidnaSidebar {}
31 | impl WidgetImpl for EchidnaSidebar {}
32 | impl BoxImpl for EchidnaSidebar {}
33 |
--------------------------------------------------------------------------------
/.gitea/issue_templates/Feature Request.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | name: Feature Request
4 | about: Request a new feature or support that can be implemented into Echidna.
5 | title: "feat: "
6 | ref: main
7 | labels:
8 |
9 | - enhancement
10 |
11 | ---
12 |
13 | ## Description
14 |
15 | Please write a clear and concise description of the issue you are getting.
16 |
17 | ## Necessity
18 |
19 | Please write down why this feature should be implemented.
20 |
21 | ## Implementation
22 | Please write down a technical description on how we should implement this feature.
23 |
24 | If this is unneened, please leave this blank.
25 |
26 | ### Example
27 |
28 | The URI template is as below. The `GUID` parameter is for the guid of the server. If there is any, the server's password can be set using the `PASSWD` argument. The mode can be set too with the `MODE` argument. The `MODE` argument can be set with either `player`, `spectactor`, or `commander`.
29 |
30 | ```
31 | mod://connect/GUID?passwd=PASSWD&mode=MODE
32 | ```
33 |
34 | ## Additional Notes and Information
35 |
36 | Please write down any additional notes and information you find useful. Leave blank if you don't have any.
37 |
38 |
39 |
--------------------------------------------------------------------------------
/editor/src/components/window/window.blp:
--------------------------------------------------------------------------------
1 | using Gtk 4.0;
2 | using Adw 1;
3 | template EchidnaWindow : Adw.ApplicationWindow {
4 | title: _("Echidna Code");
5 | default-width: 800;
6 | default-height: 600;
7 |
8 | Gtk.Box echidna-root {
9 | orientation: vertical;
10 |
11 | Adw.HeaderBar {
12 |
13 | }
14 |
15 | Gtk.Box main-ui {
16 | orientation: vertical;
17 |
18 | Gtk.Box bars-box {
19 | vexpand: true;
20 |
21 | .EchidnaSidebar sidebar {
22 |
23 | }
24 |
25 | Gtk.Box {
26 | orientation: vertical;
27 |
28 | Adw.TabBar tab_bar {
29 | hexpand: true;
30 | view: tab_view;
31 | }
32 |
33 | Adw.TabView tab_view {
34 | vexpand: true;
35 | }
36 | }
37 | }
38 |
39 | Gtk.Statusbar status-bar {
40 | margin-start: 10;
41 | margin-end: 10;
42 | margin-top: 6;
43 | margin-bottom: 6;
44 | }
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/editor/src/components/sidebar/sidebar.blp:
--------------------------------------------------------------------------------
1 | using Gtk 4.0;
2 |
3 | template EchidnaSidebar : Gtk.Box {
4 | orientation: horizontal;
5 |
6 | Gtk.StackSidebar {
7 | stack: sidebar_stack;
8 | }
9 |
10 | Gtk.Stack sidebar_stack {
11 | hhomogeneous: true;
12 | width-request: 170;
13 |
14 | Gtk.StackPage {
15 | name: "explorer";
16 | title: _("Explorer");
17 | child: Gtk.Box {
18 | orientation: vertical;
19 |
20 | Gtk.Label {
21 | label: _("Explorer");
22 | }
23 | };
24 | }
25 |
26 | Gtk.StackPage {
27 | name: "search";
28 | title: _("Search");
29 | child: Gtk.Box {
30 | orientation: vertical;
31 |
32 | Gtk.Label {
33 | label: _("Search");
34 | }
35 | };
36 | }
37 |
38 | Gtk.StackPage {
39 | name: "extensions";
40 | title: _("Extensions");
41 |
42 | child: Gtk.Box {
43 | orientation: vertical;
44 |
45 | Gtk.Label {
46 | label: _("Extensions");
47 | }
48 | };
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/editor/data/meson.build:
--------------------------------------------------------------------------------
1 | desktop_file = i18n.merge_file(
2 | input: 'io.fortressia.Echidna.desktop.in',
3 | output: 'io.fortressia.Echidna.desktop',
4 | type: 'desktop',
5 | po_dir: '../po',
6 | install: true,
7 | install_dir: join_paths(get_option('datadir'), 'applications')
8 | )
9 |
10 | desktop_utils = find_program('desktop-file-validate', required: false)
11 | if desktop_utils.found()
12 | test('Validate desktop file', desktop_utils,
13 | args: [desktop_file]
14 | )
15 | endif
16 |
17 | appstream_file = i18n.merge_file(
18 | input: 'io.fortressia.Echidna.appdata.xml.in',
19 | output: 'io.fortressia.Echidna.appdata.xml',
20 | po_dir: '../po',
21 | install: true,
22 | install_dir: join_paths(get_option('datadir'), 'appdata')
23 | )
24 |
25 | appstream_util = find_program('appstream-util', required: false)
26 | if appstream_util.found()
27 | test('Validate appstream file', appstream_util,
28 | args: ['validate', appstream_file]
29 | )
30 | endif
31 |
32 | install_data('io.fortressia.Echidna.gschema.xml',
33 | install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
34 | )
35 |
36 | compile_schemas = find_program('glib-compile-schemas', required: false)
37 | if compile_schemas.found()
38 | test('Validate schema file', compile_schemas,
39 | args: ['--strict', '--dry-run', meson.current_source_dir()]
40 | )
41 | endif
42 |
43 | subdir('icons')
44 |
--------------------------------------------------------------------------------
/io.fortressia.Echidna.json:
--------------------------------------------------------------------------------
1 | {
2 | "app-id": "io.fortressia.Echidna",
3 | "runtime": "org.gnome.Platform",
4 | "runtime-version": "42",
5 | "sdk": "org.gnome.Sdk",
6 | "sdk-extensions": [
7 | "org.freedesktop.Sdk.Extension.rust-stable"
8 | ],
9 | "command": "echidna",
10 | "finish-args": [
11 | "--share=network",
12 | "--share=ipc",
13 | "--socket=fallback-x11",
14 | "--device=dri",
15 | "--socket=wayland"
16 | ],
17 | "build-options": {
18 | "append-path": "/usr/lib/sdk/rust-stable/bin",
19 | "build-args": [
20 | "--share=network"
21 | ],
22 | "env": {
23 | "RUST_BACKTRACE": "1",
24 | "RUST_LOG": "echidna=debug"
25 | }
26 | },
27 | "cleanup": [
28 | "/include",
29 | "/lib/pkgconfig",
30 | "/man",
31 | "/share/doc",
32 | "/share/gtk-doc",
33 | "/share/man",
34 | "/share/pkgconfig",
35 | "*.la",
36 | "*.a"
37 | ],
38 | "modules": [
39 | {
40 | "name": "echidna",
41 | "builddir": true,
42 | "buildsystem": "meson",
43 | "sources": [
44 | {
45 | "type": "git",
46 | "path": ".",
47 | "url": "https://github.com/fortressia/Echidna"
48 | }
49 | ]
50 | },
51 | {
52 | "name": "blueprint-compiler",
53 | "buildsystem": "meson",
54 | "sources": [
55 | {
56 | "type": "git",
57 | "url": "https://gitlab.gnome.org/jwestman/blueprint-compiler",
58 | "branch": "main"
59 | }
60 | ]
61 | }
62 | ]
63 | }
64 |
--------------------------------------------------------------------------------
/editor/src/components/window/imp.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 | use crate::prelude::*;
5 | pub use adw::subclass::prelude::*;
6 | use gtk::subclass::prelude::*;
7 | use gtk::CompositeTemplate;
8 | use std::cell::RefCell;
9 |
10 | #[derive(Debug, Default, CompositeTemplate)]
11 | #[template(resource = "/io/fortressia/Echidna/components/window/window.ui")]
12 | pub struct EchidnaWindow {
13 | #[template_child]
14 | pub tab_bar: TemplateChild,
15 | #[template_child]
16 | pub sidebar: TemplateChild,
17 | pub dialogs: RefCell>,
18 | }
19 |
20 | #[glib::object_subclass]
21 | impl ObjectSubclass for EchidnaWindow {
22 | const NAME: &'static str = "EchidnaWindow";
23 | type Type = super::EchidnaWindow;
24 | type ParentType = adw::ApplicationWindow;
25 |
26 | fn class_init(class: &mut Self::Class) {
27 | Self::bind_template(class);
28 | }
29 |
30 | fn instance_init(obj: &glib::subclass::InitializingObject) {
31 | obj.init_template();
32 | }
33 | }
34 |
35 | impl ObjectImpl for EchidnaWindow {}
36 |
37 | impl WidgetImpl for EchidnaWindow {}
38 |
39 | impl WindowImpl for EchidnaWindow {}
40 |
41 | impl ApplicationWindowImpl for EchidnaWindow {}
42 |
43 | impl AdwApplicationWindowImpl for EchidnaWindow {}
44 |
45 | impl BuildableImpl for EchidnaWindow {}
46 |
--------------------------------------------------------------------------------
/.gitea/issue_templates/Bug.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | name: Bug Report
4 | about: Report a bug affecting Echidna Code Editor
5 | title: bug:
6 | ref: main
7 | labels:
8 |
9 | - bug
10 | - help needed
11 | ---
12 |
13 | ## Description
14 |
15 | Please write a clear and concise description of the issue you are getting.
16 |
17 | ## Machine Information
18 |
19 | Please write down the specification of your machine.
20 |
21 | ### Example:
22 |
23 | **Device**: Lenovo ideapad 330S-14IKB 81F4\
24 | **Operating System**: Arch Linux rolling\
25 | **CPU**: Intel Core i7-7700K x86_64 (write down the CPU architechture too)\
26 | **Kernel**: 5.14.14-hardened1-1-hardened\
27 | **Desktop Environment**: N/A (Linux only; **explicitly** leave as N/A if you are using bare WM)\
28 | **Window Manager**: Sway 1.6.1-2 (Linux only)\
29 | **Install Method**: Arch User Repository (write down from where you installed the software)\
30 | **Desktop Server Protocol**: Wayland 1.19.0-2 (Linux only)
31 |
32 | If you believe that some of these informations are irrelevant (such as DE and WM information on Windows/MacOS, you may leave them out). Additionally, add information missing from the above example should it be important for the bug.
33 |
34 | ## Steps to Reproduce
35 |
36 | Please write down the steps to reproduce the issue.
37 |
38 | ## Expected Result
39 |
40 | Please write down the result you were expecting.
41 |
42 | ## Actual Result
43 |
44 | Please write down the result that you found.
45 |
46 | ## Screenshots
47 |
48 | Please attach screenshots here if there are any.
49 |
50 | ## Logs
51 |
52 | Please write down logs you found here if there are any.
53 |
54 | ## Additional Notes and Information
55 |
56 | Please write down any additional notes and information you find useful. Leave blank if you don't have any.
--------------------------------------------------------------------------------
/editor/src/main.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 | pub mod prelude {
5 | pub use super::components::prelude::*;
6 | pub use super::lib::prelude::*;
7 | pub use adw::prelude::*;
8 | pub use gtk::gdk;
9 | pub use gtk::gio;
10 | pub use gtk::glib;
11 | pub use gtk::prelude::*;
12 | }
13 |
14 | mod components;
15 | mod config;
16 | pub mod lib;
17 |
18 | use config::{GETTEXT_PACKAGE, LOCALEDIR, PKGDATADIR};
19 | use gettextrs::{bind_textdomain_codeset, bindtextdomain, textdomain};
20 | use gtk::prelude::ApplicationExtManual;
21 | use prelude::*;
22 |
23 | fn main() {
24 | bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR).expect("Unable to bind the text domain");
25 | bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8")
26 | .expect("Unable to set the text domain encoding");
27 | textdomain(GETTEXT_PACKAGE).expect("Unable to switch to the text domain");
28 |
29 | // Load resources
30 | let resources = gio::Resource::load(PKGDATADIR.to_owned() + "/echidna.gresource")
31 | .expect("Could not load resources");
32 | gio::resources_register(&resources);
33 |
34 | let app = adw::Application::new(
35 | Some("io.fortressia.Echidna"),
36 | gio::ApplicationFlags::FLAGS_NONE,
37 | );
38 |
39 | let style = app.style_manager();
40 |
41 | style.set_color_scheme(adw::ColorScheme::PreferDark);
42 |
43 | app.connect_activate(|app| {
44 | let window = components::EchidnaWindow::new(app);
45 |
46 | window.setup_menubar();
47 | window.set_application(Some(app));
48 |
49 | window.show();
50 | });
51 |
52 | std::process::exit(app.run());
53 | }
54 |
--------------------------------------------------------------------------------
/editor/src/lib/closeable_tab.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | use crate::components::tab_label::TabLabel;
6 | use crate::prelude::*;
7 | use glib::IsA;
8 | use gtk::Widget;
9 |
10 | pub trait ClosableTabImplementedNotebook {
11 | fn prepend_closable_page, U: IsA>(
12 | &self,
13 | child: &T,
14 | tab_label: Option<&U>,
15 | ) -> u32;
16 | fn append_closable_page, U: IsA>(
17 | &self,
18 | child: &T,
19 | tab_label: Option<&U>,
20 | ) -> u32;
21 | }
22 |
23 | impl ClosableTabImplementedNotebook for gtk::Notebook {
24 | fn prepend_closable_page, U: IsA>(
25 | &self,
26 | child: &T,
27 | tab_label: Option<&U>,
28 | ) -> u32 {
29 | let tab_label_widget = TabLabel::new(tab_label);
30 | let page = self.prepend_page(child, Some(&tab_label_widget));
31 |
32 | tab_label_widget
33 | .to_imp()
34 | .button
35 | .connect_clicked(glib::clone!(@weak self as notebook =>
36 | move |_| {
37 | notebook.remove_page(Some(page));
38 | }));
39 |
40 | page
41 | }
42 |
43 | fn append_closable_page, U: IsA>(
44 | &self,
45 | child: &T,
46 | tab_label: Option<&U>,
47 | ) -> u32 {
48 | let tab_label_widget = TabLabel::new(tab_label);
49 | let page = self.append_page(child, Some(&tab_label_widget));
50 |
51 | tab_label_widget
52 | .to_imp()
53 | .button
54 | .connect_clicked(glib::clone!(@weak self as notebook =>
55 | move |_| {
56 | notebook.remove_page(Some(page));
57 | }));
58 |
59 | page
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/editor/src/meson.build:
--------------------------------------------------------------------------------
1 | pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
2 | gnome = import('gnome')
3 |
4 |
5 | blueprints = custom_target('blueprints',
6 | input: files(
7 | join_paths('components', 'editor', 'editor.blp'),
8 | join_paths('components', 'sidebar', 'sidebar.blp'),
9 | join_paths('components', 'window', 'window.blp'),
10 | join_paths('components', 'window', 'menu.blp')
11 | ),
12 | output: '.',
13 | command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
14 | )
15 |
16 | gnome.compile_resources('echidna',
17 | 'echidna.gresource.xml',
18 | gresource_bundle: true,
19 | install: true,
20 | install_dir: pkgdatadir,
21 |
22 | dependencies: blueprints,
23 |
24 | )
25 |
26 |
27 | rust_sources = [
28 | 'main.rs',
29 | 'config.rs.in',
30 | 'components/editor/imp.rs',
31 | 'components/editor/mod.rs',
32 | 'components/sidebar/imp.rs',
33 | 'components/sidebar/mod.rs',
34 | 'components/window/file.rs',
35 | 'components/window/imp.rs',
36 | 'components/window/mod.rs',
37 | 'components/window/menubar.rs',
38 | 'components/window/sidebar.rs',
39 | ]
40 |
41 | conf = configuration_data()
42 | conf.set_quoted('VERSION', meson.project_version())
43 | conf.set_quoted('GETTEXT_PACKAGE', 'echidna')
44 | conf.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
45 | conf.set_quoted('PKGDATADIR', pkgdatadir)
46 |
47 | configure_file(
48 | input: 'config.rs.in',
49 | output: 'config.rs',
50 | configuration: conf
51 | )
52 |
53 | # Copy the config.rs output to the source directory.
54 | run_command(
55 | 'cp',
56 | join_paths(meson.project_build_root(), 'editor', 'src', 'config.rs'),
57 | join_paths(meson.project_source_root(), 'editor', 'src', 'config.rs'),
58 | check: true
59 | )
60 |
61 |
62 | cargo_script = find_program(join_paths(meson.project_source_root(), 'editor', 'build-aux', 'cargo.sh'))
63 | cargo_release = custom_target(
64 | 'cargo-build',
65 | build_by_default: true,
66 | input: rust_sources,
67 | output: meson.project_name(),
68 | console: true,
69 | install: true,
70 | install_dir: get_option('bindir'),
71 | command: [
72 | cargo_script,
73 | meson.project_build_root(),
74 | meson.project_source_root(),
75 | '@OUTPUT@',
76 | get_option('buildtype'),
77 | meson.project_name(),
78 | ]
79 | )
80 |
--------------------------------------------------------------------------------
/editor/src/components/editor/imp.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | use crate::prelude::*;
6 | use glib::{ParamFlags, ParamSpec, ParamSpecObject, Value};
7 |
8 | use gtk::{subclass::prelude::*, CompositeTemplate};
9 | use once_cell::sync::Lazy;
10 | use std::cell::RefCell;
11 |
12 | #[derive(Default, CompositeTemplate)]
13 | #[template(resource = "/io/fortressia/Echidna/components/editor/editor.ui")]
14 | pub struct EchidnaCoreEditor {
15 | #[template_child]
16 | pub minimap: TemplateChild,
17 | #[template_child]
18 | pub sourceview: TemplateChild,
19 | pub file: RefCell>,
20 | }
21 |
22 | #[glib::object_subclass]
23 | impl ObjectSubclass for EchidnaCoreEditor {
24 | const NAME: &'static str = "EchidnaCoreEditor";
25 | type Type = super::EchidnaCoreEditor;
26 | type ParentType = gtk::Box;
27 |
28 | fn class_init(class: &mut Self::Class) {
29 | Self::bind_template(class);
30 | }
31 |
32 | fn instance_init(obj: &glib::subclass::InitializingObject) {
33 | obj.init_template();
34 | }
35 | }
36 |
37 | impl ObjectImpl for EchidnaCoreEditor {
38 | fn properties() -> &'static [ParamSpec] {
39 | static PROPERTIES: Lazy> = Lazy::new(|| {
40 | vec![ParamSpecObject::new(
41 | "file",
42 | "file",
43 | "the file of the editor",
44 | sourceview::File::static_type(),
45 | ParamFlags::READWRITE,
46 | )]
47 | });
48 |
49 | PROPERTIES.as_ref()
50 | }
51 |
52 | fn set_property(&self, _obj: &Self::Type, _id: usize, value: &Value, spec: &ParamSpec) {
53 | match spec.name() {
54 | "file" => {
55 | let file: Option =
56 | value.get().expect("The file needs to be sourceview::File");
57 | self.file.replace(file);
58 | }
59 | _ => unimplemented!(),
60 | }
61 | }
62 |
63 | fn property(&self, _obj: &Self::Type, _id: usize, spec: &ParamSpec) -> Value {
64 | match spec.name() {
65 | "file" => self.file.borrow().to_value(),
66 | _ => unimplemented!(),
67 | }
68 | }
69 | }
70 | impl WidgetImpl for EchidnaCoreEditor {}
71 | impl BoxImpl for EchidnaCoreEditor {}
72 |
--------------------------------------------------------------------------------
/editor/src/components/window/mod.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | pub mod file;
6 | pub mod imp;
7 | pub mod menubar;
8 | use crate::prelude::*;
9 | use glib::object::{Cast, IsA};
10 | use gtk::subclass::prelude::*;
11 | use std::{error::Error, fmt};
12 |
13 | glib::wrapper! {
14 | pub struct EchidnaWindow(ObjectSubclass)
15 | @extends gtk::Widget, gtk::Window, gtk::ApplicationWindow,
16 | @implements gio::ActionGroup, gio::ActionMap, gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager;
17 | }
18 |
19 | impl EchidnaWindow {
20 | pub fn new>(application: &P) -> Self {
21 | let object = glib::Object::new(&[("application", &application)]);
22 |
23 | match object {
24 | Ok(o) => o,
25 | Err(e) => panic!("Error in making EchidnaApplication {}", e),
26 | }
27 | }
28 |
29 | pub fn to_imp(&self) -> &imp::EchidnaWindow {
30 | imp::EchidnaWindow::from_instance(self)
31 | }
32 |
33 | pub fn get_current_tab>(&self) -> Result> {
34 | let window_imp = self.to_imp();
35 | let tab_bar = &window_imp.tab_bar;
36 | let view = tab_bar.view().expect("No view in tab barr");
37 | let page = view.selected_page();
38 |
39 | match page {
40 | None => {
41 | #[derive(Debug)]
42 | struct Error {}
43 |
44 | impl fmt::Display for Error {
45 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
46 | write!(f, "No tabs are currently opened, maybe there are no tabs.")
47 | }
48 | }
49 |
50 | impl std::error::Error for Error {}
51 |
52 | Err(Box::new(Error {}))
53 | }
54 | Some(page) => match page.child().downcast:: () {
55 | Ok(page) => Ok(page),
56 | Err(widget) => {
57 | #[derive(Debug)]
58 | struct Error {
59 | widget: gtk::Widget,
60 | }
61 |
62 | impl std::error::Error for Error {}
63 |
64 | impl fmt::Display for Error {
65 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
66 | write!(f, "Cannot downcast {:#?} to type parameter A. Maybe it's not in the type you are looking for.", self.widget)
67 | }
68 | }
69 |
70 | Err(Box::new(Error { widget }))
71 | }
72 | },
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/editor/src/components/window/window.ui:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 | Echidna Code Editor
9 | 800
10 | 600
11 |
12 |
13 | vertical
14 |
15 |
16 |
17 |
18 |
19 | vertical
20 |
21 |
22 | 1
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
34 |
35 | vertical
36 |
37 |
38 | 1
39 | tab_view
40 |
41 |
42 |
43 |
44 | 1
45 |
46 |
47 |
48 |
49 |
50 |
52 |
53 |
54 |
55 |
56 | 10
57 | 10
58 | 10
59 | 10
60 | 6
61 | 6
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Echidna Contributing Guidelines
2 | *Written by Nefo Fortressia. Markdown documents like this tend to not let you know who's the original author, huh?*
3 |
4 | - [Commit Convention](#commit-convention)
5 | - [Commit Types](#commit-types)
6 | - [Commit Scopes](#commit-scopes)
7 | - [PGP Signing](#pgp-signing)
8 | - [Developer Certificate of Origin](#developer-certificate-of-origin)
9 | - [Credits](#credits)
10 |
11 | # Before you start coding....
12 | In order to add new codes to the Echidna codebase, you'll need to have the dependencies installed. These are already written in the [Build from Source](./README#building-from-source).
13 |
14 | After cloning the repository, be sure to install the Git hooks included.
15 | ```sh
16 | $ pip install -U commitizen pre-commit
17 | $ pre-commit install
18 | ```
19 |
20 | # Commit Convention
21 | Let's not talk why we adopted [commit conventions]((https://www.conventionalcommits.org/en/)) for Echidna. The thing is, improper commit messages are just, GARRBAAAAGEEE. Messages like "what the fun does this commit do" or "ok ok ok ok" doesn't help at all in the log term.
22 |
23 | These conventions are enforced with the use of [Commitizen](https://commitizen-tools.github.io/commitizen/).
24 |
25 |
26 | #### Commit Types
27 | We use the standard [Commitlint](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum) commit types. :)
28 |
29 | #### Commit scopes
30 | At the moment, we don't use any commit scopes yet for Echidna, mainly because that hasn't been thought, hehe.
31 |
32 | # PGP Signing
33 |
34 |
35 | It's recommended that you sign your commits with GPG or SSH, for the lovely Verified badge on your commits!
36 |
37 | If you're new to PGP, GitHub made [a tutorial on making a PGP key with GnuPG](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) and [one on how to use it in your commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).
38 |
39 | # Licensing
40 | By sending your code for addition in Echidna Code, you agree with the [Developer Certificate of Origin](./DCO.txt) and the [Mozilla Public License version 2](./LICENSE) licensing.
41 |
42 | No *pwobwemwatwick* Contributor License Agreement, yay!
43 |
44 | Shouwwwd twhe liwwcenswe fiwwles *nowt avwailwabwe*, ywou cwan gwet thwem awt https://developercertificate.org/ awnd https://mozilla.org/MPL/2.0/.
45 |
46 | Pro tip, you can add `Signed-off-by: Takiyo Takahashi ` to the end line of your commit to officially agree to this by using the `-s` flag when making commits:
47 | ```sh
48 | $ git commit -s
49 | ```
50 |
51 | This can also be enabled in VSCode as well. Just go to the settings and enable "Git: Always Sign Off".
52 |
53 | # Credits
54 | I have ~~stolen~~ borrowed KawalCOVID19's [Contributing Guides](https://github.com/kawalcovid19/wargabantuwarga.com/blob/main/CONTRIBUTING.md) as the basis for writing this file. I have significantly adjusted the language to my non-rant tone <3
55 |
--------------------------------------------------------------------------------
/editor/src/components/window/menu.blp:
--------------------------------------------------------------------------------
1 | using Gtk 4.0;
2 |
3 | menu menu {
4 | submenu {
5 | label: _("File");
6 |
7 | section {
8 | item {
9 | label: _("New File");
10 | action: "win.new-file";
11 | }
12 | item {
13 | label: _("New Window");
14 | action: "app.new-window";
15 | }
16 | }
17 |
18 | section {
19 | item {
20 | label: _("Open File");
21 | action: "win.open-file";
22 | }
23 |
24 | item {
25 | label: _("Open Folder in a New Window");
26 | action: "win.open-folder";
27 | }
28 |
29 | item {
30 | label: _("Open Workspace");
31 | action: "win.open-workspace";
32 | }
33 | }
34 |
35 | section {
36 | item {
37 | label: _("Add Folder to This Window");
38 | action: "win.add-folder-to-workspace";
39 |
40 | }
41 |
42 | item {
43 | label: _("Save the Open Folders list As");
44 | action: "win.save-workspace";
45 | }
46 |
47 | item {
48 | label: _("Duplicate This Open Folders List");
49 | action: "win.duplicate-workspace";
50 | }
51 | }
52 |
53 | section {
54 |
55 | item {
56 | label: _("Save Current Tab");
57 | action: "win.save";
58 | }
59 |
60 | item {
61 | label: _("Save Current Tab As");
62 | action: "win.save-as";
63 | }
64 |
65 | item {
66 | label: _("Save All");
67 | action: "win.save-all";
68 |
69 | }
70 | }
71 | }
72 | submenu {
73 |
74 | label: _("Edit");
75 |
76 | section {
77 |
78 | item {
79 | label: _("Undo");
80 | action: "win.undo";
81 | }
82 |
83 | item {
84 | label: _("Redo");
85 | action: "win.redo";
86 |
87 | }
88 | }
89 | section {
90 | item {
91 | label: _("Cut");
92 | action: "win.cut";
93 |
94 | }
95 | }
96 | }
97 | submenu {
98 | label: _("Selection");
99 |
100 | section {
101 | item {
102 | label: _("Select All");
103 | action: "win.select-all";
104 |
105 | }
106 | }
107 |
108 | }
109 | submenu {
110 | label: _("View");
111 |
112 | section {
113 | item {
114 | label: _("Open Command Palette");
115 |
116 | }
117 | }
118 | }
119 | submenu {
120 | label: _("Go");
121 |
122 | section {
123 | item {
124 | label: _("Switch Editor");
125 | action: "win.switch-editor";
126 |
127 | }
128 | }
129 | }
130 | submenu {
131 | label: _("Run");
132 |
133 | section {
134 | item {
135 | label: _("Start Debugging");
136 | action: "win.start-debugging";
137 |
138 | }
139 | }
140 | }
141 |
142 | submenu {
143 | label: _("Terminal");
144 |
145 | section {
146 | item {
147 | label: _("New Terminal");
148 | action: "win.new-terminal";
149 |
150 | }
151 | }
152 | }
153 |
154 | submenu {
155 | label: _("Help");
156 | section {
157 | item {
158 | label: _("Get Started");
159 | action: "window.get-started";
160 |
161 | }
162 | item {
163 | label: _("Show All Commands");
164 | action: "win.show-all-commands";
165 |
166 | }
167 | item {
168 | label: _("Documentation");
169 | action: "app.open-docs";
170 |
171 | }
172 | }
173 | section {
174 | item {
175 | label: _("View License");
176 | action: "app.view-license";
177 |
178 | }
179 | }
180 | section {
181 | item {
182 | label: _("Search Feature Requests");
183 | action: "app.search-feature-requests";
184 |
185 | }
186 | item {
187 | label: _("Report Issue");
188 | action: "app.report-issue";
189 |
190 | }
191 | }
192 | section {
193 | item {
194 | label: _("About");
195 | action: "app.about";
196 |
197 | }
198 | }
199 | }
200 |
201 | }
--------------------------------------------------------------------------------
/editor/src/components/window/menubar.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 | use super::file::FileImplementedEditor;
5 | use super::EchidnaWindow;
6 | use crate::prelude::*;
7 | use gio::{MenuModel, SimpleAction};
8 | use glib::clone;
9 | use gtk::AboutDialog;
10 |
11 | pub trait MenubarImplementedEditor {
12 | fn setup_menubar(&self);
13 | }
14 |
15 | impl MenubarImplementedEditor for EchidnaWindow {
16 | fn setup_menubar(&self) {
17 | let app = self
18 | .application()
19 | .expect("self does not have an application set.");
20 | let menubuilder =
21 | gtk::Builder::from_resource("/io/fortressia/Echidna/components/window/menu.ui");
22 | let menubar: MenuModel = menubuilder
23 | .object("menu")
24 | .expect("Could not get object 'menu' from builder.");
25 | app.set_menubar(Some(&menubar));
26 | self.set_show_menubar(true);
27 | {
28 | let act_exit: SimpleAction = SimpleAction::new("exit", None);
29 | app.add_action(&act_exit);
30 |
31 | act_exit.connect_activate(clone!(@weak app =>
32 | move |_action, _value| {
33 | app.quit();
34 | }
35 | ));
36 | }
37 | {
38 | let act_about: SimpleAction = SimpleAction::new("about", None);
39 | app.add_action(&act_about);
40 | act_about.connect_activate(|_action, _value| {
41 | let about_dialog: AboutDialog = AboutDialog::new();
42 |
43 | about_dialog.set_license_type(gtk::License::Mpl20);
44 | about_dialog.set_program_name(Some("Echidna Code Editor"));
45 | about_dialog.set_website(Some("https://gitlab.com/EchidnaHQ/Echidna"));
46 | about_dialog.set_authors(&["FortressValkriye"]);
47 | about_dialog.set_copyright(Some("Made with by ❤️ Echidna contributors"));
48 | about_dialog.set_visible(true);
49 | });
50 | }
51 | {
52 | //app.notebook = Some(Rc::new(RefCell::new(notebook)));
53 | let act_exit: SimpleAction = SimpleAction::new("exit", None);
54 | app.add_action(&act_exit);
55 |
56 | act_exit.connect_activate(clone!(@weak app =>
57 | move |_action, _value| {
58 | app.quit();
59 | }
60 | ));
61 | }
62 | {
63 | let act_about: SimpleAction = SimpleAction::new("about", None);
64 | app.add_action(&act_about);
65 | act_about.connect_activate(clone!(@weak app =>
66 | move |_action, _value| {
67 | AboutDialog::builder()
68 | .license_type(gtk::License::Mpl20)
69 | .program_name("Echidna Code")
70 | .website("https://github.com/EchidnaHQ/Echidna")
71 | .authors(vec!["Nefo Fortressia".to_string()])
72 | .copyright("Made with by ❤️ Echidna contributors")
73 | .logo_icon_name(&app.application_id().unwrap())
74 | .version(crate::config::VERSION)
75 | .visible(true)
76 | .build();
77 | }));
78 | }
79 | {
80 | let act_report_issue = SimpleAction::new("report-issue", None);
81 |
82 | app.add_action(&act_report_issue);
83 |
84 | act_report_issue.connect_activate(clone!(@weak self as win =>
85 | move |_action, _variant| {
86 | gtk::show_uri(Some(&win), "https://github.com/EchidnaHQ/Echidna/components/issues/new", gdk::CURRENT_TIME);
87 | }));
88 | }
89 | {
90 | let act_search_feature_requests = SimpleAction::new("search-feature-requests", None);
91 |
92 | app.add_action(&act_search_feature_requests);
93 |
94 | act_search_feature_requests.connect_activate(clone!(@weak self as win =>
95 | move |_action, _variant| {
96 | gtk::show_uri(Some(&win), "https://github.com/EchidnaHQ/Echidna/components/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement", gdk::CURRENT_TIME);
97 | }));
98 | }
99 | {
100 | let act_window_close = SimpleAction::new("close", None);
101 |
102 | self.add_action(&act_window_close);
103 | let window = self.clone();
104 |
105 | act_window_close.connect_activate(move |_action, _variant| {
106 | window.close();
107 | });
108 | }
109 | {
110 | let action_open_file: SimpleAction = SimpleAction::new("open-file", None);
111 |
112 | self.add_action(&action_open_file);
113 | action_open_file.connect_activate(clone!(@weak self as window =>
114 | move |_action, _variant| {
115 | window.action_open_file();
116 | }));
117 | }
118 | {
119 | let action_save_file_as = SimpleAction::new("save-file-as", None);
120 |
121 | self.add_action(&action_save_file_as);
122 |
123 | action_save_file_as.connect_activate(clone!(@weak self as window =>
124 | move |_action, _variant| {
125 | window.action_save_file_as();
126 | }));
127 | }
128 | {
129 | let action_new_file = SimpleAction::new("new-file", None);
130 |
131 | self.add_action(&action_new_file);
132 |
133 | action_new_file.connect_activate(clone!(@weak self as window =>
134 | move |_action, _variant| {
135 | window.action_new_file();
136 | }));
137 | }
138 | {
139 | let action_save = SimpleAction::new("save", None);
140 |
141 | self.add_action(&action_save);
142 |
143 | action_save.connect_activate(clone!(@weak self as window =>
144 | move |_, _| {
145 | window.action_save_file();
146 | }
147 | ));
148 | }
149 | }
150 | }
151 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Echidna Code 💖✨
6 |
7 |
8 |
9 | A 💕 lovelier 💕 code editor than your current one
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
24 | ---
25 |
26 | ## Installation
27 |
28 | We're still not ready to launch Echy yet so there are no pre-built packages yet!
29 |
30 | You can however build from the cute source code! See the [Build from Source](./README#building-from-source) section.
31 | ## Building from source
32 |
33 | The sections relevant are [Dependencies](#dependencies) and [Compiling](#compiling). On Windows, you need also see [Building in Windows](#building-in-windows).
34 |
35 | If you're on Linux, just jump to [Building with Flatpak in Linux](#building-with-flatpak-in-linux).
36 | Unless if you're looking to repackage Echidna. <3
37 |
38 | ### Dependencies
39 |
40 | To build Echidna Code, you'll need the following programs:
41 | - Meson and the Ninja build system
42 |
43 | For both running and building the app, the following dependencies need to be present on the system.
44 | - Glib+Gio 2.66
45 | - GTK4
46 | - Gtksourceview 5
47 | - libvte3 with the "gtk4" flag turned on (currently this is not needed yet)
48 |
49 |
50 | ### Compiling
51 |
52 | ```
53 | $ meson _build
54 | ```
55 |
56 | ```
57 | $ meson compile
58 | ```
59 |
60 |
61 | ### Building in Windows
62 | I haven't tested Echidna Code in Windows yet, but if you want to build this in Windows, you can either build the dependencies from source with [Gvsbuild](https://github.com/wingtk/gvsbuild), or get the fluffyy pre-built binary happiness from [fluffy-prebuilt-happiness](https://github.com/EchidnaHQ/fluffy-prebuilt-happiness/).
63 |
64 | To use Visual Studio in Meson, use this instead of the one in [Compiling](#Compiling).
65 |
66 | ```
67 | > meson _build --backend=vs
68 | ```
69 |
70 | On Linux, Echidna Code is generally not intended for use on a native distro. It's recommended to develop and run Echidna with Flatpak. See [the part below](#building-with-flatpak-in-linux).
71 |
72 | ### Building with Flatpak in Linux
73 |
74 | Firstly, install [Flatpak](https://flatpak.org/setup/) and [Flatpak Builder](https://docs.flatpak.org/en/latest/first-build.html).
75 |
76 | The official docs of Flatpak isn't great if you're looking to use it for development purposes, as many default parameters aren't suited for development purposes.
77 |
78 | You should just stick to these two lovely angels: [GNOME Builder](https://flathub.org/apps/details/org.gnome.Builder) and [the Flatpak extension for Visual Studio Code](https://open-vsx.org/vscode/item?itemName=bilelmoussaoui.flatpak-vscode).
79 |
80 | ## FAQ
81 |
82 | ## How will Echidna work under Flatpak?
83 | It's roughly the same as the one written in [the Flathub packaging disclaimer for VSCode](https://github.com/flathub/com.visualstudio.code/blob/master/flatpak-warning.txt).
84 |
85 | I will brew a GUI helper for that thooo. <3
86 |
87 |
88 | ### Will you ship it to other platforms?
89 | Windows 10 is planned. Thankfully, I still keep my Windows 10 installation in my laptop, since I use it for games. MacOS however, kinda hard, since I don't have any Mac devices. If you are a Mac user, you can try [Building from Source](#building-from-source).
90 |
91 | I'm interested to port GDK to Android and the Web (without the current state of Broadway), but that'll take time definitely.
92 | ## License
93 |
94 | This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed in the [`LICENSE`](./LICENSE) file, You can obtain one at https://mozilla.org/MPL/2.0/.
95 |
96 | *Credits to [Dogehouse](https://github.com/benawad/dogehouse) for the README template.*
97 | To use Visual Studio in Meson, use this instead of the one in [Compiling](#Compiling).
98 |
99 | ```
100 | > meson _build --backend=vs
101 | ```
102 |
103 | On Linux, Echidna Code is generally not intended for use on a native distro. It's recommended to develop and run Echidna with Flatpak. See [the part below](#building-with-flatpak-in-linux).
104 |
105 | ### Building with Flatpak in Linux
106 |
107 | Firstly, install [Flatpak](https://flatpak.org/setup/) and [Flatpak Builder](https://docs.flatpak.org/en/latest/first-build.html).
108 |
109 | The official docs of Flatpak isn't great if you're looking to use it for development purposes, as many default parameters aren't suited for development purposes.
110 |
111 | You should just stick to these two lovely angels: [GNOME Builder](https://flathub.org/apps/details/org.gnome.Builder) and [the Flatpak extension for Visual Studio Code](https://open-vsx.org/vscode/item?itemName=bilelmoussaoui.flatpak-vscode).
112 |
113 | ## FAQ
114 |
115 | ## How will Echidna work under Flatpak?
116 | It's roughly the same as the one written in [the Flathub packaging disclaimer for VSCode](https://github.com/flathub/com.visualstudio.code/blob/master/flatpak-warning.txt).
117 |
118 | I will brew a GUI helper for that thooo. <3
119 |
120 |
121 | ### Will you ship it to other platforms?
122 | Windows 10 is planned. Thankfully, I still keep my Windows 10 installation in my laptop, since I use it for games. MacOS however, kinda hard, since I don't have any Mac devices. If you are a Mac user, you can try [Building from Source](#building-from-source).
123 |
124 | I'm interested to port GDK to Android and the Web (without the current state of Broadway), but that'll take time definitely.
125 | ## License
126 |
127 | This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed in the [`LICENSE`](./LICENSE) file, You can obtain one at https://mozilla.org/MPL/2.0/.
128 |
129 | *Credits to [Dogehouse](https://github.com/benawad/dogehouse) for the README template.*
130 |
--------------------------------------------------------------------------------
/editor/src/components/editor/mod.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | pub mod imp;
6 | use crate::prelude::*;
7 | use gio::Cancellable;
8 | use gtk::{glib::clone, subclass::prelude::*};
9 | use sourceview::{prelude::*, Buffer, FileLoader, FileSaver, LanguageManager};
10 | use std::{error::Error, fmt};
11 |
12 | glib::wrapper! {
13 | pub struct EchidnaCoreEditor(ObjectSubclass)
14 | @extends gtk::Box, gtk::Widget,
15 | @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Orientable;
16 | }
17 | fn set_scheme(buffer: &sourceview::Buffer, is_dark: bool) {
18 | let style_manager = sourceview::StyleSchemeManager::default();
19 | // Set the scheme to Adwaita by default.
20 | let default_scheme = match is_dark {
21 | true => "Adwaita-dark",
22 | false => "Adwaita",
23 | };
24 | buffer.set_style_scheme(style_manager.scheme(default_scheme).as_ref());
25 | }
26 | impl EchidnaCoreEditor {
27 | pub fn new(
28 | file: Option,
29 | app: Option<&adw::Application>,
30 | ) -> Result {
31 | let this: Self = glib::Object::new(&[])?;
32 |
33 | let this_imp = this.to_imp();
34 | // Without cloning it, for some reasons the Rust compiler complains about &this.to_imp().sourceview not being IsA
35 | this_imp.minimap.set_view(&this_imp.sourceview.clone());
36 | let buffer = this_imp.sourceview.buffer().downcast::().expect("Cannot downcast the sourceview's buffer. Maybe the sourceview's buffer is not IsA.");
37 |
38 | if let Some(f) = file {
39 | let file_location = f.location();
40 | this.set_property("file", &f);
41 |
42 | let cancellable = gio::Cancellable::new();
43 | let filepath = file_location.path().expect("No filepath");
44 | let info = file_location
45 | .query_info("*", gio::FileQueryInfoFlags::NONE, Some(&cancellable))
46 | .expect("Could not query the info for file");
47 |
48 | let content_type = info.content_type().expect(
49 | format!("It does not seem like {:?} has a type", filepath).as_str(),
50 | );
51 | {
52 | println!(
53 | "Opened {} and found its content type is {}.",
54 | "file",
55 | content_type.to_string()
56 | );
57 |
58 | let language_manager = LanguageManager::new();
59 | let language = language_manager.guess_language(
60 | Some(&info.name().to_str().expect(
61 | "Could not open the file because its name is not supported by Unicode.",
62 | )),
63 | None,
64 | );
65 |
66 | if let Some(lang) = language {
67 | buffer.set_language(Some(&lang));
68 | }
69 |
70 | let file_loader: FileLoader = FileLoader::new(&buffer, &f);
71 |
72 | file_loader.load_async(
73 | glib::Priority::default(),
74 | Some(&cancellable),
75 |
76 | |result| {
77 | if result.is_err() {
78 | panic!("Found an error when loading the file into the text editor's buffer. {:#?}", result.err());
79 | }
80 | },
81 | );
82 | }
83 | }
84 |
85 | if let Some(a) = app {
86 | let manager = a.style_manager();
87 | set_scheme(&buffer, manager.is_dark());
88 | manager.connect_dark_notify(clone!(@weak buffer =>
89 | move |manager|{
90 | set_scheme(&buffer, manager.is_dark());
91 | }));
92 | }
93 |
94 | Ok(this)
95 | }
96 |
97 | pub fn to_imp(&self) -> &imp::EchidnaCoreEditor {
98 | imp::EchidnaCoreEditor::from_instance(self)
99 | }
100 |
101 | pub fn file(&self) -> Option {
102 | self.property::>("file")
103 | }
104 |
105 | pub fn save_file(&self, save_as: Option<&gio::File>) -> Result<(), Box> {
106 | let buffer = self.to_imp().sourceview.buffer().downcast::();
107 |
108 | match buffer {
109 | Ok(buffer) => match self.file() {
110 | Some(file) => {
111 | let cancellable = Cancellable::new();
112 |
113 | let file_saver: Option = match save_as {
114 | Some(save_as_file) => {
115 | Some(FileSaver::with_target(&buffer, &file, save_as_file))
116 | }
117 | None => Some(FileSaver::new(&buffer, &file)),
118 | };
119 |
120 | match file_saver {
121 | Some(file_saver) => {
122 | file_saver.save_async(
123 | glib::Priority::default(),
124 | Some(&cancellable),
125 | |result| {
126 | if result.is_err() {
127 | panic!(
128 | "Found an error while saving the file:\n{}",
129 | result.err().expect("No error")
130 | )
131 | }
132 | },
133 | );
134 | Ok(())
135 | }
136 | None => todo!(),
137 | }
138 | }
139 | None => todo!(),
140 | },
141 | Err(_) => {
142 | #[derive(Debug)]
143 | struct Error {}
144 |
145 | impl fmt::Display for Error {
146 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
147 | write!(f, "Can't downcast the buffer to GtkSourceBuffer.")
148 | }
149 | }
150 |
151 | impl std::error::Error for Error {}
152 |
153 | Err(Box::new(Error {}))
154 | }
155 | }
156 | }
157 | }
158 |
--------------------------------------------------------------------------------
/editor/src/components/window/workspace.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | use super::imp::EchidnaEditor;
6 | use gio::Cancellable;
7 | use gio::{File, FileQueryInfoFlags, FileType, SimpleAction};
8 | use glib::clone;
9 | use glib::subclass::types::ObjectSubclassExt;
10 | use glib::types::Type;
11 | use gtk::prelude::*;
12 | use gtk::{ApplicationWindow, FileChooserAction, FileChooserNative, ResponseType, TreeStore};
13 | use relative_path::RelativePath;
14 | use serde::{Deserialize, Serialize};
15 | use std::path::Path;
16 |
17 | #[derive(Deserialize, Serialize)]
18 | struct MonacoFolder {
19 | path: String,
20 | }
21 |
22 | #[derive(Deserialize, Serialize)]
23 | struct MonacoWorkspace {
24 | folders: Vec,
25 | }
26 |
27 | trait WorkspaceImplementedEditor {
28 | fn action_open_workspace(
29 | &self,
30 | window: ApplicationWindow,
31 | app: super::EchidnaEditor,
32 | _action: &SimpleAction,
33 | _variant: Option<&glib::Variant>,
34 | );
35 |
36 | fn open_workspace(&self, file: File);
37 | fn recursive_add_files_into_tree_store(&self, parent_file: File, tree: &TreeStore);
38 | fn open_folder(&self, file: File);
39 | }
40 |
41 | impl WorkspaceImplementedEditor for EchidnaEditor {
42 | fn action_open_workspace(
43 | &self,
44 | window: ApplicationWindow,
45 | app: super::EchidnaEditor,
46 | _action: &SimpleAction,
47 | _variant: Option<&glib::Variant>,
48 | ) {
49 | let dialog = FileChooserNative::new(
50 | Some("Open a file"),
51 | Some(&window),
52 | FileChooserAction::Open,
53 | Some("Open"),
54 | Some("Cancel"),
55 | );
56 | dialog.set_visible(true);
57 | dialog.connect_response(clone!(@weak window, @weak app =>
58 | move |dialog, response| {
59 | if response == ResponseType::Accept {
60 | if let Some(file) = dialog.file() {
61 | dialog.destroy();
62 | Self::from_instance(&app).open_workspace(file);
63 | }
64 | } else if response == ResponseType::Cancel {
65 | dialog.destroy();
66 | }
67 | }
68 | ));
69 | }
70 | /**
71 | * __Open Workspace__
72 | *
73 | * Basically, this is just the same as Open Folder, but it's many folders.
74 | *
75 | * - Open a FileChooserNative, set to only view .code-workspace files.
76 | * - If the user pressed cancel, destroy the dialog. If the user opened a .code-workspace file:
77 | * - Get the workspace file, load and parse its content, .code-workspace files are in JSON with comments. But JSON only should be fine, for now.
78 | * - Iterate over folders listed in the workspace file.
79 | * - Find the absolute path of the folder: Relative to the workspace file.
80 | * - Create a GFile instance of that path, and call open_folder(file: File) and pass the GFile instance to it.
81 | *
82 | */
83 | fn open_workspace(&self, file: File) {
84 | let cancellable = Cancellable::new();
85 | let filepath_raw = &file
86 | .path()
87 | .expect("Could not get the file path of the file.");
88 | let filepath = Path::new(&filepath_raw);
89 | let info = file
90 | .query_info("*", gio::FileQueryInfoFlags::NONE, Some(&cancellable))
91 | .expect(format!(
92 | "Could not retrieve file information for {:?}",
93 | filepath
94 | ));
95 | let content_type = info
96 | .content_type()
97 | .expect(format!("Found no content type for {:?}", filepath));
98 | println!(
99 | "Opened {} and found its content type is {}.",
100 | "file",
101 | content_type.to_string()
102 | );
103 | let content_cancellable = Cancellable::new();
104 | let content = file
105 | .load_contents(Some(&content_cancellable))
106 | .expect("Could not load the file contents for {:?}", filepath);
107 |
108 | let (int_vec, _byte_string) = content;
109 | let workspace = serde_json::from_slice::(&int_vec).expect(format!(
110 | "Could not parse the workspace file of {:?}",
111 | filepath
112 | ));
113 |
114 | for folder in workspace.folders {
115 | let path = RelativePath::new(&folder.path);
116 | let folder = File::for_path(path.to_path(filepath));
117 |
118 | // Do something with the folder, perhaps lists its child and .
119 | self.open_folder(folder);
120 | }
121 | }
122 |
123 | /**
124 | *
125 | *
126 | */
127 | fn recursive_add_files_into_tree_store(&self, parent_file: File, tree: &TreeStore) {
128 | let child_enumerate_cancellable = Cancellable::new();
129 | let child_files = parent_file
130 | .enumerate_children(
131 | "*",
132 | FileQueryInfoFlags::NONE,
133 | Some(&child_enumerate_cancellable),
134 | )
135 | .expect(
136 | format!(
137 | "Could not look up the children files of {:?} because:\n{:#?}",
138 | filepath
139 | )
140 | .as_str(),
141 | );
142 | let filepath = &parent_file
143 | .path()
144 | .expect("Could not get the file path of the file.");
145 |
146 | for file_iter in files {
147 | let file_info = file_iter.expect();
148 | let file = parent_file.child(file_info.name());
149 | let tree_iter = tree.append(None);
150 | tree.set_value(&tree_iter, 2, &file_info.name().to_str().to_value());
151 |
152 | if file_info.file_type() == FileType::Directory {
153 | self.recursive_add_files_into_tree_store(file, tree);
154 | }
155 | }
156 | }
157 |
158 | /*
159 | Loads a folder into the tree view.
160 |
161 | - Create a new tree
162 | - Enumerate over child files of 'file'. (PS: In the Unix family of OS-es, directories are files too)
163 | */
164 | fn open_folder(&self, file: File) {
165 | let tree = TreeStore::new(&[gdk::Texture::static_type(), Type::STRING]);
166 | self.recursive_add_files_into_tree_store(file, &tree);
167 | }
168 | }
169 |
--------------------------------------------------------------------------------
/editor/data/icons/hicolor/scalable/apps/io.fortressia.Echidna.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
44 |
46 |
49 |
53 |
54 |
57 |
65 |
66 |
69 |
77 |
78 |
79 |
83 |
91 |
100 |
108 |
116 |
122 |
125 |
128 |
135 |
142 |
143 |
146 |
154 |
161 |
168 |
169 |
176 |
183 |
190 |
197 |
204 |
211 |
212 |
213 |
214 |
--------------------------------------------------------------------------------
/editor/src/components/window/file.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 |
5 | use crate::components::editor::EchidnaCoreEditor;
6 | use crate::prelude::*;
7 | use std::error::Error;
8 |
9 | use glib::clone;
10 | use gtk::{subclass::prelude::*, FileChooserAction, FileChooserNative, Label, ResponseType};
11 | use sourceview::{prelude::*, File};
12 |
13 | pub trait FileImplementedEditor {
14 | fn action_open_file(&self) -> Result<(), Box>;
15 | fn open_file(
16 | tab_bar: &adw::TabBar,
17 | file_location: gio::File,
18 | app: Option<&adw::Application>,
19 | ) -> Result<(), Box>;
20 | fn action_save_file_as(&self) -> Result<(), Box>;
21 | fn action_new_file(&self) -> Result>;
22 | fn action_save_file(&self) -> Result<(), Box>;
23 | }
24 |
25 | impl FileImplementedEditor for super::EchidnaWindow {
26 | /*
27 | Open a file and put it in an editor and the opened files bar.
28 |
29 | - Open a file chooser dialog.
30 | - Connect a signal to it and get the file choosen.
31 | - Read th file's information and
32 | - TODO: if it's a plain text,
33 | - TODO: Load the file's content
34 | - TODO: Create an editor
35 | - TODO: Set the editor's content to the file's content.
36 | - TODO: Somehow keep track of what file belongs to what editor/opened file bar widget.
37 | - TODO: If the user enables Autosave, listen to the editor's changes and automatically save the editor's content.
38 | - TODO: Close the editor and the tab widget when the file is closed (triggered by the X button on them).
39 |
40 | Perhaps some of the last points should not be implemented in this function but rather in another function that keeps track of every files.
41 | */
42 | fn action_open_file(&self) -> Result<(), Box> {
43 | /*
44 | Borrows self.to_imp()'s dialog Vector mutably, create a new dialog , and push that dialog into the vector.
45 |
46 | This is required because we own the dialog and thus the dialog will be destroyed when this function has completed.
47 | */
48 | match self.to_imp().dialogs.try_borrow_mut() {
49 | Ok(mut dialogs) => {
50 | let dialog = gtk::FileChooserNative::new(
51 | Some("Open File"),
52 | Some(self),
53 | gtk::FileChooserAction::Open,
54 | Some("Open"),
55 | Some("Cancel"),
56 | );
57 | let dialog_clone = dialog.clone();
58 | // The upcast() function moves the dialog variable, so we need to get a reference to the dialog trough dialog_clone
59 | dialogs.push(dialog.upcast::());
60 |
61 | dialog_clone.connect_response(clone!( @weak self as window, =>
62 | move |dialog, response| {
63 |
64 | if response == ResponseType::Accept {
65 | let file = dialog.file().expect("");
66 | Self::open_file(
67 | &super::imp::EchidnaWindow::from_instance(&window).tab_bar, file,
68 | Some(
69 | &window.application().expect("No application in window")
70 | .downcast::()
71 | .expect("Application is not AdwApplication"),
72 | ),
73 | );
74 |
75 | } else {
76 | println!("{:?}", response);
77 | }
78 | dialog.destroy();
79 |
80 | }));
81 | dialog_clone.show();
82 |
83 | Ok(())
84 | }
85 | Err(e) => Err(Box::new(e)),
86 | }
87 | }
88 |
89 | fn open_file(
90 | tab_bar: &adw::TabBar,
91 | file_location: gio::File,
92 | app: Option<&adw::Application>,
93 | ) -> Result<(), Box> {
94 | let file = File::builder().location(&file_location).build();
95 | let editor_page = EchidnaCoreEditor::new(Some(file), app);
96 | match editor_page {
97 | Ok(editor_page) => {
98 | let view = tab_bar.view().expect("No view in tab bar");
99 |
100 | let page = view.prepend(&editor_page);
101 | page.set_title(
102 | file_location
103 | .path()
104 | .expect("The file's path is missing")
105 | .file_name()
106 | .expect("Could not get the file name, as it ends with ..")
107 | .to_str()
108 | .expect("Could not parse the file name, as it is not a valid Unicode."),
109 | );
110 | view.set_selected_page(&page);
111 |
112 | Ok(())
113 | }
114 | Err(e) => Err(Box::new(e)),
115 | }
116 | }
117 | fn action_save_file_as(&self) -> Result<(), Box> {
118 | /*
119 | Borrows self.to_imp()'s dialog Vector mutably, create a new dialog , and push that dialog into the vector.
120 |
121 | This is required because we own the dialog and thus the dialog will be destroyed when this function has completed.
122 | */
123 |
124 | match self.to_imp().dialogs.try_borrow_mut() {
125 | Ok(mut dialogs) => {
126 | let dialog = FileChooserNative::new(
127 | Some("Save File As"),
128 | gtk::Window::NONE,
129 | FileChooserAction::Save,
130 | Some("_Save"),
131 | Some("_Cancel"),
132 | );
133 |
134 | let dialog_clone = dialog.clone();
135 | // The upcast() function moves the dialog variable, so we need to get a reference to the dialog trough dialog_clone
136 | dialogs.push(dialog.upcast::());
137 |
138 | dialog_clone.connect_response(clone!( @weak self as window, =>
139 | move |dialog, response| {
140 | if response == ResponseType::Accept {
141 | let file = dialog.file().expect("No file in response");
142 | let tab: EchidnaCoreEditor = window.get_current_tab().expect("error");
143 | match tab.save_file(Some(&file)) {
144 | Ok(_) => {},
145 | Err(e) => eprintln!("{}", e)
146 | };
147 | }
148 |
149 | dialog.destroy();
150 |
151 | }));
152 | dialog_clone.show();
153 |
154 | Ok(())
155 | }
156 | Err(e) => Err(Box::new(e)),
157 | }
158 | }
159 |
160 | fn action_new_file(&self) -> Result> {
161 | match EchidnaCoreEditor::new(
162 | None,
163 | Some(
164 | &self
165 | .application()
166 | .expect("No application in window")
167 | .downcast::()
168 | .expect("Application is not AdwApplication"),
169 | ),
170 | ) {
171 | Ok(editor) => {
172 | let tab_bar = &self.to_imp().tab_bar;
173 | let view = tab_bar.view().expect("No view in tab bar");
174 | let page = view.prepend(&editor);
175 |
176 | view.set_selected_page(&page);
177 |
178 | Ok(page)
179 | }
180 | Err(e) => Err(Box::new(e)),
181 | }
182 | }
183 |
184 | fn action_save_file(&self) -> Result<(), Box> {
185 | let page: EchidnaCoreEditor = self.get_current_tab()?;
186 | match page.file() {
187 | Some(file) => page.save_file(Some(&file.location())),
188 | None => self.action_save_file_as(),
189 | }
190 | }
191 | }
192 |
--------------------------------------------------------------------------------
/COPYING:
--------------------------------------------------------------------------------
1 | Mozilla Public License Version 2.0
2 | ==================================
3 |
4 | 1. Definitions
5 | --------------
6 |
7 | 1.1. "Contributor"
8 | means each individual or legal entity that creates, contributes to
9 | the creation of, or owns Covered Software.
10 |
11 | 1.2. "Contributor Version"
12 | means the combination of the Contributions of others (if any) used
13 | by a Contributor and that particular Contributor's Contribution.
14 |
15 | 1.3. "Contribution"
16 | means Covered Software of a particular Contributor.
17 |
18 | 1.4. "Covered Software"
19 | means Source Code Form to which the initial Contributor has attached
20 | the notice in Exhibit A, the Executable Form of such Source Code
21 | Form, and Modifications of such Source Code Form, in each case
22 | including portions thereof.
23 |
24 | 1.5. "Incompatible With Secondary Licenses"
25 | means
26 |
27 | (a) that the initial Contributor has attached the notice described
28 | in Exhibit B to the Covered Software; or
29 |
30 | (b) that the Covered Software was made available under the terms of
31 | version 1.1 or earlier of the License, but not also under the
32 | terms of a Secondary License.
33 |
34 | 1.6. "Executable Form"
35 | means any form of the work other than Source Code Form.
36 |
37 | 1.7. "Larger Work"
38 | means a work that combines Covered Software with other material, in
39 | a separate file or files, that is not Covered Software.
40 |
41 | 1.8. "License"
42 | means this document.
43 |
44 | 1.9. "Licensable"
45 | means having the right to grant, to the maximum extent possible,
46 | whether at the time of the initial grant or subsequently, any and
47 | all of the rights conveyed by this License.
48 |
49 | 1.10. "Modifications"
50 | means any of the following:
51 |
52 | (a) any file in Source Code Form that results from an addition to,
53 | deletion from, or modification of the contents of Covered
54 | Software; or
55 |
56 | (b) any new file in Source Code Form that contains any Covered
57 | Software.
58 |
59 | 1.11. "Patent Claims" of a Contributor
60 | means any patent claim(s), including without limitation, method,
61 | process, and apparatus claims, in any patent Licensable by such
62 | Contributor that would be infringed, but for the grant of the
63 | License, by the making, using, selling, offering for sale, having
64 | made, import, or transfer of either its Contributions or its
65 | Contributor Version.
66 |
67 | 1.12. "Secondary License"
68 | means either the GNU General Public License, Version 2.0, the GNU
69 | Lesser General Public License, Version 2.1, the GNU Affero General
70 | Public License, Version 3.0, or any later versions of those
71 | licenses.
72 |
73 | 1.13. "Source Code Form"
74 | means the form of the work preferred for making modifications.
75 |
76 | 1.14. "You" (or "Your")
77 | means an individual or a legal entity exercising rights under this
78 | License. For legal entities, "You" includes any entity that
79 | controls, is controlled by, or is under common control with You. For
80 | purposes of this definition, "control" means (a) the power, direct
81 | or indirect, to cause the direction or management of such entity,
82 | whether by contract or otherwise, or (b) ownership of more than
83 | fifty percent (50%) of the outstanding shares or beneficial
84 | ownership of such entity.
85 |
86 | 2. License Grants and Conditions
87 | --------------------------------
88 |
89 | 2.1. Grants
90 |
91 | Each Contributor hereby grants You a world-wide, royalty-free,
92 | non-exclusive license:
93 |
94 | (a) under intellectual property rights (other than patent or trademark)
95 | Licensable by such Contributor to use, reproduce, make available,
96 | modify, display, perform, distribute, and otherwise exploit its
97 | Contributions, either on an unmodified basis, with Modifications, or
98 | as part of a Larger Work; and
99 |
100 | (b) under Patent Claims of such Contributor to make, use, sell, offer
101 | for sale, have made, import, and otherwise transfer either its
102 | Contributions or its Contributor Version.
103 |
104 | 2.2. Effective Date
105 |
106 | The licenses granted in Section 2.1 with respect to any Contribution
107 | become effective for each Contribution on the date the Contributor first
108 | distributes such Contribution.
109 |
110 | 2.3. Limitations on Grant Scope
111 |
112 | The licenses granted in this Section 2 are the only rights granted under
113 | this License. No additional rights or licenses will be implied from the
114 | distribution or licensing of Covered Software under this License.
115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a
116 | Contributor:
117 |
118 | (a) for any code that a Contributor has removed from Covered Software;
119 | or
120 |
121 | (b) for infringements caused by: (i) Your and any other third party's
122 | modifications of Covered Software, or (ii) the combination of its
123 | Contributions with other software (except as part of its Contributor
124 | Version); or
125 |
126 | (c) under Patent Claims infringed by Covered Software in the absence of
127 | its Contributions.
128 |
129 | This License does not grant any rights in the trademarks, service marks,
130 | or logos of any Contributor (except as may be necessary to comply with
131 | the notice requirements in Section 3.4).
132 |
133 | 2.4. Subsequent Licenses
134 |
135 | No Contributor makes additional grants as a result of Your choice to
136 | distribute the Covered Software under a subsequent version of this
137 | License (see Section 10.2) or under the terms of a Secondary License (if
138 | permitted under the terms of Section 3.3).
139 |
140 | 2.5. Representation
141 |
142 | Each Contributor represents that the Contributor believes its
143 | Contributions are its original creation(s) or it has sufficient rights
144 | to grant the rights to its Contributions conveyed by this License.
145 |
146 | 2.6. Fair Use
147 |
148 | This License is not intended to limit any rights You have under
149 | applicable copyright doctrines of fair use, fair dealing, or other
150 | equivalents.
151 |
152 | 2.7. Conditions
153 |
154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155 | in Section 2.1.
156 |
157 | 3. Responsibilities
158 | -------------------
159 |
160 | 3.1. Distribution of Source Form
161 |
162 | All distribution of Covered Software in Source Code Form, including any
163 | Modifications that You create or to which You contribute, must be under
164 | the terms of this License. You must inform recipients that the Source
165 | Code Form of the Covered Software is governed by the terms of this
166 | License, and how they can obtain a copy of this License. You may not
167 | attempt to alter or restrict the recipients' rights in the Source Code
168 | Form.
169 |
170 | 3.2. Distribution of Executable Form
171 |
172 | If You distribute Covered Software in Executable Form then:
173 |
174 | (a) such Covered Software must also be made available in Source Code
175 | Form, as described in Section 3.1, and You must inform recipients of
176 | the Executable Form how they can obtain a copy of such Source Code
177 | Form by reasonable means in a timely manner, at a charge no more
178 | than the cost of distribution to the recipient; and
179 |
180 | (b) You may distribute such Executable Form under the terms of this
181 | License, or sublicense it under different terms, provided that the
182 | license for the Executable Form does not attempt to limit or alter
183 | the recipients' rights in the Source Code Form under this License.
184 |
185 | 3.3. Distribution of a Larger Work
186 |
187 | You may create and distribute a Larger Work under terms of Your choice,
188 | provided that You also comply with the requirements of this License for
189 | the Covered Software. If the Larger Work is a combination of Covered
190 | Software with a work governed by one or more Secondary Licenses, and the
191 | Covered Software is not Incompatible With Secondary Licenses, this
192 | License permits You to additionally distribute such Covered Software
193 | under the terms of such Secondary License(s), so that the recipient of
194 | the Larger Work may, at their option, further distribute the Covered
195 | Software under the terms of either this License or such Secondary
196 | License(s).
197 |
198 | 3.4. Notices
199 |
200 | You may not remove or alter the substance of any license notices
201 | (including copyright notices, patent notices, disclaimers of warranty,
202 | or limitations of liability) contained within the Source Code Form of
203 | the Covered Software, except that You may alter any license notices to
204 | the extent required to remedy known factual inaccuracies.
205 |
206 | 3.5. Application of Additional Terms
207 |
208 | You may choose to offer, and to charge a fee for, warranty, support,
209 | indemnity or liability obligations to one or more recipients of Covered
210 | Software. However, You may do so only on Your own behalf, and not on
211 | behalf of any Contributor. You must make it absolutely clear that any
212 | such warranty, support, indemnity, or liability obligation is offered by
213 | You alone, and You hereby agree to indemnify every Contributor for any
214 | liability incurred by such Contributor as a result of warranty, support,
215 | indemnity or liability terms You offer. You may include additional
216 | disclaimers of warranty and limitations of liability specific to any
217 | jurisdiction.
218 |
219 | 4. Inability to Comply Due to Statute or Regulation
220 | ---------------------------------------------------
221 |
222 | If it is impossible for You to comply with any of the terms of this
223 | License with respect to some or all of the Covered Software due to
224 | statute, judicial order, or regulation then You must: (a) comply with
225 | the terms of this License to the maximum extent possible; and (b)
226 | describe the limitations and the code they affect. Such description must
227 | be placed in a text file included with all distributions of the Covered
228 | Software under this License. Except to the extent prohibited by statute
229 | or regulation, such description must be sufficiently detailed for a
230 | recipient of ordinary skill to be able to understand it.
231 |
232 | 5. Termination
233 | --------------
234 |
235 | 5.1. The rights granted under this License will terminate automatically
236 | if You fail to comply with any of its terms. However, if You become
237 | compliant, then the rights granted under this License from a particular
238 | Contributor are reinstated (a) provisionally, unless and until such
239 | Contributor explicitly and finally terminates Your grants, and (b) on an
240 | ongoing basis, if such Contributor fails to notify You of the
241 | non-compliance by some reasonable means prior to 60 days after You have
242 | come back into compliance. Moreover, Your grants from a particular
243 | Contributor are reinstated on an ongoing basis if such Contributor
244 | notifies You of the non-compliance by some reasonable means, this is the
245 | first time You have received notice of non-compliance with this License
246 | from such Contributor, and You become compliant prior to 30 days after
247 | Your receipt of the notice.
248 |
249 | 5.2. If You initiate litigation against any entity by asserting a patent
250 | infringement claim (excluding declaratory judgment actions,
251 | counter-claims, and cross-claims) alleging that a Contributor Version
252 | directly or indirectly infringes any patent, then the rights granted to
253 | You by any and all Contributors for the Covered Software under Section
254 | 2.1 of this License shall terminate.
255 |
256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257 | end user license agreements (excluding distributors and resellers) which
258 | have been validly granted by You or Your distributors under this License
259 | prior to termination shall survive termination.
260 |
261 | ************************************************************************
262 | * *
263 | * 6. Disclaimer of Warranty *
264 | * ------------------------- *
265 | * *
266 | * Covered Software is provided under this License on an "as is" *
267 | * basis, without warranty of any kind, either expressed, implied, or *
268 | * statutory, including, without limitation, warranties that the *
269 | * Covered Software is free of defects, merchantable, fit for a *
270 | * particular purpose or non-infringing. The entire risk as to the *
271 | * quality and performance of the Covered Software is with You. *
272 | * Should any Covered Software prove defective in any respect, You *
273 | * (not any Contributor) assume the cost of any necessary servicing, *
274 | * repair, or correction. This disclaimer of warranty constitutes an *
275 | * essential part of this License. No use of any Covered Software is *
276 | * authorized under this License except under this disclaimer. *
277 | * *
278 | ************************************************************************
279 |
280 | ************************************************************************
281 | * *
282 | * 7. Limitation of Liability *
283 | * -------------------------- *
284 | * *
285 | * Under no circumstances and under no legal theory, whether tort *
286 | * (including negligence), contract, or otherwise, shall any *
287 | * Contributor, or anyone who distributes Covered Software as *
288 | * permitted above, be liable to You for any direct, indirect, *
289 | * special, incidental, or consequential damages of any character *
290 | * including, without limitation, damages for lost profits, loss of *
291 | * goodwill, work stoppage, computer failure or malfunction, or any *
292 | * and all other commercial damages or losses, even if such party *
293 | * shall have been informed of the possibility of such damages. This *
294 | * limitation of liability shall not apply to liability for death or *
295 | * personal injury resulting from such party's negligence to the *
296 | * extent applicable law prohibits such limitation. Some *
297 | * jurisdictions do not allow the exclusion or limitation of *
298 | * incidental or consequential damages, so this exclusion and *
299 | * limitation may not apply to You. *
300 | * *
301 | ************************************************************************
302 |
303 | 8. Litigation
304 | -------------
305 |
306 | Any litigation relating to this License may be brought only in the
307 | courts of a jurisdiction where the defendant maintains its principal
308 | place of business and such litigation shall be governed by laws of that
309 | jurisdiction, without reference to its conflict-of-law provisions.
310 | Nothing in this Section shall prevent a party's ability to bring
311 | cross-claims or counter-claims.
312 |
313 | 9. Miscellaneous
314 | ----------------
315 |
316 | This License represents the complete agreement concerning the subject
317 | matter hereof. If any provision of this License is held to be
318 | unenforceable, such provision shall be reformed only to the extent
319 | necessary to make it enforceable. Any law or regulation which provides
320 | that the language of a contract shall be construed against the drafter
321 | shall not be used to construe this License against a Contributor.
322 |
323 | 10. Versions of the License
324 | ---------------------------
325 |
326 | 10.1. New Versions
327 |
328 | Mozilla Foundation is the license steward. Except as provided in Section
329 | 10.3, no one other than the license steward has the right to modify or
330 | publish new versions of this License. Each version will be given a
331 | distinguishing version number.
332 |
333 | 10.2. Effect of New Versions
334 |
335 | You may distribute the Covered Software under the terms of the version
336 | of the License under which You originally received the Covered Software,
337 | or under the terms of any subsequent version published by the license
338 | steward.
339 |
340 | 10.3. Modified Versions
341 |
342 | If you create software not governed by this License, and you want to
343 | create a new license for such software, you may create and use a
344 | modified version of this License if you rename the license and remove
345 | any references to the name of the license steward (except to note that
346 | such modified license differs from this License).
347 |
348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary
349 | Licenses
350 |
351 | If You choose to distribute Source Code Form that is Incompatible With
352 | Secondary Licenses under the terms of this version of the License, the
353 | notice described in Exhibit B of this License must be attached.
354 |
355 | Exhibit A - Source Code Form License Notice
356 | -------------------------------------------
357 |
358 | This Source Code Form is subject to the terms of the Mozilla Public
359 | License, v. 2.0. If a copy of the MPL was not distributed with this
360 | file, You can obtain one at https://mozilla.org/MPL/2.0/.
361 |
362 | If it is not possible or desirable to put the notice in a particular
363 | file, then You may include the notice in a location (such as a LICENSE
364 | file in a relevant directory) where a recipient would be likely to look
365 | for such a notice.
366 |
367 | You may add additional accurate notices of copyright ownership.
368 |
369 | Exhibit B - "Incompatible With Secondary Licenses" Notice
370 | ---------------------------------------------------------
371 |
372 | This Source Code Form is "Incompatible With Secondary Licenses", as
373 | defined by the Mozilla Public License, v. 2.0.
374 |
--------------------------------------------------------------------------------
/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | version = 3
4 |
5 | [[package]]
6 | name = "aho-corasick"
7 | version = "0.7.18"
8 | source = "registry+https://github.com/rust-lang/crates.io-index"
9 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
10 | dependencies = [
11 | "memchr",
12 | ]
13 |
14 | [[package]]
15 | name = "anyhow"
16 | version = "1.0.55"
17 | source = "registry+https://github.com/rust-lang/crates.io-index"
18 | checksum = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd"
19 |
20 | [[package]]
21 | name = "autocfg"
22 | version = "1.1.0"
23 | source = "registry+https://github.com/rust-lang/crates.io-index"
24 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
25 |
26 | [[package]]
27 | name = "bitflags"
28 | version = "1.3.2"
29 | source = "registry+https://github.com/rust-lang/crates.io-index"
30 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
31 |
32 | [[package]]
33 | name = "block"
34 | version = "0.1.6"
35 | source = "registry+https://github.com/rust-lang/crates.io-index"
36 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
37 |
38 | [[package]]
39 | name = "cairo-rs"
40 | version = "0.15.6"
41 | source = "registry+https://github.com/rust-lang/crates.io-index"
42 | checksum = "e8b14c80d8d1a02fa6d914b9d1afeeca9bc34257f8300d9696e1e331ae114223"
43 | dependencies = [
44 | "bitflags",
45 | "cairo-sys-rs",
46 | "glib",
47 | "libc",
48 | "thiserror",
49 | ]
50 |
51 | [[package]]
52 | name = "cairo-sys-rs"
53 | version = "0.15.1"
54 | source = "registry+https://github.com/rust-lang/crates.io-index"
55 | checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8"
56 | dependencies = [
57 | "glib-sys",
58 | "libc",
59 | "system-deps",
60 | ]
61 |
62 | [[package]]
63 | name = "cc"
64 | version = "1.0.73"
65 | source = "registry+https://github.com/rust-lang/crates.io-index"
66 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
67 |
68 | [[package]]
69 | name = "cfg-expr"
70 | version = "0.10.1"
71 | source = "registry+https://github.com/rust-lang/crates.io-index"
72 | checksum = "295b6eb918a60a25fec0b23a5e633e74fddbaf7bb04411e65a10c366aca4b5cd"
73 | dependencies = [
74 | "smallvec",
75 | ]
76 |
77 | [[package]]
78 | name = "echidna"
79 | version = "0.1.0"
80 | dependencies = [
81 | "gettext-rs",
82 | "gtk4",
83 | "libadwaita",
84 | "once_cell",
85 | "relative-path",
86 | "serde",
87 | "serde_json",
88 | "sourceview5",
89 | ]
90 |
91 | [[package]]
92 | name = "field-offset"
93 | version = "0.3.4"
94 | source = "registry+https://github.com/rust-lang/crates.io-index"
95 | checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92"
96 | dependencies = [
97 | "memoffset",
98 | "rustc_version",
99 | ]
100 |
101 | [[package]]
102 | name = "futures-channel"
103 | version = "0.3.21"
104 | source = "registry+https://github.com/rust-lang/crates.io-index"
105 | checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
106 | dependencies = [
107 | "futures-core",
108 | ]
109 |
110 | [[package]]
111 | name = "futures-core"
112 | version = "0.3.21"
113 | source = "registry+https://github.com/rust-lang/crates.io-index"
114 | checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
115 |
116 | [[package]]
117 | name = "futures-executor"
118 | version = "0.3.21"
119 | source = "registry+https://github.com/rust-lang/crates.io-index"
120 | checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6"
121 | dependencies = [
122 | "futures-core",
123 | "futures-task",
124 | "futures-util",
125 | ]
126 |
127 | [[package]]
128 | name = "futures-io"
129 | version = "0.3.21"
130 | source = "registry+https://github.com/rust-lang/crates.io-index"
131 | checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b"
132 |
133 | [[package]]
134 | name = "futures-task"
135 | version = "0.3.21"
136 | source = "registry+https://github.com/rust-lang/crates.io-index"
137 | checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
138 |
139 | [[package]]
140 | name = "futures-util"
141 | version = "0.3.21"
142 | source = "registry+https://github.com/rust-lang/crates.io-index"
143 | checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
144 | dependencies = [
145 | "futures-core",
146 | "futures-task",
147 | "pin-project-lite",
148 | "pin-utils",
149 | "slab",
150 | ]
151 |
152 | [[package]]
153 | name = "gdk-pixbuf"
154 | version = "0.15.6"
155 | source = "registry+https://github.com/rust-lang/crates.io-index"
156 | checksum = "d8750501d75f318c2ec0314701bc8403901303210def80bafd13f6b6059a3f45"
157 | dependencies = [
158 | "bitflags",
159 | "gdk-pixbuf-sys",
160 | "gio",
161 | "glib",
162 | "libc",
163 | ]
164 |
165 | [[package]]
166 | name = "gdk-pixbuf-sys"
167 | version = "0.15.1"
168 | source = "registry+https://github.com/rust-lang/crates.io-index"
169 | checksum = "413424d9818621fa3cfc8a3a915cdb89a7c3c507d56761b4ec83a9a98e587171"
170 | dependencies = [
171 | "gio-sys",
172 | "glib-sys",
173 | "gobject-sys",
174 | "libc",
175 | "system-deps",
176 | ]
177 |
178 | [[package]]
179 | name = "gdk4"
180 | version = "0.4.6"
181 | source = "registry+https://github.com/rust-lang/crates.io-index"
182 | checksum = "d9df40006277ff44538fe758400fc671146f6f2665978b6b57d2408db3c2becf"
183 | dependencies = [
184 | "bitflags",
185 | "cairo-rs",
186 | "gdk-pixbuf",
187 | "gdk4-sys",
188 | "gio",
189 | "glib",
190 | "libc",
191 | "pango",
192 | ]
193 |
194 | [[package]]
195 | name = "gdk4-sys"
196 | version = "0.4.2"
197 | source = "registry+https://github.com/rust-lang/crates.io-index"
198 | checksum = "48a39e34abe35ee2cf54a1e29dd983accecd113ad30bdead5050418fa92f2a1b"
199 | dependencies = [
200 | "cairo-sys-rs",
201 | "gdk-pixbuf-sys",
202 | "gio-sys",
203 | "glib-sys",
204 | "gobject-sys",
205 | "libc",
206 | "pango-sys",
207 | "pkg-config",
208 | "system-deps",
209 | ]
210 |
211 | [[package]]
212 | name = "gettext-rs"
213 | version = "0.7.0"
214 | source = "registry+https://github.com/rust-lang/crates.io-index"
215 | checksum = "e49ea8a8fad198aaa1f9655a2524b64b70eb06b2f3ff37da407566c93054f364"
216 | dependencies = [
217 | "gettext-sys",
218 | "locale_config",
219 | ]
220 |
221 | [[package]]
222 | name = "gettext-sys"
223 | version = "0.21.3"
224 | source = "registry+https://github.com/rust-lang/crates.io-index"
225 | checksum = "c63ce2e00f56a206778276704bbe38564c8695249fdc8f354b4ef71c57c3839d"
226 | dependencies = [
227 | "cc",
228 | "temp-dir",
229 | ]
230 |
231 | [[package]]
232 | name = "gio"
233 | version = "0.15.6"
234 | source = "registry+https://github.com/rust-lang/crates.io-index"
235 | checksum = "96efd8a1c00d890f6b45671916e165b5e43ccec61957d443aff6d7e44f62d348"
236 | dependencies = [
237 | "bitflags",
238 | "futures-channel",
239 | "futures-core",
240 | "futures-io",
241 | "gio-sys",
242 | "glib",
243 | "libc",
244 | "once_cell",
245 | "thiserror",
246 | ]
247 |
248 | [[package]]
249 | name = "gio-sys"
250 | version = "0.15.6"
251 | source = "registry+https://github.com/rust-lang/crates.io-index"
252 | checksum = "1d0fa5052773f5a56b8ae47dab09d040f5d9ce1311f4f99006e16e9a08269296"
253 | dependencies = [
254 | "glib-sys",
255 | "gobject-sys",
256 | "libc",
257 | "system-deps",
258 | "winapi",
259 | ]
260 |
261 | [[package]]
262 | name = "glib"
263 | version = "0.15.6"
264 | source = "registry+https://github.com/rust-lang/crates.io-index"
265 | checksum = "aa570813c504bdf7539a9400180c2dd4b789a819556fb86da7226d7d1b037b49"
266 | dependencies = [
267 | "bitflags",
268 | "futures-channel",
269 | "futures-core",
270 | "futures-executor",
271 | "futures-task",
272 | "glib-macros",
273 | "glib-sys",
274 | "gobject-sys",
275 | "libc",
276 | "once_cell",
277 | "smallvec",
278 | "thiserror",
279 | ]
280 |
281 | [[package]]
282 | name = "glib-macros"
283 | version = "0.15.6"
284 | source = "registry+https://github.com/rust-lang/crates.io-index"
285 | checksum = "41bfd8d227dead0829ac142454e97531b93f576d0805d779c42bfd799c65c572"
286 | dependencies = [
287 | "anyhow",
288 | "heck",
289 | "proc-macro-crate",
290 | "proc-macro-error",
291 | "proc-macro2",
292 | "quote",
293 | "syn",
294 | ]
295 |
296 | [[package]]
297 | name = "glib-sys"
298 | version = "0.15.6"
299 | source = "registry+https://github.com/rust-lang/crates.io-index"
300 | checksum = "f4366377bd56697de8aaee24e673c575d2694d72e7756324ded2b0428829a7b8"
301 | dependencies = [
302 | "libc",
303 | "system-deps",
304 | ]
305 |
306 | [[package]]
307 | name = "gobject-sys"
308 | version = "0.15.5"
309 | source = "registry+https://github.com/rust-lang/crates.io-index"
310 | checksum = "df6859463843c20cf3837e3a9069b6ab2051aeeadf4c899d33344f4aea83189a"
311 | dependencies = [
312 | "glib-sys",
313 | "libc",
314 | "system-deps",
315 | ]
316 |
317 | [[package]]
318 | name = "graphene-rs"
319 | version = "0.15.1"
320 | source = "registry+https://github.com/rust-lang/crates.io-index"
321 | checksum = "7c54f9fbbeefdb62c99f892dfca35f83991e2cb5b46a8dc2a715e58612f85570"
322 | dependencies = [
323 | "glib",
324 | "graphene-sys",
325 | "libc",
326 | ]
327 |
328 | [[package]]
329 | name = "graphene-sys"
330 | version = "0.15.1"
331 | source = "registry+https://github.com/rust-lang/crates.io-index"
332 | checksum = "03f311acb023cf7af5537f35de028e03706136eead7f25a31e8fd26f5011e0b3"
333 | dependencies = [
334 | "glib-sys",
335 | "libc",
336 | "pkg-config",
337 | "system-deps",
338 | ]
339 |
340 | [[package]]
341 | name = "gsk4"
342 | version = "0.4.6"
343 | source = "registry+https://github.com/rust-lang/crates.io-index"
344 | checksum = "1bf63d454e2f75abd92ee6de0ac9fc5aaf1018cd9c458aaf9de296c5cbab6bb9"
345 | dependencies = [
346 | "bitflags",
347 | "cairo-rs",
348 | "gdk4",
349 | "glib",
350 | "graphene-rs",
351 | "gsk4-sys",
352 | "libc",
353 | "pango",
354 | ]
355 |
356 | [[package]]
357 | name = "gsk4-sys"
358 | version = "0.4.2"
359 | source = "registry+https://github.com/rust-lang/crates.io-index"
360 | checksum = "e31d21d7ce02ba261bb24c50c4ab238a10b41a2c97c32afffae29471b7cca69b"
361 | dependencies = [
362 | "cairo-sys-rs",
363 | "gdk4-sys",
364 | "glib-sys",
365 | "gobject-sys",
366 | "graphene-sys",
367 | "libc",
368 | "pango-sys",
369 | "system-deps",
370 | ]
371 |
372 | [[package]]
373 | name = "gtk4"
374 | version = "0.4.6"
375 | source = "registry+https://github.com/rust-lang/crates.io-index"
376 | checksum = "9e841556e3fe55d8a43ada76b7b08a5f65570bbdfe3b8f72c333053b8832c626"
377 | dependencies = [
378 | "bitflags",
379 | "cairo-rs",
380 | "field-offset",
381 | "futures-channel",
382 | "gdk-pixbuf",
383 | "gdk4",
384 | "gio",
385 | "glib",
386 | "graphene-rs",
387 | "gsk4",
388 | "gtk4-macros",
389 | "gtk4-sys",
390 | "libc",
391 | "once_cell",
392 | "pango",
393 | ]
394 |
395 | [[package]]
396 | name = "gtk4-macros"
397 | version = "0.4.3"
398 | source = "registry+https://github.com/rust-lang/crates.io-index"
399 | checksum = "573db42bb64973a4d5f718b73caa7204285a1a665308a23b11723d0ee56ec305"
400 | dependencies = [
401 | "anyhow",
402 | "proc-macro-crate",
403 | "proc-macro-error",
404 | "proc-macro2",
405 | "quote",
406 | "syn",
407 | ]
408 |
409 | [[package]]
410 | name = "gtk4-sys"
411 | version = "0.4.5"
412 | source = "registry+https://github.com/rust-lang/crates.io-index"
413 | checksum = "c47c075e8f795c38f6e9a47b51a73eab77b325f83c0154979ed4d4245c36490d"
414 | dependencies = [
415 | "cairo-sys-rs",
416 | "gdk-pixbuf-sys",
417 | "gdk4-sys",
418 | "gio-sys",
419 | "glib-sys",
420 | "gobject-sys",
421 | "graphene-sys",
422 | "gsk4-sys",
423 | "libc",
424 | "pango-sys",
425 | "system-deps",
426 | ]
427 |
428 | [[package]]
429 | name = "heck"
430 | version = "0.4.0"
431 | source = "registry+https://github.com/rust-lang/crates.io-index"
432 | checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
433 |
434 | [[package]]
435 | name = "itoa"
436 | version = "1.0.1"
437 | source = "registry+https://github.com/rust-lang/crates.io-index"
438 | checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
439 |
440 | [[package]]
441 | name = "lazy_static"
442 | version = "1.4.0"
443 | source = "registry+https://github.com/rust-lang/crates.io-index"
444 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
445 |
446 | [[package]]
447 | name = "libadwaita"
448 | version = "0.1.0"
449 | source = "registry+https://github.com/rust-lang/crates.io-index"
450 | checksum = "0d4b1d54d907dfa5d6663fdf4bdbe46c34747258b85c787adbf66187ccbaac81"
451 | dependencies = [
452 | "gdk-pixbuf",
453 | "gdk4",
454 | "gio",
455 | "glib",
456 | "gtk4",
457 | "libadwaita-sys",
458 | "libc",
459 | "once_cell",
460 | "pango",
461 | ]
462 |
463 | [[package]]
464 | name = "libadwaita-sys"
465 | version = "0.1.0"
466 | source = "registry+https://github.com/rust-lang/crates.io-index"
467 | checksum = "f18b6ac4cadd252a89f5cba0a5a4e99836131795d6fad37b859ac79e8cb7d2c8"
468 | dependencies = [
469 | "gdk4-sys",
470 | "gio-sys",
471 | "glib-sys",
472 | "gobject-sys",
473 | "gtk4-sys",
474 | "libc",
475 | "system-deps",
476 | ]
477 |
478 | [[package]]
479 | name = "libc"
480 | version = "0.2.119"
481 | source = "registry+https://github.com/rust-lang/crates.io-index"
482 | checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
483 |
484 | [[package]]
485 | name = "locale_config"
486 | version = "0.3.0"
487 | source = "registry+https://github.com/rust-lang/crates.io-index"
488 | checksum = "08d2c35b16f4483f6c26f0e4e9550717a2f6575bcd6f12a53ff0c490a94a6934"
489 | dependencies = [
490 | "lazy_static",
491 | "objc",
492 | "objc-foundation",
493 | "regex",
494 | "winapi",
495 | ]
496 |
497 | [[package]]
498 | name = "malloc_buf"
499 | version = "0.0.6"
500 | source = "registry+https://github.com/rust-lang/crates.io-index"
501 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
502 | dependencies = [
503 | "libc",
504 | ]
505 |
506 | [[package]]
507 | name = "memchr"
508 | version = "2.5.0"
509 | source = "registry+https://github.com/rust-lang/crates.io-index"
510 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
511 |
512 | [[package]]
513 | name = "memoffset"
514 | version = "0.6.5"
515 | source = "registry+https://github.com/rust-lang/crates.io-index"
516 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
517 | dependencies = [
518 | "autocfg",
519 | ]
520 |
521 | [[package]]
522 | name = "objc"
523 | version = "0.2.7"
524 | source = "registry+https://github.com/rust-lang/crates.io-index"
525 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
526 | dependencies = [
527 | "malloc_buf",
528 | ]
529 |
530 | [[package]]
531 | name = "objc-foundation"
532 | version = "0.1.1"
533 | source = "registry+https://github.com/rust-lang/crates.io-index"
534 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
535 | dependencies = [
536 | "block",
537 | "objc",
538 | "objc_id",
539 | ]
540 |
541 | [[package]]
542 | name = "objc_id"
543 | version = "0.1.1"
544 | source = "registry+https://github.com/rust-lang/crates.io-index"
545 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
546 | dependencies = [
547 | "objc",
548 | ]
549 |
550 | [[package]]
551 | name = "once_cell"
552 | version = "1.9.0"
553 | source = "registry+https://github.com/rust-lang/crates.io-index"
554 | checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
555 |
556 | [[package]]
557 | name = "pango"
558 | version = "0.15.6"
559 | source = "registry+https://github.com/rust-lang/crates.io-index"
560 | checksum = "78c7420fc01a390ec200da7395b64d705f5d82fe03e5d0708aee422c46538be7"
561 | dependencies = [
562 | "bitflags",
563 | "glib",
564 | "libc",
565 | "once_cell",
566 | "pango-sys",
567 | ]
568 |
569 | [[package]]
570 | name = "pango-sys"
571 | version = "0.15.1"
572 | source = "registry+https://github.com/rust-lang/crates.io-index"
573 | checksum = "7022c2fb88cd2d9d55e1a708a8c53a3ae8678234c4a54bf623400aeb7f31fac2"
574 | dependencies = [
575 | "glib-sys",
576 | "gobject-sys",
577 | "libc",
578 | "system-deps",
579 | ]
580 |
581 | [[package]]
582 | name = "pest"
583 | version = "2.1.3"
584 | source = "registry+https://github.com/rust-lang/crates.io-index"
585 | checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53"
586 | dependencies = [
587 | "ucd-trie",
588 | ]
589 |
590 | [[package]]
591 | name = "pin-project-lite"
592 | version = "0.2.8"
593 | source = "registry+https://github.com/rust-lang/crates.io-index"
594 | checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
595 |
596 | [[package]]
597 | name = "pin-utils"
598 | version = "0.1.0"
599 | source = "registry+https://github.com/rust-lang/crates.io-index"
600 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
601 |
602 | [[package]]
603 | name = "pkg-config"
604 | version = "0.3.24"
605 | source = "registry+https://github.com/rust-lang/crates.io-index"
606 | checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"
607 |
608 | [[package]]
609 | name = "proc-macro-crate"
610 | version = "1.1.2"
611 | source = "registry+https://github.com/rust-lang/crates.io-index"
612 | checksum = "9dada8c9981fcf32929c3c0f0cd796a9284aca335565227ed88c83babb1d43dc"
613 | dependencies = [
614 | "thiserror",
615 | "toml",
616 | ]
617 |
618 | [[package]]
619 | name = "proc-macro-error"
620 | version = "1.0.4"
621 | source = "registry+https://github.com/rust-lang/crates.io-index"
622 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
623 | dependencies = [
624 | "proc-macro-error-attr",
625 | "proc-macro2",
626 | "quote",
627 | "syn",
628 | "version_check",
629 | ]
630 |
631 | [[package]]
632 | name = "proc-macro-error-attr"
633 | version = "1.0.4"
634 | source = "registry+https://github.com/rust-lang/crates.io-index"
635 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
636 | dependencies = [
637 | "proc-macro2",
638 | "quote",
639 | "version_check",
640 | ]
641 |
642 | [[package]]
643 | name = "proc-macro2"
644 | version = "1.0.36"
645 | source = "registry+https://github.com/rust-lang/crates.io-index"
646 | checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
647 | dependencies = [
648 | "unicode-xid",
649 | ]
650 |
651 | [[package]]
652 | name = "quote"
653 | version = "1.0.15"
654 | source = "registry+https://github.com/rust-lang/crates.io-index"
655 | checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
656 | dependencies = [
657 | "proc-macro2",
658 | ]
659 |
660 | [[package]]
661 | name = "regex"
662 | version = "1.5.5"
663 | source = "registry+https://github.com/rust-lang/crates.io-index"
664 | checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
665 | dependencies = [
666 | "aho-corasick",
667 | "memchr",
668 | "regex-syntax",
669 | ]
670 |
671 | [[package]]
672 | name = "regex-syntax"
673 | version = "0.6.25"
674 | source = "registry+https://github.com/rust-lang/crates.io-index"
675 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
676 |
677 | [[package]]
678 | name = "relative-path"
679 | version = "1.6.1"
680 | source = "registry+https://github.com/rust-lang/crates.io-index"
681 | checksum = "a49a831dc1e13c9392b660b162333d4cb0033bbbdfe6a1687177e59e89037c86"
682 |
683 | [[package]]
684 | name = "rustc_version"
685 | version = "0.3.3"
686 | source = "registry+https://github.com/rust-lang/crates.io-index"
687 | checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee"
688 | dependencies = [
689 | "semver",
690 | ]
691 |
692 | [[package]]
693 | name = "ryu"
694 | version = "1.0.9"
695 | source = "registry+https://github.com/rust-lang/crates.io-index"
696 | checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
697 |
698 | [[package]]
699 | name = "semver"
700 | version = "0.11.0"
701 | source = "registry+https://github.com/rust-lang/crates.io-index"
702 | checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
703 | dependencies = [
704 | "semver-parser",
705 | ]
706 |
707 | [[package]]
708 | name = "semver-parser"
709 | version = "0.10.2"
710 | source = "registry+https://github.com/rust-lang/crates.io-index"
711 | checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7"
712 | dependencies = [
713 | "pest",
714 | ]
715 |
716 | [[package]]
717 | name = "serde"
718 | version = "1.0.136"
719 | source = "registry+https://github.com/rust-lang/crates.io-index"
720 | checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
721 | dependencies = [
722 | "serde_derive",
723 | ]
724 |
725 | [[package]]
726 | name = "serde_derive"
727 | version = "1.0.136"
728 | source = "registry+https://github.com/rust-lang/crates.io-index"
729 | checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
730 | dependencies = [
731 | "proc-macro2",
732 | "quote",
733 | "syn",
734 | ]
735 |
736 | [[package]]
737 | name = "serde_json"
738 | version = "1.0.79"
739 | source = "registry+https://github.com/rust-lang/crates.io-index"
740 | checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
741 | dependencies = [
742 | "itoa",
743 | "ryu",
744 | "serde",
745 | ]
746 |
747 | [[package]]
748 | name = "slab"
749 | version = "0.4.5"
750 | source = "registry+https://github.com/rust-lang/crates.io-index"
751 | checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
752 |
753 | [[package]]
754 | name = "smallvec"
755 | version = "1.8.0"
756 | source = "registry+https://github.com/rust-lang/crates.io-index"
757 | checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
758 |
759 | [[package]]
760 | name = "sourceview5"
761 | version = "0.4.1"
762 | source = "registry+https://github.com/rust-lang/crates.io-index"
763 | checksum = "ec66e5db143023da4dbe7dcb5f9d7bb50c0e5668c3ea91d40e8ba188f7f07a54"
764 | dependencies = [
765 | "bitflags",
766 | "futures-channel",
767 | "futures-core",
768 | "gdk-pixbuf",
769 | "gdk4",
770 | "gio",
771 | "glib",
772 | "gtk4",
773 | "libc",
774 | "pango",
775 | "sourceview5-sys",
776 | ]
777 |
778 | [[package]]
779 | name = "sourceview5-sys"
780 | version = "0.4.1"
781 | source = "registry+https://github.com/rust-lang/crates.io-index"
782 | checksum = "6bbf0b30cd67340b8fc695f460859dbadaec159850c260a0f766cc607bb14a86"
783 | dependencies = [
784 | "gdk-pixbuf-sys",
785 | "gdk4-sys",
786 | "gio-sys",
787 | "glib-sys",
788 | "gobject-sys",
789 | "gtk4-sys",
790 | "libc",
791 | "pango-sys",
792 | "system-deps",
793 | ]
794 |
795 | [[package]]
796 | name = "syn"
797 | version = "1.0.86"
798 | source = "registry+https://github.com/rust-lang/crates.io-index"
799 | checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
800 | dependencies = [
801 | "proc-macro2",
802 | "quote",
803 | "unicode-xid",
804 | ]
805 |
806 | [[package]]
807 | name = "system-deps"
808 | version = "6.0.2"
809 | source = "registry+https://github.com/rust-lang/crates.io-index"
810 | checksum = "a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"
811 | dependencies = [
812 | "cfg-expr",
813 | "heck",
814 | "pkg-config",
815 | "toml",
816 | "version-compare",
817 | ]
818 |
819 | [[package]]
820 | name = "temp-dir"
821 | version = "0.1.11"
822 | source = "registry+https://github.com/rust-lang/crates.io-index"
823 | checksum = "af547b166dd1ea4b472165569fc456cfb6818116f854690b0ff205e636523dab"
824 |
825 | [[package]]
826 | name = "thiserror"
827 | version = "1.0.30"
828 | source = "registry+https://github.com/rust-lang/crates.io-index"
829 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
830 | dependencies = [
831 | "thiserror-impl",
832 | ]
833 |
834 | [[package]]
835 | name = "thiserror-impl"
836 | version = "1.0.30"
837 | source = "registry+https://github.com/rust-lang/crates.io-index"
838 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
839 | dependencies = [
840 | "proc-macro2",
841 | "quote",
842 | "syn",
843 | ]
844 |
845 | [[package]]
846 | name = "toml"
847 | version = "0.5.8"
848 | source = "registry+https://github.com/rust-lang/crates.io-index"
849 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
850 | dependencies = [
851 | "serde",
852 | ]
853 |
854 | [[package]]
855 | name = "ucd-trie"
856 | version = "0.1.3"
857 | source = "registry+https://github.com/rust-lang/crates.io-index"
858 | checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
859 |
860 | [[package]]
861 | name = "unicode-xid"
862 | version = "0.2.2"
863 | source = "registry+https://github.com/rust-lang/crates.io-index"
864 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
865 |
866 | [[package]]
867 | name = "version-compare"
868 | version = "0.1.0"
869 | source = "registry+https://github.com/rust-lang/crates.io-index"
870 | checksum = "fe88247b92c1df6b6de80ddc290f3976dbdf2f5f5d3fd049a9fb598c6dd5ca73"
871 |
872 | [[package]]
873 | name = "version_check"
874 | version = "0.9.4"
875 | source = "registry+https://github.com/rust-lang/crates.io-index"
876 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
877 |
878 | [[package]]
879 | name = "winapi"
880 | version = "0.3.9"
881 | source = "registry+https://github.com/rust-lang/crates.io-index"
882 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
883 | dependencies = [
884 | "winapi-i686-pc-windows-gnu",
885 | "winapi-x86_64-pc-windows-gnu",
886 | ]
887 |
888 | [[package]]
889 | name = "winapi-i686-pc-windows-gnu"
890 | version = "0.4.0"
891 | source = "registry+https://github.com/rust-lang/crates.io-index"
892 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
893 |
894 | [[package]]
895 | name = "winapi-x86_64-pc-windows-gnu"
896 | version = "0.4.0"
897 | source = "registry+https://github.com/rust-lang/crates.io-index"
898 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
899 |
--------------------------------------------------------------------------------