gnu.x11.extension
Class Print

java.lang.Object
  extended by gnu.x11.extension.Extension
      extended by gnu.x11.extension.Print
All Implemented Interfaces:
ErrorFactory, EventFactory

public class Print
extends Extension
implements ErrorFactory, EventFactory

X Print Service Extension. The specification can be found here (protocol; server).


Nested Class Summary
 class Print.AttributeNotifyEvent
          PRINT attribute notify event.
 class Print.Context
           
 class Print.Printer
          Reply of printer_list(String).
 class Print.PrintNotifyEvent
          PRINT print notify event.
 
Field Summary
static int CLIENT_MAJOR_VERSION
           
static int CLIENT_MINOR_VERSION
           
static java.lang.String[] ERROR_STRINGS
           
static int GET_DATA
           
 java.lang.String locale
           
static java.lang.String[] MINOR_OPCODE_STRINGS
           
 int server_major_version
           
 int server_minor_version
           
static int SPOOL
           
 
Fields inherited from class gnu.x11.extension.Extension
display, first_error, first_event, major_opcode, name
 
Constructor Summary
Print(Display display)
           
 
Method Summary
 Error build(Display display, int code, int seq_no, int bad, int minor_opcode, int major_opcode)
           
 Event build(Display display, ResponseInputStream i, int code)
           
 Print.Context context()
           
 Print.Context create_context(java.lang.String name)
          Create print context.
 void end_doc()
           
 void end_doc(boolean cancel)
           
 void end_job()
           
 void end_job(boolean cancel)
           
 void end_page()
           
 void end_page(boolean cancel)
           
 java.lang.String more_string()
          Additional information such as client version and server version to display in toString().
 Print.Printer[] printer_list()
           
 Print.Printer[] printer_list(java.lang.String name)
           
 void rehash_printer_list()
           
 Window[] screens()
           
 void start_doc(int type)
           
 void start_job(int output_mode)
           
 void start_page(Window window)
           
 
Methods inherited from class gnu.x11.extension.Extension
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MINOR_OPCODE_STRINGS

public static final java.lang.String[] MINOR_OPCODE_STRINGS

CLIENT_MAJOR_VERSION

public static final int CLIENT_MAJOR_VERSION
See Also:
Constant Field Values

CLIENT_MINOR_VERSION

public static final int CLIENT_MINOR_VERSION
See Also:
Constant Field Values

locale

public java.lang.String locale

server_major_version

public int server_major_version

server_minor_version

public int server_minor_version

SPOOL

public static final int SPOOL
See Also:
Constant Field Values

GET_DATA

public static final int GET_DATA
See Also:
Constant Field Values

ERROR_STRINGS

public static final java.lang.String[] ERROR_STRINGS
Constructor Detail

Print

public Print(Display display)
      throws NotFoundException
Throws:
NotFoundException
See Also:
XpQueryVersion
Method Detail

printer_list

public Print.Printer[] printer_list(java.lang.String name)
Returns:
valid: Enum#next()
See Also:
XpGetPrinterList

context

public Print.Context context()
See Also:
XpGetContext

start_job

public void start_job(int output_mode)
Parameters:
output_mode - valid: SPOOL, GET_DATA
See Also:
XpStartJob

end_job

public void end_job(boolean cancel)
See Also:
XpEndJob

start_doc

public void start_doc(int type)
See Also:
XpStartDoc

end_doc

public void end_doc(boolean cancel)
See Also:
XpEndDoc

start_page

public void start_page(Window window)
See Also:
XpStartPage

end_page

public void end_page(boolean cancel)
See Also:
XpEndPage

rehash_printer_list

public void rehash_printer_list()
See Also:
XpRehashPrinterList

screens

public Window[] screens()
Returns:
valid: Enum#next() of type Window, Enum#next4()
See Also:
XpQueryScreens

build

public Error build(Display display,
                   int code,
                   int seq_no,
                   int bad,
                   int minor_opcode,
                   int major_opcode)
Specified by:
build in interface ErrorFactory

build

public Event build(Display display,
                   ResponseInputStream i,
                   int code)
Specified by:
build in interface EventFactory

create_context

public Print.Context create_context(java.lang.String name)
Create print context.

Parameters:
name - if zero-length, default (first) printer name is used
See Also:
Print.Context

end_doc

public void end_doc()
See Also:
end_doc(boolean)

end_job

public void end_job()
See Also:
end_job(boolean)

end_page

public void end_page()
See Also:
end_page(boolean)

more_string

public java.lang.String more_string()
Description copied from class: Extension
Additional information such as client version and server version to display in toString().

Overrides:
more_string in class Extension

printer_list

public Print.Printer[] printer_list()
See Also:
printer_list(String)