Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 158751 Details for
Bug 96394
Printing: get a list of paper formats for a printer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
GTK Printer Patchv01
Printer_GTK_v01.txt (text/plain), 52.44 KB, created by
Praveen
on 2010-02-10 12:39:41 EST
(
hide
)
Description:
GTK Printer Patchv01
Filename:
MIME Type:
Creator:
Praveen
Created:
2010-02-10 12:39:41 EST
Size:
52.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.swt >Index: Eclipse SWT PI/gtk/library/os.c >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c,v >retrieving revision 1.291 >diff -u -r1.291 os.c >--- Eclipse SWT PI/gtk/library/os.c 2 Feb 2010 10:56:39 -0000 1.291 >+++ Eclipse SWT PI/gtk/library/os.c 10 Feb 2010 15:47:44 -0000 >@@ -11181,6 +11181,26 @@ > } > #endif > >+#ifndef NO__1gtk_1paper_1size_1get_1paper_1sizes >+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1paper_1size_1get_1paper_1sizes) >+ (JNIEnv *env, jclass that, jboolean arg0) >+{ >+ jintLong rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1get_1paper_1sizes_FUNC); >+/* >+ rc = (jintLong)gtk_paper_size_get_paper_sizes(arg0); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_paper_size_get_paper_sizes) >+ if (fp) { >+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jboolean))fp)(arg0); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1get_1paper_1sizes_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gtk_1paper_1size_1get_1ppd_1name > JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1paper_1size_1get_1ppd_1name) > (JNIEnv *env, jclass that, jintLong arg0) >@@ -11578,6 +11598,66 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1settings_1get_1default_1source >+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1default_1source) >+ (JNIEnv *env, jclass that, jintLong arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1default_1source_FUNC); >+/* >+ rc = (jint)gtk_print_settings_get_default_source(arg0); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_get_default_source) >+ if (fp) { >+ rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1default_1source_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1get_1duplex >+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1duplex) >+ (JNIEnv *env, jclass that, jintLong arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1duplex_FUNC); >+/* >+ rc = (jint)gtk_print_settings_get_duplex(arg0); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_get_duplex) >+ if (fp) { >+ rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1duplex_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1get_1media_1type >+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1media_1type) >+ (JNIEnv *env, jclass that, jintLong arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1media_1type_FUNC); >+/* >+ rc = (jint)gtk_print_settings_get_media_type(arg0); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_get_media_type) >+ if (fp) { >+ rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1media_1type_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gtk_1print_1settings_1get_1n_1copies > JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1n_1copies) > (JNIEnv *env, jclass that, jintLong arg0) >@@ -11618,6 +11698,26 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1settings_1get_1output_1bin >+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1output_1bin) >+ (JNIEnv *env, jclass that, jintLong arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1output_1bin_FUNC); >+/* >+ rc = (jint)gtk_print_settings_get_output_bin(arg0); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_get_output_bin) >+ if (fp) { >+ rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1output_1bin_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gtk_1print_1settings_1get_1page_1ranges > JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1page_1ranges) > (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1) >@@ -11722,6 +11822,26 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1settings_1get_1quality >+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1quality) >+ (JNIEnv *env, jclass that, jintLong arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1quality_FUNC); >+/* >+ rc = (jint)gtk_print_settings_get_quality(arg0); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_get_quality) >+ if (fp) { >+ rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1quality_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gtk_1print_1settings_1get_1resolution > JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1resolution) > (JNIEnv *env, jclass that, jintLong arg0) >@@ -11742,6 +11862,66 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1settings_1get_1reverse >+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1reverse) >+ (JNIEnv *env, jclass that, jintLong arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1reverse_FUNC); >+/* >+ rc = (jint)gtk_print_settings_get_reverse(arg0); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_get_reverse) >+ if (fp) { >+ rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1reverse_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1get_1scale >+JNIEXPORT jdouble JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1scale) >+ (JNIEnv *env, jclass that, jintLong arg0) >+{ >+ jdouble rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1scale_FUNC); >+/* >+ rc = (jdouble)gtk_print_settings_get_scale(arg0); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_get_scale) >+ if (fp) { >+ rc = (jdouble)((jdouble (CALLING_CONVENTION*)(jintLong))fp)(arg0); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1scale_FUNC); >+ return rc; >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1get_1use_1color >+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1use_1color) >+ (JNIEnv *env, jclass that, jintLong arg0) >+{ >+ jint rc = 0; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1use_1color_FUNC); >+/* >+ rc = (jint)gtk_print_settings_get_use_color(arg0); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_get_use_color) >+ if (fp) { >+ rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1use_1color_FUNC); >+ return rc; >+} >+#endif >+ > #ifndef NO__1gtk_1print_1settings_1new > JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1print_1settings_1new) > (JNIEnv *env, jclass that) >@@ -11805,6 +11985,68 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1settings_1set_1default_1source >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1default_1source) >+ (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) >+{ >+ jbyte *lparg1=NULL; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1default_1source_FUNC); >+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; >+/* >+ gtk_print_settings_set_default_source(arg0, lparg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_default_source) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1); >+ } >+ } >+fail: >+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1default_1source_FUNC); >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1set_1duplex >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1duplex) >+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1duplex_FUNC); >+/* >+ gtk_print_settings_set_duplex(arg0, arg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_duplex) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1duplex_FUNC); >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1set_1media_1type >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1media_1type) >+ (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) >+{ >+ jbyte *lparg1=NULL; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1media_1type_FUNC); >+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; >+/* >+ gtk_print_settings_set_media_type(arg0, lparg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_media_type) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1); >+ } >+ } >+fail: >+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1media_1type_FUNC); >+} >+#endif >+ > #ifndef NO__1gtk_1print_1settings_1set_1n_1copies > JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1n_1copies) > (JNIEnv *env, jclass that, jintLong arg0, jint arg1) >@@ -11823,6 +12065,42 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1settings_1set_1number_1up >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1number_1up) >+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1number_1up_FUNC); >+/* >+ gtk_print_settings_set_number_up(arg0, arg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_number_up) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1number_1up_FUNC); >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1set_1number_1up_1layout >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1number_1up_1layout) >+ (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1number_1up_1layout_FUNC); >+/* >+ gtk_print_settings_set_number_up_layout(arg0, arg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_number_up_layout) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1number_1up_1layout_FUNC); >+} >+#endif >+ > #ifndef NO__1gtk_1print_1settings_1set_1orientation > JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1orientation) > (JNIEnv *env, jclass that, jintLong arg0, jint arg1) >@@ -11841,6 +12119,28 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1settings_1set_1output_1bin >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1output_1bin) >+ (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) >+{ >+ jbyte *lparg1=NULL; >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1output_1bin_FUNC); >+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; >+/* >+ gtk_print_settings_set_output_bin(arg0, lparg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_output_bin) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1); >+ } >+ } >+fail: >+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1output_1bin_FUNC); >+} >+#endif >+ > #ifndef NO__1gtk_1print_1settings_1set_1page_1ranges > JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1page_1ranges) > (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jint arg2) >@@ -11863,6 +12163,24 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1settings_1set_1paper_1size >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1paper_1size) >+ (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1paper_1size_FUNC); >+/* >+ gtk_print_settings_set_paper_size(arg0, arg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_paper_size) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1paper_1size_FUNC); >+} >+#endif >+ > #ifndef NO__1gtk_1print_1settings_1set_1print_1pages > JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1print_1pages) > (JNIEnv *env, jclass that, jintLong arg0, jint arg1) >@@ -11903,6 +12221,78 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1settings_1set_1quality >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1quality) >+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1quality_FUNC); >+/* >+ gtk_print_settings_set_quality(arg0, arg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_quality) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1quality_FUNC); >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1set_1reverse >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1reverse) >+ (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1reverse_FUNC); >+/* >+ gtk_print_settings_set_reverse(arg0, arg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_reverse) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1reverse_FUNC); >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1set_1scale >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1scale) >+ (JNIEnv *env, jclass that, jintLong arg0, jdouble arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1scale_FUNC); >+/* >+ gtk_print_settings_set_scale(arg0, arg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_scale) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jdouble))fp)(arg0, arg1); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1scale_FUNC); >+} >+#endif >+ >+#ifndef NO__1gtk_1print_1settings_1set_1use_1color >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1set_1use_1color) >+ (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1use_1color_FUNC); >+/* >+ gtk_print_settings_set_use_color(arg0, arg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_settings_set_use_color) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1use_1color_FUNC); >+} >+#endif >+ > #ifndef NO__1gtk_1print_1unix_1dialog_1get_1current_1page > JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1unix_1dialog_1get_1current_1page) > (JNIEnv *env, jclass that, jintLong arg0) >@@ -12025,6 +12415,24 @@ > } > #endif > >+#ifndef NO__1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup >+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup) >+ (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) >+{ >+ OS_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup_FUNC); >+/* >+ gtk_print_unix_dialog_set_embed_page_setup(arg0, arg1); >+*/ >+ { >+ LOAD_FUNCTION(fp, gtk_print_unix_dialog_set_embed_page_setup) >+ if (fp) { >+ ((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1); >+ } >+ } >+ OS_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup_FUNC); >+} >+#endif >+ > #ifndef NO__1gtk_1print_1unix_1dialog_1set_1manual_1capabilities > JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1unix_1dialog_1set_1manual_1capabilities) > (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) >Index: Eclipse SWT PI/gtk/library/os_custom.h >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h,v >retrieving revision 1.90 >diff -u -r1.90 os_custom.h >--- Eclipse SWT PI/gtk/library/os_custom.h 21 Jan 2010 19:47:38 -0000 1.90 >+++ Eclipse SWT PI/gtk/library/os_custom.h 10 Feb 2010 15:47:47 -0000 >@@ -213,6 +213,27 @@ > #define gtk_print_unix_dialog_set_manual_capabilities_LIB "libgtk-x11-2.0.so.0" > #define gtk_print_unix_dialog_set_page_setup_LIB "libgtk-x11-2.0.so.0" > #define gtk_print_unix_dialog_set_settings_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_number_up_layout_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_number_up_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_scale_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_get_scale_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_unix_dialog_set_embed_page_setup_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_paper_size_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_duplex_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_get_duplex_LIB "libgtk-x11-2.0.so.0" >+#define gtk_paper_size_get_paper_sizes_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_get_reverse_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_reverse_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_get_default_source_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_default_source_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_get_media_type_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_media_type_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_get_output_bin_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_output_bin_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_get_use_color_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_use_color_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_get_quality_LIB "libgtk-x11-2.0.so.0" >+#define gtk_print_settings_set_quality_LIB "libgtk-x11-2.0.so.0" > #define gtk_printer_get_backend_LIB "libgtk-x11-2.0.so.0" > #define gtk_printer_get_name_LIB "libgtk-x11-2.0.so.0" > #define gtk_printer_is_default_LIB "libgtk-x11-2.0.so.0" >Index: Eclipse SWT PI/gtk/library/os_stats.c >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c,v >retrieving revision 1.198 >diff -u -r1.198 os_stats.c >--- Eclipse SWT PI/gtk/library/os_stats.c 2 Feb 2010 10:56:40 -0000 1.198 >+++ Eclipse SWT PI/gtk/library/os_stats.c 10 Feb 2010 15:47:49 -0000 >@@ -18,8 +18,8 @@ > > #ifdef NATIVE_STATS > >-int OS_nativeFunctionCount = 1354; >-int OS_nativeFunctionCallCount[1354]; >+int OS_nativeFunctionCount = 1375; >+int OS_nativeFunctionCallCount[1375]; > char * OS_nativeFunctionNames[] = { > #ifndef JNI64 > "Call__IIII", >@@ -889,6 +889,7 @@ > "_1gtk_1paper_1size_1get_1display_1name", > "_1gtk_1paper_1size_1get_1height", > "_1gtk_1paper_1size_1get_1name", >+ "_1gtk_1paper_1size_1get_1paper_1sizes", > "_1gtk_1paper_1size_1get_1ppd_1name", > "_1gtk_1paper_1size_1get_1width", > "_1gtk_1paper_1size_1is_1custom", >@@ -908,28 +909,48 @@ > "_1gtk_1print_1settings_1foreach", > "_1gtk_1print_1settings_1get", > "_1gtk_1print_1settings_1get_1collate", >+ "_1gtk_1print_1settings_1get_1default_1source", >+ "_1gtk_1print_1settings_1get_1duplex", >+ "_1gtk_1print_1settings_1get_1media_1type", > "_1gtk_1print_1settings_1get_1n_1copies", > "_1gtk_1print_1settings_1get_1orientation", >+ "_1gtk_1print_1settings_1get_1output_1bin", > "_1gtk_1print_1settings_1get_1page_1ranges", > "_1gtk_1print_1settings_1get_1paper_1height", > "_1gtk_1print_1settings_1get_1paper_1width", > "_1gtk_1print_1settings_1get_1print_1pages", > "_1gtk_1print_1settings_1get_1printer", >+ "_1gtk_1print_1settings_1get_1quality", > "_1gtk_1print_1settings_1get_1resolution", >+ "_1gtk_1print_1settings_1get_1reverse", >+ "_1gtk_1print_1settings_1get_1scale", >+ "_1gtk_1print_1settings_1get_1use_1color", > "_1gtk_1print_1settings_1new", > "_1gtk_1print_1settings_1set", > "_1gtk_1print_1settings_1set_1collate", >+ "_1gtk_1print_1settings_1set_1default_1source", >+ "_1gtk_1print_1settings_1set_1duplex", >+ "_1gtk_1print_1settings_1set_1media_1type", > "_1gtk_1print_1settings_1set_1n_1copies", >+ "_1gtk_1print_1settings_1set_1number_1up", >+ "_1gtk_1print_1settings_1set_1number_1up_1layout", > "_1gtk_1print_1settings_1set_1orientation", >+ "_1gtk_1print_1settings_1set_1output_1bin", > "_1gtk_1print_1settings_1set_1page_1ranges", >+ "_1gtk_1print_1settings_1set_1paper_1size", > "_1gtk_1print_1settings_1set_1print_1pages", > "_1gtk_1print_1settings_1set_1printer", >+ "_1gtk_1print_1settings_1set_1quality", >+ "_1gtk_1print_1settings_1set_1reverse", >+ "_1gtk_1print_1settings_1set_1scale", >+ "_1gtk_1print_1settings_1set_1use_1color", > "_1gtk_1print_1unix_1dialog_1get_1current_1page", > "_1gtk_1print_1unix_1dialog_1get_1page_1setup", > "_1gtk_1print_1unix_1dialog_1get_1selected_1printer", > "_1gtk_1print_1unix_1dialog_1get_1settings", > "_1gtk_1print_1unix_1dialog_1new", > "_1gtk_1print_1unix_1dialog_1set_1current_1page", >+ "_1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup", > "_1gtk_1print_1unix_1dialog_1set_1manual_1capabilities", > "_1gtk_1print_1unix_1dialog_1set_1page_1setup", > "_1gtk_1print_1unix_1dialog_1set_1settings", >Index: Eclipse SWT PI/gtk/library/os_stats.h >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h,v >retrieving revision 1.199 >diff -u -r1.199 os_stats.h >--- Eclipse SWT PI/gtk/library/os_stats.h 2 Feb 2010 10:56:40 -0000 1.199 >+++ Eclipse SWT PI/gtk/library/os_stats.h 10 Feb 2010 15:47:50 -0000 >@@ -897,6 +897,7 @@ > _1gtk_1paper_1size_1get_1display_1name_FUNC, > _1gtk_1paper_1size_1get_1height_FUNC, > _1gtk_1paper_1size_1get_1name_FUNC, >+ _1gtk_1paper_1size_1get_1paper_1sizes_FUNC, > _1gtk_1paper_1size_1get_1ppd_1name_FUNC, > _1gtk_1paper_1size_1get_1width_FUNC, > _1gtk_1paper_1size_1is_1custom_FUNC, >@@ -916,28 +917,48 @@ > _1gtk_1print_1settings_1foreach_FUNC, > _1gtk_1print_1settings_1get_FUNC, > _1gtk_1print_1settings_1get_1collate_FUNC, >+ _1gtk_1print_1settings_1get_1default_1source_FUNC, >+ _1gtk_1print_1settings_1get_1duplex_FUNC, >+ _1gtk_1print_1settings_1get_1media_1type_FUNC, > _1gtk_1print_1settings_1get_1n_1copies_FUNC, > _1gtk_1print_1settings_1get_1orientation_FUNC, >+ _1gtk_1print_1settings_1get_1output_1bin_FUNC, > _1gtk_1print_1settings_1get_1page_1ranges_FUNC, > _1gtk_1print_1settings_1get_1paper_1height_FUNC, > _1gtk_1print_1settings_1get_1paper_1width_FUNC, > _1gtk_1print_1settings_1get_1print_1pages_FUNC, > _1gtk_1print_1settings_1get_1printer_FUNC, >+ _1gtk_1print_1settings_1get_1quality_FUNC, > _1gtk_1print_1settings_1get_1resolution_FUNC, >+ _1gtk_1print_1settings_1get_1reverse_FUNC, >+ _1gtk_1print_1settings_1get_1scale_FUNC, >+ _1gtk_1print_1settings_1get_1use_1color_FUNC, > _1gtk_1print_1settings_1new_FUNC, > _1gtk_1print_1settings_1set_FUNC, > _1gtk_1print_1settings_1set_1collate_FUNC, >+ _1gtk_1print_1settings_1set_1default_1source_FUNC, >+ _1gtk_1print_1settings_1set_1duplex_FUNC, >+ _1gtk_1print_1settings_1set_1media_1type_FUNC, > _1gtk_1print_1settings_1set_1n_1copies_FUNC, >+ _1gtk_1print_1settings_1set_1number_1up_FUNC, >+ _1gtk_1print_1settings_1set_1number_1up_1layout_FUNC, > _1gtk_1print_1settings_1set_1orientation_FUNC, >+ _1gtk_1print_1settings_1set_1output_1bin_FUNC, > _1gtk_1print_1settings_1set_1page_1ranges_FUNC, >+ _1gtk_1print_1settings_1set_1paper_1size_FUNC, > _1gtk_1print_1settings_1set_1print_1pages_FUNC, > _1gtk_1print_1settings_1set_1printer_FUNC, >+ _1gtk_1print_1settings_1set_1quality_FUNC, >+ _1gtk_1print_1settings_1set_1reverse_FUNC, >+ _1gtk_1print_1settings_1set_1scale_FUNC, >+ _1gtk_1print_1settings_1set_1use_1color_FUNC, > _1gtk_1print_1unix_1dialog_1get_1current_1page_FUNC, > _1gtk_1print_1unix_1dialog_1get_1page_1setup_FUNC, > _1gtk_1print_1unix_1dialog_1get_1selected_1printer_FUNC, > _1gtk_1print_1unix_1dialog_1get_1settings_FUNC, > _1gtk_1print_1unix_1dialog_1new_FUNC, > _1gtk_1print_1unix_1dialog_1set_1current_1page_FUNC, >+ _1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup_FUNC, > _1gtk_1print_1unix_1dialog_1set_1manual_1capabilities_FUNC, > _1gtk_1print_1unix_1dialog_1set_1page_1setup_FUNC, > _1gtk_1print_1unix_1dialog_1set_1settings_FUNC, >Index: Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java,v >retrieving revision 1.549 >diff -u -r1.549 OS.java >--- Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java 2 Feb 2010 10:56:40 -0000 1.549 >+++ Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java 10 Feb 2010 15:48:01 -0000 >@@ -307,6 +307,8 @@ > public static final int GTK_PRINT_CAPABILITY_GENERATE_PDF = 1 << 5; > public static final int GTK_PRINT_CAPABILITY_GENERATE_PS = 1 << 6; > public static final int GTK_PRINT_CAPABILITY_PREVIEW = 1 << 7; >+ public static final int GTK_PRINT_CAPABILITY_NUMBER_UP = 1 << 8; >+ public static final int GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT = 1 << 9; > public static final int GTK_PRINT_PAGES_ALL = 0; > public static final int GTK_PRINT_PAGES_CURRENT = 1; > public static final int GTK_PRINT_PAGES_RANGES = 2; >@@ -9050,6 +9052,16 @@ > } > } > /** @method flags=dynamic */ >+public static final native int /*long*/ _gtk_paper_size_get_paper_sizes(boolean custom); >+public static final int /*long*/ gtk_paper_size_get_paper_sizes(boolean custom) { >+ lock.lock(); >+ try { >+ return _gtk_paper_size_get_paper_sizes(custom); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ > public static final native int /*long*/ _gtk_print_settings_new(); > public static final int /*long*/ gtk_print_settings_new() { > lock.lock(); >@@ -9163,6 +9175,46 @@ > } > } > /** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_number_up(int /*long*/ settings, int num_up); >+public static final void gtk_print_settings_set_number_up(int /*long*/ settings, int num_up) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_number_up(settings, num_up); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_duplex(int /*long*/ settings, int duplex); >+public static final void gtk_print_settings_set_duplex(int /*long*/ settings, int duplex) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_duplex(settings, duplex); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native int _gtk_print_settings_get_duplex(int /*long*/ settings); >+public static final int gtk_print_settings_get_duplex(int /*long*/ settings) { >+ lock.lock(); >+ try { >+ return _gtk_print_settings_get_duplex(settings); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_number_up_layout(int /*long*/ settings, int /*long*/ layout); >+public static final void gtk_print_settings_set_number_up_layout(int /*long*/ settings, int /*long*/ layout) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_number_up_layout(settings, layout); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ > public static final native int _gtk_print_settings_get_n_copies(int /*long*/ settings); > public static final int gtk_print_settings_get_n_copies(int /*long*/ settings) { > lock.lock(); >@@ -9196,6 +9248,27 @@ > } > } > /** @method flags=dynamic */ >+public static final native double _gtk_print_settings_get_scale(int /*long*/ settings); >+public static final double gtk_print_settings_get_scale(int /*long*/ settings) { >+ lock.lock(); >+ try { >+ return _gtk_print_settings_get_scale(settings); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic >+ * @param num_ranges cast=(gdouble)*/ >+public static final native void _gtk_print_settings_set_scale(int /*long*/ settings, double scale); >+public static final void gtk_print_settings_set_scale(int /*long*/ settings, double scale) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_scale(settings, scale); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ > public static final native void _gtk_print_settings_set_print_pages(int /*long*/ settings, int pages); > public static final void gtk_print_settings_set_print_pages(int /*long*/ settings, int pages) { > lock.lock(); >@@ -9218,6 +9291,16 @@ > lock.unlock(); > } > } >+/** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_paper_size(int /*long*/ settings, int /*long*/ paper_size); >+public static final void gtk_print_settings_set_paper_size(int /*long*/ settings, int /*long*/ paper_size) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_paper_size(settings, paper_size); >+ } finally { >+ lock.unlock(); >+ } >+} > /** > * @method flags=dynamic > * @param num_ranges cast=(gint) >@@ -9261,6 +9344,126 @@ > lock.unlock(); > } > } >+/** @method flags=dynamic */ >+public static final native int _gtk_print_settings_get_reverse(int /*long*/ settings); >+public static final int gtk_print_settings_get_reverse(int /*long*/ settings) { >+ lock.lock(); >+ try { >+ return _gtk_print_settings_get_reverse(settings); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_reverse(int /*long*/ settings, boolean reverse); >+public static final void gtk_print_settings_set_reverse(int /*long*/ settings, boolean reverse) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_reverse(settings, reverse); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native int _gtk_print_settings_get_default_source(int /*long*/ settings); >+public static final int gtk_print_settings_get_default_source(int /*long*/ settings) { >+ lock.lock(); >+ try { >+ return _gtk_print_settings_get_default_source(settings); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_default_source(int /*long*/ settings, byte[] source); >+public static final void gtk_print_settings_set_default_source(int /*long*/ settings, byte[] source) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_default_source(settings, source); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native int _gtk_print_settings_get_media_type(int /*long*/ settings); >+public static final int gtk_print_settings_get_media_type(int /*long*/ settings) { >+ lock.lock(); >+ try { >+ return _gtk_print_settings_get_media_type(settings); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_media_type(int /*long*/ settings, byte[] media_type); >+public static final void gtk_print_settings_set_media_type(int /*long*/ settings, byte[] media_type) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_media_type(settings, media_type); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native int _gtk_print_settings_get_output_bin(int /*long*/ settings); >+public static final int gtk_print_settings_get_output_bin(int /*long*/ settings) { >+ lock.lock(); >+ try { >+ return _gtk_print_settings_get_output_bin(settings); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_output_bin(int /*long*/ settings, byte[] output_bin); >+public static final void gtk_print_settings_set_output_bin(int /*long*/ settings, byte[] output_bin) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_output_bin(settings, output_bin); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native int _gtk_print_settings_get_use_color(int /*long*/ settings); >+public static final int gtk_print_settings_get_use_color(int /*long*/ settings) { >+ lock.lock(); >+ try { >+ return _gtk_print_settings_get_use_color(settings); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_use_color(int /*long*/ settings, boolean use_color); >+public static final void gtk_print_settings_set_use_color(int /*long*/ settings, boolean use_color) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_use_color(settings, use_color); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native int _gtk_print_settings_get_quality(int /*long*/ settings); >+public static final int gtk_print_settings_get_quality(int /*long*/ settings) { >+ lock.lock(); >+ try { >+ return _gtk_print_settings_get_quality(settings); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ >+public static final native void _gtk_print_settings_set_quality(int /*long*/ settings, int quality); >+public static final void gtk_print_settings_set_quality(int /*long*/ settings, int quality) { >+ lock.lock(); >+ try { >+ _gtk_print_settings_set_quality(settings, quality); >+ } finally { >+ lock.unlock(); >+ } >+} > /** > * @method flags=dynamic > * @param title cast=(const gchar *) >@@ -9276,6 +9479,16 @@ > } > } > /** @method flags=dynamic */ >+public static final native void _gtk_print_unix_dialog_set_embed_page_setup(int /*long*/ dialog, boolean embed); >+public static final void gtk_print_unix_dialog_set_embed_page_setup(int /*long*/ dialog, boolean embed) { >+ lock.lock(); >+ try { >+ _gtk_print_unix_dialog_set_embed_page_setup(dialog, embed); >+ } finally { >+ lock.unlock(); >+ } >+} >+/** @method flags=dynamic */ > public static final native void _gtk_print_unix_dialog_set_page_setup(int /*long*/ dialog, int /*long*/ page_setup); > public static final void gtk_print_unix_dialog_set_page_setup(int /*long*/ dialog, int /*long*/ page_setup) { > lock.lock(); >Index: Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java,v >retrieving revision 1.25 >diff -u -r1.25 PrinterData.java >--- Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java 20 Jan 2010 13:43:49 -0000 1.25 >+++ Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java 10 Feb 2010 15:48:01 -0000 >@@ -111,8 +111,102 @@ > * @since 3.5 > */ > public int orientation = PORTRAIT; >+ >+ /** >+ * The scaling factor of the page and paper rectangle, >+ * expressed as a percentage by which the printed output >+ * to be scaled. Default value is 100 indicating no scale. >+ * >+ * @since 3.6 >+ */ >+ public double scale = 100; >+ >+ /** >+ * The number of logical pages to be tiled on a >+ * physical sheet of paper, whose value can be >+ * expressed either of 1, 2, 4, 6, 9 or 16. >+ * >+ * @since 3.6 >+ */ >+ public int pagesPerSide = 1; >+ >+ /** >+ * specifies a print job that can print either single-sided or >+ * double-sided printing, expressed as one of the following values: >+ * <dl> >+ * <dt><code>DUPLEX_SIMPLEX</code></dt> >+ * <dd>Normal one-sided printing</dd> >+ * <dt><code>DUPLEX_HORIZONTAL</code></dt> >+ * <dd>Duplex printing with page being horizontal</dd> >+ * <dt><code>DUPLEX_VERTICAL</code></dt> >+ * <dd>Duplex printing with page being vertical</dd> >+ * </dl> >+ * >+ * @since 3.6 >+ */ >+ public int duplex = DUPLEX_SIMPLEX; >+ >+ /** >+ * Specifies the name for the paper size used in a >+ * print job, expressed as one of the following values: >+ * <dl> >+ * <dt><code>PAPER_LETTER</code></dt> >+ * <dt><code>PAPER_LEGAL</code></dt> >+ * <dt><code>PAPER_A2</code></dt> >+ * <dt><code>PAPER_A4</code></dt> >+ * <dt><code>PAPER_A5</code></dt> >+ * <dt><code>PAPER_A6</code></dt> >+ * <dt><code>PAPER_B5</code></dt> >+ * <dt><code>PAPER_JB5</code></dt> >+ * <dt><code>PAPER_EXECUTIVE</code></dt> >+ * <dt><code>PAPER_CUSTOM</code></dt> >+ * </dl> >+ * >+ * Also accepts any paper size from the list of available paper size >+ * names returned by method <code>Printer.getPaperSizeList</code>. >+ * >+ * @since 3.6 >+ */ >+ public String paperSizeName = PAPER_A4; >+ >+ /** >+ * The physical height of the custom paper name in inches. >+ * Note that this field is ignored if <code>paperSize</code> >+ * is not specified as <code>PAPER_CUSTOM</code>. >+ * >+ * @since 3.6 >+ */ >+ public double customPaperHeight = 0; >+ >+ /** >+ * The physical width of the custom paper name in inches. >+ * Note that this field is ignored if <code>paperSize</code> >+ * is not specified as <code>PAPER_CUSTOM</code>. >+ * >+ * @since 3.6 >+ */ >+ public double customPaperWidth = 0; > > /** >+ * The name of the custom paper size. >+ * Note that this field is ignored if <code>paperSize</code> >+ * is not specified as <code>PAPER_CUSTOM</code>. >+ * >+ * @since 3.6 >+ */ >+ public String customPaperName; >+ >+ /** >+ * The human-readable name of the custom paper size to >+ * be displayed in print dialog. Note that this field >+ * is ignored if <code>paperSize</code> is not >+ * specified as <code>PAPER_CUSTOM</code>. >+ * >+ * @since 3.6 >+ */ >+ public String customPaperDisplayName; >+ >+ /** > * <code>scope</code> field value indicating that > * all pages should be printed > */ >@@ -148,6 +242,116 @@ > public static final int LANDSCAPE = 2; > > /** >+ * <code>duplex</code> field value indicating >+ * one-sided printing >+ * >+ * @since 3.6 >+ */ >+ public static final int DUPLEX_SIMPLEX = 1; >+ >+ /** >+ * <code>duplex</code> field value indicating >+ * double sided printing on short edge >+ * >+ * @since 3.6 >+ */ >+ public static final int DUPLEX_HORIZONTAL = 2; >+ >+ /** >+ * <code>duplex</code> field value indicating >+ * double sided printing on long edge >+ * >+ * @since 3.6 >+ */ >+ public static final int DUPLEX_VERTICAL = 3; >+ >+ /** >+ * <code>paperSize</code> field value indicating >+ * the paper size as LETTER >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_LETTER = "LETTER"; >+ >+ /** >+ * <code>paperSize</code> field value indicating >+ * the paper size as LEGAL >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_LEGAL = "LEGAL"; >+ >+ /** >+ * <code>paperSize</code> field value indicating >+ * the paper size as A4 sheet >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_A2 = "A2"; >+ >+ /** >+ * <code>paperSize</code> field value indicating >+ * the paper size as A4 sheet >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_A4 = "A4"; >+ >+ /** >+ * <code>paperSize</code> field value indicating >+ * the paper size as A4 sheet >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_A5 = "A5"; >+ >+ /** >+ * <code>paperSize</code> field value indicating >+ * the paper size as A4 sheet >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_A6 = "A6"; >+ >+ /** >+ * <code>paperSize</code> field value indicating >+ * the paper size as B5 sheet >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_B5 = "B5"; >+ >+ /** >+ * <code>paperSize</code> field value indicating >+ * the paper size as JB5 sheet >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_JB5 = "JB5"; >+ >+ /** >+ * <code>paperSize</code> field value indicating >+ * the paper size as EXECUTIVE >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_EXECUTIVE = "EXECUTIVE"; >+ >+ /** >+ * <code>paperSize</code> field value indicating the paper >+ * size as Custom. When this field is specified, the values >+ * for <code>customPaperHeight</code> and <code>customPaperWidth</code> >+ * are required to create a custom paper size and optionally, >+ * <code>customPaperName</code> <code>customPaperDisplayName</code>. >+ * >+ * Note that customPaperHeight and customPaperWidth are ignored >+ * when the field has not specified this value. >+ * >+ * @since 3.6 >+ */ >+ public static final String PAPER_CUSTOM = "CUSTOM"; >+ >+ /** > * private, platform-specific data > * On Windows, this contains a copy of the DEVMODE struct > * returned from the <code>PrintDialog</code>. >@@ -158,7 +362,7 @@ > * This field is not currently used on the X/Window System. > */ > byte [] otherData; >- >+ > /** > * Constructs an instance of this class that can be > * used to print to the default printer. >Index: Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java,v >retrieving revision 1.38 >diff -u -r1.38 PrintDialog.java >--- Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java 4 Feb 2010 17:28:55 -0000 1.38 >+++ Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java 10 Feb 2010 15:48:01 -0000 >@@ -302,8 +302,9 @@ > //TODO: Not currently implemented. May need new API. For now, disable 'Current' in the dialog. (see gtk bug 344519) > OS.gtk_print_unix_dialog_set_current_page(handle, -1); > >- OS.gtk_print_unix_dialog_set_manual_capabilities(handle, >- OS.GTK_PRINT_CAPABILITY_COLLATE | OS.GTK_PRINT_CAPABILITY_COPIES | OS.GTK_PRINT_CAPABILITY_PAGE_SET); >+ OS.gtk_print_unix_dialog_set_manual_capabilities(handle, OS.GTK_PRINT_CAPABILITY_COLLATE | OS.GTK_PRINT_CAPABILITY_COPIES | >+ OS.GTK_PRINT_CAPABILITY_PAGE_SET | OS.GTK_PRINT_CAPABILITY_SCALE | OS.GTK_PRINT_CAPABILITY_NUMBER_UP | >+ OS.GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT | OS.GTK_PRINT_CAPABILITY_PREVIEW); > > /* Set state into print dialog settings. */ > int /*long*/ settings = OS.gtk_print_settings_new(); >@@ -312,6 +313,7 @@ > if (printerData.otherData != null) { > Printer.restore(printerData.otherData, settings, page_setup); > } >+ > /* Set values of print_settings and page_setup from PrinterData. */ > switch (printerData.scope) { > case PrinterData.ALL_PAGES: >@@ -329,29 +331,70 @@ > OS.gtk_print_settings_set_print_pages(settings, OS.GTK_PRINT_PAGES_ALL); > break; > } >- if (printerData.fileName != null) { >- //TODO: Should we look at printToFile, or driver/name for "Print to File", or both? (see gtk bug 345590) >- if (printerData.printToFile) { >- byte [] buffer = Converter.wcsToMbcs (null, printerData.fileName, true); >- OS.gtk_print_settings_set(settings, OS.GTK_PRINT_SETTINGS_OUTPUT_URI, buffer); >- } >- if (printerData.driver != null && printerData.name != null) { >- if (printerData.driver.equals("GtkPrintBackendFile") && printerData.name.equals("Print to File")) { //$NON-NLS-1$ //$NON-NLS-2$ >- byte [] buffer = Converter.wcsToMbcs (null, printerData.fileName, true); >- OS.gtk_print_settings_set(settings, OS.GTK_PRINT_SETTINGS_OUTPUT_URI, buffer); >- } >- } >- } >+ //TODO: printerData.printToFile always take precedence over printerData.name ? > if (printerData.printToFile) { > byte [] buffer = Converter.wcsToMbcs (null, "Print to File", true); //$NON-NLS-1$ > OS.gtk_print_settings_set_printer(settings, buffer); >+ if (printerData.fileName != null) { >+ buffer = Converter.wcsToMbcs (null, printerData.fileName, true); >+ OS.gtk_print_settings_set(settings, OS.GTK_PRINT_SETTINGS_OUTPUT_URI, buffer); >+ } >+ } else if (printerData.name != null){ >+ /* Selecting Printer */ >+ byte [] buffer = Converter.wcsToMbcs (null, printerData.name, true); >+ OS.gtk_print_settings_set_printer(settings, buffer); > } >+ /* Copy Count */ > OS.gtk_print_settings_set_n_copies(settings, printerData.copyCount); >+ /* Collate */ > OS.gtk_print_settings_set_collate(settings, printerData.collate); >+ /* Orientation */ > int orientation = printerData.orientation == PrinterData.LANDSCAPE ? OS.GTK_PAGE_ORIENTATION_LANDSCAPE : OS.GTK_PAGE_ORIENTATION_PORTRAIT; > OS.gtk_print_settings_set_orientation(settings, orientation); > OS.gtk_page_setup_set_orientation(page_setup, orientation); >- >+ /* Paper Size */ >+ int /*long*/ paperSize = 0; >+ if (printerData.paperSizeName == PrinterData.PAPER_CUSTOM) { >+ if (printerData.customPaperName == null) printerData.customPaperName = "CustomPaper"; //$NON-NLS-1$ >+ if (printerData.customPaperDisplayName == null) printerData.customPaperDisplayName = "CustomPaper"; //$NON-NLS-1$ >+ byte [] name = Converter.wcsToMbcs (null, printerData.customPaperName, true); >+ byte [] displayName = Converter.wcsToMbcs (null, printerData.customPaperDisplayName, true); >+ paperSize = OS.gtk_paper_size_new_from_ppd (name, displayName, printerData.customPaperWidth * 72, printerData.customPaperHeight * 72); //It accepts in points..so convert from inch to Points >+ } else { >+ /* >+ * Since there are numerous paper size names, it might not be possible to provide >+ * constant names for all the sizes. So, if the user selects any paperSizeName not >+ * defined in SWT, then we should be able to restore it back when the dialog is opened. >+ */ >+ String[] keys = {PrinterData.PAPER_LEGAL, PrinterData.PAPER_LETTER, PrinterData.PAPER_A2, PrinterData.PAPER_A4, >+ PrinterData.PAPER_A5, PrinterData.PAPER_A6, PrinterData.PAPER_B5, PrinterData.PAPER_JB5, PrinterData.PAPER_EXECUTIVE}; >+ String[] values = {"na_legal", "na_letter", "iso_a2", "iso_a4", >+ "iso_a5", "iso_a6", "iso_b5", "jis_b5", "na_executive"}; //$NON-NLS-1$ >+ int index; >+ for (index = 0; index < keys.length; index++) { >+ if (printerData.paperSizeName.equals(keys[index])) break; >+ } >+ byte [] buffer; >+ if (index < keys.length) { >+ buffer = Converter.wcsToMbcs (null, values[index], true); >+ } else { >+ buffer = Converter.wcsToMbcs (null, printerData.paperSizeName, true); >+ } >+ paperSize = OS.gtk_paper_size_new(buffer); >+ } >+ OS.gtk_page_setup_set_paper_size (page_setup, paperSize); >+ OS.gtk_paper_size_free(paperSize); >+ /* Pages Per Side */ >+ OS.gtk_print_settings_set_number_up (settings, printerData.pagesPerSide); >+ /* Duplex */ >+ OS.gtk_print_settings_set_duplex (settings, printerData.duplex - 1); >+ /* Scale */ >+ OS.gtk_print_settings_set_scale (settings, printerData.scale); >+ /* display Orientation and Paper size fields */ >+ if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { >+ OS.gtk_print_unix_dialog_set_embed_page_setup(handle, true); >+ } >+ > OS.gtk_print_unix_dialog_set_settings(handle, settings); > OS.gtk_print_unix_dialog_set_page_setup(handle, page_setup); > OS.g_object_unref(settings); >@@ -417,16 +460,25 @@ > > data.printToFile = data.name.equals("Print to File"); //$NON-NLS-1$ > if (data.printToFile) { >- int /*long*/ address = OS.gtk_print_settings_get(settings, OS.GTK_PRINT_SETTINGS_OUTPUT_URI); >- int length = OS.strlen (address); >- byte [] buffer = new byte [length]; >- OS.memmove (buffer, address, length); >- data.fileName = new String (Converter.mbcsToWcs (null, buffer)); >+ data.fileName = getString (OS.gtk_print_settings_get(settings, OS.GTK_PRINT_SETTINGS_OUTPUT_URI)); > } > > data.copyCount = OS.gtk_print_settings_get_n_copies(settings); > data.collate = OS.gtk_print_settings_get_collate(settings); > data.orientation = OS.gtk_page_setup_get_orientation(page_setup) == OS.GTK_PAGE_ORIENTATION_LANDSCAPE ? PrinterData.LANDSCAPE : PrinterData.PORTRAIT; >+ data.scale = OS.gtk_print_settings_get_scale(settings); >+ data.duplex = OS.gtk_print_settings_get_duplex(settings) + 1; >+ >+ int /*long*/ paper_size = OS.gtk_page_setup_get_paper_size(page_setup); >+ if (OS.gtk_paper_size_is_custom(paper_size)) { >+ data.paperSizeName = PrinterData.PAPER_CUSTOM; >+ data.customPaperHeight = OS.gtk_paper_size_get_height (paper_size, OS.GTK_UNIT_INCH); >+ data.customPaperWidth = OS.gtk_paper_size_get_width (paper_size, OS.GTK_UNIT_INCH); >+ data.customPaperName = getString (OS.gtk_paper_size_get_name(paper_size)); >+ data.customPaperDisplayName = getString (OS.gtk_paper_size_get_display_name(paper_size)); >+ } else { >+ data.paperSizeName = getString (OS.gtk_paper_size_get_name(paper_size)); >+ } > > /* Save other print_settings data as key/value pairs in otherData. */ > Callback printSettingsCallback = new Callback(this, "GtkPrintSettingsFunc", 3); //$NON-NLS-1$ >@@ -441,18 +493,19 @@ > /* Save page_setup data as key/value pairs in otherData. > * Note that page_setup properties must be stored and restored in the same order. > */ >- store("orientation", OS.gtk_page_setup_get_orientation(page_setup)); //$NON-NLS-1$ > store("top_margin", OS.gtk_page_setup_get_top_margin(page_setup, OS.GTK_UNIT_MM)); //$NON-NLS-1$ > store("bottom_margin", OS.gtk_page_setup_get_bottom_margin(page_setup, OS.GTK_UNIT_MM)); //$NON-NLS-1$ > store("left_margin", OS.gtk_page_setup_get_left_margin(page_setup, OS.GTK_UNIT_MM)); //$NON-NLS-1$ > store("right_margin", OS.gtk_page_setup_get_right_margin(page_setup, OS.GTK_UNIT_MM)); //$NON-NLS-1$ >- int /*long*/ paper_size = OS.gtk_page_setup_get_paper_size(page_setup); //$NON-NLS-1$ >- storeBytes("paper_size_name", OS.gtk_paper_size_get_name(paper_size)); //$NON-NLS-1$ >- storeBytes("paper_size_display_name", OS.gtk_paper_size_get_display_name(paper_size)); //$NON-NLS-1$ >- storeBytes("paper_size_ppd_name", OS.gtk_paper_size_get_ppd_name(paper_size)); //$NON-NLS-1$ >- store("paper_size_width", OS.gtk_paper_size_get_width(paper_size, OS.GTK_UNIT_MM)); //$NON-NLS-1$ >- store("paper_size_height", OS.gtk_paper_size_get_height(paper_size, OS.GTK_UNIT_MM)); //$NON-NLS-1$ >- store("paper_size_is_custom", OS.gtk_paper_size_is_custom(paper_size)); //$NON-NLS-1$ >+ store ("reverse",OS.gtk_print_settings_get_reverse (settings)); //$NON-NLS-1$ >+ store ("color_mode", OS.gtk_print_settings_get_use_color (settings)); //$NON-NLS-1$ >+ store ("print_quality",OS.gtk_print_settings_get_quality (settings)); //$NON-NLS-1$ >+ if (!data.printToFile) { >+ storeBytes ("paper_source", OS.gtk_print_settings_get_default_source (settings)); //$NON-NLS-1$ >+ storeBytes ("media_type", OS.gtk_print_settings_get_media_type (settings)); //$NON-NLS-1$ >+ storeBytes ("output_bin", OS.gtk_print_settings_get_output_bin (settings)); //$NON-NLS-1$ >+ } >+ > data.otherData = settingsData; > OS.g_object_unref(settings); > printerData = data; >@@ -475,6 +528,13 @@ > return 0; > } > >+String getString (int /*long*/ stringPtr) { >+ int strLength = OS.strlen (stringPtr); >+ byte[] buffer = new byte [strLength]; >+ OS.memmove (buffer, stringPtr, strLength); >+ return new String (Converter.mbcsToWcs (null, buffer)); >+} >+ > void store(String key, int value) { > store(key, String.valueOf(value)); > } >Index: Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java,v >retrieving revision 1.41 >diff -u -r1.41 Printer.java >--- Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java 1 Jul 2009 14:50:53 -0000 1.41 >+++ Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java 10 Feb 2010 15:48:01 -0000 >@@ -67,6 +67,28 @@ > static boolean disablePrinting = System.getProperty("org.eclipse.swt.internal.gtk.disablePrinting") != null; //$NON-NLS-1$ > > /** >+ * Returns an array of String objects representing all paper >+ * size names supported by printers on the platform. >+ * >+ * @return a string array containing paper size names >+ */ >+public static String[] getPaperSizeList () { >+ int /*long*/ list = OS.gtk_paper_size_get_paper_sizes (true); >+ int count = OS.g_list_length(list); >+ String[] result = new String[count]; >+ for (int i=0; i<count; i++) { >+ int /*long*/ paper = OS.g_list_nth_data(list, i); >+ int /*long*/ paperNamePtr = OS.gtk_paper_size_get_name (paper); >+ int length = OS.strlen (paperNamePtr); >+ byte [] buffer = new byte [length]; >+ OS.memmove (buffer, paperNamePtr, length); >+ result[i] = new String (Converter.mbcsToWcs (null, buffer)); >+ } >+ OS.g_list_free (list); >+ return result; >+} >+ >+/** > * Returns an array of <code>PrinterData</code> objects > * representing all available printers. If there are no > * printers, the array will be empty. >@@ -214,29 +236,16 @@ > /* Retrieve stored page_setup data. > * Note that page_setup properties must be stored (in PrintDialog) and restored (here) in the same order. > */ >- OS.gtk_page_setup_set_orientation(page_setup, restoreInt("orientation")); //$NON-NLS-1$ > OS.gtk_page_setup_set_top_margin(page_setup, restoreDouble("top_margin"), OS.GTK_UNIT_MM); //$NON-NLS-1$ > OS.gtk_page_setup_set_bottom_margin(page_setup, restoreDouble("bottom_margin"), OS.GTK_UNIT_MM); //$NON-NLS-1$ > OS.gtk_page_setup_set_left_margin(page_setup, restoreDouble("left_margin"), OS.GTK_UNIT_MM); //$NON-NLS-1$ > OS.gtk_page_setup_set_right_margin(page_setup, restoreDouble("right_margin"), OS.GTK_UNIT_MM); //$NON-NLS-1$ >- byte [] name = restoreBytes("paper_size_name", true); //$NON-NLS-1$ >- byte [] display_name = restoreBytes("paper_size_display_name", true); //$NON-NLS-1$ >- byte [] ppd_name = restoreBytes("paper_size_ppd_name", true); //$NON-NLS-1$ >- double width = restoreDouble("paper_size_width"); //$NON-NLS-1$ >- double height = restoreDouble("paper_size_height"); //$NON-NLS-1$ >- boolean custom = restoreBoolean("paper_size_is_custom"); //$NON-NLS-1$ >- int /*long*/ paper_size = 0; >- if (custom) { >- if (ppd_name.length > 0) { >- paper_size = OS.gtk_paper_size_new_from_ppd(ppd_name, display_name, width, height); >- } else { >- paper_size = OS.gtk_paper_size_new_custom(name, display_name, width, height, OS.GTK_UNIT_MM); >- } >- } else { >- paper_size = OS.gtk_paper_size_new(name); >- } >- OS.gtk_page_setup_set_paper_size(page_setup, paper_size); >- OS.gtk_paper_size_free(paper_size); >+ OS.gtk_print_settings_set_reverse (settings, restoreBoolean("reverse")); //$NON-NLS-1$ >+ OS.gtk_print_settings_set_use_color (settings, restoreBoolean("color_mode")); //$NON-NLS-1$ >+ OS.gtk_print_settings_set_quality (settings, restoreInt("print_quality")); //$NON-NLS-1$ >+ OS.gtk_print_settings_set_default_source (settings, restoreBytes("paper_source",true)); //$NON-NLS-1$ >+ OS.gtk_print_settings_set_media_type (settings, restoreBytes("media_type",true)); //$NON-NLS-1$ >+ OS.gtk_print_settings_set_output_bin (settings, restoreBytes("output_bin",true)); //$NON-NLS-1$ > } > > static DeviceData checkNull (PrinterData data) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 96394
:
158751
|
158841
|
159788
|
161015
|
161111
|
162862
|
162867