package com.tigervnc.rfb;
-import java.io.IOException;
-
import com.tigervnc.rdr.*;
import com.tigervnc.vncviewer.*;
public CSecurityIdent() { }
public boolean processMsg(CConnection cc) {
- InStream is = cc.getInStream();
OutStream os = cc.getOutStream();
StringBuffer username = new StringBuffer();
package com.tigervnc.rfb;
import javax.net.ssl.*;
-import java.security.*;
import java.security.cert.*;
import java.security.KeyStore;
import java.io.File;
public boolean processMsg(CConnection cc) {
is = cc.getInStream();
- os = cc.getOutStream();
initGlobal();
package com.tigervnc.rfb;
-import java.awt.*;
-
public class Cursor extends ManagedPixelBuffer {
public void setSize(int w, int h) {
int h = r.height();
int[] imageBuf = reader.getImageBuf(w * h);
int nPixels = imageBuf.length / (reader.bpp() / 8);
- int bytesPerRow = w * (reader.bpp() / 8);
while (h > 0) {
int nRows = nPixels / w;
if (nRows > h) nRows = h;
flags = flags_;
}
- public final static boolean operator(Screen r) {
+ public final boolean operator(Screen r) {
if (id != r.id)
return false;
if (!dimensions.equals(r.dimensions))
return true;
}
- public static int id;
- public static Rect dimensions;
- public static int flags;
+ public int id;
+ public Rect dimensions;
+ public int flags;
}
screens = new ArrayList<Screen>();
}
- public static final int num_screens() { return screens.size(); }
+ public final int num_screens() { return screens.size(); }
- public static final void add_screen(Screen screen) { screens.add(screen); }
- public static final void remove_screen(int id) {
+ public final void add_screen(Screen screen) { screens.add(screen); }
+ public final void remove_screen(int id) {
for (Iterator iter = screens.iterator(); iter.hasNext(); ) {
Screen refScreen = (Screen)iter.next();
if (refScreen.id == id)
}
}
- public static final boolean validate(int fb_width, int fb_height) {
+ public final boolean validate(int fb_width, int fb_height) {
List<Integer> seen_ids = new ArrayList<Integer>();
Rect fb_rect = new Rect();
//inline bool operator(const ScreenSet& r) const { return screens == r.screens; }
//inline bool operator(const ScreenSet& r) const { return screens != r.screens; }
- public static List<Screen> screens;
+ public ArrayList<Screen> screens;
static LogWriter vlog = new LogWriter("ScreenSet");
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.*;
-import java.awt.Component;
import java.awt.Dimension;
import java.awt.Event;
-import java.awt.Frame;
-import java.awt.ScrollPane;
-import java.io.*;
-import javax.net.ssl.*;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.File;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import javax.swing.*;
-import javax.swing.filechooser.*;
import javax.swing.ImageIcon;
import java.net.URL;
-import java.net.ServerSocket;
-import javax.swing.border.*;
import java.util.*;
import com.tigervnc.rdr.*;
public boolean showMsgBox(int flags, String title, String text)
{
StringBuffer titleText = new StringBuffer("VNC Viewer: "+title);
-
return true;
}
synchronized public void writePointerEvent(MouseEvent ev) {
if (state() != RFBSTATE_NORMAL) return;
- int x, y;
switch (ev.getID()) {
case MouseEvent.MOUSE_PRESSED:
import com.tigervnc.rfb.*;
import com.tigervnc.rfb.Cursor;
-import com.tigervnc.rfb.Exception;
import com.tigervnc.rfb.Point;
class DesktopWindow extends JPanel implements
package com.tigervnc.vncviewer;
-import java.io.*;
-import java.net.*;
import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
import javax.swing.*;
-import javax.swing.filechooser.*;
//class Dialog extends JFrame implements WindowListener {
class Dialog extends JFrame {
import java.awt.event.*;
import javax.swing.JFrame;
import javax.swing.JPopupMenu;
-import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JCheckBoxMenuItem;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
-import javax.swing.filechooser.*;
-import javax.swing.ImageIcon;
-import java.net.URL;
-import java.io.IOException;
import com.tigervnc.rfb.*;
-import com.tigervnc.rfb.Exception;
class OptionsDialog extends Dialog implements
ActionListener,
package com.tigervnc.vncviewer;
-import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
-import java.net.URL;
class PasswdDialog extends Dialog implements KeyListener{
import java.awt.*;
import java.awt.image.*;
import java.nio.ByteOrder;
-import javax.swing.JScrollPane;
import com.tigervnc.rfb.*;
int rowsToCopy = h < height() ? h : height();
int copyWidth = w < width() ? w : width();
- int oldWidth = width();
int[] oldData = data;
width_ = w;
package com.tigervnc.vncviewer;
import java.awt.*;
-import java.awt.image.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
-import java.net.URL;
-import java.io.File;
import java.util.*;
import com.tigervnc.rfb.*;
-import com.tigervnc.rfb.Exception;
class ServerDialog extends Dialog implements
ActionListener,
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
-import java.awt.image.*;
-import java.awt.Label;
import java.io.InputStream;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import javax.swing.*;
-import java.net.URL;
import com.tigervnc.rdr.*;
import com.tigervnc.rfb.*;
-import com.tigervnc.rfb.Exception;
public class VncViewer extends java.applet.Applet implements Runnable
{