1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- 2 3 caja-cell-renderer-text-ellipsized.c: Cell renderer for text which 4 will use pango ellipsization but deactivate it temporarily for the size 5 calculation to get the size based on the actual text length. 6 7 Copyright (C) 2007 Martin Wehner 8 9 This program is free software; you can redistribute it and/or 10 modify it under the terms of the GNU General Public License as 11 published by the Free Software Foundation; either version 2 of the 12 License, or (at your option) any later version. 13 14 This program is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 General Public License for more details. 18 19 You should have received a copy of the GNU General Public 20 License along with this program; if not, write to the 21 Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 22 Boston, MA 02110-1301, USA. 23 24 Author: Martin Wehner <martin.wehner@gmail.com> 25 */ 26 27 #ifndef CAJA_CELL_RENDERER_TEXT_ELLIPSIZED_H 28 #define CAJA_CELL_RENDERER_TEXT_ELLIPSIZED_H 29 30 #include <gtk/gtk.h> 31 32 #define CAJA_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED caja_cell_renderer_text_ellipsized_get_type() 33 #define CAJA_CELL_RENDERER_TEXT_ELLIPSIZED(obj) \ 34 (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAJA_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED, CajaCellRendererTextEllipsized)) 35 #define CAJA_CELL_RENDERER_TEXT_ELLIPSIZED_CLASS(klass) \ 36 (G_TYPE_CHECK_CLASS_CAST ((klass), CAJA_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED, CajaCellRendererTextEllipsizedClass)) 37 #define CAJA_IS_CELL_RENDERER_TEXT_ELLIPSIZED(obj) \ 38 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAJA_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED)) 39 #define CAJA_IS_CELL_RENDERER_TEXT_ELLIPSIZED_CLASS(klass) \ 40 (G_TYPE_CHECK_CLASS_TYPE ((klass), CAJA_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED)) 41 #define CAJA_CELL_RENDERER_TEXT_ELLIPSIZED_GET_CLASS(obj) \ 42 (G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED, CajaCellRendererTextEllipsizedClass)) 43 44 45 typedef struct _CajaCellRendererTextEllipsized CajaCellRendererTextEllipsized; 46 typedef struct _CajaCellRendererTextEllipsizedClass CajaCellRendererTextEllipsizedClass; 47 48 struct _CajaCellRendererTextEllipsized 49 { 50 GtkCellRendererText parent; 51 }; 52 53 struct _CajaCellRendererTextEllipsizedClass 54 { 55 GtkCellRendererTextClass parent_class; 56 }; 57 58 GType caja_cell_renderer_text_ellipsized_get_type (void); 59 GtkCellRenderer *caja_cell_renderer_text_ellipsized_new (void); 60 61 #endif /* CAJA_CELL_RENDERER_TEXT_ELLIPSIZED_H */ 62