# Path: pylash/core.py
# class Object(object):
# class CanvasWidget(QtWidgets.QWidget):
# class Stage(Object):
# class KeyCode(object):
# class UnityOfDictAndClass(object):
# 	def __init__(self):
# 	def _nonCopyableAttrs(self):
# 	def copyFrom(self, source):
# 	def __init__(self):
# 	def paintEvent(self, event):
# 	def mousePressEvent(self, event):
# 	def mouseMoveEvent(self, event):
# 	def mouseReleaseEvent(self, event):
# 	def mouseDoubleClickEvent(self, event):
# 	def keyPressEvent(self, event):
# 	def keyReleaseEvent(self, event):
# 	def __enterKeyboardEvent(self, event, eventType):
# 	def __enterMouseEvent(self, event, eventType):
# 	def __init__(self):
# 	def copyFrom(self, source):
# 	def _setCanvas(self, speed, title, width, height):
# 	def _onShow(self):
# 	def _showDisplayList(self, childList):
# 	def _enterMouseEvent(self, event, cd):
# 	def setFrameRate(self, speed):
# 	def addChild(self, child):
# 	def removeChild(self, child):
# 	def addEventListener(self, e, listener):
# 	def removeEventListener(self, e, listener = None):
# 	def __init__(self):
# 	def __init__(self):
# 	def set(obj, key, value):
# 	def get(obj, key):
# 	def has(obj, key):
# def init(speed, title, width, height, callback):
# def addChild(child):
# def removeChild(child):
# def getColor(color):
# def removeItemsInList(theList, condition):
# 	PARENT = "stage_parent_root"
# 
# Path: pylash/events.py
# class Event(Object):
# 	def __init__(self, e):
# 		super(Event, self).__init__()
# 
# 		if isinstance(e, Event):
# 			self.copyFrom(e)
# 		elif isinstance(e, str):
# 			self.eventType = e
# 			self.currentTarget = None
# 			self.target = None
# 		else:
# 			raise TypeError("Event.__init__(e): parameter 'e' is either a str or an Event object.")
# 
# class EventDispatcher(Object):
# 	def __init__(self):
# 		super(EventDispatcher, self).__init__()
# 		
# 		self._eventList = []
# 
# 	def __isEventTypeEqual(self, e1, e2):
# 		e1 = Event(e1)
# 		e2 = Event(e2)
# 		return e1.eventType == e2.eventType
# 
# 	def _addEventListenerInList(self, e, listener, eventList):
# 		eventList.append({
# 			"eventType" : e,
# 			"listener" : listener
# 		})
# 
# 	def _removeEventListenerInList(self, e, listener, eventList):
# 		def condition(o):
# 			t = o["eventType"]
# 			l = o["listener"]
# 
# 			return (l == listener and self.__isEventTypeEqual(e, t))
# 
# 		removeItemsInList(eventList, condition)
# 
# 	def _dispatchEventInList(self, e, eventList):
# 		for o in eventList:
# 			t = o["eventType"]
# 			l = o["listener"]
# 
# 			if self.__isEventTypeEqual(e, t):
# 				e = Event(e)
# 
# 				if e.currentTarget is None:
# 					e.currentTarget = self
# 				if e.target is None:
# 					e.target = self
# 
# 				l(e)
# 
# 	def _hasEventListenerInList(self, e, listener, eventList):
# 		for o in eventList:
# 			t = o["eventType"]
# 			l = o["listener"]
# 
# 			if l == listener:
# 				if self.__isEventTypeEqual(e, t):
# 					return True
# 				else:
# 					return False
# 
# 			return False
# 
# 	def addEventListener(self, e, listener):
# 		self._addEventListenerInList(e, listener, self._eventList)
# 
# 	def removeEventListener(self, e, listener):
# 		self._removeEventListenerInList(e, listener, self._eventList)
# 
# 	def removeAllEventListeners(self):
# 		self._eventList = []
# 
# 	def dispatchEvent(self, e):
# 		self._dispatchEventInList(e, self._eventList)
# 
# 	def hasEventListener(self, e, listener):
# 		return self._hasEventListenerInList(e, listener, self._eventList)


import threading, time, socket
from PySide2 import QtCore, QtGui, QtMultimedia
from .core import Object, stage
from .events import Event, EventDispatcher


__author__ = "Yuehao Wang"


def getExtension(p):
	pList = p.split(".")
	
	return pList[len(pList) - 1]


class LoaderEvent(object):

