Ajout du GUI

This commit is contained in:
thatscringebro
2022-08-08 16:31:52 -04:00
parent db362ccdca
commit abd15f28b6
851 changed files with 99957 additions and 1 deletions

35
kivy/input/factory.py Normal file
View File

@@ -0,0 +1,35 @@
'''
Motion Event Factory
====================
Factory of :class:`~kivy.input.motionevent.MotionEvent` providers.
'''
__all__ = ('MotionEventFactory', )
class MotionEventFactory:
'''MotionEvent factory is a class that registers all availables input
factories. If you create a new input factory, you need to register
it here::
MotionEventFactory.register('myproviderid', MyInputProvider)
'''
__providers__ = {}
@staticmethod
def register(name, classname):
'''Register a input provider in the database'''
MotionEventFactory.__providers__[name] = classname
@staticmethod
def list():
'''Get a list of all available providers'''
return MotionEventFactory.__providers__
@staticmethod
def get(name):
'''Get a provider class from the provider id'''
if name in MotionEventFactory.__providers__:
return MotionEventFactory.__providers__[name]