atomes 1.1.15
atomes: an atomic scale modeling tool box
|
GTK3/GTK4 utility subroutines, instead of having pre-processor flags everywhere in the code.
Whenever I need to use a GTK function that changed between v3 and v4,
I created an home made function declared in this file, and deal then here with the potential GTK versions issues.
More...
Go to the source code of this file.
Functions | |
void | show_the_widgets (GtkWidget *widg) |
show GtkWidget | |
void | hide_the_widgets (GtkWidget *widg) |
hide GtkWidget | |
void | widget_set_sensitive (GtkWidget *widg, gboolean sensitive) |
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget. | |
void | add_container_child (int type, GtkWidget *widg, GtkWidget *child) |
Add a GtkWidget into another GtkWidget. | |
void | add_box_child_end (GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding) |
Add a GtkWidget in a GtkBox at the end position. | |
void | add_box_child_start (int orientation, GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding) |
Add a GtkWidget in a GtkBox at the initial position. | |
GtkWidget * | new_gtk_window () |
create a new GtkWindow | |
GtkWidget * | create_win (gchar *str, GtkWidget *parent, gboolean modal, gboolean resiz) |
create a new GtkWindow | |
void | run_this_gtk_dialog (GtkWidget *dial, GCallback handler, gpointer data) |
run a GTK (3 and 4) basic GtkDialog | |
GtkWidget * | dialogmodal (gchar *str, GtkWindow *parent) |
Create a new dialog modal window. | |
GtkWidget * | message_dialogmodal (gchar *message, gchar *title, GtkMessageType mtype, GtkButtonsType buttons, GtkWidget *parent) |
create a modal (cannot be ignored) message window | |
GtkWidget * | dialog_cancel_apply (gchar *title, GtkWidget *parent, gboolean resiz) |
create a dialog modal offering a choice to apply something or not | |
void | resize_this_window (GtkWidget *window, int x, int y) |
resize this GtkWindow | |
const gchar * | entry_get_text (GtkEntry *entry) |
get the text in a GtkEntry | |
void | update_entry_int (GtkEntry *entry, int intval) |
update the content of a GtkEntry as int | |
void | update_entry_double (GtkEntry *entry, double doubleval) |
update the content of a GtkEntry as double | |
void | update_entry_long_double (GtkEntry *entry, double doubleval) |
update the content of a GtkEntry as long double | |
void | update_entry_text (GtkEntry *entry, gchar *text) |
update the content of a GtkEntry as string | |
void | text_view_set_monospace (GtkWidget *view) |
set the font of a GtkTextView as monospace | |
void | gtk_label_align (GtkWidget *lab, float ax, float ay) |
set text alignment in a GtkLabel | |
gboolean | is_the_widget_visible (GtkWidget *widg) |
test if a GtkWidget exist, then return if it is visible or not | |
GtkWidget * | create_hscale (float min, float max, float delta, float val, int pos, int round, int size, GCallback handler, GCallback scroll_handler, gpointer data) |
create an horizontal scale GtkWidget | |
GtkWidget * | create_vscale (float min, float max, float delta, float val, int pos, int round, int size, GCallback handler, GCallback scroll_handler, gpointer data) |
create an vertical scale GtkWidget | |
GtkWidget * | create_vbox (int spacing) |
create a GtkBox with vertical orientation | |
GtkWidget * | create_hbox (int spacing) |
create a GtkBox with horizontal orientation | |
GtkWidget * | dialog_get_content_area (GtkWidget *widg) |
prepare GtkWidget to insert content in a GtkDialog window | |
void | layout_add_widget (GtkWidget *layout, GtkWidget *child, int x_pos, int y_pos) |
Add a GtkWidget in a GtkLayout. | |
GtkWidget * | add_vbox_to_layout (GtkWidget *layout, int size_x, int size_y) |
Insert a vertical GtkBox in a GtkLatout then send back the GtkBox. | |
GtkWidget * | create_layout (int x, int y) |
create a GtkLayout / GtkFixed widget | |
void | combo_text_append (GtkWidget *combo, gchar *text) |
append text in GtkComboBox widget | |
void | combo_text_prepend (GtkWidget *combo, gchar *text) |
prepend text in GtkComboBox widget | |
GtkWidget * | create_combo () |
create a GtkCombox widget, note deprecated in GTK4 | |
void | setup_text_tags (GtkTextBuffer *buffer) |
prepare the avialable text tags for the GtkTextBuffer | |
GtkTextBuffer * | add_buffer (GCallback handler, gpointer data, gchar *text) |
create a GtkTextBuffer | |
GtkWidget * | create_text_view (int dimx, int dimy, int edit, int mono, GCallback handler, gpointer data, gchar *text) |
create a GtkTextView and display some text | |
GdkPixbuf * | convert_to_pixbuf (cairo_surface_t *surf) |
convert cairo surface to GdkPixbuf | |
G_MODULE_EXPORT void | to_activate_entry (GtkEventControllerFocus *focus, gpointer data) |
GtkEntry activate signal managment. | |
GtkWidget * | create_entry (GCallback handler, int dim, int cdim, gboolean key_release, gpointer data) |
Create a GtkEntry. | |
GtkWidget * | stock_image (const gchar *stock_id) |
create a GtkImage for the Gtk database | |
GtkWidget * | create_image_from_data (int format, gpointer item_image) |
create Gtk image for data | |
GtkWidget * | markup_label (gchar *text, int dimx, int dimy, float ax, float ay) |
ColRGBA * | duplicate_color (int num, ColRGBA *col) |
duplicate a ColRGBA pointer | |
ColRGBA | gdkrgba_to_rgba (GdkRGBA colgdk) |
convert GdkRGBA color to ColRGBA color | |
GdkRGBA | colrgba_togtkrgba (ColRGBA col) |
convert ColRGBA color to GdkRGBA color | |
void | set_renderer_color (int tocol, GtkCellRenderer *renderer, ColRGBA col) |
set the color of a GtkCellRenderer | |
void | button_set_image (GtkButton *but, gchar *text, int format, gpointer image) |
Add an image to a GtkButton. | |
void | adjust_label (GtkWidget *lab, int dimx, int dimy, float ax, float ay) |
adjust the text position, and widget size of a GtkLabel | |
GtkWidget * | color_button (ColRGBA col, gboolean alpha, int dimx, int dimy, GCallback handler, gpointer data) |
create a color selection button | |
GtkWidget * | font_button (gchar *font, int dimx, int dimy, GCallback handler, gpointer data) |
create a font selection button | |
GtkWidget * | spin_button (GCallback handler, double value, double start, double end, double step, int digits, int dim, gpointer data) |
create a spin button | |
GtkWidget * | check_button (gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data) |
create a check button | |
GtkWidget * | radio_button (gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data) |
create a radio button | |
GtkWidget * | create_button (gchar *text, int image_format, gchar *image, int dimx, int dimy, int relief, GCallback handler, gpointer data) |
create a simple button | |
void | set_image_from_icon_name (GtkWidget *widg, gchar *icon) |
set a image from a stock icon name | |
GtkWidget * | abox (GtkWidget *box, char *lab, int vspace) |
box creating routine, to help design faster elements for the GUI | |
GtkWidget * | bbox (GtkWidget *box, char *lab) |
GtkWidget * | cbox (GtkWidget *box, char *lab) |
GtkWidget * | fbox (GtkWidget *box, char *lab) |
GtkWidget * | create_scroll (GtkWidget *box, int dimx, int dimy, int shadow) |
create a scroll window | |
GtkWidget * | create_expander (gchar *name, gchar *file_img) |
create GtkExpander | |
void | provide_gtk_css (gchar *css) |
create a css provider based on the css data | |
GtkWidget * | destroy_this_widget (GtkWidget *widg) |
destroy a GtkWidget | |
void | destroy_this_dialog (GtkDialog *dialog) |
destroy a GtkDialog | |
void | destroy_this_native_dialog (GtkNativeDialog *dialog) |
destroy a GtkNativeDialog | |
G_MODULE_EXPORT void | run_destroy_dialog (GtkDialog *dialog, gint response_id, gpointer data) |
to destroy a GtkDialog when the dialog emit the closing signal | |
GSList * | file_chooser_get_file_names (GtkFileChooser *chooser) |
create a file list from files selected using a GtkFileChooser | |
gchar * | file_chooser_get_file_name (GtkFileChooser *chooser) |
get a file name from a GtkFileChooser (single file selected) | |
gchar * | file_chooser_get_current_folder (GtkFileChooser *chooser) |
get the current folder for a GtkFileChooser | |
gboolean | file_chooser_set_file_name (GtkFileChooser *chooser, gchar *filename) |
set file name in a GtkFilechooser | |
void | file_chooser_set_current_folder (GtkFileChooser *chooser) |
set current folder in a GtkFilechooser | |
GtkWidget * | create_file_chooser (const gchar *title, GtkWindow *parent, GtkFileChooserAction act, const gchar *act_name) |
create a GtkFileChooser, utility to select file(s) | |
ColRGBA | get_button_color (GtkColorChooser *colob) |
get the ColRGBA color from a GtkColorChooser button | |
ColRGBA | get_window_color (GtkWidget *color_win) |
get the ColRGBA color from a color selection window | |
void | set_color_chooser_color (GtkWidget *color_win, ColRGBA col) |
set the color of a color selection window | |
void | pop_menu_at_pointer (GtkWidget *widg, GdkEvent *event) |
popup a menu at pointer location | |
GtkWidget * | get_top_level (GtkWidget *widg) |
get the top level container, window, of a widget | |
G_MODULE_EXPORT gboolean | destroy_this_window (GtkWidget *win, GdkEvent *event, gpointer data) |
destroy a GtkWindow | |
G_MODULE_EXPORT gboolean | hide_this_window (GtkWidget *win, GdkEvent *event, gpointer data) |
hide a GtkWindow | |
void | add_gtk_close_event (GtkWidget *widg, GCallback handler, gpointer data) |
add a close event signal and callback to a GtkWidget | |
int | get_widget_width (GtkWidget *widg) |
retrive GtkWidget width | |
int | get_widget_height (GtkWidget *widg) |
retrive GtkWidget height | |
GTK3/GTK4 utility subroutines, instead of having pre-processor flags everywhere in the code.
Whenever I need to use a GTK function that changed between v3 and v4,
I created an home made function declared in this file, and deal then here with the potential GTK versions issues.
Definition in file gtk-misc.c.
GtkWidget * abox | ( | GtkWidget * | box, |
char * | lab, | ||
int | vspace ) |
box creating routine, to help design faster elements for the GUI
GtkWidget * bbox (GtkWidget * box, char * lab) GtkWidget * cbox (GtkWidget * box, char * lab) GtkWidget * fbox (GtkWidget * box, char * lab)
Definition at line 1912 of file gtk-misc.c.
void add_box_child_end | ( | GtkWidget * | widg, |
GtkWidget * | child, | ||
gboolean | expand, | ||
gboolean | fill, | ||
int | padding ) |
Add a GtkWidget in a GtkBox at the end position.
widg | the GtkBox |
child | the GtkWidget to add |
expand | GTK3 only: expandable |
fill | GTK3 only: fill |
padding | GTK3 only: box padding |
Definition at line 277 of file gtk-misc.c.
void add_box_child_start | ( | int | orientation, |
GtkWidget * | widg, | ||
GtkWidget * | child, | ||
gboolean | expand, | ||
gboolean | fill, | ||
int | padding ) |
Add a GtkWidget in a GtkBox at the initial position.
orientation | horizontal or vertical |
widg | the GtkBox |
child | the GtkWidget to add |
expand | GTK3 only: expandable |
fill | GTK3 only: fill |
padding | GTK3 only: box padding |
Definition at line 299 of file gtk-misc.c.
GtkTextBuffer * add_buffer | ( | GCallback | handler, |
gpointer | data, | ||
gchar * | text ) |
create a GtkTextBuffer
handler | the callback on buffer changed |
data | the associated data pointer |
text | the text to display |
Definition at line 1171 of file gtk-misc.c.
void add_container_child | ( | int | type, |
GtkWidget * | widg, | ||
GtkWidget * | child ) |
Add a GtkWidget into another GtkWidget.
type | GTK4 only: the type of container |
widg | the container Gtkwidget |
child | the child GtkWidget |
Definition at line 226 of file gtk-misc.c.
void add_gtk_close_event | ( | GtkWidget * | widg, |
GCallback | handler, | ||
gpointer | data ) |
add a close event signal and callback to a GtkWidget
widg | the GtkWidget |
handler | the callback for the close event |
data | the associated data pointer |
Definition at line 2387 of file gtk-misc.c.
GtkWidget * add_vbox_to_layout | ( | GtkWidget * | layout, |
int | size_x, | ||
int | size_y ) |
Insert a vertical GtkBox in a GtkLatout then send back the GtkBox.
layout | the GtkLayout |
size_x | the x size of the box |
size_y | the y size of the box |
Definition at line 864 of file gtk-misc.c.
void adjust_label | ( | GtkWidget * | lab, |
int | dimx, | ||
int | dimy, | ||
float | ax, | ||
float | ay ) |
adjust the text position, and widget size of a GtkLabel
lab | the GtkLabel to adjust |
dimx | the x size |
dimy | the y size |
ax | the x alignment |
ay | the y alignment |
Definition at line 1708 of file gtk-misc.c.
GtkWidget * bbox | ( | GtkWidget * | box, |
char * | lab ) |
Definition at line 1921 of file gtk-misc.c.
void button_set_image | ( | GtkButton * | but, |
gchar * | text, | ||
int | format, | ||
gpointer | image ) |
Add an image to a GtkButton.
but | the GtkButton |
text | the message to display |
format | the image format |
image | the data of the image |
Definition at line 1677 of file gtk-misc.c.
GtkWidget * cbox | ( | GtkWidget * | box, |
char * | lab ) |
Definition at line 1931 of file gtk-misc.c.
GtkWidget * check_button | ( | gchar * | text, |
int | dimx, | ||
int | dimy, | ||
gboolean | state, | ||
GCallback | handler, | ||
gpointer | data ) |
create a check button
text | the message to display |
dimx | the x size |
dimy | the y size |
state | Checked or not (1/0) |
handler | the callback for the button |
data | the associated data pointer |
Definition at line 1799 of file gtk-misc.c.
GtkWidget * color_button | ( | ColRGBA | col, |
gboolean | alpha, | ||
int | dimx, | ||
int | dimy, | ||
GCallback | handler, | ||
gpointer | data ) |
create a color selection button
col | the color to use |
alpha | Use alpha channel (1/0) |
dimx | Size x of the button |
dimy | Size y of the button |
handler | the callback for the button |
data | the associated data pointer |
Definition at line 1728 of file gtk-misc.c.
GdkRGBA colrgba_togtkrgba | ( | ColRGBA | col | ) |
convert ColRGBA color to GdkRGBA color
col | the ColRGBA to convert |
Definition at line 1634 of file gtk-misc.c.
void combo_text_append | ( | GtkWidget * | combo, |
gchar * | text ) |
append text in GtkComboBox widget
combo | the GtkWidget |
text | the text to append |
Definition at line 900 of file gtk-misc.c.
void combo_text_prepend | ( | GtkWidget * | combo, |
gchar * | text ) |
prepend text in GtkComboBox widget
combo | the GtkWidget |
text | the text to prepend |
Definition at line 913 of file gtk-misc.c.
GdkPixbuf * convert_to_pixbuf | ( | cairo_surface_t * | surf | ) |
convert cairo surface to GdkPixbuf
surf | the cairo sufrace to convert |
Definition at line 1264 of file gtk-misc.c.
GtkWidget * create_button | ( | gchar * | text, |
int | image_format, | ||
gchar * | image, | ||
int | dimx, | ||
int | dimy, | ||
int | relief, | ||
GCallback | handler, | ||
gpointer | data ) |
create a simple button
text | the message to display |
image_format | the image format |
image | the name of the stock image |
dimx | the x size |
dimy | the y size |
relief | button should appear pressed or not (1/0) |
handler | the callback for the button |
data | the associated data pointer |
Definition at line 1863 of file gtk-misc.c.
GtkWidget * create_combo | ( | ) |
create a GtkCombox widget, note deprecated in GTK4
Definition at line 923 of file gtk-misc.c.
GtkWidget * create_entry | ( | GCallback | handler, |
int | dim, | ||
int | cdim, | ||
gboolean | key_release, | ||
gpointer | data ) |
Create a GtkEntry.
handler | the callback |
dim | the x size |
cdim | the maximum number of character to display |
key_release | Use release event (1/0) |
data | the data pointer for the callback |
Definition at line 1314 of file gtk-misc.c.
GtkWidget * create_expander | ( | gchar * | name, |
gchar * | file_img ) |
create GtkExpander
name | Name of the expander tab |
file_img | image file to add if required |
Definition at line 1984 of file gtk-misc.c.
GtkWidget * create_file_chooser | ( | const gchar * | title, |
GtkWindow * | parent, | ||
GtkFileChooserAction | act, | ||
const gchar * | act_name ) |
create a GtkFileChooser, utility to select file(s)
title | the title of the window |
parent | the parent window, if any |
act | the action to perform (read or write) |
act_name | the action name to display |
Definition at line 2223 of file gtk-misc.c.
GtkWidget * create_hbox | ( | int | spacing | ) |
create a GtkBox with horizontal orientation
spacing | spacing between elements |
Definition at line 813 of file gtk-misc.c.
GtkWidget * create_hscale | ( | float | min, |
float | max, | ||
float | delta, | ||
float | val, | ||
int | pos, | ||
int | round, | ||
int | size, | ||
GCallback | handler, | ||
GCallback | scroll_handler, | ||
gpointer | data ) |
create an horizontal scale GtkWidget
min | Min value for the h scale |
max | Max value for the h scale |
delta | the step on the h scale |
val | the value to position to set on the h scale |
pos | the location where the value is on display |
round | the rounding digit for the value on display |
size | the x size of the GtkWdiget |
handler | the callback to move the h scale |
scroll_handler | the callback on mouse scroll |
data | the associated data pointer |
Definition at line 744 of file gtk-misc.c.
GtkWidget * create_image_from_data | ( | int | format, |
gpointer | item_image ) |
create Gtk image for data
format | Image format |
item_image | the data to create the image |
Definition at line 1443 of file gtk-misc.c.
GtkWidget * create_layout | ( | int | x, |
int | y ) |
create a GtkLayout / GtkFixed widget
x | the x size of the widget |
y | the y size of the widget |
Definition at line 880 of file gtk-misc.c.
GtkWidget * create_scroll | ( | GtkWidget * | box, |
int | dimx, | ||
int | dimy, | ||
int | shadow ) |
create a scroll window
box | the box to insert the scroll window in, if any |
dimx | the x size of the widget |
dimy | the x size of the widget |
shadow | Add shadow (1/0) |
Definition at line 1960 of file gtk-misc.c.
GtkWidget * create_text_view | ( | int | dimx, |
int | dimy, | ||
int | edit, | ||
int | mono, | ||
GCallback | handler, | ||
gpointer | data, | ||
gchar * | text ) |
create a GtkTextView and display some text
dimx | the x size of the GtkTextView |
dimy | the y size of the GtkTextView |
edit | Is the text view editable (1/0) |
mono | Use monospace font (1/0) |
handler | the callback on buffer changed |
data | the associated data pointer |
text | the text to display |
Definition at line 1199 of file gtk-misc.c.
GtkWidget * create_vbox | ( | int | spacing | ) |
create a GtkBox with vertical orientation
spacing | spacing between elements |
Definition at line 801 of file gtk-misc.c.
GtkWidget * create_vscale | ( | float | min, |
float | max, | ||
float | delta, | ||
float | val, | ||
int | pos, | ||
int | round, | ||
int | size, | ||
GCallback | handler, | ||
GCallback | scroll_handler, | ||
gpointer | data ) |
create an vertical scale GtkWidget
min | Min value for the v scale |
max | Max value for the v scale |
delta | the step on the v scale |
val | the value to position to set on the h scale |
pos | the location where the value is on display |
round | the rounding digit for the value on display |
size | the x size of the GtkWdiget |
handler | the callback to move the v scale |
scroll_handler | the callback on mouse scroll |
data | the associated data pointer |
Definition at line 778 of file gtk-misc.c.
GtkWidget * create_win | ( | gchar * | str, |
GtkWidget * | parent, | ||
gboolean | modal, | ||
gboolean | resiz ) |
create a new GtkWindow
str | Title |
parent | Parent GtkWidget (if any) |
modal | Modal (TRUE/FALSE) |
resiz | Can be re-sized (TRUE/FALSE) |
Definition at line 445 of file gtk-misc.c.
void destroy_this_dialog | ( | GtkDialog * | dialog | ) |
destroy a GtkDialog
dialog | the GtkDialog to destroy |
Definition at line 2065 of file gtk-misc.c.
void destroy_this_native_dialog | ( | GtkNativeDialog * | dialog | ) |
destroy a GtkNativeDialog
dialog | the GtkNativeDialog to destroy |
Definition at line 2084 of file gtk-misc.c.
GtkWidget * destroy_this_widget | ( | GtkWidget * | widg | ) |
destroy a GtkWidget
widg | the GtkWidget to destroy |
Definition at line 2034 of file gtk-misc.c.
G_MODULE_EXPORT gboolean destroy_this_window | ( | GtkWidget * | win, |
GdkEvent * | event, | ||
gpointer | data ) |
destroy a GtkWindow
win | the GtkWindow to destroy |
event | the GdkEvent triggering the signal |
data | the associated data pointer |
Definition at line 2344 of file gtk-misc.c.
GtkWidget * dialog_cancel_apply | ( | gchar * | title, |
GtkWidget * | parent, | ||
gboolean | resiz ) |
create a dialog modal offering a choice to apply something or not
title | the message |
parent | the parent window, if any |
resiz | Is the new window re-sizable ? |
Definition at line 561 of file gtk-misc.c.
GtkWidget * dialog_get_content_area | ( | GtkWidget * | widg | ) |
prepare GtkWidget to insert content in a GtkDialog window
widg | the GtkDialog window |
Definition at line 825 of file gtk-misc.c.
GtkWidget * dialogmodal | ( | gchar * | str, |
GtkWindow * | parent ) |
Create a new dialog modal window.
str | Title |
parent | Parent GtkWindow, if any |
Definition at line 510 of file gtk-misc.c.
duplicate a ColRGBA pointer
num | Size of the pointer |
col | ColRGBA pointer to duplicate |
Definition at line 1602 of file gtk-misc.c.
const gchar * entry_get_text | ( | GtkEntry * | entry | ) |
GtkWidget * fbox | ( | GtkWidget * | box, |
char * | lab ) |
Definition at line 1941 of file gtk-misc.c.
gchar * file_chooser_get_current_folder | ( | GtkFileChooser * | chooser | ) |
get the current folder for a GtkFileChooser
chooser | the GtkFilechooser |
Definition at line 2152 of file gtk-misc.c.
gchar * file_chooser_get_file_name | ( | GtkFileChooser * | chooser | ) |
get a file name from a GtkFileChooser (single file selected)
chooser | the GtkFilechooser |
Definition at line 2136 of file gtk-misc.c.
GSList * file_chooser_get_file_names | ( | GtkFileChooser * | chooser | ) |
create a file list from files selected using a GtkFileChooser
Definition at line 2123 of file gtk-misc.c.
void file_chooser_set_current_folder | ( | GtkFileChooser * | chooser | ) |
set current folder in a GtkFilechooser
chooser | the GtkFilechooser |
Definition at line 2188 of file gtk-misc.c.
gboolean file_chooser_set_file_name | ( | GtkFileChooser * | chooser, |
gchar * | filename ) |
set file name in a GtkFilechooser
chooser | the GtkFilechooser |
filename | the file name to appear in the GtkFilechooser |
Definition at line 2169 of file gtk-misc.c.
GtkWidget * font_button | ( | gchar * | font, |
int | dimx, | ||
int | dimy, | ||
GCallback | handler, | ||
gpointer | data ) |
create a font selection button
font | the font to use |
dimx | Size x of the button |
dimy | Size y of the button |
handler | the callback for the button |
data | the associated data pointer |
Definition at line 1750 of file gtk-misc.c.
ColRGBA gdkrgba_to_rgba | ( | GdkRGBA | colgdk | ) |
convert GdkRGBA color to ColRGBA color
colgdk | the GdkRGBA to convert |
Definition at line 1617 of file gtk-misc.c.
ColRGBA get_button_color | ( | GtkColorChooser * | colob | ) |
get the ColRGBA color from a GtkColorChooser button
colob | the GtkColorChooser button |
Definition at line 2236 of file gtk-misc.c.
GtkWidget * get_top_level | ( | GtkWidget * | widg | ) |
get the top level container, window, of a widget
widg | the GtkWidget |
Definition at line 2315 of file gtk-misc.c.
int get_widget_height | ( | GtkWidget * | widg | ) |
int get_widget_width | ( | GtkWidget * | widg | ) |
ColRGBA get_window_color | ( | GtkWidget * | color_win | ) |
get the ColRGBA color from a color selection window
color_win | the color selection window |
Definition at line 2250 of file gtk-misc.c.
void gtk_label_align | ( | GtkWidget * | lab, |
float | ax, | ||
float | ay ) |
set text alignment in a GtkLabel
lab | the GtkLabel |
ax | the x alignment |
ay | the Y alignment |
Definition at line 701 of file gtk-misc.c.
void hide_the_widgets | ( | GtkWidget * | widg | ) |
G_MODULE_EXPORT gboolean hide_this_window | ( | GtkWidget * | win, |
GdkEvent * | event, | ||
gpointer | data ) |
hide a GtkWindow
win | the GtkWindow to hide |
event | the GdkEvent triggering the signal |
data | the associated data pointer |
Definition at line 2371 of file gtk-misc.c.
gboolean is_the_widget_visible | ( | GtkWidget * | widg | ) |
test if a GtkWidget exist, then return if it is visible or not
widg | the GtkWidget |
Definition at line 714 of file gtk-misc.c.
void layout_add_widget | ( | GtkWidget * | layout, |
GtkWidget * | child, | ||
int | x_pos, | ||
int | y_pos ) |
Add a GtkWidget in a GtkLayout.
layout | the GtkLayout |
child | the GtkWidget to insert |
x_pos | the x position to insert at |
y_pos | the y position to insert at |
Definition at line 846 of file gtk-misc.c.
GtkWidget * markup_label | ( | gchar * | text, |
int | dimx, | ||
int | dimy, | ||
float | ax, | ||
float | ay ) |
Definition at line 1585 of file gtk-misc.c.
GtkWidget * message_dialogmodal | ( | gchar * | message, |
gchar * | title, | ||
GtkMessageType | mtype, | ||
GtkButtonsType | buttons, | ||
GtkWidget * | parent ) |
create a modal (cannot be ignored) message window
message | the message |
title | the title |
mtype | the message type |
buttons | the type of closing button to add |
parent | the parent window, if any |
Definition at line 531 of file gtk-misc.c.
GtkWidget * new_gtk_window | ( | ) |
create a new GtkWindow
Definition at line 348 of file gtk-misc.c.
void pop_menu_at_pointer | ( | GtkWidget * | widg, |
GdkEvent * | event ) |
popup a menu at pointer location
widg | the menu to popup |
event | the GdkEvent triggering the signal |
Definition at line 2301 of file gtk-misc.c.
void provide_gtk_css | ( | gchar * | css | ) |
create a css provider based on the css data
css | the css data, use the name of the variable to use the css |
Definition at line 2006 of file gtk-misc.c.
GtkWidget * radio_button | ( | gchar * | text, |
int | dimx, | ||
int | dimy, | ||
gboolean | state, | ||
GCallback | handler, | ||
gpointer | data ) |
create a radio button
text | the message to display |
dimx | the x size |
dimy | the y size |
state | Checked or not (1/0) |
handler | the callback for the button |
data | the associated data pointer |
Definition at line 1834 of file gtk-misc.c.
void resize_this_window | ( | GtkWidget * | window, |
int | x, | ||
int | y ) |
resize this GtkWindow
window | the GtkWidget to resize |
x | the x size |
y | the y size |
Definition at line 581 of file gtk-misc.c.
G_MODULE_EXPORT void run_destroy_dialog | ( | GtkDialog * | dialog, |
gint | response_id, | ||
gpointer | data ) |
to destroy a GtkDialog when the dialog emit the closing signal
dialog | the GtkDialog to destroy |
response_id | the response id |
data | the associated data pointer |
Definition at line 2102 of file gtk-misc.c.
void run_this_gtk_dialog | ( | GtkWidget * | dial, |
GCallback | handler, | ||
gpointer | data ) |
run a GTK (3 and 4) basic GtkDialog
dial | the GtkDialog |
handler | the callback |
data | the associated data pointer |
Definition at line 492 of file gtk-misc.c.
void set_color_chooser_color | ( | GtkWidget * | color_win, |
ColRGBA | col ) |
set the color of a color selection window
color_win | the color selection window |
col | the color to use |
Definition at line 2265 of file gtk-misc.c.
void set_image_from_icon_name | ( | GtkWidget * | widg, |
gchar * | icon ) |
set a image from a stock icon name
widg | the GtkImage to modify |
icon | the name of the stock icon |
Definition at line 1894 of file gtk-misc.c.
void set_renderer_color | ( | int | tocol, |
GtkCellRenderer * | renderer, | ||
ColRGBA | col ) |
set the color of a GtkCellRenderer
tocol | Apply color (1/0) |
renderer | the GtkCellRenderer |
col | the color to apply |
Definition at line 1653 of file gtk-misc.c.
void setup_text_tags | ( | GtkTextBuffer * | buffer | ) |
prepare the avialable text tags for the GtkTextBuffer
buffer | the GtkTextBuffer |
Definition at line 935 of file gtk-misc.c.
void show_the_widgets | ( | GtkWidget * | widg | ) |
GtkWidget * spin_button | ( | GCallback | handler, |
double | value, | ||
double | start, | ||
double | end, | ||
double | step, | ||
int | digits, | ||
int | dim, | ||
gpointer | data ) |
create a spin button
handler | the callback for the button |
value | Initial value for the spin button |
start | Minimum value |
end | Maximum value |
step | Step between values |
digits | Number of digits displayed |
dim | Size x of the button |
data | the associated data pointer |
Definition at line 1772 of file gtk-misc.c.
GtkWidget * stock_image | ( | const gchar * | stock_id | ) |
create a GtkImage for the Gtk database
stock_id |
Definition at line 1364 of file gtk-misc.c.
void text_view_set_monospace | ( | GtkWidget * | view | ) |
set the font of a GtkTextView as monospace
view | the GtkTextView |
Definition at line 687 of file gtk-misc.c.
G_MODULE_EXPORT void to_activate_entry | ( | GtkEventControllerFocus * | focus, |
gpointer | data ) |
GtkEntry activate signal managment.
focus | Focus event controller |
data | the associated data pointer |
Definition at line 1297 of file gtk-misc.c.
void update_entry_double | ( | GtkEntry * | entry, |
double | doubleval ) |
update the content of a GtkEntry as double
entry | the GtkEntry |
doubleval | the new double value to display |
Definition at line 633 of file gtk-misc.c.
void update_entry_int | ( | GtkEntry * | entry, |
int | intval ) |
update the content of a GtkEntry as int
entry | the GtkEntry |
intval | the new int value to display |
Definition at line 614 of file gtk-misc.c.
void update_entry_long_double | ( | GtkEntry * | entry, |
double | doubleval ) |
update the content of a GtkEntry as long double
entry | the GtkEntry |
doubleval | the new long double value to display |
Definition at line 652 of file gtk-misc.c.
void update_entry_text | ( | GtkEntry * | entry, |
gchar * | text ) |
update the content of a GtkEntry as string
entry | the GtkEntry |
text | the new string to display |
Definition at line 671 of file gtk-misc.c.
void widget_set_sensitive | ( | GtkWidget * | widg, |
gboolean | sensitive ) |
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
widg | the GtkWidget |
sensitive | Sensitivity |
Definition at line 206 of file gtk-misc.c.