summaryrefslogtreecommitdiff
path: root/vcl/os2/inc
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-09-20 15:03:31 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-09-20 15:03:31 +0000
commit1fed2d0e4990f393886d3992601bc59f58ca6de9 (patch)
tree08b62b98fcb85c6f6541e661e3e128e9c5b18667 /vcl/os2/inc
parente1094d5d75573254cf1a1fb487da72abfed31036 (diff)
INTEGRATION: CWS os2port01 (1.2.2); FILE ADDED
2006/11/29 14:33:56 ydario 1.2.2.1: Initial OS/2 import.
Diffstat (limited to 'vcl/os2/inc')
-rw-r--r--vcl/os2/inc/salobj.h110
-rw-r--r--vcl/os2/inc/salprn.h184
2 files changed, 294 insertions, 0 deletions
diff --git a/vcl/os2/inc/salobj.h b/vcl/os2/inc/salobj.h
new file mode 100644
index 000000000000..3f2537328e71
--- /dev/null
+++ b/vcl/os2/inc/salobj.h
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * $RCSfile: salobj.h,v $
+ *
+ * $Revision: 1.3 $
+ *
+ * last change: $Author: vg $ $Date: 2007-09-20 16:03:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALOBJ_H
+#define _SV_SALOBJ_H
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+#ifndef _SV_SYSDATA_HXX
+#include <sysdata.hxx>
+#endif
+#ifndef _SV_SALOBJ_HXX
+#include <salobj.hxx>
+#endif
+
+// -----------------
+// - SalObjectData -
+// -----------------
+
+class Os2SalObject : public SalObject
+{
+public:
+ HWND mhWnd; // Window handle
+ HWND mhWndChild; // Child Window handle
+ HWND mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte
+ SystemChildData maSysData; // SystemEnvData
+ HWND mhLastClipWnd; // LastClip-Window
+ HWND mhOldLastClipWnd; // LastClip-Window befor BeginSetClipRegion
+ long mnHeight; // Fenster-Hoehe fuer Positionsumrechnung
+ Os2SalObject* mpNextObject; // pointer to next object
+ void* mpInst; // instance handle for callback
+ SALOBJECTPROC mpProc; // callback proc
+
+ Os2SalObject();
+ virtual ~Os2SalObject();
+
+ virtual void ResetClipRegion();
+ virtual USHORT GetClipRegionType();
+ virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void EndSetClipRegion();
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
+ virtual void Show( BOOL bVisible );
+ virtual void Enable( BOOL nEnable );
+ virtual void GrabFocus();
+ virtual void SetBackground();
+ virtual void SetBackground( SalColor nSalColor );
+ virtual const SystemEnvData* GetSystemData() const;
+};
+
+#endif // _SV_SALOBJ_H
diff --git a/vcl/os2/inc/salprn.h b/vcl/os2/inc/salprn.h
new file mode 100644
index 000000000000..0446eab8534f
--- /dev/null
+++ b/vcl/os2/inc/salprn.h
@@ -0,0 +1,184 @@
+/*************************************************************************
+ *
+ * $RCSfile: salprn.h,v $
+ *
+ * $Revision: 1.3 $
+ *
+ * last change: $Author: vg $ $Date: 2007-09-20 16:03:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALPRN_H
+#define _SV_SALPRN_H
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+
+#ifndef _SV_SALPRN_HXX
+#include <salprn.hxx>
+#endif
+
+class SalGraphics;
+class SalInfoPrinter;
+
+struct ImplFormInfo;
+typedef ImplFormInfo* PIMPLFORMINFO;
+struct ImplTrayInfo;
+typedef ImplTrayInfo* PIMPLTRAYINFO;
+
+// ----------------------
+// - SalInfoPrinterData -
+// ----------------------
+
+//class SalInfoPrinterData
+class Os2SalInfoPrinter : public SalInfoPrinter
+{
+public:
+ Os2SalGraphics* mpGraphics; // Graphics
+ HDC mhDC; // printer hdc
+ HPS mhPS; // printer hps
+ ByteString maPrinterName; // pszPrinters
+ ByteString maName; // pszName bzw. LogAdress
+ ByteString maDriverName; // pszDriverName nach .
+ ByteString maDeviceName; // pszDriverName bis .
+ ByteString maJobSetupDeviceName; // DeviceName aus pDriverData
+ PIMPLFORMINFO* mpFormArray; // PaperForm-Names
+ USHORT mnFormCount; // PaperForm-Count
+ PIMPLTRAYINFO* mpTrayArray; // PaperTray-Names
+ USHORT mnTrayCount; // PaperTray-Count
+ BOOL mbDJPSupported; // is driver DJP enabled
+ BOOL mbGraphics; // is Graphics used
+
+public:
+ Os2SalInfoPrinter();
+ virtual ~Os2SalInfoPrinter();
+
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
+ virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
+ virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData );
+ virtual void GetPageInfo( const ImplJobSetup* pSetupData,
+ long& rOutWidth, long& rOutHeight,
+ long& rPageOffX, long& rPageOffY,
+ long& rPageWidth, long& rPageHeight );
+ virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType );
+ virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData );
+ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
+ virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
+ virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
+ virtual DuplexMode GetDuplexMode( const ImplJobSetup* pSetupData );
+};
+
+// ------------------
+// - SalPrinterData -
+// ------------------
+
+class SalPrinterData00
+{
+public:
+ Os2SalGraphics* mpGraphics; // current Printer graphics
+ SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
+ HDC mhDC; // printer hdc
+ HPS mhPS; // printer hps
+ ULONG mnError; // Error Code
+ BOOL mbFirstPage; // IsFirstPage
+ BOOL mbAbort; // JobAborted
+ BOOL mbPrintDJPSupported; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
+ char maCommentBuf[33]; // Comment
+ char maCopyBuf[10]; // Kopien
+};
+
+// -----------------
+// - Os2SalPrinter -
+// -----------------
+
+class Os2SalPrinter : public SalPrinter
+{
+public:
+ Os2SalGraphics* mpGraphics; // current Printer graphics
+ Os2SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
+ Os2SalPrinter* mpNextPrinter; // next printing printer
+ HDC mhDC; // printer hdc
+ HPS mhPS; // printer hps
+ ULONG mnError; // Error Code
+ BOOL mbFirstPage; // IsFirstPage
+ BOOL mbAbort; // JobAborted
+ BOOL mbPrintDJPSupported; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
+ char maCommentBuf[33]; // Comment
+ char maCopyBuf[16]; // Kopien
+ //HDC mhDC; // printer hdc
+ //ULONG mnError; // Error Code
+ //ULONG mnCopies; // Kopien
+ //BOOL mbCollate; // Sortierte Kopien
+ //BOOL mbAbort; // Job Aborted
+
+public:
+ Os2SalPrinter();
+ virtual ~Os2SalPrinter();
+
+ virtual BOOL StartJob( const XubString* pFileName,
+ const XubString& rJobName,
+ const XubString& rAppName,
+ ULONG nCopies, BOOL bCollate,
+ ImplJobSetup* pSetupData );
+ virtual BOOL EndJob();
+ virtual BOOL AbortJob();
+ virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData );
+ virtual BOOL EndPage();
+ virtual ULONG GetErrorCode();
+};
+
+#endif // _SV_SALPRN_H