forked from GNOME/orca
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
163ae80
commit 5435727
Showing
5 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class Formatting : | ||
|
||
def __init__(self, format_type, enum): | ||
self.format_type = format_type | ||
self.enum = enum | ||
|
||
def unfocused(self, c): | ||
return [] | ||
|
||
def focused(self, c): | ||
return [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from orca.formatting import Formatting | ||
|
||
class Braille (Formatting): | ||
def __init__(self, enum): | ||
Formatting.__init__(self, "braille", enum) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from orca.formatting.braille import Braille | ||
import pyatspi | ||
from orca.braille import Component | ||
|
||
class AnimationBrailleAction(Braille): | ||
def __init__(self): | ||
Braille.__init__(self, pyatspi.ROLE_ANIMATION) | ||
|
||
def unfocused(self, c): | ||
return [ | ||
Component(c.obj, | ||
c.asString( | ||
c.label + | ||
c.displayedText + | ||
c.roleName + | ||
( | ||
c.description | ||
and | ||
c.space(": ") + | ||
c.description | ||
) | ||
) | ||
) | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from orca.formatting.braille.animation import AnimationBrailleAction | ||
|
||
class Context (): | ||
|
||
def asString(self, content, delimiter=" "): | ||
#orca/braille_generator.py | ||
pass | ||
|
||
@property | ||
def obj (self): | ||
pass | ||
|
||
@property | ||
def label (self): | ||
return [] | ||
|
||
@property | ||
def displayedText (self): | ||
return [] | ||
|
||
@property | ||
def roleName (self): | ||
return [] | ||
|
||
@property | ||
def description (self): | ||
return [] | ||
|
||
def space (self, value): | ||
return [] | ||
|
||
c = Context() | ||
x = AnimationBrailleAction() | ||
|
||
p = x.unfocused(c) | ||
print(p) |