scripts/kconfig/gconf.c
Source file repositories/reference/linux-study-clean/scripts/kconfig/gconf.c
File Facts
- System
- Linux kernel
- Corpus path
scripts/kconfig/gconf.c- Extension
.c- Size
- 36187 bytes
- Lines
- 1357
- Domain
- Support Tooling And Documentation
- Bucket
- scripts
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
stdlib.hlkc.hgtk/gtk.hstdio.hstring.hstrings.hunistd.htime.h
Detected Declarations
enum view_modefunction conf_changedfunction text_insert_msgfunction text_insert_helpfunction _select_menufunction select_menufunction _update_row_visibilityfunction update_row_visibilityfunction set_nodefunction _update_treefunction update_treefunction update_treesfunction set_view_modefunction on_load1_activatefunction on_save_activatefunction on_save_as1_activatefunction on_show_name1_activatefunction on_show_range1_activatefunction on_show_data1_activatefunction on_set_option_mode1_activatefunction on_set_option_mode2_activatefunction on_set_option_mode3_activatefunction on_introduction1_activatefunction on_about1_activatefunction on_license1_activatefunction on_back_clickedfunction on_load_clickedfunction on_save_clickedfunction on_single_clickedfunction on_split_clickedfunction on_full_clickedfunction on_collapse_clickedfunction on_expand_clickedfunction on_window1_destroyfunction on_window1_configurefunction on_window1_delete_eventfunction on_quit1_activatefunction renderer_editedfunction change_sym_valuefunction toggle_sym_valuefunction column2indexfunction on_treeview2_button_press_eventfunction on_treeview2_key_press_eventfunction on_treeview2_cursor_changedfunction on_treeview1_button_press_eventfunction _display_treefunction display_treefunction recreate_tree
Annotated Snippet
if (menu == match) {
GtkTreeSelection *selection;
GtkTreePath *path;
/*
* Expand parents to reflect the selection, and
* scroll down to it.
*/
path = gtk_tree_model_get_path(model, &iter);
gtk_tree_view_expand_to_path(view, path);
gtk_tree_view_scroll_to_cell(view, path, NULL, TRUE,
0.5, 0.0);
gtk_tree_path_free(path);
selection = gtk_tree_view_get_selection(view);
gtk_tree_selection_select_iter(selection, &iter);
text_insert_help(menu);
}
_select_menu(view, model, &iter, match);
valid = gtk_tree_model_iter_next(model, &iter);
}
}
static void select_menu(GtkTreeView *view, struct menu *match)
{
_select_menu(view, gtk_tree_view_get_model(view), NULL, match);
}
static void _update_row_visibility(GtkTreeView *view)
{
GtkTreeModelFilter *filter = GTK_TREE_MODEL_FILTER(gtk_tree_view_get_model(view));
gtk_tree_model_filter_refilter(filter);
}
static void update_row_visibility(void)
{
if (view_mode == SPLIT_VIEW)
_update_row_visibility(GTK_TREE_VIEW(tree1_w));
_update_row_visibility(GTK_TREE_VIEW(tree2_w));
}
static void set_node(GtkTreeStore *tree, GtkTreeIter *node, struct menu *menu)
{
struct symbol *sym = menu->sym;
tristate val;
gchar *option;
const gchar *_no = "";
const gchar *_mod = "";
const gchar *_yes = "";
const gchar *value = "";
GdkRGBA color;
gboolean editable = FALSE;
gboolean btnvis = FALSE;
option = g_strdup_printf("%s %s %s %s",
menu->type == M_COMMENT ? "***" : "",
menu_get_prompt(menu),
menu->type == M_COMMENT ? "***" : "",
sym && !sym_has_value(sym) ? "(NEW)" : "");
gdk_rgba_parse(&color, menu_is_visible(menu) ? "Black" : "DarkGray");
if (!sym)
goto set;
sym_calc_value(sym);
if (menu->type == M_CHOICE) { // parse children to get a final value
struct symbol *def_sym = sym_calc_choice(menu);
struct menu *def_menu = NULL;
for (struct menu *child = menu->list; child; child = child->next) {
if (menu_is_visible(child) && child->sym == def_sym)
def_menu = child;
}
if (def_menu)
value = menu_get_prompt(def_menu);
goto set;
}
switch (sym_get_type(sym)) {
case S_BOOLEAN:
case S_TRISTATE:
Annotation
- Immediate include surface: `stdlib.h`, `lkc.h`, `gtk/gtk.h`, `stdio.h`, `string.h`, `strings.h`, `unistd.h`, `time.h`.
- Detected declarations: `enum view_mode`, `function conf_changed`, `function text_insert_msg`, `function text_insert_help`, `function _select_menu`, `function select_menu`, `function _update_row_visibility`, `function update_row_visibility`, `function set_node`, `function _update_tree`.
- Atlas domain: Support Tooling And Documentation / scripts.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.