Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-18 10:28:16

0001 /* Pango
0002  * pango-tabs.h: Tab-related stuff
0003  *
0004  * Copyright (C) 2000 Red Hat Software
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Library General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Library General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Library General Public
0017  * License along with this library; if not, write to the
0018  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0019  * Boston, MA 02111-1307, USA.
0020  */
0021 
0022 #ifndef __PANGO_TABS_H__
0023 #define __PANGO_TABS_H__
0024 
0025 #include <pango/pango-types.h>
0026 
0027 G_BEGIN_DECLS
0028 
0029 typedef struct _PangoTabArray PangoTabArray;
0030 
0031 /**
0032  * PangoTabAlign:
0033  * @PANGO_TAB_LEFT: the text appears to the right of the tab stop position
0034  * @PANGO_TAB_RIGHT: the text appears to the left of the tab stop position
0035  *   until the available space is filled. Since: 1.50
0036  * @PANGO_TAB_CENTER: the text is centered at the tab stop position
0037  *   until the available space is filled. Since: 1.50
0038  * @PANGO_TAB_DECIMAL: text before the first occurrence of the decimal point
0039  *   character appears to the left of the tab stop position (until the available
0040  *   space is filled), the rest to the right. Since: 1.50
0041  *
0042  * `PangoTabAlign` specifies where the text appears relative to the tab stop
0043  * position.
0044  */
0045 typedef enum
0046 {
0047   PANGO_TAB_LEFT,
0048   PANGO_TAB_RIGHT,
0049   PANGO_TAB_CENTER,
0050   PANGO_TAB_DECIMAL
0051 } PangoTabAlign;
0052 
0053 #define PANGO_TYPE_TAB_ARRAY (pango_tab_array_get_type ())
0054 
0055 PANGO_AVAILABLE_IN_ALL
0056 PangoTabArray  *pango_tab_array_new                 (gint           initial_size,
0057                              gboolean       positions_in_pixels);
0058 PANGO_AVAILABLE_IN_ALL
0059 PangoTabArray  *pango_tab_array_new_with_positions  (gint           size,
0060                              gboolean       positions_in_pixels,
0061                              PangoTabAlign  first_alignment,
0062                              gint           first_position,
0063                              ...);
0064 PANGO_AVAILABLE_IN_ALL
0065 GType           pango_tab_array_get_type            (void) G_GNUC_CONST;
0066 PANGO_AVAILABLE_IN_ALL
0067 PangoTabArray  *pango_tab_array_copy                (PangoTabArray *src);
0068 PANGO_AVAILABLE_IN_ALL
0069 void            pango_tab_array_free                (PangoTabArray *tab_array);
0070 PANGO_AVAILABLE_IN_ALL
0071 gint            pango_tab_array_get_size            (PangoTabArray *tab_array);
0072 PANGO_AVAILABLE_IN_ALL
0073 void            pango_tab_array_resize              (PangoTabArray *tab_array,
0074                              gint           new_size);
0075 PANGO_AVAILABLE_IN_ALL
0076 void            pango_tab_array_set_tab             (PangoTabArray *tab_array,
0077                              gint           tab_index,
0078                              PangoTabAlign  alignment,
0079                              gint           location);
0080 PANGO_AVAILABLE_IN_ALL
0081 void            pango_tab_array_get_tab             (PangoTabArray *tab_array,
0082                              gint           tab_index,
0083                              PangoTabAlign *alignment,
0084                              gint          *location);
0085 PANGO_AVAILABLE_IN_ALL
0086 void            pango_tab_array_get_tabs            (PangoTabArray *tab_array,
0087                              PangoTabAlign **alignments,
0088                              gint          **locations);
0089 
0090 PANGO_AVAILABLE_IN_ALL
0091 gboolean        pango_tab_array_get_positions_in_pixels (PangoTabArray *tab_array);
0092 
0093 PANGO_AVAILABLE_IN_1_50
0094 void            pango_tab_array_set_positions_in_pixels (PangoTabArray *tab_array,
0095                                                          gboolean       positions_in_pixels);
0096 
0097 PANGO_AVAILABLE_IN_1_50
0098 char *          pango_tab_array_to_string           (PangoTabArray *tab_array);
0099 PANGO_AVAILABLE_IN_1_50
0100 PangoTabArray * pango_tab_array_from_string         (const char    *text);
0101 
0102 PANGO_AVAILABLE_IN_1_50
0103 void            pango_tab_array_set_decimal_point   (PangoTabArray *tab_array,
0104                                                      int            tab_index,
0105                                                      gunichar       decimal_point);
0106 PANGO_AVAILABLE_IN_1_50
0107 gunichar        pango_tab_array_get_decimal_point   (PangoTabArray *tab_array,
0108                                                      int            tab_index);
0109 
0110 PANGO_AVAILABLE_IN_1_50
0111 void            pango_tab_array_sort                (PangoTabArray *tab_array);
0112 
0113 G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoTabArray, pango_tab_array_free)
0114 
0115 G_END_DECLS
0116 
0117 #endif /* __PANGO_TABS_H__ */