Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multitouch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
multitouch
Commits
36348281
Commit
36348281
authored
12 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Changed class variable name format.
parent
dc48af59
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/tracker.py
+5
-5
5 additions, 5 deletions
src/tracker.py
src/tuio_server.py
+2
-2
2 additions, 2 deletions
src/tuio_server.py
with
7 additions
and
7 deletions
src/tracker.py
+
5
−
5
View file @
36348281
...
...
@@ -7,10 +7,10 @@ class GestureTracker(Logger):
changing the state of touch points.
"""
# Supported gesture types
__
gesture_types
__
=
[]
gesture_types
=
[]
# Configurable properties (see configure() method)
__
configurable
__
=
[]
configurable
=
[]
def
__init__
(
self
,
window
=
None
):
# Hashmap of gesture types
...
...
@@ -25,7 +25,7 @@ class GestureTracker(Logger):
single gesture type. Optionally, (keyword) arguments that will be
passed to the handler along with a Gesture object can be specified.
"""
if
gesture_type
not
in
self
.
__
gesture_types
__
:
if
gesture_type
not
in
self
.
gesture_types
:
raise
ValueError
(
'
Unsupported gesture type
"
%s
"
.
'
%
gesture_type
)
h
=
handler
,
args
,
kwargs
...
...
@@ -60,7 +60,7 @@ class GestureTracker(Logger):
def
configure
(
self
,
**
kwargs
):
for
name
,
value
in
kwargs
.
iteritems
():
if
name
not
in
self
.
__
configurable
__
:
if
name
not
in
self
.
configurable
:
raise
ValueError
(
'
%s.%s is not a configurable property.
'
%
(
self
.
__class__
.
__name__
,
name
))
...
...
@@ -73,7 +73,7 @@ class GestureTracker(Logger):
instead of:
tracker.bind(
'
gesture
'
, ...)
"""
if
name
not
in
self
.
__
gesture_types
__
:
if
name
not
in
self
.
gesture_types
:
raise
AttributeError
(
"'
%s
'
has no attribute
'
%s
'"
%
(
self
.
__class__
.
__name__
,
name
))
...
...
This diff is collapsed.
Click to expand it.
src/tuio_server.py
+
2
−
2
View file @
36348281
...
...
@@ -6,13 +6,13 @@ from screen import pixel_coords
class
TuioServer2D
(
InputServer
):
__
tuio_address
__
=
'
localhost
'
,
3333
tuio_address
=
'
localhost
'
,
3333
def
__init__
(
self
,
handler_obj
):
super
(
TuioServer2D
,
self
).
__init__
(
handler_obj
)
# OSC server that listens to incoming TUIO events
self
.
server
=
OSCServer
(
self
.
__
tuio_address
__
)
self
.
server
=
OSCServer
(
self
.
tuio_address
)
self
.
server
.
addDefaultHandlers
()
self
.
server
.
addMsgHandler
(
'
/tuio/2Dobj
'
,
self
.
_receive
)
self
.
server
.
addMsgHandler
(
'
/tuio/2Dcur
'
,
self
.
_receive
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment