1# Copyright (C) 2010 Jim Washington 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15frompyjamasimportDOM 16frompyjamas.uiimportEvent 17 18DROP_EVENTS=["dragenter","dragover","dragleave","drop"] 19

60""" 61 Decide whether to accept the drop. 62 63 You may inspect the event's dataTransfer member. 64 65 You may get the types using pyjamas.dnd.getTypes(event). 66 67 This event is used to determine whether the drop target may 68 accept the drop. If the drop is to be accepted, then this event has 69 to be canceled using DOM.eventPreventDefault(event). 70 """ 71pass

74""" 75 This event determines what feedback is to be shown to the user. If 76 the event is canceled, then the feedback (typically the cursor) is 77 updated based on the dropEffect attribute's value, as set by the event 78 handler; otherwise, the default behavior (typically to do nothing) 79 is used instead. 80 81 Setting event.dataTransfer.dropEffect may affect dropping behavior. 82 83 Cancel this event with DOM.eventPreventDefault(event) if you want the 84 drop to succeed. 85 86 """ 87pass