Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
container.c
Go to the documentation of this file.
1/*
2 * This file is part of Ansel,
3 * Copyright (C) 2026 Aurélien PIERRE.
4 *
5 * Ansel is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * Ansel is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with Ansel. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include "widgets/container.h"
20
21#include "system/macros.h" // IS_NULL_PTR
22
32
42
52
62
63static void _remove_child(GtkWidget *widget, gpointer data)
64{
65 gtk_container_remove((GtkContainer*)data, widget);
66}
67
73
74static void _delete_child(GtkWidget *widget, gpointer data)
75{
76 (void)data; // avoid unreferenced-parameter warning
77 gtk_widget_destroy(widget);
78}
79
85
86// clang-format off
87// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
88// vim: shiftwidth=2 expandtab tabstop=2 cindent
89// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
90// clang-format on
#define FALSE
Definition ashift_lsd.c:158
uint32_t container(dt_lib_module_t *self)
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
Definition colorspaces.h:98
void dt_gui_container_remove_children(GtkContainer *container)
Definition container.c:68
static void _delete_child(GtkWidget *widget, gpointer data)
Definition container.c:74
static void _remove_child(GtkWidget *widget, gpointer data)
Definition container.c:63
int dt_gui_container_num_children(GtkContainer *container)
Definition container.c:33
GtkWidget * dt_gui_container_nth_child(GtkContainer *container, int which)
Definition container.c:53
void dt_gui_container_destroy_children(GtkContainer *container)
Definition container.c:80
gboolean dt_gui_container_has_children(GtkContainer *container)
Definition container.c:23
GtkWidget * dt_gui_container_first_child(GtkContainer *container)
Definition container.c:43
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
Definition macros.h:65