Changeset 136
- Timestamp:
- May 14, 2009, 11:38:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Display.java
r134 r136 109 109 PSZ windowClass; 110 110 // Two vars below are intentionally commented. See comments inside init(). 111 //int threadId, processId;111 int threadId, processId; 112 112 static int windowClassCount = 0; 113 113 static final String WindowName = "SWT_Window"; … … 141 141 int hwndShell; 142 142 /* System Fonts */ 143 //int [] systemFonts;143 int [] systemFonts; 144 144 145 145 /* Image list cache */ … … 831 831 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 832 832 * </ul> 833 */ 834 //@@TODO (dmik): 835 //public int getIconDepth () { 836 // checkDevice (); 837 // 838 // /* Use the character encoding for the default locale */ 839 // TCHAR buffer1 = new TCHAR (0, "Control Panel\\Desktop\\WindowMetrics", true); 840 // 841 // int [] phkResult = new int [1]; 842 // int result = OS.RegOpenKeyEx (OS.HKEY_CURRENT_USER, buffer1, 0, OS.KEY_READ, phkResult); 843 // if (result != 0) return 4; 844 // int depth = 4; 845 // int [] lpcbData = {128}; 846 // 847 // /* Use the character encoding for the default locale */ 848 // TCHAR lpData = new TCHAR (0, lpcbData [0]); 849 // TCHAR buffer2 = new TCHAR (0, "Shell Icon BPP", true); 850 // 851 // result = OS.RegQueryValueEx (phkResult [0], buffer2, 0, null, lpData, lpcbData); 852 // if (result == 0) { 853 // try { 854 // depth = Integer.parseInt (lpData.toString (0, lpData.strlen ())); 855 // } catch (NumberFormatException e) {}; 856 // } 857 // OS.RegCloseKey (phkResult [0]); 858 // return depth; 859 //} 833 */ 834 public int getIconDepth () { 835 checkDevice (); 836 GCData hpsData = new GCData(); 837 int hps = internal_new_GC (hpsData); 838 int colorInfo[] = new int [2]; 839 OS.DevQueryCaps (hpsData.hdc, OS.CAPS_COLOR_PLANES, 2, colorInfo); 840 internal_dispose_GC (hps, hpsData); 841 return colorInfo [0] * colorInfo [1]; 842 } 860 843 // 861 844 //ImageList getImageList (Point size) { … … 1058 1041 // case SWT.COLOR_WIDGET_LIGHT_SHADOW: pixel = OS.GetSysColor (OS.COLOR_3DLIGHT); break; 1059 1042 // case SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW: pixel = OS.GetSysColor (OS.COLOR_3DHIGHLIGHT); break; 1060 // case SWT.COLOR_WIDGET_BACKGROUND: pixel = OS.GetSysColor (OS.COLOR_3DFACE); break;1043 case SWT.COLOR_WIDGET_BACKGROUND: pixel = OS.WinQuerySysColor (OS.HWND_DESKTOP, OS.SYSCLR_DIALOGBACKGROUND,0); break; 1061 1044 case SWT.COLOR_WIDGET_BORDER: pixel = OS.WinQuerySysColor (OS.HWND_DESKTOP, OS.SYSCLR_WINDOWFRAME,0); break; 1062 1045 // case SWT.COLOR_WIDGET_FOREGROUND: … … 1148 1131 OS.objcpy (pib, ppib[0]); 1149 1132 // threadId = tib.tib_ptib2.tib2_ultid; 1150 //processId = pib.pib_ulpid;1133 processId = pib.pib_ulpid; 1151 1134 1152 1135 /* "Morph" the current process to PM mode if not already in it */ … … 1187 1170 //@@TODO (dmik): 1188 1171 // /* Initialize the system font */ 1189 //int systemFont = 0;1172 int systemFont = 0; 1190 1173 // if (!OS.IsWinCE) { 1191 1174 // NONCLIENTMETRICS info = new NONCLIENTMETRICS (); … … 1197 1180 // if (systemFont == 0) systemFont = OS.GetStockObject (OS.DEFAULT_GUI_FONT); 1198 1181 // if (systemFont == 0) systemFont = OS.GetStockObject (OS.SYSTEM_FONT); 1199 //if (systemFont != 0) systemFonts = new int [] {systemFont};1182 if (systemFont != 0) systemFonts = new int [] {systemFont}; 1200 1183 1201 1184 /* Create the message only HWND */ … … 1438 1421 /* Release the system fonts */ 1439 1422 //@@TODO (dmik): later 1440 //if (systemFonts != null) {1423 if (systemFonts != null) { 1441 1424 // for (int i=0; i<systemFonts.length; i++) { 1442 1425 // if (systemFonts [i] != 0) OS.DeleteObject (systemFonts [i]); 1443 1426 // } 1444 //}1445 //systemFonts = null;1427 } 1428 systemFonts = null; 1446 1429 1447 1430 /* Release Custom Colors for ChooseColor */ … … 1652 1635 // checkDevice (); 1653 1636 // if (point == null) error (SWT.ERROR_NULL_ARGUMENT); 1654 // OS.SetCursorPos (point.x, point.y); 1637 // OS.SetCursorPos (point.x, point.y); WinSetPointerPos 1655 1638 //} 1656 1639
Note:
See TracChangeset
for help on using the changeset viewer.