# Path: pylash/core.py
# class Object(object):
# class CanvasWidget(QtWidgets.QWidget):
# class Stage(Object):
# class KeyCode(object):
# class UnityOfDictAndClass(object):
# 	def __init__(self):
# 	def _nonCopyableAttrs(self):
# 	def copyFrom(self, source):
# 	def __init__(self):
# 	def paintEvent(self, event):
# 	def mousePressEvent(self, event):
# 	def mouseMoveEvent(self, event):
# 	def mouseReleaseEvent(self, event):
# 	def mouseDoubleClickEvent(self, event):
# 	def keyPressEvent(self, event):
# 	def keyReleaseEvent(self, event):
# 	def __enterKeyboardEvent(self, event, eventType):
# 	def __enterMouseEvent(self, event, eventType):
# 	def __init__(self):
# 	def copyFrom(self, source):
# 	def _setCanvas(self, speed, title, width, height):
# 	def _onShow(self):
# 	def _showDisplayList(self, childList):
# 	def _enterMouseEvent(self, event, cd):
# 	def setFrameRate(self, speed):
# 	def addChild(self, child):
# 	def removeChild(self, child):
# 	def addEventListener(self, e, listener):
# 	def removeEventListener(self, e, listener = None):
# 	def __init__(self):
# 	def __init__(self):
# 	def set(obj, key, value):
# 	def get(obj, key):
# 	def has(obj, key):
# def init(speed, title, width, height, callback):
# def addChild(child):
# def removeChild(child):
# def getColor(color):
# def removeItemsInList(theList, condition):
# 	PARENT = "stage_parent_root"
# 
# Path: pylash/events.py
# class Event(Object):
# 	def __init__(self, e):
# 		super(Event, self).__init__()
# 
# 		if isinstance(e, Event):
# 			self.copyFrom(e)
# 		elif isinstance(e, str):
# 			self.eventType = e
# 			self.currentTarget = None
# 			self.target = None
# 		else:
# 			raise TypeError("Event.__init__(e): parameter 'e' is either a str or an Event object.")
# 
# class EventDispatcher(Object):
# 	def __init__(self):
# 		super(EventDispatcher, self).__init__()
# 		
# 		self._eventList = []
# 
# 	def __isEventTypeEqual(self, e1, e2):
# 		e1 = Event(e1)
# 		e2 = Event(e2)
# 		return e1.eventType == e2.eventType
# 
# 	def _addEventListenerInList(self, e, listener, eventList):
# 		eventList.append({
# 			"eventType" : e,
# 			"listener" : listener
# 		})
# 
# 	def _removeEventListenerInList(self, e, listener, eventList):
# 		def condition(o):
# 			t = o["eventType"]
# 			l = o["listener"]
# 
# 			return (l == listener and self.__isEventTypeEqual(e, t))
# 
# 		removeItemsInList(eventList, condition)
# 
# 	def _dispatchEventInList(self, e, eventList):
# 		for o in eventList:
# 			t = o["eventType"]
# 			l = o["listener"]
# 
# 			if self.__isEventTypeEqual(e, t):
# 				e = Event(e)
# 
# 				if e.currentTarget is None:
# 					e.currentTarget = self
# 				if e.target is None:
# 					e.target = self
# 
# 				l(e)
# 
# 	def _hasEventListenerInList(self, e, listener, eventList):
# 		for o in eventList:
# 			t = o["eventType"]
# 			l = o["listener"]
# 
# 			if l == listener:
# 				if self.__isEventTypeEqual(e, t):
# 					return True
# 				else:
# 					return False
# 
# 			return False
# 
# 	def addEventListener(self, e, listener):
# 		self._addEventListenerInList(e, listener, self._eventList)
# 
# 	def removeEventListener(self, e, listener):
# 		self._removeEventListenerInList(e, listener, self._eventList)
# 
# 	def removeAllEventListeners(self):
# 		self._eventList = []
# 
# 	def dispatchEvent(self, e):
# 		self._dispatchEventInList(e, self._eventList)
# 
# 	def hasEventListener(self, e, listener):
# 		return self._hasEventListenerInList(e, listener, self._eventList)


# Path: pylash/loaders.py
import threading, time, socket
from PySide2 import QtCore, QtGui, QtMultimedia
from .core import Object, stage
from .events import Event, EventDispatcher



__author__ = "Yuehao Wang"


def getExtension(p):
	pList = p.split(".")
	
	return pList[len(pList) - 1]


class LoaderEvent(object):

	COMPLETE = Event("loader_complete")