javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/org/eclipse/swt/graphics/Internal_GfxPackageSupport.java
branchRCL_3
changeset 65 ae942d28ec0e
equal deleted inserted replaced
60:6c158198356e 65:ae942d28ec0e
       
     1 /*******************************************************************************
       
     2  * Copyright (c) 2009, 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved. This program and the accompanying materials 
       
     4  * are made available under the terms of the Eclipse Public License v1.0
       
     5  * which accompanies this distribution, and is available at
       
     6  * http://www.eclipse.org/legal/epl-v10.html
       
     7  * 
       
     8  * Contributors:
       
     9  *     Nokia Corporation - initial implementation 
       
    10  *******************************************************************************/
       
    11 
       
    12 package org.eclipse.swt.graphics;
       
    13 
       
    14 import java.io.InputStream;
       
    15 
       
    16 /**
       
    17  * <p>
       
    18  * <b>IMPORTANT:</b> This class is <em>not</em> part of the SWT public API. It
       
    19  * must never be accessed from application code.
       
    20  * </p>
       
    21  */
       
    22 public final class Internal_GfxPackageSupport {
       
    23 /*
       
    24  * From the class Image
       
    25  */
       
    26 public static int getNullIconHandle() {
       
    27     return Image.getNullIconHandle();
       
    28 }
       
    29 
       
    30 public static Image new_Image(Device device, 
       
    31         org.eclipse.swt.internal.qt.graphics.Image cgImage) {
       
    32     return Image.qt_new(device, cgImage);
       
    33 }
       
    34 
       
    35 public static int getIconHandle(Image i) {
       
    36     return i.getIconHandle();
       
    37 }
       
    38 
       
    39 public static org.eclipse.swt.internal.qt.graphics.Image getImage(Image i) {
       
    40     return i.getImage();
       
    41 }
       
    42 
       
    43 public static int getImageHandle(Image i) {
       
    44     return i.getImageHandle();
       
    45 }
       
    46 
       
    47 public static int getPixmapHandle(Image i) {
       
    48     return i.getPixmapHandle();
       
    49 }
       
    50 
       
    51 public static Image createImageWithoutSecurityCheck(Device device,
       
    52         String filename) {
       
    53     return Image.createImageWithoutSecurityCheck(device, filename);
       
    54 }
       
    55 
       
    56 public static Point getImageSize(Device device, String filename) {
       
    57     return Image.getImageSize(device, filename);
       
    58 }
       
    59 
       
    60 public static Point getImageSize(InputStream stream) {
       
    61     return Image.getImageSize(stream);
       
    62 }
       
    63 
       
    64 /*
       
    65  * From the class Device
       
    66  */
       
    67 public static boolean internal(Device d) {
       
    68 	return d.internal;
       
    69 }
       
    70 
       
    71 public static boolean initialized() {
       
    72 	return Device.initialized;
       
    73 }
       
    74 
       
    75 public static Color newColor(Device device, int handle) {
       
    76     return Color.qt_new(device, handle);
       
    77 }
       
    78 
       
    79 public static Font newFont(Device device, int handle) {
       
    80     return Font.qt_new(device, handle);
       
    81 }
       
    82 
       
    83 }