Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 019650ff26 | |||
| eb045fe936 | |||
| 173f82772e | |||
| 3d521d3b56 |
+28
-41
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (CanvasItem, canvas_item, CANVAS, ITEM, GtkWidget)
|
G_DECLARE_FINAL_TYPE (CanvasItem, canvas_item, CANVAS, ITEM, GtkWidget)
|
||||||
|
|
||||||
@@ -25,9 +26,6 @@ struct _CanvasItem {
|
|||||||
double delta;
|
double delta;
|
||||||
|
|
||||||
GtkWidget *editor;
|
GtkWidget *editor;
|
||||||
|
|
||||||
GtkStyleProvider *provider;
|
|
||||||
char *css_class;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _CanvasItemClass {
|
struct _CanvasItemClass {
|
||||||
@@ -38,41 +36,32 @@ G_DEFINE_TYPE (CanvasItem, canvas_item, GTK_TYPE_WIDGET)
|
|||||||
|
|
||||||
static int n_items = 0;
|
static int n_items = 0;
|
||||||
|
|
||||||
static void
|
|
||||||
unstyle_item (CanvasItem *item)
|
|
||||||
{
|
|
||||||
if (item->provider)
|
|
||||||
{
|
|
||||||
gtk_style_context_remove_provider_for_display (gtk_widget_get_display (item->label), item->provider);
|
|
||||||
g_clear_object (&item->provider);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item->css_class)
|
|
||||||
{
|
|
||||||
gtk_widget_remove_css_class (item->label, item->css_class);
|
|
||||||
g_clear_pointer (&item->css_class, g_free);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_color (CanvasItem *item,
|
set_color (CanvasItem *item,
|
||||||
GdkRGBA *color)
|
GdkRGBA *color)
|
||||||
{
|
{
|
||||||
char *css;
|
char *css;
|
||||||
char *str;
|
char *str;
|
||||||
|
GtkStyleContext *context;
|
||||||
GtkCssProvider *provider;
|
GtkCssProvider *provider;
|
||||||
const char *name;
|
const char *old_class;
|
||||||
|
|
||||||
unstyle_item (item);
|
|
||||||
|
|
||||||
str = gdk_rgba_to_string (color);
|
str = gdk_rgba_to_string (color);
|
||||||
name = gtk_widget_get_name (item->label);
|
css = g_strdup_printf ("* { background: %s; }", str);
|
||||||
css = g_strdup_printf ("#%s { background: %s; }", name, str);
|
|
||||||
|
context = gtk_widget_get_style_context (item->label);
|
||||||
|
provider = g_object_get_data (G_OBJECT (context), "style-provider");
|
||||||
|
if (provider)
|
||||||
|
gtk_style_context_remove_provider (context, GTK_STYLE_PROVIDER (provider));
|
||||||
|
|
||||||
|
old_class = (const char *)g_object_get_data (G_OBJECT (item->label), "css-class");
|
||||||
|
if (old_class)
|
||||||
|
gtk_widget_remove_css_class (item->label, old_class);
|
||||||
|
|
||||||
provider = gtk_css_provider_new ();
|
provider = gtk_css_provider_new ();
|
||||||
gtk_css_provider_load_from_data (provider, css, -1);
|
gtk_css_provider_load_from_data (provider, css, -1);
|
||||||
gtk_style_context_add_provider_for_display (gtk_widget_get_display (item->label), GTK_STYLE_PROVIDER (provider), 700);
|
gtk_style_context_add_provider (gtk_widget_get_style_context (item->label), GTK_STYLE_PROVIDER (provider), 800);
|
||||||
item->provider = GTK_STYLE_PROVIDER (provider);
|
g_object_set_data_full (G_OBJECT (context), "style-provider", provider, g_object_unref);
|
||||||
|
|
||||||
g_free (str);
|
g_free (str);
|
||||||
g_free (css);
|
g_free (css);
|
||||||
@@ -82,10 +71,21 @@ static void
|
|||||||
set_css (CanvasItem *item,
|
set_css (CanvasItem *item,
|
||||||
const char *class)
|
const char *class)
|
||||||
{
|
{
|
||||||
unstyle_item (item);
|
GtkStyleContext *context;
|
||||||
|
GtkCssProvider *provider;
|
||||||
|
const char *old_class;
|
||||||
|
|
||||||
|
context = gtk_widget_get_style_context (item->label);
|
||||||
|
provider = g_object_get_data (G_OBJECT (context), "style-provider");
|
||||||
|
if (provider)
|
||||||
|
gtk_style_context_remove_provider (context, GTK_STYLE_PROVIDER (provider));
|
||||||
|
|
||||||
|
old_class = (const char *)g_object_get_data (G_OBJECT (item->label), "css-class");
|
||||||
|
if (old_class)
|
||||||
|
gtk_widget_remove_css_class (item->label, old_class);
|
||||||
|
|
||||||
|
g_object_set_data_full (G_OBJECT (item->label), "css-class", g_strdup (class), g_free);
|
||||||
gtk_widget_add_css_class (item->label, class);
|
gtk_widget_add_css_class (item->label, class);
|
||||||
item->css_class = g_strdup (class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -724,7 +724,6 @@ do_dnd (GtkWidget *do_widget)
|
|||||||
int i;
|
int i;
|
||||||
int x, y;
|
int x, y;
|
||||||
GtkCssProvider *provider;
|
GtkCssProvider *provider;
|
||||||
GString *css;
|
|
||||||
|
|
||||||
button = gtk_color_button_new ();
|
button = gtk_color_button_new ();
|
||||||
g_object_unref (g_object_ref_sink (button));
|
g_object_unref (g_object_ref_sink (button));
|
||||||
@@ -736,18 +735,6 @@ do_dnd (GtkWidget *do_widget)
|
|||||||
800);
|
800);
|
||||||
g_object_unref (provider);
|
g_object_unref (provider);
|
||||||
|
|
||||||
css = g_string_new ("");
|
|
||||||
for (i = 0; colors[i]; i++)
|
|
||||||
g_string_append_printf (css, ".canvasitem.%s { background: %s; }\n", colors[i], colors[i]);
|
|
||||||
|
|
||||||
provider = gtk_css_provider_new ();
|
|
||||||
gtk_css_provider_load_from_data (provider, css->str, css->len);
|
|
||||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
|
||||||
GTK_STYLE_PROVIDER (provider),
|
|
||||||
800);
|
|
||||||
g_object_unref (provider);
|
|
||||||
g_string_free (css, TRUE);
|
|
||||||
|
|
||||||
window = gtk_window_new ();
|
window = gtk_window_new ();
|
||||||
gtk_window_set_display (GTK_WINDOW (window),
|
gtk_window_set_display (GTK_WINDOW (window),
|
||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_display (do_widget));
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
static GtkWidget *window = NULL;
|
static GtkWidget *window = NULL;
|
||||||
static GtkWidget *font_button = NULL;
|
static GtkWidget *font_button = NULL;
|
||||||
static GtkWidget *entry = NULL;
|
static GtkWidget *entry = NULL;
|
||||||
@@ -43,6 +45,7 @@ update_image (void)
|
|||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
GdkPixbuf *pixbuf2;
|
GdkPixbuf *pixbuf2;
|
||||||
|
const char *hint;
|
||||||
cairo_font_options_t *fopt;
|
cairo_font_options_t *fopt;
|
||||||
cairo_hint_style_t hintstyle;
|
cairo_hint_style_t hintstyle;
|
||||||
cairo_hint_metrics_t hintmetrics;
|
cairo_hint_metrics_t hintmetrics;
|
||||||
@@ -57,23 +60,18 @@ update_image (void)
|
|||||||
|
|
||||||
fopt = cairo_font_options_copy (pango_cairo_context_get_font_options (context));
|
fopt = cairo_font_options_copy (pango_cairo_context_get_font_options (context));
|
||||||
|
|
||||||
switch (gtk_drop_down_get_selected (GTK_DROP_DOWN (hinting)))
|
hint = gtk_combo_box_get_active_id (GTK_COMBO_BOX (hinting));
|
||||||
|
hintstyle = CAIRO_HINT_STYLE_DEFAULT;
|
||||||
|
if (hint)
|
||||||
{
|
{
|
||||||
case 0:
|
if (strcmp (hint, "none") == 0)
|
||||||
hintstyle = CAIRO_HINT_STYLE_NONE;
|
hintstyle = CAIRO_HINT_STYLE_NONE;
|
||||||
break;
|
else if (strcmp (hint, "slight") == 0)
|
||||||
case 1:
|
hintstyle = CAIRO_HINT_STYLE_SLIGHT;
|
||||||
hintstyle = CAIRO_HINT_STYLE_SLIGHT;
|
else if (strcmp (hint, "medium") == 0)
|
||||||
break;
|
hintstyle = CAIRO_HINT_STYLE_MEDIUM;
|
||||||
case 2:
|
else if (strcmp (hint, "full") == 0)
|
||||||
hintstyle = CAIRO_HINT_STYLE_MEDIUM;
|
hintstyle = CAIRO_HINT_STYLE_FULL;
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
hintstyle = CAIRO_HINT_STYLE_FULL;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
hintstyle = CAIRO_HINT_STYLE_DEFAULT;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
cairo_font_options_set_hint_style (fopt, hintstyle);
|
cairo_font_options_set_hint_style (fopt, hintstyle);
|
||||||
|
|
||||||
@@ -422,7 +420,7 @@ do_fontrendering (GtkWidget *do_widget)
|
|||||||
g_signal_connect (down_button, "clicked", G_CALLBACK (scale_down), NULL);
|
g_signal_connect (down_button, "clicked", G_CALLBACK (scale_down), NULL);
|
||||||
g_signal_connect (entry, "notify::text", G_CALLBACK (update_image), NULL);
|
g_signal_connect (entry, "notify::text", G_CALLBACK (update_image), NULL);
|
||||||
g_signal_connect (font_button, "notify::font-desc", G_CALLBACK (update_image), NULL);
|
g_signal_connect (font_button, "notify::font-desc", G_CALLBACK (update_image), NULL);
|
||||||
g_signal_connect (hinting, "notify::selected", G_CALLBACK (update_image), NULL);
|
g_signal_connect (hinting, "notify::active", G_CALLBACK (update_image), NULL);
|
||||||
g_signal_connect (anti_alias, "notify::active", G_CALLBACK (update_image), NULL);
|
g_signal_connect (anti_alias, "notify::active", G_CALLBACK (update_image), NULL);
|
||||||
g_signal_connect (hint_metrics, "notify::active", G_CALLBACK (update_image), NULL);
|
g_signal_connect (hint_metrics, "notify::active", G_CALLBACK (update_image), NULL);
|
||||||
g_signal_connect (text_radio, "notify::active", G_CALLBACK (update_image), NULL);
|
g_signal_connect (text_radio, "notify::active", G_CALLBACK (update_image), NULL);
|
||||||
|
|||||||
@@ -116,18 +116,15 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkDropDown" id="hinting">
|
<object class="GtkComboBoxText" id="hinting">
|
||||||
|
<property name="active">0</property>
|
||||||
<property name="valign">center</property>
|
<property name="valign">center</property>
|
||||||
<property name="model">
|
<items>
|
||||||
<object class="GtkStringList">
|
<item translatable="yes" id="none">None</item>
|
||||||
<items>
|
<item translatable="yes" id="slight">Slight</item>
|
||||||
<item translatable="yes">None</item>
|
<item translatable="yes" id="medium">Medium</item>
|
||||||
<item translatable="yes">Slight</item>
|
<item translatable="yes" id="full">Full</item>
|
||||||
<item translatable="yes">Medium</item>
|
</items>
|
||||||
<item translatable="yes">Full</item>
|
|
||||||
</items>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
#include "gtkshadertoy.h"
|
#include "gtkshadertoy.h"
|
||||||
#include "gskshaderpaintable.h"
|
#include "gskshaderpaintable.h"
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
static GtkWidget *demo_window = NULL;
|
static GtkWidget *demo_window = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -144,6 +146,7 @@ make_shader_stack (const char *name,
|
|||||||
GtkTextBuffer *buffer;
|
GtkTextBuffer *buffer;
|
||||||
GBytes *bytes;
|
GBytes *bytes;
|
||||||
GtkEventController *controller;
|
GtkEventController *controller;
|
||||||
|
GtkCssProvider *provider;
|
||||||
GdkPaintable *paintable;
|
GdkPaintable *paintable;
|
||||||
|
|
||||||
stack = gtk_shader_stack_new ();
|
stack = gtk_shader_stack_new ();
|
||||||
@@ -234,6 +237,12 @@ make_shader_stack (const char *name,
|
|||||||
g_signal_connect (buffer, "changed", G_CALLBACK (text_changed), button);
|
g_signal_connect (buffer, "changed", G_CALLBACK (text_changed), button);
|
||||||
g_object_set_data (G_OBJECT (button), "the-stack", stack);
|
g_object_set_data (G_OBJECT (button), "the-stack", stack);
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (apply_text), buffer);
|
g_signal_connect (button, "clicked", G_CALLBACK (apply_text), buffer);
|
||||||
|
provider = gtk_css_provider_new ();
|
||||||
|
gtk_css_provider_load_from_data (provider, "button.small { padding: 0; }", -1);
|
||||||
|
gtk_style_context_add_provider (gtk_widget_get_style_context (button),
|
||||||
|
GTK_STYLE_PROVIDER (provider),
|
||||||
|
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||||
|
g_object_unref (provider);
|
||||||
gtk_widget_set_halign (button, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (button, GTK_ALIGN_CENTER);
|
||||||
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
|
||||||
gtk_widget_add_css_class (button, "small");
|
gtk_widget_add_css_class (button, "small");
|
||||||
@@ -267,21 +276,11 @@ make_shader_stack (const char *name,
|
|||||||
return vbox;
|
return vbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
remove_provider (gpointer data)
|
|
||||||
{
|
|
||||||
GtkStyleProvider *provider = GTK_STYLE_PROVIDER (data);
|
|
||||||
|
|
||||||
gtk_style_context_remove_provider_for_display (gdk_display_get_default (), provider);
|
|
||||||
g_object_unref (provider);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
create_gltransition_window (GtkWidget *do_widget)
|
create_gltransition_window (GtkWidget *do_widget)
|
||||||
{
|
{
|
||||||
GtkWidget *window, *headerbar, *scale, *outer_grid, *grid, *background;
|
GtkWidget *window, *headerbar, *scale, *outer_grid, *grid, *background;
|
||||||
GdkPaintable *paintable;
|
GdkPaintable *paintable;
|
||||||
GtkCssProvider *provider;
|
|
||||||
|
|
||||||
window = gtk_window_new ();
|
window = gtk_window_new ();
|
||||||
gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
|
gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
|
||||||
@@ -336,14 +335,6 @@ create_gltransition_window (GtkWidget *do_widget)
|
|||||||
make_shader_stack ("Kaleidoscope", "/gltransition/kaleidoscope.glsl", 3, scale),
|
make_shader_stack ("Kaleidoscope", "/gltransition/kaleidoscope.glsl", 3, scale),
|
||||||
1, 1, 1, 1);
|
1, 1, 1, 1);
|
||||||
|
|
||||||
provider = gtk_css_provider_new ();
|
|
||||||
gtk_css_provider_load_from_data (provider, "button.small { padding: 0; }", -1);
|
|
||||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
|
||||||
GTK_STYLE_PROVIDER (provider),
|
|
||||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
||||||
|
|
||||||
g_object_set_data_full (G_OBJECT (window), "provider", provider, remove_provider);
|
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -422,10 +422,6 @@ do_listview_settings (GtkWidget *do_widget)
|
|||||||
gtk_column_view_column_set_sorter (name_column, sorter);
|
gtk_column_view_column_set_sorter (name_column, sorter);
|
||||||
g_object_unref (sorter);
|
g_object_unref (sorter);
|
||||||
|
|
||||||
sorter = GTK_SORTER (gtk_string_sorter_new (gtk_property_expression_new (SETTINGS_TYPE_KEY, NULL, "type")));
|
|
||||||
gtk_column_view_column_set_sorter (type_column, sorter);
|
|
||||||
g_object_unref (sorter);
|
|
||||||
|
|
||||||
g_object_unref (builder);
|
g_object_unref (builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#include "script-names.h"
|
#include "script-names.h"
|
||||||
#include "unicode-names.h"
|
#include "unicode-names.h"
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
#define UCD_TYPE_ITEM (ucd_item_get_type ())
|
#define UCD_TYPE_ITEM (ucd_item_get_type ())
|
||||||
G_DECLARE_FINAL_TYPE (UcdItem, ucd_item, UCD, ITEM, GObject)
|
G_DECLARE_FINAL_TYPE (UcdItem, ucd_item, UCD, ITEM, GObject)
|
||||||
|
|
||||||
@@ -337,15 +339,6 @@ create_ucd_view (GtkWidget *label)
|
|||||||
|
|
||||||
static GtkWidget *window;
|
static GtkWidget *window;
|
||||||
|
|
||||||
static void
|
|
||||||
remove_provider (gpointer data)
|
|
||||||
{
|
|
||||||
GtkStyleProvider *provider = GTK_STYLE_PROVIDER (data);
|
|
||||||
|
|
||||||
gtk_style_context_remove_provider_for_display (gdk_display_get_default (), provider);
|
|
||||||
g_object_unref (provider);
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
do_listview_ucd (GtkWidget *do_widget)
|
do_listview_ucd (GtkWidget *do_widget)
|
||||||
{
|
{
|
||||||
@@ -368,7 +361,7 @@ do_listview_ucd (GtkWidget *do_widget)
|
|||||||
gtk_widget_add_css_class (label, "enormous");
|
gtk_widget_add_css_class (label, "enormous");
|
||||||
provider = gtk_css_provider_new ();
|
provider = gtk_css_provider_new ();
|
||||||
gtk_css_provider_load_from_data (provider, "label.enormous { font-size: 80px; }", -1);
|
gtk_css_provider_load_from_data (provider, "label.enormous { font-size: 80px; }", -1);
|
||||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (), GTK_STYLE_PROVIDER (provider), 800);
|
gtk_style_context_add_provider (gtk_widget_get_style_context (label), GTK_STYLE_PROVIDER (provider), 800);
|
||||||
gtk_widget_set_hexpand (label, TRUE);
|
gtk_widget_set_hexpand (label, TRUE);
|
||||||
gtk_box_append (GTK_BOX (box), label);
|
gtk_box_append (GTK_BOX (box), label);
|
||||||
|
|
||||||
@@ -378,8 +371,6 @@ do_listview_ucd (GtkWidget *do_widget)
|
|||||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), listview);
|
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), listview);
|
||||||
gtk_box_prepend (GTK_BOX (box), sw);
|
gtk_box_prepend (GTK_BOX (box), sw);
|
||||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||||
|
|
||||||
g_object_set_data_full (G_OBJECT (window), "provider", provider, remove_provider);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
/* Create an object for the pegs that get moved around in the game.
|
/* Create an object for the pegs that get moved around in the game.
|
||||||
*
|
*
|
||||||
@@ -360,15 +361,6 @@ drop_drop (GtkDropTarget *target,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
remove_provider (gpointer data)
|
|
||||||
{
|
|
||||||
GtkStyleProvider *provider = GTK_STYLE_PROVIDER (data);
|
|
||||||
|
|
||||||
gtk_style_context_remove_provider_for_display (gdk_display_get_default (), provider);
|
|
||||||
g_object_unref (provider);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_board (GtkWidget *window)
|
create_board (GtkWidget *window)
|
||||||
{
|
{
|
||||||
@@ -385,9 +377,6 @@ create_board (GtkWidget *window)
|
|||||||
|
|
||||||
provider = gtk_css_provider_new ();
|
provider = gtk_css_provider_new ();
|
||||||
gtk_css_provider_load_from_data (provider, css, -1);
|
gtk_css_provider_load_from_data (provider, css, -1);
|
||||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
|
||||||
GTK_STYLE_PROVIDER (provider),
|
|
||||||
800);
|
|
||||||
|
|
||||||
grid = gtk_grid_new ();
|
grid = gtk_grid_new ();
|
||||||
gtk_widget_set_halign (grid, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (grid, GTK_ALIGN_CENTER);
|
||||||
@@ -406,6 +395,9 @@ create_board (GtkWidget *window)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
image = gtk_image_new ();
|
image = gtk_image_new ();
|
||||||
|
gtk_style_context_add_provider (gtk_widget_get_style_context (image),
|
||||||
|
GTK_STYLE_PROVIDER (provider),
|
||||||
|
800);
|
||||||
gtk_widget_add_css_class (image, "solitaire-field");
|
gtk_widget_add_css_class (image, "solitaire-field");
|
||||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||||
if (x != 3 || y != 3)
|
if (x != 3 || y != 3)
|
||||||
@@ -449,7 +441,7 @@ create_board (GtkWidget *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_set_data_full (G_OBJECT (window), "provider", provider, remove_provider);
|
g_object_unref (provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ enum {
|
|||||||
NUM_PROPERTIES
|
NUM_PROPERTIES
|
||||||
};
|
};
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||||
static void
|
static void
|
||||||
pixbuf_paintable_snapshot (GdkPaintable *paintable,
|
pixbuf_paintable_snapshot (GdkPaintable *paintable,
|
||||||
GdkSnapshot *snapshot,
|
GdkSnapshot *snapshot,
|
||||||
@@ -36,6 +37,7 @@ pixbuf_paintable_snapshot (GdkPaintable *paintable,
|
|||||||
|
|
||||||
g_object_unref (texture);
|
g_object_unref (texture);
|
||||||
}
|
}
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
pixbuf_paintable_get_intrinsic_width (GdkPaintable *paintable)
|
pixbuf_paintable_get_intrinsic_width (GdkPaintable *paintable)
|
||||||
|
|||||||
@@ -16,6 +16,26 @@
|
|||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
|
/* Convenience function to create a combo box holding a number of strings
|
||||||
|
*/
|
||||||
|
GtkWidget *
|
||||||
|
create_combo_box (const char **strings)
|
||||||
|
{
|
||||||
|
GtkWidget *combo_box;
|
||||||
|
const char **str;
|
||||||
|
|
||||||
|
combo_box = gtk_combo_box_text_new ();
|
||||||
|
|
||||||
|
for (str = strings; *str; str++)
|
||||||
|
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), *str);
|
||||||
|
|
||||||
|
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
|
||||||
|
|
||||||
|
return combo_box;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_row (GtkGrid *table,
|
add_row (GtkGrid *table,
|
||||||
int row,
|
int row,
|
||||||
@@ -23,7 +43,7 @@ add_row (GtkGrid *table,
|
|||||||
const char *label_text,
|
const char *label_text,
|
||||||
const char **options)
|
const char **options)
|
||||||
{
|
{
|
||||||
GtkWidget *dropdown;
|
GtkWidget *combo_box;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
|
|
||||||
label = gtk_label_new_with_mnemonic (label_text);
|
label = gtk_label_new_with_mnemonic (label_text);
|
||||||
@@ -32,12 +52,12 @@ add_row (GtkGrid *table,
|
|||||||
gtk_widget_set_hexpand (label, TRUE);
|
gtk_widget_set_hexpand (label, TRUE);
|
||||||
gtk_grid_attach (table, label, 0, row, 1, 1);
|
gtk_grid_attach (table, label, 0, row, 1, 1);
|
||||||
|
|
||||||
dropdown = gtk_drop_down_new_from_strings (options);
|
combo_box = create_combo_box (options);
|
||||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), dropdown);
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo_box);
|
||||||
gtk_widget_set_halign (dropdown, GTK_ALIGN_END);
|
gtk_widget_set_halign (combo_box, GTK_ALIGN_END);
|
||||||
gtk_widget_set_valign (dropdown, GTK_ALIGN_BASELINE);
|
gtk_widget_set_valign (combo_box, GTK_ALIGN_BASELINE);
|
||||||
gtk_size_group_add_widget (size_group, dropdown);
|
gtk_size_group_add_widget (size_group, combo_box);
|
||||||
gtk_grid_attach (table, dropdown, 1, row, 1, 1);
|
gtk_grid_attach (table, combo_box, 1, row, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include <stdlib.h> /* for exit() */
|
#include <stdlib.h> /* for exit() */
|
||||||
#include "paintable.h"
|
#include "paintable.h"
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
static void easter_egg_callback (GtkWidget *button, gpointer data);
|
static void easter_egg_callback (GtkWidget *button, gpointer data);
|
||||||
|
|
||||||
@@ -430,11 +431,11 @@ attach_widgets (GtkTextView *text_view)
|
|||||||
}
|
}
|
||||||
else if (i == 1)
|
else if (i == 1)
|
||||||
{
|
{
|
||||||
const char *options[] = {
|
widget = gtk_combo_box_text_new ();
|
||||||
"Option 1", "Option 2", "Option 3", NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
widget = gtk_drop_down_new_from_strings (options);
|
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 1");
|
||||||
|
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 2");
|
||||||
|
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 3");
|
||||||
}
|
}
|
||||||
else if (i == 2)
|
else if (i == 2)
|
||||||
{
|
{
|
||||||
|
|||||||
+10
-11
@@ -1,6 +1,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GtkApplication parent_instance;
|
GtkApplication parent_instance;
|
||||||
@@ -350,8 +352,7 @@ quit_activated (GSimpleAction *action,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
combo_changed (GtkDropDown *combo,
|
combo_changed (GtkComboBox *combo,
|
||||||
GParamSpec *pspec,
|
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkDialog *dialog = user_data;
|
GtkDialog *dialog = user_data;
|
||||||
@@ -360,7 +361,7 @@ combo_changed (GtkDropDown *combo,
|
|||||||
char **accels;
|
char **accels;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
action = gtk_drop_down_get_selected_string (combo);
|
action = gtk_combo_box_get_active_id (combo);
|
||||||
|
|
||||||
if (!action)
|
if (!action)
|
||||||
return;
|
return;
|
||||||
@@ -389,7 +390,7 @@ response (GtkDialog *dialog,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkEntry *entry = g_object_get_data (user_data, "entry");
|
GtkEntry *entry = g_object_get_data (user_data, "entry");
|
||||||
GtkDropDown *combo = g_object_get_data (user_data, "combo");
|
GtkComboBox *combo = g_object_get_data (user_data, "combo");
|
||||||
const char *action;
|
const char *action;
|
||||||
const char *str;
|
const char *str;
|
||||||
char **accels;
|
char **accels;
|
||||||
@@ -400,7 +401,7 @@ response (GtkDialog *dialog,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
action = gtk_drop_down_get_selected_string (combo);
|
action = gtk_combo_box_get_active_id (combo);
|
||||||
|
|
||||||
if (!action)
|
if (!action)
|
||||||
return;
|
return;
|
||||||
@@ -425,7 +426,6 @@ edit_accels (GSimpleAction *action,
|
|||||||
char **actions;
|
char **actions;
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
int i;
|
int i;
|
||||||
GtkStringList *strings;
|
|
||||||
|
|
||||||
dialog = gtk_dialog_new_with_buttons ("Accelerators",
|
dialog = gtk_dialog_new_with_buttons ("Accelerators",
|
||||||
NULL,
|
NULL,
|
||||||
@@ -437,8 +437,7 @@ edit_accels (GSimpleAction *action,
|
|||||||
gtk_window_set_application (GTK_WINDOW (dialog), app);
|
gtk_window_set_application (GTK_WINDOW (dialog), app);
|
||||||
actions = gtk_application_list_action_descriptions (app);
|
actions = gtk_application_list_action_descriptions (app);
|
||||||
|
|
||||||
strings = gtk_string_list_new (NULL);
|
combo = gtk_combo_box_text_new ();
|
||||||
combo = gtk_drop_down_new (G_LIST_MODEL (strings), NULL);
|
|
||||||
g_object_set (gtk_dialog_get_content_area (GTK_DIALOG (dialog)),
|
g_object_set (gtk_dialog_get_content_area (GTK_DIALOG (dialog)),
|
||||||
"margin-top", 10,
|
"margin-top", 10,
|
||||||
"margin-bottom", 10,
|
"margin-bottom", 10,
|
||||||
@@ -449,8 +448,8 @@ edit_accels (GSimpleAction *action,
|
|||||||
|
|
||||||
gtk_box_append (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), combo);
|
gtk_box_append (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), combo);
|
||||||
for (i = 0; actions[i]; i++)
|
for (i = 0; actions[i]; i++)
|
||||||
gtk_string_list_append (strings, actions[i]);
|
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), actions[i], actions[i]);
|
||||||
g_signal_connect (combo, "notify::selected", G_CALLBACK (combo_changed), dialog);
|
g_signal_connect (combo, "changed", G_CALLBACK (combo_changed), dialog);
|
||||||
|
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_widget_set_hexpand (entry, TRUE);
|
gtk_widget_set_hexpand (entry, TRUE);
|
||||||
@@ -461,7 +460,7 @@ edit_accels (GSimpleAction *action,
|
|||||||
g_object_set_data (G_OBJECT (dialog), "combo", combo);
|
g_object_set_data (G_OBJECT (dialog), "combo", combo);
|
||||||
g_object_set_data (G_OBJECT (dialog), "entry", entry);
|
g_object_set_data (G_OBJECT (dialog), "entry", entry);
|
||||||
|
|
||||||
gtk_drop_down_set_selected (GTK_DROP_DOWN (combo), 0);
|
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
|
||||||
|
|
||||||
gtk_widget_show (dialog);
|
gtk_widget_show (dialog);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ gdk_wayland_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
|||||||
{
|
{
|
||||||
const xkb_keysym_t *syms;
|
const xkb_keysym_t *syms;
|
||||||
int num_syms;
|
int num_syms;
|
||||||
num_syms = xkb_keymap_key_get_syms_by_level (xkb_keymap, hardware_keycode, layout, level, &syms);
|
num_syms = xkb_keymap_key_get_syms_by_level (xkb_keymap, hardware_keycode, layout, 0, &syms);
|
||||||
if (keys)
|
if (keys)
|
||||||
{
|
{
|
||||||
(*keys)[i].keycode = hardware_keycode;
|
(*keys)[i].keycode = hardware_keycode;
|
||||||
|
|||||||
@@ -41,10 +41,6 @@
|
|||||||
*
|
*
|
||||||
* To obtain the application that has been selected in a `GtkAppChooser`,
|
* To obtain the application that has been selected in a `GtkAppChooser`,
|
||||||
* use [method@Gtk.AppChooser.get_app_info].
|
* use [method@Gtk.AppChooser.get_app_info].
|
||||||
*
|
|
||||||
* Deprecated: 4.10: The application selection widgets should be
|
|
||||||
* implemented according to the design of each platform and/or
|
|
||||||
* application requiring them.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|||||||
@@ -45,13 +45,9 @@
|
|||||||
* To track changes in the selected application, use the
|
* To track changes in the selected application, use the
|
||||||
* [signal@Gtk.AppChooserButton::changed] signal.
|
* [signal@Gtk.AppChooserButton::changed] signal.
|
||||||
*
|
*
|
||||||
* ## CSS nodes
|
* # CSS nodes
|
||||||
*
|
*
|
||||||
* `GtkAppChooserButton` has a single CSS node with the name “appchooserbutton”.
|
* `GtkAppChooserButton` has a single CSS node with the name “appchooserbutton”.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: The application selection widgets should be
|
|
||||||
* implemented according to the design of each platform and/or
|
|
||||||
* application requiring them.
|
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|||||||
@@ -37,10 +37,6 @@
|
|||||||
*
|
*
|
||||||
* To set the heading that is shown above the `GtkAppChooserWidget`,
|
* To set the heading that is shown above the `GtkAppChooserWidget`,
|
||||||
* use [method@Gtk.AppChooserDialog.set_heading].
|
* use [method@Gtk.AppChooserDialog.set_heading].
|
||||||
*
|
|
||||||
* Deprecated: 4.10: The application selection widgets should be
|
|
||||||
* implemented according to the design of each platform and/or
|
|
||||||
* application requiring them.
|
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|||||||
@@ -69,13 +69,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* [signal@Gtk.AppChooserWidget::application-selected] and
|
* [signal@Gtk.AppChooserWidget::application-selected] and
|
||||||
* [signal@Gtk.AppChooserWidget::application-activated] signals.
|
* [signal@Gtk.AppChooserWidget::application-activated] signals.
|
||||||
*
|
*
|
||||||
* ## CSS nodes
|
* # CSS nodes
|
||||||
*
|
*
|
||||||
* `GtkAppChooserWidget` has a single CSS node with name appchooser.
|
* `GtkAppChooserWidget` has a single CSS node with name appchooser.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: The application selection widgets should be
|
|
||||||
* implemented according to the design of each platform and/or
|
|
||||||
* application requiring them.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _GtkAppChooserWidgetClass GtkAppChooserWidgetClass;
|
typedef struct _GtkAppChooserWidgetClass GtkAppChooserWidgetClass;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
* Usually users dont have to interact with the `GtkCellArea` directly
|
* Usually users dont have to interact with the `GtkCellArea` directly
|
||||||
* unless they are implementing a cell-layouting widget themselves.
|
* unless they are implementing a cell-layouting widget themselves.
|
||||||
*
|
*
|
||||||
* ## Requesting area sizes
|
* # Requesting area sizes
|
||||||
*
|
*
|
||||||
* As outlined in
|
* As outlined in
|
||||||
* [GtkWidget’s geometry management section](class.Widget.html#height-for-width-geometry-management),
|
* [GtkWidget’s geometry management section](class.Widget.html#height-for-width-geometry-management),
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
* values while more and more height is required for the row heights
|
* values while more and more height is required for the row heights
|
||||||
* that are calculated in the background.
|
* that are calculated in the background.
|
||||||
*
|
*
|
||||||
* ## Rendering Areas
|
* # Rendering Areas
|
||||||
*
|
*
|
||||||
* Once area sizes have been acquired at least for the rows in the
|
* Once area sizes have been acquired at least for the rows in the
|
||||||
* visible area of the layouting widget they can be rendered at
|
* visible area of the layouting widget they can be rendered at
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
* would make sense to calculate the allocation for each row at
|
* would make sense to calculate the allocation for each row at
|
||||||
* the time the widget is allocated using [func@Gtk.distribute_natural_allocation].
|
* the time the widget is allocated using [func@Gtk.distribute_natural_allocation].
|
||||||
*
|
*
|
||||||
* ## Handling Events and Driving Keyboard Focus
|
* # Handling Events and Driving Keyboard Focus
|
||||||
*
|
*
|
||||||
* Passing events to the area is as simple as handling events on any
|
* Passing events to the area is as simple as handling events on any
|
||||||
* normal widget and then passing them to the [method@Gtk.CellArea.event]
|
* normal widget and then passing them to the [method@Gtk.CellArea.event]
|
||||||
@@ -316,7 +316,7 @@
|
|||||||
* Note that the layouting widget is responsible for matching the
|
* Note that the layouting widget is responsible for matching the
|
||||||
* `GtkDirectionType` values to the way it lays out its cells.
|
* `GtkDirectionType` values to the way it lays out its cells.
|
||||||
*
|
*
|
||||||
* ## Cell Properties
|
* # Cell Properties
|
||||||
*
|
*
|
||||||
* The `GtkCellArea` introduces cell properties for `GtkCellRenderer`s.
|
* The `GtkCellArea` introduces cell properties for `GtkCellRenderer`s.
|
||||||
* This provides some general interfaces for defining the relationship
|
* This provides some general interfaces for defining the relationship
|
||||||
@@ -335,9 +335,6 @@
|
|||||||
* [method@Gtk.CellArea.cell_set] or [method@Gtk.CellArea.cell_set_valist]. To obtain
|
* [method@Gtk.CellArea.cell_set] or [method@Gtk.CellArea.cell_set_valist]. To obtain
|
||||||
* the value of a cell property, use [method@Gtk.CellArea.cell_get_property]
|
* the value of a cell property, use [method@Gtk.CellArea.cell_get_property]
|
||||||
* [method@Gtk.CellArea.cell_get] or [method@Gtk.CellArea.cell_get_valist].
|
* [method@Gtk.CellArea.cell_get] or [method@Gtk.CellArea.cell_get_valist].
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets for displaying their
|
|
||||||
* contents
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|||||||
@@ -42,9 +42,6 @@
|
|||||||
* configured by configuring the `GtkCellAreaBox` align child cell property
|
* configured by configuring the `GtkCellAreaBox` align child cell property
|
||||||
* with gtk_cell_area_cell_set_property() or by specifying the "align"
|
* with gtk_cell_area_cell_set_property() or by specifying the "align"
|
||||||
* argument to gtk_cell_area_box_pack_start() and gtk_cell_area_box_pack_end().
|
* argument to gtk_cell_area_box_pack_start() and gtk_cell_area_box_pack_end().
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets for displaying their
|
|
||||||
* contents
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|||||||
@@ -23,9 +23,6 @@
|
|||||||
* The `GtkCellEditable` interface must be implemented for widgets to be usable
|
* The `GtkCellEditable` interface must be implemented for widgets to be usable
|
||||||
* to edit the contents of a `GtkTreeView` cell. It provides a way to specify how
|
* to edit the contents of a `GtkTreeView` cell. It provides a way to specify how
|
||||||
* temporary widgets should be configured for editing, get the new value, etc.
|
* temporary widgets should be configured for editing, get the new value, etc.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets for displaying their
|
|
||||||
* contents. See [iface@Gtk.Editable] for editable text widgets
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
* gtk_cell_layout_set_cell_data_func() that is called to determine the
|
* gtk_cell_layout_set_cell_data_func() that is called to determine the
|
||||||
* value of the attribute for each cell that is rendered.
|
* value of the attribute for each cell that is rendered.
|
||||||
*
|
*
|
||||||
* ## GtkCellLayouts as GtkBuildable
|
* # GtkCellLayouts as GtkBuildable
|
||||||
*
|
*
|
||||||
* Implementations of GtkCellLayout which also implement the GtkBuildable
|
* Implementations of GtkCellLayout which also implement the GtkBuildable
|
||||||
* interface (`GtkCellView`, `GtkIconView`, `GtkComboBox`,
|
* interface (`GtkCellView`, `GtkIconView`, `GtkComboBox`,
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
* </object>
|
* </object>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* ## Subclassing GtkCellLayout implementations
|
* # Subclassing GtkCellLayout implementations
|
||||||
*
|
*
|
||||||
* When subclassing a widget that implements `GtkCellLayout` like
|
* When subclassing a widget that implements `GtkCellLayout` like
|
||||||
* `GtkIconView` or `GtkComboBox`, there are some considerations related
|
* `GtkIconView` or `GtkComboBox`, there are some considerations related
|
||||||
@@ -126,9 +126,6 @@
|
|||||||
* to support alternative cell areas, you can do so by moving the
|
* to support alternative cell areas, you can do so by moving the
|
||||||
* problematic calls out of `init()` and into a `constructor()`
|
* problematic calls out of `init()` and into a `constructor()`
|
||||||
* for your class.
|
* for your class.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents.
|
|
||||||
* See [class@Gtk.LayoutManager] for layout manager delegate objects
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|||||||
@@ -68,9 +68,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* corresponding “set” property, e.g. “cell-background-set” corresponds
|
* corresponding “set” property, e.g. “cell-background-set” corresponds
|
||||||
* to “cell-background”. These “set” properties reflect whether a property
|
* to “cell-background”. These “set” properties reflect whether a property
|
||||||
* has been set or not. You should not set them independently.
|
* has been set or not. You should not set them independently.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets for displaying their
|
|
||||||
* contents
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,10 +41,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* `GtkCellRendererAccel` displays a keyboard accelerator (i.e. a key
|
* `GtkCellRendererAccel` displays a keyboard accelerator (i.e. a key
|
||||||
* combination like `Control + a`). If the cell renderer is editable,
|
* combination like `Control + a`). If the cell renderer is editable,
|
||||||
* the accelerator can be changed by simply typing the new combination.
|
* the accelerator can be changed by simply typing the new combination.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Applications editing keyboard accelerators should
|
|
||||||
* provide their own implementation according to platform design
|
|
||||||
* guidelines
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* box and sets it to display the column specified by its
|
* box and sets it to display the column specified by its
|
||||||
* `GtkCellRendererCombo`:text-column property. Further properties of the combo box
|
* `GtkCellRendererCombo`:text-column property. Further properties of the combo box
|
||||||
* can be set in a handler for the `GtkCellRenderer::editing-started` signal.
|
* can be set in a handler for the `GtkCellRenderer::editing-started` signal.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents. You
|
|
||||||
* should use [class@Gtk.DropDown] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _GtkCellRendererComboPrivate GtkCellRendererComboPrivate;
|
typedef struct _GtkCellRendererComboPrivate GtkCellRendererComboPrivate;
|
||||||
|
|||||||
@@ -48,9 +48,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* renders that pixbuf, if the `GtkCellRenderer:is-expanded` property is %FALSE
|
* renders that pixbuf, if the `GtkCellRenderer:is-expanded` property is %FALSE
|
||||||
* and the `GtkCellRendererPixbuf:pixbuf-expander-closed` property is set to a
|
* and the `GtkCellRendererPixbuf:pixbuf-expander-closed` property is set to a
|
||||||
* pixbuf, it renders that one.
|
* pixbuf, it renders that one.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents. You
|
|
||||||
* should use [class@Gtk.Image] for icons, and [class@Gtk.Picture] for images
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,9 +42,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
*
|
*
|
||||||
* `GtkCellRendererProgress` renders a numeric value as a progress par in a cell.
|
* `GtkCellRendererProgress` renders a numeric value as a progress par in a cell.
|
||||||
* Additionally, it can display a text on top of the progress bar.
|
* Additionally, it can display a text on top of the progress bar.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents.
|
|
||||||
* You should use [class@Gtk.ProgressBar] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* of `GtkCellRendererSpin:digits` to display. Other `GtkSpinButton` properties
|
* of `GtkCellRendererSpin:digits` to display. Other `GtkSpinButton` properties
|
||||||
* can be set in a handler for the `GtkCellRenderer::editing-started` signal.
|
* can be set in a handler for the `GtkCellRenderer::editing-started` signal.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents.
|
* The `GtkCellRendererSpin` cell renderer was added in GTK 2.10.
|
||||||
* You should use [class@Gtk.SpinButton] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _GtkCellRendererSpinClass GtkCellRendererSpinClass;
|
typedef struct _GtkCellRendererSpinClass GtkCellRendererSpinClass;
|
||||||
|
|||||||
@@ -54,9 +54,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* at regular intervals. The usual way to set the cell renderer properties
|
* at regular intervals. The usual way to set the cell renderer properties
|
||||||
* for each cell is to bind them to columns in your tree model using e.g.
|
* for each cell is to bind them to columns in your tree model using e.g.
|
||||||
* gtk_tree_view_column_add_attribute().
|
* gtk_tree_view_column_add_attribute().
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents.
|
|
||||||
* You should use [class@Gtk.Spinner] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,9 +45,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
*
|
*
|
||||||
* If the `GtkCellRenderer:mode` is %GTK_CELL_RENDERER_MODE_EDITABLE,
|
* If the `GtkCellRenderer:mode` is %GTK_CELL_RENDERER_MODE_EDITABLE,
|
||||||
* the `GtkCellRendererText` allows to edit its text using an entry.
|
* the `GtkCellRendererText` allows to edit its text using an entry.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents.
|
|
||||||
* You should use [class@Gtk.Inscription] or [class@Gtk.Label] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,9 +42,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* button is drawn as a radio or a checkbutton, depending on the
|
* button is drawn as a radio or a checkbutton, depending on the
|
||||||
* `GtkCellRendererToggle:radio` property.
|
* `GtkCellRendererToggle:radio` property.
|
||||||
* When activated, it emits the `GtkCellRendererToggle::toggled` signal.
|
* When activated, it emits the `GtkCellRendererToggle::toggled` signal.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents.
|
|
||||||
* You should use [class@Gtk.ToggleButton] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,12 +53,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* individual heights (left-to-right menus should be allocated vertically since
|
* individual heights (left-to-right menus should be allocated vertically since
|
||||||
* they all share the same height but may have variable widths).
|
* they all share the same height but may have variable widths).
|
||||||
*
|
*
|
||||||
* ## CSS nodes
|
* # CSS nodes
|
||||||
*
|
*
|
||||||
* GtkCellView has a single CSS node with name cellview.
|
* GtkCellView has a single CSS node with name cellview.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents.
|
|
||||||
* You can use [class@Gtk.Box] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void gtk_cell_view_constructed (GObject *object);
|
static void gtk_cell_view_constructed (GObject *object);
|
||||||
|
|||||||
@@ -104,11 +104,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* a button, both with the .combo class added. The button also contains another
|
* a button, both with the .combo class added. The button also contains another
|
||||||
* node with name arrow.
|
* node with name arrow.
|
||||||
*
|
*
|
||||||
* ## Accessibility
|
* # Accessibility
|
||||||
*
|
*
|
||||||
* `GtkComboBox` uses the %GTK_ACCESSIBLE_ROLE_COMBO_BOX role.
|
* `GtkComboBox` uses the %GTK_ACCESSIBLE_ROLE_COMBO_BOX role.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -1375,7 +1373,7 @@ gtk_combo_box_menu_popup (GtkComboBox *combo_box)
|
|||||||
*
|
*
|
||||||
* Before calling this, @combo_box must be mapped, or nothing will happen.
|
* Before calling this, @combo_box must be mapped, or nothing will happen.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_popup (GtkComboBox *combo_box)
|
gtk_combo_box_popup (GtkComboBox *combo_box)
|
||||||
@@ -1398,7 +1396,7 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
|
|||||||
* in GTK 4. However, it is retained in case similar functionality is added
|
* in GTK 4. However, it is retained in case similar functionality is added
|
||||||
* back later.
|
* back later.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
|
gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
|
||||||
@@ -1449,7 +1447,7 @@ gtk_combo_box_real_popdown (GtkComboBox *combo_box)
|
|||||||
* This function is mostly intended for use by accessibility technologies;
|
* This function is mostly intended for use by accessibility technologies;
|
||||||
* applications should have little use for it.
|
* applications should have little use for it.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_popdown (GtkComboBox *combo_box)
|
gtk_combo_box_popdown (GtkComboBox *combo_box)
|
||||||
@@ -1853,7 +1851,7 @@ gtk_combo_box_cell_layout_get_area (GtkCellLayout *cell_layout)
|
|||||||
*
|
*
|
||||||
* Returns: A new `GtkComboBox`
|
* Returns: A new `GtkComboBox`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_combo_box_new (void)
|
gtk_combo_box_new (void)
|
||||||
@@ -1872,7 +1870,7 @@ gtk_combo_box_new (void)
|
|||||||
*
|
*
|
||||||
* Returns: A new `GtkComboBox`
|
* Returns: A new `GtkComboBox`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_combo_box_new_with_entry (void)
|
gtk_combo_box_new_with_entry (void)
|
||||||
@@ -1888,7 +1886,7 @@ gtk_combo_box_new_with_entry (void)
|
|||||||
*
|
*
|
||||||
* Returns: A new `GtkComboBox`
|
* Returns: A new `GtkComboBox`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_combo_box_new_with_model (GtkTreeModel *model)
|
gtk_combo_box_new_with_model (GtkTreeModel *model)
|
||||||
@@ -1912,7 +1910,7 @@ gtk_combo_box_new_with_model (GtkTreeModel *model)
|
|||||||
*
|
*
|
||||||
* Returns: A new `GtkComboBox`
|
* Returns: A new `GtkComboBox`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model)
|
gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model)
|
||||||
@@ -1937,7 +1935,7 @@ gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model)
|
|||||||
* Returns: An integer which is the index of the currently active item,
|
* Returns: An integer which is the index of the currently active item,
|
||||||
* or -1 if there’s no active item
|
* or -1 if there’s no active item
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_combo_box_get_active (GtkComboBox *combo_box)
|
gtk_combo_box_get_active (GtkComboBox *combo_box)
|
||||||
@@ -1969,7 +1967,7 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
|
|||||||
*
|
*
|
||||||
* Sets the active item of @combo_box to be the item at @index.
|
* Sets the active item of @combo_box to be the item at @index.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_set_active (GtkComboBox *combo_box,
|
gtk_combo_box_set_active (GtkComboBox *combo_box,
|
||||||
@@ -2068,7 +2066,7 @@ gtk_combo_box_set_active_internal (GtkComboBox *combo_box,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if @iter was set, %FALSE otherwise
|
* Returns: %TRUE if @iter was set, %FALSE otherwise
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_combo_box_get_active_iter (GtkComboBox *combo_box,
|
gtk_combo_box_get_active_iter (GtkComboBox *combo_box,
|
||||||
@@ -2099,7 +2097,7 @@ gtk_combo_box_get_active_iter (GtkComboBox *combo_box,
|
|||||||
*
|
*
|
||||||
* If @iter is %NULL, the active item is unset.
|
* If @iter is %NULL, the active item is unset.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_set_active_iter (GtkComboBox *combo_box,
|
gtk_combo_box_set_active_iter (GtkComboBox *combo_box,
|
||||||
@@ -2130,7 +2128,7 @@ gtk_combo_box_set_active_iter (GtkComboBox *combo_box,
|
|||||||
* call [method@Gtk.CellLayout.clear] yourself if you need to set up different
|
* call [method@Gtk.CellLayout.clear] yourself if you need to set up different
|
||||||
* cell renderers for the new model.
|
* cell renderers for the new model.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_set_model (GtkComboBox *combo_box,
|
gtk_combo_box_set_model (GtkComboBox *combo_box,
|
||||||
@@ -2193,7 +2191,7 @@ out:
|
|||||||
* Returns: (nullable) (transfer none): A `GtkTreeModel` which was passed
|
* Returns: (nullable) (transfer none): A `GtkTreeModel` which was passed
|
||||||
* during construction.
|
* during construction.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkTreeModel *
|
GtkTreeModel *
|
||||||
gtk_combo_box_get_model (GtkComboBox *combo_box)
|
gtk_combo_box_get_model (GtkComboBox *combo_box)
|
||||||
@@ -2552,7 +2550,7 @@ gtk_combo_box_start_editing (GtkCellEditable *cell_editable,
|
|||||||
* If @fixed is %TRUE, the popup's width is set to match the
|
* If @fixed is %TRUE, the popup's width is set to match the
|
||||||
* allocated width of the combo box.
|
* allocated width of the combo box.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_set_popup_fixed_width (GtkComboBox *combo_box,
|
gtk_combo_box_set_popup_fixed_width (GtkComboBox *combo_box,
|
||||||
@@ -2578,7 +2576,7 @@ gtk_combo_box_set_popup_fixed_width (GtkComboBox *combo_box,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if the popup uses a fixed width
|
* Returns: %TRUE if the popup uses a fixed width
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_combo_box_get_popup_fixed_width (GtkComboBox *combo_box)
|
gtk_combo_box_get_popup_fixed_width (GtkComboBox *combo_box)
|
||||||
@@ -2598,7 +2596,7 @@ gtk_combo_box_get_popup_fixed_width (GtkComboBox *combo_box)
|
|||||||
*
|
*
|
||||||
* Returns: (nullable): the current row separator function.
|
* Returns: (nullable): the current row separator function.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkTreeViewRowSeparatorFunc
|
GtkTreeViewRowSeparatorFunc
|
||||||
gtk_combo_box_get_row_separator_func (GtkComboBox *combo_box)
|
gtk_combo_box_get_row_separator_func (GtkComboBox *combo_box)
|
||||||
@@ -2623,7 +2621,7 @@ gtk_combo_box_get_row_separator_func (GtkComboBox *combo_box)
|
|||||||
* If the row separator function is %NULL, no separators are drawn.
|
* If the row separator function is %NULL, no separators are drawn.
|
||||||
* This is the default value.
|
* This is the default value.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box,
|
gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box,
|
||||||
@@ -2657,7 +2655,7 @@ gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box,
|
|||||||
* Sets whether the dropdown button of the combo box should update
|
* Sets whether the dropdown button of the combo box should update
|
||||||
* its sensitivity depending on the model contents.
|
* its sensitivity depending on the model contents.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_set_button_sensitivity (GtkComboBox *combo_box,
|
gtk_combo_box_set_button_sensitivity (GtkComboBox *combo_box,
|
||||||
@@ -2689,7 +2687,7 @@ gtk_combo_box_set_button_sensitivity (GtkComboBox *combo_box,
|
|||||||
* if it is only sensitive as long as the model has one item to
|
* if it is only sensitive as long as the model has one item to
|
||||||
* be selected.
|
* be selected.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkSensitivityType
|
GtkSensitivityType
|
||||||
gtk_combo_box_get_button_sensitivity (GtkComboBox *combo_box)
|
gtk_combo_box_get_button_sensitivity (GtkComboBox *combo_box)
|
||||||
@@ -2709,7 +2707,7 @@ gtk_combo_box_get_button_sensitivity (GtkComboBox *combo_box)
|
|||||||
*
|
*
|
||||||
* Returns: whether there is an entry in @combo_box.
|
* Returns: whether there is an entry in @combo_box.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_combo_box_get_has_entry (GtkComboBox *combo_box)
|
gtk_combo_box_get_has_entry (GtkComboBox *combo_box)
|
||||||
@@ -2738,7 +2736,7 @@ gtk_combo_box_get_has_entry (GtkComboBox *combo_box)
|
|||||||
* This is only relevant if @combo_box has been created with
|
* This is only relevant if @combo_box has been created with
|
||||||
* [property@Gtk.ComboBox:has-entry] as %TRUE.
|
* [property@Gtk.ComboBox:has-entry] as %TRUE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box,
|
gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box,
|
||||||
@@ -2773,7 +2771,7 @@ gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box,
|
|||||||
*
|
*
|
||||||
* Returns: A column in the data source model of @combo_box.
|
* Returns: A column in the data source model of @combo_box.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_combo_box_get_entry_text_column (GtkComboBox *combo_box)
|
gtk_combo_box_get_entry_text_column (GtkComboBox *combo_box)
|
||||||
@@ -2851,7 +2849,7 @@ gtk_combo_box_buildable_get_internal_child (GtkBuildable *buildable,
|
|||||||
* The column @id_column in the model of @combo_box must be of type
|
* The column @id_column in the model of @combo_box must be of type
|
||||||
* %G_TYPE_STRING.
|
* %G_TYPE_STRING.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_set_id_column (GtkComboBox *combo_box,
|
gtk_combo_box_set_id_column (GtkComboBox *combo_box,
|
||||||
@@ -2882,7 +2880,7 @@ gtk_combo_box_set_id_column (GtkComboBox *combo_box,
|
|||||||
*
|
*
|
||||||
* Returns: A column in the data source model of @combo_box.
|
* Returns: A column in the data source model of @combo_box.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_combo_box_get_id_column (GtkComboBox *combo_box)
|
gtk_combo_box_get_id_column (GtkComboBox *combo_box)
|
||||||
@@ -2914,7 +2912,7 @@ gtk_combo_box_get_id_column (GtkComboBox *combo_box)
|
|||||||
*
|
*
|
||||||
* Returns: (nullable): the ID of the active row
|
* Returns: (nullable): the ID of the active row
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
const char *
|
const char *
|
||||||
gtk_combo_box_get_active_id (GtkComboBox *combo_box)
|
gtk_combo_box_get_active_id (GtkComboBox *combo_box)
|
||||||
@@ -2969,7 +2967,7 @@ gtk_combo_box_get_active_id (GtkComboBox *combo_box)
|
|||||||
* @active_id was given to unset the active row, the function
|
* @active_id was given to unset the active row, the function
|
||||||
* always returns %TRUE.
|
* always returns %TRUE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_combo_box_set_active_id (GtkComboBox *combo_box,
|
gtk_combo_box_set_active_id (GtkComboBox *combo_box,
|
||||||
@@ -3034,7 +3032,7 @@ gtk_combo_box_get_popup (GtkComboBox *combo_box)
|
|||||||
*
|
*
|
||||||
* Sets the child widget of @combo_box.
|
* Sets the child widget of @combo_box.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_set_child (GtkComboBox *combo_box,
|
gtk_combo_box_set_child (GtkComboBox *combo_box,
|
||||||
@@ -3062,7 +3060,7 @@ gtk_combo_box_set_child (GtkComboBox *combo_box,
|
|||||||
*
|
*
|
||||||
* Returns: (nullable) (transfer none): the child widget of @combo_box
|
* Returns: (nullable) (transfer none): the child widget of @combo_box
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_combo_box_get_child (GtkComboBox *combo_box)
|
gtk_combo_box_get_child (GtkComboBox *combo_box)
|
||||||
|
|||||||
@@ -71,87 +71,87 @@ struct _GtkComboBoxClass
|
|||||||
/* construction */
|
/* construction */
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_combo_box_get_type (void) G_GNUC_CONST;
|
GType gtk_combo_box_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget *gtk_combo_box_new (void);
|
GtkWidget *gtk_combo_box_new (void);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget *gtk_combo_box_new_with_entry (void);
|
GtkWidget *gtk_combo_box_new_with_entry (void);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget *gtk_combo_box_new_with_model (GtkTreeModel *model);
|
GtkWidget *gtk_combo_box_new_with_model (GtkTreeModel *model);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget *gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model);
|
GtkWidget *gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model);
|
||||||
|
|
||||||
/* get/set active item */
|
/* get/set active item */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_combo_box_get_active (GtkComboBox *combo_box);
|
int gtk_combo_box_get_active (GtkComboBox *combo_box);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_set_active (GtkComboBox *combo_box,
|
void gtk_combo_box_set_active (GtkComboBox *combo_box,
|
||||||
int index_);
|
int index_);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_combo_box_get_active_iter (GtkComboBox *combo_box,
|
gboolean gtk_combo_box_get_active_iter (GtkComboBox *combo_box,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_set_active_iter (GtkComboBox *combo_box,
|
void gtk_combo_box_set_active_iter (GtkComboBox *combo_box,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
|
|
||||||
/* getters and setters */
|
/* getters and setters */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_set_model (GtkComboBox *combo_box,
|
void gtk_combo_box_set_model (GtkComboBox *combo_box,
|
||||||
GtkTreeModel *model);
|
GtkTreeModel *model);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeModel *gtk_combo_box_get_model (GtkComboBox *combo_box);
|
GtkTreeModel *gtk_combo_box_get_model (GtkComboBox *combo_box);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func (GtkComboBox *combo_box);
|
GtkTreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func (GtkComboBox *combo_box);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box,
|
void gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box,
|
||||||
GtkTreeViewRowSeparatorFunc func,
|
GtkTreeViewRowSeparatorFunc func,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
GDestroyNotify destroy);
|
GDestroyNotify destroy);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_set_button_sensitivity (GtkComboBox *combo_box,
|
void gtk_combo_box_set_button_sensitivity (GtkComboBox *combo_box,
|
||||||
GtkSensitivityType sensitivity);
|
GtkSensitivityType sensitivity);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkSensitivityType gtk_combo_box_get_button_sensitivity (GtkComboBox *combo_box);
|
GtkSensitivityType gtk_combo_box_get_button_sensitivity (GtkComboBox *combo_box);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_combo_box_get_has_entry (GtkComboBox *combo_box);
|
gboolean gtk_combo_box_get_has_entry (GtkComboBox *combo_box);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box,
|
void gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box,
|
||||||
int text_column);
|
int text_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_combo_box_get_entry_text_column (GtkComboBox *combo_box);
|
int gtk_combo_box_get_entry_text_column (GtkComboBox *combo_box);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_set_popup_fixed_width (GtkComboBox *combo_box,
|
void gtk_combo_box_set_popup_fixed_width (GtkComboBox *combo_box,
|
||||||
gboolean fixed);
|
gboolean fixed);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_combo_box_get_popup_fixed_width (GtkComboBox *combo_box);
|
gboolean gtk_combo_box_get_popup_fixed_width (GtkComboBox *combo_box);
|
||||||
|
|
||||||
/* programmatic control */
|
/* programmatic control */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_popup (GtkComboBox *combo_box);
|
void gtk_combo_box_popup (GtkComboBox *combo_box);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
|
void gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
|
||||||
GdkDevice *device);
|
GdkDevice *device);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_popdown (GtkComboBox *combo_box);
|
void gtk_combo_box_popdown (GtkComboBox *combo_box);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_combo_box_get_id_column (GtkComboBox *combo_box);
|
int gtk_combo_box_get_id_column (GtkComboBox *combo_box);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_set_id_column (GtkComboBox *combo_box,
|
void gtk_combo_box_set_id_column (GtkComboBox *combo_box,
|
||||||
int id_column);
|
int id_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
const char * gtk_combo_box_get_active_id (GtkComboBox *combo_box);
|
const char * gtk_combo_box_get_active_id (GtkComboBox *combo_box);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_combo_box_set_active_id (GtkComboBox *combo_box,
|
gboolean gtk_combo_box_set_active_id (GtkComboBox *combo_box,
|
||||||
const char *active_id);
|
const char *active_id);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_set_child (GtkComboBox *combo_box,
|
void gtk_combo_box_set_child (GtkComboBox *combo_box,
|
||||||
GtkWidget *child);
|
GtkWidget *child);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget * gtk_combo_box_get_child (GtkComboBox *combo_box);
|
GtkWidget * gtk_combo_box_get_child (GtkComboBox *combo_box);
|
||||||
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkComboBox, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkComboBox, g_object_unref)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* You should not call [method@Gtk.ComboBox.set_model] or attempt to pack more
|
* You should not call [method@Gtk.ComboBox.set_model] or attempt to pack more
|
||||||
* cells into this combo box via its [iface@Gtk.CellLayout] interface.
|
* cells into this combo box via its [iface@Gtk.CellLayout] interface.
|
||||||
*
|
*
|
||||||
* ## GtkComboBoxText as GtkBuildable
|
* # GtkComboBoxText as GtkBuildable
|
||||||
*
|
*
|
||||||
* The `GtkComboBoxText` implementation of the `GtkBuildable` interface supports
|
* The `GtkComboBoxText` implementation of the `GtkBuildable` interface supports
|
||||||
* adding items directly using the <items> element and specifying <item>
|
* adding items directly using the <items> element and specifying <item>
|
||||||
@@ -75,7 +75,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* </object>
|
* </object>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* ## CSS nodes
|
* # CSS nodes
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* combobox
|
* combobox
|
||||||
@@ -88,9 +88,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* `GtkComboBoxText` has a single CSS node with name combobox. It adds
|
* `GtkComboBoxText` has a single CSS node with name combobox. It adds
|
||||||
* the style class .combo to the main CSS nodes of its entry and button
|
* the style class .combo to the main CSS nodes of its entry and button
|
||||||
* children, and the .linked class to the node of its internal box.
|
* children, and the .linked class to the node of its internal box.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown] with a [class@Gtk.StringList]
|
|
||||||
* instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _GtkComboBoxTextClass GtkComboBoxTextClass;
|
typedef struct _GtkComboBoxTextClass GtkComboBoxTextClass;
|
||||||
@@ -356,7 +353,7 @@ gtk_combo_box_text_buildable_custom_finished (GtkBuildable *buildable,
|
|||||||
*
|
*
|
||||||
* Returns: A new `GtkComboBoxText`
|
* Returns: A new `GtkComboBoxText`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_combo_box_text_new (void)
|
gtk_combo_box_text_new (void)
|
||||||
@@ -372,7 +369,7 @@ gtk_combo_box_text_new (void)
|
|||||||
*
|
*
|
||||||
* Returns: a new `GtkComboBoxText`
|
* Returns: a new `GtkComboBoxText`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_combo_box_text_new_with_entry (void)
|
gtk_combo_box_text_new_with_entry (void)
|
||||||
@@ -392,7 +389,7 @@ gtk_combo_box_text_new_with_entry (void)
|
|||||||
* This is the same as calling [method@Gtk.ComboBoxText.insert_text]
|
* This is the same as calling [method@Gtk.ComboBoxText.insert_text]
|
||||||
* with a position of -1.
|
* with a position of -1.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_text_append_text (GtkComboBoxText *combo_box,
|
gtk_combo_box_text_append_text (GtkComboBoxText *combo_box,
|
||||||
@@ -411,7 +408,7 @@ gtk_combo_box_text_append_text (GtkComboBoxText *combo_box,
|
|||||||
* This is the same as calling [method@Gtk.ComboBoxText.insert_text]
|
* This is the same as calling [method@Gtk.ComboBoxText.insert_text]
|
||||||
* with a position of 0.
|
* with a position of 0.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box,
|
gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box,
|
||||||
@@ -433,7 +430,7 @@ gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box,
|
|||||||
* This is the same as calling [method@Gtk.ComboBoxText.insert]
|
* This is the same as calling [method@Gtk.ComboBoxText.insert]
|
||||||
* with a %NULL ID string.
|
* with a %NULL ID string.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box,
|
gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box,
|
||||||
@@ -456,7 +453,7 @@ gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box,
|
|||||||
* This is the same as calling [method@Gtk.ComboBoxText.insert]
|
* This is the same as calling [method@Gtk.ComboBoxText.insert]
|
||||||
* with a position of -1.
|
* with a position of -1.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_text_append (GtkComboBoxText *combo_box,
|
gtk_combo_box_text_append (GtkComboBoxText *combo_box,
|
||||||
@@ -479,7 +476,7 @@ gtk_combo_box_text_append (GtkComboBoxText *combo_box,
|
|||||||
* This is the same as calling [method@Gtk.ComboBoxText.insert]
|
* This is the same as calling [method@Gtk.ComboBoxText.insert]
|
||||||
* with a position of 0.
|
* with a position of 0.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_text_prepend (GtkComboBoxText *combo_box,
|
gtk_combo_box_text_prepend (GtkComboBoxText *combo_box,
|
||||||
@@ -504,7 +501,7 @@ gtk_combo_box_text_prepend (GtkComboBoxText *combo_box,
|
|||||||
*
|
*
|
||||||
* If @position is negative then @text is appended.
|
* If @position is negative then @text is appended.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_text_insert (GtkComboBoxText *combo_box,
|
gtk_combo_box_text_insert (GtkComboBoxText *combo_box,
|
||||||
@@ -557,7 +554,7 @@ gtk_combo_box_text_insert (GtkComboBoxText *combo_box,
|
|||||||
*
|
*
|
||||||
* Removes the string at @position from @combo_box.
|
* Removes the string at @position from @combo_box.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_text_remove (GtkComboBoxText *combo_box,
|
gtk_combo_box_text_remove (GtkComboBoxText *combo_box,
|
||||||
@@ -584,7 +581,7 @@ gtk_combo_box_text_remove (GtkComboBoxText *combo_box,
|
|||||||
*
|
*
|
||||||
* Removes all the text entries from the combo box.
|
* Removes all the text entries from the combo box.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box)
|
gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box)
|
||||||
@@ -612,7 +609,7 @@ gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box)
|
|||||||
* string containing the currently active text.
|
* string containing the currently active text.
|
||||||
* Must be freed with g_free().
|
* Must be freed with g_free().
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.DropDown]
|
* Deprecated: 4.10: Use GtkDropDown
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box)
|
gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box)
|
||||||
|
|||||||
@@ -35,38 +35,38 @@ typedef struct _GtkComboBoxText GtkComboBoxText;
|
|||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_combo_box_text_get_type (void) G_GNUC_CONST;
|
GType gtk_combo_box_text_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget* gtk_combo_box_text_new (void);
|
GtkWidget* gtk_combo_box_text_new (void);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget* gtk_combo_box_text_new_with_entry (void);
|
GtkWidget* gtk_combo_box_text_new_with_entry (void);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_text_append_text (GtkComboBoxText *combo_box,
|
void gtk_combo_box_text_append_text (GtkComboBoxText *combo_box,
|
||||||
const char *text);
|
const char *text);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box,
|
void gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box,
|
||||||
int position,
|
int position,
|
||||||
const char *text);
|
const char *text);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box,
|
void gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box,
|
||||||
const char *text);
|
const char *text);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_text_remove (GtkComboBoxText *combo_box,
|
void gtk_combo_box_text_remove (GtkComboBoxText *combo_box,
|
||||||
int position);
|
int position);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box);
|
void gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
char *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box);
|
char *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_text_insert (GtkComboBoxText *combo_box,
|
void gtk_combo_box_text_insert (GtkComboBoxText *combo_box,
|
||||||
int position,
|
int position,
|
||||||
const char *id,
|
const char *id,
|
||||||
const char *text);
|
const char *text);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_text_append (GtkComboBoxText *combo_box,
|
void gtk_combo_box_text_append (GtkComboBoxText *combo_box,
|
||||||
const char *id,
|
const char *id,
|
||||||
const char *text);
|
const char *text);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropDown and GtkStringList)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_combo_box_text_prepend (GtkComboBoxText *combo_box,
|
void gtk_combo_box_text_prepend (GtkComboBoxText *combo_box,
|
||||||
const char *id,
|
const char *id,
|
||||||
const char *text);
|
const char *text);
|
||||||
|
|||||||
@@ -56,8 +56,6 @@
|
|||||||
* [method@Gtk.TreeModelFilter.get_model]. Don’t forget to use
|
* [method@Gtk.TreeModelFilter.get_model]. Don’t forget to use
|
||||||
* [method@Gtk.TreeModelFilter.convert_iter_to_child_iter] to obtain a
|
* [method@Gtk.TreeModelFilter.convert_iter_to_child_iter] to obtain a
|
||||||
* matching iter.
|
* matching iter.
|
||||||
*
|
|
||||||
* Deprecated: 4.10
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -436,7 +434,6 @@ gtk_entry_completion_init (GtkEntryCompletion *completion)
|
|||||||
completion->inline_selection = FALSE;
|
completion->inline_selection = FALSE;
|
||||||
|
|
||||||
completion->filter_model = NULL;
|
completion->filter_model = NULL;
|
||||||
completion->insert_text_signal_group = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -1385,12 +1382,13 @@ gtk_entry_completion_insert_completion_text (GtkEntryCompletion *completion,
|
|||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry));
|
GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry));
|
||||||
|
GtkEntryBuffer *buffer = gtk_text_get_buffer (text);
|
||||||
|
|
||||||
if (completion->changed_id > 0)
|
if (completion->changed_id > 0)
|
||||||
g_signal_handler_block (text, completion->changed_id);
|
g_signal_handler_block (text, completion->changed_id);
|
||||||
|
|
||||||
if (completion->insert_text_signal_group != NULL)
|
if (completion->insert_text_id > 0)
|
||||||
g_signal_group_block (completion->insert_text_signal_group);
|
g_signal_handler_block (buffer, completion->insert_text_id);
|
||||||
|
|
||||||
gtk_editable_set_text (GTK_EDITABLE (completion->entry), new_text);
|
gtk_editable_set_text (GTK_EDITABLE (completion->entry), new_text);
|
||||||
|
|
||||||
@@ -1400,8 +1398,8 @@ gtk_entry_completion_insert_completion_text (GtkEntryCompletion *completion,
|
|||||||
if (completion->changed_id > 0)
|
if (completion->changed_id > 0)
|
||||||
g_signal_handler_unblock (text, completion->changed_id);
|
g_signal_handler_unblock (text, completion->changed_id);
|
||||||
|
|
||||||
if (completion->insert_text_signal_group != NULL)
|
if (completion->insert_text_id > 0)
|
||||||
g_signal_group_unblock (completion->insert_text_signal_group);
|
g_signal_handler_unblock (buffer, completion->insert_text_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -1440,9 +1438,11 @@ gtk_entry_completion_insert_prefix (GtkEntryCompletion *completion)
|
|||||||
|
|
||||||
gboolean done;
|
gboolean done;
|
||||||
char *prefix;
|
char *prefix;
|
||||||
|
GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry));
|
||||||
|
GtkEntryBuffer *buffer = gtk_text_get_buffer (text);
|
||||||
|
|
||||||
if (completion->insert_text_signal_group != NULL)
|
if (completion->insert_text_id > 0)
|
||||||
g_signal_group_block (completion->insert_text_signal_group);
|
g_signal_handler_block (buffer, completion->insert_text_id);
|
||||||
|
|
||||||
prefix = gtk_entry_completion_compute_prefix (completion,
|
prefix = gtk_entry_completion_compute_prefix (completion,
|
||||||
gtk_editable_get_text (GTK_EDITABLE (completion->entry)));
|
gtk_editable_get_text (GTK_EDITABLE (completion->entry)));
|
||||||
@@ -1454,8 +1454,8 @@ gtk_entry_completion_insert_prefix (GtkEntryCompletion *completion)
|
|||||||
g_free (prefix);
|
g_free (prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (completion->insert_text_signal_group != NULL)
|
if (completion->insert_text_id > 0)
|
||||||
g_signal_group_unblock (completion->insert_text_signal_group);
|
g_signal_handler_unblock (buffer, completion->insert_text_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2096,6 +2096,7 @@ connect_completion_signals (GtkEntryCompletion *completion)
|
|||||||
{
|
{
|
||||||
GtkEventController *controller;
|
GtkEventController *controller;
|
||||||
GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry));
|
GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry));
|
||||||
|
GtkEntryBuffer *buffer = gtk_text_get_buffer (text);
|
||||||
|
|
||||||
controller = completion->entry_key_controller = gtk_event_controller_key_new ();
|
controller = completion->entry_key_controller = gtk_event_controller_key_new ();
|
||||||
gtk_event_controller_set_static_name (controller, "gtk-entry-completion");
|
gtk_event_controller_set_static_name (controller, "gtk-entry-completion");
|
||||||
@@ -2110,10 +2111,8 @@ connect_completion_signals (GtkEntryCompletion *completion)
|
|||||||
completion->changed_id =
|
completion->changed_id =
|
||||||
g_signal_connect (text, "changed", G_CALLBACK (gtk_entry_completion_changed), completion);
|
g_signal_connect (text, "changed", G_CALLBACK (gtk_entry_completion_changed), completion);
|
||||||
|
|
||||||
completion->insert_text_signal_group = g_signal_group_new (GTK_TYPE_ENTRY_BUFFER);
|
completion->insert_text_id =
|
||||||
g_signal_group_connect (completion->insert_text_signal_group, "inserted-text", G_CALLBACK (completion_inserted_text_callback), completion);
|
g_signal_connect (buffer, "inserted-text", G_CALLBACK (completion_inserted_text_callback), completion);
|
||||||
g_object_bind_property (text, "buffer", completion->insert_text_signal_group, "target", G_BINDING_SYNC_CREATE);
|
|
||||||
|
|
||||||
g_signal_connect (text, "notify", G_CALLBACK (clear_completion_callback), completion);
|
g_signal_connect (text, "notify", G_CALLBACK (clear_completion_callback), completion);
|
||||||
g_signal_connect_swapped (text, "activate", G_CALLBACK (accept_completion_callback), completion);
|
g_signal_connect_swapped (text, "activate", G_CALLBACK (accept_completion_callback), completion);
|
||||||
}
|
}
|
||||||
@@ -2122,6 +2121,7 @@ static void
|
|||||||
disconnect_completion_signals (GtkEntryCompletion *completion)
|
disconnect_completion_signals (GtkEntryCompletion *completion)
|
||||||
{
|
{
|
||||||
GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry));
|
GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry));
|
||||||
|
GtkEntryBuffer *buffer = gtk_text_get_buffer (text);
|
||||||
|
|
||||||
gtk_widget_remove_controller (GTK_WIDGET (text), completion->entry_key_controller);
|
gtk_widget_remove_controller (GTK_WIDGET (text), completion->entry_key_controller);
|
||||||
gtk_widget_remove_controller (GTK_WIDGET (text), completion->entry_focus_controller);
|
gtk_widget_remove_controller (GTK_WIDGET (text), completion->entry_focus_controller);
|
||||||
@@ -2132,9 +2132,12 @@ disconnect_completion_signals (GtkEntryCompletion *completion)
|
|||||||
g_signal_handler_disconnect (text, completion->changed_id);
|
g_signal_handler_disconnect (text, completion->changed_id);
|
||||||
completion->changed_id = 0;
|
completion->changed_id = 0;
|
||||||
}
|
}
|
||||||
|
if (completion->insert_text_id > 0 &&
|
||||||
g_clear_object (&completion->insert_text_signal_group);
|
g_signal_handler_is_connected (buffer, completion->insert_text_id))
|
||||||
|
{
|
||||||
|
g_signal_handler_disconnect (buffer, completion->insert_text_id);
|
||||||
|
completion->insert_text_id = 0;
|
||||||
|
}
|
||||||
g_signal_handlers_disconnect_by_func (text, G_CALLBACK (clear_completion_callback), completion);
|
g_signal_handlers_disconnect_by_func (text, G_CALLBACK (clear_completion_callback), completion);
|
||||||
g_signal_handlers_disconnect_by_func (text, G_CALLBACK (accept_completion_callback), completion);
|
g_signal_handlers_disconnect_by_func (text, G_CALLBACK (accept_completion_callback), completion);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* `GtkIconView` will only display the first level of the tree and
|
* `GtkIconView` will only display the first level of the tree and
|
||||||
* ignore the tree’s branches.
|
* ignore the tree’s branches.
|
||||||
*
|
*
|
||||||
* ## CSS nodes
|
* # CSS nodes
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* iconview.view
|
* iconview.view
|
||||||
@@ -77,8 +77,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
*
|
*
|
||||||
* `GtkIconView` has a single CSS node with name iconview and style class .view.
|
* `GtkIconView` has a single CSS node with name iconview and style class .view.
|
||||||
* For rubberband selection, a subnode with name rubberband is used.
|
* For rubberband selection, a subnode with name rubberband is used.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SCROLL_EDGE_SIZE 15
|
#define SCROLL_EDGE_SIZE 15
|
||||||
@@ -1941,7 +1939,7 @@ gtk_icon_view_remove_editable (GtkCellArea *area,
|
|||||||
* (icon_view)` in order to give keyboard focus to the widget.
|
* (icon_view)` in order to give keyboard focus to the widget.
|
||||||
* Please note that editing can only happen when the widget is realized.
|
* Please note that editing can only happen when the widget is realized.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_cursor (GtkIconView *icon_view,
|
gtk_icon_view_set_cursor (GtkIconView *icon_view,
|
||||||
@@ -1997,7 +1995,7 @@ gtk_icon_view_set_cursor (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if the cursor is set.
|
* Returns: %TRUE if the cursor is set.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_icon_view_get_cursor (GtkIconView *icon_view,
|
gtk_icon_view_get_cursor (GtkIconView *icon_view,
|
||||||
@@ -3824,7 +3822,7 @@ gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view,
|
|||||||
* the model. If the model changes before the @icon_view is realized, the
|
* the model. If the model changes before the @icon_view is realized, the
|
||||||
* centered path will be modified to reflect this change.
|
* centered path will be modified to reflect this change.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
|
gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
|
||||||
@@ -4018,7 +4016,7 @@ _gtk_icon_view_set_cell_data (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: A newly created `GtkIconView` widget
|
* Returns: A newly created `GtkIconView` widget
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_icon_view_new (void)
|
gtk_icon_view_new (void)
|
||||||
@@ -4035,7 +4033,7 @@ gtk_icon_view_new (void)
|
|||||||
*
|
*
|
||||||
* Returns: A newly created `GtkIconView` widget
|
* Returns: A newly created `GtkIconView` widget
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_icon_view_new_with_area (GtkCellArea *area)
|
gtk_icon_view_new_with_area (GtkCellArea *area)
|
||||||
@@ -4051,7 +4049,7 @@ gtk_icon_view_new_with_area (GtkCellArea *area)
|
|||||||
*
|
*
|
||||||
* Returns: A newly created `GtkIconView` widget.
|
* Returns: A newly created `GtkIconView` widget.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_icon_view_new_with_model (GtkTreeModel *model)
|
gtk_icon_view_new_with_model (GtkTreeModel *model)
|
||||||
@@ -4070,7 +4068,7 @@ gtk_icon_view_new_with_model (GtkTreeModel *model)
|
|||||||
* Returns: (nullable) (transfer full): The `GtkTreePath` corresponding
|
* Returns: (nullable) (transfer full): The `GtkTreePath` corresponding
|
||||||
* to the icon or %NULL if no icon exists at that position.
|
* to the icon or %NULL if no icon exists at that position.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
GtkTreePath *
|
GtkTreePath *
|
||||||
gtk_icon_view_get_path_at_pos (GtkIconView *icon_view,
|
gtk_icon_view_get_path_at_pos (GtkIconView *icon_view,
|
||||||
@@ -4105,7 +4103,7 @@ gtk_icon_view_get_path_at_pos (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if an item exists at the specified position
|
* Returns: %TRUE if an item exists at the specified position
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_icon_view_get_item_at_pos (GtkIconView *icon_view,
|
gtk_icon_view_get_item_at_pos (GtkIconView *icon_view,
|
||||||
@@ -4149,7 +4147,7 @@ gtk_icon_view_get_item_at_pos (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: %FALSE if there is no such item, %TRUE otherwise
|
* Returns: %FALSE if there is no such item, %TRUE otherwise
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_icon_view_get_cell_rect (GtkIconView *icon_view,
|
gtk_icon_view_get_cell_rect (GtkIconView *icon_view,
|
||||||
@@ -4200,7 +4198,7 @@ gtk_icon_view_get_cell_rect (GtkIconView *icon_view,
|
|||||||
* See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
|
* See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
|
||||||
* See also gtk_tooltip_set_tip_area().
|
* See also gtk_tooltip_set_tip_area().
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_tooltip_item (GtkIconView *icon_view,
|
gtk_icon_view_set_tooltip_item (GtkIconView *icon_view,
|
||||||
@@ -4225,7 +4223,7 @@ gtk_icon_view_set_tooltip_item (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
|
* See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_tooltip_cell (GtkIconView *icon_view,
|
gtk_icon_view_set_tooltip_cell (GtkIconView *icon_view,
|
||||||
@@ -4269,7 +4267,7 @@ gtk_icon_view_set_tooltip_cell (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: whether or not the given tooltip context points to an item
|
* Returns: whether or not the given tooltip context points to an item
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_icon_view_get_tooltip_context (GtkIconView *icon_view,
|
gtk_icon_view_get_tooltip_context (GtkIconView *icon_view,
|
||||||
@@ -4366,7 +4364,7 @@ gtk_icon_view_set_tooltip_query_cb (GtkWidget *widget,
|
|||||||
* Note that the signal handler sets the text with gtk_tooltip_set_markup(),
|
* Note that the signal handler sets the text with gtk_tooltip_set_markup(),
|
||||||
* so &, <, etc have to be escaped in the text.
|
* so &, <, etc have to be escaped in the text.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_tooltip_column (GtkIconView *icon_view,
|
gtk_icon_view_set_tooltip_column (GtkIconView *icon_view,
|
||||||
@@ -4408,7 +4406,7 @@ gtk_icon_view_set_tooltip_column (GtkIconView *icon_view,
|
|||||||
* Returns: the index of the tooltip column that is currently being
|
* Returns: the index of the tooltip column that is currently being
|
||||||
* used, or -1 if this is disabled.
|
* used, or -1 if this is disabled.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_tooltip_column (GtkIconView *icon_view)
|
gtk_icon_view_get_tooltip_column (GtkIconView *icon_view)
|
||||||
@@ -4431,7 +4429,7 @@ gtk_icon_view_get_tooltip_column (GtkIconView *icon_view)
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE, if valid paths were placed in @start_path and @end_path
|
* Returns: %TRUE, if valid paths were placed in @start_path and @end_path
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_icon_view_get_visible_range (GtkIconView *icon_view,
|
gtk_icon_view_get_visible_range (GtkIconView *icon_view,
|
||||||
@@ -4488,7 +4486,7 @@ gtk_icon_view_get_visible_range (GtkIconView *icon_view,
|
|||||||
* Calls a function for each selected icon. Note that the model or
|
* Calls a function for each selected icon. Note that the model or
|
||||||
* selection cannot be modified from within this function.
|
* selection cannot be modified from within this function.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_selected_foreach (GtkIconView *icon_view,
|
gtk_icon_view_selected_foreach (GtkIconView *icon_view,
|
||||||
@@ -4516,7 +4514,7 @@ gtk_icon_view_selected_foreach (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Sets the selection mode of the @icon_view.
|
* Sets the selection mode of the @icon_view.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_selection_mode (GtkIconView *icon_view,
|
gtk_icon_view_set_selection_mode (GtkIconView *icon_view,
|
||||||
@@ -4544,7 +4542,7 @@ gtk_icon_view_set_selection_mode (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the current selection mode
|
* Returns: the current selection mode
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
GtkSelectionMode
|
GtkSelectionMode
|
||||||
gtk_icon_view_get_selection_mode (GtkIconView *icon_view)
|
gtk_icon_view_get_selection_mode (GtkIconView *icon_view)
|
||||||
@@ -4564,7 +4562,7 @@ gtk_icon_view_get_selection_mode (GtkIconView *icon_view)
|
|||||||
* it before setting the new model. If @model is %NULL, then
|
* it before setting the new model. If @model is %NULL, then
|
||||||
* it will unset the old model.
|
* it will unset the old model.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_model (GtkIconView *icon_view,
|
gtk_icon_view_set_model (GtkIconView *icon_view,
|
||||||
@@ -4678,7 +4676,7 @@ gtk_icon_view_set_model (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: (nullable) (transfer none): The currently used `GtkTreeModel`
|
* Returns: (nullable) (transfer none): The currently used `GtkTreeModel`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
GtkTreeModel *
|
GtkTreeModel *
|
||||||
gtk_icon_view_get_model (GtkIconView *icon_view)
|
gtk_icon_view_get_model (GtkIconView *icon_view)
|
||||||
@@ -4792,7 +4790,7 @@ update_pixbuf_cell (GtkIconView *icon_view)
|
|||||||
* Sets the column with text for @icon_view to be @column. The text
|
* Sets the column with text for @icon_view to be @column. The text
|
||||||
* column must be of type `G_TYPE_STRING`.
|
* column must be of type `G_TYPE_STRING`.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_text_column (GtkIconView *icon_view,
|
gtk_icon_view_set_text_column (GtkIconView *icon_view,
|
||||||
@@ -4831,7 +4829,7 @@ gtk_icon_view_set_text_column (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the text column, or -1 if it’s unset.
|
* Returns: the text column, or -1 if it’s unset.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_text_column (GtkIconView *icon_view)
|
gtk_icon_view_get_text_column (GtkIconView *icon_view)
|
||||||
@@ -4851,7 +4849,7 @@ gtk_icon_view_get_text_column (GtkIconView *icon_view)
|
|||||||
* If the markup column is set to something, it overrides
|
* If the markup column is set to something, it overrides
|
||||||
* the text column set by gtk_icon_view_set_text_column().
|
* the text column set by gtk_icon_view_set_text_column().
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_markup_column (GtkIconView *icon_view,
|
gtk_icon_view_set_markup_column (GtkIconView *icon_view,
|
||||||
@@ -4890,7 +4888,7 @@ gtk_icon_view_set_markup_column (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the markup column, or -1 if it’s unset.
|
* Returns: the markup column, or -1 if it’s unset.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_markup_column (GtkIconView *icon_view)
|
gtk_icon_view_get_markup_column (GtkIconView *icon_view)
|
||||||
@@ -4908,7 +4906,7 @@ gtk_icon_view_get_markup_column (GtkIconView *icon_view)
|
|||||||
* Sets the column with pixbufs for @icon_view to be @column. The pixbuf
|
* Sets the column with pixbufs for @icon_view to be @column. The pixbuf
|
||||||
* column must be of type `GDK_TYPE_PIXBUF`
|
* column must be of type `GDK_TYPE_PIXBUF`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view,
|
gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view,
|
||||||
@@ -4948,7 +4946,7 @@ gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the pixbuf column, or -1 if it’s unset.
|
* Returns: the pixbuf column, or -1 if it’s unset.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view)
|
gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view)
|
||||||
@@ -4965,7 +4963,7 @@ gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view)
|
|||||||
*
|
*
|
||||||
* Selects the row at @path.
|
* Selects the row at @path.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_select_path (GtkIconView *icon_view,
|
gtk_icon_view_select_path (GtkIconView *icon_view,
|
||||||
@@ -4992,7 +4990,7 @@ gtk_icon_view_select_path (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Unselects the row at @path.
|
* Unselects the row at @path.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_unselect_path (GtkIconView *icon_view,
|
gtk_icon_view_unselect_path (GtkIconView *icon_view,
|
||||||
@@ -5036,7 +5034,7 @@ gtk_icon_view_unselect_path (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: (element-type GtkTreePath) (transfer full): A `GList` containing a `GtkTreePath` for each selected row.
|
* Returns: (element-type GtkTreePath) (transfer full): A `GList` containing a `GtkTreePath` for each selected row.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
GList *
|
GList *
|
||||||
gtk_icon_view_get_selected_items (GtkIconView *icon_view)
|
gtk_icon_view_get_selected_items (GtkIconView *icon_view)
|
||||||
@@ -5068,7 +5066,7 @@ gtk_icon_view_get_selected_items (GtkIconView *icon_view)
|
|||||||
* Selects all the icons. @icon_view must has its selection mode set
|
* Selects all the icons. @icon_view must has its selection mode set
|
||||||
* to %GTK_SELECTION_MULTIPLE.
|
* to %GTK_SELECTION_MULTIPLE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_select_all (GtkIconView *icon_view)
|
gtk_icon_view_select_all (GtkIconView *icon_view)
|
||||||
@@ -5103,7 +5101,7 @@ gtk_icon_view_select_all (GtkIconView *icon_view)
|
|||||||
*
|
*
|
||||||
* Unselects all the icons.
|
* Unselects all the icons.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_unselect_all (GtkIconView *icon_view)
|
gtk_icon_view_unselect_all (GtkIconView *icon_view)
|
||||||
@@ -5131,7 +5129,7 @@ gtk_icon_view_unselect_all (GtkIconView *icon_view)
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if @path is selected.
|
* Returns: %TRUE if @path is selected.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_icon_view_path_is_selected (GtkIconView *icon_view,
|
gtk_icon_view_path_is_selected (GtkIconView *icon_view,
|
||||||
@@ -5162,7 +5160,7 @@ gtk_icon_view_path_is_selected (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: The row in which the item is displayed
|
* Returns: The row in which the item is displayed
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_item_row (GtkIconView *icon_view,
|
gtk_icon_view_get_item_row (GtkIconView *icon_view,
|
||||||
@@ -5193,7 +5191,7 @@ gtk_icon_view_get_item_row (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: The column in which the item is displayed
|
* Returns: The column in which the item is displayed
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_item_column (GtkIconView *icon_view,
|
gtk_icon_view_get_item_column (GtkIconView *icon_view,
|
||||||
@@ -5221,7 +5219,7 @@ gtk_icon_view_get_item_column (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Activates the item determined by @path.
|
* Activates the item determined by @path.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_item_activated (GtkIconView *icon_view,
|
gtk_icon_view_item_activated (GtkIconView *icon_view,
|
||||||
@@ -5241,7 +5239,7 @@ gtk_icon_view_item_activated (GtkIconView *icon_view,
|
|||||||
* Sets the ::item-orientation property which determines whether the labels
|
* Sets the ::item-orientation property which determines whether the labels
|
||||||
* are drawn beside the icons instead of below.
|
* are drawn beside the icons instead of below.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_item_orientation (GtkIconView *icon_view,
|
gtk_icon_view_set_item_orientation (GtkIconView *icon_view,
|
||||||
@@ -5280,7 +5278,7 @@ gtk_icon_view_set_item_orientation (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the relative position of texts and icons
|
* Returns: the relative position of texts and icons
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
GtkOrientation
|
GtkOrientation
|
||||||
gtk_icon_view_get_item_orientation (GtkIconView *icon_view)
|
gtk_icon_view_get_item_orientation (GtkIconView *icon_view)
|
||||||
@@ -5301,7 +5299,7 @@ gtk_icon_view_get_item_orientation (GtkIconView *icon_view)
|
|||||||
* -1, the number of columns will be chosen automatically
|
* -1, the number of columns will be chosen automatically
|
||||||
* to fill the available area.
|
* to fill the available area.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_columns (GtkIconView *icon_view,
|
gtk_icon_view_set_columns (GtkIconView *icon_view,
|
||||||
@@ -5330,7 +5328,7 @@ gtk_icon_view_set_columns (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the number of columns, or -1
|
* Returns: the number of columns, or -1
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_columns (GtkIconView *icon_view)
|
gtk_icon_view_get_columns (GtkIconView *icon_view)
|
||||||
@@ -5349,7 +5347,7 @@ gtk_icon_view_get_columns (GtkIconView *icon_view)
|
|||||||
* to use for each item. If it is set to -1, the icon view will
|
* to use for each item. If it is set to -1, the icon view will
|
||||||
* automatically determine a suitable item size.
|
* automatically determine a suitable item size.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_item_width (GtkIconView *icon_view,
|
gtk_icon_view_set_item_width (GtkIconView *icon_view,
|
||||||
@@ -5380,7 +5378,7 @@ gtk_icon_view_set_item_width (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the width of a single item, or -1
|
* Returns: the width of a single item, or -1
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_item_width (GtkIconView *icon_view)
|
gtk_icon_view_get_item_width (GtkIconView *icon_view)
|
||||||
@@ -5400,7 +5398,7 @@ gtk_icon_view_get_item_width (GtkIconView *icon_view)
|
|||||||
* which is inserted between the cells (i.e. the icon and
|
* which is inserted between the cells (i.e. the icon and
|
||||||
* the text) of an item.
|
* the text) of an item.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_spacing (GtkIconView *icon_view,
|
gtk_icon_view_set_spacing (GtkIconView *icon_view,
|
||||||
@@ -5429,7 +5427,7 @@ gtk_icon_view_set_spacing (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the space between cells
|
* Returns: the space between cells
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_spacing (GtkIconView *icon_view)
|
gtk_icon_view_get_spacing (GtkIconView *icon_view)
|
||||||
@@ -5447,7 +5445,7 @@ gtk_icon_view_get_spacing (GtkIconView *icon_view)
|
|||||||
* Sets the ::row-spacing property which specifies the space
|
* Sets the ::row-spacing property which specifies the space
|
||||||
* which is inserted between the rows of the icon view.
|
* which is inserted between the rows of the icon view.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_row_spacing (GtkIconView *icon_view,
|
gtk_icon_view_set_row_spacing (GtkIconView *icon_view,
|
||||||
@@ -5476,7 +5474,7 @@ gtk_icon_view_set_row_spacing (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the space between rows
|
* Returns: the space between rows
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_row_spacing (GtkIconView *icon_view)
|
gtk_icon_view_get_row_spacing (GtkIconView *icon_view)
|
||||||
@@ -5494,7 +5492,7 @@ gtk_icon_view_get_row_spacing (GtkIconView *icon_view)
|
|||||||
* Sets the ::column-spacing property which specifies the space
|
* Sets the ::column-spacing property which specifies the space
|
||||||
* which is inserted between the columns of the icon view.
|
* which is inserted between the columns of the icon view.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_column_spacing (GtkIconView *icon_view,
|
gtk_icon_view_set_column_spacing (GtkIconView *icon_view,
|
||||||
@@ -5523,7 +5521,7 @@ gtk_icon_view_set_column_spacing (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the space between columns
|
* Returns: the space between columns
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_column_spacing (GtkIconView *icon_view)
|
gtk_icon_view_get_column_spacing (GtkIconView *icon_view)
|
||||||
@@ -5542,7 +5540,7 @@ gtk_icon_view_get_column_spacing (GtkIconView *icon_view)
|
|||||||
* which is inserted at the top, bottom, left and right
|
* which is inserted at the top, bottom, left and right
|
||||||
* of the icon view.
|
* of the icon view.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_margin (GtkIconView *icon_view,
|
gtk_icon_view_set_margin (GtkIconView *icon_view,
|
||||||
@@ -5571,7 +5569,7 @@ gtk_icon_view_set_margin (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the space at the borders
|
* Returns: the space at the borders
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_margin (GtkIconView *icon_view)
|
gtk_icon_view_get_margin (GtkIconView *icon_view)
|
||||||
@@ -5589,7 +5587,7 @@ gtk_icon_view_get_margin (GtkIconView *icon_view)
|
|||||||
* Sets the `GtkIconView`:item-padding property which specifies the padding
|
* Sets the `GtkIconView`:item-padding property which specifies the padding
|
||||||
* around each of the icon view’s items.
|
* around each of the icon view’s items.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_item_padding (GtkIconView *icon_view,
|
gtk_icon_view_set_item_padding (GtkIconView *icon_view,
|
||||||
@@ -5618,7 +5616,7 @@ gtk_icon_view_set_item_padding (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: the padding around items
|
* Returns: the padding around items
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_icon_view_get_item_padding (GtkIconView *icon_view)
|
gtk_icon_view_get_item_padding (GtkIconView *icon_view)
|
||||||
@@ -6345,7 +6343,7 @@ gtk_icon_view_drag_data_received (GObject *source,
|
|||||||
* Turns @icon_view into a drag source for automatic DND. Calling this
|
* Turns @icon_view into a drag source for automatic DND. Calling this
|
||||||
* method sets `GtkIconView`:reorderable to %FALSE.
|
* method sets `GtkIconView`:reorderable to %FALSE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_enable_model_drag_source (GtkIconView *icon_view,
|
gtk_icon_view_enable_model_drag_source (GtkIconView *icon_view,
|
||||||
@@ -6373,7 +6371,7 @@ gtk_icon_view_enable_model_drag_source (GtkIconView *icon_view,
|
|||||||
* Turns @icon_view into a drop destination for automatic DND. Calling this
|
* Turns @icon_view into a drop destination for automatic DND. Calling this
|
||||||
* method sets `GtkIconView`:reorderable to %FALSE.
|
* method sets `GtkIconView`:reorderable to %FALSE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view,
|
gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view,
|
||||||
@@ -6412,7 +6410,7 @@ gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view,
|
|||||||
* Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this
|
* Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this
|
||||||
* method sets `GtkIconView`:reorderable to %FALSE.
|
* method sets `GtkIconView`:reorderable to %FALSE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_unset_model_drag_source (GtkIconView *icon_view)
|
gtk_icon_view_unset_model_drag_source (GtkIconView *icon_view)
|
||||||
@@ -6435,7 +6433,7 @@ gtk_icon_view_unset_model_drag_source (GtkIconView *icon_view)
|
|||||||
* Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this
|
* Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this
|
||||||
* method sets `GtkIconView`:reorderable to %FALSE.
|
* method sets `GtkIconView`:reorderable to %FALSE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view)
|
gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view)
|
||||||
@@ -6464,7 +6462,7 @@ gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view)
|
|||||||
*
|
*
|
||||||
* Sets the item that is highlighted for feedback.
|
* Sets the item that is highlighted for feedback.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_drag_dest_item (GtkIconView *icon_view,
|
gtk_icon_view_set_drag_dest_item (GtkIconView *icon_view,
|
||||||
@@ -6524,7 +6522,7 @@ gtk_icon_view_set_drag_dest_item (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Gets information about the item that is highlighted for feedback.
|
* Gets information about the item that is highlighted for feedback.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view,
|
gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view,
|
||||||
@@ -6557,7 +6555,7 @@ gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: whether there is an item at the given position.
|
* Returns: whether there is an item at the given position.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view,
|
gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view,
|
||||||
@@ -6618,7 +6616,7 @@ gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: (transfer full) (nullable): a newly-allocated `GdkPaintable` of the drag icon.
|
* Returns: (transfer full) (nullable): a newly-allocated `GdkPaintable` of the drag icon.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
GdkPaintable *
|
GdkPaintable *
|
||||||
gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
|
gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
|
||||||
@@ -6669,7 +6667,7 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if the list can be reordered.
|
* Returns: %TRUE if the list can be reordered.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_icon_view_get_reorderable (GtkIconView *icon_view)
|
gtk_icon_view_get_reorderable (GtkIconView *icon_view)
|
||||||
@@ -6697,7 +6695,7 @@ gtk_icon_view_get_reorderable (GtkIconView *icon_view)
|
|||||||
* reordering is allowed. If more control is needed, you should probably
|
* reordering is allowed. If more control is needed, you should probably
|
||||||
* handle drag and drop manually.
|
* handle drag and drop manually.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_reorderable (GtkIconView *icon_view,
|
gtk_icon_view_set_reorderable (GtkIconView *icon_view,
|
||||||
@@ -6741,7 +6739,7 @@ gtk_icon_view_set_reorderable (GtkIconView *icon_view,
|
|||||||
* Causes the `GtkIconView`::item-activated signal to be emitted on
|
* Causes the `GtkIconView`::item-activated signal to be emitted on
|
||||||
* a single click instead of a double click.
|
* a single click instead of a double click.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_icon_view_set_activate_on_single_click (GtkIconView *icon_view,
|
gtk_icon_view_set_activate_on_single_click (GtkIconView *icon_view,
|
||||||
@@ -6766,7 +6764,7 @@ gtk_icon_view_set_activate_on_single_click (GtkIconView *icon_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if item-activated will be emitted on a single click
|
* Returns: %TRUE if item-activated will be emitted on a single click
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.GridView] instead
|
* Deprecated: 4.10: Use GtkGridView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_icon_view_get_activate_on_single_click (GtkIconView *icon_view)
|
gtk_icon_view_get_activate_on_single_click (GtkIconView *icon_view)
|
||||||
|
|||||||
@@ -74,138 +74,138 @@ typedef enum
|
|||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_icon_view_get_type (void) G_GNUC_CONST;
|
GType gtk_icon_view_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget * gtk_icon_view_new (void);
|
GtkWidget * gtk_icon_view_new (void);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget * gtk_icon_view_new_with_area (GtkCellArea *area);
|
GtkWidget * gtk_icon_view_new_with_area (GtkCellArea *area);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget * gtk_icon_view_new_with_model (GtkTreeModel *model);
|
GtkWidget * gtk_icon_view_new_with_model (GtkTreeModel *model);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_model (GtkIconView *icon_view,
|
void gtk_icon_view_set_model (GtkIconView *icon_view,
|
||||||
GtkTreeModel *model);
|
GtkTreeModel *model);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeModel * gtk_icon_view_get_model (GtkIconView *icon_view);
|
GtkTreeModel * gtk_icon_view_get_model (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_text_column (GtkIconView *icon_view,
|
void gtk_icon_view_set_text_column (GtkIconView *icon_view,
|
||||||
int column);
|
int column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_text_column (GtkIconView *icon_view);
|
int gtk_icon_view_get_text_column (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_markup_column (GtkIconView *icon_view,
|
void gtk_icon_view_set_markup_column (GtkIconView *icon_view,
|
||||||
int column);
|
int column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_markup_column (GtkIconView *icon_view);
|
int gtk_icon_view_get_markup_column (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view,
|
void gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view,
|
||||||
int column);
|
int column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view);
|
int gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_item_orientation (GtkIconView *icon_view,
|
void gtk_icon_view_set_item_orientation (GtkIconView *icon_view,
|
||||||
GtkOrientation orientation);
|
GtkOrientation orientation);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkOrientation gtk_icon_view_get_item_orientation (GtkIconView *icon_view);
|
GtkOrientation gtk_icon_view_get_item_orientation (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_columns (GtkIconView *icon_view,
|
void gtk_icon_view_set_columns (GtkIconView *icon_view,
|
||||||
int columns);
|
int columns);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_columns (GtkIconView *icon_view);
|
int gtk_icon_view_get_columns (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_item_width (GtkIconView *icon_view,
|
void gtk_icon_view_set_item_width (GtkIconView *icon_view,
|
||||||
int item_width);
|
int item_width);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_item_width (GtkIconView *icon_view);
|
int gtk_icon_view_get_item_width (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_spacing (GtkIconView *icon_view,
|
void gtk_icon_view_set_spacing (GtkIconView *icon_view,
|
||||||
int spacing);
|
int spacing);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_spacing (GtkIconView *icon_view);
|
int gtk_icon_view_get_spacing (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_row_spacing (GtkIconView *icon_view,
|
void gtk_icon_view_set_row_spacing (GtkIconView *icon_view,
|
||||||
int row_spacing);
|
int row_spacing);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_row_spacing (GtkIconView *icon_view);
|
int gtk_icon_view_get_row_spacing (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_column_spacing (GtkIconView *icon_view,
|
void gtk_icon_view_set_column_spacing (GtkIconView *icon_view,
|
||||||
int column_spacing);
|
int column_spacing);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_column_spacing (GtkIconView *icon_view);
|
int gtk_icon_view_get_column_spacing (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_margin (GtkIconView *icon_view,
|
void gtk_icon_view_set_margin (GtkIconView *icon_view,
|
||||||
int margin);
|
int margin);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_margin (GtkIconView *icon_view);
|
int gtk_icon_view_get_margin (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_item_padding (GtkIconView *icon_view,
|
void gtk_icon_view_set_item_padding (GtkIconView *icon_view,
|
||||||
int item_padding);
|
int item_padding);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_item_padding (GtkIconView *icon_view);
|
int gtk_icon_view_get_item_padding (GtkIconView *icon_view);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath * gtk_icon_view_get_path_at_pos (GtkIconView *icon_view,
|
GtkTreePath * gtk_icon_view_get_path_at_pos (GtkIconView *icon_view,
|
||||||
int x,
|
int x,
|
||||||
int y);
|
int y);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_icon_view_get_item_at_pos (GtkIconView *icon_view,
|
gboolean gtk_icon_view_get_item_at_pos (GtkIconView *icon_view,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
GtkTreePath **path,
|
GtkTreePath **path,
|
||||||
GtkCellRenderer **cell);
|
GtkCellRenderer **cell);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_icon_view_get_visible_range (GtkIconView *icon_view,
|
gboolean gtk_icon_view_get_visible_range (GtkIconView *icon_view,
|
||||||
GtkTreePath **start_path,
|
GtkTreePath **start_path,
|
||||||
GtkTreePath **end_path);
|
GtkTreePath **end_path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_activate_on_single_click (GtkIconView *icon_view,
|
void gtk_icon_view_set_activate_on_single_click (GtkIconView *icon_view,
|
||||||
gboolean single);
|
gboolean single);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_icon_view_get_activate_on_single_click (GtkIconView *icon_view);
|
gboolean gtk_icon_view_get_activate_on_single_click (GtkIconView *icon_view);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_selected_foreach (GtkIconView *icon_view,
|
void gtk_icon_view_selected_foreach (GtkIconView *icon_view,
|
||||||
GtkIconViewForeachFunc func,
|
GtkIconViewForeachFunc func,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_selection_mode (GtkIconView *icon_view,
|
void gtk_icon_view_set_selection_mode (GtkIconView *icon_view,
|
||||||
GtkSelectionMode mode);
|
GtkSelectionMode mode);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkSelectionMode gtk_icon_view_get_selection_mode (GtkIconView *icon_view);
|
GtkSelectionMode gtk_icon_view_get_selection_mode (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_select_path (GtkIconView *icon_view,
|
void gtk_icon_view_select_path (GtkIconView *icon_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_unselect_path (GtkIconView *icon_view,
|
void gtk_icon_view_unselect_path (GtkIconView *icon_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_icon_view_path_is_selected (GtkIconView *icon_view,
|
gboolean gtk_icon_view_path_is_selected (GtkIconView *icon_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_item_row (GtkIconView *icon_view,
|
int gtk_icon_view_get_item_row (GtkIconView *icon_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_item_column (GtkIconView *icon_view,
|
int gtk_icon_view_get_item_column (GtkIconView *icon_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GList *gtk_icon_view_get_selected_items (GtkIconView *icon_view);
|
GList *gtk_icon_view_get_selected_items (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_select_all (GtkIconView *icon_view);
|
void gtk_icon_view_select_all (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_unselect_all (GtkIconView *icon_view);
|
void gtk_icon_view_unselect_all (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_item_activated (GtkIconView *icon_view,
|
void gtk_icon_view_item_activated (GtkIconView *icon_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_cursor (GtkIconView *icon_view,
|
void gtk_icon_view_set_cursor (GtkIconView *icon_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkCellRenderer *cell,
|
GtkCellRenderer *cell,
|
||||||
gboolean start_editing);
|
gboolean start_editing);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_icon_view_get_cursor (GtkIconView *icon_view,
|
gboolean gtk_icon_view_get_cursor (GtkIconView *icon_view,
|
||||||
GtkTreePath **path,
|
GtkTreePath **path,
|
||||||
GtkCellRenderer **cell);
|
GtkCellRenderer **cell);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
|
void gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
gboolean use_align,
|
gboolean use_align,
|
||||||
@@ -213,62 +213,62 @@ void gtk_icon_view_scroll_to_path (GtkIconView *icon_
|
|||||||
float col_align);
|
float col_align);
|
||||||
|
|
||||||
/* Drag-and-Drop support */
|
/* Drag-and-Drop support */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_enable_model_drag_source (GtkIconView *icon_view,
|
void gtk_icon_view_enable_model_drag_source (GtkIconView *icon_view,
|
||||||
GdkModifierType start_button_mask,
|
GdkModifierType start_button_mask,
|
||||||
GdkContentFormats *formats,
|
GdkContentFormats *formats,
|
||||||
GdkDragAction actions);
|
GdkDragAction actions);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view,
|
void gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view,
|
||||||
GdkContentFormats *formats,
|
GdkContentFormats *formats,
|
||||||
GdkDragAction actions);
|
GdkDragAction actions);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_unset_model_drag_source (GtkIconView *icon_view);
|
void gtk_icon_view_unset_model_drag_source (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view);
|
void gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_reorderable (GtkIconView *icon_view,
|
void gtk_icon_view_set_reorderable (GtkIconView *icon_view,
|
||||||
gboolean reorderable);
|
gboolean reorderable);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_icon_view_get_reorderable (GtkIconView *icon_view);
|
gboolean gtk_icon_view_get_reorderable (GtkIconView *icon_view);
|
||||||
|
|
||||||
|
|
||||||
/* These are useful to implement your own custom stuff. */
|
/* These are useful to implement your own custom stuff. */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_drag_dest_item (GtkIconView *icon_view,
|
void gtk_icon_view_set_drag_dest_item (GtkIconView *icon_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkIconViewDropPosition pos);
|
GtkIconViewDropPosition pos);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view,
|
void gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view,
|
||||||
GtkTreePath **path,
|
GtkTreePath **path,
|
||||||
GtkIconViewDropPosition *pos);
|
GtkIconViewDropPosition *pos);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view,
|
gboolean gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view,
|
||||||
int drag_x,
|
int drag_x,
|
||||||
int drag_y,
|
int drag_y,
|
||||||
GtkTreePath **path,
|
GtkTreePath **path,
|
||||||
GtkIconViewDropPosition *pos);
|
GtkIconViewDropPosition *pos);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GdkPaintable *gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
|
GdkPaintable *gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_icon_view_get_cell_rect (GtkIconView *icon_view,
|
gboolean gtk_icon_view_get_cell_rect (GtkIconView *icon_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkCellRenderer *cell,
|
GtkCellRenderer *cell,
|
||||||
GdkRectangle *rect);
|
GdkRectangle *rect);
|
||||||
|
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_tooltip_item (GtkIconView *icon_view,
|
void gtk_icon_view_set_tooltip_item (GtkIconView *icon_view,
|
||||||
GtkTooltip *tooltip,
|
GtkTooltip *tooltip,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_tooltip_cell (GtkIconView *icon_view,
|
void gtk_icon_view_set_tooltip_cell (GtkIconView *icon_view,
|
||||||
GtkTooltip *tooltip,
|
GtkTooltip *tooltip,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkCellRenderer *cell);
|
GtkCellRenderer *cell);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_icon_view_get_tooltip_context (GtkIconView *icon_view,
|
gboolean gtk_icon_view_get_tooltip_context (GtkIconView *icon_view,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@@ -276,10 +276,10 @@ gboolean gtk_icon_view_get_tooltip_context (GtkIconView
|
|||||||
GtkTreeModel **model,
|
GtkTreeModel **model,
|
||||||
GtkTreePath **path,
|
GtkTreePath **path,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_icon_view_set_tooltip_column (GtkIconView *icon_view,
|
void gtk_icon_view_set_tooltip_column (GtkIconView *icon_view,
|
||||||
int column);
|
int column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkGridView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_icon_view_get_tooltip_column (GtkIconView *icon_view);
|
int gtk_icon_view_get_tooltip_column (GtkIconView *icon_view);
|
||||||
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkIconView, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkIconView, g_object_unref)
|
||||||
|
|||||||
@@ -104,11 +104,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* `GtkListStore` is deprecated since GTK 4.10, and should not be used in newly
|
* # Performance Considerations
|
||||||
* written code. You should use [class@Gio.ListStore] instead, and the various
|
|
||||||
* list models provided by GTK.
|
|
||||||
*
|
|
||||||
* ## Performance Considerations
|
|
||||||
*
|
*
|
||||||
* Internally, the `GtkListStore` was originally implemented with a linked list
|
* Internally, the `GtkListStore` was originally implemented with a linked list
|
||||||
* with a tail pointer. As a result, it was fast at data insertion and deletion,
|
* with a tail pointer. As a result, it was fast at data insertion and deletion,
|
||||||
@@ -118,7 +114,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* often and your code is expected to run on older versions of GTK, it is worth
|
* often and your code is expected to run on older versions of GTK, it is worth
|
||||||
* keeping the iter around.
|
* keeping the iter around.
|
||||||
*
|
*
|
||||||
* ## Atomic Operations
|
* # Atomic Operations
|
||||||
*
|
*
|
||||||
* It is important to note that only the methods
|
* It is important to note that only the methods
|
||||||
* gtk_list_store_insert_with_values() and gtk_list_store_insert_with_valuesv()
|
* gtk_list_store_insert_with_values() and gtk_list_store_insert_with_valuesv()
|
||||||
@@ -135,7 +131,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* `GtkTreeModel`FilterVisibleFunc to be visited with an empty row first; the
|
* `GtkTreeModel`FilterVisibleFunc to be visited with an empty row first; the
|
||||||
* function must be prepared for that.
|
* function must be prepared for that.
|
||||||
*
|
*
|
||||||
* ## GtkListStore as GtkBuildable
|
* # GtkListStore as GtkBuildable
|
||||||
*
|
*
|
||||||
* The GtkListStore implementation of the [iface@Gtk.Buildable] interface allows
|
* The GtkListStore implementation of the [iface@Gtk.Buildable] interface allows
|
||||||
* to specify the model columns with a `<columns>` element that may contain
|
* to specify the model columns with a `<columns>` element that may contain
|
||||||
@@ -175,8 +171,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* </data>
|
* </data>
|
||||||
* </object>
|
* </object>
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gio.ListStore] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -408,27 +402,17 @@ iter_is_valid (GtkTreeIter *iter,
|
|||||||
* @n_columns: number of columns in the list store
|
* @n_columns: number of columns in the list store
|
||||||
* @...: all `GType` types for the columns, from first to last
|
* @...: all `GType` types for the columns, from first to last
|
||||||
*
|
*
|
||||||
* Creates a new list store.
|
* Creates a new list store as with @n_columns columns each of the types passed
|
||||||
*
|
* in. Note that only types derived from standard GObject fundamental types
|
||||||
* The list store will have @n_columns columns, with each column using
|
|
||||||
* the given type passed to this function.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Note that only types derived from standard GObject fundamental types
|
|
||||||
* are supported.
|
* are supported.
|
||||||
*
|
*
|
||||||
* As an example:
|
* As an example, `gtk_list_store_new (3, G_TYPE_INT, G_TYPE_STRING,
|
||||||
*
|
* GDK_TYPE_TEXTURE);` will create a new `GtkListStore` with three columns, of type
|
||||||
* ```c
|
* int, string and `GdkTexture`, respectively.
|
||||||
* gtk_list_store_new (3, G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_TEXTURE);
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* will create a new `GtkListStore` with three columns, of type `int`,
|
|
||||||
* `gchararray` and `GdkTexture`, respectively.
|
|
||||||
*
|
*
|
||||||
* Returns: a new `GtkListStore`
|
* Returns: a new `GtkListStore`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gio.ListStore] instead
|
* Deprecated: 4.10: Use list models
|
||||||
*/
|
*/
|
||||||
GtkListStore *
|
GtkListStore *
|
||||||
gtk_list_store_new (int n_columns,
|
gtk_list_store_new (int n_columns,
|
||||||
@@ -471,13 +455,11 @@ gtk_list_store_new (int n_columns,
|
|||||||
* @n_columns: number of columns in the list store
|
* @n_columns: number of columns in the list store
|
||||||
* @types: (array length=n_columns): an array of `GType` types for the columns, from first to last
|
* @types: (array length=n_columns): an array of `GType` types for the columns, from first to last
|
||||||
*
|
*
|
||||||
* Creates a new `GtkListStore`.
|
* Non-vararg creation function. Used primarily by language bindings.
|
||||||
*
|
|
||||||
* This function is meant to be used by language bindings.
|
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a new `GtkListStore`
|
* Returns: (transfer full): a new `GtkListStore`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gio.ListStore] instead
|
* Deprecated: 4.10: Use list models
|
||||||
**/
|
**/
|
||||||
GtkListStore *
|
GtkListStore *
|
||||||
gtk_list_store_newv (int n_columns,
|
gtk_list_store_newv (int n_columns,
|
||||||
@@ -512,14 +494,10 @@ gtk_list_store_newv (int n_columns,
|
|||||||
* @n_columns: Number of columns for the list store
|
* @n_columns: Number of columns for the list store
|
||||||
* @types: (array length=n_columns): An array length n of `GType`s
|
* @types: (array length=n_columns): An array length n of `GType`s
|
||||||
*
|
*
|
||||||
* Sets the types of the columns of a list store.
|
* This function is meant primarily for `GObject`s that inherit from `GtkListStore`,
|
||||||
*
|
* and should only be used when constructing a new `GtkListStore`. It will not
|
||||||
* This function is meant primarily for objects that inherit
|
* function after a row has been added, or a method on the `GtkTreeModel`
|
||||||
* from `GtkListStore`, and should only be used when constructing
|
* interface is called.
|
||||||
* a new instance.
|
|
||||||
*
|
|
||||||
* This function cannot be called after a row has been added, or
|
|
||||||
* a method on the `GtkTreeModel` interface is called.
|
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use list models
|
* Deprecated: 4.10: Use list models
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -60,88 +60,88 @@ struct _GtkListStoreClass
|
|||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_list_store_get_type (void) G_GNUC_CONST;
|
GType gtk_list_store_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkListStore *gtk_list_store_new (int n_columns,
|
GtkListStore *gtk_list_store_new (int n_columns,
|
||||||
...);
|
...);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkListStore *gtk_list_store_newv (int n_columns,
|
GtkListStore *gtk_list_store_newv (int n_columns,
|
||||||
GType *types);
|
GType *types);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_set_column_types (GtkListStore *list_store,
|
void gtk_list_store_set_column_types (GtkListStore *list_store,
|
||||||
int n_columns,
|
int n_columns,
|
||||||
GType *types);
|
GType *types);
|
||||||
|
|
||||||
/* NOTE: use gtk_tree_model_get to get values from a GtkListStore */
|
/* NOTE: use gtk_tree_model_get to get values from a GtkListStore */
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_set_value (GtkListStore *list_store,
|
void gtk_list_store_set_value (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int column,
|
int column,
|
||||||
GValue *value);
|
GValue *value);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_set (GtkListStore *list_store,
|
void gtk_list_store_set (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
...);
|
...);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_set_valuesv (GtkListStore *list_store,
|
void gtk_list_store_set_valuesv (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int *columns,
|
int *columns,
|
||||||
GValue *values,
|
GValue *values,
|
||||||
int n_values);
|
int n_values);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_set_valist (GtkListStore *list_store,
|
void gtk_list_store_set_valist (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
va_list var_args);
|
va_list var_args);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_list_store_remove (GtkListStore *list_store,
|
gboolean gtk_list_store_remove (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_insert (GtkListStore *list_store,
|
void gtk_list_store_insert (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int position);
|
int position);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_insert_before (GtkListStore *list_store,
|
void gtk_list_store_insert_before (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *sibling);
|
GtkTreeIter *sibling);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_insert_after (GtkListStore *list_store,
|
void gtk_list_store_insert_after (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *sibling);
|
GtkTreeIter *sibling);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_insert_with_values (GtkListStore *list_store,
|
void gtk_list_store_insert_with_values (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int position,
|
int position,
|
||||||
...);
|
...);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_insert_with_valuesv (GtkListStore *list_store,
|
void gtk_list_store_insert_with_valuesv (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int position,
|
int position,
|
||||||
int *columns,
|
int *columns,
|
||||||
GValue *values,
|
GValue *values,
|
||||||
int n_values);
|
int n_values);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_prepend (GtkListStore *list_store,
|
void gtk_list_store_prepend (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_append (GtkListStore *list_store,
|
void gtk_list_store_append (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_clear (GtkListStore *list_store);
|
void gtk_list_store_clear (GtkListStore *list_store);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_list_store_iter_is_valid (GtkListStore *list_store,
|
gboolean gtk_list_store_iter_is_valid (GtkListStore *list_store,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_reorder (GtkListStore *store,
|
void gtk_list_store_reorder (GtkListStore *store,
|
||||||
int *new_order);
|
int *new_order);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_swap (GtkListStore *store,
|
void gtk_list_store_swap (GtkListStore *store,
|
||||||
GtkTreeIter *a,
|
GtkTreeIter *a,
|
||||||
GtkTreeIter *b);
|
GtkTreeIter *b);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_move_after (GtkListStore *store,
|
void gtk_list_store_move_after (GtkListStore *store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *position);
|
GtkTreeIter *position);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListStore)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_list_store_move_before (GtkListStore *store,
|
void gtk_list_store_move_before (GtkListStore *store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *position);
|
GtkTreeIter *position);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
* and RTL/LTR information set. The style context will also be updated
|
* and RTL/LTR information set. The style context will also be updated
|
||||||
* automatically if any of these settings change on the widget.
|
* automatically if any of these settings change on the widget.
|
||||||
*
|
*
|
||||||
* ## Style Classes
|
* # Style Classes
|
||||||
*
|
*
|
||||||
* Widgets can add style classes to their context, which can be used to associate
|
* Widgets can add style classes to their context, which can be used to associate
|
||||||
* different styles by class. The documentation for individual widgets lists
|
* different styles by class. The documentation for individual widgets lists
|
||||||
@@ -71,10 +71,6 @@
|
|||||||
* `XDG_CONFIG_HOME/gtk-4.0/gtk.css` will
|
* `XDG_CONFIG_HOME/gtk-4.0/gtk.css` will
|
||||||
* still take precedence over your changes, as it uses the
|
* still take precedence over your changes, as it uses the
|
||||||
* %GTK_STYLE_PROVIDER_PRIORITY_USER priority.
|
* %GTK_STYLE_PROVIDER_PRIORITY_USER priority.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: The relevant API has been moved to [class@Gtk.Widget]
|
|
||||||
* where applicable; otherwise, there is no replacement for querying the
|
|
||||||
* style machinery. Stylable UI elements should use widgets.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURSOR_ASPECT_RATIO (0.04)
|
#define CURSOR_ASPECT_RATIO (0.04)
|
||||||
|
|||||||
@@ -49,18 +49,12 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* GtkTreeDragDest:
|
* GtkTreeDragDest:
|
||||||
*
|
*
|
||||||
* Interface for Drag-and-Drop destinations in `GtkTreeView`.
|
* Interface for Drag-and-Drop destinations in `GtkTreeView`.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents.
|
|
||||||
* You can use [class@Gtk.DropTarget] to implement a drop destination
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkTreeDragSource:
|
* GtkTreeDragSource:
|
||||||
*
|
*
|
||||||
* Interface for Drag-and-Drop destinations in `GtkTreeView`.
|
* Interface for Drag-and-Drop destinations in `GtkTreeView`.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: List views use widgets to display their contents.
|
|
||||||
* You can use [class@Gtk.DragSource] to implement a drag source
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GType
|
GType
|
||||||
|
|||||||
@@ -74,23 +74,23 @@ struct _GtkTreeDragSourceIface
|
|||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
};
|
};
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDragSource)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GType gtk_tree_drag_source_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_drag_source_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
/* Returns whether the given row can be dragged */
|
/* Returns whether the given row can be dragged */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDragSource)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_drag_source_row_draggable (GtkTreeDragSource *drag_source,
|
gboolean gtk_tree_drag_source_row_draggable (GtkTreeDragSource *drag_source,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
|
|
||||||
/* Deletes the given row, or returns FALSE if it can't */
|
/* Deletes the given row, or returns FALSE if it can't */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDragSource)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_drag_source_drag_data_delete (GtkTreeDragSource *drag_source,
|
gboolean gtk_tree_drag_source_drag_data_delete (GtkTreeDragSource *drag_source,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
|
|
||||||
/* Fills in selection_data with type selection_data->target based on
|
/* Fills in selection_data with type selection_data->target based on
|
||||||
* the row denoted by path, returns TRUE if it does anything
|
* the row denoted by path, returns TRUE if it does anything
|
||||||
*/
|
*/
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDragSource)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GdkContentProvider *
|
GdkContentProvider *
|
||||||
gtk_tree_drag_source_drag_data_get (GtkTreeDragSource *drag_source,
|
gtk_tree_drag_source_drag_data_get (GtkTreeDragSource *drag_source,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
@@ -129,20 +129,20 @@ struct _GtkTreeDragDestIface
|
|||||||
const GValue *value);
|
const GValue *value);
|
||||||
};
|
};
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropTarget)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GType gtk_tree_drag_dest_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_drag_dest_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
/* Inserts a row before dest which contains data in selection_data,
|
/* Inserts a row before dest which contains data in selection_data,
|
||||||
* or returns FALSE if it can't
|
* or returns FALSE if it can't
|
||||||
*/
|
*/
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropTarget)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_drag_dest_drag_data_received (GtkTreeDragDest *drag_dest,
|
gboolean gtk_tree_drag_dest_drag_data_received (GtkTreeDragDest *drag_dest,
|
||||||
GtkTreePath *dest,
|
GtkTreePath *dest,
|
||||||
const GValue *value);
|
const GValue *value);
|
||||||
|
|
||||||
|
|
||||||
/* Returns TRUE if we can drop before path; path may not exist. */
|
/* Returns TRUE if we can drop before path; path may not exist. */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDropTarget)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_drag_dest_row_drop_possible (GtkTreeDragDest *drag_dest,
|
gboolean gtk_tree_drag_dest_row_drop_possible (GtkTreeDragDest *drag_dest,
|
||||||
GtkTreePath *dest_path,
|
GtkTreePath *dest_path,
|
||||||
const GValue *value);
|
const GValue *value);
|
||||||
@@ -151,11 +151,11 @@ gboolean gtk_tree_drag_dest_row_drop_possible (GtkTreeDragDest *drag_dest,
|
|||||||
/* The selection data would normally have target type GTK_TREE_MODEL_ROW in this
|
/* The selection data would normally have target type GTK_TREE_MODEL_ROW in this
|
||||||
* case. If the target is wrong these functions return FALSE.
|
* case. If the target is wrong these functions return FALSE.
|
||||||
*/
|
*/
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDragSource and GtkDropTarget)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GdkContentProvider *
|
GdkContentProvider *
|
||||||
gtk_tree_create_row_drag_content (GtkTreeModel *tree_model,
|
gtk_tree_create_row_drag_content (GtkTreeModel *tree_model,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkDragSource and GtkDropTarget)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_get_row_drag_data (const GValue *value,
|
gboolean gtk_tree_get_row_drag_data (const GValue *value,
|
||||||
GtkTreeModel **tree_model,
|
GtkTreeModel **tree_model,
|
||||||
GtkTreePath **path);
|
GtkTreePath **path);
|
||||||
|
|||||||
@@ -228,8 +228,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* required for levels in which nodes are referenced. For the root level
|
* required for levels in which nodes are referenced. For the root level
|
||||||
* however, signals must be emitted at all times (however the root level
|
* however, signals must be emitted at all times (however the root level
|
||||||
* is always referenced when any view is attached).
|
* is always referenced when any view is attached).
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [iface@Gio.ListModel] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define INITIALIZE_TREE_ITER(Iter) \
|
#define INITIALIZE_TREE_ITER(Iter) \
|
||||||
|
|||||||
@@ -192,57 +192,57 @@ struct _GtkTreeModelIface
|
|||||||
|
|
||||||
|
|
||||||
/* GtkTreePath operations */
|
/* GtkTreePath operations */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_path_new (void);
|
GtkTreePath *gtk_tree_path_new (void);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_path_new_from_string (const char *path);
|
GtkTreePath *gtk_tree_path_new_from_string (const char *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_path_new_from_indices (int first_index,
|
GtkTreePath *gtk_tree_path_new_from_indices (int first_index,
|
||||||
...);
|
...);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_path_new_from_indicesv (int *indices,
|
GtkTreePath *gtk_tree_path_new_from_indicesv (int *indices,
|
||||||
gsize length);
|
gsize length);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
char *gtk_tree_path_to_string (GtkTreePath *path);
|
char *gtk_tree_path_to_string (GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_path_new_first (void);
|
GtkTreePath *gtk_tree_path_new_first (void);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_path_append_index (GtkTreePath *path,
|
void gtk_tree_path_append_index (GtkTreePath *path,
|
||||||
int index_);
|
int index_);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_path_prepend_index (GtkTreePath *path,
|
void gtk_tree_path_prepend_index (GtkTreePath *path,
|
||||||
int index_);
|
int index_);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_path_get_depth (GtkTreePath *path);
|
int gtk_tree_path_get_depth (GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int *gtk_tree_path_get_indices (GtkTreePath *path);
|
int *gtk_tree_path_get_indices (GtkTreePath *path);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int *gtk_tree_path_get_indices_with_depth (GtkTreePath *path,
|
int *gtk_tree_path_get_indices_with_depth (GtkTreePath *path,
|
||||||
int *depth);
|
int *depth);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_path_free (GtkTreePath *path);
|
void gtk_tree_path_free (GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_path_copy (const GtkTreePath *path);
|
GtkTreePath *gtk_tree_path_copy (const GtkTreePath *path);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_tree_path_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_path_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_path_compare (const GtkTreePath *a,
|
int gtk_tree_path_compare (const GtkTreePath *a,
|
||||||
const GtkTreePath *b);
|
const GtkTreePath *b);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_path_next (GtkTreePath *path);
|
void gtk_tree_path_next (GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_path_prev (GtkTreePath *path);
|
gboolean gtk_tree_path_prev (GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_path_up (GtkTreePath *path);
|
gboolean gtk_tree_path_up (GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_path_down (GtkTreePath *path);
|
void gtk_tree_path_down (GtkTreePath *path);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_path_is_ancestor (GtkTreePath *path,
|
gboolean gtk_tree_path_is_ancestor (GtkTreePath *path,
|
||||||
GtkTreePath *descendant);
|
GtkTreePath *descendant);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_path_is_descendant (GtkTreePath *path,
|
gboolean gtk_tree_path_is_descendant (GtkTreePath *path,
|
||||||
GtkTreePath *ancestor);
|
GtkTreePath *ancestor);
|
||||||
|
|
||||||
@@ -256,147 +256,147 @@ gboolean gtk_tree_path_is_descendant (GtkTreePath *path,
|
|||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_tree_row_reference_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_row_reference_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeRowReference *gtk_tree_row_reference_new (GtkTreeModel *model,
|
GtkTreeRowReference *gtk_tree_row_reference_new (GtkTreeModel *model,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeRowReference *gtk_tree_row_reference_new_proxy (GObject *proxy,
|
GtkTreeRowReference *gtk_tree_row_reference_new_proxy (GObject *proxy,
|
||||||
GtkTreeModel *model,
|
GtkTreeModel *model,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_row_reference_get_path (GtkTreeRowReference *reference);
|
GtkTreePath *gtk_tree_row_reference_get_path (GtkTreeRowReference *reference);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeModel *gtk_tree_row_reference_get_model (GtkTreeRowReference *reference);
|
GtkTreeModel *gtk_tree_row_reference_get_model (GtkTreeRowReference *reference);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_row_reference_valid (GtkTreeRowReference *reference);
|
gboolean gtk_tree_row_reference_valid (GtkTreeRowReference *reference);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeRowReference *gtk_tree_row_reference_copy (GtkTreeRowReference *reference);
|
GtkTreeRowReference *gtk_tree_row_reference_copy (GtkTreeRowReference *reference);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_row_reference_free (GtkTreeRowReference *reference);
|
void gtk_tree_row_reference_free (GtkTreeRowReference *reference);
|
||||||
/* These two functions are only needed if you created the row reference with a
|
/* These two functions are only needed if you created the row reference with a
|
||||||
* proxy object */
|
* proxy object */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_row_reference_inserted (GObject *proxy,
|
void gtk_tree_row_reference_inserted (GObject *proxy,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_row_reference_deleted (GObject *proxy,
|
void gtk_tree_row_reference_deleted (GObject *proxy,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_row_reference_reordered (GObject *proxy,
|
void gtk_tree_row_reference_reordered (GObject *proxy,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int *new_order);
|
int *new_order);
|
||||||
|
|
||||||
/* GtkTreeIter operations */
|
/* GtkTreeIter operations */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeIter * gtk_tree_iter_copy (GtkTreeIter *iter);
|
GtkTreeIter * gtk_tree_iter_copy (GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_iter_free (GtkTreeIter *iter);
|
void gtk_tree_iter_free (GtkTreeIter *iter);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_tree_iter_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_iter_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_tree_model_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_model_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeModelFlags gtk_tree_model_get_flags (GtkTreeModel *tree_model);
|
GtkTreeModelFlags gtk_tree_model_get_flags (GtkTreeModel *tree_model);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_model_get_n_columns (GtkTreeModel *tree_model);
|
int gtk_tree_model_get_n_columns (GtkTreeModel *tree_model);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GType gtk_tree_model_get_column_type (GtkTreeModel *tree_model,
|
GType gtk_tree_model_get_column_type (GtkTreeModel *tree_model,
|
||||||
int index_);
|
int index_);
|
||||||
|
|
||||||
|
|
||||||
/* Iterator movement */
|
/* Iterator movement */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_get_iter (GtkTreeModel *tree_model,
|
gboolean gtk_tree_model_get_iter (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_get_iter_from_string (GtkTreeModel *tree_model,
|
gboolean gtk_tree_model_get_iter_from_string (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
const char *path_string);
|
const char *path_string);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
char * gtk_tree_model_get_string_from_iter (GtkTreeModel *tree_model,
|
char * gtk_tree_model_get_string_from_iter (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_get_iter_first (GtkTreeModel *tree_model,
|
gboolean gtk_tree_model_get_iter_first (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath * gtk_tree_model_get_path (GtkTreeModel *tree_model,
|
GtkTreePath * gtk_tree_model_get_path (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_get_value (GtkTreeModel *tree_model,
|
void gtk_tree_model_get_value (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int column,
|
int column,
|
||||||
GValue *value);
|
GValue *value);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_iter_previous (GtkTreeModel *tree_model,
|
gboolean gtk_tree_model_iter_previous (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_iter_next (GtkTreeModel *tree_model,
|
gboolean gtk_tree_model_iter_next (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_iter_children (GtkTreeModel *tree_model,
|
gboolean gtk_tree_model_iter_children (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *parent);
|
GtkTreeIter *parent);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_iter_has_child (GtkTreeModel *tree_model,
|
gboolean gtk_tree_model_iter_has_child (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_model_iter_n_children (GtkTreeModel *tree_model,
|
int gtk_tree_model_iter_n_children (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_iter_nth_child (GtkTreeModel *tree_model,
|
gboolean gtk_tree_model_iter_nth_child (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *parent,
|
GtkTreeIter *parent,
|
||||||
int n);
|
int n);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_iter_parent (GtkTreeModel *tree_model,
|
gboolean gtk_tree_model_iter_parent (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *child);
|
GtkTreeIter *child);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_ref_node (GtkTreeModel *tree_model,
|
void gtk_tree_model_ref_node (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_unref_node (GtkTreeModel *tree_model,
|
void gtk_tree_model_unref_node (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_get (GtkTreeModel *tree_model,
|
void gtk_tree_model_get (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
...);
|
...);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_get_valist (GtkTreeModel *tree_model,
|
void gtk_tree_model_get_valist (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
va_list var_args);
|
va_list var_args);
|
||||||
|
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_foreach (GtkTreeModel *model,
|
void gtk_tree_model_foreach (GtkTreeModel *model,
|
||||||
GtkTreeModelForeachFunc func,
|
GtkTreeModelForeachFunc func,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_row_changed (GtkTreeModel *tree_model,
|
void gtk_tree_model_row_changed (GtkTreeModel *tree_model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_row_inserted (GtkTreeModel *tree_model,
|
void gtk_tree_model_row_inserted (GtkTreeModel *tree_model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_row_has_child_toggled (GtkTreeModel *tree_model,
|
void gtk_tree_model_row_has_child_toggled (GtkTreeModel *tree_model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_row_deleted (GtkTreeModel *tree_model,
|
void gtk_tree_model_row_deleted (GtkTreeModel *tree_model,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_rows_reordered (GtkTreeModel *tree_model,
|
void gtk_tree_model_rows_reordered (GtkTreeModel *tree_model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int *new_order);
|
int *new_order);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_rows_reordered_with_length (GtkTreeModel *tree_model,
|
void gtk_tree_model_rows_reordered_with_length (GtkTreeModel *tree_model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
|
|||||||
@@ -94,8 +94,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* because it does not implement reference counting, or for models that
|
* because it does not implement reference counting, or for models that
|
||||||
* do implement reference counting, obtain references on these child levels
|
* do implement reference counting, obtain references on these child levels
|
||||||
* yourself.
|
* yourself.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.FilterListModel] instead.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Notes on this implementation of GtkTreeModelFilter
|
/* Notes on this implementation of GtkTreeModelFilter
|
||||||
|
|||||||
@@ -105,48 +105,48 @@ struct _GtkTreeModelFilterClass
|
|||||||
/* base */
|
/* base */
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_tree_model_filter_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_model_filter_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeModel *gtk_tree_model_filter_new (GtkTreeModel *child_model,
|
GtkTreeModel *gtk_tree_model_filter_new (GtkTreeModel *child_model,
|
||||||
GtkTreePath *root);
|
GtkTreePath *root);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_filter_set_visible_func (GtkTreeModelFilter *filter,
|
void gtk_tree_model_filter_set_visible_func (GtkTreeModelFilter *filter,
|
||||||
GtkTreeModelFilterVisibleFunc func,
|
GtkTreeModelFilterVisibleFunc func,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
GDestroyNotify destroy);
|
GDestroyNotify destroy);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter,
|
void gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter,
|
||||||
int n_columns,
|
int n_columns,
|
||||||
GType *types,
|
GType *types,
|
||||||
GtkTreeModelFilterModifyFunc func,
|
GtkTreeModelFilterModifyFunc func,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
GDestroyNotify destroy);
|
GDestroyNotify destroy);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_filter_set_visible_column (GtkTreeModelFilter *filter,
|
void gtk_tree_model_filter_set_visible_column (GtkTreeModelFilter *filter,
|
||||||
int column);
|
int column);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeModel *gtk_tree_model_filter_get_model (GtkTreeModelFilter *filter);
|
GtkTreeModel *gtk_tree_model_filter_get_model (GtkTreeModelFilter *filter);
|
||||||
|
|
||||||
/* conversion */
|
/* conversion */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_filter_convert_child_iter_to_iter (GtkTreeModelFilter *filter,
|
gboolean gtk_tree_model_filter_convert_child_iter_to_iter (GtkTreeModelFilter *filter,
|
||||||
GtkTreeIter *filter_iter,
|
GtkTreeIter *filter_iter,
|
||||||
GtkTreeIter *child_iter);
|
GtkTreeIter *child_iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_filter_convert_iter_to_child_iter (GtkTreeModelFilter *filter,
|
void gtk_tree_model_filter_convert_iter_to_child_iter (GtkTreeModelFilter *filter,
|
||||||
GtkTreeIter *child_iter,
|
GtkTreeIter *child_iter,
|
||||||
GtkTreeIter *filter_iter);
|
GtkTreeIter *filter_iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_model_filter_convert_child_path_to_path (GtkTreeModelFilter *filter,
|
GtkTreePath *gtk_tree_model_filter_convert_child_path_to_path (GtkTreeModelFilter *filter,
|
||||||
GtkTreePath *child_path);
|
GtkTreePath *child_path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_model_filter_convert_path_to_child_path (GtkTreeModelFilter *filter,
|
GtkTreePath *gtk_tree_model_filter_convert_path_to_child_path (GtkTreeModelFilter *filter,
|
||||||
GtkTreePath *filter_path);
|
GtkTreePath *filter_path);
|
||||||
|
|
||||||
/* extras */
|
/* extras */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_filter_refilter (GtkTreeModelFilter *filter);
|
void gtk_tree_model_filter_refilter (GtkTreeModelFilter *filter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_filter_clear_cache (GtkTreeModelFilter *filter);
|
void gtk_tree_model_filter_clear_cache (GtkTreeModelFilter *filter);
|
||||||
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTreeModelFilter, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTreeModelFilter, g_object_unref)
|
||||||
|
|||||||
@@ -127,8 +127,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* g_free (modified_data);
|
* g_free (modified_data);
|
||||||
* }
|
* }
|
||||||
* ]|
|
* ]|
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.SortListModel] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,30 +58,30 @@ struct _GtkTreeModelSortClass
|
|||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_tree_model_sort_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_model_sort_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeModel *gtk_tree_model_sort_new_with_model (GtkTreeModel *child_model);
|
GtkTreeModel *gtk_tree_model_sort_new_with_model (GtkTreeModel *child_model);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeModel *gtk_tree_model_sort_get_model (GtkTreeModelSort *tree_model);
|
GtkTreeModel *gtk_tree_model_sort_get_model (GtkTreeModelSort *tree_model);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_model_sort_convert_child_path_to_path (GtkTreeModelSort *tree_model_sort,
|
GtkTreePath *gtk_tree_model_sort_convert_child_path_to_path (GtkTreeModelSort *tree_model_sort,
|
||||||
GtkTreePath *child_path);
|
GtkTreePath *child_path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_sort_convert_child_iter_to_iter (GtkTreeModelSort *tree_model_sort,
|
gboolean gtk_tree_model_sort_convert_child_iter_to_iter (GtkTreeModelSort *tree_model_sort,
|
||||||
GtkTreeIter *sort_iter,
|
GtkTreeIter *sort_iter,
|
||||||
GtkTreeIter *child_iter);
|
GtkTreeIter *child_iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreePath *gtk_tree_model_sort_convert_path_to_child_path (GtkTreeModelSort *tree_model_sort,
|
GtkTreePath *gtk_tree_model_sort_convert_path_to_child_path (GtkTreeModelSort *tree_model_sort,
|
||||||
GtkTreePath *sorted_path);
|
GtkTreePath *sorted_path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_sort_convert_iter_to_child_iter (GtkTreeModelSort *tree_model_sort,
|
void gtk_tree_model_sort_convert_iter_to_child_iter (GtkTreeModelSort *tree_model_sort,
|
||||||
GtkTreeIter *child_iter,
|
GtkTreeIter *child_iter,
|
||||||
GtkTreeIter *sorted_iter);
|
GtkTreeIter *sorted_iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_sort_reset_default_sort_func (GtkTreeModelSort *tree_model_sort);
|
void gtk_tree_model_sort_reset_default_sort_func (GtkTreeModelSort *tree_model_sort);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_model_sort_clear_cache (GtkTreeModelSort *tree_model_sort);
|
void gtk_tree_model_sort_clear_cache (GtkTreeModelSort *tree_model_sort);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkFilterListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_model_sort_iter_is_valid (GtkTreeModelSort *tree_model_sort,
|
gboolean gtk_tree_model_sort_iter_is_valid (GtkTreeModelSort *tree_model_sort,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* Additionally, it may on occasion emit a `GtkTreeSelection`::changed signal
|
* Additionally, it may on occasion emit a `GtkTreeSelection`::changed signal
|
||||||
* when nothing has happened (mostly as a result of programmers calling
|
* when nothing has happened (mostly as a result of programmers calling
|
||||||
* select_row on an already selected row).
|
* select_row on an already selected row).
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [iface@Gtk.SelectionModel] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _GtkTreeSelectionClass GtkTreeSelectionClass;
|
typedef struct _GtkTreeSelectionClass GtkTreeSelectionClass;
|
||||||
|
|||||||
@@ -32,9 +32,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* `GtkTreeSortable` is an interface to be implemented by tree models which
|
* `GtkTreeSortable` is an interface to be implemented by tree models which
|
||||||
* support sorting. The `GtkTreeView` uses the methods provided by this interface
|
* support sorting. The `GtkTreeView` uses the methods provided by this interface
|
||||||
* to sort the model.
|
* to sort the model.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: There is no replacement for this interface. You should
|
|
||||||
* use [class@Gtk.SortListModel] to wrap your list model instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+123
-204
@@ -31,20 +31,17 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
/**
|
/**
|
||||||
* GtkTreeStore:
|
* GtkTreeStore:
|
||||||
*
|
*
|
||||||
* A tree-like data structure that can be used with the [class@Gtk.TreeView].
|
* A tree-like data structure that can be used with the GtkTreeView
|
||||||
*
|
*
|
||||||
* The `GtkTreeStore` object is a list model for use with a `GtkTreeView`
|
* The `GtkTreeStore` object is a list model for use with a `GtkTreeView`
|
||||||
* widget. It implements the [iface@Gtk.TreeModel] interface, and consequently,
|
* widget. It implements the `GtkTreeModel` interface, and consequently,
|
||||||
* can use all of the methods available there. It also implements the
|
* can use all of the methods available there. It also implements the
|
||||||
* [iface@Gtk.TreeSortable] interface so it can be sorted by the view.
|
* `GtkTreeSortable` interface so it can be sorted by the view. Finally,
|
||||||
* Finally, it also implements the tree [drag][iface@Gtk.TreeDragSource]
|
* it also implements the tree
|
||||||
* and [drop][iface@Gtk.TreeDragDest] interfaces.
|
* [drag and drop][gtk3-GtkTreeView-drag-and-drop]
|
||||||
|
* interfaces.
|
||||||
*
|
*
|
||||||
* `GtkTreeStore` is deprecated since GTK 4.10, and should not be used in newly
|
* # GtkTreeStore as GtkBuildable
|
||||||
* written code. You should use [class@Gtk.TreeListModel] for a tree-like model
|
|
||||||
* object.
|
|
||||||
*
|
|
||||||
* ## GtkTreeStore as GtkBuildable
|
|
||||||
*
|
*
|
||||||
* The GtkTreeStore implementation of the `GtkBuildable` interface allows
|
* The GtkTreeStore implementation of the `GtkBuildable` interface allows
|
||||||
* to specify the model columns with a <columns> element that may contain
|
* to specify the model columns with a <columns> element that may contain
|
||||||
@@ -52,8 +49,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* attribute specifies the data type for the column.
|
* attribute specifies the data type for the column.
|
||||||
*
|
*
|
||||||
* An example of a UI Definition fragment for a tree store:
|
* An example of a UI Definition fragment for a tree store:
|
||||||
*
|
* |[
|
||||||
* ```xml
|
|
||||||
* <object class="GtkTreeStore">
|
* <object class="GtkTreeStore">
|
||||||
* <columns>
|
* <columns>
|
||||||
* <column type="gchararray"/>
|
* <column type="gchararray"/>
|
||||||
@@ -61,9 +57,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* <column type="gint"/>
|
* <column type="gint"/>
|
||||||
* </columns>
|
* </columns>
|
||||||
* </object>
|
* </object>
|
||||||
* ```
|
* ]|
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct _GtkTreeStorePrivate
|
struct _GtkTreeStorePrivate
|
||||||
@@ -309,26 +303,22 @@ gtk_tree_store_init (GtkTreeStore *tree_store)
|
|||||||
* @n_columns: number of columns in the tree store
|
* @n_columns: number of columns in the tree store
|
||||||
* @...: all `GType` types for the columns, from first to last
|
* @...: all `GType` types for the columns, from first to last
|
||||||
*
|
*
|
||||||
* Creates a new tree store.
|
* Creates a new tree store as with @n_columns columns each of the types passed
|
||||||
*
|
* in. Note that only types derived from standard GObject fundamental types
|
||||||
* The tree store will have @n_columns, with each column using the
|
|
||||||
* corresponding type passed to this function.
|
|
||||||
*
|
|
||||||
* Note that only types derived from standard GObject fundamental types
|
|
||||||
* are supported.
|
* are supported.
|
||||||
*
|
*
|
||||||
* As an example:
|
* As an example,
|
||||||
*
|
*
|
||||||
* ```c
|
* ```
|
||||||
* gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_TEXTURE);
|
* gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_TEXTURE);
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* will create a new `GtkTreeStore` with three columns of type
|
* will create a new `GtkTreeStore` with three columns, of type
|
||||||
* `int`, `gchararray`, and `GdkTexture` respectively.
|
* `int`, `gchararray`, and `GdkTexture` respectively.
|
||||||
*
|
*
|
||||||
* Returns: a new `GtkTreeStore`
|
* Returns: a new `GtkTreeStore`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
GtkTreeStore *
|
GtkTreeStore *
|
||||||
gtk_tree_store_new (int n_columns,
|
gtk_tree_store_new (int n_columns,
|
||||||
@@ -366,13 +356,11 @@ gtk_tree_store_new (int n_columns,
|
|||||||
* @n_columns: number of columns in the tree store
|
* @n_columns: number of columns in the tree store
|
||||||
* @types: (array length=n_columns): an array of `GType` types for the columns, from first to last
|
* @types: (array length=n_columns): an array of `GType` types for the columns, from first to last
|
||||||
*
|
*
|
||||||
* Creates a new tree store.
|
* Non vararg creation function. Used primarily by language bindings.
|
||||||
*
|
|
||||||
* This constructor is meant for language bindings.
|
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a new `GtkTreeStore`
|
* Returns: (transfer full): a new `GtkTreeStore`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
GtkTreeStore *
|
GtkTreeStore *
|
||||||
gtk_tree_store_newv (int n_columns,
|
gtk_tree_store_newv (int n_columns,
|
||||||
@@ -407,17 +395,12 @@ gtk_tree_store_newv (int n_columns,
|
|||||||
* @n_columns: Number of columns for the tree store
|
* @n_columns: Number of columns for the tree store
|
||||||
* @types: (array length=n_columns): An array of `GType` types, one for each column
|
* @types: (array length=n_columns): An array of `GType` types, one for each column
|
||||||
*
|
*
|
||||||
* Sets the type of the columns in a tree store.
|
* This function is meant primarily for `GObjects` that inherit from
|
||||||
*
|
|
||||||
* This function is meant primarily for types that inherit from
|
|
||||||
* `GtkTreeStore`, and should only be used when constructing a new
|
* `GtkTreeStore`, and should only be used when constructing a new
|
||||||
* `GtkTreeStore`.
|
* `GtkTreeStore`. It will not function after a row has been added,
|
||||||
|
* or a method on the `GtkTreeModel` interface is called.
|
||||||
*
|
*
|
||||||
* This functions cannot be called after a row has been added,
|
* Deprecated: 4.10
|
||||||
* or a method on the `GtkTreeModel` interface is called on the
|
|
||||||
* tree store.
|
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_set_column_types (GtkTreeStore *tree_store,
|
gtk_tree_store_set_column_types (GtkTreeStore *tree_store,
|
||||||
@@ -468,31 +451,12 @@ gtk_tree_store_set_n_columns (GtkTreeStore *tree_store,
|
|||||||
* @column: column number
|
* @column: column number
|
||||||
* @type: type of the data to be stored in @column
|
* @type: type of the data to be stored in @column
|
||||||
*
|
*
|
||||||
* Sets the type of the given column in a tree store.
|
* Supported types include: %G_TYPE_UINT, %G_TYPE_INT, %G_TYPE_UCHAR,
|
||||||
|
* %G_TYPE_CHAR, %G_TYPE_BOOLEAN, %G_TYPE_POINTER, %G_TYPE_FLOAT,
|
||||||
|
* %G_TYPE_DOUBLE, %G_TYPE_STRING, %G_TYPE_OBJECT, and %G_TYPE_BOXED, along with
|
||||||
|
* subclasses of those types such as %GDK_TYPE_PIXBUF.
|
||||||
*
|
*
|
||||||
* This function is meant primarily for types that inherit from
|
* Deprecated: 4.10
|
||||||
* `GtkTreeStore`, and should only be used when constructing a new
|
|
||||||
* `GtkTreeStore`.
|
|
||||||
*
|
|
||||||
* This functions cannot be called after a row has been added,
|
|
||||||
* or a method on the `GtkTreeModel` interface is called on the
|
|
||||||
* tree store.
|
|
||||||
*
|
|
||||||
* Supported types include:
|
|
||||||
*
|
|
||||||
* - `G_TYPE_UINT`
|
|
||||||
* - `G_TYPE_INT`
|
|
||||||
* - `G_TYPE_UCHAR`
|
|
||||||
* - `G_TYPE_CHAR`
|
|
||||||
* - `G_TYPE_BOOLEAN`
|
|
||||||
* - `G_TYPE_POINTER`
|
|
||||||
* - `G_TYPE_FLOAT`
|
|
||||||
* - `G_TYPE_DOUBLE`
|
|
||||||
* - `G_TYPE_STRING`
|
|
||||||
* - `G_TYPE_BOXED` and its derived types
|
|
||||||
* - `G_TYPE_OBJECT` and its derived types
|
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
**/
|
**/
|
||||||
static void
|
static void
|
||||||
gtk_tree_store_set_column_type (GtkTreeStore *tree_store,
|
gtk_tree_store_set_column_type (GtkTreeStore *tree_store,
|
||||||
@@ -986,11 +950,10 @@ gtk_tree_store_real_set_value (GtkTreeStore *tree_store,
|
|||||||
* @value: new value for the cell
|
* @value: new value for the cell
|
||||||
*
|
*
|
||||||
* Sets the data in the cell specified by @iter and @column.
|
* Sets the data in the cell specified by @iter and @column.
|
||||||
*
|
|
||||||
* The type of @value must be convertible to the type of the
|
* The type of @value must be convertible to the type of the
|
||||||
* column.
|
* column.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_set_value (GtkTreeStore *tree_store,
|
gtk_tree_store_set_value (GtkTreeStore *tree_store,
|
||||||
@@ -1134,13 +1097,11 @@ gtk_tree_store_set_valist_internal (GtkTreeStore *tree_store,
|
|||||||
* @n_values: the length of the @columns and @values arrays
|
* @n_values: the length of the @columns and @values arrays
|
||||||
*
|
*
|
||||||
* A variant of gtk_tree_store_set_valist() which takes
|
* A variant of gtk_tree_store_set_valist() which takes
|
||||||
* the columns and values as two arrays, instead of using variadic
|
* the columns and values as two arrays, instead of varargs. This
|
||||||
* arguments.
|
* function is mainly intended for language bindings or in case
|
||||||
*
|
|
||||||
* This function is mainly intended for language bindings or in case
|
|
||||||
* the number of columns to change is not known until run-time.
|
* the number of columns to change is not known until run-time.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_set_valuesv (GtkTreeStore *tree_store,
|
gtk_tree_store_set_valuesv (GtkTreeStore *tree_store,
|
||||||
@@ -1180,9 +1141,10 @@ gtk_tree_store_set_valuesv (GtkTreeStore *tree_store,
|
|||||||
* @iter: A valid `GtkTreeIter` for the row being modified
|
* @iter: A valid `GtkTreeIter` for the row being modified
|
||||||
* @var_args: va_list of column/value pairs
|
* @var_args: va_list of column/value pairs
|
||||||
*
|
*
|
||||||
* A version of gtk_tree_store_set() using `va_list`.
|
* See gtk_tree_store_set(); this version takes a va_list for
|
||||||
|
* use by language bindings.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_set_valist (GtkTreeStore *tree_store,
|
gtk_tree_store_set_valist (GtkTreeStore *tree_store,
|
||||||
@@ -1221,23 +1183,16 @@ gtk_tree_store_set_valist (GtkTreeStore *tree_store,
|
|||||||
* @...: pairs of column number and value, terminated with -1
|
* @...: pairs of column number and value, terminated with -1
|
||||||
*
|
*
|
||||||
* Sets the value of one or more cells in the row referenced by @iter.
|
* Sets the value of one or more cells in the row referenced by @iter.
|
||||||
*
|
|
||||||
* The variable argument list should contain integer column numbers,
|
* The variable argument list should contain integer column numbers,
|
||||||
* each column number followed by the value to be set.
|
* each column number followed by the value to be set.
|
||||||
|
* The list is terminated by a -1. For example, to set column 0 with type
|
||||||
|
* %G_TYPE_STRING to “Foo”, you would write
|
||||||
|
* `gtk_tree_store_set (store, iter, 0, "Foo", -1)`.
|
||||||
*
|
*
|
||||||
* The list is terminated by a value of `-1`.
|
* The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
|
||||||
|
* will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.
|
||||||
*
|
*
|
||||||
* For example, to set column 0 with type `G_TYPE_STRING` to “Foo”, you would
|
* Deprecated: 4.10
|
||||||
* write
|
|
||||||
*
|
|
||||||
* ```c
|
|
||||||
* gtk_tree_store_set (store, iter, 0, "Foo", -1);
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* The value will be referenced by the store if it is a `G_TYPE_OBJECT`, and it
|
|
||||||
* will be copied if it is a `G_TYPE_STRING` or `G_TYPE_BOXED`.
|
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_set (GtkTreeStore *tree_store,
|
gtk_tree_store_set (GtkTreeStore *tree_store,
|
||||||
@@ -1256,14 +1211,13 @@ gtk_tree_store_set (GtkTreeStore *tree_store,
|
|||||||
* @tree_store: A `GtkTreeStore`
|
* @tree_store: A `GtkTreeStore`
|
||||||
* @iter: A valid `GtkTreeIter`
|
* @iter: A valid `GtkTreeIter`
|
||||||
*
|
*
|
||||||
* Removes @iter from @tree_store.
|
* Removes @iter from @tree_store. After being removed, @iter is set to the
|
||||||
|
* next valid row at that level, or invalidated if it previously pointed to the
|
||||||
|
* last one.
|
||||||
*
|
*
|
||||||
* After being removed, @iter is set to the next valid row at that level, or
|
* Returns: %TRUE if @iter is still valid, %FALSE if not.
|
||||||
* invalidated if it previously pointed to the last one.
|
|
||||||
*
|
*
|
||||||
* Returns: true if @iter is still valid, and false otherwise
|
* Deprecated: 4.10
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_store_remove (GtkTreeStore *tree_store,
|
gtk_tree_store_remove (GtkTreeStore *tree_store,
|
||||||
@@ -1329,19 +1283,15 @@ gtk_tree_store_remove (GtkTreeStore *tree_store,
|
|||||||
* @parent: (nullable): A valid `GtkTreeIter`
|
* @parent: (nullable): A valid `GtkTreeIter`
|
||||||
* @position: position to insert the new row, or -1 for last
|
* @position: position to insert the new row, or -1 for last
|
||||||
*
|
*
|
||||||
* Creates a new row at @position.
|
* Creates a new row at @position. If parent is non-%NULL, then the row will be
|
||||||
|
* made a child of @parent. Otherwise, the row will be created at the toplevel.
|
||||||
|
* If @position is -1 or is larger than the number of rows at that level, then
|
||||||
|
* the new row will be inserted to the end of the list. @iter will be changed
|
||||||
|
* to point to this new row. The row will be empty after this function is
|
||||||
|
* called. To fill in values, you need to call gtk_tree_store_set() or
|
||||||
|
* gtk_tree_store_set_value().
|
||||||
*
|
*
|
||||||
* If parent is non-%NULL, then the row will be made a child of @parent.
|
* Deprecated: 4.10
|
||||||
* Otherwise, the row will be created at the toplevel.
|
|
||||||
*
|
|
||||||
* If @position is `-1` or is larger than the number of rows at that level,
|
|
||||||
* then the new row will be inserted to the end of the list.
|
|
||||||
*
|
|
||||||
* The @iter parameter will be changed to point to this new row. The row
|
|
||||||
* will be empty after this function is called. To fill in values, you
|
|
||||||
* need to call gtk_tree_store_set() or gtk_tree_store_set_value().
|
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_insert (GtkTreeStore *tree_store,
|
gtk_tree_store_insert (GtkTreeStore *tree_store,
|
||||||
@@ -1396,21 +1346,17 @@ gtk_tree_store_insert (GtkTreeStore *tree_store,
|
|||||||
* @parent: (nullable): A valid `GtkTreeIter`
|
* @parent: (nullable): A valid `GtkTreeIter`
|
||||||
* @sibling: (nullable): A valid `GtkTreeIter`
|
* @sibling: (nullable): A valid `GtkTreeIter`
|
||||||
*
|
*
|
||||||
* Inserts a new row before @sibling.
|
* Inserts a new row before @sibling. If @sibling is %NULL, then the row will
|
||||||
|
* be appended to @parent ’s children. If @parent and @sibling are %NULL, then
|
||||||
|
* the row will be appended to the toplevel. If both @sibling and @parent are
|
||||||
|
* set, then @parent must be the parent of @sibling. When @sibling is set,
|
||||||
|
* @parent is optional.
|
||||||
*
|
*
|
||||||
* If @sibling is %NULL, then the row will be appended to @parent’s children.
|
* @iter will be changed to point to this new row. The row will be empty after
|
||||||
*
|
* this function is called. To fill in values, you need to call
|
||||||
* If @parent and @sibling are %NULL, then the row will be appended to the
|
|
||||||
* toplevel.
|
|
||||||
*
|
|
||||||
* If both @sibling and @parent are set, then @parent must be the parent
|
|
||||||
* of @sibling. When @sibling is set, @parent is optional.
|
|
||||||
*
|
|
||||||
* The @iter parameter will be changed to point to this new row. The row will
|
|
||||||
* be empty after this function is called. To fill in values, you need to call
|
|
||||||
* gtk_tree_store_set() or gtk_tree_store_set_value().
|
* gtk_tree_store_set() or gtk_tree_store_set_value().
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_insert_before (GtkTreeStore *tree_store,
|
gtk_tree_store_insert_before (GtkTreeStore *tree_store,
|
||||||
@@ -1482,21 +1428,17 @@ gtk_tree_store_insert_before (GtkTreeStore *tree_store,
|
|||||||
* @parent: (nullable): A valid `GtkTreeIter`
|
* @parent: (nullable): A valid `GtkTreeIter`
|
||||||
* @sibling: (nullable): A valid `GtkTreeIter`
|
* @sibling: (nullable): A valid `GtkTreeIter`
|
||||||
*
|
*
|
||||||
* Inserts a new row after @sibling.
|
* Inserts a new row after @sibling. If @sibling is %NULL, then the row will be
|
||||||
|
* prepended to @parent ’s children. If @parent and @sibling are %NULL, then
|
||||||
|
* the row will be prepended to the toplevel. If both @sibling and @parent are
|
||||||
|
* set, then @parent must be the parent of @sibling. When @sibling is set,
|
||||||
|
* @parent is optional.
|
||||||
*
|
*
|
||||||
* If @sibling is %NULL, then the row will be prepended to @parent’s children.
|
* @iter will be changed to point to this new row. The row will be empty after
|
||||||
*
|
* this function is called. To fill in values, you need to call
|
||||||
* If @parent and @sibling are %NULL, then the row will be prepended to the
|
|
||||||
* toplevel.
|
|
||||||
*
|
|
||||||
* If both @sibling and @parent are set, then @parent must be the parent
|
|
||||||
* of @sibling. When @sibling is set, @parent is optional.
|
|
||||||
*
|
|
||||||
* The @iter parameter will be changed to point to this new row. The row will
|
|
||||||
* be empty after this function is called. To fill in values, you need to call
|
|
||||||
* gtk_tree_store_set() or gtk_tree_store_set_value().
|
* gtk_tree_store_set() or gtk_tree_store_set_value().
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_insert_after (GtkTreeStore *tree_store,
|
gtk_tree_store_insert_after (GtkTreeStore *tree_store,
|
||||||
@@ -1570,34 +1512,26 @@ gtk_tree_store_insert_after (GtkTreeStore *tree_store,
|
|||||||
* @position: position to insert the new row, or -1 to append after existing rows
|
* @position: position to insert the new row, or -1 to append after existing rows
|
||||||
* @...: pairs of column number and value, terminated with -1
|
* @...: pairs of column number and value, terminated with -1
|
||||||
*
|
*
|
||||||
* Creates a new row at the given @position.
|
* Creates a new row at @position. @iter will be changed to point to this
|
||||||
*
|
* new row. If @position is -1, or larger than the number of rows on the list, then
|
||||||
* The @iter parameter will be changed to point to this new row.
|
|
||||||
*
|
|
||||||
* If @position is -1, or larger than the number of rows on the list, then
|
|
||||||
* the new row will be appended to the list. The row will be filled with
|
* the new row will be appended to the list. The row will be filled with
|
||||||
* the values given to this function.
|
* the values given to this function.
|
||||||
*
|
*
|
||||||
* Calling
|
* Calling
|
||||||
*
|
* `gtk_tree_store_insert_with_values (tree_store, iter, position, ...)`
|
||||||
* gtk_tree_store_insert_with_values (tree_store, iter, position, ...)
|
|
||||||
*
|
|
||||||
* has the same effect as calling
|
* has the same effect as calling
|
||||||
*
|
* |[<!-- language="C" -->
|
||||||
* ```c
|
|
||||||
* gtk_tree_store_insert (tree_store, iter, position);
|
* gtk_tree_store_insert (tree_store, iter, position);
|
||||||
* gtk_tree_store_set (tree_store, iter, ...);
|
* gtk_tree_store_set (tree_store, iter, ...);
|
||||||
* ```
|
* ]|
|
||||||
*
|
|
||||||
* with the different that the former will only emit a row_inserted signal,
|
* with the different that the former will only emit a row_inserted signal,
|
||||||
* while the latter will emit row_inserted, row_changed and if the tree store
|
* while the latter will emit row_inserted, row_changed and if the tree store
|
||||||
* is sorted, rows_reordered.
|
* is sorted, rows_reordered. Since emitting the rows_reordered signal
|
||||||
|
* repeatedly can affect the performance of the program,
|
||||||
|
* gtk_tree_store_insert_with_values() should generally be preferred when
|
||||||
|
* inserting rows in a sorted tree store.
|
||||||
*
|
*
|
||||||
* Since emitting the rows_reordered signal repeatedly can affect the
|
* Deprecated: 4.10
|
||||||
* performance of the program, gtk_tree_store_insert_with_values() should
|
|
||||||
* generally be preferred when inserting rows in a sorted tree store.
|
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_store_insert_with_values (GtkTreeStore *tree_store,
|
gtk_tree_store_insert_with_values (GtkTreeStore *tree_store,
|
||||||
@@ -1673,11 +1607,10 @@ gtk_tree_store_insert_with_values (GtkTreeStore *tree_store,
|
|||||||
* @n_values: the length of the @columns and @values arrays
|
* @n_values: the length of the @columns and @values arrays
|
||||||
*
|
*
|
||||||
* A variant of gtk_tree_store_insert_with_values() which takes
|
* A variant of gtk_tree_store_insert_with_values() which takes
|
||||||
* the columns and values as two arrays, instead of varargs.
|
* the columns and values as two arrays, instead of varargs. This
|
||||||
|
* function is mainly intended for language bindings.
|
||||||
*
|
*
|
||||||
* This function is mainly intended for language bindings.
|
* Deprecated: 4.10
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store,
|
gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store,
|
||||||
@@ -1747,15 +1680,13 @@ gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store,
|
|||||||
* @iter: (out): An unset `GtkTreeIter` to set to the prepended row
|
* @iter: (out): An unset `GtkTreeIter` to set to the prepended row
|
||||||
* @parent: (nullable): A valid `GtkTreeIter`
|
* @parent: (nullable): A valid `GtkTreeIter`
|
||||||
*
|
*
|
||||||
* Prepends a new row to @tree_store.
|
* Prepends a new row to @tree_store. If @parent is non-%NULL, then it will prepend
|
||||||
*
|
* the new row before the first child of @parent, otherwise it will prepend a row
|
||||||
* If @parent is non-%NULL, then it will prepend the new row before the first
|
* to the top level. @iter will be changed to point to this new row. The row
|
||||||
* child of @parent, otherwise it will prepend a row to the top level. The
|
* will be empty after this function is called. To fill in values, you need to
|
||||||
* `iter` parameter will be changed to point to this new row. The row will
|
|
||||||
* be empty after this function is called. To fill in values, you need to
|
|
||||||
* call gtk_tree_store_set() or gtk_tree_store_set_value().
|
* call gtk_tree_store_set() or gtk_tree_store_set_value().
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_prepend (GtkTreeStore *tree_store,
|
gtk_tree_store_prepend (GtkTreeStore *tree_store,
|
||||||
@@ -1810,16 +1741,13 @@ gtk_tree_store_prepend (GtkTreeStore *tree_store,
|
|||||||
* @iter: (out): An unset `GtkTreeIter` to set to the appended row
|
* @iter: (out): An unset `GtkTreeIter` to set to the appended row
|
||||||
* @parent: (nullable): A valid `GtkTreeIter`
|
* @parent: (nullable): A valid `GtkTreeIter`
|
||||||
*
|
*
|
||||||
* Appends a new row to @tree_store.
|
* Appends a new row to @tree_store. If @parent is non-%NULL, then it will append the
|
||||||
*
|
* new row after the last child of @parent, otherwise it will append a row to
|
||||||
* If @parent is non-%NULL, then it will append the new row after the last
|
* the top level. @iter will be changed to point to this new row. The row will
|
||||||
* child of @parent, otherwise it will append a row to the top level.
|
* be empty after this function is called. To fill in values, you need to call
|
||||||
*
|
|
||||||
* The @iter parameter will be changed to point to this new row. The row will
|
|
||||||
* be empty after this function is called. To fill in values, you need to call
|
|
||||||
* gtk_tree_store_set() or gtk_tree_store_set_value().
|
* gtk_tree_store_set() or gtk_tree_store_set_value().
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_append (GtkTreeStore *tree_store,
|
gtk_tree_store_append (GtkTreeStore *tree_store,
|
||||||
@@ -1874,11 +1802,12 @@ gtk_tree_store_append (GtkTreeStore *tree_store,
|
|||||||
* @iter: A valid `GtkTreeIter`
|
* @iter: A valid `GtkTreeIter`
|
||||||
* @descendant: A valid `GtkTreeIter`
|
* @descendant: A valid `GtkTreeIter`
|
||||||
*
|
*
|
||||||
* Checks if @iter is an ancestor of @descendant.
|
* Returns %TRUE if @iter is an ancestor of @descendant. That is, @iter is the
|
||||||
|
* parent (or grandparent or great-grandparent) of @descendant.
|
||||||
*
|
*
|
||||||
* Returns: true if @iter is an ancestor of @descendant, and false otherwise
|
* Returns: %TRUE, if @iter is an ancestor of @descendant
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_store_is_ancestor (GtkTreeStore *tree_store,
|
gtk_tree_store_is_ancestor (GtkTreeStore *tree_store,
|
||||||
@@ -1899,14 +1828,12 @@ gtk_tree_store_is_ancestor (GtkTreeStore *tree_store,
|
|||||||
* @tree_store: A `GtkTreeStore`
|
* @tree_store: A `GtkTreeStore`
|
||||||
* @iter: A valid `GtkTreeIter`
|
* @iter: A valid `GtkTreeIter`
|
||||||
*
|
*
|
||||||
* Returns the depth of the position pointed by the iterator
|
* Returns the depth of @iter. This will be 0 for anything on the root level, 1
|
||||||
|
* for anything down a level, etc.
|
||||||
*
|
*
|
||||||
* The depth will be 0 for anything on the root level, 1 for anything down
|
* Returns: The depth of @iter
|
||||||
* a level, etc.
|
|
||||||
*
|
*
|
||||||
* Returns: The depth of the position pointed by the iterator
|
* Deprecated: 4.10
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
**/
|
**/
|
||||||
int
|
int
|
||||||
gtk_tree_store_iter_depth (GtkTreeStore *tree_store,
|
gtk_tree_store_iter_depth (GtkTreeStore *tree_store,
|
||||||
@@ -1976,7 +1903,7 @@ gtk_tree_store_increment_stamp (GtkTreeStore *tree_store)
|
|||||||
*
|
*
|
||||||
* Removes all rows from @tree_store
|
* Removes all rows from @tree_store
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_clear (GtkTreeStore *tree_store)
|
gtk_tree_store_clear (GtkTreeStore *tree_store)
|
||||||
@@ -2021,9 +1948,9 @@ gtk_tree_store_iter_is_valid_helper (GtkTreeIter *iter,
|
|||||||
* This function is slow. Only use it for debugging and/or testing
|
* This function is slow. Only use it for debugging and/or testing
|
||||||
* purposes.
|
* purposes.
|
||||||
*
|
*
|
||||||
* Returns: true if the iter is valid, and false otherwise
|
* Returns: %TRUE if the iter is valid, %FALSE if the iter is invalid.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
* Deprecated: 4.10
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_store_iter_is_valid (GtkTreeStore *tree_store,
|
gtk_tree_store_iter_is_valid (GtkTreeStore *tree_store,
|
||||||
@@ -2343,17 +2270,16 @@ gtk_tree_store_reorder_func (gconstpointer a,
|
|||||||
/**
|
/**
|
||||||
* gtk_tree_store_reorder: (skip)
|
* gtk_tree_store_reorder: (skip)
|
||||||
* @tree_store: A `GtkTreeStore`
|
* @tree_store: A `GtkTreeStore`
|
||||||
* @parent: (nullable): the parent of the children to re-order
|
* @parent: (nullable): A `GtkTreeIter`
|
||||||
* @new_order: (array): an array of integers mapping the new position
|
* @new_order: (array): an array of integers mapping the new position of each child
|
||||||
* of each child to its old position before the re-ordering,
|
* to its old position before the re-ordering,
|
||||||
* i.e. `new_order[newpos] = oldpos`
|
* i.e. @new_order`[newpos] = oldpos`.
|
||||||
*
|
*
|
||||||
* Reorders the children of @parent in @tree_store to follow the order
|
* Reorders the children of @parent in @tree_store to follow the order
|
||||||
* indicated by @new_order.
|
* indicated by @new_order. Note that this function only works with
|
||||||
|
* unsorted stores.
|
||||||
*
|
*
|
||||||
* Note that this function only works with unsorted stores.
|
* Deprecated: 4.10
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_store_reorder (GtkTreeStore *tree_store,
|
gtk_tree_store_reorder (GtkTreeStore *tree_store,
|
||||||
@@ -2438,11 +2364,10 @@ gtk_tree_store_reorder (GtkTreeStore *tree_store,
|
|||||||
* @a: A `GtkTreeIter`.
|
* @a: A `GtkTreeIter`.
|
||||||
* @b: Another `GtkTreeIter`.
|
* @b: Another `GtkTreeIter`.
|
||||||
*
|
*
|
||||||
* Swaps @a and @b in the same level of @tree_store.
|
* Swaps @a and @b in the same level of @tree_store. Note that this function
|
||||||
|
* only works with unsorted stores.
|
||||||
*
|
*
|
||||||
* Note that this function only works with unsorted stores.
|
* Deprecated: 4.10
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_swap (GtkTreeStore *tree_store,
|
gtk_tree_store_swap (GtkTreeStore *tree_store,
|
||||||
@@ -2905,15 +2830,12 @@ free_paths_and_out:
|
|||||||
* @iter: A `GtkTreeIter`
|
* @iter: A `GtkTreeIter`
|
||||||
* @position: (nullable): A `GtkTreeIter`
|
* @position: (nullable): A `GtkTreeIter`
|
||||||
*
|
*
|
||||||
* Moves @iter in @tree_store to the position before @position.
|
* Moves @iter in @tree_store to the position before @position. @iter and
|
||||||
|
* @position should be in the same level. Note that this function only
|
||||||
|
* works with unsorted stores. If @position is %NULL, @iter will be
|
||||||
|
* moved to the end of the level.
|
||||||
*
|
*
|
||||||
* @iter and @position should be in the same level.
|
* Deprecated: 4.10
|
||||||
*
|
|
||||||
* Note that this function only works with unsorted stores.
|
|
||||||
*
|
|
||||||
* If @position is %NULL, @iter will be moved to the end of the level.
|
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_move_before (GtkTreeStore *tree_store,
|
gtk_tree_store_move_before (GtkTreeStore *tree_store,
|
||||||
@@ -2929,15 +2851,12 @@ gtk_tree_store_move_before (GtkTreeStore *tree_store,
|
|||||||
* @iter: A `GtkTreeIter`.
|
* @iter: A `GtkTreeIter`.
|
||||||
* @position: (nullable): A `GtkTreeIter`.
|
* @position: (nullable): A `GtkTreeIter`.
|
||||||
*
|
*
|
||||||
* Moves @iter in @tree_store to the position after @position.
|
* Moves @iter in @tree_store to the position after @position. @iter and
|
||||||
|
* @position should be in the same level. Note that this function only
|
||||||
|
* works with unsorted stores. If @position is %NULL, @iter will be moved
|
||||||
|
* to the start of the level.
|
||||||
*
|
*
|
||||||
* @iter and @position should be in the same level.
|
* Deprecated: 4.10
|
||||||
*
|
|
||||||
* Note that this function only works with unsorted stores.
|
|
||||||
*
|
|
||||||
* If @position is %NULL, @iter will be moved to the start of the level.
|
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_store_move_after (GtkTreeStore *tree_store,
|
gtk_tree_store_move_after (GtkTreeStore *tree_store,
|
||||||
|
|||||||
@@ -60,63 +60,63 @@ struct _GtkTreeStoreClass
|
|||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_tree_store_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_store_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeStore *gtk_tree_store_new (int n_columns,
|
GtkTreeStore *gtk_tree_store_new (int n_columns,
|
||||||
...);
|
...);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeStore *gtk_tree_store_newv (int n_columns,
|
GtkTreeStore *gtk_tree_store_newv (int n_columns,
|
||||||
GType *types);
|
GType *types);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_set_column_types (GtkTreeStore *tree_store,
|
void gtk_tree_store_set_column_types (GtkTreeStore *tree_store,
|
||||||
int n_columns,
|
int n_columns,
|
||||||
GType *types);
|
GType *types);
|
||||||
|
|
||||||
/* NOTE: use gtk_tree_model_get to get values from a GtkTreeStore */
|
/* NOTE: use gtk_tree_model_get to get values from a GtkTreeStore */
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_set_value (GtkTreeStore *tree_store,
|
void gtk_tree_store_set_value (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int column,
|
int column,
|
||||||
GValue *value);
|
GValue *value);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_set (GtkTreeStore *tree_store,
|
void gtk_tree_store_set (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
...);
|
...);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_set_valuesv (GtkTreeStore *tree_store,
|
void gtk_tree_store_set_valuesv (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
int *columns,
|
int *columns,
|
||||||
GValue *values,
|
GValue *values,
|
||||||
int n_values);
|
int n_values);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_set_valist (GtkTreeStore *tree_store,
|
void gtk_tree_store_set_valist (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
va_list var_args);
|
va_list var_args);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_store_remove (GtkTreeStore *tree_store,
|
gboolean gtk_tree_store_remove (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_insert (GtkTreeStore *tree_store,
|
void gtk_tree_store_insert (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *parent,
|
GtkTreeIter *parent,
|
||||||
int position);
|
int position);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_insert_before (GtkTreeStore *tree_store,
|
void gtk_tree_store_insert_before (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *parent,
|
GtkTreeIter *parent,
|
||||||
GtkTreeIter *sibling);
|
GtkTreeIter *sibling);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_insert_after (GtkTreeStore *tree_store,
|
void gtk_tree_store_insert_after (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *parent,
|
GtkTreeIter *parent,
|
||||||
GtkTreeIter *sibling);
|
GtkTreeIter *sibling);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_insert_with_values (GtkTreeStore *tree_store,
|
void gtk_tree_store_insert_with_values (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *parent,
|
GtkTreeIter *parent,
|
||||||
int position,
|
int position,
|
||||||
...);
|
...);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store,
|
void gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *parent,
|
GtkTreeIter *parent,
|
||||||
@@ -124,39 +124,39 @@ void gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store,
|
|||||||
int *columns,
|
int *columns,
|
||||||
GValue *values,
|
GValue *values,
|
||||||
int n_values);
|
int n_values);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_prepend (GtkTreeStore *tree_store,
|
void gtk_tree_store_prepend (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *parent);
|
GtkTreeIter *parent);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_append (GtkTreeStore *tree_store,
|
void gtk_tree_store_append (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *parent);
|
GtkTreeIter *parent);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_store_is_ancestor (GtkTreeStore *tree_store,
|
gboolean gtk_tree_store_is_ancestor (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *descendant);
|
GtkTreeIter *descendant);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_store_iter_depth (GtkTreeStore *tree_store,
|
int gtk_tree_store_iter_depth (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_clear (GtkTreeStore *tree_store);
|
void gtk_tree_store_clear (GtkTreeStore *tree_store);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_store_iter_is_valid (GtkTreeStore *tree_store,
|
gboolean gtk_tree_store_iter_is_valid (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_reorder (GtkTreeStore *tree_store,
|
void gtk_tree_store_reorder (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *parent,
|
GtkTreeIter *parent,
|
||||||
int *new_order);
|
int *new_order);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_swap (GtkTreeStore *tree_store,
|
void gtk_tree_store_swap (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *a,
|
GtkTreeIter *a,
|
||||||
GtkTreeIter *b);
|
GtkTreeIter *b);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_move_before (GtkTreeStore *tree_store,
|
void gtk_tree_store_move_before (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *position);
|
GtkTreeIter *position);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkTreeListModel)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_store_move_after (GtkTreeStore *tree_store,
|
void gtk_tree_store_move_after (GtkTreeStore *tree_store,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *position);
|
GtkTreeIter *position);
|
||||||
|
|||||||
@@ -160,9 +160,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* For rubberband selection, a subnode with name `rubberband` is used.
|
* For rubberband selection, a subnode with name `rubberband` is used.
|
||||||
*
|
*
|
||||||
* For the drop target location during DND, a subnode with name `dndtarget` is used.
|
* For the drop target location during DND, a subnode with name `dndtarget` is used.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] for lists, and [class@Gtk.ColumnView]
|
|
||||||
* for tabular lists
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@@ -7550,7 +7547,7 @@ column_sizing_notify (GObject *object,
|
|||||||
* Only enable this option if all rows are the same height and all
|
* Only enable this option if all rows are the same height and all
|
||||||
* columns are of type %GTK_TREE_VIEW_COLUMN_FIXED.
|
* columns are of type %GTK_TREE_VIEW_COLUMN_FIXED.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
|
gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
|
||||||
@@ -7600,7 +7597,7 @@ gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if @tree_view is in fixed height mode
|
* Returns: %TRUE if @tree_view is in fixed height mode
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_fixed_height_mode (GtkTreeView *tree_view)
|
gtk_tree_view_get_fixed_height_mode (GtkTreeView *tree_view)
|
||||||
@@ -10175,7 +10172,7 @@ gtk_tree_view_adjustment_changed (GtkAdjustment *adjustment,
|
|||||||
*
|
*
|
||||||
* Returns: A newly created `GtkTreeView` widget.
|
* Returns: A newly created `GtkTreeView` widget.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_tree_view_new (void)
|
gtk_tree_view_new (void)
|
||||||
@@ -10191,7 +10188,7 @@ gtk_tree_view_new (void)
|
|||||||
*
|
*
|
||||||
* Returns: A newly created `GtkTreeView` widget.
|
* Returns: A newly created `GtkTreeView` widget.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_tree_view_new_with_model (GtkTreeModel *model)
|
gtk_tree_view_new_with_model (GtkTreeModel *model)
|
||||||
@@ -10211,7 +10208,7 @@ gtk_tree_view_new_with_model (GtkTreeModel *model)
|
|||||||
*
|
*
|
||||||
* Returns: (transfer none) (nullable): A `GtkTreeModel`
|
* Returns: (transfer none) (nullable): A `GtkTreeModel`
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
GtkTreeModel *
|
GtkTreeModel *
|
||||||
gtk_tree_view_get_model (GtkTreeView *tree_view)
|
gtk_tree_view_get_model (GtkTreeView *tree_view)
|
||||||
@@ -10232,7 +10229,7 @@ gtk_tree_view_get_model (GtkTreeView *tree_view)
|
|||||||
* set, it will remove it before setting the new model. If @model is %NULL,
|
* set, it will remove it before setting the new model. If @model is %NULL,
|
||||||
* then it will unset the old model.
|
* then it will unset the old model.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_model (GtkTreeView *tree_view,
|
gtk_tree_view_set_model (GtkTreeView *tree_view,
|
||||||
@@ -10386,7 +10383,7 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: (transfer none): A `GtkTreeSelection` object.
|
* Returns: (transfer none): A `GtkTreeSelection` object.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
GtkTreeSelection *
|
GtkTreeSelection *
|
||||||
gtk_tree_view_get_selection (GtkTreeView *tree_view)
|
gtk_tree_view_get_selection (GtkTreeView *tree_view)
|
||||||
@@ -10471,7 +10468,7 @@ gtk_tree_view_do_set_vadjustment (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: Whether the headers are visible or not.
|
* Returns: Whether the headers are visible or not.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_headers_visible (GtkTreeView *tree_view)
|
gtk_tree_view_get_headers_visible (GtkTreeView *tree_view)
|
||||||
@@ -10490,7 +10487,7 @@ gtk_tree_view_get_headers_visible (GtkTreeView *tree_view)
|
|||||||
*
|
*
|
||||||
* Sets the visibility state of the headers.
|
* Sets the visibility state of the headers.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
|
gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
|
||||||
@@ -10543,7 +10540,7 @@ gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
|
|||||||
* Resizes all columns to their optimal width. Only works after the
|
* Resizes all columns to their optimal width. Only works after the
|
||||||
* treeview has been realized.
|
* treeview has been realized.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_columns_autosize (GtkTreeView *tree_view)
|
gtk_tree_view_columns_autosize (GtkTreeView *tree_view)
|
||||||
@@ -10575,7 +10572,7 @@ gtk_tree_view_columns_autosize (GtkTreeView *tree_view)
|
|||||||
*
|
*
|
||||||
* Allow the column title buttons to be clicked.
|
* Allow the column title buttons to be clicked.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view,
|
gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view,
|
||||||
@@ -10609,7 +10606,7 @@ gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if all header columns are clickable, otherwise %FALSE
|
* Returns: %TRUE if all header columns are clickable, otherwise %FALSE
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view)
|
gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view)
|
||||||
@@ -10634,7 +10631,7 @@ gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view)
|
|||||||
* Cause the `GtkTreeView`::row-activated signal to be emitted
|
* Cause the `GtkTreeView`::row-activated signal to be emitted
|
||||||
* on a single click instead of a double click.
|
* on a single click instead of a double click.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
|
gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
|
||||||
@@ -10661,7 +10658,7 @@ gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if row-activated will be emitted on a single click
|
* Returns: %TRUE if row-activated will be emitted on a single click
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_activate_on_single_click (GtkTreeView *tree_view)
|
gtk_tree_view_get_activate_on_single_click (GtkTreeView *tree_view)
|
||||||
@@ -10687,7 +10684,7 @@ gtk_tree_view_get_activate_on_single_click (GtkTreeView *tree_view)
|
|||||||
*
|
*
|
||||||
* Returns: The number of columns in @tree_view after appending.
|
* Returns: The number of columns in @tree_view after appending.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
int
|
int
|
||||||
gtk_tree_view_append_column (GtkTreeView *tree_view,
|
gtk_tree_view_append_column (GtkTreeView *tree_view,
|
||||||
@@ -10709,7 +10706,7 @@ gtk_tree_view_append_column (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: The number of columns in @tree_view after removing.
|
* Returns: The number of columns in @tree_view after removing.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
int
|
int
|
||||||
gtk_tree_view_remove_column (GtkTreeView *tree_view,
|
gtk_tree_view_remove_column (GtkTreeView *tree_view,
|
||||||
@@ -10779,7 +10776,7 @@ gtk_tree_view_remove_column (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: The number of columns in @tree_view after insertion.
|
* Returns: The number of columns in @tree_view after insertion.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
int
|
int
|
||||||
gtk_tree_view_insert_column (GtkTreeView *tree_view,
|
gtk_tree_view_insert_column (GtkTreeView *tree_view,
|
||||||
@@ -10850,7 +10847,7 @@ gtk_tree_view_insert_column (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: The number of columns in @tree_view after insertion.
|
* Returns: The number of columns in @tree_view after insertion.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
int
|
int
|
||||||
gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view,
|
gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view,
|
||||||
@@ -10909,7 +10906,7 @@ gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: number of columns in the tree view post-insert
|
* Returns: number of columns in the tree view post-insert
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
int
|
int
|
||||||
gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view,
|
gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view,
|
||||||
@@ -10944,7 +10941,7 @@ gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_vie
|
|||||||
*
|
*
|
||||||
* Returns: The number of columns in the @tree_view
|
* Returns: The number of columns in the @tree_view
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
guint
|
guint
|
||||||
gtk_tree_view_get_n_columns (GtkTreeView *tree_view)
|
gtk_tree_view_get_n_columns (GtkTreeView *tree_view)
|
||||||
@@ -10966,7 +10963,7 @@ gtk_tree_view_get_n_columns (GtkTreeView *tree_view)
|
|||||||
* Returns: (nullable) (transfer none): The `GtkTreeViewColumn`, or %NULL if the
|
* Returns: (nullable) (transfer none): The `GtkTreeViewColumn`, or %NULL if the
|
||||||
* position is outside the range of columns.
|
* position is outside the range of columns.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
GtkTreeViewColumn *
|
GtkTreeViewColumn *
|
||||||
gtk_tree_view_get_column (GtkTreeView *tree_view,
|
gtk_tree_view_get_column (GtkTreeView *tree_view,
|
||||||
@@ -10994,7 +10991,7 @@ gtk_tree_view_get_column (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: (element-type GtkTreeViewColumn) (transfer container): A list of `GtkTreeViewColumn`s
|
* Returns: (element-type GtkTreeViewColumn) (transfer container): A list of `GtkTreeViewColumn`s
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
GList *
|
GList *
|
||||||
gtk_tree_view_get_columns (GtkTreeView *tree_view)
|
gtk_tree_view_get_columns (GtkTreeView *tree_view)
|
||||||
@@ -11015,7 +11012,7 @@ gtk_tree_view_get_columns (GtkTreeView *tree_view)
|
|||||||
* Moves @column to be after to @base_column. If @base_column is %NULL, then
|
* Moves @column to be after to @base_column. If @base_column is %NULL, then
|
||||||
* @column is placed in the first position.
|
* @column is placed in the first position.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_move_column_after (GtkTreeView *tree_view,
|
gtk_tree_view_move_column_after (GtkTreeView *tree_view,
|
||||||
@@ -11076,7 +11073,7 @@ gtk_tree_view_move_column_after (GtkTreeView *tree_view,
|
|||||||
* If you do not want expander arrow to appear in your tree, set the
|
* If you do not want expander arrow to appear in your tree, set the
|
||||||
* expander column to a hidden column.
|
* expander column to a hidden column.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_expander_column (GtkTreeView *tree_view,
|
gtk_tree_view_set_expander_column (GtkTreeView *tree_view,
|
||||||
@@ -11105,7 +11102,7 @@ gtk_tree_view_set_expander_column (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: (transfer none) (nullable): The expander column.
|
* Returns: (transfer none) (nullable): The expander column.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
GtkTreeViewColumn *
|
GtkTreeViewColumn *
|
||||||
gtk_tree_view_get_expander_column (GtkTreeView *tree_view)
|
gtk_tree_view_get_expander_column (GtkTreeView *tree_view)
|
||||||
@@ -11139,7 +11136,7 @@ gtk_tree_view_get_expander_column (GtkTreeView *tree_view)
|
|||||||
* @tree_view reverts to the default behavior of allowing all columns to be
|
* @tree_view reverts to the default behavior of allowing all columns to be
|
||||||
* dropped everywhere.
|
* dropped everywhere.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view,
|
gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view,
|
||||||
@@ -11173,7 +11170,7 @@ gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* If either @tree_x or @tree_y are -1, then that direction isn’t scrolled.
|
* If either @tree_x or @tree_y are -1, then that direction isn’t scrolled.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
|
gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
|
||||||
@@ -11222,7 +11219,7 @@ gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
|
|||||||
* model. If the model changes before the @tree_view is realized, the centered
|
* model. If the model changes before the @tree_view is realized, the centered
|
||||||
* path will be modified to reflect this change.
|
* path will be modified to reflect this change.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
|
gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
|
||||||
@@ -11327,7 +11324,7 @@ gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Activates the cell determined by @path and @column.
|
* Activates the cell determined by @path and @column.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_row_activated (GtkTreeView *tree_view,
|
gtk_tree_view_row_activated (GtkTreeView *tree_view,
|
||||||
@@ -11376,7 +11373,7 @@ gtk_tree_view_expand_all_emission_helper (GtkTreeRBTree *tree,
|
|||||||
*
|
*
|
||||||
* Recursively expands all nodes in the @tree_view.
|
* Recursively expands all nodes in the @tree_view.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_expand_all (GtkTreeView *tree_view)
|
gtk_tree_view_expand_all (GtkTreeView *tree_view)
|
||||||
@@ -11410,7 +11407,7 @@ gtk_tree_view_expand_all (GtkTreeView *tree_view)
|
|||||||
*
|
*
|
||||||
* Recursively collapses all visible, expanded nodes in @tree_view.
|
* Recursively collapses all visible, expanded nodes in @tree_view.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_collapse_all (GtkTreeView *tree_view)
|
gtk_tree_view_collapse_all (GtkTreeView *tree_view)
|
||||||
@@ -11452,7 +11449,7 @@ gtk_tree_view_collapse_all (GtkTreeView *tree_view)
|
|||||||
* Expands the row at @path. This will also expand all parent rows of
|
* Expands the row at @path. This will also expand all parent rows of
|
||||||
* @path as necessary.
|
* @path as necessary.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_expand_to_path (GtkTreeView *tree_view,
|
gtk_tree_view_expand_to_path (GtkTreeView *tree_view,
|
||||||
@@ -11583,7 +11580,7 @@ gtk_tree_view_real_expand_row (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if the row existed and had children
|
* Returns: %TRUE if the row existed and had children
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_expand_row (GtkTreeView *tree_view,
|
gtk_tree_view_expand_row (GtkTreeView *tree_view,
|
||||||
@@ -11723,7 +11720,7 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if the row was collapsed.
|
* Returns: %TRUE if the row was collapsed.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_collapse_row (GtkTreeView *tree_view,
|
gtk_tree_view_collapse_row (GtkTreeView *tree_view,
|
||||||
@@ -11785,7 +11782,7 @@ gtk_tree_view_map_expanded_rows_helper (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Calls @func on all expanded rows.
|
* Calls @func on all expanded rows.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view,
|
gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view,
|
||||||
@@ -11816,7 +11813,7 @@ gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if #path is expanded.
|
* Returns: %TRUE if #path is expanded.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_row_expanded (GtkTreeView *tree_view,
|
gtk_tree_view_row_expanded (GtkTreeView *tree_view,
|
||||||
@@ -11845,7 +11842,7 @@ gtk_tree_view_row_expanded (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if the tree can be reordered.
|
* Returns: %TRUE if the tree can be reordered.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_reorderable (GtkTreeView *tree_view)
|
gtk_tree_view_get_reorderable (GtkTreeView *tree_view)
|
||||||
@@ -11877,7 +11874,7 @@ gtk_tree_view_get_reorderable (GtkTreeView *tree_view)
|
|||||||
* reordering is allowed. If more control is needed, you should probably
|
* reordering is allowed. If more control is needed, you should probably
|
||||||
* handle drag and drop manually.
|
* handle drag and drop manually.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
|
gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
|
||||||
@@ -12003,7 +12000,7 @@ gtk_tree_view_real_set_cursor (GtkTreeView *tree_view,
|
|||||||
* The returned `GtkTreePath` must be freed with gtk_tree_path_free() when
|
* The returned `GtkTreePath` must be freed with gtk_tree_path_free() when
|
||||||
* you are done with it.
|
* you are done with it.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_get_cursor (GtkTreeView *tree_view,
|
gtk_tree_view_get_cursor (GtkTreeView *tree_view,
|
||||||
@@ -12048,7 +12045,7 @@ gtk_tree_view_get_cursor (GtkTreeView *tree_view,
|
|||||||
* If @path is invalid for @model, the current cursor (if any) will be unset
|
* If @path is invalid for @model, the current cursor (if any) will be unset
|
||||||
* and the function will return without failing.
|
* and the function will return without failing.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_cursor (GtkTreeView *tree_view,
|
gtk_tree_view_set_cursor (GtkTreeView *tree_view,
|
||||||
@@ -12083,7 +12080,7 @@ gtk_tree_view_set_cursor (GtkTreeView *tree_view,
|
|||||||
* If @path is invalid for @model, the current cursor (if any) will be unset
|
* If @path is invalid for @model, the current cursor (if any) will be unset
|
||||||
* and the function will return without failing.
|
* and the function will return without failing.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view,
|
gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view,
|
||||||
@@ -12171,7 +12168,7 @@ gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if a row exists at that coordinate.
|
* Returns: %TRUE if a row exists at that coordinate.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
|
gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
|
||||||
@@ -12328,7 +12325,7 @@ gtk_tree_view_get_cell_area_y_offset (GtkTreeView *tree_view,
|
|||||||
* gtk_cell_renderer_render(). This function is only valid if @tree_view is
|
* gtk_cell_renderer_render(). This function is only valid if @tree_view is
|
||||||
* realized.
|
* realized.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_get_cell_area (GtkTreeView *tree_view,
|
gtk_tree_view_get_cell_area (GtkTreeView *tree_view,
|
||||||
@@ -12456,7 +12453,7 @@ gtk_tree_view_get_row_y_offset (GtkTreeView *tree_view,
|
|||||||
* returned by gtk_tree_view_get_cell_area(), which returns only the cell
|
* returned by gtk_tree_view_get_cell_area(), which returns only the cell
|
||||||
* itself, excluding surrounding borders and the tree expander area.
|
* itself, excluding surrounding borders and the tree expander area.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_get_background_area (GtkTreeView *tree_view,
|
gtk_tree_view_get_background_area (GtkTreeView *tree_view,
|
||||||
@@ -12508,7 +12505,7 @@ gtk_tree_view_get_background_area (GtkTreeView *tree_view,
|
|||||||
* Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire
|
* Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire
|
||||||
* scrollable area of the tree.
|
* scrollable area of the tree.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_get_visible_rect (GtkTreeView *tree_view,
|
gtk_tree_view_get_visible_rect (GtkTreeView *tree_view,
|
||||||
@@ -12543,7 +12540,7 @@ gtk_tree_view_get_visible_rect (GtkTreeView *tree_view,
|
|||||||
* Converts widget coordinates to coordinates for the
|
* Converts widget coordinates to coordinates for the
|
||||||
* tree (the full scrollable area of the tree).
|
* tree (the full scrollable area of the tree).
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view,
|
gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view,
|
||||||
@@ -12575,7 +12572,7 @@ gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view,
|
|||||||
* Converts tree coordinates (coordinates in full scrollable area of the tree)
|
* Converts tree coordinates (coordinates in full scrollable area of the tree)
|
||||||
* to widget coordinates.
|
* to widget coordinates.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view,
|
gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view,
|
||||||
@@ -12606,7 +12603,7 @@ gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Converts widget coordinates to coordinates for the bin_window.
|
* Converts widget coordinates to coordinates for the bin_window.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view,
|
gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view,
|
||||||
@@ -12635,7 +12632,7 @@ gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Converts bin_window coordinates to widget relative coordinates.
|
* Converts bin_window coordinates to widget relative coordinates.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view,
|
gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view,
|
||||||
@@ -12665,7 +12662,7 @@ gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view,
|
|||||||
* Converts tree coordinates (coordinates in full scrollable area of the tree)
|
* Converts tree coordinates (coordinates in full scrollable area of the tree)
|
||||||
* to bin_window coordinates.
|
* to bin_window coordinates.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view,
|
gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view,
|
||||||
@@ -12695,7 +12692,7 @@ gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view,
|
|||||||
* Converts bin_window coordinates to coordinates for the
|
* Converts bin_window coordinates to coordinates for the
|
||||||
* tree (the full scrollable area of the tree).
|
* tree (the full scrollable area of the tree).
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view,
|
gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view,
|
||||||
@@ -12729,7 +12726,7 @@ gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE, if valid paths were placed in @start_path and @end_path.
|
* Returns: %TRUE, if valid paths were placed in @start_path and @end_path.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_visible_range (GtkTreeView *tree_view,
|
gtk_tree_view_get_visible_range (GtkTreeView *tree_view,
|
||||||
@@ -12813,7 +12810,7 @@ gtk_tree_view_get_visible_range (GtkTreeView *tree_view,
|
|||||||
* Returns: %TRUE if the area at the given coordinates is blank,
|
* Returns: %TRUE if the area at the given coordinates is blank,
|
||||||
* %FALSE otherwise.
|
* %FALSE otherwise.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_is_blank_at_pos (GtkTreeView *tree_view,
|
gtk_tree_view_is_blank_at_pos (GtkTreeView *tree_view,
|
||||||
@@ -12909,7 +12906,7 @@ unset_reorderable (GtkTreeView *tree_view)
|
|||||||
* Turns @tree_view into a drag source for automatic DND. Calling this
|
* Turns @tree_view into a drag source for automatic DND. Calling this
|
||||||
* method sets `GtkTreeView`:reorderable to %FALSE.
|
* method sets `GtkTreeView`:reorderable to %FALSE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
|
gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
|
||||||
@@ -12943,7 +12940,7 @@ gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
|
|||||||
* Turns @tree_view into a drop destination for automatic DND. Calling
|
* Turns @tree_view into a drop destination for automatic DND. Calling
|
||||||
* this method sets `GtkTreeView`:reorderable to %FALSE.
|
* this method sets `GtkTreeView`:reorderable to %FALSE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
||||||
@@ -12984,7 +12981,7 @@ gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
|||||||
* gtk_tree_view_enable_model_drag_source(). Calling this method sets
|
* gtk_tree_view_enable_model_drag_source(). Calling this method sets
|
||||||
* `GtkTreeView`:reorderable to %FALSE.
|
* `GtkTreeView`:reorderable to %FALSE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view)
|
gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view)
|
||||||
@@ -13018,7 +13015,7 @@ gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view)
|
|||||||
* gtk_tree_view_enable_model_drag_dest(). Calling this method sets
|
* gtk_tree_view_enable_model_drag_dest(). Calling this method sets
|
||||||
* `GtkTreeView`:reorderable to %FALSE.
|
* `GtkTreeView`:reorderable to %FALSE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view)
|
gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view)
|
||||||
@@ -13057,7 +13054,7 @@ gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view)
|
|||||||
* Sets the row that is highlighted for feedback.
|
* Sets the row that is highlighted for feedback.
|
||||||
* If @path is %NULL, an existing highlight is removed.
|
* If @path is %NULL, an existing highlight is removed.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view,
|
gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view,
|
||||||
@@ -13124,7 +13121,7 @@ gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Gets information about the row that is highlighted for feedback.
|
* Gets information about the row that is highlighted for feedback.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view,
|
gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view,
|
||||||
@@ -13170,7 +13167,7 @@ gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view,
|
|||||||
* Returns: whether there is a row at the given position, %TRUE if this
|
* Returns: whether there is a row at the given position, %TRUE if this
|
||||||
* is indeed the case.
|
* is indeed the case.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view,
|
gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view,
|
||||||
@@ -13283,7 +13280,7 @@ gtk_treeview_snapshot_border (GtkSnapshot *snapshot,
|
|||||||
*
|
*
|
||||||
* Returns: (transfer full) (nullable): a newly-allocated surface of the drag icon.
|
* Returns: (transfer full) (nullable): a newly-allocated surface of the drag icon.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
GdkPaintable *
|
GdkPaintable *
|
||||||
gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
|
gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
|
||||||
@@ -13441,7 +13438,7 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
|
|||||||
* Note that even if this is %FALSE, the user can still initiate a search
|
* Note that even if this is %FALSE, the user can still initiate a search
|
||||||
* using the “start-interactive-search” key binding.
|
* using the “start-interactive-search” key binding.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_enable_search (GtkTreeView *tree_view,
|
gtk_tree_view_set_enable_search (GtkTreeView *tree_view,
|
||||||
@@ -13469,7 +13466,7 @@ gtk_tree_view_set_enable_search (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: whether or not to let the user search interactively
|
* Returns: whether or not to let the user search interactively
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_enable_search (GtkTreeView *tree_view)
|
gtk_tree_view_get_enable_search (GtkTreeView *tree_view)
|
||||||
@@ -13490,7 +13487,7 @@ gtk_tree_view_get_enable_search (GtkTreeView *tree_view)
|
|||||||
*
|
*
|
||||||
* Returns: the column the interactive search code searches in.
|
* Returns: the column the interactive search code searches in.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_tree_view_get_search_column (GtkTreeView *tree_view)
|
gtk_tree_view_get_search_column (GtkTreeView *tree_view)
|
||||||
@@ -13517,7 +13514,7 @@ gtk_tree_view_get_search_column (GtkTreeView *tree_view)
|
|||||||
* Note that @column refers to a column of the current model. The search
|
* Note that @column refers to a column of the current model. The search
|
||||||
* column is reset to -1 when the model is changed.
|
* column is reset to -1 when the model is changed.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_search_column (GtkTreeView *tree_view,
|
gtk_tree_view_set_search_column (GtkTreeView *tree_view,
|
||||||
@@ -13543,7 +13540,7 @@ gtk_tree_view_set_search_column (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: the currently used compare function for the search code.
|
* Returns: the currently used compare function for the search code.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GtkTreeViewSearchEqualFunc
|
GtkTreeViewSearchEqualFunc
|
||||||
@@ -13567,7 +13564,7 @@ gtk_tree_view_get_search_equal_func (GtkTreeView *tree_view)
|
|||||||
* that somewhat like strcmp() returning 0 for equality
|
* that somewhat like strcmp() returning 0 for equality
|
||||||
* `GtkTreeView`SearchEqualFunc returns %FALSE on matches.
|
* `GtkTreeView`SearchEqualFunc returns %FALSE on matches.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view,
|
gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view,
|
||||||
@@ -13600,7 +13597,7 @@ gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: (transfer none) (nullable): the entry currently in use as search entry.
|
* Returns: (transfer none) (nullable): the entry currently in use as search entry.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
GtkEditable *
|
GtkEditable *
|
||||||
gtk_tree_view_get_search_entry (GtkTreeView *tree_view)
|
gtk_tree_view_get_search_entry (GtkTreeView *tree_view)
|
||||||
@@ -13626,7 +13623,7 @@ gtk_tree_view_get_search_entry (GtkTreeView *tree_view)
|
|||||||
* @entry will make the interactive search code use the built-in popup
|
* @entry will make the interactive search code use the built-in popup
|
||||||
* entry again.
|
* entry again.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_search_entry (GtkTreeView *tree_view,
|
gtk_tree_view_set_search_entry (GtkTreeView *tree_view,
|
||||||
@@ -14297,7 +14294,7 @@ gtk_tree_view_stop_editing (GtkTreeView *tree_view,
|
|||||||
* Currently, this works only for the selection modes
|
* Currently, this works only for the selection modes
|
||||||
* %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
|
* %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_hover_selection (GtkTreeView *tree_view,
|
gtk_tree_view_set_hover_selection (GtkTreeView *tree_view,
|
||||||
@@ -14323,7 +14320,7 @@ gtk_tree_view_set_hover_selection (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if @tree_view is in hover selection mode
|
* Returns: %TRUE if @tree_view is in hover selection mode
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_hover_selection (GtkTreeView *tree_view)
|
gtk_tree_view_get_hover_selection (GtkTreeView *tree_view)
|
||||||
@@ -14344,7 +14341,7 @@ gtk_tree_view_get_hover_selection (GtkTreeView *tree_view)
|
|||||||
* Hover expansion makes rows expand or collapse if the pointer
|
* Hover expansion makes rows expand or collapse if the pointer
|
||||||
* moves over them.
|
* moves over them.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_hover_expand (GtkTreeView *tree_view,
|
gtk_tree_view_set_hover_expand (GtkTreeView *tree_view,
|
||||||
@@ -14370,7 +14367,7 @@ gtk_tree_view_set_hover_expand (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if @tree_view is in hover expansion mode
|
* Returns: %TRUE if @tree_view is in hover expansion mode
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_hover_expand (GtkTreeView *tree_view)
|
gtk_tree_view_get_hover_expand (GtkTreeView *tree_view)
|
||||||
@@ -14391,7 +14388,7 @@ gtk_tree_view_get_hover_expand (GtkTreeView *tree_view)
|
|||||||
* is %GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select
|
* is %GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select
|
||||||
* multiple rows by dragging the mouse.
|
* multiple rows by dragging the mouse.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view,
|
gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view,
|
||||||
@@ -14419,7 +14416,7 @@ gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if rubber banding in @tree_view is enabled.
|
* Returns: %TRUE if rubber banding in @tree_view is enabled.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view)
|
gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view)
|
||||||
@@ -14439,7 +14436,7 @@ gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view)
|
|||||||
* Returns: %TRUE if a rubber banding operation is currently being
|
* Returns: %TRUE if a rubber banding operation is currently being
|
||||||
* done in @tree_view.
|
* done in @tree_view.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_is_rubber_banding_active (GtkTreeView *tree_view)
|
gtk_tree_view_is_rubber_banding_active (GtkTreeView *tree_view)
|
||||||
@@ -14463,7 +14460,7 @@ gtk_tree_view_is_rubber_banding_active (GtkTreeView *tree_view)
|
|||||||
*
|
*
|
||||||
* Returns: the current row separator function.
|
* Returns: the current row separator function.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
GtkTreeViewRowSeparatorFunc
|
GtkTreeViewRowSeparatorFunc
|
||||||
gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view)
|
gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view)
|
||||||
@@ -14486,7 +14483,7 @@ gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view)
|
|||||||
* whether a row should be drawn as a separator. If the row separator
|
* whether a row should be drawn as a separator. If the row separator
|
||||||
* function is %NULL, no separators are drawn. This is the default value.
|
* function is %NULL, no separators are drawn. This is the default value.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view,
|
gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view,
|
||||||
@@ -14519,7 +14516,7 @@ gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view,
|
|||||||
* Returns: a `GtkTreeView`GridLines value indicating which grid lines
|
* Returns: a `GtkTreeView`GridLines value indicating which grid lines
|
||||||
* are enabled.
|
* are enabled.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
GtkTreeViewGridLines
|
GtkTreeViewGridLines
|
||||||
gtk_tree_view_get_grid_lines (GtkTreeView *tree_view)
|
gtk_tree_view_get_grid_lines (GtkTreeView *tree_view)
|
||||||
@@ -14539,7 +14536,7 @@ gtk_tree_view_get_grid_lines (GtkTreeView *tree_view)
|
|||||||
*
|
*
|
||||||
* Sets which grid lines to draw in @tree_view.
|
* Sets which grid lines to draw in @tree_view.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_grid_lines (GtkTreeView *tree_view,
|
gtk_tree_view_set_grid_lines (GtkTreeView *tree_view,
|
||||||
@@ -14570,7 +14567,7 @@ gtk_tree_view_set_grid_lines (GtkTreeView *tree_view,
|
|||||||
* Returns: %TRUE if tree lines are drawn in @tree_view, %FALSE
|
* Returns: %TRUE if tree lines are drawn in @tree_view, %FALSE
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view)
|
gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view)
|
||||||
@@ -14590,7 +14587,7 @@ gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view)
|
|||||||
* Sets whether to draw lines interconnecting the expanders in @tree_view.
|
* Sets whether to draw lines interconnecting the expanders in @tree_view.
|
||||||
* This does not have any visible effects for lists.
|
* This does not have any visible effects for lists.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view,
|
gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view,
|
||||||
@@ -14629,7 +14626,7 @@ gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view,
|
|||||||
* gtk_tree_view_set_level_indentation().
|
* gtk_tree_view_set_level_indentation().
|
||||||
* This does not have any visible effects for lists.
|
* This does not have any visible effects for lists.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_show_expanders (GtkTreeView *tree_view,
|
gtk_tree_view_set_show_expanders (GtkTreeView *tree_view,
|
||||||
@@ -14657,7 +14654,7 @@ gtk_tree_view_set_show_expanders (GtkTreeView *tree_view,
|
|||||||
* Returns: %TRUE if expanders are drawn in @tree_view, %FALSE
|
* Returns: %TRUE if expanders are drawn in @tree_view, %FALSE
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_show_expanders (GtkTreeView *tree_view)
|
gtk_tree_view_get_show_expanders (GtkTreeView *tree_view)
|
||||||
@@ -14680,7 +14677,7 @@ gtk_tree_view_get_show_expanders (GtkTreeView *tree_view)
|
|||||||
* indentation will be used.
|
* indentation will be used.
|
||||||
* This does not have any visible effects for lists.
|
* This does not have any visible effects for lists.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_level_indentation (GtkTreeView *tree_view,
|
gtk_tree_view_set_level_indentation (GtkTreeView *tree_view,
|
||||||
@@ -14703,7 +14700,7 @@ gtk_tree_view_set_level_indentation (GtkTreeView *tree_view,
|
|||||||
* Returns: the amount of extra indentation for child levels in
|
* Returns: the amount of extra indentation for child levels in
|
||||||
* @tree_view. A return value of 0 means that this feature is disabled.
|
* @tree_view. A return value of 0 means that this feature is disabled.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_tree_view_get_level_indentation (GtkTreeView *tree_view)
|
gtk_tree_view_get_level_indentation (GtkTreeView *tree_view)
|
||||||
@@ -14725,7 +14722,7 @@ gtk_tree_view_get_level_indentation (GtkTreeView *tree_view)
|
|||||||
* See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
|
* See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
|
||||||
* See also gtk_tooltip_set_tip_area().
|
* See also gtk_tooltip_set_tip_area().
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view,
|
gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view,
|
||||||
@@ -14758,7 +14755,7 @@ gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
|
* See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view,
|
gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view,
|
||||||
@@ -14857,7 +14854,7 @@ gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view,
|
|||||||
*
|
*
|
||||||
* Returns: whether or not the given tooltip context points to a row
|
* Returns: whether or not the given tooltip context points to a row
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_tree_view_get_tooltip_context (GtkTreeView *tree_view,
|
gtk_tree_view_get_tooltip_context (GtkTreeView *tree_view,
|
||||||
@@ -14976,7 +14973,7 @@ gtk_tree_view_set_tooltip_query_cb (GtkWidget *widget,
|
|||||||
* Note that the signal handler sets the text with gtk_tooltip_set_markup(),
|
* Note that the signal handler sets the text with gtk_tooltip_set_markup(),
|
||||||
* so &, <, etc have to be escaped in the text.
|
* so &, <, etc have to be escaped in the text.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view,
|
gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view,
|
||||||
@@ -15020,7 +15017,7 @@ gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view,
|
|||||||
* Returns: the index of the tooltip column that is currently being
|
* Returns: the index of the tooltip column that is currently being
|
||||||
* used, or -1 if this is disabled.
|
* used, or -1 if this is disabled.
|
||||||
*
|
*
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead
|
* Deprecated: 4.10: Use GtkListView and GtkColumnView instead
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view)
|
gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view)
|
||||||
|
|||||||
@@ -190,56 +190,56 @@ GDK_AVAILABLE_IN_ALL
|
|||||||
GType gtk_tree_view_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_view_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
/* Creators */
|
/* Creators */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget *gtk_tree_view_new (void);
|
GtkWidget *gtk_tree_view_new (void);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget *gtk_tree_view_new_with_model (GtkTreeModel *model);
|
GtkWidget *gtk_tree_view_new_with_model (GtkTreeModel *model);
|
||||||
|
|
||||||
/* Accessors */
|
/* Accessors */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeModel *gtk_tree_view_get_model (GtkTreeView *tree_view);
|
GtkTreeModel *gtk_tree_view_get_model (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_model (GtkTreeView *tree_view,
|
void gtk_tree_view_set_model (GtkTreeView *tree_view,
|
||||||
GtkTreeModel *model);
|
GtkTreeModel *model);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeSelection *gtk_tree_view_get_selection (GtkTreeView *tree_view);
|
GtkTreeSelection *gtk_tree_view_get_selection (GtkTreeView *tree_view);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_headers_visible (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_headers_visible (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
|
void gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
|
||||||
gboolean headers_visible);
|
gboolean headers_visible);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_columns_autosize (GtkTreeView *tree_view);
|
void gtk_tree_view_columns_autosize (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view,
|
void gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view,
|
||||||
gboolean setting);
|
gboolean setting);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_activate_on_single_click (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_activate_on_single_click (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
|
void gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
|
||||||
gboolean single);
|
gboolean single);
|
||||||
|
|
||||||
/* Column functions */
|
/* Column functions */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_append_column (GtkTreeView *tree_view,
|
int gtk_tree_view_append_column (GtkTreeView *tree_view,
|
||||||
GtkTreeViewColumn *column);
|
GtkTreeViewColumn *column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_remove_column (GtkTreeView *tree_view,
|
int gtk_tree_view_remove_column (GtkTreeView *tree_view,
|
||||||
GtkTreeViewColumn *column);
|
GtkTreeViewColumn *column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_insert_column (GtkTreeView *tree_view,
|
int gtk_tree_view_insert_column (GtkTreeView *tree_view,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
int position);
|
int position);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view,
|
int gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view,
|
||||||
int position,
|
int position,
|
||||||
const char *title,
|
const char *title,
|
||||||
GtkCellRenderer *cell,
|
GtkCellRenderer *cell,
|
||||||
...) G_GNUC_NULL_TERMINATED;
|
...) G_GNUC_NULL_TERMINATED;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view,
|
int gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view,
|
||||||
int position,
|
int position,
|
||||||
const char *title,
|
const char *title,
|
||||||
@@ -248,89 +248,89 @@ int gtk_tree_view_insert_column_with_data_func (GtkTreeView
|
|||||||
gpointer data,
|
gpointer data,
|
||||||
GDestroyNotify dnotify);
|
GDestroyNotify dnotify);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
guint gtk_tree_view_get_n_columns (GtkTreeView *tree_view);
|
guint gtk_tree_view_get_n_columns (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewColumn *gtk_tree_view_get_column (GtkTreeView *tree_view,
|
GtkTreeViewColumn *gtk_tree_view_get_column (GtkTreeView *tree_view,
|
||||||
int n);
|
int n);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GList *gtk_tree_view_get_columns (GtkTreeView *tree_view);
|
GList *gtk_tree_view_get_columns (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_move_column_after (GtkTreeView *tree_view,
|
void gtk_tree_view_move_column_after (GtkTreeView *tree_view,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
GtkTreeViewColumn *base_column);
|
GtkTreeViewColumn *base_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_expander_column (GtkTreeView *tree_view,
|
void gtk_tree_view_set_expander_column (GtkTreeView *tree_view,
|
||||||
GtkTreeViewColumn *column);
|
GtkTreeViewColumn *column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewColumn *gtk_tree_view_get_expander_column (GtkTreeView *tree_view);
|
GtkTreeViewColumn *gtk_tree_view_get_expander_column (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view,
|
void gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view,
|
||||||
GtkTreeViewColumnDropFunc func,
|
GtkTreeViewColumnDropFunc func,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GDestroyNotify destroy);
|
GDestroyNotify destroy);
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
|
void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
|
||||||
int tree_x,
|
int tree_x,
|
||||||
int tree_y);
|
int tree_y);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
|
void gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
gboolean use_align,
|
gboolean use_align,
|
||||||
float row_align,
|
float row_align,
|
||||||
float col_align);
|
float col_align);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_row_activated (GtkTreeView *tree_view,
|
void gtk_tree_view_row_activated (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewColumn *column);
|
GtkTreeViewColumn *column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_expand_all (GtkTreeView *tree_view);
|
void gtk_tree_view_expand_all (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_collapse_all (GtkTreeView *tree_view);
|
void gtk_tree_view_collapse_all (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_expand_to_path (GtkTreeView *tree_view,
|
void gtk_tree_view_expand_to_path (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_expand_row (GtkTreeView *tree_view,
|
gboolean gtk_tree_view_expand_row (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
gboolean open_all);
|
gboolean open_all);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_collapse_row (GtkTreeView *tree_view,
|
gboolean gtk_tree_view_collapse_row (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view,
|
void gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view,
|
||||||
GtkTreeViewMappingFunc func,
|
GtkTreeViewMappingFunc func,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_row_expanded (GtkTreeView *tree_view,
|
gboolean gtk_tree_view_row_expanded (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
|
void gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
|
||||||
gboolean reorderable);
|
gboolean reorderable);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_reorderable (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_reorderable (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_cursor (GtkTreeView *tree_view,
|
void gtk_tree_view_set_cursor (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewColumn *focus_column,
|
GtkTreeViewColumn *focus_column,
|
||||||
gboolean start_editing);
|
gboolean start_editing);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view,
|
void gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewColumn *focus_column,
|
GtkTreeViewColumn *focus_column,
|
||||||
GtkCellRenderer *focus_cell,
|
GtkCellRenderer *focus_cell,
|
||||||
gboolean start_editing);
|
gboolean start_editing);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_get_cursor (GtkTreeView *tree_view,
|
void gtk_tree_view_get_cursor (GtkTreeView *tree_view,
|
||||||
GtkTreePath **path,
|
GtkTreePath **path,
|
||||||
GtkTreeViewColumn **focus_column);
|
GtkTreeViewColumn **focus_column);
|
||||||
|
|
||||||
|
|
||||||
/* Layout information */
|
/* Layout information */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
|
gboolean gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@@ -338,24 +338,24 @@ gboolean gtk_tree_view_get_path_at_pos (GtkTreeView
|
|||||||
GtkTreeViewColumn **column,
|
GtkTreeViewColumn **column,
|
||||||
int *cell_x,
|
int *cell_x,
|
||||||
int *cell_y);
|
int *cell_y);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_get_cell_area (GtkTreeView *tree_view,
|
void gtk_tree_view_get_cell_area (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
GdkRectangle *rect);
|
GdkRectangle *rect);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_get_background_area (GtkTreeView *tree_view,
|
void gtk_tree_view_get_background_area (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
GdkRectangle *rect);
|
GdkRectangle *rect);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_get_visible_rect (GtkTreeView *tree_view,
|
void gtk_tree_view_get_visible_rect (GtkTreeView *tree_view,
|
||||||
GdkRectangle *visible_rect);
|
GdkRectangle *visible_rect);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_visible_range (GtkTreeView *tree_view,
|
gboolean gtk_tree_view_get_visible_range (GtkTreeView *tree_view,
|
||||||
GtkTreePath **start_path,
|
GtkTreePath **start_path,
|
||||||
GtkTreePath **end_path);
|
GtkTreePath **end_path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_is_blank_at_pos (GtkTreeView *tree_view,
|
gboolean gtk_tree_view_is_blank_at_pos (GtkTreeView *tree_view,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@@ -365,168 +365,168 @@ gboolean gtk_tree_view_is_blank_at_pos (GtkTreeView
|
|||||||
int *cell_y);
|
int *cell_y);
|
||||||
|
|
||||||
/* Drag-and-Drop support */
|
/* Drag-and-Drop support */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
|
void gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
|
||||||
GdkModifierType start_button_mask,
|
GdkModifierType start_button_mask,
|
||||||
GdkContentFormats *formats,
|
GdkContentFormats *formats,
|
||||||
GdkDragAction actions);
|
GdkDragAction actions);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
void gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
||||||
GdkContentFormats *formats,
|
GdkContentFormats *formats,
|
||||||
GdkDragAction actions);
|
GdkDragAction actions);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view);
|
void gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view);
|
void gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view);
|
||||||
|
|
||||||
|
|
||||||
/* These are useful to implement your own custom stuff. */
|
/* These are useful to implement your own custom stuff. */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view,
|
void gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewDropPosition pos);
|
GtkTreeViewDropPosition pos);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view,
|
void gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view,
|
||||||
GtkTreePath **path,
|
GtkTreePath **path,
|
||||||
GtkTreeViewDropPosition *pos);
|
GtkTreeViewDropPosition *pos);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view,
|
gboolean gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view,
|
||||||
int drag_x,
|
int drag_x,
|
||||||
int drag_y,
|
int drag_y,
|
||||||
GtkTreePath **path,
|
GtkTreePath **path,
|
||||||
GtkTreeViewDropPosition *pos);
|
GtkTreeViewDropPosition *pos);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GdkPaintable *gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
|
GdkPaintable *gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
|
|
||||||
/* Interactive search */
|
/* Interactive search */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_enable_search (GtkTreeView *tree_view,
|
void gtk_tree_view_set_enable_search (GtkTreeView *tree_view,
|
||||||
gboolean enable_search);
|
gboolean enable_search);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_enable_search (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_enable_search (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_get_search_column (GtkTreeView *tree_view);
|
int gtk_tree_view_get_search_column (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_search_column (GtkTreeView *tree_view,
|
void gtk_tree_view_set_search_column (GtkTreeView *tree_view,
|
||||||
int column);
|
int column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func (GtkTreeView *tree_view);
|
GtkTreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view,
|
void gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view,
|
||||||
GtkTreeViewSearchEqualFunc search_equal_func,
|
GtkTreeViewSearchEqualFunc search_equal_func,
|
||||||
gpointer search_user_data,
|
gpointer search_user_data,
|
||||||
GDestroyNotify search_destroy);
|
GDestroyNotify search_destroy);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkEditable *gtk_tree_view_get_search_entry (GtkTreeView *tree_view);
|
GtkEditable *gtk_tree_view_get_search_entry (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_search_entry (GtkTreeView *tree_view,
|
void gtk_tree_view_set_search_entry (GtkTreeView *tree_view,
|
||||||
GtkEditable *entry);
|
GtkEditable *entry);
|
||||||
|
|
||||||
/* Convert between the different coordinate systems */
|
/* Convert between the different coordinate systems */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view,
|
void gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view,
|
||||||
int wx,
|
int wx,
|
||||||
int wy,
|
int wy,
|
||||||
int *tx,
|
int *tx,
|
||||||
int *ty);
|
int *ty);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view,
|
void gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view,
|
||||||
int tx,
|
int tx,
|
||||||
int ty,
|
int ty,
|
||||||
int *wx,
|
int *wx,
|
||||||
int *wy);
|
int *wy);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view,
|
void gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view,
|
||||||
int wx,
|
int wx,
|
||||||
int wy,
|
int wy,
|
||||||
int *bx,
|
int *bx,
|
||||||
int *by);
|
int *by);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view,
|
void gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view,
|
||||||
int bx,
|
int bx,
|
||||||
int by,
|
int by,
|
||||||
int *wx,
|
int *wx,
|
||||||
int *wy);
|
int *wy);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view,
|
void gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view,
|
||||||
int tx,
|
int tx,
|
||||||
int ty,
|
int ty,
|
||||||
int *bx,
|
int *bx,
|
||||||
int *by);
|
int *by);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view,
|
void gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view,
|
||||||
int bx,
|
int bx,
|
||||||
int by,
|
int by,
|
||||||
int *tx,
|
int *tx,
|
||||||
int *ty);
|
int *ty);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
|
void gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
|
||||||
gboolean enable);
|
gboolean enable);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_fixed_height_mode (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_fixed_height_mode (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_hover_selection (GtkTreeView *tree_view,
|
void gtk_tree_view_set_hover_selection (GtkTreeView *tree_view,
|
||||||
gboolean hover);
|
gboolean hover);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_hover_selection (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_hover_selection (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_hover_expand (GtkTreeView *tree_view,
|
void gtk_tree_view_set_hover_expand (GtkTreeView *tree_view,
|
||||||
gboolean expand);
|
gboolean expand);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_hover_expand (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_hover_expand (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view,
|
void gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view,
|
||||||
gboolean enable);
|
gboolean enable);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_is_rubber_banding_active (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_is_rubber_banding_active (GtkTreeView *tree_view);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view);
|
GtkTreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view,
|
void gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view,
|
||||||
GtkTreeViewRowSeparatorFunc func,
|
GtkTreeViewRowSeparatorFunc func,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
GDestroyNotify destroy);
|
GDestroyNotify destroy);
|
||||||
|
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewGridLines gtk_tree_view_get_grid_lines (GtkTreeView *tree_view);
|
GtkTreeViewGridLines gtk_tree_view_get_grid_lines (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_grid_lines (GtkTreeView *tree_view,
|
void gtk_tree_view_set_grid_lines (GtkTreeView *tree_view,
|
||||||
GtkTreeViewGridLines grid_lines);
|
GtkTreeViewGridLines grid_lines);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view,
|
void gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view,
|
||||||
gboolean enabled);
|
gboolean enabled);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_show_expanders (GtkTreeView *tree_view,
|
void gtk_tree_view_set_show_expanders (GtkTreeView *tree_view,
|
||||||
gboolean enabled);
|
gboolean enabled);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_show_expanders (GtkTreeView *tree_view);
|
gboolean gtk_tree_view_get_show_expanders (GtkTreeView *tree_view);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_level_indentation (GtkTreeView *tree_view,
|
void gtk_tree_view_set_level_indentation (GtkTreeView *tree_view,
|
||||||
int indentation);
|
int indentation);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_get_level_indentation (GtkTreeView *tree_view);
|
int gtk_tree_view_get_level_indentation (GtkTreeView *tree_view);
|
||||||
|
|
||||||
/* Convenience functions for setting tooltips */
|
/* Convenience functions for setting tooltips */
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view,
|
void gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view,
|
||||||
GtkTooltip *tooltip,
|
GtkTooltip *tooltip,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view,
|
void gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view,
|
||||||
GtkTooltip *tooltip,
|
GtkTooltip *tooltip,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
GtkCellRenderer *cell);
|
GtkCellRenderer *cell);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_get_tooltip_context(GtkTreeView *tree_view,
|
gboolean gtk_tree_view_get_tooltip_context(GtkTreeView *tree_view,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@@ -534,10 +534,10 @@ gboolean gtk_tree_view_get_tooltip_context(GtkTreeView *tree_view,
|
|||||||
GtkTreeModel **model,
|
GtkTreeModel **model,
|
||||||
GtkTreePath **path,
|
GtkTreePath **path,
|
||||||
GtkTreeIter *iter);
|
GtkTreeIter *iter);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view,
|
void gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view,
|
||||||
int column);
|
int column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkListView)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view);
|
int gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view);
|
||||||
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTreeView, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTreeView, g_object_unref)
|
||||||
|
|||||||
@@ -56,9 +56,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* for an overview of all the objects and data types related to the tree widget and
|
* for an overview of all the objects and data types related to the tree widget and
|
||||||
* how they work together, and to the [class@Gtk.TreeView] documentation for specifics
|
* how they work together, and to the [class@Gtk.TreeView] documentation for specifics
|
||||||
* about the CSS node structure for treeviews and their headers.
|
* about the CSS node structure for treeviews and their headers.
|
||||||
*
|
|
||||||
* Deprecated: 4.10: Use [class@Gtk.ColumnView] and [class@Gtk.ColumnViewColumn]
|
|
||||||
* instead of [class@Gtk.TreeView] to show a tabular list
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -80,117 +80,117 @@ typedef void (* GtkTreeCellDataFunc) (GtkTreeViewColumn *tree_column,
|
|||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_tree_view_column_get_type (void) G_GNUC_CONST;
|
GType gtk_tree_view_column_get_type (void) G_GNUC_CONST;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewColumn *gtk_tree_view_column_new (void);
|
GtkTreeViewColumn *gtk_tree_view_column_new (void);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewColumn *gtk_tree_view_column_new_with_area (GtkCellArea *area);
|
GtkTreeViewColumn *gtk_tree_view_column_new_with_area (GtkCellArea *area);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewColumn *gtk_tree_view_column_new_with_attributes (const char *title,
|
GtkTreeViewColumn *gtk_tree_view_column_new_with_attributes (const char *title,
|
||||||
GtkCellRenderer *cell,
|
GtkCellRenderer *cell,
|
||||||
...) G_GNUC_NULL_TERMINATED;
|
...) G_GNUC_NULL_TERMINATED;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_pack_start (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_pack_start (GtkTreeViewColumn *tree_column,
|
||||||
GtkCellRenderer *cell,
|
GtkCellRenderer *cell,
|
||||||
gboolean expand);
|
gboolean expand);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_pack_end (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_pack_end (GtkTreeViewColumn *tree_column,
|
||||||
GtkCellRenderer *cell,
|
GtkCellRenderer *cell,
|
||||||
gboolean expand);
|
gboolean expand);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_clear (GtkTreeViewColumn *tree_column);
|
void gtk_tree_view_column_clear (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_add_attribute (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_add_attribute (GtkTreeViewColumn *tree_column,
|
||||||
GtkCellRenderer *cell_renderer,
|
GtkCellRenderer *cell_renderer,
|
||||||
const char *attribute,
|
const char *attribute,
|
||||||
int column);
|
int column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_attributes (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_attributes (GtkTreeViewColumn *tree_column,
|
||||||
GtkCellRenderer *cell_renderer,
|
GtkCellRenderer *cell_renderer,
|
||||||
...) G_GNUC_NULL_TERMINATED;
|
...) G_GNUC_NULL_TERMINATED;
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_cell_data_func (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_cell_data_func (GtkTreeViewColumn *tree_column,
|
||||||
GtkCellRenderer *cell_renderer,
|
GtkCellRenderer *cell_renderer,
|
||||||
GtkTreeCellDataFunc func,
|
GtkTreeCellDataFunc func,
|
||||||
gpointer func_data,
|
gpointer func_data,
|
||||||
GDestroyNotify destroy);
|
GDestroyNotify destroy);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_clear_attributes (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_clear_attributes (GtkTreeViewColumn *tree_column,
|
||||||
GtkCellRenderer *cell_renderer);
|
GtkCellRenderer *cell_renderer);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column,
|
||||||
int spacing);
|
int spacing);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_column_get_spacing (GtkTreeViewColumn *tree_column);
|
int gtk_tree_view_column_get_spacing (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_visible (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_visible (GtkTreeViewColumn *tree_column,
|
||||||
gboolean visible);
|
gboolean visible);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_column_get_visible (GtkTreeViewColumn *tree_column);
|
gboolean gtk_tree_view_column_get_visible (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_resizable (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_resizable (GtkTreeViewColumn *tree_column,
|
||||||
gboolean resizable);
|
gboolean resizable);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_column_get_resizable (GtkTreeViewColumn *tree_column);
|
gboolean gtk_tree_view_column_get_resizable (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_sizing (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_sizing (GtkTreeViewColumn *tree_column,
|
||||||
GtkTreeViewColumnSizing type);
|
GtkTreeViewColumnSizing type);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkTreeViewColumnSizing gtk_tree_view_column_get_sizing (GtkTreeViewColumn *tree_column);
|
GtkTreeViewColumnSizing gtk_tree_view_column_get_sizing (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_column_get_x_offset (GtkTreeViewColumn *tree_column);
|
int gtk_tree_view_column_get_x_offset (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_column_get_width (GtkTreeViewColumn *tree_column);
|
int gtk_tree_view_column_get_width (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_column_get_fixed_width (GtkTreeViewColumn *tree_column);
|
int gtk_tree_view_column_get_fixed_width (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_fixed_width (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_fixed_width (GtkTreeViewColumn *tree_column,
|
||||||
int fixed_width);
|
int fixed_width);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column,
|
||||||
int min_width);
|
int min_width);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_column_get_min_width (GtkTreeViewColumn *tree_column);
|
int gtk_tree_view_column_get_min_width (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column,
|
||||||
int max_width);
|
int max_width);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_column_get_max_width (GtkTreeViewColumn *tree_column);
|
int gtk_tree_view_column_get_max_width (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_clicked (GtkTreeViewColumn *tree_column);
|
void gtk_tree_view_column_clicked (GtkTreeViewColumn *tree_column);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Options for manipulating the column headers
|
/* Options for manipulating the column headers
|
||||||
*/
|
*/
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_title (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_title (GtkTreeViewColumn *tree_column,
|
||||||
const char *title);
|
const char *title);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
const char * gtk_tree_view_column_get_title (GtkTreeViewColumn *tree_column);
|
const char * gtk_tree_view_column_get_title (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_expand (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_expand (GtkTreeViewColumn *tree_column,
|
||||||
gboolean expand);
|
gboolean expand);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_column_get_expand (GtkTreeViewColumn *tree_column);
|
gboolean gtk_tree_view_column_get_expand (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_clickable (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_clickable (GtkTreeViewColumn *tree_column,
|
||||||
gboolean clickable);
|
gboolean clickable);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_column_get_clickable (GtkTreeViewColumn *tree_column);
|
gboolean gtk_tree_view_column_get_clickable (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_widget (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_widget (GtkTreeViewColumn *tree_column,
|
||||||
GtkWidget *widget);
|
GtkWidget *widget);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget *gtk_tree_view_column_get_widget (GtkTreeViewColumn *tree_column);
|
GtkWidget *gtk_tree_view_column_get_widget (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_alignment (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_alignment (GtkTreeViewColumn *tree_column,
|
||||||
float xalign);
|
float xalign);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
float gtk_tree_view_column_get_alignment (GtkTreeViewColumn *tree_column);
|
float gtk_tree_view_column_get_alignment (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_reorderable (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_reorderable (GtkTreeViewColumn *tree_column,
|
||||||
gboolean reorderable);
|
gboolean reorderable);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_column_get_reorderable (GtkTreeViewColumn *tree_column);
|
gboolean gtk_tree_view_column_get_reorderable (GtkTreeViewColumn *tree_column);
|
||||||
|
|
||||||
|
|
||||||
@@ -198,52 +198,52 @@ gboolean gtk_tree_view_column_get_reorderable (GtkTreeViewCol
|
|||||||
/* You probably only want to use gtk_tree_view_column_set_sort_column_id. The
|
/* You probably only want to use gtk_tree_view_column_set_sort_column_id. The
|
||||||
* other sorting functions exist primarily to let others do their own custom sorting.
|
* other sorting functions exist primarily to let others do their own custom sorting.
|
||||||
*/
|
*/
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
|
||||||
int sort_column_id);
|
int sort_column_id);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
int gtk_tree_view_column_get_sort_column_id (GtkTreeViewColumn *tree_column);
|
int gtk_tree_view_column_get_sort_column_id (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_sort_indicator (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_sort_indicator (GtkTreeViewColumn *tree_column,
|
||||||
gboolean setting);
|
gboolean setting);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_column_get_sort_indicator (GtkTreeViewColumn *tree_column);
|
gboolean gtk_tree_view_column_get_sort_indicator (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_set_sort_order (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_set_sort_order (GtkTreeViewColumn *tree_column,
|
||||||
GtkSortType order);
|
GtkSortType order);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkSortType gtk_tree_view_column_get_sort_order (GtkTreeViewColumn *tree_column);
|
GtkSortType gtk_tree_view_column_get_sort_order (GtkTreeViewColumn *tree_column);
|
||||||
|
|
||||||
|
|
||||||
/* These functions are meant primarily for interaction between the GtkTreeView and the column.
|
/* These functions are meant primarily for interaction between the GtkTreeView and the column.
|
||||||
*/
|
*/
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_cell_set_cell_data (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_cell_set_cell_data (GtkTreeViewColumn *tree_column,
|
||||||
GtkTreeModel *tree_model,
|
GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
gboolean is_expander,
|
gboolean is_expander,
|
||||||
gboolean is_expanded);
|
gboolean is_expanded);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_cell_get_size (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_cell_get_size (GtkTreeViewColumn *tree_column,
|
||||||
int *x_offset,
|
int *x_offset,
|
||||||
int *y_offset,
|
int *y_offset,
|
||||||
int *width,
|
int *width,
|
||||||
int *height);
|
int *height);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_column_cell_is_visible (GtkTreeViewColumn *tree_column);
|
gboolean gtk_tree_view_column_cell_is_visible (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_focus_cell (GtkTreeViewColumn *tree_column,
|
void gtk_tree_view_column_focus_cell (GtkTreeViewColumn *tree_column,
|
||||||
GtkCellRenderer *cell);
|
GtkCellRenderer *cell);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
gboolean gtk_tree_view_column_cell_get_position (GtkTreeViewColumn *tree_column,
|
gboolean gtk_tree_view_column_cell_get_position (GtkTreeViewColumn *tree_column,
|
||||||
GtkCellRenderer *cell_renderer,
|
GtkCellRenderer *cell_renderer,
|
||||||
int *x_offset,
|
int *x_offset,
|
||||||
int *width);
|
int *width);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_tree_view_column_queue_resize (GtkTreeViewColumn *tree_column);
|
void gtk_tree_view_column_queue_resize (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget *gtk_tree_view_column_get_tree_view (GtkTreeViewColumn *tree_column);
|
GtkWidget *gtk_tree_view_column_get_tree_view (GtkTreeViewColumn *tree_column);
|
||||||
GDK_DEPRECATED_IN_4_10_FOR(GtkColumnView and GtkColumnViewColumn)
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget *gtk_tree_view_column_get_button (GtkTreeViewColumn *tree_column);
|
GtkWidget *gtk_tree_view_column_get_button (GtkTreeViewColumn *tree_column);
|
||||||
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTreeViewColumn, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTreeViewColumn, g_object_unref)
|
||||||
|
|||||||
@@ -85,7 +85,6 @@
|
|||||||
#include <gtk/gtkcolorutils.h>
|
#include <gtk/gtkcolorutils.h>
|
||||||
#include <gtk/gtkcolumnview.h>
|
#include <gtk/gtkcolumnview.h>
|
||||||
#include <gtk/gtkcolumnviewcolumn.h>
|
#include <gtk/gtkcolumnviewcolumn.h>
|
||||||
#include <gtk/gtkcolumnviewsorter.h>
|
|
||||||
#include <gtk/deprecated/gtkcombobox.h>
|
#include <gtk/deprecated/gtkcombobox.h>
|
||||||
#include <gtk/deprecated/gtkcomboboxtext.h>
|
#include <gtk/deprecated/gtkcomboboxtext.h>
|
||||||
#include <gtk/gtkconstraintlayout.h>
|
#include <gtk/gtkconstraintlayout.h>
|
||||||
@@ -158,6 +157,7 @@
|
|||||||
#include <gtk/gtkimmulticontext.h>
|
#include <gtk/gtkimmulticontext.h>
|
||||||
#include <gtk/gtkinfobar.h>
|
#include <gtk/gtkinfobar.h>
|
||||||
#include <gtk/gtkinscription.h>
|
#include <gtk/gtkinscription.h>
|
||||||
|
#include <gtk/gtkinvertiblesorter.h>
|
||||||
#include <gtk/gtklabel.h>
|
#include <gtk/gtklabel.h>
|
||||||
#include <gtk/gtklayoutmanager.h>
|
#include <gtk/gtklayoutmanager.h>
|
||||||
#include <gtk/gtklayoutchild.h>
|
#include <gtk/gtklayoutchild.h>
|
||||||
|
|||||||
+2
-10
@@ -27,8 +27,6 @@
|
|||||||
#include "gtkmarshalers.h"
|
#include "gtkmarshalers.h"
|
||||||
#include "gtkwidgetprivate.h"
|
#include "gtkwidgetprivate.h"
|
||||||
#include "gsettings-mapping.h"
|
#include "gsettings-mapping.h"
|
||||||
#include "gtkdebug.h"
|
|
||||||
#include "gtkprivate.h"
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -848,15 +846,9 @@ gtk_action_muxer_activate_action (GtkActionMuxer *muxer,
|
|||||||
if (!_gtk_bitmask_get (muxer->widget_actions_disabled, position))
|
if (!_gtk_bitmask_get (muxer->widget_actions_disabled, position))
|
||||||
{
|
{
|
||||||
if (action->activate)
|
if (action->activate)
|
||||||
{
|
action->activate (muxer->widget, action->name, parameter);
|
||||||
GTK_DEBUG (ACTIONS, "%s: activate action", action->name);
|
|
||||||
action->activate (muxer->widget, action->name, parameter);
|
|
||||||
}
|
|
||||||
else if (action->pspec)
|
else if (action->pspec)
|
||||||
{
|
prop_action_activate (muxer->widget, action, parameter);
|
||||||
GTK_DEBUG (ACTIONS, "%s: activate prop action", action->pspec->name);
|
|
||||||
prop_action_activate (muxer->widget, action, parameter);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
+12
-6
@@ -27,6 +27,7 @@
|
|||||||
#include "gtkcolumnviewcolumnprivate.h"
|
#include "gtkcolumnviewcolumnprivate.h"
|
||||||
#include "gtkcolumnviewlayoutprivate.h"
|
#include "gtkcolumnviewlayoutprivate.h"
|
||||||
#include "gtkcolumnviewsorterprivate.h"
|
#include "gtkcolumnviewsorterprivate.h"
|
||||||
|
#include "gtkmultisorter.h"
|
||||||
#include "gtkcssnodeprivate.h"
|
#include "gtkcssnodeprivate.h"
|
||||||
#include "gtkdropcontrollermotion.h"
|
#include "gtkdropcontrollermotion.h"
|
||||||
#include "gtklistviewprivate.h"
|
#include "gtklistviewprivate.h"
|
||||||
@@ -1303,7 +1304,7 @@ gtk_column_view_init (GtkColumnView *self)
|
|||||||
g_signal_connect (controller, "leave", G_CALLBACK (gtk_column_view_drag_leave), NULL);
|
g_signal_connect (controller, "leave", G_CALLBACK (gtk_column_view_drag_leave), NULL);
|
||||||
gtk_widget_add_controller (GTK_WIDGET (self), controller);
|
gtk_widget_add_controller (GTK_WIDGET (self), controller);
|
||||||
|
|
||||||
self->sorter = GTK_SORTER (gtk_column_view_sorter_new ());
|
self->sorter = GTK_SORTER (gtk_multi_sorter_new ());
|
||||||
self->factory = gtk_column_list_item_factory_new (self);
|
self->factory = gtk_column_list_item_factory_new (self);
|
||||||
self->listview = GTK_LIST_VIEW (g_object_new (GTK_TYPE_COLUMN_LIST_VIEW, NULL));
|
self->listview = GTK_LIST_VIEW (g_object_new (GTK_TYPE_COLUMN_LIST_VIEW, NULL));
|
||||||
gtk_list_view_set_factory (self->listview, GTK_LIST_ITEM_FACTORY (self->factory));
|
gtk_list_view_set_factory (self->listview, GTK_LIST_ITEM_FACTORY (self->factory));
|
||||||
@@ -1537,7 +1538,7 @@ gtk_column_view_remove_column (GtkColumnView *self,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_column_view_sorter_remove_column (GTK_COLUMN_VIEW_SORTER (self->sorter), column);
|
gtk_column_view_sorter_remove_column (self->sorter, column);
|
||||||
gtk_column_view_column_set_column_view (column, NULL);
|
gtk_column_view_column_set_column_view (column, NULL);
|
||||||
g_list_store_remove (self->columns, i);
|
g_list_store_remove (self->columns, i);
|
||||||
}
|
}
|
||||||
@@ -1688,6 +1689,13 @@ gtk_column_view_get_sorter (GtkColumnView *self)
|
|||||||
* on @column to associate a sorter with the column.
|
* on @column to associate a sorter with the column.
|
||||||
*
|
*
|
||||||
* If @column is %NULL, the view will be unsorted.
|
* If @column is %NULL, the view will be unsorted.
|
||||||
|
*
|
||||||
|
* This function can be called multiple times to set up
|
||||||
|
* sorting with multiple columns:
|
||||||
|
*
|
||||||
|
* gtk_column_view_sort_by_column (view, NULL, 0);
|
||||||
|
* gtk_column_view_sort_by_column (view, col1, GTK_SORT_DESCENDING);
|
||||||
|
* gtk_column_view_sort_by_column (view, col0, GTK_SORT_ASCENDING);
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_column_view_sort_by_column (GtkColumnView *self,
|
gtk_column_view_sort_by_column (GtkColumnView *self,
|
||||||
@@ -1699,11 +1707,9 @@ gtk_column_view_sort_by_column (GtkColumnView *self,
|
|||||||
g_return_if_fail (column == NULL || gtk_column_view_column_get_column_view (column) == self);
|
g_return_if_fail (column == NULL || gtk_column_view_column_get_column_view (column) == self);
|
||||||
|
|
||||||
if (column == NULL)
|
if (column == NULL)
|
||||||
gtk_column_view_sorter_clear (GTK_COLUMN_VIEW_SORTER (self->sorter));
|
gtk_column_view_sorter_clear (self->sorter);
|
||||||
else
|
else
|
||||||
gtk_column_view_sorter_set_column (GTK_COLUMN_VIEW_SORTER (self->sorter),
|
gtk_column_view_sorter_set_column (self->sorter, column, direction);
|
||||||
column,
|
|
||||||
direction == GTK_SORT_DESCENDING);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+34
-83
@@ -31,7 +31,7 @@
|
|||||||
#include "gtkrbtreeprivate.h"
|
#include "gtkrbtreeprivate.h"
|
||||||
#include "gtksizegroup.h"
|
#include "gtksizegroup.h"
|
||||||
#include "gtkwidgetprivate.h"
|
#include "gtkwidgetprivate.h"
|
||||||
#include "gtksorter.h"
|
#include "gtkinvertiblesorter.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkColumnViewColumn:
|
* GtkColumnViewColumn:
|
||||||
@@ -56,8 +56,7 @@ struct _GtkColumnViewColumn
|
|||||||
|
|
||||||
GtkListItemFactory *factory;
|
GtkListItemFactory *factory;
|
||||||
char *title;
|
char *title;
|
||||||
char *id;
|
GtkInvertibleSorter *invertible_sorter;
|
||||||
GtkSorter *sorter;
|
|
||||||
|
|
||||||
/* data for the view */
|
/* data for the view */
|
||||||
GtkColumnView *view;
|
GtkColumnView *view;
|
||||||
@@ -98,7 +97,6 @@ enum
|
|||||||
PROP_RESIZABLE,
|
PROP_RESIZABLE,
|
||||||
PROP_EXPAND,
|
PROP_EXPAND,
|
||||||
PROP_FIXED_WIDTH,
|
PROP_FIXED_WIDTH,
|
||||||
PROP_ID,
|
|
||||||
|
|
||||||
N_PROPS
|
N_PROPS
|
||||||
};
|
};
|
||||||
@@ -116,7 +114,7 @@ gtk_column_view_column_dispose (GObject *object)
|
|||||||
g_assert (self->first_cell == NULL); /* no view = no children */
|
g_assert (self->first_cell == NULL); /* no view = no children */
|
||||||
|
|
||||||
g_clear_object (&self->factory);
|
g_clear_object (&self->factory);
|
||||||
g_clear_object (&self->sorter);
|
g_clear_object (&self->invertible_sorter);
|
||||||
g_clear_pointer (&self->title, g_free);
|
g_clear_pointer (&self->title, g_free);
|
||||||
g_clear_object (&self->menu);
|
g_clear_object (&self->menu);
|
||||||
|
|
||||||
@@ -146,7 +144,7 @@ gtk_column_view_column_get_property (GObject *object,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_SORTER:
|
case PROP_SORTER:
|
||||||
g_value_set_object (value, self->sorter);
|
g_value_set_object (value, gtk_column_view_column_get_sorter (self));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_VISIBLE:
|
case PROP_VISIBLE:
|
||||||
@@ -169,10 +167,6 @@ gtk_column_view_column_get_property (GObject *object,
|
|||||||
g_value_set_int (value, self->fixed_width);
|
g_value_set_int (value, self->fixed_width);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_ID:
|
|
||||||
g_value_set_string (value, self->id);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@@ -221,10 +215,6 @@ gtk_column_view_column_set_property (GObject *object,
|
|||||||
gtk_column_view_column_set_fixed_width (self, g_value_get_int (value));
|
gtk_column_view_column_set_fixed_width (self, g_value_get_int (value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_ID:
|
|
||||||
gtk_column_view_column_set_id (self, g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@@ -331,24 +321,6 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
|||||||
-1, G_MAXINT, -1,
|
-1, G_MAXINT, -1,
|
||||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
/**
|
|
||||||
* GtkColumnViewColumn:id: (attributes org.gtk.Property.get=gtk_column_view_column_get_id org.gtk.Property.set=gtk_column_view_column_set_id)
|
|
||||||
*
|
|
||||||
* An ID for the column.
|
|
||||||
*
|
|
||||||
* GTK is not currently using the ID for anything, but
|
|
||||||
* it can be used by applications when saving column view
|
|
||||||
* configurations.
|
|
||||||
*
|
|
||||||
* It is up to applications to ensure uniqueness of IDs.
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
properties[PROP_ID] =
|
|
||||||
g_param_spec_string ("id", NULL, NULL,
|
|
||||||
NULL,
|
|
||||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
|
||||||
|
|
||||||
g_object_class_install_properties (gobject_class, N_PROPS, properties);
|
g_object_class_install_properties (gobject_class, N_PROPS, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -706,7 +678,7 @@ gtk_column_view_column_set_title (GtkColumnViewColumn *self,
|
|||||||
self->title = g_strdup (title);
|
self->title = g_strdup (title);
|
||||||
|
|
||||||
if (self->header)
|
if (self->header)
|
||||||
gtk_column_view_title_set_title (GTK_COLUMN_VIEW_TITLE (self->header), title);
|
gtk_column_view_title_update (GTK_COLUMN_VIEW_TITLE (self->header));
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_TITLE]);
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_TITLE]);
|
||||||
}
|
}
|
||||||
@@ -733,7 +705,7 @@ gtk_column_view_column_remove_from_sorter (GtkColumnViewColumn *self)
|
|||||||
if (self->view == NULL)
|
if (self->view == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gtk_column_view_sorter_remove_column (GTK_COLUMN_VIEW_SORTER (gtk_column_view_get_sorter (self->view)), self);
|
gtk_column_view_sorter_remove_column (gtk_column_view_get_sorter (self->view), self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -759,13 +731,29 @@ gtk_column_view_column_set_sorter (GtkColumnViewColumn *self,
|
|||||||
g_return_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (self));
|
g_return_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (self));
|
||||||
g_return_if_fail (sorter == NULL || GTK_IS_SORTER (sorter));
|
g_return_if_fail (sorter == NULL || GTK_IS_SORTER (sorter));
|
||||||
|
|
||||||
if (!g_set_object (&self->sorter, sorter))
|
if (self->invertible_sorter == NULL && sorter == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (self->invertible_sorter != NULL &&
|
||||||
|
sorter == gtk_invertible_sorter_get_sorter (self->invertible_sorter))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (sorter)
|
||||||
|
{
|
||||||
|
if (!self->invertible_sorter)
|
||||||
|
{
|
||||||
|
self->invertible_sorter = gtk_invertible_sorter_new (NULL);
|
||||||
|
g_object_set_data (G_OBJECT (self->invertible_sorter), "column", self);
|
||||||
|
}
|
||||||
|
gtk_invertible_sorter_set_sorter (self->invertible_sorter, sorter);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_clear_object (&self->invertible_sorter);
|
||||||
|
|
||||||
gtk_column_view_column_remove_from_sorter (self);
|
gtk_column_view_column_remove_from_sorter (self);
|
||||||
|
|
||||||
if (self->header)
|
if (self->header)
|
||||||
gtk_column_view_title_update_sort (GTK_COLUMN_VIEW_TITLE (self->header));
|
gtk_column_view_title_update (GTK_COLUMN_VIEW_TITLE (self->header));
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SORTER]);
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SORTER]);
|
||||||
}
|
}
|
||||||
@@ -783,14 +771,17 @@ gtk_column_view_column_get_sorter (GtkColumnViewColumn *self)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (self), NULL);
|
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (self), NULL);
|
||||||
|
|
||||||
return self->sorter;
|
if (self->invertible_sorter)
|
||||||
|
return gtk_invertible_sorter_get_sorter (self->invertible_sorter);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gtk_column_view_column_notify_sort (GtkColumnViewColumn *self)
|
gtk_column_view_column_notify_sort (GtkColumnViewColumn *self)
|
||||||
{
|
{
|
||||||
if (self->header)
|
if (self->header)
|
||||||
gtk_column_view_title_update_sort (GTK_COLUMN_VIEW_TITLE (self->header));
|
gtk_column_view_title_update (GTK_COLUMN_VIEW_TITLE (self->header));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -862,7 +853,7 @@ gtk_column_view_column_set_header_menu (GtkColumnViewColumn *self,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (self->header)
|
if (self->header)
|
||||||
gtk_column_view_title_set_menu (GTK_COLUMN_VIEW_TITLE (self->header), menu);
|
gtk_column_view_title_update (GTK_COLUMN_VIEW_TITLE (self->header));
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_HEADER_MENU]);
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_HEADER_MENU]);
|
||||||
}
|
}
|
||||||
@@ -1033,50 +1024,10 @@ gtk_column_view_column_get_header_allocation (GtkColumnViewColumn *self,
|
|||||||
*size = self->allocation_size;
|
*size = self->allocation_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_column_view_column_set_id: (attributes org.gtk.Method.set_property=id)
|
GtkInvertibleSorter *
|
||||||
* @self: a `GtkColumnViewColumn`
|
gtk_column_view_column_get_invertible_sorter (GtkColumnViewColumn *self)
|
||||||
* @id: (nullable): ID to use for this column
|
|
||||||
*
|
|
||||||
* Sets the id of this column.
|
|
||||||
*
|
|
||||||
* GTK makes no use of this, but applications can use it when
|
|
||||||
* storing column view configuration.
|
|
||||||
*
|
|
||||||
* It is up to callers to ensure uniqueness of IDs.
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gtk_column_view_column_set_id (GtkColumnViewColumn *self,
|
|
||||||
const char *id)
|
|
||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (self));
|
return self->invertible_sorter;
|
||||||
|
|
||||||
if (g_strcmp0 (self->id, id) == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_free (self->id);
|
|
||||||
self->id = g_strdup (id);
|
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_ID]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_column_view_column_get_id: (attributes org.gtk.Method.get_property=id)
|
|
||||||
* @self: a `GtkColumnViewColumn`
|
|
||||||
*
|
|
||||||
* Returns the ID set with gtk_column_view_column_set_id().
|
|
||||||
*
|
|
||||||
* Returns: (nullable): The column's ID
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
const char *
|
|
||||||
gtk_column_view_column_get_id (GtkColumnViewColumn *self)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (self), NULL);
|
|
||||||
|
|
||||||
return self->id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,13 +95,7 @@ GDK_AVAILABLE_IN_ALL
|
|||||||
void gtk_column_view_column_set_expand (GtkColumnViewColumn *self,
|
void gtk_column_view_column_set_expand (GtkColumnViewColumn *self,
|
||||||
gboolean expand);
|
gboolean expand);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gboolean gtk_column_view_column_get_expand (GtkColumnViewColumn *self);
|
gboolean gtk_column_view_column_get_expand (GtkColumnViewColumn *self);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_4_10
|
|
||||||
void gtk_column_view_column_set_id (GtkColumnViewColumn *self,
|
|
||||||
const char *id);
|
|
||||||
GDK_AVAILABLE_IN_4_10
|
|
||||||
const char * gtk_column_view_column_get_id (GtkColumnViewColumn *self);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "gtk/gtkcolumnviewcolumn.h"
|
#include "gtk/gtkcolumnviewcolumn.h"
|
||||||
|
|
||||||
#include "gtk/gtkcolumnviewcellprivate.h"
|
#include "gtk/gtkcolumnviewcellprivate.h"
|
||||||
|
#include "gtk/gtkinvertiblesorter.h"
|
||||||
|
|
||||||
|
|
||||||
void gtk_column_view_column_set_column_view (GtkColumnViewColumn *self,
|
void gtk_column_view_column_set_column_view (GtkColumnViewColumn *self,
|
||||||
@@ -57,4 +58,6 @@ void gtk_column_view_column_get_header_allocation (GtkColu
|
|||||||
int *offset,
|
int *offset,
|
||||||
int *size);
|
int *size);
|
||||||
|
|
||||||
|
GtkInvertibleSorter * gtk_column_view_column_get_invertible_sorter (GtkColumnViewColumn *self);
|
||||||
|
|
||||||
#endif /* __GTK_COLUMN_VIEW_COLUMN_PRIVATE_H__ */
|
#endif /* __GTK_COLUMN_VIEW_COLUMN_PRIVATE_H__ */
|
||||||
|
|||||||
+114
-540
@@ -20,572 +20,146 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "gtkcolumnviewsorterprivate.h"
|
#include "gtkcolumnviewsorterprivate.h"
|
||||||
|
|
||||||
#include "gtkcolumnviewcolumnprivate.h"
|
#include "gtkcolumnviewcolumnprivate.h"
|
||||||
#include "gtktypebuiltins.h"
|
#include "gtktypebuiltins.h"
|
||||||
|
#include "gtkmultisorter.h"
|
||||||
|
|
||||||
/* {{{ GObject implementation */
|
static GtkColumnViewColumn *
|
||||||
|
get_column (GtkInvertibleSorter *sorter)
|
||||||
typedef struct
|
|
||||||
{
|
{
|
||||||
GtkColumnViewColumn *column;
|
return GTK_COLUMN_VIEW_COLUMN (g_object_get_data (G_OBJECT (sorter), "column"));
|
||||||
GtkSorter *sorter;
|
|
||||||
gboolean inverted;
|
|
||||||
gulong changed_id;
|
|
||||||
} Sorter;
|
|
||||||
|
|
||||||
static void
|
|
||||||
free_sorter (gpointer data)
|
|
||||||
{
|
|
||||||
Sorter *s = data;
|
|
||||||
|
|
||||||
g_signal_handler_disconnect (s->sorter, s->changed_id);
|
|
||||||
g_object_unref (s->sorter);
|
|
||||||
g_object_unref (s->column);
|
|
||||||
g_free (s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GtkColumnViewSorter:
|
|
||||||
*
|
|
||||||
* `GtkColumnViewSorter` is a sorter implementation that
|
|
||||||
* is geared towards the needs of `GtkColumnView`.
|
|
||||||
*
|
|
||||||
* The sorter returned by [method@Gtk.ColumnView.get_sorter] is
|
|
||||||
* a `GtkColumnViewSorter`.
|
|
||||||
*
|
|
||||||
* In column views, sorting can be configured by associating
|
|
||||||
* sorters with columns, and users can invert sort order by clicking
|
|
||||||
* on column headers. The API of `GtkColumnViewSorter` is designed
|
|
||||||
* to allow saving and restoring this configuration.
|
|
||||||
*
|
|
||||||
* If you are only interested in the primary sort column (i.e. the
|
|
||||||
* column where a sort indicator is shown in the header), then
|
|
||||||
* you can just look at [property@Gtk.ColumnViewSorter:primary-sort-column]
|
|
||||||
* and [property@Gtk.ColumnViewSorter:primary-sort-order].
|
|
||||||
*
|
|
||||||
* If you want to store the full sort configuration, including
|
|
||||||
* secondary sort columns that are used for tie breaking, then
|
|
||||||
* you can use [method@Gtk.ColumnViewSorter.get_nth_sort_column].
|
|
||||||
* To get notified about changes, use [signal@Gtk.Sorter::changed].
|
|
||||||
*
|
|
||||||
* To restore a saved sort configuration on a `GtkColumnView`,
|
|
||||||
* use code like:
|
|
||||||
*
|
|
||||||
* ```
|
|
||||||
* sorter = gtk_column_view_get_sorter (view);
|
|
||||||
* for (i = gtk_column_view_sorter_get_n_sort_columns (sorter) - 1; i >= 0; i--)
|
|
||||||
* {
|
|
||||||
* column = gtk_column_view_sorter_get_nth_sort_column (sorter, i, &order);
|
|
||||||
* gtk_column_view_sort_by_column (view, column, order);
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* `GtkColumnViewSorter` was added in GTK 4.10
|
|
||||||
*/
|
|
||||||
struct _GtkColumnViewSorter
|
|
||||||
{
|
|
||||||
GtkSorter parent_instance;
|
|
||||||
|
|
||||||
GSequence *sorters;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_PRIMARY_SORT_COLUMN = 1,
|
|
||||||
PROP_PRIMARY_SORT_ORDER,
|
|
||||||
|
|
||||||
NUM_PROPERTIES
|
|
||||||
};
|
|
||||||
|
|
||||||
static GParamSpec *properties[NUM_PROPERTIES];
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GtkColumnViewSorter, gtk_column_view_sorter, GTK_TYPE_SORTER)
|
|
||||||
|
|
||||||
static GtkOrdering
|
|
||||||
gtk_column_view_sorter_compare (GtkSorter *sorter,
|
|
||||||
gpointer item1,
|
|
||||||
gpointer item2)
|
|
||||||
{
|
|
||||||
GtkColumnViewSorter *self = GTK_COLUMN_VIEW_SORTER (sorter);
|
|
||||||
GtkOrdering result = GTK_ORDERING_EQUAL;
|
|
||||||
GSequenceIter *iter;
|
|
||||||
|
|
||||||
for (iter = g_sequence_get_begin_iter (self->sorters);
|
|
||||||
!g_sequence_iter_is_end (iter);
|
|
||||||
iter = g_sequence_iter_next (iter))
|
|
||||||
{
|
|
||||||
Sorter *s = g_sequence_get (iter);
|
|
||||||
|
|
||||||
result = gtk_sorter_compare (s->sorter, item1, item2);
|
|
||||||
if (s->inverted)
|
|
||||||
result = - result;
|
|
||||||
|
|
||||||
if (result != GTK_ORDERING_EQUAL)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkSorterOrder
|
|
||||||
gtk_column_view_sorter_get_order (GtkSorter *sorter)
|
|
||||||
{
|
|
||||||
GtkColumnViewSorter *self = GTK_COLUMN_VIEW_SORTER (sorter);
|
|
||||||
GtkSorterOrder result = GTK_SORTER_ORDER_NONE;
|
|
||||||
GSequenceIter *iter;
|
|
||||||
|
|
||||||
for (iter = g_sequence_get_begin_iter (self->sorters);
|
|
||||||
!g_sequence_iter_is_end (iter);
|
|
||||||
iter = g_sequence_iter_next (iter))
|
|
||||||
{
|
|
||||||
Sorter *s = g_sequence_get (iter);
|
|
||||||
|
|
||||||
switch (gtk_sorter_get_order (s->sorter))
|
|
||||||
{
|
|
||||||
case GTK_SORTER_ORDER_PARTIAL:
|
|
||||||
result = GTK_SORTER_ORDER_PARTIAL;
|
|
||||||
break;
|
|
||||||
case GTK_SORTER_ORDER_NONE:
|
|
||||||
break;
|
|
||||||
case GTK_SORTER_ORDER_TOTAL:
|
|
||||||
return GTK_SORTER_ORDER_TOTAL;
|
|
||||||
default:
|
|
||||||
g_assert_not_reached ();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_column_view_sorter_dispose (GObject *object)
|
remove_column (GtkSorter *self,
|
||||||
{
|
|
||||||
GtkColumnViewSorter *self = GTK_COLUMN_VIEW_SORTER (object);
|
|
||||||
|
|
||||||
/* The sorter is owned by the columview and is unreffed
|
|
||||||
* after the columns, so the sequence must be empty at
|
|
||||||
* this point.
|
|
||||||
* The sorter can outlive the columview it comes from
|
|
||||||
* (the model might still have a ref), but that does
|
|
||||||
* not change the fact that all columns will be gone.
|
|
||||||
*/
|
|
||||||
g_assert (g_sequence_is_empty (self->sorters));
|
|
||||||
g_clear_pointer (&self->sorters, g_sequence_free);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gtk_column_view_sorter_parent_class)->dispose (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_column_view_sorter_get_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GtkColumnViewSorter *self = GTK_COLUMN_VIEW_SORTER (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
case PROP_PRIMARY_SORT_COLUMN:
|
|
||||||
g_value_set_object (value, gtk_column_view_sorter_get_primary_sort_column (self));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_PRIMARY_SORT_ORDER:
|
|
||||||
g_value_set_enum (value, gtk_column_view_sorter_get_primary_sort_order (self));
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_column_view_sorter_class_init (GtkColumnViewSorterClass *class)
|
|
||||||
{
|
|
||||||
GtkSorterClass *sorter_class = GTK_SORTER_CLASS (class);
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
|
||||||
|
|
||||||
sorter_class->compare = gtk_column_view_sorter_compare;
|
|
||||||
sorter_class->get_order = gtk_column_view_sorter_get_order;
|
|
||||||
|
|
||||||
object_class->dispose = gtk_column_view_sorter_dispose;
|
|
||||||
object_class->get_property = gtk_column_view_sorter_get_property;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GtkColumnViewSorter:primary-sort-column: (attributes org.gtk.Property.get=gtk_column_view_sorter_get_primary_sort_column)
|
|
||||||
*
|
|
||||||
* The primary sort column.
|
|
||||||
*
|
|
||||||
* The primary sort column is the one that displays the triangle
|
|
||||||
* in a column view header.
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
properties[PROP_PRIMARY_SORT_COLUMN] =
|
|
||||||
g_param_spec_object ("primary-sort-column", NULL, NULL,
|
|
||||||
GTK_TYPE_COLUMN_VIEW_COLUMN,
|
|
||||||
G_PARAM_READABLE|G_PARAM_STATIC_STRINGS);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GtkColumnViewSorter:primary-sort-order: (attributes org.gtk.Property.get=gtk_column_view_sorter_get_primary_sort_order)
|
|
||||||
*
|
|
||||||
* The primary sort order.
|
|
||||||
*
|
|
||||||
* The primary sort order determines whether the triangle displayed
|
|
||||||
* in the column view header of the primary sort column points upwards
|
|
||||||
* or downwards.
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
properties[PROP_PRIMARY_SORT_ORDER] =
|
|
||||||
g_param_spec_enum ("primary-sort-order", NULL, NULL,
|
|
||||||
GTK_TYPE_SORT_TYPE,
|
|
||||||
GTK_SORT_ASCENDING,
|
|
||||||
G_PARAM_READABLE|G_PARAM_STATIC_STRINGS);
|
|
||||||
|
|
||||||
g_object_class_install_properties (object_class, NUM_PROPERTIES, properties);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_column_view_sorter_init (GtkColumnViewSorter *self)
|
|
||||||
{
|
|
||||||
self->sorters = g_sequence_new (free_sorter);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* }}} */
|
|
||||||
/* {{{ Private API */
|
|
||||||
|
|
||||||
GtkColumnViewSorter *
|
|
||||||
gtk_column_view_sorter_new (void)
|
|
||||||
{
|
|
||||||
return g_object_new (GTK_TYPE_COLUMN_VIEW_SORTER, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_column_view_sorter_changed_cb (GtkSorter *sorter, int change, gpointer data)
|
|
||||||
{
|
|
||||||
gtk_sorter_changed (GTK_SORTER (data), GTK_SORTER_CHANGE_DIFFERENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
remove_column (GtkColumnViewSorter *self,
|
|
||||||
GtkColumnViewColumn *column)
|
GtkColumnViewColumn *column)
|
||||||
{
|
{
|
||||||
GSequenceIter *iter;
|
GtkInvertibleSorter *sorter = gtk_column_view_column_get_invertible_sorter (column);
|
||||||
|
|
||||||
for (iter = g_sequence_get_begin_iter (self->sorters);
|
if (sorter == NULL)
|
||||||
!g_sequence_iter_is_end (iter);
|
return;
|
||||||
iter = g_sequence_iter_next (iter))
|
|
||||||
|
for (guint i = 0; i < g_list_model_get_n_items (G_LIST_MODEL (self)); i++)
|
||||||
{
|
{
|
||||||
Sorter *s = g_sequence_get (iter);
|
GtkInvertibleSorter *s;
|
||||||
|
|
||||||
if (s->column == column)
|
s = g_list_model_get_item (G_LIST_MODEL (self), i);
|
||||||
|
g_object_unref (s);
|
||||||
|
|
||||||
|
if (s == sorter)
|
||||||
{
|
{
|
||||||
g_sequence_remove (iter);
|
gtk_multi_sorter_remove (GTK_MULTI_SORTER (self), i);
|
||||||
return TRUE;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gtk_column_view_sorter_add_column (GtkColumnViewSorter *self,
|
|
||||||
GtkColumnViewColumn *column)
|
|
||||||
{
|
|
||||||
GSequenceIter *iter;
|
|
||||||
GtkSorter *sorter;
|
|
||||||
Sorter *s, *first;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_SORTER (self), FALSE);
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (column), FALSE);
|
|
||||||
|
|
||||||
sorter = gtk_column_view_column_get_sorter (column);
|
|
||||||
if (sorter == NULL)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
iter = g_sequence_get_begin_iter (self->sorters);
|
|
||||||
if (!g_sequence_iter_is_end (iter))
|
|
||||||
{
|
|
||||||
first = g_sequence_get (iter);
|
|
||||||
if (first->column == column)
|
|
||||||
{
|
|
||||||
first->inverted = !first->inverted;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
first = NULL;
|
|
||||||
|
|
||||||
remove_column (self, column);
|
|
||||||
|
|
||||||
s = g_new (Sorter, 1);
|
|
||||||
s->column = g_object_ref (column);
|
|
||||||
s->sorter = g_object_ref (sorter);
|
|
||||||
s->changed_id = g_signal_connect (sorter, "changed", G_CALLBACK (gtk_column_view_sorter_changed_cb), self);
|
|
||||||
s->inverted = FALSE;
|
|
||||||
|
|
||||||
g_sequence_insert_before (iter, s);
|
|
||||||
|
|
||||||
/* notify the previous first column to stop drawing an arrow */
|
|
||||||
if (first)
|
|
||||||
gtk_column_view_column_notify_sort (first->column);
|
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PRIMARY_SORT_COLUMN]);
|
|
||||||
out:
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PRIMARY_SORT_ORDER]);
|
|
||||||
|
|
||||||
gtk_sorter_changed (GTK_SORTER (self), GTK_SORTER_CHANGE_DIFFERENT);
|
|
||||||
|
|
||||||
gtk_column_view_column_notify_sort (column);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gtk_column_view_sorter_remove_column (GtkColumnViewSorter *self,
|
|
||||||
GtkColumnViewColumn *column)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_SORTER (self), FALSE);
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (column), FALSE);
|
|
||||||
|
|
||||||
if (remove_column (self, column))
|
|
||||||
{
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PRIMARY_SORT_COLUMN]);
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PRIMARY_SORT_ORDER]);
|
|
||||||
|
|
||||||
gtk_sorter_changed (GTK_SORTER (self), GTK_SORTER_CHANGE_DIFFERENT);
|
|
||||||
gtk_column_view_column_notify_sort (column);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gtk_column_view_sorter_set_column (GtkColumnViewSorter *self,
|
|
||||||
GtkColumnViewColumn *column,
|
|
||||||
gboolean inverted)
|
|
||||||
{
|
|
||||||
GtkSorter *sorter;
|
|
||||||
Sorter *s;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_SORTER (self), FALSE);
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (column), FALSE);
|
|
||||||
|
|
||||||
sorter = gtk_column_view_column_get_sorter (column);
|
|
||||||
if (sorter == NULL)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
g_object_ref (column);
|
|
||||||
|
|
||||||
g_sequence_remove_range (g_sequence_get_begin_iter (self->sorters),
|
|
||||||
g_sequence_get_end_iter (self->sorters));
|
|
||||||
|
|
||||||
s = g_new (Sorter, 1);
|
|
||||||
s->column = g_object_ref (column);
|
|
||||||
s->sorter = g_object_ref (sorter);
|
|
||||||
s->changed_id = g_signal_connect (sorter, "changed", G_CALLBACK (gtk_column_view_sorter_changed_cb), self);
|
|
||||||
s->inverted = inverted;
|
|
||||||
|
|
||||||
g_sequence_prepend (self->sorters, s);
|
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PRIMARY_SORT_COLUMN]);
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PRIMARY_SORT_ORDER]);
|
|
||||||
|
|
||||||
gtk_sorter_changed (GTK_SORTER (self), GTK_SORTER_CHANGE_DIFFERENT);
|
|
||||||
|
|
||||||
gtk_column_view_column_notify_sort (column);
|
|
||||||
|
|
||||||
g_object_unref (column);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gtk_column_view_sorter_clear (GtkColumnViewSorter *self)
|
gtk_column_view_sorter_activate_column (GtkSorter *self,
|
||||||
|
GtkColumnViewColumn *column)
|
||||||
{
|
{
|
||||||
GSequenceIter *iter;
|
GtkMultiSorter *multi = GTK_MULTI_SORTER (self);
|
||||||
Sorter *s;
|
GtkInvertibleSorter *sorter, *s;
|
||||||
GtkColumnViewColumn *column;
|
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_COLUMN_VIEW_SORTER (self));
|
g_return_if_fail (GTK_IS_MULTI_SORTER (self));
|
||||||
|
g_return_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (column));
|
||||||
|
|
||||||
if (g_sequence_is_empty (self->sorters))
|
sorter = gtk_column_view_column_get_invertible_sorter (column);
|
||||||
|
if (sorter == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
iter = g_sequence_get_begin_iter (self->sorters);
|
if (g_list_model_get_n_items (G_LIST_MODEL (self)) > 0)
|
||||||
s = g_sequence_get (iter);
|
|
||||||
|
|
||||||
column = g_object_ref (s->column);
|
|
||||||
|
|
||||||
g_sequence_remove_range (iter, g_sequence_get_end_iter (self->sorters));
|
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PRIMARY_SORT_COLUMN]);
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PRIMARY_SORT_ORDER]);
|
|
||||||
|
|
||||||
gtk_sorter_changed (GTK_SORTER (self), GTK_SORTER_CHANGE_DIFFERENT);
|
|
||||||
|
|
||||||
gtk_column_view_column_notify_sort (column);
|
|
||||||
|
|
||||||
g_object_unref (column);
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkColumnViewColumn *
|
|
||||||
gtk_column_view_sorter_get_sort_column (GtkColumnViewSorter *self,
|
|
||||||
gboolean *inverted)
|
|
||||||
{
|
|
||||||
GSequenceIter *iter;
|
|
||||||
Sorter *s;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_SORTER (self), NULL);
|
|
||||||
|
|
||||||
if (g_sequence_is_empty (self->sorters))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
iter = g_sequence_get_begin_iter (self->sorters);
|
|
||||||
s = g_sequence_get (iter);
|
|
||||||
|
|
||||||
*inverted = s->inverted;
|
|
||||||
|
|
||||||
return s->column;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* }}} */
|
|
||||||
/* {{{ Public API */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_column_view_sorter_get_primary_sort_column:
|
|
||||||
* @self: a `GtkColumnViewSorter`
|
|
||||||
*
|
|
||||||
* Returns the primary sort column.
|
|
||||||
*
|
|
||||||
* The primary sort column is the one that displays the triangle
|
|
||||||
* in a column view header.
|
|
||||||
*
|
|
||||||
* Returns: (nullable) (transfer none): the primary sort column
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
GtkColumnViewColumn *
|
|
||||||
gtk_column_view_sorter_get_primary_sort_column (GtkColumnViewSorter *self)
|
|
||||||
{
|
|
||||||
GSequenceIter *iter;
|
|
||||||
Sorter *s;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_SORTER (self), NULL);
|
|
||||||
|
|
||||||
iter = g_sequence_get_begin_iter (self->sorters);
|
|
||||||
if (g_sequence_iter_is_end (iter))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
s = g_sequence_get (iter);
|
|
||||||
|
|
||||||
return s->column;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_column_view_sorter_get_primary_sort_order:
|
|
||||||
* @self: a `GtkColumnViewSorter`
|
|
||||||
*
|
|
||||||
* Returns the primary sort order.
|
|
||||||
*
|
|
||||||
* The primary sort order determines whether the triangle displayed
|
|
||||||
* in the column view header of the primary sort column points upwards
|
|
||||||
* or downwards.
|
|
||||||
*
|
|
||||||
* If there is no primary sort column, then this function returns
|
|
||||||
* `GTK_SORT_ASCENDING`.
|
|
||||||
*
|
|
||||||
* Returns: the primary sort order
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
GtkSortType
|
|
||||||
gtk_column_view_sorter_get_primary_sort_order (GtkColumnViewSorter *self)
|
|
||||||
{
|
|
||||||
GSequenceIter *iter;
|
|
||||||
Sorter *s;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_SORTER (self), GTK_SORT_ASCENDING);
|
|
||||||
|
|
||||||
iter = g_sequence_get_begin_iter (self->sorters);
|
|
||||||
if (g_sequence_iter_is_end (iter))
|
|
||||||
return GTK_SORT_ASCENDING;
|
|
||||||
|
|
||||||
s = g_sequence_get (iter);
|
|
||||||
|
|
||||||
return s->inverted ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_column_view_sorter_get_n_sort_columns:
|
|
||||||
* @self: a `GtkColumnViewSorter`
|
|
||||||
*
|
|
||||||
* Returns the number of columns by which the sorter sorts.
|
|
||||||
*
|
|
||||||
* If the sorter of the primary sort column does not determine
|
|
||||||
* a total order, then the secondary sorters are consulted to
|
|
||||||
* break the ties.
|
|
||||||
*
|
|
||||||
* Use the [signal@Gtk.Sorter::changed] signal to get notified
|
|
||||||
* when the number of sort columns changes.
|
|
||||||
*
|
|
||||||
* Returns: the number of sort columns
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
guint
|
|
||||||
gtk_column_view_sorter_get_n_sort_columns (GtkColumnViewSorter *self)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_SORTER (self), 0);
|
|
||||||
|
|
||||||
return (guint) g_sequence_get_length (self->sorters);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_column_view_sorter_get_nth_sort_column:
|
|
||||||
* @self: a `GtkColumnViewSorter`
|
|
||||||
* @position: the position of the sort column to retrieve (0 for the
|
|
||||||
* primary sort column)
|
|
||||||
* @sort_order: (out): return location for the sort order
|
|
||||||
*
|
|
||||||
* Gets the @position'th sort column and its associated sort order.
|
|
||||||
*
|
|
||||||
* Use the [signal@Gtk.Sorter::changed] signal to get notified
|
|
||||||
* when sort columns change.
|
|
||||||
*
|
|
||||||
* Returns: (nullable) (transfer none): the @positions sort column
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
GtkColumnViewColumn *
|
|
||||||
gtk_column_view_sorter_get_nth_sort_column (GtkColumnViewSorter *self,
|
|
||||||
guint position,
|
|
||||||
GtkSortType *sort_order)
|
|
||||||
{
|
|
||||||
GSequenceIter *iter;
|
|
||||||
Sorter *s;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_COLUMN_VIEW_SORTER (self), NULL);
|
|
||||||
|
|
||||||
iter = g_sequence_get_iter_at_pos (self->sorters, (int) position);
|
|
||||||
|
|
||||||
if (g_sequence_iter_is_end (iter))
|
|
||||||
{
|
{
|
||||||
*sort_order = GTK_SORT_ASCENDING;
|
s = g_list_model_get_item (G_LIST_MODEL (self), 0);
|
||||||
return NULL;
|
}
|
||||||
|
else
|
||||||
|
s = NULL;
|
||||||
|
|
||||||
|
if (s == sorter)
|
||||||
|
{
|
||||||
|
/* column is already first, toggle sort order */
|
||||||
|
gtk_invertible_sorter_set_sort_order (s, 1 - gtk_invertible_sorter_get_sort_order (s));
|
||||||
|
|
||||||
|
gtk_column_view_column_notify_sort (column);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* move column to the first position */
|
||||||
|
remove_column (self, column);
|
||||||
|
gtk_invertible_sorter_set_sort_order (GTK_INVERTIBLE_SORTER (sorter), GTK_SORT_ASCENDING);
|
||||||
|
g_object_ref (sorter);
|
||||||
|
gtk_multi_sorter_splice (multi, 0, 0, (GtkSorter **)&sorter, 1);
|
||||||
|
|
||||||
|
if (s)
|
||||||
|
{
|
||||||
|
gtk_column_view_column_notify_sort (get_column (s));
|
||||||
|
g_object_unref (s);
|
||||||
|
}
|
||||||
|
gtk_column_view_column_notify_sort (column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtk_column_view_sorter_remove_column (GtkSorter *self,
|
||||||
|
GtkColumnViewColumn *column)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GTK_IS_MULTI_SORTER (self));
|
||||||
|
g_return_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (column));
|
||||||
|
|
||||||
|
remove_column (self, column);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtk_column_view_sorter_set_column (GtkSorter *self,
|
||||||
|
GtkColumnViewColumn *column,
|
||||||
|
GtkSortType direction)
|
||||||
|
{
|
||||||
|
GtkMultiSorter *multi = GTK_MULTI_SORTER (self);
|
||||||
|
GtkSorter *sorter;
|
||||||
|
GtkInvertibleSorter *s;
|
||||||
|
|
||||||
|
g_return_if_fail (GTK_IS_MULTI_SORTER (self));
|
||||||
|
g_return_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (column));
|
||||||
|
|
||||||
|
sorter = GTK_SORTER (gtk_column_view_column_get_invertible_sorter (column));
|
||||||
|
if (sorter == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (g_list_model_get_n_items (G_LIST_MODEL (self)) > 0)
|
||||||
|
s = g_list_model_get_item (G_LIST_MODEL (self), 0);
|
||||||
|
else
|
||||||
|
s = NULL;
|
||||||
|
|
||||||
|
remove_column (self, column);
|
||||||
|
|
||||||
|
gtk_invertible_sorter_set_sort_order (GTK_INVERTIBLE_SORTER (sorter), direction);
|
||||||
|
g_object_ref (sorter);
|
||||||
|
gtk_multi_sorter_splice (multi, 0, 0, &sorter, 1);
|
||||||
|
|
||||||
|
if (s)
|
||||||
|
{
|
||||||
|
gtk_column_view_column_notify_sort (get_column (s));
|
||||||
|
g_object_unref (s);
|
||||||
}
|
}
|
||||||
|
|
||||||
s = g_sequence_get (iter);
|
gtk_column_view_column_notify_sort (column);
|
||||||
|
|
||||||
*sort_order = s->inverted ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING;
|
|
||||||
|
|
||||||
return s->column;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* }}} */
|
void
|
||||||
|
gtk_column_view_sorter_clear (GtkSorter *self)
|
||||||
|
{
|
||||||
|
GtkMultiSorter *multi = GTK_MULTI_SORTER (self);
|
||||||
|
GtkInvertibleSorter *s;
|
||||||
|
|
||||||
/* vim:set foldmethod=marker expandtab: */
|
g_return_if_fail (GTK_IS_MULTI_SORTER (self));
|
||||||
|
|
||||||
|
if (g_list_model_get_n_items (G_LIST_MODEL (self)) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
s = g_list_model_get_item (G_LIST_MODEL (self), 0);
|
||||||
|
|
||||||
|
gtk_multi_sorter_splice (multi, 0, g_list_model_get_n_items (G_LIST_MODEL (self)), NULL, 0);
|
||||||
|
|
||||||
|
gtk_column_view_column_notify_sort (get_column (s));
|
||||||
|
g_object_unref (s);
|
||||||
|
}
|
||||||
|
|||||||
@@ -17,35 +17,32 @@
|
|||||||
* Authors: Matthias Clasen <mclasen@redhat.com>
|
* Authors: Matthias Clasen <mclasen@redhat.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GTK_COLUMN_VIEW_SORTER_PRIVATE_H__
|
#ifndef __GTK_COLUMN_VIEW_SORTER_H__
|
||||||
#define __GTK_COLUMN_VIEW_SORTER_PRIVATE_H__
|
#define __GTK_COLUMN_VIEW_SORTER_H__
|
||||||
|
|
||||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||||
#error "Only <gtk/gtk.h> can be included directly."
|
#error "Only <gtk/gtk.h> can be included directly."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtk/gtkcolumnviewsorter.h>
|
#include <gdk/gdk.h>
|
||||||
|
#include <gtk/gtksorter.h>
|
||||||
|
#include <gtk/gtkcolumnviewcolumn.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
GtkColumnViewSorter * gtk_column_view_sorter_new (void);
|
void gtk_column_view_sorter_activate_column (GtkSorter *self,
|
||||||
|
GtkColumnViewColumn *column);
|
||||||
|
void gtk_column_view_sorter_remove_column (GtkSorter *self,
|
||||||
|
GtkColumnViewColumn *column);
|
||||||
|
|
||||||
gboolean gtk_column_view_sorter_add_column (GtkColumnViewSorter *self,
|
void gtk_column_view_sorter_clear (GtkSorter *self);
|
||||||
GtkColumnViewColumn *column);
|
|
||||||
gboolean gtk_column_view_sorter_remove_column (GtkColumnViewSorter *self,
|
|
||||||
GtkColumnViewColumn *column);
|
|
||||||
|
|
||||||
void gtk_column_view_sorter_clear (GtkColumnViewSorter *self);
|
void gtk_column_view_sorter_set_column (GtkSorter *self,
|
||||||
|
GtkColumnViewColumn *column,
|
||||||
GtkColumnViewColumn * gtk_column_view_sorter_get_sort_column (GtkColumnViewSorter *self,
|
GtkSortType direction);
|
||||||
gboolean *inverted);
|
|
||||||
|
|
||||||
gboolean gtk_column_view_sorter_set_column (GtkColumnViewSorter *self,
|
|
||||||
GtkColumnViewColumn *column,
|
|
||||||
gboolean inverted);
|
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_COLUMN_VIEW_SORTER_PRIVATE_H__ */
|
#endif /* __GTK_COLUMN_VIEW_SORTER_H__ */
|
||||||
|
|
||||||
|
|||||||
+24
-29
@@ -189,15 +189,15 @@ activate_sort (GtkColumnViewTitle *self)
|
|||||||
{
|
{
|
||||||
GtkSorter *sorter;
|
GtkSorter *sorter;
|
||||||
GtkColumnView *view;
|
GtkColumnView *view;
|
||||||
GtkColumnViewSorter *view_sorter;
|
GtkSorter *view_sorter;
|
||||||
|
|
||||||
sorter = gtk_column_view_column_get_sorter (self->column);
|
sorter = gtk_column_view_column_get_sorter (self->column);
|
||||||
if (sorter == NULL)
|
if (sorter == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
view = gtk_column_view_column_get_column_view (self->column);
|
view = gtk_column_view_column_get_column_view (self->column);
|
||||||
view_sorter = GTK_COLUMN_VIEW_SORTER (gtk_column_view_get_sorter (view));
|
view_sorter = gtk_column_view_get_sorter (view);
|
||||||
gtk_column_view_sorter_add_column (view_sorter, self->column);
|
gtk_column_view_sorter_activate_column (view_sorter, self->column);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -283,56 +283,51 @@ gtk_column_view_title_new (GtkColumnViewColumn *column)
|
|||||||
title = g_object_new (GTK_TYPE_COLUMN_VIEW_TITLE, NULL);
|
title = g_object_new (GTK_TYPE_COLUMN_VIEW_TITLE, NULL);
|
||||||
|
|
||||||
title->column = g_object_ref (column);
|
title->column = g_object_ref (column);
|
||||||
gtk_column_view_title_update_sort (title);
|
gtk_column_view_title_update (title);
|
||||||
gtk_column_view_title_set_title (title, gtk_column_view_column_get_title (column));
|
|
||||||
gtk_column_view_title_set_menu (title, gtk_column_view_column_get_header_menu (column));
|
|
||||||
|
|
||||||
return GTK_WIDGET (title);
|
return GTK_WIDGET (title);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gtk_column_view_title_set_title (GtkColumnViewTitle *self,
|
gtk_column_view_title_update (GtkColumnViewTitle *self)
|
||||||
const char *title)
|
|
||||||
{
|
{
|
||||||
gtk_label_set_label (GTK_LABEL (self->title), title);
|
GtkInvertibleSorter *sorter;
|
||||||
}
|
|
||||||
|
|
||||||
void
|
gtk_label_set_label (GTK_LABEL (self->title), gtk_column_view_column_get_title (self->column));
|
||||||
gtk_column_view_title_set_menu (GtkColumnViewTitle *self,
|
|
||||||
GMenuModel *model)
|
|
||||||
{
|
|
||||||
g_clear_pointer (&self->popup_menu, gtk_widget_unparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
sorter = gtk_column_view_column_get_invertible_sorter (self->column);
|
||||||
gtk_column_view_title_update_sort (GtkColumnViewTitle *self)
|
|
||||||
{
|
if (sorter)
|
||||||
if (gtk_column_view_column_get_sorter (self->column))
|
|
||||||
{
|
{
|
||||||
GtkColumnView *view;
|
GtkColumnView *view;
|
||||||
GtkColumnViewSorter *view_sorter;
|
GtkSorter *view_sorter;
|
||||||
GtkColumnViewColumn *primary;
|
GtkInvertibleSorter *active = NULL;
|
||||||
GtkSortType sort_order;
|
GtkSortType direction = GTK_SORT_ASCENDING;
|
||||||
|
|
||||||
view = gtk_column_view_column_get_column_view (self->column);
|
view = gtk_column_view_column_get_column_view (self->column);
|
||||||
view_sorter = GTK_COLUMN_VIEW_SORTER (gtk_column_view_get_sorter (view));
|
view_sorter = gtk_column_view_get_sorter (view);
|
||||||
primary = gtk_column_view_sorter_get_primary_sort_column (view_sorter);
|
if (g_list_model_get_n_items (G_LIST_MODEL (view_sorter)) > 0)
|
||||||
sort_order = gtk_column_view_sorter_get_primary_sort_order (view_sorter);
|
{
|
||||||
|
active = g_list_model_get_item (G_LIST_MODEL (view_sorter), 0);
|
||||||
|
g_object_unref (active);
|
||||||
|
direction = gtk_invertible_sorter_get_sort_order (active);
|
||||||
|
}
|
||||||
|
|
||||||
gtk_widget_show (self->sort);
|
gtk_widget_show (self->sort);
|
||||||
gtk_widget_remove_css_class (self->sort, "ascending");
|
gtk_widget_remove_css_class (self->sort, "ascending");
|
||||||
gtk_widget_remove_css_class (self->sort, "descending");
|
gtk_widget_remove_css_class (self->sort, "descending");
|
||||||
gtk_widget_remove_css_class (self->sort, "unsorted");
|
gtk_widget_remove_css_class (self->sort, "unsorted");
|
||||||
|
if (sorter != active)
|
||||||
if (self->column != primary)
|
|
||||||
gtk_widget_add_css_class (self->sort, "unsorted");
|
gtk_widget_add_css_class (self->sort, "unsorted");
|
||||||
else if (sort_order == GTK_SORT_DESCENDING)
|
else if (direction == GTK_SORT_DESCENDING)
|
||||||
gtk_widget_add_css_class (self->sort, "descending");
|
gtk_widget_add_css_class (self->sort, "descending");
|
||||||
else
|
else
|
||||||
gtk_widget_add_css_class (self->sort, "ascending");
|
gtk_widget_add_css_class (self->sort, "ascending");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
gtk_widget_hide (self->sort);
|
gtk_widget_hide (self->sort);
|
||||||
|
|
||||||
|
g_clear_pointer (&self->popup_menu, gtk_widget_unparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkColumnViewColumn *
|
GtkColumnViewColumn *
|
||||||
|
|||||||
@@ -38,12 +38,7 @@ GType gtk_column_view_title_get_type (void) G_GNUC_CO
|
|||||||
|
|
||||||
GtkWidget * gtk_column_view_title_new (GtkColumnViewColumn *column);
|
GtkWidget * gtk_column_view_title_new (GtkColumnViewColumn *column);
|
||||||
|
|
||||||
void gtk_column_view_title_set_title (GtkColumnViewTitle *self,
|
void gtk_column_view_title_update (GtkColumnViewTitle *self);
|
||||||
const char *title);
|
|
||||||
void gtk_column_view_title_set_menu (GtkColumnViewTitle *self,
|
|
||||||
GMenuModel *model);
|
|
||||||
|
|
||||||
void gtk_column_view_title_update_sort (GtkColumnViewTitle *self);
|
|
||||||
|
|
||||||
GtkColumnViewColumn * gtk_column_view_title_get_column (GtkColumnViewTitle *self);
|
GtkColumnViewColumn * gtk_column_view_title_get_column (GtkColumnViewTitle *self);
|
||||||
|
|
||||||
|
|||||||
+2
-26
@@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
#include "gtkcomposetable.h"
|
#include "gtkcomposetable.h"
|
||||||
#include "gtkimcontextsimple.h"
|
#include "gtkimcontextsimple.h"
|
||||||
#include "gtkprivate.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define GTK_COMPOSE_TABLE_MAGIC "GtkComposeTable"
|
#define GTK_COMPOSE_TABLE_MAGIC "GtkComposeTable"
|
||||||
@@ -285,20 +284,6 @@ fail:
|
|||||||
static void parser_parse_file (GtkComposeParser *parser,
|
static void parser_parse_file (GtkComposeParser *parser,
|
||||||
const char *path);
|
const char *path);
|
||||||
|
|
||||||
char *
|
|
||||||
gtk_compose_table_get_x11_compose_file_dir (void)
|
|
||||||
{
|
|
||||||
char * compose_file_dir;
|
|
||||||
|
|
||||||
#if defined (X11_DATA_PREFIX)
|
|
||||||
compose_file_dir = g_strdup (X11_DATA_PREFIX "/share/X11/locale");
|
|
||||||
#else
|
|
||||||
compose_file_dir = g_build_filename (_gtk_get_datadir (), "X11", "locale", NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return compose_file_dir;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Substitute %H, %L and %S */
|
/* Substitute %H, %L and %S */
|
||||||
static char *
|
static char *
|
||||||
handle_substitutions (const char *start,
|
handle_substitutions (const char *start,
|
||||||
@@ -320,9 +305,6 @@ handle_substitutions (const char *start,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *x11_compose_file_dir;
|
|
||||||
char *path;
|
|
||||||
|
|
||||||
switch (p[1])
|
switch (p[1])
|
||||||
{
|
{
|
||||||
case 'H':
|
case 'H':
|
||||||
@@ -331,17 +313,11 @@ handle_substitutions (const char *start,
|
|||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
p++;
|
p++;
|
||||||
x11_compose_file_dir = gtk_compose_table_get_x11_compose_file_dir ();
|
g_string_append_printf (s, "/usr/share/X11/locale/%s/Compose", locale_name);
|
||||||
path = g_build_filename (x11_compose_file_dir, locale_name, "Compose", NULL);
|
|
||||||
g_string_append (s, path);
|
|
||||||
g_free (path);
|
|
||||||
g_free (x11_compose_file_dir);
|
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
p++;
|
p++;
|
||||||
x11_compose_file_dir = gtk_compose_table_get_x11_compose_file_dir ();
|
g_string_append (s, "/usr/share/X11/locale");
|
||||||
g_string_append (s, x11_compose_file_dir);
|
|
||||||
g_free (x11_compose_file_dir);
|
|
||||||
break;
|
break;
|
||||||
default: ;
|
default: ;
|
||||||
/* do nothing, next iteration handles p[1] */
|
/* do nothing, next iteration handles p[1] */
|
||||||
|
|||||||
@@ -93,8 +93,6 @@ guint32 gtk_compose_table_data_hash (const guint16 *data,
|
|||||||
int max_seq_len,
|
int max_seq_len,
|
||||||
int n_seqs);
|
int n_seqs);
|
||||||
|
|
||||||
char * gtk_compose_table_get_x11_compose_file_dir (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_COMPOSETABLE_H__ */
|
#endif /* __GTK_COMPOSETABLE_H__ */
|
||||||
|
|||||||
+2
-102
@@ -133,7 +133,6 @@ enum
|
|||||||
PROP_MODEL,
|
PROP_MODEL,
|
||||||
PROP_SELECTED,
|
PROP_SELECTED,
|
||||||
PROP_SELECTED_ITEM,
|
PROP_SELECTED_ITEM,
|
||||||
PROP_SELECTED_STRING,
|
|
||||||
PROP_ENABLE_SEARCH,
|
PROP_ENABLE_SEARCH,
|
||||||
PROP_EXPRESSION,
|
PROP_EXPRESSION,
|
||||||
PROP_SHOW_ARROW,
|
PROP_SHOW_ARROW,
|
||||||
@@ -248,7 +247,6 @@ selection_item_changed (GtkSingleSelection *selection,
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]);
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]);
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_STRING]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -360,10 +358,6 @@ gtk_drop_down_get_property (GObject *object,
|
|||||||
g_value_set_object (value, gtk_drop_down_get_selected_item (self));
|
g_value_set_object (value, gtk_drop_down_get_selected_item (self));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_SELECTED_STRING:
|
|
||||||
g_value_set_string (value, gtk_drop_down_get_selected_string (self));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_ENABLE_SEARCH:
|
case PROP_ENABLE_SEARCH:
|
||||||
g_value_set_boolean (value, self->enable_search);
|
g_value_set_boolean (value, self->enable_search);
|
||||||
break;
|
break;
|
||||||
@@ -408,10 +402,6 @@ gtk_drop_down_set_property (GObject *object,
|
|||||||
gtk_drop_down_set_selected (self, g_value_get_uint (value));
|
gtk_drop_down_set_selected (self, g_value_get_uint (value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_SELECTED_STRING:
|
|
||||||
gtk_drop_down_set_selected_string (self, g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_ENABLE_SEARCH:
|
case PROP_ENABLE_SEARCH:
|
||||||
gtk_drop_down_set_enable_search (self, g_value_get_boolean (value));
|
gtk_drop_down_set_enable_search (self, g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
@@ -555,22 +545,6 @@ gtk_drop_down_class_init (GtkDropDownClass *klass)
|
|||||||
G_TYPE_OBJECT,
|
G_TYPE_OBJECT,
|
||||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
/**
|
|
||||||
* GtkDropDown:selected-string: (attributes org.gtk.Property.get=gtk_drop_down_get_selected_string org.gtk.Property.set=gtk_drop_down_set_selected_string)
|
|
||||||
*
|
|
||||||
* The value of the string property of the selected item,
|
|
||||||
* if it is a [class@Gtk.StringObject].
|
|
||||||
*
|
|
||||||
* This is only useful for dropdowns with a [class@Gtk.StringList] as model,
|
|
||||||
* such as those created by [ctor@Gtk.DropDown.new_from_strings].
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
properties[PROP_SELECTED_STRING] =
|
|
||||||
g_param_spec_string ("selected-string", NULL, NULL,
|
|
||||||
NULL,
|
|
||||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkDropDown:enable-search: (attributes org.gtk.Property.get=gtk_drop_down_get_enable_search org.gtk.Property.set=gtk_drop_down_set_enable_search)
|
* GtkDropDown:enable-search: (attributes org.gtk.Property.get=gtk_drop_down_get_enable_search org.gtk.Property.set=gtk_drop_down_set_enable_search)
|
||||||
*
|
*
|
||||||
@@ -810,7 +784,8 @@ gtk_drop_down_new (GListModel *model,
|
|||||||
* gtk_drop_down_new_from_strings:
|
* gtk_drop_down_new_from_strings:
|
||||||
* @strings: (array zero-terminated=1): The strings to put in the dropdown
|
* @strings: (array zero-terminated=1): The strings to put in the dropdown
|
||||||
*
|
*
|
||||||
* Creates a new `GtkDropDown` that is populated with the strings.
|
* Creates a new `GtkDropDown` that is populated with
|
||||||
|
* the strings.
|
||||||
*
|
*
|
||||||
* Returns: a new `GtkDropDown`
|
* Returns: a new `GtkDropDown`
|
||||||
*/
|
*/
|
||||||
@@ -1041,81 +1016,6 @@ gtk_drop_down_get_selected_item (GtkDropDown *self)
|
|||||||
return gtk_single_selection_get_selected_item (GTK_SINGLE_SELECTION (self->selection));
|
return gtk_single_selection_get_selected_item (GTK_SINGLE_SELECTION (self->selection));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_drop_down_get_selected_string: (attributes org.gtk.Method.get_property=selected-string)
|
|
||||||
* @self: a `GtkDropDown`
|
|
||||||
*
|
|
||||||
* Gets the string value for the selected [class@Gtk.StringObject].
|
|
||||||
*
|
|
||||||
* If no item is selected, or items are of another type, %NULL is returned.
|
|
||||||
*
|
|
||||||
* This function is meant for dropdowns with a [class@Gtk.StringList] as model,
|
|
||||||
* such as those created by [ctor@Gtk.DropDown.new_from_strings].
|
|
||||||
*
|
|
||||||
* Returns: (transfer none) (nullable): The string value for selected item
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
const char *
|
|
||||||
gtk_drop_down_get_selected_string (GtkDropDown *self)
|
|
||||||
{
|
|
||||||
gpointer item;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_DROP_DOWN (self), NULL);
|
|
||||||
|
|
||||||
if (self->selection == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
item = gtk_single_selection_get_selected_item (GTK_SINGLE_SELECTION (self->selection));
|
|
||||||
|
|
||||||
if (GTK_IS_STRING_OBJECT (item))
|
|
||||||
return gtk_string_object_get_string (GTK_STRING_OBJECT (item));
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_drop_down_set_selected_string:
|
|
||||||
* @self: a `GtkDropDown`
|
|
||||||
* @string: the string to select
|
|
||||||
*
|
|
||||||
* Selects the first [class@Gtk.StringObject] whose string property
|
|
||||||
* matches @string.
|
|
||||||
*
|
|
||||||
* If items are not `GtkStringObjects`, the selection is not changed.
|
|
||||||
*
|
|
||||||
* This function is meant for dropdowns with a [class@Gtk.StringList] as model,
|
|
||||||
* such as those created by [ctor@Gtk.DropDown.new_from_strings].
|
|
||||||
*
|
|
||||||
* Since: 4.10
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gtk_drop_down_set_selected_string (GtkDropDown *self,
|
|
||||||
const char *string)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GTK_IS_DROP_DOWN (self));
|
|
||||||
g_return_if_fail (string != NULL);
|
|
||||||
|
|
||||||
if (self->selection == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (guint i = 0; i < g_list_model_get_n_items (G_LIST_MODEL (self->selection)); i++)
|
|
||||||
{
|
|
||||||
gpointer item = g_list_model_get_item (G_LIST_MODEL (self->selection), i);
|
|
||||||
|
|
||||||
g_object_unref (item);
|
|
||||||
|
|
||||||
if (!GTK_IS_STRING_OBJECT (item))
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (g_str_equal (gtk_string_object_get_string (GTK_STRING_OBJECT (item)), string))
|
|
||||||
{
|
|
||||||
gtk_single_selection_set_selected (GTK_SINGLE_SELECTION (self->selection), i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_drop_down_set_enable_search: (attributes org.gtk.Method.set_property=enable-search)
|
* gtk_drop_down_set_enable_search: (attributes org.gtk.Method.set_property=enable-search)
|
||||||
* @self: a `GtkDropDown`
|
* @self: a `GtkDropDown`
|
||||||
|
|||||||
@@ -52,13 +52,6 @@ guint gtk_drop_down_get_selected (GtkDropDown
|
|||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gpointer gtk_drop_down_get_selected_item (GtkDropDown *self);
|
gpointer gtk_drop_down_get_selected_item (GtkDropDown *self);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_4_10
|
|
||||||
const char * gtk_drop_down_get_selected_string (GtkDropDown *self);
|
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_4_10
|
|
||||||
void gtk_drop_down_set_selected_string (GtkDropDown *self,
|
|
||||||
const char *string);
|
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gtk_drop_down_set_factory (GtkDropDown *self,
|
void gtk_drop_down_set_factory (GtkDropDown *self,
|
||||||
GtkListItemFactory *factory);
|
GtkListItemFactory *factory);
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ struct _GtkEntryCompletion
|
|||||||
|
|
||||||
gulong completion_timeout;
|
gulong completion_timeout;
|
||||||
gulong changed_id;
|
gulong changed_id;
|
||||||
|
gulong insert_text_id;
|
||||||
GSignalGroup *insert_text_signal_group;
|
|
||||||
|
|
||||||
int current_selected;
|
int current_selected;
|
||||||
|
|
||||||
|
|||||||
@@ -1,304 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2022 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.1 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, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* Authors: Matthias Clasen <mclasen@redhat.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "gtkfilechoosercellprivate.h"
|
|
||||||
|
|
||||||
#include "gtkprivate.h"
|
|
||||||
#include "gtkbinlayout.h"
|
|
||||||
#include "gtkdragsource.h"
|
|
||||||
#include "gtkgestureclick.h"
|
|
||||||
#include "gtkgesturelongpress.h"
|
|
||||||
#include "gtkicontheme.h"
|
|
||||||
#include "gtklistitem.h"
|
|
||||||
#include "gtkselectionmodel.h"
|
|
||||||
#include "gtkfilechooserutils.h"
|
|
||||||
#include "gtkfilechooserwidget.h"
|
|
||||||
#include "gtkfilechooserwidgetprivate.h"
|
|
||||||
|
|
||||||
struct _GtkFileChooserCell
|
|
||||||
{
|
|
||||||
GtkWidget parent_instance;
|
|
||||||
|
|
||||||
GFileInfo *item;
|
|
||||||
gboolean selected;
|
|
||||||
guint position;
|
|
||||||
|
|
||||||
gboolean show_time;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GtkFileChooserCellClass
|
|
||||||
{
|
|
||||||
GtkWidgetClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GtkFileChooserCell, gtk_file_chooser_cell, GTK_TYPE_WIDGET)
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_POSITION = 1,
|
|
||||||
PROP_SELECTED,
|
|
||||||
PROP_ITEM,
|
|
||||||
PROP_SHOW_TIME,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ICON_SIZE 16
|
|
||||||
|
|
||||||
static void
|
|
||||||
popup_menu (GtkFileChooserCell *self,
|
|
||||||
double x,
|
|
||||||
double y)
|
|
||||||
{
|
|
||||||
GtkWidget *widget = GTK_WIDGET (self);
|
|
||||||
GtkSelectionModel *model;
|
|
||||||
GtkWidget *impl;
|
|
||||||
double xx, yy;
|
|
||||||
|
|
||||||
impl = gtk_widget_get_ancestor (widget, GTK_TYPE_FILE_CHOOSER_WIDGET);
|
|
||||||
|
|
||||||
model = gtk_file_chooser_widget_get_selection_model (GTK_FILE_CHOOSER_WIDGET (impl));
|
|
||||||
gtk_selection_model_select_item (model, self->position, TRUE);
|
|
||||||
|
|
||||||
gtk_widget_translate_coordinates (widget, GTK_WIDGET (impl),
|
|
||||||
x, y, &xx, &yy);
|
|
||||||
|
|
||||||
gtk_widget_activate_action (widget, "item.popup-file-list-menu",
|
|
||||||
"(udd)", self->position, xx, yy);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
file_chooser_cell_clicked (GtkEventController *controller,
|
|
||||||
int n_press,
|
|
||||||
double x,
|
|
||||||
double y)
|
|
||||||
{
|
|
||||||
GtkWidget *widget = gtk_event_controller_get_widget (controller);
|
|
||||||
GtkFileChooserCell *self = GTK_FILE_CHOOSER_CELL (widget);
|
|
||||||
|
|
||||||
gtk_gesture_set_state (GTK_GESTURE (controller), GTK_EVENT_SEQUENCE_CLAIMED);
|
|
||||||
popup_menu (self, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
file_chooser_cell_long_pressed (GtkEventController *controller,
|
|
||||||
double x,
|
|
||||||
double y)
|
|
||||||
{
|
|
||||||
GtkWidget *widget = gtk_event_controller_get_widget (controller);
|
|
||||||
GtkFileChooserCell *self = GTK_FILE_CHOOSER_CELL (widget);
|
|
||||||
|
|
||||||
gtk_gesture_set_state (GTK_GESTURE (controller), GTK_EVENT_SEQUENCE_CLAIMED);
|
|
||||||
popup_menu (self, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GdkContentProvider *
|
|
||||||
drag_prepare_cb (GtkDragSource *source,
|
|
||||||
double x,
|
|
||||||
double y,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
GdkContentProvider *provider;
|
|
||||||
GSList *selection;
|
|
||||||
GtkFileChooserWidget *impl;
|
|
||||||
GtkIconTheme *icon_theme;
|
|
||||||
GIcon *icon;
|
|
||||||
int scale;
|
|
||||||
GtkIconPaintable *paintable;
|
|
||||||
GtkFileChooserCell *self = user_data;
|
|
||||||
|
|
||||||
impl = GTK_FILE_CHOOSER_WIDGET (gtk_widget_get_ancestor (GTK_WIDGET (self),
|
|
||||||
GTK_TYPE_FILE_CHOOSER_WIDGET));
|
|
||||||
|
|
||||||
if (!self->selected)
|
|
||||||
{
|
|
||||||
gtk_selection_model_select_item (gtk_file_chooser_widget_get_selection_model (impl),
|
|
||||||
self->position, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
selection = gtk_file_chooser_widget_get_selected_files (impl);
|
|
||||||
if (!selection)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
scale = gtk_widget_get_scale_factor (GTK_WIDGET (self));
|
|
||||||
icon_theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (GTK_WIDGET (self)));
|
|
||||||
|
|
||||||
icon = _gtk_file_info_get_icon (self->item, ICON_SIZE, scale, icon_theme);
|
|
||||||
|
|
||||||
paintable = gtk_icon_theme_lookup_by_gicon (icon_theme,icon, ICON_SIZE, scale, GTK_TEXT_DIR_NONE, 0);
|
|
||||||
|
|
||||||
gtk_drag_source_set_icon (source, GDK_PAINTABLE (paintable), x, y);
|
|
||||||
|
|
||||||
provider = gdk_content_provider_new_typed (GDK_TYPE_FILE_LIST, selection);
|
|
||||||
g_slist_free_full (selection, g_object_unref);
|
|
||||||
g_object_unref (paintable);
|
|
||||||
g_object_unref (icon);
|
|
||||||
|
|
||||||
return provider;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_file_chooser_cell_realize (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
GtkFileChooserCell *self = GTK_FILE_CHOOSER_CELL (widget);
|
|
||||||
GtkFileChooserWidget *impl;
|
|
||||||
|
|
||||||
impl = GTK_FILE_CHOOSER_WIDGET (gtk_widget_get_ancestor (GTK_WIDGET (self),
|
|
||||||
GTK_TYPE_FILE_CHOOSER_WIDGET));
|
|
||||||
|
|
||||||
g_object_bind_property (impl, "show-time", self, "show-time", G_BINDING_SYNC_CREATE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_file_chooser_cell_init (GtkFileChooserCell *self)
|
|
||||||
{
|
|
||||||
GtkGesture *gesture;
|
|
||||||
GtkDragSource *drag_source;
|
|
||||||
|
|
||||||
gesture = gtk_gesture_click_new ();
|
|
||||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), GDK_BUTTON_SECONDARY);
|
|
||||||
g_signal_connect (gesture, "pressed", G_CALLBACK (file_chooser_cell_clicked), NULL);
|
|
||||||
gtk_widget_add_controller (GTK_WIDGET (self), GTK_EVENT_CONTROLLER (gesture));
|
|
||||||
|
|
||||||
gesture = gtk_gesture_long_press_new ();
|
|
||||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture), TRUE);
|
|
||||||
g_signal_connect (gesture, "pressed", G_CALLBACK (file_chooser_cell_long_pressed), NULL);
|
|
||||||
|
|
||||||
drag_source = gtk_drag_source_new ();
|
|
||||||
gtk_widget_add_controller (GTK_WIDGET (self), GTK_EVENT_CONTROLLER (drag_source));
|
|
||||||
g_signal_connect (drag_source, "prepare", G_CALLBACK (drag_prepare_cb), self);
|
|
||||||
|
|
||||||
g_signal_connect (self, "realize", G_CALLBACK (gtk_file_chooser_cell_realize), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_file_chooser_cell_dispose (GObject *object)
|
|
||||||
{
|
|
||||||
GtkWidget *child;
|
|
||||||
|
|
||||||
while ((child = gtk_widget_get_first_child (GTK_WIDGET (object))))
|
|
||||||
gtk_widget_unparent (child);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gtk_file_chooser_cell_parent_class)->dispose (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_file_chooser_cell_set_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GtkFileChooserCell *self = GTK_FILE_CHOOSER_CELL (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
case PROP_POSITION:
|
|
||||||
self->position = g_value_get_uint (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_SELECTED:
|
|
||||||
self->selected = g_value_get_boolean (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_ITEM:
|
|
||||||
self->item = g_value_get_object (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_SHOW_TIME:
|
|
||||||
self->show_time = g_value_get_boolean (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_file_chooser_cell_get_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GtkFileChooserCell *self = GTK_FILE_CHOOSER_CELL (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
case PROP_POSITION:
|
|
||||||
g_value_set_uint (value, self->position);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_SELECTED:
|
|
||||||
g_value_set_boolean (value, self->selected);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_ITEM:
|
|
||||||
g_value_set_object (value, self->item);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROP_SHOW_TIME:
|
|
||||||
g_value_set_boolean (value, self->show_time);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_file_chooser_cell_class_init (GtkFileChooserCellClass *klass)
|
|
||||||
{
|
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
||||||
|
|
||||||
object_class->dispose = gtk_file_chooser_cell_dispose;
|
|
||||||
object_class->set_property = gtk_file_chooser_cell_set_property;
|
|
||||||
object_class->get_property = gtk_file_chooser_cell_get_property;
|
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_POSITION,
|
|
||||||
g_param_spec_uint ("position", NULL, NULL,
|
|
||||||
0, G_MAXUINT, 0,
|
|
||||||
GTK_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_SELECTED,
|
|
||||||
g_param_spec_boolean ("selected", NULL, NULL,
|
|
||||||
FALSE,
|
|
||||||
GTK_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_ITEM,
|
|
||||||
g_param_spec_object ("item", NULL, NULL,
|
|
||||||
G_TYPE_FILE_INFO,
|
|
||||||
GTK_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_SHOW_TIME,
|
|
||||||
g_param_spec_boolean ("show-time", NULL, NULL,
|
|
||||||
FALSE,
|
|
||||||
GTK_PARAM_READWRITE));
|
|
||||||
|
|
||||||
gtk_widget_class_set_css_name (widget_class, I_("filelistcell"));
|
|
||||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkFileChooserCell *
|
|
||||||
gtk_file_chooser_cell_new (void)
|
|
||||||
{
|
|
||||||
return g_object_new (GTK_TYPE_FILE_CHOOSER_CELL, NULL);
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2022 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.1 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, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* Authors: Matthias Clasen
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GTK_FILE_CHOOSER_CELL_PRIVATE_H__
|
|
||||||
#define __GTK_FILE_CHOOSER_CELL_PRIVATE_H__
|
|
||||||
|
|
||||||
#include <gtk/gtkwidget.h>
|
|
||||||
#include <gtk/gtkexpression.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GTK_TYPE_FILE_CHOOSER_CELL (gtk_file_chooser_cell_get_type ())
|
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
|
||||||
G_DECLARE_FINAL_TYPE (GtkFileChooserCell, gtk_file_chooser_cell, GTK, FILE_CHOOSER_CELL, GtkWidget)
|
|
||||||
|
|
||||||
GtkFileChooserCell * gtk_file_chooser_cell_new (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GTK_FILE_CHOOSER_CELL_PRIVATE_H__ */
|
|
||||||
+72
-83
@@ -60,8 +60,7 @@ struct _GtkFileChooserEntry
|
|||||||
char *dir_part;
|
char *dir_part;
|
||||||
char *file_part;
|
char *file_part;
|
||||||
|
|
||||||
GtkTreeStore *completion_store;
|
GtkTreeModel *completion_store;
|
||||||
GtkFileSystemModel *model;
|
|
||||||
GtkFileFilter *current_filter;
|
GtkFileFilter *current_filter;
|
||||||
|
|
||||||
guint current_folder_loaded : 1;
|
guint current_folder_loaded : 1;
|
||||||
@@ -72,7 +71,6 @@ struct _GtkFileChooserEntry
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
FILE_INFO_COLUMN,
|
|
||||||
DISPLAY_NAME_COLUMN,
|
DISPLAY_NAME_COLUMN,
|
||||||
FULL_PATH_COLUMN,
|
FULL_PATH_COLUMN,
|
||||||
N_COLUMNS
|
N_COLUMNS
|
||||||
@@ -199,21 +197,20 @@ match_func (GtkEntryCompletion *compl,
|
|||||||
* current file filter (e.g. just jpg files) here. */
|
* current file filter (e.g. just jpg files) here. */
|
||||||
if (chooser_entry->current_filter != NULL)
|
if (chooser_entry->current_filter != NULL)
|
||||||
{
|
{
|
||||||
|
GFile *file;
|
||||||
GFileInfo *info;
|
GFileInfo *info;
|
||||||
|
|
||||||
gtk_tree_model_get (GTK_TREE_MODEL (chooser_entry->completion_store),
|
file = _gtk_file_system_model_get_file (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store),
|
||||||
iter,
|
iter);
|
||||||
FILE_INFO_COLUMN, &info,
|
info = _gtk_file_system_model_get_info (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store),
|
||||||
-1);
|
iter);
|
||||||
|
|
||||||
g_assert (info != NULL);
|
|
||||||
g_object_unref (info);
|
|
||||||
|
|
||||||
/* We always allow navigating into subfolders, so don't ever filter directories */
|
/* We always allow navigating into subfolders, so don't ever filter directories */
|
||||||
if (g_file_info_get_file_type (info) != G_FILE_TYPE_REGULAR)
|
if (g_file_info_get_file_type (info) != G_FILE_TYPE_REGULAR)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
g_assert (g_file_info_has_attribute (info, "standard::file"));
|
if (!g_file_info_has_attribute (info, "standard::file"))
|
||||||
|
g_file_info_set_attribute_object (info, "standard::file", G_OBJECT (file));
|
||||||
|
|
||||||
return gtk_filter_match (GTK_FILTER (chooser_entry->current_filter), info);
|
return gtk_filter_match (GTK_FILTER (chooser_entry->current_filter), info);
|
||||||
}
|
}
|
||||||
@@ -431,7 +428,7 @@ explicitly_complete (GtkFileChooserEntry *chooser_entry)
|
|||||||
{
|
{
|
||||||
chooser_entry->complete_on_load = FALSE;
|
chooser_entry->complete_on_load = FALSE;
|
||||||
|
|
||||||
if (chooser_entry->model)
|
if (chooser_entry->completion_store)
|
||||||
{
|
{
|
||||||
char *completion, *text;
|
char *completion, *text;
|
||||||
gsize completion_len, text_len;
|
gsize completion_len, text_len;
|
||||||
@@ -542,93 +539,77 @@ update_inline_completion (GtkFileChooserEntry *chooser_entry)
|
|||||||
static void
|
static void
|
||||||
discard_completion_store (GtkFileChooserEntry *chooser_entry)
|
discard_completion_store (GtkFileChooserEntry *chooser_entry)
|
||||||
{
|
{
|
||||||
if (!chooser_entry->model)
|
if (!chooser_entry->completion_store)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_assert (chooser_entry->completion_store != NULL);
|
|
||||||
|
|
||||||
gtk_entry_completion_set_model (gtk_entry_get_completion (GTK_ENTRY (chooser_entry)), NULL);
|
gtk_entry_completion_set_model (gtk_entry_get_completion (GTK_ENTRY (chooser_entry)), NULL);
|
||||||
update_inline_completion (chooser_entry);
|
update_inline_completion (chooser_entry);
|
||||||
g_clear_object (&chooser_entry->completion_store);
|
g_object_unref (chooser_entry->completion_store);
|
||||||
g_clear_object (&chooser_entry->model);
|
chooser_entry->completion_store = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
model_items_changed_cb (GListModel *model,
|
completion_store_set (GtkFileSystemModel *model,
|
||||||
guint position,
|
GFile *file,
|
||||||
guint removed,
|
GFileInfo *info,
|
||||||
guint added,
|
int column,
|
||||||
GtkFileChooserEntry *self)
|
GValue *value,
|
||||||
|
gpointer data)
|
||||||
{
|
{
|
||||||
if (removed > 0)
|
GtkFileChooserEntry *chooser_entry = data;
|
||||||
|
|
||||||
|
const char *prefix = "";
|
||||||
|
const char *suffix = "";
|
||||||
|
|
||||||
|
switch (column)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
case FULL_PATH_COLUMN:
|
||||||
|
prefix = chooser_entry->dir_part;
|
||||||
if (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (self->completion_store),
|
G_GNUC_FALLTHROUGH;
|
||||||
&iter,
|
case DISPLAY_NAME_COLUMN:
|
||||||
NULL,
|
|
||||||
position))
|
|
||||||
{
|
|
||||||
while (removed--)
|
|
||||||
gtk_tree_store_remove (self->completion_store, &iter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while (added-- > 0)
|
|
||||||
{
|
|
||||||
GtkTreeIter iter;
|
|
||||||
GFileInfo *info;
|
|
||||||
const char *suffix = NULL;
|
|
||||||
char *full_path;
|
|
||||||
char *display_name;
|
|
||||||
|
|
||||||
info = g_list_model_get_item (model, position);
|
|
||||||
|
|
||||||
if (_gtk_file_info_consider_as_directory (info))
|
if (_gtk_file_info_consider_as_directory (info))
|
||||||
suffix = G_DIR_SEPARATOR_S;
|
suffix = G_DIR_SEPARATOR_S;
|
||||||
|
|
||||||
display_name = g_strconcat (g_file_info_get_display_name (info), suffix, NULL);
|
g_value_take_string (value,
|
||||||
full_path = g_strconcat (self->dir_part, display_name, NULL);
|
g_strconcat (prefix,
|
||||||
|
g_file_info_get_display_name (info),
|
||||||
gtk_tree_store_insert_with_values (self->completion_store,
|
suffix,
|
||||||
&iter, NULL,
|
NULL));
|
||||||
position,
|
break;
|
||||||
FILE_INFO_COLUMN, info,
|
default:
|
||||||
FULL_PATH_COLUMN, full_path,
|
g_assert_not_reached ();
|
||||||
DISPLAY_NAME_COLUMN, display_name,
|
break;
|
||||||
-1);
|
|
||||||
|
|
||||||
g_clear_object (&info);
|
|
||||||
|
|
||||||
position++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fills the completion store from the contents of the current folder */
|
/* Fills the completion store from the contents of the current folder */
|
||||||
static void
|
static void
|
||||||
populate_completion_store (GtkFileChooserEntry *chooser_entry)
|
populate_completion_store (GtkFileChooserEntry *chooser_entry)
|
||||||
{
|
{
|
||||||
chooser_entry->completion_store = gtk_tree_store_new (N_COLUMNS,
|
chooser_entry->completion_store = GTK_TREE_MODEL (
|
||||||
G_TYPE_FILE_INFO,
|
|
||||||
G_TYPE_STRING,
|
|
||||||
G_TYPE_STRING);
|
|
||||||
|
|
||||||
chooser_entry->model =
|
|
||||||
_gtk_file_system_model_new_for_directory (chooser_entry->current_folder_file,
|
_gtk_file_system_model_new_for_directory (chooser_entry->current_folder_file,
|
||||||
"standard::name,standard::display-name,standard::type,"
|
"standard::name,standard::display-name,standard::type,"
|
||||||
"standard::content-type");
|
"standard::content-type",
|
||||||
g_signal_connect (chooser_entry->model, "items-changed",
|
completion_store_set,
|
||||||
G_CALLBACK (model_items_changed_cb), chooser_entry);
|
chooser_entry,
|
||||||
g_signal_connect (chooser_entry->model, "finished-loading",
|
N_COLUMNS,
|
||||||
|
G_TYPE_STRING,
|
||||||
|
G_TYPE_STRING));
|
||||||
|
g_signal_connect (chooser_entry->completion_store, "finished-loading",
|
||||||
G_CALLBACK (finished_loading_cb), chooser_entry);
|
G_CALLBACK (finished_loading_cb), chooser_entry);
|
||||||
|
|
||||||
_gtk_file_system_model_set_filter_folders (chooser_entry->model, TRUE);
|
_gtk_file_system_model_set_filter_folders (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store),
|
||||||
_gtk_file_system_model_set_show_files (chooser_entry->model,
|
TRUE);
|
||||||
|
_gtk_file_system_model_set_show_files (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store),
|
||||||
chooser_entry->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
chooser_entry->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||||
chooser_entry->action == GTK_FILE_CHOOSER_ACTION_SAVE);
|
chooser_entry->action == GTK_FILE_CHOOSER_ACTION_SAVE);
|
||||||
|
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (chooser_entry->completion_store),
|
||||||
|
DISPLAY_NAME_COLUMN, GTK_SORT_ASCENDING);
|
||||||
|
|
||||||
gtk_entry_completion_set_model (gtk_entry_get_completion (GTK_ENTRY (chooser_entry)),
|
gtk_entry_completion_set_model (gtk_entry_get_completion (GTK_ENTRY (chooser_entry)),
|
||||||
GTK_TREE_MODEL (chooser_entry->completion_store));
|
chooser_entry->completion_store);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback when the current folder finishes loading */
|
/* Callback when the current folder finishes loading */
|
||||||
@@ -656,7 +637,7 @@ finished_loading_cb (GtkFileSystemModel *model,
|
|||||||
completion = gtk_entry_get_completion (GTK_ENTRY (chooser_entry));
|
completion = gtk_entry_get_completion (GTK_ENTRY (chooser_entry));
|
||||||
update_inline_completion (chooser_entry);
|
update_inline_completion (chooser_entry);
|
||||||
|
|
||||||
if (gtk_widget_has_focus (GTK_WIDGET (gtk_entry_get_text_widget (GTK_ENTRY (chooser_entry)))))
|
if (gtk_widget_has_focus (GTK_WIDGET (chooser_entry)))
|
||||||
{
|
{
|
||||||
gtk_entry_completion_complete (completion);
|
gtk_entry_completion_complete (completion);
|
||||||
gtk_entry_completion_insert_prefix (completion);
|
gtk_entry_completion_insert_prefix (completion);
|
||||||
@@ -677,7 +658,11 @@ set_completion_folder (GtkFileChooserEntry *chooser_entry,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_clear_object (&chooser_entry->current_folder_file);
|
if (chooser_entry->current_folder_file)
|
||||||
|
{
|
||||||
|
g_object_unref (chooser_entry->current_folder_file);
|
||||||
|
chooser_entry->current_folder_file = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
g_free (chooser_entry->dir_part);
|
g_free (chooser_entry->dir_part);
|
||||||
chooser_entry->dir_part = g_strdup (dir_part);
|
chooser_entry->dir_part = g_strdup (dir_part);
|
||||||
@@ -725,7 +710,7 @@ refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry)
|
|||||||
|
|
||||||
g_free (dir_part);
|
g_free (dir_part);
|
||||||
|
|
||||||
if (chooser_entry->model &&
|
if (chooser_entry->completion_store &&
|
||||||
(g_strcmp0 (old_file_part, chooser_entry->file_part) != 0))
|
(g_strcmp0 (old_file_part, chooser_entry->file_part) != 0))
|
||||||
{
|
{
|
||||||
GtkFileFilter *filter;
|
GtkFileFilter *filter;
|
||||||
@@ -735,7 +720,8 @@ refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry)
|
|||||||
pattern = g_strconcat (chooser_entry->file_part, "*", NULL);
|
pattern = g_strconcat (chooser_entry->file_part, "*", NULL);
|
||||||
gtk_file_filter_add_pattern (filter, pattern);
|
gtk_file_filter_add_pattern (filter, pattern);
|
||||||
|
|
||||||
_gtk_file_system_model_set_filter (chooser_entry->model, filter);
|
_gtk_file_system_model_set_filter (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store),
|
||||||
|
filter);
|
||||||
|
|
||||||
g_free (pattern);
|
g_free (pattern);
|
||||||
g_object_unref (filter);
|
g_object_unref (filter);
|
||||||
@@ -954,8 +940,8 @@ _gtk_file_chooser_entry_set_action (GtkFileChooserEntry *chooser_entry,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chooser_entry->model)
|
if (chooser_entry->completion_store)
|
||||||
_gtk_file_system_model_set_show_files (chooser_entry->model,
|
_gtk_file_system_model_set_show_files (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store),
|
||||||
action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||||
action == GTK_FILE_CHOOSER_ACTION_SAVE);
|
action == GTK_FILE_CHOOSER_ACTION_SAVE);
|
||||||
|
|
||||||
@@ -985,14 +971,17 @@ gboolean
|
|||||||
_gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry,
|
_gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry,
|
||||||
GFile *file)
|
GFile *file)
|
||||||
{
|
{
|
||||||
|
GtkTreeIter iter;
|
||||||
GFileInfo *info;
|
GFileInfo *info;
|
||||||
|
|
||||||
if (chooser_entry->model == NULL)
|
if (chooser_entry->completion_store == NULL ||
|
||||||
|
!_gtk_file_system_model_get_iter_for_file (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store),
|
||||||
|
&iter,
|
||||||
|
file))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
info = _gtk_file_system_model_get_info_for_file (chooser_entry->model, file);
|
info = _gtk_file_system_model_get_info (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store),
|
||||||
if (!info)
|
&iter);
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return _gtk_file_info_consider_as_directory (info);
|
return _gtk_file_info_consider_as_directory (info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -479,12 +479,3 @@ _gtk_file_info_get_icon (GFileInfo *info,
|
|||||||
icon = g_themed_icon_new ("text-x-generic");
|
icon = g_themed_icon_new ("text-x-generic");
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
GFile *
|
|
||||||
_gtk_file_info_get_file (GFileInfo *info)
|
|
||||||
{
|
|
||||||
g_assert (G_IS_FILE_INFO (info));
|
|
||||||
g_assert (g_file_info_has_attribute (info, "standard::file"));
|
|
||||||
|
|
||||||
return G_FILE (g_file_info_get_attribute_object (info, "standard::file"));
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -58,8 +58,6 @@ GIcon * _gtk_file_info_get_icon (GFileInfo *info,
|
|||||||
int scale,
|
int scale,
|
||||||
GtkIconTheme *icon_theme);
|
GtkIconTheme *icon_theme);
|
||||||
|
|
||||||
GFile * _gtk_file_info_get_file (GFileInfo *info);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_FILE_CHOOSER_UTILS_H__ */
|
#endif /* __GTK_FILE_CHOOSER_UTILS_H__ */
|
||||||
|
|||||||
+1860
-1116
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include "gtkfilechooserwidget.h"
|
#include "gtkfilechooserwidget.h"
|
||||||
#include "gtkselectionmodel.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@@ -37,12 +36,6 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserWidget *chooser);
|
|||||||
void
|
void
|
||||||
gtk_file_chooser_widget_initial_focus (GtkFileChooserWidget *chooser);
|
gtk_file_chooser_widget_initial_focus (GtkFileChooserWidget *chooser);
|
||||||
|
|
||||||
GSList *
|
|
||||||
gtk_file_chooser_widget_get_selected_files (GtkFileChooserWidget *impl);
|
|
||||||
|
|
||||||
GtkSelectionModel *
|
|
||||||
gtk_file_chooser_widget_get_selection_model (GtkFileChooserWidget *chooser);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_FILE_CHOOSER_WIDGET_PRIVATE_H__ */
|
#endif /* __GTK_FILE_CHOOSER_WIDGET_PRIVATE_H__ */
|
||||||
|
|||||||
+1048
-81
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <gtk/gtkfilefilter.h>
|
#include <gtk/gtkfilefilter.h>
|
||||||
|
#include <gtk/deprecated/gtktreemodel.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@@ -32,13 +33,39 @@ typedef struct _GtkFileSystemModel GtkFileSystemModel;
|
|||||||
|
|
||||||
GType _gtk_file_system_model_get_type (void) G_GNUC_CONST;
|
GType _gtk_file_system_model_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GtkFileSystemModel *_gtk_file_system_model_new (void);
|
typedef gboolean (*GtkFileSystemModelGetValue) (GtkFileSystemModel *model,
|
||||||
GtkFileSystemModel *_gtk_file_system_model_new_for_directory(GFile *dir,
|
GFile *file,
|
||||||
const char *attributes);
|
GFileInfo *info,
|
||||||
|
int column,
|
||||||
|
GValue *value,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
GtkFileSystemModel *_gtk_file_system_model_new (GtkFileSystemModelGetValue get_func,
|
||||||
|
gpointer get_data,
|
||||||
|
guint n_columns,
|
||||||
|
...);
|
||||||
|
GtkFileSystemModel *_gtk_file_system_model_new_for_directory(GFile * dir,
|
||||||
|
const char * attributes,
|
||||||
|
GtkFileSystemModelGetValue get_func,
|
||||||
|
gpointer get_data,
|
||||||
|
guint n_columns,
|
||||||
|
...);
|
||||||
GFile * _gtk_file_system_model_get_directory (GtkFileSystemModel *model);
|
GFile * _gtk_file_system_model_get_directory (GtkFileSystemModel *model);
|
||||||
GCancellable * _gtk_file_system_model_get_cancellable (GtkFileSystemModel *model);
|
GCancellable * _gtk_file_system_model_get_cancellable (GtkFileSystemModel *model);
|
||||||
GFileInfo * _gtk_file_system_model_get_info_for_file(GtkFileSystemModel *model,
|
gboolean _gtk_file_system_model_iter_is_visible (GtkFileSystemModel *model,
|
||||||
|
GtkTreeIter *iter);
|
||||||
|
gboolean _gtk_file_system_model_iter_is_filtered_out (GtkFileSystemModel *model,
|
||||||
|
GtkTreeIter *iter);
|
||||||
|
GFileInfo * _gtk_file_system_model_get_info (GtkFileSystemModel *model,
|
||||||
|
GtkTreeIter *iter);
|
||||||
|
gboolean _gtk_file_system_model_get_iter_for_file(GtkFileSystemModel *model,
|
||||||
|
GtkTreeIter *iter,
|
||||||
GFile *file);
|
GFile *file);
|
||||||
|
GFile * _gtk_file_system_model_get_file (GtkFileSystemModel *model,
|
||||||
|
GtkTreeIter *iter);
|
||||||
|
const GValue * _gtk_file_system_model_get_value (GtkFileSystemModel *model,
|
||||||
|
GtkTreeIter * iter,
|
||||||
|
int column);
|
||||||
|
|
||||||
void _gtk_file_system_model_add_and_query_file (GtkFileSystemModel *model,
|
void _gtk_file_system_model_add_and_query_file (GtkFileSystemModel *model,
|
||||||
GFile *file,
|
GFile *file,
|
||||||
@@ -61,6 +88,8 @@ void _gtk_file_system_model_set_show_files (GtkFileSystemModel
|
|||||||
gboolean show_files);
|
gboolean show_files);
|
||||||
void _gtk_file_system_model_set_filter_folders (GtkFileSystemModel *model,
|
void _gtk_file_system_model_set_filter_folders (GtkFileSystemModel *model,
|
||||||
gboolean show_folders);
|
gboolean show_folders);
|
||||||
|
void _gtk_file_system_model_clear_cache (GtkFileSystemModel *model,
|
||||||
|
int column);
|
||||||
|
|
||||||
void _gtk_file_system_model_set_filter (GtkFileSystemModel *model,
|
void _gtk_file_system_model_set_filter (GtkFileSystemModel *model,
|
||||||
GtkFileFilter *filter);
|
GtkFileFilter *filter);
|
||||||
|
|||||||
@@ -1,255 +0,0 @@
|
|||||||
/* gtkfilethumbnail.c
|
|
||||||
*
|
|
||||||
* Copyright 2022 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
|
|
||||||
*
|
|
||||||
* This file 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 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This file 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 program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: LGPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "gtkfilethumbnail.h"
|
|
||||||
|
|
||||||
#include "gtkbinlayout.h"
|
|
||||||
#include "gtkfilechooserutils.h"
|
|
||||||
#include "gtkimage.h"
|
|
||||||
#include "gtkprivate.h"
|
|
||||||
#include "gtkwidget.h"
|
|
||||||
|
|
||||||
#define ICON_SIZE 16
|
|
||||||
|
|
||||||
struct _GtkFileThumbnail
|
|
||||||
{
|
|
||||||
GtkWidget parent;
|
|
||||||
|
|
||||||
GtkWidget *image;
|
|
||||||
|
|
||||||
GCancellable *cancellable;
|
|
||||||
GFileInfo *info;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
GtkWidgetClass parent;
|
|
||||||
} GtkFileThumbnailClass;
|
|
||||||
|
|
||||||
G_DEFINE_FINAL_TYPE (GtkFileThumbnail, _gtk_file_thumbnail, GTK_TYPE_WIDGET)
|
|
||||||
|
|
||||||
enum {
|
|
||||||
PROP_0,
|
|
||||||
PROP_INFO,
|
|
||||||
N_PROPS,
|
|
||||||
};
|
|
||||||
|
|
||||||
static GParamSpec *properties [N_PROPS];
|
|
||||||
|
|
||||||
static void
|
|
||||||
copy_attribute (GFileInfo *to,
|
|
||||||
GFileInfo *from,
|
|
||||||
const char *attribute)
|
|
||||||
{
|
|
||||||
GFileAttributeType type;
|
|
||||||
gpointer value;
|
|
||||||
|
|
||||||
if (g_file_info_get_attribute_data (from, attribute, &type, &value, NULL))
|
|
||||||
g_file_info_set_attribute (to, attribute, type, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
update_image (GtkFileThumbnail *self)
|
|
||||||
{
|
|
||||||
GtkIconTheme *icon_theme;
|
|
||||||
GIcon *icon;
|
|
||||||
int scale;
|
|
||||||
|
|
||||||
if (!g_file_info_has_attribute (self->info, G_FILE_ATTRIBUTE_STANDARD_ICON))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
scale = gtk_widget_get_scale_factor (GTK_WIDGET (self));
|
|
||||||
icon_theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (GTK_WIDGET (self)));
|
|
||||||
|
|
||||||
icon = _gtk_file_info_get_icon (self->info, ICON_SIZE, scale, icon_theme);
|
|
||||||
|
|
||||||
gtk_image_set_from_gicon (GTK_IMAGE (self->image), icon);
|
|
||||||
|
|
||||||
g_object_unref (icon);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
thumbnail_queried_cb (GObject *object,
|
|
||||||
GAsyncResult *result,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
GtkFileThumbnail *self = user_data; /* might be unreffed if operation was cancelled */
|
|
||||||
GFile *file = G_FILE (object);
|
|
||||||
GFileInfo *queried;
|
|
||||||
|
|
||||||
queried = g_file_query_info_finish (file, result, NULL);
|
|
||||||
if (queried == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
copy_attribute (self->info, queried, G_FILE_ATTRIBUTE_THUMBNAIL_PATH);
|
|
||||||
copy_attribute (self->info, queried, G_FILE_ATTRIBUTE_THUMBNAILING_FAILED);
|
|
||||||
copy_attribute (self->info, queried, G_FILE_ATTRIBUTE_STANDARD_ICON);
|
|
||||||
|
|
||||||
update_image (self);
|
|
||||||
|
|
||||||
g_clear_object (&queried);
|
|
||||||
|
|
||||||
g_clear_object (&self->cancellable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
cancel_thumbnail (GtkFileThumbnail *self)
|
|
||||||
{
|
|
||||||
g_cancellable_cancel (self->cancellable);
|
|
||||||
g_clear_object (&self->cancellable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
get_thumbnail (GtkFileThumbnail *self)
|
|
||||||
{
|
|
||||||
if (!self->info)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!update_image (self))
|
|
||||||
{
|
|
||||||
GFile *file;
|
|
||||||
|
|
||||||
if (g_file_info_has_attribute (self->info, "filechooser::queried"))
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_assert (self->cancellable == NULL);
|
|
||||||
self->cancellable = g_cancellable_new ();
|
|
||||||
|
|
||||||
file = _gtk_file_info_get_file (self->info);
|
|
||||||
g_file_info_set_attribute_boolean (self->info, "filechooser::queried", TRUE);
|
|
||||||
g_file_query_info_async (file,
|
|
||||||
G_FILE_ATTRIBUTE_THUMBNAIL_PATH ","
|
|
||||||
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED ","
|
|
||||||
G_FILE_ATTRIBUTE_STANDARD_ICON,
|
|
||||||
G_FILE_QUERY_INFO_NONE,
|
|
||||||
G_PRIORITY_DEFAULT,
|
|
||||||
self->cancellable,
|
|
||||||
thumbnail_queried_cb,
|
|
||||||
self);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gtk_file_thumbnail_dispose (GObject *object)
|
|
||||||
{
|
|
||||||
GtkFileThumbnail *self = (GtkFileThumbnail *)object;
|
|
||||||
|
|
||||||
_gtk_file_thumbnail_set_info (self, NULL);
|
|
||||||
|
|
||||||
g_clear_pointer (&self->image, gtk_widget_unparent);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (_gtk_file_thumbnail_parent_class)->dispose (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gtk_file_thumbnail_get_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GtkFileThumbnail *self = GTK_FILE_THUMBNAIL (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
case PROP_INFO:
|
|
||||||
g_value_set_object (value, self->info);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gtk_file_thumbnail_set_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GtkFileThumbnail *self = GTK_FILE_THUMBNAIL (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
case PROP_INFO:
|
|
||||||
_gtk_file_thumbnail_set_info (self, g_value_get_object (value));
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gtk_file_thumbnail_class_init (GtkFileThumbnailClass *klass)
|
|
||||||
{
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
|
||||||
|
|
||||||
object_class->dispose = _gtk_file_thumbnail_dispose;
|
|
||||||
object_class->get_property = _gtk_file_thumbnail_get_property;
|
|
||||||
object_class->set_property = _gtk_file_thumbnail_set_property;
|
|
||||||
|
|
||||||
properties[PROP_INFO] =
|
|
||||||
g_param_spec_object ("file-info", NULL, NULL,
|
|
||||||
G_TYPE_FILE_INFO,
|
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
||||||
|
|
||||||
g_object_class_install_properties (object_class, N_PROPS, properties);
|
|
||||||
|
|
||||||
gtk_widget_class_set_css_name (widget_class, I_("filethumbnail"));
|
|
||||||
|
|
||||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gtk_file_thumbnail_init (GtkFileThumbnail *self)
|
|
||||||
{
|
|
||||||
self->image = gtk_image_new ();
|
|
||||||
gtk_widget_set_parent (self->image, GTK_WIDGET (self));
|
|
||||||
}
|
|
||||||
|
|
||||||
GFileInfo *
|
|
||||||
_gtk_file_thumbnail_get_info (GtkFileThumbnail *self)
|
|
||||||
{
|
|
||||||
g_assert (GTK_IS_FILE_THUMBNAIL (self));
|
|
||||||
|
|
||||||
return self->info;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_gtk_file_thumbnail_set_info (GtkFileThumbnail *self,
|
|
||||||
GFileInfo *info)
|
|
||||||
{
|
|
||||||
g_assert (GTK_IS_FILE_THUMBNAIL (self));
|
|
||||||
g_assert (info == NULL || G_IS_FILE_INFO (info));
|
|
||||||
|
|
||||||
if (g_set_object (&self->info, info))
|
|
||||||
{
|
|
||||||
cancel_thumbnail (self);
|
|
||||||
get_thumbnail (self);
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_INFO]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/* gtkfilethumbnail.h
|
|
||||||
*
|
|
||||||
* Copyright 2022 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
|
|
||||||
*
|
|
||||||
* This file 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 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This file 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 program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: LGPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __GTK_FILE_THUMBNAIL_H__
|
|
||||||
#define __GTK_FILE_THUMBNAIL_H__
|
|
||||||
|
|
||||||
#include <gio/gio.h>
|
|
||||||
|
|
||||||
#include "gtkfilesystemmodel.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GTK_TYPE_FILE_THUMBNAIL (_gtk_file_thumbnail_get_type ())
|
|
||||||
#define GTK_FILE_THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_THUMBNAIL, GtkFileThumbnail))
|
|
||||||
#define GTK_IS_FILE_THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_THUMBNAIL))
|
|
||||||
|
|
||||||
typedef struct _GtkFileThumbnail GtkFileThumbnail;
|
|
||||||
|
|
||||||
GType _gtk_file_thumbnail_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
GFileInfo *_gtk_file_thumbnail_get_info (GtkFileThumbnail *self);
|
|
||||||
void _gtk_file_thumbnail_set_info (GtkFileThumbnail *self,
|
|
||||||
GFileInfo *info);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GTK_FILE_THUMBNAIL_H__ */
|
|
||||||
|
|
||||||
@@ -1870,7 +1870,9 @@ find_affected_text (GtkFontChooserWidget *fontchooser,
|
|||||||
|
|
||||||
hb_ot_layout_table_find_script (hb_face, HB_OT_TAG_GSUB, script_tag, &script_index);
|
hb_ot_layout_table_find_script (hb_face, HB_OT_TAG_GSUB, script_tag, &script_index);
|
||||||
|
|
||||||
hb_ot_layout_script_select_language (hb_face, HB_OT_TAG_GSUB, script_index, 1, &lang_tag, &lang_index);
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
hb_ot_layout_script_find_language (hb_face, HB_OT_TAG_GSUB, script_index, lang_tag, &lang_index);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
if (hb_ot_layout_language_find_feature (hb_face,
|
if (hb_ot_layout_language_find_feature (hb_face,
|
||||||
HB_OT_TAG_GSUB,
|
HB_OT_TAG_GSUB,
|
||||||
@@ -2011,7 +2013,9 @@ update_feature_label (GtkFontChooserWidget *fontchooser,
|
|||||||
|
|
||||||
hb_ot_layout_table_find_script (hb_face, HB_OT_TAG_GSUB, script_tag, &script_index);
|
hb_ot_layout_table_find_script (hb_face, HB_OT_TAG_GSUB, script_tag, &script_index);
|
||||||
|
|
||||||
hb_ot_layout_script_select_language (hb_face, HB_OT_TAG_GSUB, script_index, 1, &lang_tag, &lang_index);
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
hb_ot_layout_script_find_language (hb_face, HB_OT_TAG_GSUB, script_index, lang_tag, &lang_index);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
if (hb_ot_layout_language_find_feature (hb_face, HB_OT_TAG_GSUB, script_index, lang_index, item->tag, &feature_index))
|
if (hb_ot_layout_language_find_feature (hb_face, HB_OT_TAG_GSUB, script_index, lang_index, item->tag, &feature_index))
|
||||||
{
|
{
|
||||||
@@ -2561,7 +2565,9 @@ gtk_font_chooser_widget_update_font_features (GtkFontChooserWidget *fontchooser)
|
|||||||
{
|
{
|
||||||
hb_ot_layout_table_find_script (hb_face, table[i], script_tag, &script_index);
|
hb_ot_layout_table_find_script (hb_face, table[i], script_tag, &script_index);
|
||||||
|
|
||||||
hb_ot_layout_script_select_language (hb_face, table[i], script_index, 1, &lang_tag, &lang_index);
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
hb_ot_layout_script_find_language (hb_face, table[i], script_index, lang_tag, &lang_index);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
feat = features + n_features;
|
feat = features + n_features;
|
||||||
count = G_N_ELEMENTS (features) - n_features;
|
count = G_N_ELEMENTS (features) - n_features;
|
||||||
|
|||||||
@@ -46,9 +46,8 @@
|
|||||||
* `GtkIMContextSimple` reads compose sequences from the first of the
|
* `GtkIMContextSimple` reads compose sequences from the first of the
|
||||||
* following files that is found: ~/.config/gtk-4.0/Compose, ~/.XCompose,
|
* following files that is found: ~/.config/gtk-4.0/Compose, ~/.XCompose,
|
||||||
* /usr/share/X11/locale/$locale/Compose (for locales that have a nontrivial
|
* /usr/share/X11/locale/$locale/Compose (for locales that have a nontrivial
|
||||||
* Compose file). A subset of the file syntax described in the Compose(5)
|
* Compose file). The syntax of these files is described in the Compose(5)
|
||||||
* manual page is supported. Additionally, `include "%L"` loads GTK’s built-in
|
* manual page.
|
||||||
* table of compose sequences rather than the locale-specific one from X11.
|
|
||||||
*
|
*
|
||||||
* If none of these files is found, `GtkIMContextSimple` uses a built-in table
|
* If none of these files is found, `GtkIMContextSimple` uses a built-in table
|
||||||
* of compose sequences that is derived from the X11 Compose files.
|
* of compose sequences that is derived from the X11 Compose files.
|
||||||
@@ -181,6 +180,20 @@ gtk_im_context_simple_class_init (GtkIMContextSimpleClass *class)
|
|||||||
init_compose_table_async (NULL, NULL, NULL);
|
init_compose_table_async (NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *
|
||||||
|
get_x11_compose_file_dir (void)
|
||||||
|
{
|
||||||
|
char * compose_file_dir;
|
||||||
|
|
||||||
|
#if defined (X11_DATA_PREFIX)
|
||||||
|
compose_file_dir = g_strdup (X11_DATA_PREFIX "/share/X11/locale");
|
||||||
|
#else
|
||||||
|
compose_file_dir = g_build_filename (_gtk_get_datadir (), "X11", "locale", NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return compose_file_dir;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
gtk_compose_table_find (gconstpointer data1,
|
gtk_compose_table_find (gconstpointer data1,
|
||||||
gconstpointer data2)
|
gconstpointer data2)
|
||||||
@@ -308,7 +321,7 @@ gtk_im_context_simple_init_compose_table (void)
|
|||||||
{
|
{
|
||||||
if (g_ascii_strncasecmp (*lang, *sys_lang, strlen (*sys_lang)) == 0)
|
if (g_ascii_strncasecmp (*lang, *sys_lang, strlen (*sys_lang)) == 0)
|
||||||
{
|
{
|
||||||
char *x11_compose_file_dir = gtk_compose_table_get_x11_compose_file_dir ();
|
char *x11_compose_file_dir = get_x11_compose_file_dir ();
|
||||||
path = g_build_filename (x11_compose_file_dir, *lang, "Compose", NULL);
|
path = g_build_filename (x11_compose_file_dir, *lang, "Compose", NULL);
|
||||||
g_free (x11_compose_file_dir);
|
g_free (x11_compose_file_dir);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -0,0 +1,317 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2022 Matthias Clasen
|
||||||
|
*
|
||||||
|
* 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.1 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* Authors: Matthias Clasen <mclasen@redhat.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "gtkinvertiblesorter.h"
|
||||||
|
|
||||||
|
#include "gtksorterprivate.h"
|
||||||
|
#include "gtktypebuiltins.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkInvertibleSorter:
|
||||||
|
*
|
||||||
|
* `GtkInvertibleSorter` wraps another sorter and
|
||||||
|
* makes it possible to invert its order.
|
||||||
|
*/
|
||||||
|
struct _GtkInvertibleSorter
|
||||||
|
{
|
||||||
|
GtkSorter parent_instance;
|
||||||
|
|
||||||
|
GtkSorter *sorter;
|
||||||
|
GtkSortType sort_order;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
PROP_0,
|
||||||
|
PROP_SORTER,
|
||||||
|
PROP_SORT_ORDER,
|
||||||
|
|
||||||
|
N_PROPS
|
||||||
|
};
|
||||||
|
|
||||||
|
static GParamSpec *properties[N_PROPS] = { NULL, };
|
||||||
|
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (GtkInvertibleSorter, gtk_invertible_sorter, GTK_TYPE_SORTER)
|
||||||
|
|
||||||
|
static GtkOrdering
|
||||||
|
gtk_invertible_sorter_compare (GtkSorter *sorter,
|
||||||
|
gpointer item1,
|
||||||
|
gpointer item2)
|
||||||
|
{
|
||||||
|
GtkInvertibleSorter *self = GTK_INVERTIBLE_SORTER (sorter);
|
||||||
|
GtkOrdering result = GTK_ORDERING_EQUAL;
|
||||||
|
|
||||||
|
if (self->sorter)
|
||||||
|
result = gtk_sorter_compare (self->sorter, item1, item2);
|
||||||
|
|
||||||
|
if (self->sort_order == GTK_SORT_DESCENDING)
|
||||||
|
result = -result;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GtkSorterOrder
|
||||||
|
gtk_invertible_sorter_get_order (GtkSorter *sorter)
|
||||||
|
{
|
||||||
|
GtkInvertibleSorter *self = GTK_INVERTIBLE_SORTER (sorter);
|
||||||
|
|
||||||
|
if (self->sorter)
|
||||||
|
return gtk_sorter_get_order (self->sorter);
|
||||||
|
|
||||||
|
return GTK_SORTER_ORDER_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_invertible_sorter_changed_cb (GtkSorter *sorter,
|
||||||
|
GtkSorterChange change,
|
||||||
|
GtkInvertibleSorter *self)
|
||||||
|
{
|
||||||
|
gtk_sorter_changed (GTK_SORTER (self), change);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_invertible_sorter_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GtkInvertibleSorter *self = GTK_INVERTIBLE_SORTER (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_SORTER:
|
||||||
|
g_value_set_object (value, self->sorter);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PROP_SORT_ORDER:
|
||||||
|
g_value_set_enum (value, self->sort_order);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_invertible_sorter_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GtkInvertibleSorter *self = GTK_INVERTIBLE_SORTER (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_SORTER:
|
||||||
|
gtk_invertible_sorter_set_sorter (self, g_value_get_object (value));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PROP_SORT_ORDER:
|
||||||
|
gtk_invertible_sorter_set_sort_order (self, g_value_get_enum (value));
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_invertible_sorter_dispose (GObject *object)
|
||||||
|
{
|
||||||
|
GtkInvertibleSorter *self = GTK_INVERTIBLE_SORTER (object);
|
||||||
|
|
||||||
|
if (self->sorter)
|
||||||
|
g_signal_handlers_disconnect_by_func (self->sorter, G_CALLBACK (gtk_invertible_sorter_changed_cb), self);
|
||||||
|
g_clear_object (&self->sorter);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (gtk_invertible_sorter_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_invertible_sorter_class_init (GtkInvertibleSorterClass *class)
|
||||||
|
{
|
||||||
|
GtkSorterClass *sorter_class = GTK_SORTER_CLASS (class);
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||||
|
|
||||||
|
sorter_class->compare = gtk_invertible_sorter_compare;
|
||||||
|
sorter_class->get_order = gtk_invertible_sorter_get_order;
|
||||||
|
|
||||||
|
object_class->get_property = gtk_invertible_sorter_get_property;
|
||||||
|
object_class->set_property = gtk_invertible_sorter_set_property;
|
||||||
|
object_class->dispose = gtk_invertible_sorter_dispose;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkInvertibleSorter:sorter: (attributes org.gtk.Property.get=gtk_invertible_sorter_get_sorter org.gtk.Property.set=gtk_invertible_sorter_set_sorter)
|
||||||
|
*
|
||||||
|
* The sorter.
|
||||||
|
*
|
||||||
|
* Since: 4.10
|
||||||
|
**/
|
||||||
|
properties[PROP_SORTER] =
|
||||||
|
g_param_spec_object ("sorter", NULL, NULL,
|
||||||
|
GTK_TYPE_SORTER,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkInvertibleSorter:sort-order: (attributes org.gtk.Property.get=gtk_invertible_sorter_get_sort_order org.gtk.Property.set=gtk_invertible_sorter_set_sort_order)
|
||||||
|
*
|
||||||
|
* Whether the order of the underlying sorter is inverted.
|
||||||
|
*
|
||||||
|
* The order of the underlying sorter is considered ascending.
|
||||||
|
*
|
||||||
|
* To make the invertible sorter invert the order,
|
||||||
|
* set this property to `GTK_SORT_DESCENDING`.
|
||||||
|
*
|
||||||
|
* Since: 4.10
|
||||||
|
**/
|
||||||
|
properties[PROP_SORT_ORDER] =
|
||||||
|
g_param_spec_enum ("sort-order", NULL, NULL,
|
||||||
|
GTK_TYPE_SORT_TYPE,
|
||||||
|
GTK_SORT_ASCENDING,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
|
g_object_class_install_properties (object_class, N_PROPS, properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_invertible_sorter_init (GtkInvertibleSorter *self)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_invertible_sorter_new:
|
||||||
|
* @sorter: (nullable) (transfer full): the sorter
|
||||||
|
*
|
||||||
|
* Creates a new invertible sorter.
|
||||||
|
*
|
||||||
|
* This sorter compares items like @sorter, optionally
|
||||||
|
* inverting the order.
|
||||||
|
*
|
||||||
|
* Returns: a new `GtkInvertibleSorter`
|
||||||
|
*
|
||||||
|
* Since: 4.10
|
||||||
|
*/
|
||||||
|
GtkInvertibleSorter *
|
||||||
|
gtk_invertible_sorter_new (GtkSorter *sorter)
|
||||||
|
{
|
||||||
|
GtkInvertibleSorter *self;
|
||||||
|
|
||||||
|
self = g_object_new (GTK_TYPE_INVERTIBLE_SORTER,
|
||||||
|
"sorter", sorter,
|
||||||
|
NULL);
|
||||||
|
g_clear_object (&sorter);
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_invertible_sorter_set_sorter:
|
||||||
|
* @self: a `GtkInvertibleSorter`
|
||||||
|
* @sorter: (nullable): a sorter
|
||||||
|
*
|
||||||
|
* Sets the sorter.
|
||||||
|
*
|
||||||
|
* Since: 4.10
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gtk_invertible_sorter_set_sorter (GtkInvertibleSorter *self,
|
||||||
|
GtkSorter *sorter)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GTK_IS_INVERTIBLE_SORTER (self));
|
||||||
|
g_return_if_fail (sorter == NULL || GTK_IS_SORTER (sorter));
|
||||||
|
|
||||||
|
if (self->sorter)
|
||||||
|
g_signal_handlers_disconnect_by_func (self->sorter, G_CALLBACK (gtk_invertible_sorter_changed_cb), self);
|
||||||
|
|
||||||
|
if (sorter)
|
||||||
|
g_signal_connect (sorter, "changed", G_CALLBACK (gtk_invertible_sorter_changed_cb), self);
|
||||||
|
|
||||||
|
if (g_set_object (&self->sorter, sorter))
|
||||||
|
{
|
||||||
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SORTER]);
|
||||||
|
gtk_sorter_changed (GTK_SORTER (self), GTK_SORTER_CHANGE_DIFFERENT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_invertible_sorter_get_sorter:
|
||||||
|
* @self: a `GtkInvertibleSorter`
|
||||||
|
*
|
||||||
|
* Returns the sorter.
|
||||||
|
*
|
||||||
|
* Returns: (nullable) (transfer none): the sorter
|
||||||
|
*
|
||||||
|
* Since: 4.10
|
||||||
|
*/
|
||||||
|
GtkSorter *
|
||||||
|
gtk_invertible_sorter_get_sorter (GtkInvertibleSorter *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GTK_IS_INVERTIBLE_SORTER (self), NULL);
|
||||||
|
|
||||||
|
return self->sorter;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_invertible_sorter_set_sort_order:
|
||||||
|
* @self: a `GtkInvertibleSorter`
|
||||||
|
* @sort_order: the new sort order
|
||||||
|
*
|
||||||
|
* Sets whether to invert the order of the wrapped sorter.
|
||||||
|
*
|
||||||
|
* Since: 4.10
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gtk_invertible_sorter_set_sort_order (GtkInvertibleSorter *self,
|
||||||
|
GtkSortType sort_order)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GTK_IS_INVERTIBLE_SORTER (self));
|
||||||
|
|
||||||
|
if (self->sort_order == sort_order)
|
||||||
|
return;
|
||||||
|
|
||||||
|
self->sort_order = sort_order;
|
||||||
|
|
||||||
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SORT_ORDER]);
|
||||||
|
gtk_sorter_changed (GTK_SORTER (self), GTK_SORTER_CHANGE_INVERTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_invertible_sorter_get_sort_order:
|
||||||
|
* @self: a `GtkInvertibleSorter`
|
||||||
|
*
|
||||||
|
* Returns the sort order of @self.
|
||||||
|
*
|
||||||
|
* If the sort order is `GTK_SORT_DESCENDING`,
|
||||||
|
* then the underlying order is inverted.
|
||||||
|
*
|
||||||
|
* Returns: whether the order is inverted
|
||||||
|
*
|
||||||
|
* Since: 4.10
|
||||||
|
*/
|
||||||
|
GtkSortType
|
||||||
|
gtk_invertible_sorter_get_sort_order (GtkInvertibleSorter *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GTK_IS_INVERTIBLE_SORTER (self), GTK_SORT_ASCENDING);
|
||||||
|
|
||||||
|
return self->sort_order;
|
||||||
|
}
|
||||||
@@ -17,39 +17,39 @@
|
|||||||
* Authors: Matthias Clasen <mclasen@redhat.com>
|
* Authors: Matthias Clasen <mclasen@redhat.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GTK_COLUMN_VIEW_SORTER_H__
|
#ifndef __GTK_INVERTIBLE_SORTER_H__
|
||||||
#define __GTK_COLUMN_VIEW_SORTER_H__
|
#define __GTK_INVERTIBLE_SORTER_H__
|
||||||
|
|
||||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||||
#error "Only <gtk/gtk.h> can be included directly."
|
#error "Only <gtk/gtk.h> can be included directly."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gdk/gdk.h>
|
#include <gtk/gtkexpression.h>
|
||||||
#include <gtk/gtksorter.h>
|
#include <gtk/gtksorter.h>
|
||||||
#include <gtk/gtkcolumnviewcolumn.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GTK_TYPE_COLUMN_VIEW_SORTER (gtk_column_view_sorter_get_type ())
|
#define GTK_TYPE_INVERTIBLE_SORTER (gtk_invertible_sorter_get_type ())
|
||||||
|
GDK_AVAILABLE_IN_4_10
|
||||||
|
G_DECLARE_FINAL_TYPE (GtkInvertibleSorter, gtk_invertible_sorter, GTK, INVERTIBLE_SORTER, GtkSorter)
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_4_10
|
GDK_AVAILABLE_IN_4_10
|
||||||
G_DECLARE_FINAL_TYPE (GtkColumnViewSorter, gtk_column_view_sorter, GTK, COLUMN_VIEW_SORTER, GtkSorter)
|
GtkInvertibleSorter * gtk_invertible_sorter_new (GtkSorter *sorter);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_4_10
|
GDK_AVAILABLE_IN_4_10
|
||||||
GtkColumnViewColumn * gtk_column_view_sorter_get_primary_sort_column (GtkColumnViewSorter *self);
|
void gtk_invertible_sorter_set_sorter (GtkInvertibleSorter *self,
|
||||||
|
GtkSorter *sorter);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_4_10
|
GDK_AVAILABLE_IN_4_10
|
||||||
GtkSortType gtk_column_view_sorter_get_primary_sort_order (GtkColumnViewSorter *self);
|
GtkSorter * gtk_invertible_sorter_get_sorter (GtkInvertibleSorter *self);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_4_10
|
GDK_AVAILABLE_IN_4_10
|
||||||
guint gtk_column_view_sorter_get_n_sort_columns (GtkColumnViewSorter *self);
|
void gtk_invertible_sorter_set_sort_order (GtkInvertibleSorter *self,
|
||||||
|
GtkSortType sort_order);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_4_10
|
GDK_AVAILABLE_IN_4_10
|
||||||
GtkColumnViewColumn * gtk_column_view_sorter_get_nth_sort_column (GtkColumnViewSorter *self,
|
GtkSortType gtk_invertible_sorter_get_sort_order (GtkInvertibleSorter *self);
|
||||||
guint position,
|
|
||||||
GtkSortType *sort_order);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_SORTER_H__ */
|
#endif /* __GTK_INVERTIBLE_SORTER_H__ */
|
||||||
|
|
||||||
@@ -503,3 +503,56 @@ gtk_multi_sorter_remove (GtkMultiSorter *self,
|
|||||||
GTK_SORTER_CHANGE_LESS_STRICT,
|
GTK_SORTER_CHANGE_LESS_STRICT,
|
||||||
gtk_multi_sort_keys_new (self));
|
gtk_multi_sort_keys_new (self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_multi_sorter_splice:
|
||||||
|
* @self: a `GtkMultiSorter`
|
||||||
|
* @position: the position at which to make the change
|
||||||
|
* @n_removals: the number of items to remove
|
||||||
|
* @additions: (array length=n_additions) (element-type GtkSorter) (transfer full): the sorters to add
|
||||||
|
* @n_additions: the number of sorters to add
|
||||||
|
*
|
||||||
|
* Changes @self by removing @n_removals items and adding @n_additions
|
||||||
|
* sorters to it.
|
||||||
|
*
|
||||||
|
* This is the equivalent of [method@GLib.ListStore.splice].
|
||||||
|
*
|
||||||
|
* Note that @self takes ownership of the added sorters.
|
||||||
|
*
|
||||||
|
* Since: 4.10
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gtk_multi_sorter_splice (GtkMultiSorter *self,
|
||||||
|
guint position,
|
||||||
|
guint n_removals,
|
||||||
|
GtkSorter **additions,
|
||||||
|
guint n_additions)
|
||||||
|
{
|
||||||
|
guint n_items;
|
||||||
|
|
||||||
|
g_return_if_fail (GTK_IS_MULTI_SORTER (self));
|
||||||
|
g_return_if_fail (position + n_removals >= position); /* overflow */
|
||||||
|
|
||||||
|
n_items = gtk_sorters_get_size (&self->sorters);
|
||||||
|
g_return_if_fail (position + n_removals <= n_items);
|
||||||
|
|
||||||
|
|
||||||
|
for (guint i = 0; i < n_removals; i++)
|
||||||
|
{
|
||||||
|
GtkSorter *sorter = gtk_sorters_get (&self->sorters, position + i);
|
||||||
|
g_signal_handlers_disconnect_by_func (sorter, gtk_multi_sorter_changed_cb, self);
|
||||||
|
}
|
||||||
|
for (guint i = 0; i < n_additions; i++)
|
||||||
|
{
|
||||||
|
GtkSorter *sorter = additions[i];
|
||||||
|
g_signal_connect (sorter, "changed", G_CALLBACK (gtk_multi_sorter_changed_cb), self);
|
||||||
|
}
|
||||||
|
gtk_sorters_splice (&self->sorters, position, n_removals, FALSE, additions, n_additions);
|
||||||
|
g_list_model_items_changed (G_LIST_MODEL (self), position, n_removals, n_additions);
|
||||||
|
if (n_removals != n_additions)
|
||||||
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
|
||||||
|
|
||||||
|
gtk_sorter_changed_with_keys (GTK_SORTER (self),
|
||||||
|
GTK_SORTER_CHANGE_DIFFERENT,
|
||||||
|
gtk_multi_sort_keys_new (self));
|
||||||
|
}
|
||||||
|
|||||||
@@ -44,6 +44,13 @@ GDK_AVAILABLE_IN_ALL
|
|||||||
void gtk_multi_sorter_remove (GtkMultiSorter *self,
|
void gtk_multi_sorter_remove (GtkMultiSorter *self,
|
||||||
guint position);
|
guint position);
|
||||||
|
|
||||||
|
GDK_AVAILABLE_IN_4_10
|
||||||
|
void gtk_multi_sorter_splice (GtkMultiSorter *self,
|
||||||
|
guint position,
|
||||||
|
guint n_removals,
|
||||||
|
GtkSorter **additions,
|
||||||
|
guint n_additions);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_MULTI_SORTER_H__ */
|
#endif /* __GTK_MULTI_SORTER_H__ */
|
||||||
|
|||||||
@@ -520,6 +520,8 @@ on_remove_server_button_clicked (RemoveServerData *data)
|
|||||||
populate_servers (data->view);
|
populate_servers (data->view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
static void
|
static void
|
||||||
populate_servers (GtkPlacesView *view)
|
populate_servers (GtkPlacesView *view)
|
||||||
{
|
{
|
||||||
@@ -615,6 +617,8 @@ populate_servers (GtkPlacesView *view)
|
|||||||
g_bookmark_file_free (server_list);
|
g_bookmark_file_free (server_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_view_mode (GtkPlacesView *view)
|
update_view_mode (GtkPlacesView *view)
|
||||||
{
|
{
|
||||||
|
|||||||
+25
-20
@@ -24,11 +24,12 @@
|
|||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
|
|
||||||
#include "gtksearchenginemodelprivate.h"
|
#include "gtksearchenginemodelprivate.h"
|
||||||
#include "gtkfilechooserutils.h"
|
|
||||||
#include "gtkprivate.h"
|
#include "gtkprivate.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
struct _GtkSearchEngineModel
|
struct _GtkSearchEngineModel
|
||||||
{
|
{
|
||||||
GtkSearchEngine parent;
|
GtkSearchEngine parent;
|
||||||
@@ -80,33 +81,37 @@ static gboolean
|
|||||||
do_search (gpointer data)
|
do_search (gpointer data)
|
||||||
{
|
{
|
||||||
GtkSearchEngineModel *model = data;
|
GtkSearchEngineModel *model = data;
|
||||||
|
GtkTreeIter iter;
|
||||||
GList *hits = NULL;
|
GList *hits = NULL;
|
||||||
gboolean got_results = FALSE;
|
gboolean got_results = FALSE;
|
||||||
|
|
||||||
for (guint i = 0; i < g_list_model_get_n_items (G_LIST_MODEL (model->model)); i++)
|
if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model->model), &iter))
|
||||||
{
|
{
|
||||||
GFileInfo *info = g_list_model_get_item (G_LIST_MODEL (model->model), i);
|
do
|
||||||
|
|
||||||
if (info_matches_query (model->query, info))
|
|
||||||
{
|
{
|
||||||
GFile *file;
|
GFileInfo *info;
|
||||||
GtkSearchHit *hit;
|
|
||||||
|
|
||||||
file = _gtk_file_info_get_file (info);
|
info = _gtk_file_system_model_get_info (model->model, &iter);
|
||||||
hit = g_new (GtkSearchHit, 1);
|
if (info_matches_query (model->query, info))
|
||||||
hit->file = g_object_ref (file);
|
{
|
||||||
hit->info = g_object_ref (info);
|
GFile *file;
|
||||||
hits = g_list_prepend (hits, hit);
|
GtkSearchHit *hit;
|
||||||
|
|
||||||
|
file = _gtk_file_system_model_get_file (model->model, &iter);
|
||||||
|
hit = g_new (GtkSearchHit, 1);
|
||||||
|
hit->file = g_object_ref (file);
|
||||||
|
hit->info = g_object_ref (info);
|
||||||
|
hits = g_list_prepend (hits, hit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model->model), &iter));
|
||||||
|
|
||||||
g_clear_object (&info);
|
if (hits)
|
||||||
}
|
{
|
||||||
|
_gtk_search_engine_hits_added (GTK_SEARCH_ENGINE (model), hits);
|
||||||
if (hits)
|
g_list_free_full (hits, (GDestroyNotify)_gtk_search_hit_free);
|
||||||
{
|
got_results = TRUE;
|
||||||
_gtk_search_engine_hits_added (GTK_SEARCH_ENGINE (model), hits);
|
}
|
||||||
g_list_free_full (hits, (GDestroyNotify)_gtk_search_hit_free);
|
|
||||||
got_results = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model->idle = 0;
|
model->idle = 0;
|
||||||
|
|||||||
@@ -114,8 +114,7 @@ free_hit (gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GFileInfo *
|
static GFileInfo *
|
||||||
create_file_info (GFile *file,
|
create_file_info (TrackerSparqlCursor *cursor)
|
||||||
TrackerSparqlCursor *cursor)
|
|
||||||
{
|
{
|
||||||
GFileInfo *info;
|
GFileInfo *info;
|
||||||
const char *str;
|
const char *str;
|
||||||
@@ -141,10 +140,6 @@ create_file_info (GFile *file,
|
|||||||
g_date_time_unref (creation);
|
g_date_time_unref (creation);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_file_info_set_attribute_object (info, "standard::file", G_OBJECT (file));
|
|
||||||
g_file_info_set_attribute_boolean (info, "filechooser::filtered-out", FALSE);
|
|
||||||
g_file_info_set_attribute_boolean (info, "filechooser::visible", TRUE);
|
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,7 +175,7 @@ query_callback (TrackerSparqlStatement *statement,
|
|||||||
url = tracker_sparql_cursor_get_string (cursor, 0, NULL);
|
url = tracker_sparql_cursor_get_string (cursor, 0, NULL);
|
||||||
hit = g_slice_new0 (GtkSearchHit);
|
hit = g_slice_new0 (GtkSearchHit);
|
||||||
hit->file = g_file_new_for_uri (url);
|
hit->file = g_file_new_for_uri (url);
|
||||||
hit->info = create_file_info (hit->file, cursor);
|
hit->info = create_file_info (cursor);
|
||||||
hits = g_list_prepend (hits, hit);
|
hits = g_list_prepend (hits, hit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1259,13 +1259,13 @@ property_editor (GObject *object,
|
|||||||
g_strdup_printf ("%s: %s",
|
g_strdup_printf ("%s: %s",
|
||||||
self->name,
|
self->name,
|
||||||
gtk_label_get_text (GTK_LABEL (prop_edit))),
|
gtk_label_get_text (GTK_LABEL (prop_edit))),
|
||||||
-1);
|
NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gtk_accessible_update_property (GTK_ACCESSIBLE (prop_edit),
|
gtk_accessible_update_property (GTK_ACCESSIBLE (prop_edit),
|
||||||
GTK_ACCESSIBLE_PROPERTY_LABEL, self->name,
|
GTK_ACCESSIBLE_PROPERTY_LABEL, self->name,
|
||||||
-1);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return prop_edit;
|
return prop_edit;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ add_string (GtkInspectorStrvEditor *editor,
|
|||||||
gtk_editable_set_text (GTK_EDITABLE (entry), str);
|
gtk_editable_set_text (GTK_EDITABLE (entry), str);
|
||||||
gtk_accessible_update_property (GTK_ACCESSIBLE (entry),
|
gtk_accessible_update_property (GTK_ACCESSIBLE (entry),
|
||||||
GTK_ACCESSIBLE_PROPERTY_LABEL, _("Value"),
|
GTK_ACCESSIBLE_PROPERTY_LABEL, _("Value"),
|
||||||
-1);
|
NULL);
|
||||||
gtk_widget_show (entry);
|
gtk_widget_show (entry);
|
||||||
gtk_box_append (GTK_BOX (box), entry);
|
gtk_box_append (GTK_BOX (box), entry);
|
||||||
g_object_set_data (G_OBJECT (box), "entry", entry);
|
g_object_set_data (G_OBJECT (box), "entry", entry);
|
||||||
@@ -83,7 +83,7 @@ add_string (GtkInspectorStrvEditor *editor,
|
|||||||
gtk_accessible_update_property (GTK_ACCESSIBLE (button),
|
gtk_accessible_update_property (GTK_ACCESSIBLE (button),
|
||||||
GTK_ACCESSIBLE_PROPERTY_LABEL,
|
GTK_ACCESSIBLE_PROPERTY_LABEL,
|
||||||
g_strdup_printf (_("Remove %s"), str),
|
g_strdup_printf (_("Remove %s"), str),
|
||||||
-1);
|
NULL);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
gtk_box_append (GTK_BOX (box), button);
|
gtk_box_append (GTK_BOX (box), button);
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (remove_string), editor);
|
g_signal_connect (button, "clicked", G_CALLBACK (remove_string), editor);
|
||||||
@@ -116,7 +116,7 @@ gtk_inspector_strv_editor_init (GtkInspectorStrvEditor *editor)
|
|||||||
gtk_widget_set_halign (editor->button, GTK_ALIGN_END);
|
gtk_widget_set_halign (editor->button, GTK_ALIGN_END);
|
||||||
gtk_accessible_update_property (GTK_ACCESSIBLE (editor->button),
|
gtk_accessible_update_property (GTK_ACCESSIBLE (editor->button),
|
||||||
GTK_ACCESSIBLE_PROPERTY_LABEL, _("Add"),
|
GTK_ACCESSIBLE_PROPERTY_LABEL, _("Add"),
|
||||||
-1);
|
NULL);
|
||||||
gtk_widget_show (editor->button);
|
gtk_widget_show (editor->button);
|
||||||
g_signal_connect (editor->button, "clicked", G_CALLBACK (add_cb), editor);
|
g_signal_connect (editor->button, "clicked", G_CALLBACK (add_cb), editor);
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -108,9 +108,7 @@ gtk_private_sources = files([
|
|||||||
'gtkfilechoosererrorstack.c',
|
'gtkfilechoosererrorstack.c',
|
||||||
'gtkfilechoosernativeportal.c',
|
'gtkfilechoosernativeportal.c',
|
||||||
'gtkfilechooserutils.c',
|
'gtkfilechooserutils.c',
|
||||||
'gtkfilechoosercell.c',
|
|
||||||
'gtkfilesystemmodel.c',
|
'gtkfilesystemmodel.c',
|
||||||
'gtkfilethumbnail.c',
|
|
||||||
'gtkgizmo.c',
|
'gtkgizmo.c',
|
||||||
'gtkiconcache.c',
|
'gtkiconcache.c',
|
||||||
'gtkiconcachevalidator.c',
|
'gtkiconcachevalidator.c',
|
||||||
@@ -262,6 +260,7 @@ gtk_public_sources = files([
|
|||||||
'gtkimmulticontext.c',
|
'gtkimmulticontext.c',
|
||||||
'gtkinfobar.c',
|
'gtkinfobar.c',
|
||||||
'gtkinscription.c',
|
'gtkinscription.c',
|
||||||
|
'gtkinvertiblesorter.c',
|
||||||
'gtklabel.c',
|
'gtklabel.c',
|
||||||
'gtklayoutchild.c',
|
'gtklayoutchild.c',
|
||||||
'gtklayoutmanager.c',
|
'gtklayoutmanager.c',
|
||||||
@@ -445,7 +444,6 @@ gtk_public_headers = files([
|
|||||||
'gtkcolorutils.h',
|
'gtkcolorutils.h',
|
||||||
'gtkcolumnview.h',
|
'gtkcolumnview.h',
|
||||||
'gtkcolumnviewcolumn.h',
|
'gtkcolumnviewcolumn.h',
|
||||||
'gtkcolumnviewsorter.h',
|
|
||||||
'gtkconstraintguide.h',
|
'gtkconstraintguide.h',
|
||||||
'gtkconstraintlayout.h',
|
'gtkconstraintlayout.h',
|
||||||
'gtkconstraint.h',
|
'gtkconstraint.h',
|
||||||
@@ -516,6 +514,7 @@ gtk_public_headers = files([
|
|||||||
'gtkimmulticontext.h',
|
'gtkimmulticontext.h',
|
||||||
'gtkinfobar.h',
|
'gtkinfobar.h',
|
||||||
'gtkinscription.h',
|
'gtkinscription.h',
|
||||||
|
'gtkinvertiblesorter.h',
|
||||||
'gtklabel.h',
|
'gtklabel.h',
|
||||||
'gtklayoutchild.h',
|
'gtklayoutchild.h',
|
||||||
'gtklayoutmanager.h',
|
'gtklayoutmanager.h',
|
||||||
|
|||||||
@@ -3369,30 +3369,6 @@ columnview row:not(:selected) cell editablelabel.editing text selection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Complex Lists *
|
|
||||||
* Put padding on the cell content so event controllers *
|
|
||||||
* can cover the whole area. *
|
|
||||||
********************************************************/
|
|
||||||
|
|
||||||
columnview.complex {
|
|
||||||
> listview > row > cell {
|
|
||||||
padding: 0;
|
|
||||||
> * {
|
|
||||||
padding: 8px 6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// shrink vertically for .data-table
|
|
||||||
&.data-table > listview > row > cell {
|
|
||||||
padding: 0;
|
|
||||||
> * {
|
|
||||||
padding-top: 2px;
|
|
||||||
padding-bottom: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* App Notifications *
|
* App Notifications *
|
||||||
*********************/
|
*********************/
|
||||||
|
|||||||
+70
-245
@@ -140,278 +140,103 @@
|
|||||||
<property name="hscrollbar-policy">2</property>
|
<property name="hscrollbar-policy">2</property>
|
||||||
<property name="vexpand">1</property>
|
<property name="vexpand">1</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkColumnView" id="browse_files_column_view">
|
<object class="GtkTreeView" id="browse_files_tree_view">
|
||||||
<style>
|
<property name="has-tooltip">1</property>
|
||||||
<class name="complex"/>
|
<property name="enable-search">0</property>
|
||||||
</style>
|
|
||||||
<signal name="activate" handler="column_view_row_activated_cb" swapped="no"/>
|
|
||||||
<signal name="keynav-failed" handler="browse_files_column_view_keynav_failed_cb"/>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkColumnViewColumn" id="column_view_name_column">
|
<object class="GtkGestureLongPress">
|
||||||
<property name="title" translatable="yes">Name</property>
|
<property name="touch-only">1</property>
|
||||||
<property name="expand">1</property>
|
<signal name="pressed" handler="long_press_cb" swapped="no"/>
|
||||||
<property name="resizable">1</property>
|
|
||||||
<property name="factory">
|
|
||||||
<object class="GtkBuilderListItemFactory">
|
|
||||||
<property name="bytes"><![CDATA[
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
|
||||||
<template class="GtkListItem">
|
|
||||||
<property name="child">
|
|
||||||
<object class="GtkFileChooserCell">
|
|
||||||
<binding name="position">
|
|
||||||
<lookup name="position">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="item">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="selected">
|
|
||||||
<lookup name="selected">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox">
|
|
||||||
<binding name="tooltip-text">
|
|
||||||
<closure type="gchararray" function="column_view_get_tooltip_text">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
<child>
|
|
||||||
<object class="GtkFileThumbnail">
|
|
||||||
<property name="margin-start">6</property>
|
|
||||||
<property name="margin-end">6</property>
|
|
||||||
<binding name="file-info">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkInscription">
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="min-chars">10</property>
|
|
||||||
<binding name="text">
|
|
||||||
<closure type="gchararray" function="column_view_get_file_display_name">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
</template>
|
|
||||||
</interface>
|
|
||||||
]]></property>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkColumnViewColumn" id="column_view_location_column">
|
<object class="GtkGestureClick">
|
||||||
|
<property name="button">3</property>
|
||||||
|
<signal name="pressed" handler="click_cb" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<signal name="query-tooltip" handler="file_list_query_tooltip_cb" swapped="no"/>
|
||||||
|
<signal name="row-activated" handler="list_row_activated" swapped="no"/>
|
||||||
|
<signal name="keynav-failed" handler="browse_files_tree_view_keynav_failed_cb"/>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection" id="treeview-selection2">
|
||||||
|
<signal name="changed" handler="list_selection_changed" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeViewColumn" id="list_name_column">
|
||||||
|
<property name="title" translatable="yes">Name</property>
|
||||||
|
<property name="resizable">1</property>
|
||||||
|
<property name="expand">1</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererPixbuf" id="list_pixbuf_renderer">
|
||||||
|
<property name="xpad">6</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererText" id="list_name_renderer">
|
||||||
|
<property name="width-chars">10</property>
|
||||||
|
<property name="ellipsize">3</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeViewColumn" id="list_location_column">
|
||||||
<property name="title" translatable="yes">Location</property>
|
<property name="title" translatable="yes">Location</property>
|
||||||
<property name="resizable">1</property>
|
<property name="resizable">1</property>
|
||||||
<property name="visible">0</property>
|
<property name="visible">0</property>
|
||||||
<property name="expand">1</property>
|
<property name="expand">1</property>
|
||||||
<property name="factory">
|
<child>
|
||||||
<object class="GtkBuilderListItemFactory">
|
<object class="GtkCellRendererText" id="list_location_renderer">
|
||||||
<property name="bytes"><![CDATA[
|
<property name="xalign">0</property>
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<property name="width-chars">10</property>
|
||||||
<interface>
|
<property name="ellipsize">1</property>
|
||||||
<template class="GtkListItem">
|
<property name="xpad">6</property>
|
||||||
<property name="child">
|
|
||||||
<object class="GtkFileChooserCell">
|
|
||||||
<binding name="position">
|
|
||||||
<lookup name="position">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="item">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="selected">
|
|
||||||
<lookup name="selected">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<child>
|
|
||||||
<object class="GtkInscription">
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="min-chars">10</property>
|
|
||||||
<property name="margin-start">6</property>
|
|
||||||
<property name="margin-end">6</property>
|
|
||||||
<binding name="text">
|
|
||||||
<closure type="gchararray" function="column_view_get_location">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
<binding name="tooltip-text">
|
|
||||||
<closure type="gchararray" function="column_view_get_tooltip_text">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
</template>
|
|
||||||
</interface>
|
|
||||||
]]></property>
|
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkColumnViewColumn" id="column_view_size_column">
|
<object class="GtkTreeViewColumn" id="list_size_column">
|
||||||
<property name="title" translatable="yes">Size</property>
|
<property name="title" translatable="yes">Size</property>
|
||||||
<property name="factory">
|
<property name="sizing">2</property>
|
||||||
<object class="GtkBuilderListItemFactory">
|
<child>
|
||||||
<property name="bytes"><![CDATA[
|
<object class="GtkCellRendererText" id="list_size_renderer">
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<property name="xalign">0</property>
|
||||||
<interface>
|
<property name="xpad">6</property>
|
||||||
<template class="GtkListItem">
|
|
||||||
<property name="child">
|
|
||||||
<object class="GtkFileChooserCell">
|
|
||||||
<binding name="position">
|
|
||||||
<lookup name="position">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="item">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="selected">
|
|
||||||
<lookup name="selected">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<binding name="label">
|
|
||||||
<closure type="gchararray" function="column_view_get_size">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
<binding name="tooltip-text">
|
|
||||||
<closure type="gchararray" function="column_view_get_tooltip_text">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
</template>
|
|
||||||
</interface>
|
|
||||||
]]></property>
|
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkColumnViewColumn" id="column_view_type_column">
|
<object class="GtkTreeViewColumn" id="list_type_column">
|
||||||
<property name="title" translatable="yes">Type</property>
|
<property name="title" translatable="yes">Type</property>
|
||||||
<property name="resizable">1</property>
|
<property name="resizable">1</property>
|
||||||
<property name="factory">
|
<child>
|
||||||
<object class="GtkBuilderListItemFactory">
|
<object class="GtkCellRendererText" id="list_type_renderer">
|
||||||
<property name="bytes"><![CDATA[
|
<property name="xalign">0</property>
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<property name="xpad">6</property>
|
||||||
<interface>
|
|
||||||
<template class="GtkListItem">
|
|
||||||
<property name="child">
|
|
||||||
<object class="GtkFileChooserCell">
|
|
||||||
<binding name="position">
|
|
||||||
<lookup name="position">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="item">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="selected">
|
|
||||||
<lookup name="selected">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<binding name="label">
|
|
||||||
<closure type="gchararray" function="column_view_get_file_type">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
<binding name="tooltip-text">
|
|
||||||
<closure type="gchararray" function="column_view_get_tooltip_text">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
</template>
|
|
||||||
</interface>
|
|
||||||
]]></property>
|
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkColumnViewColumn" id="column_view_time_column">
|
<object class="GtkTreeViewColumn" id="list_time_column">
|
||||||
<property name="title" translatable="yes">Modified</property>
|
<property name="title" translatable="yes">Modified</property>
|
||||||
<property name="factory">
|
<property name="sizing">2</property>
|
||||||
<object class="GtkBuilderListItemFactory">
|
<child>
|
||||||
<property name="bytes"><![CDATA[
|
<object class="GtkCellRendererText" id="list_date_renderer">
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<property name="xpad">6</property>
|
||||||
<interface>
|
|
||||||
<template class="GtkListItem">
|
|
||||||
<property name="child">
|
|
||||||
<object class="GtkFileChooserCell" id="file_chooser_cell">
|
|
||||||
<binding name="position">
|
|
||||||
<lookup name="position">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="item">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<binding name="selected">
|
|
||||||
<lookup name="selected">GtkListItem</lookup>
|
|
||||||
</binding>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox">
|
|
||||||
<property name="spacing">6</property>
|
|
||||||
<binding name="tooltip-text">
|
|
||||||
<closure type="gchararray" function="column_view_get_tooltip_text">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<binding name="label">
|
|
||||||
<closure type="gchararray" function="column_view_get_file_date">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="visible" bind-source="file_chooser_cell" bind-property="show-time" bind-flags="sync-create"/>
|
|
||||||
<binding name="label">
|
|
||||||
<closure type="gchararray" function="column_view_get_file_time">
|
|
||||||
<lookup name="item">GtkListItem</lookup>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
</template>
|
|
||||||
</interface>
|
|
||||||
]]></property>
|
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererText" id="list_time_renderer">
|
||||||
|
<property name="xpad">6</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ project('gtk', 'c',
|
|||||||
meson_version : '>= 0.60.0',
|
meson_version : '>= 0.60.0',
|
||||||
license: 'LGPL-2.1-or-later')
|
license: 'LGPL-2.1-or-later')
|
||||||
|
|
||||||
glib_req = '>= 2.72.0'
|
glib_req = '>= 2.66.0'
|
||||||
pango_req = '>= 1.50.0' # keep this in sync with .gitlab-ci/test-msys.sh
|
pango_req = '>= 1.50.0' # keep this in sync with .gitlab-ci/test-msys.sh
|
||||||
harfbuzz_req = '>= 2.6.0'
|
harfbuzz_req = '>= 2.6.0'
|
||||||
fribidi_req = '>= 0.19.7'
|
fribidi_req = '>= 0.19.7'
|
||||||
|
|||||||
Reference in New Issue
Block a user