Go to the source code of this file.
Defines | |
#define | DT_SPIN_MIN 1 |
#define | DT_SPIN_MAX 16 |
#define | DT_BOX_SPACING 4 |
#define | DT_BOX_PADDING 0 |
Functions | |
void | refresh_hex_datas_entry (heraia_window_t *main_window) |
void | clear_data_type_widgets (heraia_window_t *main_window) |
void | fill_data_type_widgets (heraia_window_t *main_window, data_type_t *a_data_type) |
GList * | is_data_type_name_already_used (GList *data_type_list, gchar *name) |
data_type_t * | new_data_type (gchar *name, guint size) |
void | free_data_type (data_type_t *a_data_type) |
data_type_t * | copy_data_type_struct (heraia_window_t *main_window, data_type_t *a_data_type) |
void | data_type_init_interface (heraia_window_t *main_window) |
void | show_data_type_window (heraia_window_t *main_window, data_type_t *a_data_type) |
void | create_ud_data_interpretor_widgets (heraia_window_t *main_window, data_type_t *a_data_type) |
void | refresh_all_ud_data_interpretor (heraia_window_t *main_window, guint endianness) |
#define DT_BOX_PADDING 0 |
Definition at line 35 of file data_type.h.
Referenced by create_treatment_container_widget(), create_ud_data_interpretor_widgets(), and new_treatment_container().
#define DT_BOX_SPACING 4 |
#define DT_SPIN_MAX 16 |
Definition at line 33 of file data_type.h.
Referenced by dt_size_spinbutton_value_changed(), and set_spinbutton_max_range().
#define DT_SPIN_MIN 1 |
If any changes occurs in the .glade file description one might also do it here
Definition at line 32 of file data_type.h.
Referenced by dt_size_spinbutton_value_changed(), ldt_add_button_clicked(), and set_spinbutton_max_range().
void clear_data_type_widgets | ( | heraia_window_t * | main_window | ) |
data_type_t* copy_data_type_struct | ( | heraia_window_t * | main_window, | |
data_type_t * | a_data_type | |||
) |
Copies the data_type_t structure in a new one, that may be freely freed after use. main_window needed to fill the combobox widget with available treatment list
Here we do not copy the widgets as they will be created on the fly. We copy the list and the treatments
Definition at line 96 of file data_type.c.
References copy_treatment(), create_ud_data_interpretor_widgets(), data_type_t::di_label, data_type_t::name, new_data_type(), new_treatment_container(), data_type_t::size, treatment_container_t::treatment, and data_type_t::treatment_c_list.
Referenced by ldt_edit_button_clicked().
void create_ud_data_interpretor_widgets | ( | heraia_window_t * | main_window, | |
data_type_t * | a_data_type | |||
) |
Creates new user defined widgets for the data interpretor window.
Definition at line 435 of file data_type.c.
References data_type_t::di_entry, data_type_t::di_label, DT_BOX_PADDING, heraia_get_widget(), xml_t::main, and heraia_window_t::xmls.
Referenced by copy_data_type_struct(), dt_ok_button_clicked(), and ldt_add_button_clicked().
void data_type_init_interface | ( | heraia_window_t * | main_window | ) |
Inits the data type window with default values Should be called only once Here we may load a specific file where the user data types are saved
Definition at line 1091 of file data_type.c.
References connect_data_type_signals().
Referenced by load_heraia_ui().
void fill_data_type_widgets | ( | heraia_window_t * | main_window, | |
data_type_t * | a_data_type | |||
) |
Clears data_type window's widgets and sets to default values. Currently UNUSED Fills the data_type window's widgets with values taken from the data_type_list structure
Definition at line 724 of file data_type.c.
References heraia_get_widget(), xml_t::main, data_type_t::name, refresh_hex_datas_entry(), data_type_t::size, and heraia_window_t::xmls.
Referenced by show_data_type_window().
void free_data_type | ( | data_type_t * | a_data_type | ) |
Frees the memory of a particular data_type
Definition at line 77 of file data_type.c.
References data_type_t::name.
Referenced by dt_ok_button_clicked(), and ldt_remove_button_clicked().
GList* is_data_type_name_already_used | ( | GList * | data_type_list, | |
gchar * | name | |||
) |
Says wether name "name" is already in use in "data_type_list" list and returns NULL if not or the list that contains the data_type_t where name was found
Definition at line 764 of file data_type.c.
References data_type_t::name.
Referenced by dt_ok_button_clicked(), ldt_edit_button_clicked(), and ldt_remove_button_clicked().
data_type_t* new_data_type | ( | gchar * | name, | |
guint | size | |||
) |
Returns a new data_type filled with name and size values
Definition at line 49 of file data_type.c.
References data_type_t::di_entry, data_type_t::di_label, data_type_t::name, and data_type_t::size.
Referenced by copy_data_type_struct(), and ldt_add_button_clicked().
void refresh_all_ud_data_interpretor | ( | heraia_window_t * | main_window, | |
guint | endianness | |||
) |
Refreshes all the user data defined types (called when the cursor is moved) Interpretation is done following the endianness 'endianness'
Definition at line 602 of file data_type.c.
References heraia_window_t::current_DW, heraia_window_t::data_type_list, data_type_t::di_entry, ghex_get_data(), new_value_t(), refresh_one_ud_data_interpretor(), and data_type_t::size.
Referenced by refresh_data_interpretor_window().
void refresh_hex_datas_entry | ( | heraia_window_t * | main_window | ) |
Refreshes the "hex_datas_entry" which displays the hex datas extracted from the hexwidget at the cursor position. Endianness is Little Endian for now, we may, at a later time let the user choose its endianness it also places the spin widget value in the current_data_type structure.
Definition at line 653 of file data_type.c.
References heraia_window_t::current_data_type, heraia_window_t::current_DW, data_window_t::current_hexwidget, data_type_t::di_entry, ghex_get_data(), H_DI_LITTLE_ENDIAN, heraia_get_widget(), xml_t::main, new_value_t(), print_bin_to_hex(), data_type_t::size, data_type_t::treatment_c_list, update_treatment_container_list_entries(), and heraia_window_t::xmls.
Referenced by add_treatment_container_widget(), cb_changed_in_treatment_container_widget(), dt_ok_button_clicked(), dt_size_spinbutton_value_changed(), fill_data_type_widgets(), and remove_treatment_container_widget().
void show_data_type_window | ( | heraia_window_t * | main_window, | |
data_type_t * | a_data_type | |||
) |
This constructs, fills and shows the data_type window First I thought doing things with libglade here, but it seems very hard. Same thing applies for GtkBuilder. I think I'll get more flexibility with widgets created on the fly
Definition at line 463 of file data_type.c.
References treatment_container_t::container_box, create_treatment_container_widget(), fill_data_type_widgets(), heraia_get_widget(), log_message(), xml_t::main, new_treatment_container(), set_spinbutton_max_range(), data_type_t::treatment_c_list, and heraia_window_t::xmls.
Referenced by ldt_add_button_clicked(), and ldt_edit_button_clicked().