#ifndef __PDFIUM_H__ #define __PDFIUM_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include "page_wrapper.h" #include "page_object_wrapper.h" #include "document_wrapper.h" // auto generated by mkmf #include "extconf.h" extern "C" { #include "ruby.h" } #ifdef DEBUG #define DEBUG_MSG(str) do { std::cout << str << std::endl; } while( false ) #else #define DEBUG_MSG(str) do { } while ( false ) #endif void define_bookmark_class(); void define_document_class(); void define_page_class(); void define_image_class(); // a utility method to extract the reference to the FPDF_DOCUMENT from the Ruby/C++ wrapping CPDF_Page* RB2PG(VALUE RB_Page); CPDF_Document* RB2DOC(VALUE RB_DocumentWrapper); CPDF_ImageObject* RB2IMG(VALUE RB_Image); const char* PDFiumLastErrorString(); class RB { public: static VALUE PDFium(); static VALUE Bookmark(); static VALUE Document(); static VALUE Page(); static VALUE BookmarkList(); static VALUE BoundingBox(); static VALUE StringIO(); static VALUE Image(); static VALUE PageList(); static VALUE ImageList(); static VALUE type(VALUE object); static VALUE to_string(const CFX_WideString &widestring); static ID to_s(VALUE object); static VALUE get_option(VALUE hash, const std::string &key); }; #endif // __PDFIUM_H__