Difference between revisions of "Mac OS X Porting - Native Printing"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (PrintDialog class)
m (PrintDialog class)
Line 61: Line 61:
 
The current implementation uses this class to draw the print dialog. In our Aqua native implementation, we want to use the on provided by Carbon API. To achieve this, we want to know the functionality of this class, and let carbon manage the functionality maybe at this level or maybe in a other lever (higher or lower). We also need to know how this class provides information to the Printer instance.
 
The current implementation uses this class to draw the print dialog. In our Aqua native implementation, we want to use the on provided by Carbon API. To achieve this, we want to know the functionality of this class, and let carbon manage the functionality maybe at this level or maybe in a other lever (higher or lower). We also need to know how this class provides information to the Printer instance.
  
The header of this class is located in svtools/source/dialogs/printdlg.hxx
+
* The header of this class is located in svtools/source/dialogs/printdlg.hxx
 
+
* The implementation of this class is located in svtools/source/dialogs/printdlg.cxx
The implementation of this class is located in svtools/source/dialogs/printdlg.cxx
+
  
 
TODO : details the implementation of this class
 
TODO : details the implementation of this class

Revision as of 20:54, 8 October 2006

This page is dedicated to the native printing implementation in OpenOffice.org for Mac OS X

OpenOffice.org side

This part describes what can be found in the OOo APIs, how it is implemented and how it will be changed.

Concerned OOo modules

  • psprint
  • vcl
  • svtools

VCL

What we know about vcl.

SalPrinter class

SalPrinter is a virtual class intended for managing print jobs. It is composed of virtual fonctions, and a dummy constructor. This class is inherited by PspSalPrinter, WinSalPrinter, and of course by AquaSalPrinter (see AquaSalPrinter class).

   class VCL_DLLPUBLIC SalPrinter
   {
   public: // public for Sal Implementation
       SalPrinter() {}
       virtual ~SalPrinter();
       virtual BOOL StartJob( const XubString* pFileName,
                                       const XubString& rJobName,
                                       const XubString& rAppName,
                                       ULONG nCopies, BOOL bCollate,
                                       ImplJobSetup* pSetupData ) = 0;
       virtual BOOL EndJob() = 0;
       virtual BOOL AbortJob() = 0;
       virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) = 0;
       virtual BOOL EndPage() = 0;
       virtual ULONG GetErrorCode() = 0;
   };

PspSalPrinter class

PspSalPrinter means PostScript Print System Abstraction Layer Printer. Its implementation is located. As the name suggests it relies on features psprint module.

TODO : Discuss about PspSalPrinter implementation.

AquaSalPrinter class

AquaSalPrinter class is located in vcl/aqua/source/gdi/salprn.cxx

Headers are in :

vcl/inc/salinst.hxx  
vcl/inc/salgdi.hxx    
vcl/inc/salprn.hxx
Aqua implementation :
vcl/aqua/inc/salprn.h  (AquaSalPrinter class implementation, inherits from SalPrinter)

psprint

What we know about psprint.

svtools

What we need to know about svtools

PrintDialog class

This class is responsible for drawing the print dialog we usaually view when we choose the Print option of the File menu. The current implementation uses this class to draw the print dialog. In our Aqua native implementation, we want to use the on provided by Carbon API. To achieve this, we want to know the functionality of this class, and let carbon manage the functionality maybe at this level or maybe in a other lever (higher or lower). We also need to know how this class provides information to the Printer instance.

  • The header of this class is located in svtools/source/dialogs/printdlg.hxx
  • The implementation of this class is located in svtools/source/dialogs/printdlg.cxx

TODO : details the implementation of this class

Mac OS X API side

This part describes what can be used and how we inted to use it.

Todo : implement missing methods, using Carbon API

Links

Link for Mac OS X API documentation

http://developer.apple.com/documentation/Carbon/Reference/CarbonPrintingManager_Ref/index.html

Starting point for documentation

http://developer.apple.com/documentation/Carbon/Printing-date.html#//apple_ref/doc/uid/TP30000440-TP30000420-TP30000455 http://developer.apple.com/documentation/Carbon/Conceptual/CPM_Concepts/cpm_chap4/chapter_4_section_1.html

This work is part of http://wiki.services.openoffice.org/wiki/Mac_OS_X_Porting_-_Work_Areas/Todo%27s

Created: Ericb 19:33, 4 June 2006 (CEST) Last modification: Ericb 11:00, 3 September 2006 (CEST)

Personal tools