1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * Copyright (C) 2016 Mopria Alliance, Inc. 4 * Copyright (C) 2013 Hewlett-Packard Development Company, L.P. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 #ifdef __cplusplus 20 extern "C" 21 { 22 #endif 23 24 #ifdef __DEFINE_WPRINT_PLATFORM_TYPES__ 25 26 #include <setjmp.h> 27 28 #ifndef TRUE 29 #define TRUE 1 30 #endif 31 32 #ifndef FALSE 33 #define FALSE 0 34 #endif 35 36 /* 37 * Define general data used by image decoders 38 */ 39 typedef struct { 40 const char *urlPath; 41 unsigned int page; 42 43 // PDF data 44 struct { 45 void *bitmap_ptr; 46 void *fz_context_ptr; 47 void *fz_doc_ptr; 48 void *fz_page_ptr; 49 void *fz_pixmap_ptr; 50 } pdf_info; 51 } decoder_data_t; 52 53 #endif // __DEFINE_WPRINT_PLATFORM_TYPES__ 54 55 #ifdef __DEFINE_WPRINT_PLATFORM_METHODS__ 56 int wprint_image_init(wprint_image_info_t *image_info, const char *urlPath, int pageNum); 57 #endif // __DEFINE_WPRINT_PLATFORM_METHODS__ 58 59 #ifdef __cplusplus 60 } 61 #endif