File tree 1 file changed +23
-2
lines changed
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,8 @@ public final class Font extends Resource {
46
46
* platforms and should never be accessed from application code.
47
47
* </p>
48
48
*
49
- * @noreference This field is not intended to be referenced by clients.
50
49
*/
51
- public long handle ;
50
+ private long handle ;
52
51
53
52
/**
54
53
* The zoom in % of the standard resolution used for conversion of point height to pixel height
@@ -294,6 +293,28 @@ public String toString () {
294
293
return "Font {" + handle + "}" ;
295
294
}
296
295
296
+ /**
297
+ * <b>IMPORTANT:</b> This method is not part of the public
298
+ * API for Font. It is marked public only so that it
299
+ * can be shared within the packages provided by SWT. It is not
300
+ * available on all platforms, and should never be called from
301
+ * application code.
302
+ *
303
+ * Creates a new handle for the requested font or return the existing one
304
+ *
305
+ * @param font the font to get the handle of
306
+ *
307
+ * @return handle of the font
308
+ *
309
+ * @noreference This method is not intended to be referenced by clients.
310
+ */
311
+ public static long win32_getHandle (Font font ) {
312
+ if (font .handle == 0 ) {
313
+ font .init (font .fontData );
314
+ }
315
+ return font .handle ;
316
+ }
317
+
297
318
/**
298
319
* Invokes platform specific functionality to allocate a new font.
299
320
* <p>
You can’t perform that action at this time.
0 commit comments