Skip to content

Commit

Permalink
Merge branch 'master' into features/python3
Browse files Browse the repository at this point in the history
  • Loading branch information
scotty007 committed Mar 2, 2021
2 parents daffd28 + a27e270 commit de9e7b2
Show file tree
Hide file tree
Showing 637 changed files with 765 additions and 695 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -24,7 +24,7 @@ project(libavg)
set(AVG_VERSION_MAJOR 2)
set(AVG_VERSION_MINOR 0)
set(AVG_VERSION_MICRO 0)
set(AVG_VERSION_EXTRA dev4) # optional
set(AVG_VERSION_EXTRA dev5) # optional
set(AVG_VERSION_RELEASE "${AVG_VERSION_MAJOR}.${AVG_VERSION_MINOR}.${AVG_VERSION_MICRO}")
if(DEFINED AVG_VERSION_EXTRA)
set(AVG_VERSION_RELEASE "${AVG_VERSION_RELEASE}.${AVG_VERSION_EXTRA}")
Expand Down
2 changes: 1 addition & 1 deletion CreateVersionFile.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/__init__.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/app/__init__.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
15 changes: 13 additions & 2 deletions python/libavg/app/app.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -86,6 +86,7 @@ def __init__(self):
self._windowSize = None
self._mtEmu = None
self._clickTest = None
self._clickTestConfig = {}

self._settings = None
self._setupSettings()
Expand Down Expand Up @@ -151,6 +152,16 @@ def settings(self):
def onBeforeLaunch(self):
pass

def configClickTest(self,
mouse=clicktest.ClickTest.DEFAULT_MOUSE,
maxTouches=clicktest.ClickTest.DEFAULT_MAX_TOUCHES,
probabilities=clicktest.ClickTest.DEFAULT_PROBABILITIES,
visualize=clicktest.ClickTest.DEFAULT_VISUALIZE):
self._clickTestConfig = {
'mouse': mouse, 'maxTouches': maxTouches,
'probabilities': probabilities, 'visualize': visualize
}

def takeScreenshot(self, targetFolder='.'):
screenBmp = player.screenshot()

Expand Down Expand Up @@ -413,7 +424,7 @@ def _toggleMtEmulation(self):

def _toggleClickTest(self):
if not self._clickTest:
self._clickTest = clicktest.ClickTest()
self._clickTest = clicktest.ClickTest(**self._clickTestConfig)
self._clickTest.start()
else:
self._stopClickTest()
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/app/debugpanel.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/app/flashmessage.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/app/keyboardmanager.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/app/settings.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/app/touchvisualization.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/apphelpers.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
11 changes: 8 additions & 3 deletions python/libavg/clicktest.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2020 Thomas Schott, <scotty at c-base dot org>
# Copyright (C) 2020-2021 Thomas Schott, <scotty at c-base dot org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand All @@ -29,8 +29,13 @@


class ClickTest:
def __init__(self, mouse=False, maxTouches=10, probabilities=(0.5, 0.1, 0.2),
visualize=True):
DEFAULT_MOUSE = False
DEFAULT_MAX_TOUCHES = 10
DEFAULT_PROBABILITIES = (0.5, 0.1, 0.2) # down, up, move
DEFAULT_VISUALIZE = True

def __init__(self, mouse=DEFAULT_MOUSE, maxTouches=DEFAULT_MAX_TOUCHES,
probabilities=DEFAULT_PROBABILITIES, visualize=DEFAULT_VISUALIZE):
self._mouse = bool(mouse)
self._maxTouches = max(0, maxTouches)
self._probabilities = tuple(min(1.0, max(0.0, p)) for p in probabilities)
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/filter.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/geom.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/gesture.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/graph.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/methodref.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/mtemu.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/parsecamargs.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/persist.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/sprites.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/statemachine.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/testapp.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/testcase.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/textarea.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/utils.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/widget/__init__.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/widget/base.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
6 changes: 3 additions & 3 deletions python/libavg/widget/button.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -378,15 +378,15 @@ def __init__(self, text="", skinObj=skin.Skin.default, **kwargs):
checkedDownNode = self.__createImageNode(self.cfg["checkedDownBmp"])
checkedDisabledNode = self.__createImageNode(self.cfg["checkedDisabledBmp"])

self.textNode = avg.WordsNode(pos=(20,0), text=text, fontstyle=self.cfg["font"])
super().__init__(uncheckedUpNode=uncheckedUpNode,
uncheckedDownNode=uncheckedDownNode,
uncheckedDisabledNode=uncheckedDisabledNode,
checkedUpNode=checkedUpNode,
checkedDownNode=checkedDownNode,
checkedDisabledNode=checkedDisabledNode,
**kwargs)
self.textNode = avg.WordsNode(pos=(20,0), text=text, fontstyle=self.cfg["font"],
parent=self)
self.appendChild(self.textNode)

def _enterUncheckedUp(self):
self.textNode.fontstyle = self.cfg["font"]
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/widget/keyboard.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/widget/mediacontrol.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/widget/scrollarea.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/widget/skin.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/libavg/widget/slider.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/scripts/avg_audioplayer
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion python/scripts/avg_checkcirclespeed
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# libavg - Media Playback Engine.
# Copyright (C) 2003-2020 Ulrich von Zadow
# Copyright (C) 2003-2021 Ulrich von Zadow
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down

0 comments on commit de9e7b2

Please sign in to comment.