NetSurf
|
Compatibility functions for older GTK versions implementation. More...
Go to the source code of this file.
Functions | |
void | nsgtk_widget_set_can_focus (GtkWidget *widget, gboolean can_focus) |
gboolean | nsgtk_widget_has_focus (GtkWidget *widget) |
gboolean | nsgtk_widget_get_visible (GtkWidget *widget) |
gboolean | nsgtk_widget_get_realized (GtkWidget *widget) |
gboolean | nsgtk_widget_get_mapped (GtkWidget *widget) |
gboolean | nsgtk_widget_is_drawable (GtkWidget *widget) |
void | nsgtk_dialog_set_has_separator (GtkDialog *dialog, gboolean setting) |
GtkWidget * | nsgtk_combo_box_text_new (void) |
void | nsgtk_combo_box_text_append_text (GtkWidget *combo_box, const gchar *text) |
gchar * | nsgtk_combo_box_text_get_active_text (GtkWidget *combo_box) |
GtkWidget * | nsgtk_entry_new (void) |
void | nsgtk_entry_set_icon_from_pixbuf (GtkWidget *entry, GtkEntryIconPosition icon_pos, GdkPixbuf *pixbuf) |
void | nsgtk_entry_set_icon_from_icon_name (GtkWidget *entry, GtkEntryIconPosition icon_pos, const gchar *id) |
Sets the icon shown in the entry at the specified position from an icon name. More... | |
GtkWidget * | nsgtk_image_new_from_stock (const gchar *id, GtkIconSize size) |
Creates a GtkImage displaying a stock icon. More... | |
GtkWidget * | nsgtk_button_new_from_stock (const gchar *stock_id) |
Creates a new GtkButton containing the image and text from a stock item. More... | |
void | nsgtk_button_set_focus_on_click (GtkButton *button, gboolean focus_on_click) |
Sets whether the button will grab focus when it is clicked with the mouse. More... | |
gboolean | nsgtk_stock_lookup (const gchar *stock_id, GtkStockItem *item) |
Fills item with the registered values for stock_id. More... | |
void | nsgtk_widget_override_background_color (GtkWidget *widget, GtkStateFlags state, uint16_t a, uint16_t r, uint16_t g, uint16_t b) |
GtkAdjustment * | nsgtk_layout_get_vadjustment (GtkLayout *layout) |
GtkAdjustment * | nsgtk_layout_get_hadjustment (GtkLayout *layout) |
static void | nsgtk_layout_set_adjustment_step_increment (GtkAdjustment *adj, int value) |
void | nsgtk_layout_set_hadjustment (GtkLayout *layout, GtkAdjustment *adj) |
void | nsgtk_layout_set_vadjustment (GtkLayout *layout, GtkAdjustment *adj) |
GtkWidget * | nsgtk_hbox_new (gboolean homogeneous, gint spacing) |
GtkWidget * | nsgtk_vbox_new (gboolean homogeneous, gint spacing) |
GtkStateFlags | nsgtk_widget_get_state_flags (GtkWidget *widget) |
GtkStyleContext * | nsgtk_widget_get_style_context (GtkWidget *widget) |
const PangoFontDescription * | nsgtk_style_context_get_font (GtkStyleContext *style, GtkStateFlags state) |
gulong | nsgtk_connect_draw_event (GtkWidget *widget, GCallback callback, gpointer g) |
void | nsgdk_cursor_unref (GdkCursor *cursor) |
void | nsgtk_widget_modify_font (GtkWidget *widget, PangoFontDescription *font_desc) |
GdkWindow * | nsgtk_widget_get_window (GtkWidget *widget) |
GtkWidget * | nsgtk_dialog_get_content_area (GtkDialog *dialog) |
gboolean | nsgtk_show_uri (GdkScreen *screen, const gchar *uri, guint32 timestamp, GError **error) |
GdkWindow * | nsgtk_layout_get_bin_window (GtkLayout *layout) |
gdouble | nsgtk_adjustment_get_step_increment (GtkAdjustment *adjustment) |
gdouble | nsgtk_adjustment_get_upper (GtkAdjustment *adjustment) |
gdouble | nsgtk_adjustment_get_lower (GtkAdjustment *adjustment) |
gdouble | nsgtk_adjustment_get_page_increment (GtkAdjustment *adjustment) |
void | nsgtk_widget_get_allocation (GtkWidget *widget, GtkAllocation *allocation) |
GtkWidget * | nsgtk_image_new_from_pixbuf_icon (GdkPixbuf *pixbuf, GtkIconSize size) |
creates a new image widget of an appropriate icon size from a pixbuf. More... | |
void | nsgtk_window_set_opacity (GtkWindow *window, gdouble opacity) |
void | nsgtk_scrolled_window_add_with_viewport (GtkScrolledWindow *window, GtkWidget *child) |
GtkWidget * | nsgtk_image_menu_item_new_with_mnemonic (const gchar *label) |
Creates a new GtkImageMenuItem containing a label. More... | |
void | nsgtk_image_menu_item_set_image (GtkWidget *image_menu_item, GtkWidget *image) |
Sets the image of image_menu_item to the given widget. More... | |
void | nsgtk_menu_popup_at_pointer (GtkMenu *menu, const GdkEvent *trigger_event) |
Displays menu and makes it available for selection. More... | |
gboolean | nsgtk_icon_size_lookup_for_settings (GtkSettings *settings, GtkIconSize size, gint *width, gint *height) |
void | nsgtk_widget_set_alignment (GtkWidget *widget, GtkAlign halign, GtkAlign valign) |
Set the alignment of a widget. More... | |
void | nsgtk_widget_set_margins (GtkWidget *widget, gint hmargin, gint vmargin) |
Set the margins of a widget. More... | |
guint | nsgtk_builder_add_from_resource (GtkBuilder *builder, const gchar *resource_path, GError **error) |
Parses a resource file containing a GtkBuilder UI definition and merges it with the current contents of builder. More... | |
Compatibility functions for older GTK versions implementation.
Definition in file compat.c.
void nsgdk_cursor_unref | ( | GdkCursor * | cursor | ) |
Definition at line 384 of file compat.c.
Referenced by gui_window_set_pointer().
gdouble nsgtk_adjustment_get_lower | ( | GtkAdjustment * | adjustment | ) |
Definition at line 471 of file compat.c.
Referenced by nsgtk_cw_key(), nsgtk_window_keypress_event(), and nsgtk_window_scroll_event().
gdouble nsgtk_adjustment_get_page_increment | ( | GtkAdjustment * | adjustment | ) |
Definition at line 480 of file compat.c.
Referenced by nsgtk_cw_key(), and nsgtk_window_keypress_event().
gdouble nsgtk_adjustment_get_step_increment | ( | GtkAdjustment * | adjustment | ) |
Definition at line 453 of file compat.c.
Referenced by nsgtk_cw_key(), nsgtk_window_keypress_event(), and nsgtk_window_scroll_event().
gdouble nsgtk_adjustment_get_upper | ( | GtkAdjustment * | adjustment | ) |
Definition at line 462 of file compat.c.
Referenced by nsgtk_cw_key(), nsgtk_window_keypress_event(), and nsgtk_window_scroll_event().
guint nsgtk_builder_add_from_resource | ( | GtkBuilder * | builder, |
const gchar * | resource_path, | ||
GError ** | error | ||
) |
Parses a resource file containing a GtkBuilder UI definition and merges it with the current contents of builder.
Compatability interface as this did not exist prior to GTK 3.4
GTK prior to 3.4 can have the resources in a GResource but gtk_builder cannot directly instantiate from them
GTK 3.4 onwards can use gtk_builder_add_from_resource() to add directly from resources. The gtk_builder_new_ type operations cannot be used because they are only available post 3.10 and handle all errors by aborting the application
builder | a GtkBuilder |
resource_path | the path of the resource file to parse |
error | return location for an error, or NULL. |
Definition at line 646 of file compat.c.
References buffer.
Referenced by nsgtk_builder_new_from_resname().
GtkWidget * nsgtk_button_new_from_stock | ( | const gchar * | stock_id | ) |
void nsgtk_button_set_focus_on_click | ( | GtkButton * | button, |
gboolean | focus_on_click | ||
) |
Sets whether the button will grab focus when it is clicked with the mouse.
Compatability interface for original deprecated in GTK 3.20
button | The button alter |
focus_on_click | whether the button grabs focus when clicked with the mouse |
Definition at line 219 of file compat.c.
Referenced by nsgtk_tab_label_setup().
void nsgtk_combo_box_text_append_text | ( | GtkWidget * | combo_box, |
const gchar * | text | ||
) |
gchar * nsgtk_combo_box_text_get_active_text | ( | GtkWidget * | combo_box | ) |
gulong nsgtk_connect_draw_event | ( | GtkWidget * | widget, |
GCallback | callback, | ||
gpointer | g | ||
) |
Definition at line 373 of file compat.c.
Referenced by gui_window_create(), and nsgtk_corewindow_init().
GtkWidget * nsgtk_dialog_get_content_area | ( | GtkDialog * | dialog | ) |
Definition at line 413 of file compat.c.
References dialog.
Referenced by nsgtk_about_dialog_init(), and nsgtk_viewdata_file_save().
void nsgtk_dialog_set_has_separator | ( | GtkDialog * | dialog, |
gboolean | setting | ||
) |
Definition at line 105 of file compat.c.
References dialog.
Referenced by nsgtk_about_dialog_init().
GtkWidget * nsgtk_entry_new | ( | void | ) |
Definition at line 142 of file compat.c.
References sexy_icon_entry_new().
Referenced by make_toolbar_item_url_bar(), and make_toolbar_item_websearch().
void nsgtk_entry_set_icon_from_icon_name | ( | GtkWidget * | entry, |
GtkEntryIconPosition | icon_pos, | ||
const gchar * | stock_id | ||
) |
Sets the icon shown in the entry at the specified position from an icon name.
Compatability interface for original introduced in 2.16
entry | The entry widget to set the icon on. |
icon_pos | The position of the icon. |
stock_id | the name of the stock item. |
Definition at line 173 of file compat.c.
References SEXY_ICON_ENTRY, and sexy_icon_entry_set_icon().
Referenced by make_toolbar_item_url_bar(), make_toolbar_item_websearch(), nsgtk_toolbar_page_info_change(), and nsgtk_toolbar_set_websearch_image().
void nsgtk_entry_set_icon_from_pixbuf | ( | GtkWidget * | entry, |
GtkEntryIconPosition | icon_pos, | ||
GdkPixbuf * | pixbuf | ||
) |
Definition at line 151 of file compat.c.
References SEXY_ICON_ENTRY, and sexy_icon_entry_set_icon().
Referenced by make_toolbar_item_websearch(), and nsgtk_toolbar_set_websearch_image().
GtkWidget * nsgtk_hbox_new | ( | gboolean | homogeneous, |
gint | spacing | ||
) |
Definition at line 317 of file compat.c.
Referenced by nsgtk_tab_add_newtab(), and nsgtk_tab_label_setup().
gboolean nsgtk_icon_size_lookup_for_settings | ( | GtkSettings * | settings, |
GtkIconSize | size, | ||
gint * | width, | ||
gint * | height | ||
) |
GtkWidget * nsgtk_image_menu_item_new_with_mnemonic | ( | const gchar * | label | ) |
Creates a new GtkImageMenuItem containing a label.
Compatability interface for original deprecated in GTK 3.10.
label | The text of the button, with an underscore in front of the mnemonic character. |
Definition at line 543 of file compat.c.
Referenced by nsgtk_menu_add_image_item().
void nsgtk_image_menu_item_set_image | ( | GtkWidget * | image_menu_item, |
GtkWidget * | image | ||
) |
Sets the image of image_menu_item to the given widget.
Compatability interface for original deprecated in GTK 3.10.
image_menu_item | The image menu entry item. |
image | The image to set. |
Definition at line 553 of file compat.c.
Referenced by nsgtk_menu_set_icons().
GtkWidget * nsgtk_image_new_from_pixbuf_icon | ( | GdkPixbuf * | pixbuf, |
GtkIconSize | size | ||
) |
creates a new image widget of an appropriate icon size from a pixbuf.
pixbuf | The pixbuf to use as a source. |
size | The size of icon to create |
Definition at line 502 of file compat.c.
Referenced by nsgtk_about_dialog_init().
GtkWidget * nsgtk_image_new_from_stock | ( | const gchar * | stock_id, |
GtkIconSize | size | ||
) |
Creates a GtkImage displaying a stock icon.
Compatability interface for original deprecated in GTK 3.10
stock_id | the name of the stock item. |
size | The size of icon to create. |
Definition at line 198 of file compat.c.
Referenced by nsgtk_download_dialog_show(), nsgtk_tab_label_setup(), and sexy_icon_entry_add_clear_button().
GdkWindow * nsgtk_layout_get_bin_window | ( | GtkLayout * | layout | ) |
Definition at line 444 of file compat.c.
Referenced by gui_window_create(), and nsgtk_window_draw_event().
GtkAdjustment * nsgtk_layout_get_hadjustment | ( | GtkLayout * | layout | ) |
Definition at line 278 of file compat.c.
Referenced by gui_window_get_scroll(), gui_window_set_scroll(), nsgtk_window_keypress_event(), and nsgtk_window_scroll_event().
GtkAdjustment * nsgtk_layout_get_vadjustment | ( | GtkLayout * | layout | ) |
Definition at line 269 of file compat.c.
Referenced by gui_window_get_scroll(), gui_window_set_scroll(), nsgtk_window_keypress_event(), and nsgtk_window_scroll_event().
|
static |
Definition at line 287 of file compat.c.
Referenced by nsgtk_layout_set_hadjustment(), and nsgtk_layout_set_vadjustment().
void nsgtk_layout_set_hadjustment | ( | GtkLayout * | layout, |
GtkAdjustment * | adj | ||
) |
Definition at line 297 of file compat.c.
References nsgtk_layout_set_adjustment_step_increment().
void nsgtk_layout_set_vadjustment | ( | GtkLayout * | layout, |
GtkAdjustment * | adj | ||
) |
Definition at line 307 of file compat.c.
References nsgtk_layout_set_adjustment_step_increment().
void nsgtk_menu_popup_at_pointer | ( | GtkMenu * | menu, |
const GdkEvent * | trigger_event | ||
) |
Displays menu and makes it available for selection.
Compatability interface for gtk_menu_popup deprecated in GTK 3.22.
image_menu_item | The image menu entry item. |
trigger_event | the GdkEvent that initiated this request or NULL if it's the current event. |
Definition at line 561 of file compat.c.
Referenced by gui_window_create_form_select_menu(), nsgtk_scaffolding_burger_menu(), nsgtk_scaffolding_context_menu(), and nsgtk_scaffolding_toolbar_context_menu().
void nsgtk_scrolled_window_add_with_viewport | ( | GtkScrolledWindow * | window, |
GtkWidget * | child | ||
) |
gboolean nsgtk_show_uri | ( | GdkScreen * | screen, |
const gchar * | uri, | ||
guint32 | timestamp, | ||
GError ** | error | ||
) |
Definition at line 426 of file compat.c.
References nsgtk_current_scaffolding(), nsgtk_scaffolding_window(), and parent.
Referenced by gui_launch_url().
gboolean nsgtk_stock_lookup | ( | const gchar * | stock_id, |
GtkStockItem * | item | ||
) |
const PangoFontDescription * nsgtk_style_context_get_font | ( | GtkStyleContext * | style, |
GtkStateFlags | state | ||
) |
Definition at line 357 of file compat.c.
Referenced by nsgtk_tab_update_size().
GtkWidget * nsgtk_vbox_new | ( | gboolean | homogeneous, |
gint | spacing | ||
) |
Definition at line 326 of file compat.c.
Referenced by nsgtk_about_dialog_init().
void nsgtk_widget_get_allocation | ( | GtkWidget * | widget, |
GtkAllocation * | allocation | ||
) |
Definition at line 489 of file compat.c.
Referenced by gui_window_get_dimensions(), nsgtk_toolbar_get_icon_window_position(), nsgtk_window_keypress_event(), and nsgtk_window_scroll_event().
gboolean nsgtk_widget_get_mapped | ( | GtkWidget * | widget | ) |
Definition at line 87 of file compat.c.
Referenced by sexy_icon_entry_map(), and sexy_icon_entry_unmap().
gboolean nsgtk_widget_get_realized | ( | GtkWidget * | widget | ) |
Definition at line 78 of file compat.c.
Referenced by draw_icon(), sexy_icon_entry_map(), and sexy_icon_entry_size_allocate().
GtkStateFlags nsgtk_widget_get_state_flags | ( | GtkWidget * | widget | ) |
Definition at line 335 of file compat.c.
Referenced by nsgtk_tab_update_size().
GtkStyleContext * nsgtk_widget_get_style_context | ( | GtkWidget * | widget | ) |
Definition at line 348 of file compat.c.
Referenced by nsgtk_tab_update_size().
gboolean nsgtk_widget_get_visible | ( | GtkWidget * | widget | ) |
Definition at line 69 of file compat.c.
Referenced by nsgtk_download_update().
GdkWindow * nsgtk_widget_get_window | ( | GtkWidget * | widget | ) |
Definition at line 404 of file compat.c.
Referenced by gui_window_set_pointer(), and nsgtk_cw_draw_event().
gboolean nsgtk_widget_is_drawable | ( | GtkWidget * | widget | ) |
Definition at line 96 of file compat.c.
Referenced by sexy_icon_entry_expose().
void nsgtk_widget_modify_font | ( | GtkWidget * | widget, |
PangoFontDescription * | font_desc | ||
) |
Definition at line 393 of file compat.c.
Referenced by window_init().
void nsgtk_widget_override_background_color | ( | GtkWidget * | widget, |
GtkStateFlags | state, | ||
uint16_t | a, | ||
uint16_t | r, | ||
uint16_t | g, | ||
uint16_t | b | ||
) |
Definition at line 240 of file compat.c.
Referenced by gui_window_create(), and nsgtk_corewindow_init().
Set the alignment of a widget.
sets both the horizontal and vertical alignement of a widget
widget | The widget to set alignent on. |
halign | The horizontal alignment to set. |
valign | The vertical alignment to set |
Definition at line 585 of file compat.c.
References GTK_ALIGN_END, and GTK_ALIGN_START.
Referenced by make_toolbar_item_throbber(), and nsgtk_tab_label_setup().
void nsgtk_widget_set_can_focus | ( | GtkWidget * | widget, |
gboolean | can_focus | ||
) |
Definition at line 48 of file compat.c.
Referenced by gui_window_create().
void nsgtk_widget_set_margins | ( | GtkWidget * | widget, |
gint | hmargin, | ||
gint | vmargin | ||
) |
Set the margins of a widget.
Sets the margin all round a widget.
widget | The widget to set alignent on. |
hmargin | The horizontal margin. |
vmargin | The vertical margin. |
Definition at line 625 of file compat.c.
Referenced by make_toolbar_item_button(), make_toolbar_item_throbber(), and nsgtk_tab_label_setup().