Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: samples/pdfium_test.cc

Issue 1554363002: Make FPDF_WIDESTRING work regardless of endianness. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> 5 #include <limits.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 FPDF_RenderPage(dc, page, 0, 0, width, height, 0, 190 FPDF_RenderPage(dc, page, 0, 0, width, height, 0,
191 FPDF_ANNOT | FPDF_PRINTING | FPDF_NO_CATCH); 191 FPDF_ANNOT | FPDF_PRINTING | FPDF_NO_CATCH);
192 192
193 DeleteEnhMetaFile(CloseEnhMetaFile(dc)); 193 DeleteEnhMetaFile(CloseEnhMetaFile(dc));
194 } 194 }
195 #endif 195 #endif
196 196
197 int ExampleAppAlert(IPDF_JSPLATFORM*, FPDF_WIDESTRING msg, FPDF_WIDESTRING, 197 int ExampleAppAlert(IPDF_JSPLATFORM*, FPDF_WIDESTRING msg, FPDF_WIDESTRING,
198 int, int) { 198 int, int) {
199 std::wstring platform_string = GetWideString(msg); 199 std::wstring platform_string = GetPlatformWString(msg);
200 printf("Alert: %ls\n", platform_string.c_str()); 200 printf("Alert: %ls\n", platform_string.c_str());
201 return 0; 201 return 0;
202 } 202 }
203 203
204 void ExampleDocGotoPage(IPDF_JSPLATFORM*, int pageNumber) { 204 void ExampleDocGotoPage(IPDF_JSPLATFORM*, int pageNumber) {
205 printf("Goto Page: %d\n", pageNumber); 205 printf("Goto Page: %d\n", pageNumber);
206 } 206 }
207 207
208 void ExampleUnsupportedHandler(UNSUPPORT_INFO*, int type) { 208 void ExampleUnsupportedHandler(UNSUPPORT_INFO*, int type) {
209 std::string feature = "Unknown"; 209 std::string feature = "Unknown";
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 } 598 }
599 599
600 FPDF_DestroyLibrary(); 600 FPDF_DestroyLibrary();
601 #ifdef PDF_ENABLE_V8 601 #ifdef PDF_ENABLE_V8
602 v8::V8::ShutdownPlatform(); 602 v8::V8::ShutdownPlatform();
603 delete platform; 603 delete platform;
604 #endif // PDF_ENABLE_V8 604 #endif // PDF_ENABLE_V8
605 605
606 return 0; 606 return 0;
607 } 607 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698