From 0de3169c52435458583955ac03fc57516d5d372e Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 4 Apr 2013 16:35:59 +0100 Subject: Fix for merge of golden commits as well as initial attempt at html viewing. Issues exist though in the xaml WebView object used in the windows UI. --- fitz/base_time.c | 14 ++++-- winRT/libmupdf_winRT.vcxproj | 2 + winRT/libmupdf_winRT.vcxproj.filters | 6 +++ winRT/winapp/Common/StandardStyles.xaml | 11 +++-- winRT/winapp/MainPage.xaml | 12 ++++- winRT/winapp/MainPage.xaml.cpp | 85 +++++++++++++++++++++++++++++++++ winRT/winapp/MainPage.xaml.h | 7 ++- 7 files changed, 128 insertions(+), 9 deletions(-) diff --git a/fitz/base_time.c b/fitz/base_time.c index 8bdd6977..c0d6a8c0 100644 --- a/fitz/base_time.c +++ b/fitz/base_time.c @@ -1,4 +1,4 @@ -#if defined(_WIN32) && !defined(_WINRT) +#if defined(_WIN32) #include #ifndef METRO @@ -13,6 +13,12 @@ #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL #endif +#if defined(_WINRT) + +void fz_gettimeofday_dummy() { } + +#else + struct timeval; int gettimeofday(struct timeval *tv, struct timezone *tz) @@ -38,6 +44,8 @@ int gettimeofday(struct timeval *tv, struct timezone *tz) return 0; } +#endif + FILE *fopen_utf8(const char *name, const char *mode) { wchar_t *wname, *wmode, *d; @@ -45,7 +53,7 @@ FILE *fopen_utf8(const char *name, const char *mode) int c; FILE *file; - d = wname = malloc((strlen(name)+1) * sizeof(wchar_t)); + d = wname = (wchar_t*) malloc((strlen(name)+1) * sizeof(wchar_t)); if (d == NULL) return NULL; s = name; @@ -54,7 +62,7 @@ FILE *fopen_utf8(const char *name, const char *mode) *d++ = c; } *d = 0; - d = wmode = malloc((strlen(mode)+1) * sizeof(wchar_t)); + d = wmode = (wchar_t*) malloc((strlen(mode)+1) * sizeof(wchar_t)); if (d == NULL) { free(wname); diff --git a/winRT/libmupdf_winRT.vcxproj b/winRT/libmupdf_winRT.vcxproj index 29302301..5f93acb5 100644 --- a/winRT/libmupdf_winRT.vcxproj +++ b/winRT/libmupdf_winRT.vcxproj @@ -91,6 +91,7 @@ + @@ -112,6 +113,7 @@ + diff --git a/winRT/libmupdf_winRT.vcxproj.filters b/winRT/libmupdf_winRT.vcxproj.filters index 6845a9fb..359f4908 100644 --- a/winRT/libmupdf_winRT.vcxproj.filters +++ b/winRT/libmupdf_winRT.vcxproj.filters @@ -342,6 +342,12 @@ xps + + pdf + + + fitz + diff --git a/winRT/winapp/Common/StandardStyles.xaml b/winRT/winapp/Common/StandardStyles.xaml index 5d59c0a4..cae5dc9e 100644 --- a/winRT/winapp/Common/StandardStyles.xaml +++ b/winRT/winapp/Common/StandardStyles.xaml @@ -449,9 +449,14 @@ - - - + + + +