Skip to content

Commit

Permalink
Merge branch 'main' of github.com:odilia-app/odilia
Browse files Browse the repository at this point in the history
  • Loading branch information
TTWNO committed Jan 21, 2023
2 parents 331db30 + 1496345 commit fab7cf0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pre-release-hook = ["cargo", "fmt"]
dependent-version = "upgrade"

[workspace.dependencies]
atspi = { version = "0.8.7", git="https://github.com/odilia-app/atspi", branch="main", default-features = false, features = ["tokio"] }
atspi = { version = "0.9.0", default-features = false, features = ["tokio"] }
eyre = "0.6.8"
nix = "0.25.0"
serde_json = "1.0.89"
Expand Down
4 changes: 2 additions & 2 deletions common/src/events.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use serde::{Deserialize, Serialize};

use crate::modes::ScreenReaderMode;
use atspi::{accessible::Role, text::TextGranularity};
use atspi::{accessible::Role, text::Granularity};

#[derive(Eq, PartialEq, Clone, Hash, Serialize, Deserialize)]
pub enum Feature {
Expand All @@ -25,6 +25,6 @@ pub enum ScreenReaderEvent {
Enable(Feature),
Disable(Feature),
ChangeMode(ScreenReaderMode),
ChangeGranularity(TextGranularity),
ChangeGranularity(Granularity),
StructuralNavigation(Direction, Role),
}
4 changes: 2 additions & 2 deletions common/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use atspi::text::TextGranularity;
use atspi::text::Granularity;
use zbus::zvariant::OwnedObjectPath;

pub type Accessible = (String, OwnedObjectPath);
Expand All @@ -9,7 +9,7 @@ pub struct IndexesSelection {
}
pub struct GranularSelection {
pub index: i32,
pub granularity: TextGranularity,
pub granularity: Granularity,
}

pub enum TextSelectionArea {
Expand Down
8 changes: 4 additions & 4 deletions odilia/src/events/cache.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use crate::ScreenReaderState;
use odilia_cache::AccessiblePrimitive;
use atspi::events::{
CacheEvent,
CacheEvents,
AddAccessibleEvent,
RemoveAccessibleEvent,
};

pub async fn dispatch(state: &ScreenReaderState, event: &CacheEvent) -> eyre::Result<()> {
pub async fn dispatch(state: &ScreenReaderState, event: &CacheEvents) -> eyre::Result<()> {
match event {
CacheEvent::Add(add_event) => add_accessible(state, add_event).await?,
CacheEvent::Remove(rem_event) => remove_accessible(state, rem_event).await?,
CacheEvents::Add(add_event) => add_accessible(state, add_event).await?,
CacheEvents::Remove(rem_event) => remove_accessible(state, rem_event).await?,
}
Ok(())
}
Expand Down
6 changes: 3 additions & 3 deletions odilia/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use odilia_cache::{
};
use atspi::{
accessible::AccessibleProxy, accessible_ext::{AccessibleExt}, cache::CacheProxy,
convertable::Convertable, text::TextGranularity,
convertable::Convertable, text::Granularity,
signify::Signified,
};
use odilia_common::{
Expand All @@ -27,7 +27,7 @@ pub struct ScreenReaderState {
pub config: ApplicationConfig,
pub previous_caret_position: Cell<i32>,
pub mode: Mutex<ScreenReaderMode>,
pub granularity: Mutex<TextGranularity>,
pub granularity: Mutex<Granularity>,
pub accessible_history: Mutex<CircularQueue<AccessiblePrimitive>>,
pub event_history: Mutex<CircularQueue<atspi::Event>>,
pub cache: Cache,
Expand Down Expand Up @@ -67,7 +67,7 @@ impl ScreenReaderState {
let event_history = Mutex::new(CircularQueue::with_capacity(16));
let cache = Cache::new();

let granularity = Mutex::new(TextGranularity::Line);
let granularity = Mutex::new(Granularity::Line);
Ok(Self {
atspi,
dbus,
Expand Down

0 comments on commit fab7cf0

Please sign in to comment.