1 /*
   2  * Copyright (c) 2011, 2015, 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 com.sun.glass.ui.ios;
  27 
  28 import com.sun.glass.ui.Pixels;
  29 import com.sun.glass.ui.View;
  30 import java.util.Map;
  31 
  32 /**
  33  * iOS View platform implementation.
  34  */
  35 final class IosView extends View {
  36     public IosView() {
  37         super();
  38     }
  39 
  40     // Constants /reusing Mac OS X values
  41     private static final long multiClickTime =  300;
  42     private static final int multiClickMaxX = 2;
  43     private static final int multiClickMaxY = 2;
  44 
  45     static long _getMultiClickTime() {
  46         return multiClickTime;
  47     }
  48 
  49     static int _getMultiClickMaxX() {
  50         return multiClickMaxX;
  51     }
  52 
  53     static int _getMultiClickMaxY() {
  54         return multiClickMaxY;
  55     }
  56 
  57     // See View
  58     @Override protected void _enableInputMethodEvents(long ptr, boolean enable) { }
  59 
  60     @Override native protected int _getNativeFrameBuffer(long ptr);
  61     @Override native protected long _create(Map caps);
  62 
  63     @Override native protected long _getNativeView(long ptr);
  64 
  65     @Override native protected int _getX(long ptr);
  66     @Override protected native int _getY(long ptr);
  67 
  68     @Override native protected boolean _close(long ptr);
  69 
  70     @Override native protected void _scheduleRepaint(long ptr);
  71 
  72     @Override native protected void _begin(long ptr);
  73     @Override native protected void _end(long ptr);
  74 
  75     @Override native protected boolean _enterFullscreen(long ptr, boolean animate, boolean keepRatio, boolean hideCursor);
  76     @Override native protected void _exitFullscreen(long ptr, boolean animate);
  77 
  78     @Override native protected void _setParent(long ptr, long parentPtr);
  79     @Override protected void _uploadPixels(long ptr, Pixels pixels) {
  80         throw new RuntimeException("IosView._uploadPixels() UNIMPLEMENTED.");
  81     }
  82 }
  83