00001 /* Copyright (C) 2005 The cairomm Development Team 00002 * 00003 * This library is free software; you can redistribute it and/or 00004 * modify it under the terms of the GNU Library General Public 00005 * License as published by the Free Software Foundation; either 00006 * version 2 of the License, or (at your option) any later version. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Library General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Library General Public 00014 * License along with this library; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00016 * 02110-1301, USA. 00017 */ 00018 00019 #ifndef __CAIROMM_FONTFACE_H 00020 #define __CAIROMM_FONTFACE_H 00021 00022 #include <cairomm/enums.h> 00023 #include <cairo.h> 00024 00025 00026 namespace Cairo 00027 { 00028 00033 class FontFace 00034 { 00035 protected: 00036 00037 //TODO?: FontFace(cairo_font_face_t *target); 00038 00039 public: 00040 00045 explicit FontFace(cairo_font_face_t* cobject, bool has_reference = false); 00046 00047 00048 virtual ~FontFace(); 00049 00050 /* Don't wrap these until we know what they are good for. 00051 void* get_user_data(const cairo_user_data_key_t *key); 00052 00053 void set_user_data(const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy); //TODO: Use a sigc::slot? 00054 */ 00055 00056 00057 typedef cairo_font_face_t cobject; 00058 inline cobject* cobj() { return m_cobject; } 00059 inline const cobject* cobj() const { return m_cobject; } 00060 00061 #ifndef DOXYGEN_IGNORE_THIS 00062 00063 inline ErrorStatus get_status() const 00064 { return cairo_font_face_status(const_cast<cairo_font_face_t*>(cobj())); } 00065 #endif //DOXYGEN_IGNORE_THIS 00066 00067 void reference() const; 00068 void unreference() const; 00069 00070 protected: 00071 00072 cobject* m_cobject; 00073 }; 00074 00075 } // namespace Cairo 00076 00077 #endif //__CAIROMM_FONTFACE_H 00078 00079 // vim: ts=2 sw=2 et