Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtktreesortable.h File Reference

Go to the source code of this file.

Data Structures

struct  _GtkTreeSortableIface
 

Macros

#define GTK_TYPE_TREE_SORTABLE   (gtk_tree_sortable_get_type ())
 
#define GTK_TREE_SORTABLE(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_SORTABLE, GtkTreeSortable))
 
#define GTK_IS_TREE_SORTABLE(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_SORTABLE))
 
#define GTK_TREE_SORTABLE_GET_IFACE(obj)   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_TREE_SORTABLE, GtkTreeSortableIface))
 
#define GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID   (-1)
 
#define GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID   (-2)
 

Typedefs

typedef struct _GtkTreeSortable GtkTreeSortable
 
typedef struct _GtkTreeSortableIface GtkTreeSortableIface
 
typedef int(* GtkTreeIterCompareFunc) (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
 

Functions

GDK_AVAILABLE_IN_ALL GType gtk_tree_sortable_get_type (void) G_GNUC_CONST
 
GDK_DEPRECATED_IN_4_10 void gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable)
 
GDK_DEPRECATED_IN_4_10 gboolean gtk_tree_sortable_get_sort_column_id (GtkTreeSortable *sortable, int *sort_column_id, GtkSortType *order)
 
GDK_DEPRECATED_IN_4_10 void gtk_tree_sortable_set_sort_column_id (GtkTreeSortable *sortable, int sort_column_id, GtkSortType order)
 
GDK_DEPRECATED_IN_4_10 void gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable, int sort_column_id, GtkTreeIterCompareFunc sort_func, gpointer user_data, GDestroyNotify destroy)
 
GDK_DEPRECATED_IN_4_10 void gtk_tree_sortable_set_default_sort_func (GtkTreeSortable *sortable, GtkTreeIterCompareFunc sort_func, gpointer user_data, GDestroyNotify destroy)
 
GDK_DEPRECATED_IN_4_10 gboolean gtk_tree_sortable_has_default_sort_func (GtkTreeSortable *sortable)
 

Macro Definition Documentation

◆ GTK_IS_TREE_SORTABLE

#define GTK_IS_TREE_SORTABLE ( obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_SORTABLE))

Definition at line 33 of file gtktreesortable.h.

◆ GTK_TREE_SORTABLE

#define GTK_TREE_SORTABLE ( obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_SORTABLE, GtkTreeSortable))

Definition at line 32 of file gtktreesortable.h.

◆ GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID

#define GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID   (-1)

GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID:

Uses the default sort function in a [iface.nosp@m.@Gtk.nosp@m..Tree.nosp@m.Sort.nosp@m.able].

See also: [metho.nosp@m.d@Gt.nosp@m.k.Tre.nosp@m.eSor.nosp@m.table.nosp@m..set.nosp@m._sort.nosp@m._col.nosp@m.umn_i.nosp@m.d]

Definition at line 43 of file gtktreesortable.h.

◆ GTK_TREE_SORTABLE_GET_IFACE

#define GTK_TREE_SORTABLE_GET_IFACE ( obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_TREE_SORTABLE, GtkTreeSortableIface))

Definition at line 34 of file gtktreesortable.h.

◆ GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID

#define GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID   (-2)

◆ GTK_TYPE_TREE_SORTABLE

#define GTK_TYPE_TREE_SORTABLE   (gtk_tree_sortable_get_type ())

Definition at line 31 of file gtktreesortable.h.

Typedef Documentation

◆ GtkTreeIterCompareFunc

typedef int(* GtkTreeIterCompareFunc) (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)

GtkTreeIterCompareFunc: @model: The GtkTreeModel the comparison is within : A GtkTreeIter in @model : Another GtkTreeIter in @model @user_data: Data passed when the compare func is assigned e.g. by gtk_tree_sortable_set_sort_func()

A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive integer if sorts before , sorts with , or sorts after respectively.

If two iters compare as equal, their order in the sorted model is undefined. In order to ensure that the GtkTreeSortable behaves as expected, the GtkTreeIterCompareFunc must define a partial order on the model, i.e. it must be reflexive, antisymmetric and transitive.

For example, if @model is a product catalogue, then a compare function for the “price” column could be one which returns price_of(@a) - price_of(@b).

Returns: a negative integer, zero or a positive integer depending on whether sorts before, with or after

Definition at line 81 of file gtktreesortable.h.

◆ GtkTreeSortable

typedef struct _GtkTreeSortable GtkTreeSortable

Definition at line 54 of file gtktreesortable.h.

◆ GtkTreeSortableIface

Definition at line 55 of file gtktreesortable.h.

Function Documentation

◆ gtk_tree_sortable_get_sort_column_id()

GDK_DEPRECATED_IN_4_10 gboolean gtk_tree_sortable_get_sort_column_id ( GtkTreeSortable * sortable,
int * sort_column_id,
GtkSortType * order )

◆ gtk_tree_sortable_get_type()

GDK_AVAILABLE_IN_ALL GType gtk_tree_sortable_get_type ( void )

◆ gtk_tree_sortable_has_default_sort_func()

GDK_DEPRECATED_IN_4_10 gboolean gtk_tree_sortable_has_default_sort_func ( GtkTreeSortable * sortable)

◆ gtk_tree_sortable_set_default_sort_func()

GDK_DEPRECATED_IN_4_10 void gtk_tree_sortable_set_default_sort_func ( GtkTreeSortable * sortable,
GtkTreeIterCompareFunc sort_func,
gpointer user_data,
GDestroyNotify destroy )

◆ gtk_tree_sortable_set_sort_column_id()

GDK_DEPRECATED_IN_4_10 void gtk_tree_sortable_set_sort_column_id ( GtkTreeSortable * sortable,
int sort_column_id,
GtkSortType order )

◆ gtk_tree_sortable_set_sort_func()

GDK_DEPRECATED_IN_4_10 void gtk_tree_sortable_set_sort_func ( GtkTreeSortable * sortable,
int sort_column_id,
GtkTreeIterCompareFunc sort_func,
gpointer user_data,
GDestroyNotify destroy )

◆ gtk_tree_sortable_sort_column_changed()

GDK_DEPRECATED_IN_4_10 void gtk_tree_sortable_sort_column_changed ( GtkTreeSortable * sortable)