00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* 00003 * This file is part of the libe-book project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 */ 00009 00010 #ifndef LIBEBOOK_LIBCSS_H_INCLUDED 00011 #define LIBEBOOK_LIBCSS_H_INCLUDED 00012 00013 #include <boost/intrusive_ptr.hpp> 00014 #include <boost/shared_ptr.hpp> 00015 00016 #pragma GCC diagnostic ignored "-Wpedantic" 00017 #include <libcss/libcss.h> 00018 00019 namespace libebook 00020 { 00021 00022 typedef boost::shared_ptr<css_stylesheet> CSSStylesheetPtr_t; 00023 typedef boost::shared_ptr<css_select_ctx> CSSSelectCtxPtr_t; 00024 typedef boost::shared_ptr<css_select_results> CSSSelectResultsPtr_t; 00025 00026 typedef boost::intrusive_ptr<lwc_string> LWCStringPtr_t; 00027 00028 CSSStylesheetPtr_t wrap(css_stylesheet *p); 00029 CSSSelectCtxPtr_t wrap(css_select_ctx *p); 00030 CSSSelectResultsPtr_t wrap(css_select_results *p); 00031 00032 LWCStringPtr_t wrap(lwc_string *p); 00033 00034 } 00035 00036 void intrusive_ptr_add_ref(lwc_string *p); 00037 void intrusive_ptr_release(lwc_string *p); 00038 00039 #endif // LIBEBOOK_LIBCSS_H_INCLUDED 00040 00041 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */