mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-19 11:08:32 +02:00
Create function signatures for plugins
Update crates
This commit is contained in:
parent
59fe7fc454
commit
cd4074bd44
12
Cargo.toml
12
Cargo.toml
|
@ -8,12 +8,12 @@ license = "GPL-3.0-only"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
reset_daemon = "1.0.1"
|
reset_daemon = "1.0.1"
|
||||||
re_set-lib = "1.0.0"
|
re_set-lib = "2.0.0"
|
||||||
adw = { version = "0.5.3", package = "libadwaita", features = ["v1_4"] }
|
adw = { version = "0.6.0", package = "libadwaita", features = ["v1_4"] }
|
||||||
dbus = "0.9.7"
|
dbus = "0.9.7"
|
||||||
gtk = { version = "0.7.3", package = "gtk4", features = ["v4_12"] }
|
gtk = { version = "0.8.1", package = "gtk4", features = ["v4_12"] }
|
||||||
glib = "0.18.3"
|
glib = "0.19.2"
|
||||||
tokio = { version = "1.33.0", features = [
|
tokio = { version = "1.36.0", features = [
|
||||||
"rt",
|
"rt",
|
||||||
"time",
|
"time",
|
||||||
"net",
|
"net",
|
||||||
|
@ -25,4 +25,4 @@ fork = "0.1.22"
|
||||||
ipnetwork = "0.20.0"
|
ipnetwork = "0.20.0"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
glib-build-tools = "0.18.0"
|
glib-build-tools = "0.19.0"
|
||||||
|
|
|
@ -10,7 +10,8 @@ use adw::prelude::{ButtonExt, ComboRowExt, PreferencesRowExt, RangeExt};
|
||||||
use dbus::blocking::Connection;
|
use dbus::blocking::Connection;
|
||||||
use dbus::Error;
|
use dbus::Error;
|
||||||
use glib::subclass::types::ObjectSubclassIsExt;
|
use glib::subclass::types::ObjectSubclassIsExt;
|
||||||
use glib::{clone, Cast, Propagation};
|
use glib::{clone, Propagation};
|
||||||
|
use glib::prelude::Cast;
|
||||||
use gtk::{gio, StringObject};
|
use gtk::{gio, StringObject};
|
||||||
use re_set_lib::audio::audio_structures::OutputStream;
|
use re_set_lib::audio::audio_structures::OutputStream;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,8 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use adw::prelude::{ComboRowExt, PreferencesRowExt};
|
use adw::prelude::{ComboRowExt, PreferencesRowExt};
|
||||||
use glib::{subclass::types::ObjectSubclassIsExt, Cast, ControlFlow, Propagation};
|
use glib::{subclass::types::ObjectSubclassIsExt, ControlFlow, Propagation};
|
||||||
|
use glib::prelude::Cast;
|
||||||
use gtk::{
|
use gtk::{
|
||||||
gio,
|
gio,
|
||||||
prelude::{BoxExt, ButtonExt, CheckButtonExt, ListBoxRowExt, RangeExt},
|
prelude::{BoxExt, ButtonExt, CheckButtonExt, ListBoxRowExt, RangeExt},
|
||||||
|
|
|
@ -10,7 +10,8 @@ use adw::prelude::{ButtonExt, ComboRowExt, PreferencesRowExt, RangeExt};
|
||||||
use dbus::blocking::Connection;
|
use dbus::blocking::Connection;
|
||||||
use dbus::Error;
|
use dbus::Error;
|
||||||
use glib::subclass::types::ObjectSubclassIsExt;
|
use glib::subclass::types::ObjectSubclassIsExt;
|
||||||
use glib::{clone, Cast, Propagation};
|
use glib::{clone, Propagation};
|
||||||
|
use glib::prelude::Cast;
|
||||||
use gtk::{gio, StringObject};
|
use gtk::{gio, StringObject};
|
||||||
use re_set_lib::audio::audio_structures::InputStream;
|
use re_set_lib::audio::audio_structures::InputStream;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,8 @@ use adw::{
|
||||||
prelude::{ComboRowExt, PreferencesRowExt},
|
prelude::{ComboRowExt, PreferencesRowExt},
|
||||||
ComboRow,
|
ComboRow,
|
||||||
};
|
};
|
||||||
use glib::{subclass::types::ObjectSubclassIsExt, Cast, Propagation};
|
use glib::{subclass::types::ObjectSubclassIsExt, Propagation};
|
||||||
|
use glib::prelude::Cast;
|
||||||
use gtk::{
|
use gtk::{
|
||||||
gio,
|
gio,
|
||||||
prelude::{BoxExt, ButtonExt, CheckButtonExt, ListBoxRowExt, RangeExt},
|
prelude::{BoxExt, ButtonExt, CheckButtonExt, ListBoxRowExt, RangeExt},
|
||||||
|
|
|
@ -5,7 +5,8 @@ use adw::prelude::{ComboRowExt, PreferencesRowExt};
|
||||||
use dbus::blocking::Connection;
|
use dbus::blocking::Connection;
|
||||||
use dbus::Error;
|
use dbus::Error;
|
||||||
use glib::subclass::types::ObjectSubclassIsExt;
|
use glib::subclass::types::ObjectSubclassIsExt;
|
||||||
use glib::{clone, Cast};
|
use glib::{clone};
|
||||||
|
use glib::prelude::Cast;
|
||||||
use gtk::{gio, StringList, StringObject};
|
use gtk::{gio, StringList, StringObject};
|
||||||
|
|
||||||
use components::utils::create_dropdown_label_factory;
|
use components::utils::create_dropdown_label_factory;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use crate::components::base::list_entry_impl;
|
use crate::components::base::list_entry_impl;
|
||||||
use adw::glib::{IsA, Object};
|
use adw::glib::{Object};
|
||||||
|
use glib::prelude::IsA;
|
||||||
use gtk::prelude::ListBoxRowExt;
|
use gtk::prelude::ListBoxRowExt;
|
||||||
use gtk::Widget;
|
use gtk::Widget;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
use crate::components::base::setting_box_impl;
|
use crate::components::base::setting_box_impl;
|
||||||
use adw::glib::{IsA, Object};
|
use adw::glib::{Object};
|
||||||
|
use glib::prelude::IsA;
|
||||||
use gtk::prelude::BoxExt;
|
use gtk::prelude::BoxExt;
|
||||||
use gtk::Widget;
|
use gtk::Widget;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
pub struct SettingBox(ObjectSubclass<setting_box_impl::SettingBox>)
|
pub struct SettingBox(ObjectSubclass<setting_box_impl::SettingBox>)
|
||||||
@extends gtk::Box, gtk::Widget,
|
@extends gtk::Box, Widget,
|
||||||
@implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
|
@implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,9 @@ use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||||
use dbus::blocking::Connection;
|
use dbus::blocking::Connection;
|
||||||
use dbus::message::SignalArgs;
|
use dbus::message::SignalArgs;
|
||||||
use dbus::{Error, Path};
|
use dbus::{Error, Path};
|
||||||
use glib::{clone, Cast, ControlFlow, PropertySet};
|
use glib::{clone, ControlFlow};
|
||||||
|
use glib::prelude::Cast;
|
||||||
|
use glib::property::PropertySet;
|
||||||
use gtk::glib::Variant;
|
use gtk::glib::Variant;
|
||||||
use gtk::prelude::{ActionableExt, ButtonExt, ListBoxRowExt, WidgetExt};
|
use gtk::prelude::{ActionableExt, ButtonExt, ListBoxRowExt, WidgetExt};
|
||||||
use gtk::{gio, StringObject};
|
use gtk::{gio, StringObject};
|
||||||
|
|
|
@ -4,3 +4,4 @@ pub mod bluetooth;
|
||||||
pub mod utils;
|
pub mod utils;
|
||||||
pub mod wifi;
|
pub mod wifi;
|
||||||
pub mod window;
|
pub mod window;
|
||||||
|
mod plugin;
|
||||||
|
|
13
src/components/plugin/function.rs
Normal file
13
src/components/plugin/function.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
extern "C" {
|
||||||
|
pub fn startup() -> gtk::Box;
|
||||||
|
pub fn sidebar() -> Sidebar;
|
||||||
|
pub fn shutdown();
|
||||||
|
pub fn run_test();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct Sidebar {
|
||||||
|
pub name: String,
|
||||||
|
pub icon_name: String,
|
||||||
|
pub parent: String,
|
||||||
|
pub group: String,
|
||||||
|
}
|
1
src/components/plugin/mod.rs
Normal file
1
src/components/plugin/mod.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pub mod function;
|
|
@ -1,7 +1,8 @@
|
||||||
use adw::gdk::pango::EllipsizeMode;
|
use adw::gdk::pango::EllipsizeMode;
|
||||||
use adw::prelude::ListModelExtManual;
|
use adw::prelude::ListModelExtManual;
|
||||||
use adw::{ActionRow, ComboRow};
|
use adw::{ActionRow, ComboRow};
|
||||||
use glib::{Cast, Object};
|
use glib::{Object};
|
||||||
|
use glib::prelude::Cast;
|
||||||
use gtk::prelude::{GObjectPropertyExpressionExt, ListBoxRowExt, ListItemExt, WidgetExt};
|
use gtk::prelude::{GObjectPropertyExpressionExt, ListBoxRowExt, ListItemExt, WidgetExt};
|
||||||
use gtk::{Align, SignalListItemFactory, StringObject};
|
use gtk::{Align, SignalListItemFactory, StringObject};
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,8 @@ use adw::prelude::{ActionRowExt, ButtonExt, PreferencesGroupExt, PreferencesRowE
|
||||||
use dbus::blocking::Connection;
|
use dbus::blocking::Connection;
|
||||||
use dbus::{Error, Path};
|
use dbus::{Error, Path};
|
||||||
use glib::subclass::types::ObjectSubclassIsExt;
|
use glib::subclass::types::ObjectSubclassIsExt;
|
||||||
use glib::{clone, PropertySet};
|
use glib::{clone};
|
||||||
|
use glib::property::PropertySet;
|
||||||
use gtk::prelude::{BoxExt, ListBoxRowExt};
|
use gtk::prelude::{BoxExt, ListBoxRowExt};
|
||||||
use gtk::{gio, Align, Button, Orientation};
|
use gtk::{gio, Align, Button, Orientation};
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,9 @@ use dbus::blocking::Connection;
|
||||||
use dbus::message::SignalArgs;
|
use dbus::message::SignalArgs;
|
||||||
use dbus::Error;
|
use dbus::Error;
|
||||||
use dbus::Path;
|
use dbus::Path;
|
||||||
use glib::{clone, Cast, ControlFlow, PropertySet};
|
use glib::{clone, ControlFlow};
|
||||||
|
use glib::prelude::Cast;
|
||||||
|
use glib::property::PropertySet;
|
||||||
use gtk::glib::Variant;
|
use gtk::glib::Variant;
|
||||||
use gtk::prelude::ActionableExt;
|
use gtk::prelude::ActionableExt;
|
||||||
use gtk::{gio, StringList, StringObject};
|
use gtk::{gio, StringList, StringObject};
|
||||||
|
|
|
@ -4,12 +4,13 @@ use std::time::Duration;
|
||||||
|
|
||||||
use crate::components::utils::{BASE, DBUS_PATH, WIRELESS};
|
use crate::components::utils::{BASE, DBUS_PATH, WIRELESS};
|
||||||
use crate::components::wifi::utils::get_connection_settings;
|
use crate::components::wifi::utils::get_connection_settings;
|
||||||
use adw::glib::{Object, PropertySet};
|
use adw::glib::{Object};
|
||||||
use adw::prelude::{ActionRowExt, ButtonExt, EditableExt, PopoverExt, PreferencesRowExt};
|
use adw::prelude::{ActionRowExt, ButtonExt, EditableExt, PopoverExt, PreferencesRowExt};
|
||||||
use adw::subclass::prelude::ObjectSubclassIsExt;
|
use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||||
use dbus::blocking::Connection;
|
use dbus::blocking::Connection;
|
||||||
use dbus::Error;
|
use dbus::Error;
|
||||||
use glib::clone;
|
use glib::clone;
|
||||||
|
use glib::property::PropertySet;
|
||||||
use gtk::prelude::{BoxExt, ListBoxRowExt, WidgetExt};
|
use gtk::prelude::{BoxExt, ListBoxRowExt, WidgetExt};
|
||||||
use gtk::{gio, Align, Button, Image, Orientation};
|
use gtk::{gio, Align, Button, Image, Orientation};
|
||||||
use re_set_lib::network::network_structures::{AccessPoint, WifiStrength};
|
use re_set_lib::network::network_structures::{AccessPoint, WifiStrength};
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use adw::prelude::{ComboRowExt, PreferencesGroupExt, PreferencesRowExt};
|
use adw::prelude::{ComboRowExt, PreferencesGroupExt, PreferencesRowExt};
|
||||||
use glib::{subclass::types::ObjectSubclassIsExt, PropertySet};
|
use glib::{subclass::types::ObjectSubclassIsExt};
|
||||||
|
use glib::property::PropertySet;
|
||||||
use gtk::prelude::WidgetExt;
|
use gtk::prelude::WidgetExt;
|
||||||
use re_set_lib::{
|
use re_set_lib::{
|
||||||
network::network_structures::WifiStrength,
|
network::network_structures::WifiStrength,
|
||||||
|
|
|
@ -10,7 +10,8 @@ use adw::prelude::{ActionRowExt, ComboRowExt, PreferencesGroupExt};
|
||||||
use adw::subclass::prelude::ObjectSubclassIsExt;
|
use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||||
use dbus::arg::PropMap;
|
use dbus::arg::PropMap;
|
||||||
use dbus::{Error, Path};
|
use dbus::{Error, Path};
|
||||||
use glib::{clone, PropertySet};
|
use glib::{clone};
|
||||||
|
use glib::property::PropertySet;
|
||||||
use gtk::prelude::{ActionableExt, ButtonExt, EditableExt, ListBoxRowExt, WidgetExt};
|
use gtk::prelude::{ActionableExt, ButtonExt, EditableExt, ListBoxRowExt, WidgetExt};
|
||||||
use re_set_lib::network::connection::{
|
use re_set_lib::network::connection::{
|
||||||
Connection, DNSMethod4, DNSMethod6, Enum, KeyManagement, TypeSettings,
|
Connection, DNSMethod4, DNSMethod6, Enum, KeyManagement, TypeSettings,
|
||||||
|
|
|
@ -2,9 +2,9 @@ use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use adw::glib::StaticTypeExt;
|
|
||||||
use adw::subclass::prelude::AdwApplicationWindowImpl;
|
use adw::subclass::prelude::AdwApplicationWindowImpl;
|
||||||
use adw::{Breakpoint, OverlaySplitView};
|
use adw::{Breakpoint, OverlaySplitView};
|
||||||
|
use glib::prelude::StaticTypeExt;
|
||||||
use glib::subclass::InitializingObject;
|
use glib::subclass::InitializingObject;
|
||||||
use gtk::prelude::WidgetExt;
|
use gtk::prelude::WidgetExt;
|
||||||
use gtk::subclass::prelude::*;
|
use gtk::subclass::prelude::*;
|
||||||
|
|
Loading…
Reference in a new issue