1 11 package org.eclipse.swt.browser; 12 13 import org.eclipse.swt.internal.mozilla.*; 14 15 class FilePicker_1_8 extends FilePicker { 16 17 void createCOMInterfaces () { 18 19 supports = new XPCOMObject (new int[] {2, 0, 0}) { 20 public int method0 (int [] args) {return QueryInterface (args[0], args[1]);} 21 public int method1 (int [] args) {return AddRef ();} 22 public int method2 (int [] args) {return Release ();} 23 }; 24 25 filePicker = new XPCOMObject (new int[] {2, 0, 0, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) { 26 public int method0 (int [] args) {return QueryInterface (args[0], args[1]);} 27 public int method1 (int [] args) {return AddRef ();} 28 public int method2 (int [] args) {return Release ();} 29 public int method3 (int [] args) {return Init (args[0], args[1], args[2]);} 30 public int method4 (int [] args) {return AppendFilters (args[0]);} 31 public int method5 (int [] args) {return AppendFilter (args[0], args[1]);} 32 public int method6 (int [] args) {return GetDefaultString (args[0]);} 33 public int method7 (int [] args) {return SetDefaultString (args[0]);} 34 public int method8 (int [] args) {return GetDefaultExtension (args[0]);} 35 public int method9 (int [] args) {return SetDefaultExtension (args[0]);} 36 public int method10 (int [] args) {return GetFilterIndex (args[0]);} 37 public int method11 (int [] args) {return SetFilterIndex (args[0]);} 38 public int method12 (int [] args) {return GetDisplayDirectory (args[0]);} 39 public int method13 (int [] args) {return SetDisplayDirectory (args[0]);} 40 public int method14 (int [] args) {return GetFile (args[0]);} 41 public int method15 (int [] args) {return GetFileURL (args[0]);} 42 public int method16 (int [] args) {return GetFiles (args[0]);} 43 public int method17 (int [] args) {return Show (args[0]);} 44 }; 45 } 46 47 52 String parseAString (int string) { 53 if (string == 0) return null; 54 int length = XPCOM.nsEmbedString_Length (string); 55 int buffer = XPCOM.nsEmbedString_get (string); 56 char[] chars = new char[length]; 57 XPCOM.memmove (chars, buffer, length * 2); 58 return new String (chars); 59 } 60 } 61 | Popular Tags |