From 783ca9ae115a455808349af741e4d4fe51981faf Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Thu, 1 Dec 2022 12:13:36 +0000 Subject: [PATCH] structure: Create a module for custom event loops --- src/{ => actors/external}/debug.rs | 0 src/actors/external/mod.rs | 9 +++++++++ src/actors/mod.rs | 1 + src/lib.rs | 1 - src/main.rs | 2 +- src/state.rs | 2 +- 6 files changed, 12 insertions(+), 3 deletions(-) rename src/{ => actors/external}/debug.rs (100%) create mode 100644 src/actors/external/mod.rs diff --git a/src/debug.rs b/src/actors/external/debug.rs similarity index 100% rename from src/debug.rs rename to src/actors/external/debug.rs diff --git a/src/actors/external/mod.rs b/src/actors/external/mod.rs new file mode 100644 index 00000000..33344af4 --- /dev/null +++ b/src/actors/external/mod.rs @@ -0,0 +1,9 @@ +/* + * Copyright (C) 2022 Purism SPC + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +/*! Contains actors with custom event loops, not based off of the event_loop module. */ + +pub mod debug; \ No newline at end of file diff --git a/src/actors/mod.rs b/src/actors/mod.rs index 378da9eb..b4fdc990 100644 --- a/src/actors/mod.rs +++ b/src/actors/mod.rs @@ -20,4 +20,5 @@ and by receiving updates from it. // Panel contains state and logic to protect the main state from getting flooded // with low-level wayland and gtk sizing events. +pub mod external; pub mod popover; \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index f1e70c69..84feb8e3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,6 @@ mod action; mod actors; mod animation; pub mod data; -mod debug; mod drawing; mod event_loop; pub mod float_ord; diff --git a/src/main.rs b/src/main.rs index c56b1053..f9ea1b4b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,8 +4,8 @@ /*! Glue for the main loop. */ use crate::actors; +use crate::actors::external::debug; use crate::animation; -use crate::debug; use crate::data::loading; use crate::event_loop; use crate::panel; diff --git a/src/state.rs b/src/state.rs index 5030a5d4..b890b851 100644 --- a/src/state.rs +++ b/src/state.rs @@ -5,8 +5,8 @@ /*! Application-wide state is stored here. * It's driven by the loop defined in the loop module. */ +use crate::actors::external::debug; use crate::animation; -use crate::debug; use crate::event_loop; use crate::event_loop::ActorState; use crate::imservice::{ ContentHint, ContentPurpose };