<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># -*- coding: utf-8 -*-
#######################################################################################
#   Plinn - http://plinn.org                                                          #
#   Copyright Â© 2009  BenoÃ®t PIN &lt;benoit.pin@ensmp.fr&gt;                                #
#                                                                                     #
#   This program is free software; you can redistribute it and/or                     #
#   modify it under the terms of the GNU General Public License                       #
#   as published by the Free Software Foundation; either version 2                    #
#   of the License, or (at your option) any later version.                            #
#                                                                                     #
#   This program is distributed in the hope that it will be useful,                   #
#   but WITHOUT ANY WARRANTY; without even the implied warranty of                    #
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                     #
#   GNU General Public License for more details.                                      #
#                                                                                     #
#   You should have received a copy of the GNU General Public License                 #
#   along with this program; if not, write to the Free Software                       #
#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.   #
#######################################################################################
"""
Plinn event definitions.



"""

from zope.interface import implements
from zope.component.interfaces import ObjectEvent
from interfaces import IObjectPositionModified,\
					   IZopeShutdownEvent


class ObjectPositionModified(ObjectEvent) :
	implements(IObjectPositionModified)
	
	def __init__(self, object, parent, position) :
		super(ObjectPositionModified, self).__init__(object)
		self.parent = parent
		self.position = position

class ZopeShutdownEvent(ObjectEvent) :
	"Zope is shutting down gracefully"
	implements(IZopeShutdownEvent)

	def __init__(self, object, phase, time) :
		self.object = object
		self.phase = phase
		self.time = time
		self.__veto = False
	
	def setVeto(self) :
		self.__veto = True
	
	@property
	def veto(self) :
		return self.__veto</pre></body></html>