forked from AuroraMiddleware/gtk
2097d764a7
2001-02-12 Havoc Pennington <hp@pobox.com> * gdk/gdkpango.c (gdk_pango_get_gc): fix bug where it always set the foreground, even if we were only using a stipple. (gdk_draw_layout_line_with_colors): new function, allow override colors (gdk_draw_layout_with_colors): new function, allow override colors (gdk_pango_layout_line_get_clip_region): function to get the clip region for a logical text range (gdk_pango_layout_get_clip_region): get the clip region for a logical text range * gdk/x11/gdkcolor-x11.c: forward declare gdk_colormap_sync(), (gdk_colormap_new): fix call to gdk_colormap_sync() so it has the right number of arguments. * gtk/gtktextbtree.c (gtk_text_btree_node_check_consistency): enhance the function to check that node data corresponds to a view still belonging to the tree. * gtk/gtktreeview.c (gtk_tree_view_changed): we were leaking the GtkTreePath (gtk_tree_view_inserted): ditto (gtk_tree_view_child_toggled): ditto * gtk/gtktreemodel.c (gtk_tree_path_append_index): use realloc to simplify this code. * gtk/gtkcellrenderertext.c (get_layout): fix leak of a PangoAttrList * demos/gtk-demo/main.c (load_file): Fix leak of a GString * gtk/gtkentry.c (gtk_entry_realize): Fix leak of a GdkCursor * gtk/gtkmenubar.c (gtk_menu_bar_size_request): consider toggle size in the size request (gtk_menu_bar_size_allocate): consider toggle size here * gtk/gtkimagemenuitem.h, gtkimagemenuitem.c: Menu item that displays a widget in the toggle slot * gtk/testgtk.c: test GtkImageMenuItem * gtk/Makefile.am, gtk/gtk.h: Add GtkImageMenuItem * gtk/gtkmenuitem.h: Use "gint" not "guint16" for toggle size request and allocation * gtk/gtkmenu.c (gtk_menu_size_request): use gint not guint16 * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_toggle_size_request): ditto
86 lines
3.0 KiB
C
86 lines
3.0 KiB
C
/* GDK - The GIMP Drawing Kit
|
|
* Copyright (C) 2000 Red Hat, Inc.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __GDK_PANGO_H__
|
|
#define __GDK_PANGO_H__
|
|
|
|
#include <gdk/gdktypes.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
/* Pango interaction */
|
|
|
|
/* FIXME: The following function needs more parameters so that we can
|
|
* properly deal with different visuals, the potential for multiple
|
|
* screens in the future, etc. The PangoContext needs enough information
|
|
* in it to create new GC's and to set the colors on those GC's.
|
|
* A colormap is not sufficient.
|
|
*/
|
|
PangoContext *gdk_pango_context_get (void);
|
|
void gdk_pango_context_set_colormap (PangoContext *context,
|
|
GdkColormap *colormap);
|
|
|
|
|
|
/* Get a clip region to draw only part of a layout or
|
|
* line. index_ranges contains alternating range starts/stops. The
|
|
* region is the region which contains the given ranges, i.e. if you
|
|
* draw with the region as clip, only the given ranges are drawn.
|
|
*/
|
|
|
|
GdkRegion *gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,
|
|
gint x_origin,
|
|
gint y_origin,
|
|
gint *index_ranges,
|
|
gint n_ranges);
|
|
GdkRegion *gdk_pango_layout_get_clip_region (PangoLayout *layout,
|
|
gint x_origin,
|
|
gint y_origin,
|
|
gint *index_ranges,
|
|
gint n_ranges);
|
|
|
|
|
|
|
|
/* Attributes use to render insensitive text in GTK+. */
|
|
|
|
typedef struct _GdkPangoAttrStipple GdkPangoAttrStipple;
|
|
typedef struct _GdkPangoAttrEmbossed GdkPangoAttrEmbossed;
|
|
|
|
struct _GdkPangoAttrStipple
|
|
{
|
|
PangoAttribute attr;
|
|
GdkBitmap *stipple;
|
|
};
|
|
|
|
struct _GdkPangoAttrEmbossed
|
|
{
|
|
PangoAttribute attr;
|
|
gboolean embossed;
|
|
};
|
|
|
|
PangoAttribute *gdk_pango_attr_stipple_new (GdkBitmap *bitmap);
|
|
PangoAttribute *gdk_pango_attr_embossed_new (gboolean embossed);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __GDK_FONT_H__ */
|