/*
 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 */

#import <Cocoa/Cocoa.h>
#import <jni.h>

#import "GlassHostView.h"
#import "GlassFullscreenWindow.h"
#import "GlassViewDelegate.h"

// main GlassView protocol
// not optimal since we'll have to duplicate code for GlassView2D and GlassView3D
// but we'll use delegate to implement shared code to minimize this
@protocol GlassView <NSObject>

- (id)initWithFrame:(NSRect)frame withJview:(jobject)jview withJproperties:(jobject)jproperties;

- (void)enterFullscreenWithAnimate:(BOOL)animate withKeepRatio:(BOOL)keepRatio withHideCursor:(BOOL)hideCursor;
- (void)exitFullscreenWithAnimate:(BOOL)animate;

// the graphics specifics APIs
- (void)begin;
- (BOOL)ready;
- (void)end:(BOOL)flush;
- (void)pushPixels:(void*)pixels withWidth:(int)width withHeight:(int)height withEnv:(JNIEnv *)env;

- (GlassViewDelegate*)delegate;

@optional

- (uint32_t)getRemoteLayerIdForServer:(NSString*)serverName;

@end
