/Users/ericb/Desktop/NATIVEPRINTDLG01/extensions/source/scanner/twain.hxx

Go to the documentation of this file.
00001 /*************************************************************************
00002  *
00003  *  OpenOffice.org - a multi-platform office productivity suite
00004  *
00005  *  $RCSfile: twain.hxx,v $
00006  *
00007  *  $Revision: 1.2 $
00008  *
00009  *  last change: $Author: rt $ $Date: 2005/09/08 20:40:02 $
00010  *
00011  *  The Contents of this file are made available subject to
00012  *  the terms of GNU Lesser General Public License Version 2.1.
00013  *
00014  *
00015  *    GNU Lesser General Public License Version 2.1
00016  *    =============================================
00017  *    Copyright 2005 by Sun Microsystems, Inc.
00018  *    901 San Antonio Road, Palo Alto, CA 94303, USA
00019  *
00020  *    This library is free software; you can redistribute it and/or
00021  *    modify it under the terms of the GNU Lesser General Public
00022  *    License version 2.1, as published by the Free Software Foundation.
00023  *
00024  *    This library is distributed in the hope that it will be useful,
00025  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00026  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00027  *    Lesser General Public License for more details.
00028  *
00029  *    You should have received a copy of the GNU Lesser General Public
00030  *    License along with this library; if not, write to the Free Software
00031  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00032  *    MA  02111-1307  USA
00033  *
00034  ************************************************************************/
00035 
00036 #ifndef _TWAIN_HXX
00037 #define _TWAIN_HXX
00038 
00039 #include <vos/module.hxx>
00040 #include <vcl/bitmap.hxx>
00041 #include "twain/twain.h"
00042 
00043 
00044 // -----------
00045 // - Defines -
00046 // -----------
00047 
00048 #define TWAIN_SELECT                    0x00000001UL
00049 #define TWAIN_ACQUIRE                   0x00000002UL
00050 #define TWAIN_TERMINATE                 0xFFFFFFFFUL
00051 
00052 #define TWAIN_EVENT_NONE                0x00000000UL
00053 #define TWAIN_EVENT_QUIT                0x00000001UL
00054 #define TWAIN_EVENT_SCANNING    0x00000002UL
00055 #define TWAIN_EVENT_XFER                0x00000004UL
00056 
00057 // ------------
00058 // - ImpTwain -
00059 // ------------
00060 
00061 class ImpTwain
00062 {
00063         TW_IDENTITY                                     aAppIdent;
00064         TW_IDENTITY                                     aSrcIdent;
00065         Link                                            aNotifyLink;
00066         Bitmap                                          aBitmap;
00067         DSMENTRYPROC                            pDSM;
00068         NAMESPACE_VOS( OModule )*       pMod;
00069         ULONG                                           nCurState;
00070 
00071         void                                            ImplCreate();
00072         void                                            ImplOpenSourceManager();
00073         void                                            ImplOpenSource();
00074         BOOL                                            ImplEnableSource();
00075         void                                            ImplXfer();
00076         void                                            ImplFallback( ULONG nEvent );
00077 
00078                                                                 DECL_LINK( ImplFallbackHdl, void* );
00079                                                                 DECL_LINK( ImplDestroyHdl, void* );
00080 
00081 public:
00082 
00083         BOOL                                            ImplHandleMsg( void* pMsg );
00084 
00085 #ifdef OS2
00086         HAB                                                     hAB;
00087         HWND                                            hTwainWnd;
00088         long                                            hTwainHook;
00089 #else
00090         HWND                                            hTwainWnd;
00091         HHOOK                                           hTwainHook;
00092 #endif
00093 
00094 public:
00095 
00096                                                                 ImpTwain( const Link& rNotifyLink );
00097                                                                 ~ImpTwain();
00098 
00099         void                                            Destroy();
00100 
00101         BOOL                                            SelectSource();
00102         BOOL                                            InitXfer();
00103         Bitmap                                          GetXferBitmap();
00104 };
00105 
00106 #endif // _TWAIN_HXX

Generated on Thu Feb 28 17:53:27 2008 for AquaScanner by  doxygen 1.5.1