1 /*
   2  * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.lwawt;
  27 
  28 import java.awt.Rectangle;
  29 
  30 public interface PlatformEventNotifier {
  31     void notifyIconify(boolean iconify);
  32 
  33     void notifyZoom(boolean isZoomed);
  34 
  35     void notifyExpose(Rectangle r);
  36 
  37     void notifyReshape(int x, int y, int w, int h);
  38 
  39     void notifyUpdateCursor();
  40 
  41     void notifyActivation(boolean activation, LWWindowPeer opposite);
  42 
  43     // MouseDown in non-client area
  44     void notifyNCMouseDown();
  45 
  46     /*
  47      * Called by the delegate to dispatch the event to Java. Event
  48      * coordinates are relative to non-client window are, i.e. the top-left
  49      * point of the client area is (insets.top, insets.left).
  50      */
  51     void notifyMouseEvent(int id, long when, int button,
  52                           int x, int y, int screenX, int screenY,
  53                           int modifiers, int clickCount, boolean popupTrigger,
  54                           byte[] bdata);
  55 
  56     void notifyMouseWheelEvent(long when, int x, int y, int modifiers,
  57                                int scrollType, int scrollAmount,
  58                                int wheelRotation, double preciseWheelRotation,
  59                                byte[] bdata);
  60     /*
  61      * Called by the delegate when a key is pressed.
  62      */
  63     void notifyKeyEvent(int id, long when, int modifiers,
  64                         int keyCode, char keyChar, int keyLocation);
  65 }