Commit af34c32
committed
Refactor cursor handle creation using CursorHandleProvider abstraction
Replaces ad-hoc handle creation logic in win32_getHandle() with a new
CursorHandleProvider abstract class. This class has three concrete
implementations to cover the different input sources used to create a
cursor:
- StyleCursorHandleProvider: uses predefined cursor style ints.
- ImageDataProviderCursorHandleProvider: uses ImageDataProvider for source.
- ImageDataCursorHandleProvider: uses ImageData and mask directly.
This eliminates the need for checking which cursor fields are set,
and removes the problem of having multiple unused fields in Cursor.
The abstract class defines a final helper method to create handles
from scaled image data, centralizing logic and reducing duplication.1 parent 20d18aa commit af34c32
File tree
1 file changed
+282
-197
lines changed- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics
1 file changed
+282
-197
lines changed
0 commit comments