Feeling

              三人行,必有我?guī)熝?/p>

             ::  :: 新隨筆 :: 聯(lián)系 ::  :: 管理 ::
            185 隨筆 :: 0 文章 :: 392 評(píng)論 :: 0 Trackbacks

          擴(kuò)展SWT功能,實(shí)現(xiàn)了Windows下注冊(cè)表,磁盤,CPU,內(nèi)存,目錄訪問(wèn),網(wǎng)絡(luò),關(guān)機(jī),系統(tǒng)特性等常用API功能。現(xiàn)在可以通過(guò)CVS進(jìn)行訪問(wèn)該項(xiàng)目,直接下載:http://www.aygfsteel.com/Files/cnfree/swt-extension.zip

          SWT Extension under Windows OS can be checked out through CVS now!?

          User can access it from:
          ?
          cvs -z3 -d:pserver anonymous@feeling.cvs.sourceforge.net:/cvsroot/feeling co -P org.eclipse.swt.extension ?
          ?
          Add native method:?

          public ? static ? final ? native ? boolean ?ShowCursor( boolean ?bShow);
          public ? static ? final ? native ? void
          ?GetDiskFreeSpace(String?drive,?DISKFREESPACE?diskFreeSpace);
          public ? static ? final ? native ? void
          ?GetSystemInfo(SYSTEM_INFO?systemInfo);
          public ? static ? final ? native ? void
          ?GlobalMemoryStatus(MEMORYSTATUS?memoryStatus);
          public ? static ? final ? native ? int
          ?GetDriveType(String?drive);
          public ? static ? final ? native
          ?String[]?GetLogicalDrives();
          public ? static ? final ? native
          ?String?GetVolumeLabel(String?drive);
          public ? static ? final ? native ? boolean
          ?SetVolumeLabel(String?drive,?String?label);
          public ? static ? final ? native
          ?String?GetCurrentDirectory();
          public ? static ? final ? native ? boolean
          ?SetCurrentDirectory(String?directory);
          public ? static ? final ? native ? boolean
          ?RegistryKeyIteratorHasNext(KeyIterator?iterator);
          public ? static ? final ? native ? void
          ?DeleteRegistryKey(RegistryKey?key);
          public ? static ? final ? native ? boolean
          ?RegistryKeyHasSubKeys(RegistryKey?key);
          public ? static ? final ? native ? boolean
          ?RegistryKeyHasValue(RegistryKey?key,?String?name);
          public ? static ? final ? native
          ?String?RegistryKeyValueIteratorGetNext(ValueIterator?iterator);
          public ? static ? final ? native ? boolean
          ?RegistryKeyHasValues(RegistryKey?key);
          public ? static ? final ? native
          ?RegistryValue?RegistryKeyGetValue(RegistryKey?key,?String?name);
          public ? static ? final ? native ? void
          ?RegistryKeySetValue(RegistryKey?key,?RegistryValue?value);
          public ? static ? final ? native ? void
          ?RegistryKeyDeleteValue(RegistryKey?key,?String?name);
          public ? static ? final ? native
          ?String?RegistryKeyIteratorGetNext(KeyIterator?iterator);
          public ? static ? final ? native ? boolean
          ?ExistsRegistryKey(RegistryKey?key);
          public ? static ? final ? native ? void
          ?CreateRegistryKey(RegistryKey?key);
          public ? static ? final ? native ? boolean
          ?RegistryKeyValueIteratorHasNext(ValueIterator?iterator);
          public ? static ? final ? native ? int
          ?CreateShortCut(String?sourceFile,?String?linkFile,String?linkDescriptor);
          public ? static ? final ? native ? int
          ?SHFileOperationA(SHFILEOPSTRUCT?shFileOpStruct);
          public ? static ? final ? native ? int
          ?SHFileOperationW(SHFILEOPSTRUCT?shFileOpStruct);
          public ? static ? final ? native ? boolean ?FlashWindow( int ?hwnd,? boolean
          ?bInvert);
          public ? static ? final ? native ? boolean ?SetLayeredWindowAttributes( int ?hwnd,? int ?color,? byte ?alpha,? int
          ?type);
          public ? static ? final ? native
          ?String?GetSystemDirectory();
          public ? static ? final ? native
          ?String?GetWindowsDirectory();
          public ? static ? final ? native
          ?String?GetTempPath();
          public ? static ? final ? native
          ?String?GetLongPathName(String?shortPathName);
          public ? static ? final ? native ? boolean ?SetWallPaper( char []?picturePath, int
          ?style);
          public ? static ? final ? native ? int ?Ping(?String?host?,? int
          ?dateSize?);
          public ? static ? final ? native ? int
          []?GetMACID(?);
          public ? static ? final ? native ? int []?GetMACAddress(? int
          ?MACID);
          public ? static ? final ? native ? boolean ?Reboot( boolean
          ?force);
          public ? static ? final ? native ? boolean ?Shutdown( boolean
          ?force);
          public ? static ? final ? native ? boolean ?Logoff( boolean
          ?force);
          public ? static ? final ? native ? boolean
          ?LockWorkStation();
          public ? static ? final ? native ? boolean ?SuspendWorkstation( boolean ?suspend, boolean
          ?force);
          public ? static ? final ? native ? boolean ?InitiateShutdownA( byte []?info, int ?time,? boolean ?force?, boolean
          ?reboot);
          public ? static ? final ? native ? boolean ?InitiateShutdownW( char []?info, int ?time,? boolean ?force?, boolean
          ?reboot);

          snapshot:
          swt-extension.jpg

          評(píng)論

          # re: SWT Extension under Windows OS 項(xiàng)目可以通過(guò)CVS訪問(wèn)了! 2007-01-29 11:17 alon xiong
          你好,我用了你的Extension.FlashWindow函數(shù),在你的Example例子里面調(diào)用成功, 當(dāng)最小化時(shí)任務(wù)欄會(huì)閃爍:
          shell.addShellListener(new ShellAdapter() {
          public void shellDeactivated(ShellEvent e){
          Extension.FlashWindow(shell.handle, true);
          }
          });

          然后我將你的class打包成jar,將lib里面的兩個(gè)dll放到j(luò)ar的根目錄下,然后在我的RCP程序中這樣調(diào)用:
          Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
          Extension.FlashWindow(shell.handle, true);

          任務(wù)欄不會(huì)閃爍,但是我用以下語(yǔ)句取代Extension.FlashWindow(shell.handle, true);這句時(shí),
          shell.open();
          shell.setMinimized(false);
          shell.forceActive();
          shell.forceFocus();
          可以打開窗口,證明shell是正確的
          請(qǐng)問(wèn)這是為什么?是不是我那里設(shè)置不對(duì),謝謝!
            回復(fù)  更多評(píng)論
            

          # re: SWT Extension under Windows OS 項(xiàng)目可以通過(guò)CVS訪問(wèn)了! 2007-04-06 04:18 催月淚
          SWT Extension 這個(gè)項(xiàng)目是不是已經(jīng)停止開發(fā),我在sourceforge沒(méi)有找到,但找到了一個(gè)eclipse ui extension  回復(fù)  更多評(píng)論
            

          # re: SWT Extension under Windows OS 項(xiàng)目可以通過(guò)CVS訪問(wèn)了! 2007-04-06 10:57 三人行,必有我?guī)熝?/a>
          SWT Extension 是 eclipse ui extension 的子項(xiàng)目。不過(guò)由于工作的原因,最近確實(shí)沒(méi)有時(shí)間開發(fā)了。  回復(fù)  更多評(píng)論
            


          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          GitHub |  開源中國(guó)社區(qū) |  maven倉(cāng)庫(kù) |  文件格式轉(zhuǎn)換 
          主站蜘蛛池模板: 广安市| 南乐县| 沧源| 鄂托克旗| 穆棱市| 武威市| 平湖市| 千阳县| 武义县| 遂川县| 进贤县| 福安市| 江西省| 磐安县| 鱼台县| 万载县| 调兵山市| 三明市| 奈曼旗| 洱源县| 平武县| 玉山县| 东山县| 碌曲县| 安宁市| 绥中县| 锡林郭勒盟| 新巴尔虎右旗| 北辰区| 潞西市| 江华| 巢湖市| 仪陇县| 栾城县| 齐河县| 察雅县| 岗巴县| 什邡市| 嘉黎县| 内江市| 合江县|