Commit 8ebf77d1 authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

text_window_* weren't static and should have been. Start work on child

2000-10-02  Havoc Pennington  <hp@pobox.com>

        * gtk/gtktextview.c: text_window_* weren't static and should have
	        been.
		        Start work on child widgets; not yet complete,
syncing to
        office computer.

	        * gtk/gtktextchild.h: change this to contain a public interface,
		starting work on child interfaces.
		        * gtk/gtktextchildprivate.h: move private interfaces here

			* gtk/Makefile.am: update to reflect gtktextchildprivate.h

			* gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h,
			gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c,
			gtk/gtktextmark.c: copyright notices

			* gtk/gtktextmarkprivate.h: reformat, and put _ in
front of
        internal functions

	* gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of
	internal function

	* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
	Reformatting
parent 632fda6f
2000-10-02 Havoc Pennington <hp@pobox.com>
* gtk/gtktextview.c: text_window_* weren't static and should have
been.
Start work on child widgets; not yet complete, syncing to
office computer.
* gtk/gtktextchild.h: change this to contain a public interface,
starting work on child interfaces.
* gtk/gtktextchildprivate.h: move private interfaces here
* gtk/Makefile.am: update to reflect gtktextchildprivate.h
* gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h,
gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c,
gtk/gtktextmark.c: copyright notices
* gtk/gtktextmarkprivate.h: reformat, and put _ in front of
internal functions
* gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of
internal function
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
Reformatting
2000-09-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
......
2000-10-02 Havoc Pennington <hp@pobox.com>
* gtk/gtktextview.c: text_window_* weren't static and should have
been.
Start work on child widgets; not yet complete, syncing to
office computer.
* gtk/gtktextchild.h: change this to contain a public interface,
starting work on child interfaces.
* gtk/gtktextchildprivate.h: move private interfaces here
* gtk/Makefile.am: update to reflect gtktextchildprivate.h
* gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h,
gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c,
gtk/gtktextmark.c: copyright notices
* gtk/gtktextmarkprivate.h: reformat, and put _ in front of
internal functions
* gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of
internal function
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
Reformatting
2000-09-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
......
2000-10-02 Havoc Pennington <hp@pobox.com>
* gtk/gtktextview.c: text_window_* weren't static and should have
been.
Start work on child widgets; not yet complete, syncing to
office computer.
* gtk/gtktextchild.h: change this to contain a public interface,
starting work on child interfaces.
* gtk/gtktextchildprivate.h: move private interfaces here
* gtk/Makefile.am: update to reflect gtktextchildprivate.h
* gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h,
gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c,
gtk/gtktextmark.c: copyright notices
* gtk/gtktextmarkprivate.h: reformat, and put _ in front of
internal functions
* gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of
internal function
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
Reformatting
2000-09-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
......
2000-10-02 Havoc Pennington <hp@pobox.com>
* gtk/gtktextview.c: text_window_* weren't static and should have
been.
Start work on child widgets; not yet complete, syncing to
office computer.
* gtk/gtktextchild.h: change this to contain a public interface,
starting work on child interfaces.
* gtk/gtktextchildprivate.h: move private interfaces here
* gtk/Makefile.am: update to reflect gtktextchildprivate.h
* gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h,
gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c,
gtk/gtktextmark.c: copyright notices
* gtk/gtktextmarkprivate.h: reformat, and put _ in front of
internal functions
* gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of
internal function
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
Reformatting
2000-09-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
......
2000-10-02 Havoc Pennington <hp@pobox.com>
* gtk/gtktextview.c: text_window_* weren't static and should have
been.
Start work on child widgets; not yet complete, syncing to
office computer.
* gtk/gtktextchild.h: change this to contain a public interface,
starting work on child interfaces.
* gtk/gtktextchildprivate.h: move private interfaces here
* gtk/Makefile.am: update to reflect gtktextchildprivate.h
* gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h,
gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c,
gtk/gtktextmark.c: copyright notices
* gtk/gtktextmarkprivate.h: reformat, and put _ in front of
internal functions
* gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of
internal function
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
Reformatting
2000-09-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
......
2000-10-02 Havoc Pennington <hp@pobox.com>
* gtk/gtktextview.c: text_window_* weren't static and should have
been.
Start work on child widgets; not yet complete, syncing to
office computer.
* gtk/gtktextchild.h: change this to contain a public interface,
starting work on child interfaces.
* gtk/gtktextchildprivate.h: move private interfaces here
* gtk/Makefile.am: update to reflect gtktextchildprivate.h
* gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h,
gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c,
gtk/gtktextmark.c: copyright notices
* gtk/gtktextmarkprivate.h: reformat, and put _ in front of
internal functions
* gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of
internal function
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
Reformatting
2000-09-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
......
2000-10-02 Havoc Pennington <hp@pobox.com>
* gtk/gtktextview.c: text_window_* weren't static and should have
been.
Start work on child widgets; not yet complete, syncing to
office computer.
* gtk/gtktextchild.h: change this to contain a public interface,
starting work on child interfaces.
* gtk/gtktextchildprivate.h: move private interfaces here
* gtk/Makefile.am: update to reflect gtktextchildprivate.h
* gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h,
gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c,
gtk/gtktextmark.c: copyright notices
* gtk/gtktextmarkprivate.h: reformat, and put _ in front of
internal functions
* gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of
internal function
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
Reformatting
2000-09-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
......
......@@ -148,6 +148,7 @@ gtk_public_h_sources = @STRIP_BEGIN@ \
gtktable.h \
gtktearoffmenuitem.h \
gtktextbuffer.h \
gtktextchild.h \
gtktextiter.h \
gtktextmark.h \
gtktexttag.h \
......@@ -189,7 +190,7 @@ gtk_semipublic_h_sources = @STRIP_BEGIN@ \
# GTK+ header files that don't get installed
gtk_private_h_sources = @STRIP_BEGIN@ \
gtktextbtree.h \
gtktextchild.h \
gtktextchildprivate.h \
gtktextsegment.h \
gtktexttypes.h \
gtktextiterprivate.h \
......
......@@ -447,8 +447,8 @@ gtk_text_btree_new (GtkTextTagTable *table,
tree->selection_bound_mark->body.mark.not_deleteable = TRUE;
mark_segment_ref(tree->insert_mark);
mark_segment_ref(tree->selection_bound_mark);
_mark_segment_ref(tree->insert_mark);
_mark_segment_ref(tree->selection_bound_mark);
}
tree->refcount = 1;
......@@ -466,9 +466,9 @@ gtk_text_btree_ref (GtkTextBTree *tree)
}
static void
mark_destroy_foreach(gpointer key, gpointer value, gpointer user_data)
mark_destroy_foreach (gpointer key, gpointer value, gpointer user_data)
{
mark_segment_unref(value);
_mark_segment_unref (value);
}
void
......@@ -488,8 +488,8 @@ gtk_text_btree_unref (GtkTextBTree *tree)
NULL);
g_hash_table_destroy(tree->mark_table);
mark_segment_unref(tree->insert_mark);
mark_segment_unref(tree->selection_bound_mark);
_mark_segment_unref(tree->insert_mark);
_mark_segment_unref(tree->selection_bound_mark);
gtk_signal_disconnect(GTK_OBJECT(tree->table),
tree->tag_changed_handler);
......@@ -1057,7 +1057,7 @@ gtk_text_btree_insert_pixbuf (GtkTextIter *iter,
tree = gtk_text_iter_get_btree(iter);
start_byte_offset = gtk_text_iter_get_line_index(iter);
seg = gtk_text_pixbuf_segment_new (pixbuf);
seg = _pixbuf_segment_new (pixbuf);
prevPtr = gtk_text_line_segment_split(iter);
if (prevPtr == NULL)
......@@ -2426,9 +2426,9 @@ real_set_mark(GtkTextBTree *tree,
}
else
{
mark = mark_segment_new(tree,
left_gravity,
name);
mark = _mark_segment_new (tree,
left_gravity,
name);
mark->body.mark.line = gtk_text_iter_get_text_line(&iter);
......@@ -2553,7 +2553,7 @@ gtk_text_btree_remove_mark (GtkTextBTree *tree,
if (segment->body.mark.name)
g_hash_table_remove (tree->mark_table, segment->body.mark.name);
mark_segment_unref (segment);
_mark_segment_unref (segment);
segment->body.mark.tree = NULL;
segment->body.mark.line = NULL;
......
/* gtktextbuffer.c - the "model" in the MVC text widget architecture
* Copyright (c) 2000 Red Hat, Inc.
* Developed by Havoc Pennington
/* GTK - The GIMP Toolkit
* gtktextbuffer.c 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.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include <string.h>
#include "gtkclipboard.h"
......@@ -1346,6 +1368,42 @@ gtk_text_buffer_get_selection_bound (GtkTextBuffer *buffer)
return gtk_text_buffer_get_mark (buffer, "selection_bound");
}
GtkTextChildAnchor*
gtk_text_buffer_create_child_anchor (GtkTextBuffer *buffer,
const GtkTextIter *where)
{
}
void
gtk_text_buffer_move_child_anchor (GtkTextBuffer *buffer,
GtkTextChildAnchor *anchor,
GtkTextIter *where)
{
}
void
gtk_text_buffer_delete_child_anchor (GtkTextBuffer *buffer,
GtkTextChildAnchor *anchor)
{
}
void
gtk_text_buffer_get_iter_at_child_anchor (GtkTextBuffer *buffer,
GtkTextIter *iter,
GtkTextChildAnchor *anchor)
{
}
/**
* gtk_text_buffer_place_cursor:
* @buffer: a #GtkTextBuffer
......
/* GTK - The GIMP Toolkit
* gtktextbuffer.h 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.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef GTK_TEXT_BUFFER_H
#define GTK_TEXT_BUFFER_H
......@@ -5,6 +31,7 @@
#include <gtk/gtktexttagtable.h>
#include <gtk/gtktextiter.h>
#include <gtk/gtktextmark.h>
#include <gtk/gtktextchild.h>
#ifdef __cplusplus
extern "C" {
......@@ -188,6 +215,16 @@ void gtk_text_buffer_delete_mark_by_name (GtkTextBuffer *buffer,
GtkTextMark* gtk_text_buffer_get_insert (GtkTextBuffer *buffer);
GtkTextMark* gtk_text_buffer_get_selection_bound (GtkTextBuffer *buffer);
/* Child widget anchors */
GtkTextChildAnchor* gtk_text_buffer_create_child_anchor (GtkTextBuffer *buffer,
const GtkTextIter *where);
void gtk_text_buffer_move_child_anchor (GtkTextBuffer *buffer,
GtkTextChildAnchor *anchor,
GtkTextIter *where);
void gtk_text_buffer_delete_child_anchor (GtkTextBuffer *buffer,
GtkTextChildAnchor *anchor);
/* efficiently move insert and selection_bound to same location */
void gtk_text_buffer_place_cursor (GtkTextBuffer *buffer,
......@@ -241,7 +278,9 @@ void gtk_text_buffer_get_iter_at_mark (GtkTextBuffer *buffer,
GtkTextIter *iter,
GtkTextMark *mark);
void gtk_text_buffer_get_iter_at_child_anchor (GtkTextBuffer *buffer,
GtkTextIter *iter,
GtkTextChildAnchor *anchor);
/* There's no get_first_iter because you just get the iter for
line or char 0 */
......
/* gtktextchild.c - child pixmaps and widgets
*
*
* Copyright (c) 1994 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
......@@ -89,7 +88,7 @@ pixbuf_segment_check_func(GtkTextLineSegment *seg,
GtkTextLineSegmentClass gtk_text_pixbuf_type = {
"pixbuf", /* name */
0, /* leftGravity */
FALSE, /* leftGravity */
NULL, /* splitFunc */
pixbuf_segment_delete_func, /* deleteFunc */
pixbuf_segment_cleanup_func, /* cleanupFunc */
......@@ -98,27 +97,15 @@ GtkTextLineSegmentClass gtk_text_pixbuf_type = {
};
#if 0
GtkTextLineSegmentClass gtk_text_view_child_type = {
"child-widget", /* name */
0, /* leftGravity */
child_segment_split_func, /* splitFunc */
child_segment_delete_func, /* deleteFunc */
child_segment_cleanup_func, /* cleanupFunc */
NULL, /* lineChangeFunc */
child_segment_check_func /* checkFunc */
};
#endif
#define PIXBUF_SEG_SIZE ((unsigned) (G_STRUCT_OFFSET(GtkTextLineSegment, body) \
+ sizeof(GtkTextPixbuf)))
GtkTextLineSegment *
gtk_text_pixbuf_segment_new (GdkPixbuf *pixbuf)
_pixbuf_segment_new (GdkPixbuf *pixbuf)
{
GtkTextLineSegment *seg;
seg = g_malloc(PIXBUF_SEG_SIZE);
seg = g_malloc (PIXBUF_SEG_SIZE);
seg->type = &gtk_text_pixbuf_type;
......@@ -134,3 +121,194 @@ gtk_text_pixbuf_segment_new (GdkPixbuf *pixbuf)
return seg;
}
static GtkTextLineSegment *
child_segment_cleanup_func (GtkTextLineSegment *seg,
GtkTextLine *line)
{
seg->body.child.line = line;
return seg;
}
static int
child_segment_delete_func (GtkTextLineSegment *seg,
GtkTextLine *line,
gboolean tree_gone)
{
_widget_segment_unref (seg);
return 0;
}
static void
child_segment_check_func (GtkTextLineSegment *seg,
GtkTextLine *line)
{
if (seg->next == NULL)
g_error("child segment is the last segment in a line");
if (seg->byte_count != 3)
g_error("child segment has byte count of %d", seg->byte_count);
if (seg->char_count != 1)
g_error("child segment has char count of %d", seg->char_count);
}
GtkTextLineSegmentClass gtk_text_child_type = {
"child-widget", /* name */
FALSE, /* leftGravity */
NULL, /* splitFunc */
child_segment_delete_func, /* deleteFunc */
child_segment_cleanup_func, /* cleanupFunc */
NULL, /* lineChangeFunc */
child_segment_check_func /* checkFunc */
};
#define WIDGET_SEG_SIZE ((unsigned) (G_STRUCT_OFFSET (GtkTextLineSegment, body) \
+ sizeof(GtkTextChildBody)))
GtkTextLineSegment *
_widget_segment_new (void)
{
GtkTextLineSegment *seg;
seg = g_malloc (WIDGET_SEG_SIZE);
seg->type = &gtk_text_child_type;
seg->next = NULL;
seg->byte_count = 3; /* We convert to the 0xFFFD "unknown character",
* a 3-byte sequence in UTF-8
*/
seg->char_count = 1;
seg->body.child.ref_count = 1;
seg->body.child.widgets = NULL;
seg->body.child.tree = NULL;
seg->body.child.line = NULL;
return seg;
}
void
_widget_segment_add (GtkTextLineSegment *widget_segment,
GtkWidget *child)
{
g_assert (widget_segment->type = &gtk_text_child_type);
widget_segment->body.child.widgets =
g_slist_prepend (widget_segment->body.child.widgets,
child);
g_object_ref (G_OBJECT (child));
}
void
_widget_segment_remove (GtkTextLineSegment *widget_segment,
GtkWidget *child)
{
g_assert (widget_segment->type = &gtk_text_child_type);
widget_segment->body.child.widgets =
g_slist_remove (widget_segment->body.child.widgets,
child);
g_object_unref (G_OBJECT (child));
}
void
_widget_segment_ref (GtkTextLineSegment *widget_segment)
{
g_assert (widget_segment->type = &gtk_text_child_type);
widget_segment->body.child.ref_count += 1;
}
void
_widget_segment_unref (GtkTextLineSegment *widget_segment)
{
g_assert (widget_segment->type = &gtk_text_child_type);
widget_segment->body.child.ref_count -= 1;
if (widget_segment->body.child.ref_count == 0)
{
GSList *tmp_list;
if (widget_segment->body.child.tree == NULL)
g_warning ("widget segment destroyed while still in btree");
tmp_list = widget_segment->body.child.widgets;
while (tmp_list)
{
g_object_unref (G_OBJECT (tmp_list->data));
tmp_list = g_slist_next (tmp_list);
}
g_slist_free (widget_segment->body.child.widgets);
g_free (widget_segment);
}
}
void
gtk_text_child_anchor_ref (GtkTextChildAnchor *anchor)
{
GtkTextLineSegment *seg = (GtkTextLineSegment *) anchor;
g_return_if_fail (seg->type = &gtk_text_child_type);
g_return_if_fail (seg->body.child.ref_count > 0);
_widget_segment_ref (seg);
}
void
gtk_text_child_anchor_unref (GtkTextChildAnchor *anchor)
{
GtkTextLineSegment *seg = (GtkTextLineSegment *) anchor;
g_return_if_fail (seg->type = &gtk_text_child_type);
g_return_if_fail (seg->body.child.ref_count > 0);
_widget_segment_unref (seg);
}
GList*
gtk_text_child_anchor_get_widgets (GtkTextChildAnchor *anchor)
{
GtkTextLineSegment *seg = (GtkTextLineSegment *) anchor;
GList *list = NULL;
GSList *iter;
g_return_val_if_fail (seg->type = &gtk_text_child_type, NULL);
iter = seg->body.child.widgets;
while (iter != NULL)
{
list = g_list_prepend (list, iter->data);
iter = g_slist_next (iter);
}
/* Order is not relevant, so we don't need to reverse the list
* again.
*/
return list;
}
gboolean
gtk_text_child_anchor_get_deleted (GtkTextChildAnchor *anchor)
{
GtkTextLineSegment *seg = (GtkTextLineSegment *) anchor;
g_return_val_if_fail (seg->type = &gtk_text_child_type, TRUE);
return seg->body.child.tree == NULL;
}
/* GTK - The GIMP Toolkit
* gtktextchild.h 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.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef GTK_TEXT_CHILD_H
#define GTK_TEXT_CHILD_H
#include <gtk/gtktexttypes.h>
#include <glib.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _GtkTextPixbuf GtkTextPixbuf;
struct _GtkTextPixbuf {
GdkPixbuf *pixbuf;
};
/* A GtkTextChildAnchor is a spot in the buffer where child widgets
* can be "anchored" (inserted inline, as if they were characters).
* The anchor can have multiple widgets anchored, to allow for multiple
* views.
*/
GtkTextLineSegment *gtk_text_pixbuf_segment_new(GdkPixbuf *pixbuf);
typedef struct _GtkTextChildAnchor GtkTextChildAnchor;
void gtk_text_child_anchor_ref (GtkTextChildAnchor *anchor);
void gtk_text_child_anchor_unref (GtkTextChildAnchor *anchor);
GList* gtk_text_child_anchor_get_widgets (GtkTextChildAnchor *anchor);
gboolean gtk_text_child_anchor_get_deleted (GtkTextChildAnchor *anchor);
#ifdef __cplusplus
}
......
/* gtktextchild.c - child pixmaps and widgets
*
* Copyright (c) 1994 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
* Copyright (c) 2000 Red Hat, Inc.
* Tk -> Gtk port by Havoc Pennington <hp@redhat.com>
*
* This software is copyrighted by the Regents of the University of
* California, Sun Microsystems, Inc., and other parties. The
* following terms apply to all files associated with the software
* unless explicitly disclaimed in individual files.
*
* The authors hereby grant permission to use, copy, modify,
* distribute, and license this software and its documentation for any
* purpose, provided that existing copyright notices are retained in
* all copies and that this notice is included verbatim in any
* distributions. No written agreement, license, or royalty fee is
* required for any of the authorized uses. Modifications to this
* software may be copyrighted by their authors and need not follow
* the licensing terms described here, provided that the new terms are
* clearly indicated on the first page of each file where they apply.
*
* IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY
* PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
* DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION,
* OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND