gtk2/gtk/gtksequence.h
Soeren Sandmann 15ed3634a9 New function.
Sat Aug 14 17:56:33 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkentry.c (gtk_entry_get_pixel_ranges): New function.

	* gtk/gtkentry.c (in_selection): New function using
	gtk_entry_get_pixel_ranges() to determine whether a click is in
	the selection. Improve entry behavior wrt. dragging and
	selecting. Bug #143249.

Sat Aug 14 17:53:46 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* configure.in: Require glib 2.5.2

	* gtk/gtksequence.[ch]: New internal data structure.

	* gtk/gtkliststore.[hc]: Reimplement in terms of new data
	structure

	* tests/Makefile.am (testtreemodel_SOURCES):
	* tests/testtreemodel.c: New test program written by Matthias.
2004-08-14 15:59:39 +00:00

105 lines
4.4 KiB
C

/* GLIB - Library of useful routines for C programming
* Copyright (C) 2002 Soeren Sandmann (sandmann@daimi.au.dk)
*
* 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.
*/
#include <glib.h>
#ifndef __GSEQUENCE_H__
#define __GSEQUENCE_H__
/* Warning
*
* Do not use this API. It is here, internal to gtk+, for 2.6 only.
* In 2.8 the plan is to add a similar data structure to GLib.
*/
typedef struct _GtkSequence GtkSequence;
typedef struct _GtkSequenceNode *GtkSequencePtr;
/* GtkSequence */
GtkSequence * _gtk_sequence_new (GDestroyNotify data_destroy);
void _gtk_sequence_free (GtkSequence *seq);
void _gtk_sequence_sort (GtkSequence *seq,
GCompareDataFunc cmp_func,
gpointer cmp_data);
void _gtk_sequence_append (GtkSequence *seq,
gpointer data);
void _gtk_sequence_prepend (GtkSequence *seq,
gpointer data);
GtkSequencePtr _gtk_sequence_insert (GtkSequencePtr ptr,
gpointer data);
void _gtk_sequence_remove (GtkSequencePtr ptr);
void _gtk_sequence_move (GtkSequencePtr ptr,
GtkSequencePtr pos);
void _gtk_sequence_swap (GtkSequencePtr a,
GtkSequencePtr b);
GtkSequencePtr _gtk_sequence_insert_sorted (GtkSequence *seq,
gpointer data,
GCompareDataFunc cmp_func,
gpointer cmp_data);
void _gtk_sequence_set (GtkSequencePtr ptr,
gpointer data);
void _gtk_sequence_insert_sequence (GtkSequencePtr ptr,
GtkSequence *other_seq);
void _gtk_sequence_concatenate (GtkSequence *seq1,
GtkSequence *seq);
void _gtk_sequence_remove_range (GtkSequencePtr begin,
GtkSequencePtr end,
GtkSequence **removed);
gint _gtk_sequence_get_length (GtkSequence *seq);
GtkSequencePtr _gtk_sequence_get_end_ptr (GtkSequence *seq);
GtkSequencePtr _gtk_sequence_get_begin_ptr (GtkSequence *seq);
GtkSequencePtr _gtk_sequence_get_ptr_at_pos (GtkSequence *seq,
gint pos);
void _gtk_sequence_sort_changed (GtkSequencePtr ptr,
GCompareDataFunc cmp_func,
gpointer cmp_data);
void _gtk_sequence_foreach (GtkSequence *seq,
GFunc func,
gpointer data);
/* GtkSequencePtr */
gboolean _gtk_sequence_ptr_is_end (GtkSequencePtr ptr);
gboolean _gtk_sequence_ptr_is_begin (GtkSequencePtr ptr);
gint _gtk_sequence_ptr_get_position (GtkSequencePtr ptr);
GtkSequencePtr _gtk_sequence_ptr_next (GtkSequencePtr ptr);
GtkSequencePtr _gtk_sequence_ptr_prev (GtkSequencePtr ptr);
GtkSequencePtr _gtk_sequence_ptr_move (GtkSequencePtr ptr,
guint leap);
gpointer _gtk_sequence_ptr_get_data (GtkSequencePtr ptr);
GtkSequence *_gtk_sequence_ptr_get_sequence (GtkSequencePtr ptr);
/* search */
/* return TRUE if you want to be called again with two
* smaller segments
*/
typedef gboolean (* GtkSequenceSearchFunc) (GtkSequencePtr begin,
GtkSequencePtr end,
gpointer data);
void _gtk_sequence_search (GtkSequence *seq,
GtkSequenceSearchFunc f,
gpointer data);
/* debug */
gint _gtk_sequence_calc_tree_height (GtkSequence *seq);
#endif /* __GSEQUENCE_H__ */