~openlp-core/openlp/trunk

« back to all changes in this revision

Viewing changes to openlp/plugins/presentations/lib/pptviewlib/pptviewlib.h

  • Committer: Tim Bentley
  • Author(s): Philip Ridout
  • Date: 2014-02-23 14:58:06 UTC
  • mfrom: (2300.1.16 bug1012110)
  • Revision ID: tim.bentley@gmail.com-20140223145806-xylyejndi66jwmch
The main change here is to get the PPTViewer working with unicode filenames. There have also been some other improvments in PPTViewer reliability.

Also fixed logging so that it saves the log in UTF-8 rather than the system default (1525) on my Windows VM. This was causing issues with when logging unicode.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#define DllExport extern "C"  __declspec( dllexport )
28
28
 
29
 
#define DEBUG(...)  if (debug) printf(__VA_ARGS__)
 
29
#define DEBUG(...)  if (debug) wprintf(__VA_ARGS__)
30
30
 
31
31
enum PPTVIEWSTATE {PPT_CLOSED, PPT_STARTED, PPT_OPENED, PPT_LOADED,
32
32
    PPT_CLOSING};
33
33
 
34
 
DllExport int OpenPPT(char *filename, HWND hParentWnd, RECT rect,
35
 
    char *previewPath);
 
34
DllExport int OpenPPT(wchar_t *filename, HWND hParentWnd, RECT rect,
 
35
    wchar_t *previewPath);
36
36
DllExport BOOL CheckInstalled();
37
37
DllExport void ClosePPT(int id);
38
38
DllExport int GetCurrentSlide(int id);
50
50
LRESULT CALLBACK CbtProc(int nCode, WPARAM wParam, LPARAM lParam);
51
51
LRESULT CALLBACK CwpProc(int nCode, WPARAM wParam, LPARAM lParam);
52
52
LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam);
53
 
BOOL GetPPTViewerPath(char *pptViewerPath, int stringSize);
54
 
BOOL GetPPTViewerPathFromReg(char *pptViewerPath, int stringSize);
 
53
BOOL GetPPTViewerPath(wchar_t *pptViewerPath, int stringSize);
 
54
BOOL GetPPTViewerPathFromReg(wchar_t *pptViewerPath, int stringSize);
55
55
HBITMAP CaptureWindow(HWND hWnd);
56
 
VOID SaveBitmap(CHAR* filename, HBITMAP hBmp) ;
57
 
VOID CaptureAndSaveWindow(HWND hWnd, CHAR* filename);
 
56
VOID SaveBitmap(wchar_t* filename, HBITMAP hBmp) ;
 
57
VOID CaptureAndSaveWindow(HWND hWnd, wchar_t* filename);
58
58
BOOL GetPPTInfo(int id);
59
59
BOOL SavePPTInfo(int id);
60
60
void Unhook(int id);
80
80
    int lastSlideSteps;
81
81
    int steps;
82
82
    int guess;
83
 
    char filename[MAX_PATH];
84
 
    char previewPath[MAX_PATH];
 
83
    wchar_t filename[MAX_PATH];
 
84
    wchar_t previewPath[MAX_PATH];
85
85
    int slideNos[MAX_SLIDES];
86
86
    PPTVIEWSTATE state;
87
87
};