NetSurf
Macros | Typedefs | Enumerations | Functions
compat.h File Reference

Compatibility functions for older GTK versions (interface) More...

#include <stdint.h>
#include <gtk/gtk.h>
#include "gtk/sexy_icon_entry.h"
#include <gdk/gdkkeysyms.h>
Include dependency graph for compat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NSGTK_STOCK_ADD   GTK_STOCK_ADD
 
#define NSGTK_STOCK_CANCEL   GTK_STOCK_CANCEL
 
#define NSGTK_STOCK_CLEAR   GTK_STOCK_CLEAR
 
#define NSGTK_STOCK_CLOSE   GTK_STOCK_CLOSE
 
#define NSGTK_STOCK_HOME   GTK_STOCK_HOME
 
#define NSGTK_STOCK_INFO   GTK_STOCK_INFO
 
#define NSGTK_STOCK_REFRESH   GTK_STOCK_REFRESH
 
#define NSGTK_STOCK_SAVE   GTK_STOCK_SAVE
 
#define NSGTK_STOCK_SAVE_AS   GTK_STOCK_SAVE_AS
 
#define NSGTK_STOCK_STOP   GTK_STOCK_STOP
 
#define NSGTK_STOCK_OK   GTK_STOCK_OK
 
#define NSGTK_STOCK_OPEN   GTK_STOCK_OPEN
 
#define NSGTK_STOCK_OPEN_MENU   GTK_STOCK_JUSTIFY_FILL
 
#define G_VALUE_INIT   { 0, { { 0 } } }
 
#define GDK_KEY(symbol)   GDK_##symbol
 
#define GTK_STATE_FLAG_NORMAL   GTK_STATE_NORMAL
 
#define gtk_widget_in_destruction(widget)    (GTK_OBJECT_FLAGS(GTK_OBJECT(widget)) & GTK_IN_DESTRUCTION)
 

Typedefs

typedef GtkStateType GtkStateFlags
 
typedef GtkStyle GtkStyleContext
 

Enumerations

enum  GtkAlign {
  GTK_ALIGN_FILL , GTK_ALIGN_START , GTK_ALIGN_END , GTK_ALIGN_CENTER ,
  GTK_ALIGN_BASELINE
}
 
enum  GtkEntryIconPosition { GTK_ENTRY_ICON_PRIMARY = SEXY_ICON_ENTRY_PRIMARY , GTK_ENTRY_ICON_SECONDARY = SEXY_ICON_ENTRY_SECONDARY }
 

Functions

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...
 
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_image_new_from_pixbuf_icon (GdkPixbuf *pixbuf, GtkIconSize size)
 creates a new image widget of an appropriate icon size from a pixbuf. More...
 
GtkStateType nsgtk_widget_get_state (GtkWidget *widget)
 
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. More...
 
GtkWidget * nsgtk_image_new_from_stock (const gchar *stock_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...
 
gboolean nsgtk_stock_lookup (const gchar *stock_id, GtkStockItem *item)
 Fills item with the registered values for stock_id. 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...
 
void nsgtk_window_set_opacity (GtkWindow *window, gdouble opacity)
 
void nsgtk_scrolled_window_add_with_viewport (GtkScrolledWindow *window, GtkWidget *child)
 
GtkWidget * nsgtk_entry_new (void)
 
void nsgtk_entry_set_icon_from_pixbuf (GtkWidget *entry, GtkEntryIconPosition icon_pos, GdkPixbuf *pixbuf)
 
void nsgtk_widget_override_background_color (GtkWidget *widget, GtkStateFlags state, uint16_t a, uint16_t r, uint16_t g, uint16_t b)
 
GtkWidget * nsgtk_hbox_new (gboolean homogeneous, gint spacing)
 
GtkWidget * nsgtk_vbox_new (gboolean homogeneous, gint spacing)
 
GtkStateFlags nsgtk_widget_get_state_flags (GtkWidget *widget)
 
GtkStyleContextnsgtk_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)
 
void nsgtk_widget_get_allocation (GtkWidget *widget, GtkAllocation *allocation)
 
gboolean nsgtk_icon_size_lookup_for_settings (GtkSettings *settings, GtkIconSize size, gint *width, gint *height)
 
GtkAdjustment * nsgtk_layout_get_vadjustment (GtkLayout *layout)
 
GtkAdjustment * nsgtk_layout_get_hadjustment (GtkLayout *layout)
 
void nsgtk_layout_set_hadjustment (GtkLayout *layout, GtkAdjustment *adj)
 
void nsgtk_layout_set_vadjustment (GtkLayout *layout, GtkAdjustment *adj)
 
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)
 
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...
 
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...
 

Detailed Description

Compatibility functions for older GTK versions (interface)

Definition in file compat.h.

Macro Definition Documentation

◆ G_VALUE_INIT

#define G_VALUE_INIT   { 0, { { 0 } } }

Definition at line 82 of file compat.h.

◆ GDK_KEY

#define GDK_KEY (   symbol)    GDK_##symbol

Definition at line 152 of file compat.h.

◆ GTK_STATE_FLAG_NORMAL

#define GTK_STATE_FLAG_NORMAL   GTK_STATE_NORMAL

Definition at line 160 of file compat.h.

◆ gtk_widget_in_destruction

#define gtk_widget_in_destruction (   widget)     (GTK_OBJECT_FLAGS(GTK_OBJECT(widget)) & GTK_IN_DESTRUCTION)

Definition at line 169 of file compat.h.

◆ NSGTK_STOCK_ADD

#define NSGTK_STOCK_ADD   GTK_STOCK_ADD

Definition at line 54 of file compat.h.

◆ NSGTK_STOCK_CANCEL

#define NSGTK_STOCK_CANCEL   GTK_STOCK_CANCEL

Definition at line 55 of file compat.h.

◆ NSGTK_STOCK_CLEAR

#define NSGTK_STOCK_CLEAR   GTK_STOCK_CLEAR

Definition at line 56 of file compat.h.

◆ NSGTK_STOCK_CLOSE

#define NSGTK_STOCK_CLOSE   GTK_STOCK_CLOSE

Definition at line 57 of file compat.h.

◆ NSGTK_STOCK_HOME

#define NSGTK_STOCK_HOME   GTK_STOCK_HOME

Definition at line 58 of file compat.h.

◆ NSGTK_STOCK_INFO

#define NSGTK_STOCK_INFO   GTK_STOCK_INFO

Definition at line 59 of file compat.h.

◆ NSGTK_STOCK_OK

#define NSGTK_STOCK_OK   GTK_STOCK_OK

Definition at line 64 of file compat.h.

◆ NSGTK_STOCK_OPEN

#define NSGTK_STOCK_OPEN   GTK_STOCK_OPEN

Definition at line 65 of file compat.h.

◆ NSGTK_STOCK_OPEN_MENU

#define NSGTK_STOCK_OPEN_MENU   GTK_STOCK_JUSTIFY_FILL

Definition at line 66 of file compat.h.

◆ NSGTK_STOCK_REFRESH

#define NSGTK_STOCK_REFRESH   GTK_STOCK_REFRESH

Definition at line 60 of file compat.h.

◆ NSGTK_STOCK_SAVE

#define NSGTK_STOCK_SAVE   GTK_STOCK_SAVE

Definition at line 61 of file compat.h.

◆ NSGTK_STOCK_SAVE_AS

#define NSGTK_STOCK_SAVE_AS   GTK_STOCK_SAVE_AS

Definition at line 62 of file compat.h.

◆ NSGTK_STOCK_STOP

#define NSGTK_STOCK_STOP   GTK_STOCK_STOP

Definition at line 63 of file compat.h.

Typedef Documentation

◆ GtkStateFlags

typedef GtkStateType GtkStateFlags

Definition at line 156 of file compat.h.

◆ GtkStyleContext

typedef GtkStyle GtkStyleContext

Definition at line 157 of file compat.h.

Enumeration Type Documentation

◆ GtkAlign

enum GtkAlign
Enumerator
GTK_ALIGN_FILL 
GTK_ALIGN_START 
GTK_ALIGN_END 
GTK_ALIGN_CENTER 
GTK_ALIGN_BASELINE 

Definition at line 71 of file compat.h.

◆ GtkEntryIconPosition

Enumerator
GTK_ENTRY_ICON_PRIMARY 
GTK_ENTRY_ICON_SECONDARY 

Definition at line 139 of file compat.h.

Function Documentation

◆ nsgdk_cursor_unref()

void nsgdk_cursor_unref ( GdkCursor *  cursor)

Definition at line 384 of file compat.c.

Referenced by gui_window_set_pointer().

Here is the caller graph for this function:

◆ nsgtk_adjustment_get_lower()

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().

Here is the caller graph for this function:

◆ nsgtk_adjustment_get_page_increment()

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().

Here is the caller graph for this function:

◆ nsgtk_adjustment_get_step_increment()

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().

Here is the caller graph for this function:

◆ nsgtk_adjustment_get_upper()

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().

Here is the caller graph for this function:

◆ nsgtk_builder_add_from_resource()

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

Note
prior to GLIB 2.32 resources did not exist and this wrapper returns the error code.
Parameters
buildera GtkBuilder
resource_paththe path of the resource file to parse
errorreturn location for an error, or NULL.
Returns
A positive value on success, 0 if an error occurred.

Definition at line 646 of file compat.c.

References buffer.

Referenced by nsgtk_builder_new_from_resname().

Here is the caller graph for this function:

◆ nsgtk_button_new_from_stock()

GtkWidget * nsgtk_button_new_from_stock ( const gchar *  stock_id)

Creates a new GtkButton containing the image and text from a stock item.

Compatability interface for original deprecated in GTK 3.10

Parameters
stock_idthe name of the stock item

Definition at line 209 of file compat.c.

◆ nsgtk_button_set_focus_on_click()

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

Parameters
buttonThe button alter
focus_on_clickwhether the button grabs focus when clicked with the mouse

Definition at line 219 of file compat.c.

Referenced by nsgtk_tab_label_setup().

Here is the caller graph for this function:

◆ nsgtk_combo_box_text_append_text()

void nsgtk_combo_box_text_append_text ( GtkWidget *  combo_box,
const gchar *  text 
)

Definition at line 123 of file compat.c.

References text().

Here is the call graph for this function:

◆ nsgtk_combo_box_text_get_active_text()

gchar * nsgtk_combo_box_text_get_active_text ( GtkWidget *  combo_box)

Definition at line 133 of file compat.c.

◆ nsgtk_combo_box_text_new()

GtkWidget * nsgtk_combo_box_text_new ( void  )

Definition at line 114 of file compat.c.

◆ nsgtk_connect_draw_event()

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().

Here is the caller graph for this function:

◆ nsgtk_dialog_get_content_area()

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().

Here is the caller graph for this function:

◆ nsgtk_dialog_set_has_separator()

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().

Here is the caller graph for this function:

◆ nsgtk_entry_new()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_entry_set_icon_from_icon_name()

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

Parameters
entryThe entry widget to set the icon on.
icon_posThe position of the icon.
stock_idthe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_entry_set_icon_from_pixbuf()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_hbox_new()

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().

Here is the caller graph for this function:

◆ nsgtk_icon_size_lookup_for_settings()

gboolean nsgtk_icon_size_lookup_for_settings ( GtkSettings *  settings,
GtkIconSize  size,
gint *  width,
gint *  height 
)

Definition at line 572 of file compat.c.

References height, settings, and width.

Referenced by nsgtk_tab_update_size().

Here is the caller graph for this function:

◆ nsgtk_image_menu_item_new_with_mnemonic()

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.

Note
post 3.10 this creates a GtkMenuItem.
Parameters
labelThe text of the button, with an underscore in front of the mnemonic character.
Returns
a new GtkMenuItem

Definition at line 543 of file compat.c.

Referenced by nsgtk_menu_add_image_item().

Here is the caller graph for this function:

◆ nsgtk_image_menu_item_set_image()

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.

Note
post 3.10 this is empty as menu creation generates GtkMenuItem.
Parameters
image_menu_itemThe image menu entry item.
imageThe image to set.

Definition at line 553 of file compat.c.

Referenced by nsgtk_menu_set_icons().

Here is the caller graph for this function:

◆ nsgtk_image_new_from_pixbuf_icon()

GtkWidget * nsgtk_image_new_from_pixbuf_icon ( GdkPixbuf *  pixbuf,
GtkIconSize  size 
)

creates a new image widget of an appropriate icon size from a pixbuf.

Parameters
pixbufThe pixbuf to use as a source.
sizeThe size of icon to create
Returns
An image widget.

Definition at line 502 of file compat.c.

Referenced by nsgtk_about_dialog_init().

Here is the caller graph for this function:

◆ nsgtk_image_new_from_stock()

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

Parameters
stock_idthe name of the stock item.
sizeThe size of icon to create.
Returns
The created image widget or NULL on error

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().

Here is the caller graph for this function:

◆ nsgtk_layout_get_bin_window()

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().

Here is the caller graph for this function:

◆ nsgtk_layout_get_hadjustment()

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().

Here is the caller graph for this function:

◆ nsgtk_layout_get_vadjustment()

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().

Here is the caller graph for this function:

◆ nsgtk_layout_set_hadjustment()

void nsgtk_layout_set_hadjustment ( GtkLayout *  layout,
GtkAdjustment *  adj 
)

Definition at line 297 of file compat.c.

References nsgtk_layout_set_adjustment_step_increment().

Here is the call graph for this function:

◆ nsgtk_layout_set_vadjustment()

void nsgtk_layout_set_vadjustment ( GtkLayout *  layout,
GtkAdjustment *  adj 
)

Definition at line 307 of file compat.c.

References nsgtk_layout_set_adjustment_step_increment().

Here is the call graph for this function:

◆ nsgtk_menu_popup_at_pointer()

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.

Parameters
image_menu_itemThe image menu entry item.
trigger_eventthe 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().

Here is the caller graph for this function:

◆ nsgtk_scrolled_window_add_with_viewport()

void nsgtk_scrolled_window_add_with_viewport ( GtkScrolledWindow *  window,
GtkWidget *  child 
)

Definition at line 532 of file compat.c.

◆ nsgtk_show_uri()

gboolean nsgtk_show_uri ( GdkScreen *  screen,
const gchar *  uri,
guint32  timestamp,
GError **  error 
)
Todo:
add uri opening for before gtk 2.14

Definition at line 426 of file compat.c.

References nsgtk_current_scaffolding(), nsgtk_scaffolding_window(), and parent.

Referenced by gui_launch_url().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_stock_lookup()

gboolean nsgtk_stock_lookup ( const gchar *  stock_id,
GtkStockItem *  item 
)

Fills item with the registered values for stock_id.

Compatability interface for original deprecated in GTK 3.10

Parameters
stock_idthe name of the stock item.
itemThe structure to update if the stock_id was known.
Returns
TRUE if stock_id was known.

Definition at line 230 of file compat.c.

◆ nsgtk_style_context_get_font()

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().

Here is the caller graph for this function:

◆ nsgtk_vbox_new()

GtkWidget * nsgtk_vbox_new ( gboolean  homogeneous,
gint  spacing 
)

Definition at line 326 of file compat.c.

Referenced by nsgtk_about_dialog_init().

Here is the caller graph for this function:

◆ nsgtk_widget_get_allocation()

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().

Here is the caller graph for this function:

◆ nsgtk_widget_get_mapped()

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().

Here is the caller graph for this function:

◆ nsgtk_widget_get_realized()

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().

Here is the caller graph for this function:

◆ nsgtk_widget_get_state()

GtkStateType nsgtk_widget_get_state ( GtkWidget *  widget)

Referenced by sexy_icon_entry_expose(), and sexy_icon_entry_realize().

Here is the caller graph for this function:

◆ nsgtk_widget_get_state_flags()

GtkStateFlags nsgtk_widget_get_state_flags ( GtkWidget *  widget)

Definition at line 335 of file compat.c.

Referenced by nsgtk_tab_update_size().

Here is the caller graph for this function:

◆ nsgtk_widget_get_style_context()

GtkStyleContext * nsgtk_widget_get_style_context ( GtkWidget *  widget)

Definition at line 348 of file compat.c.

Referenced by nsgtk_tab_update_size().

Here is the caller graph for this function:

◆ nsgtk_widget_get_visible()

gboolean nsgtk_widget_get_visible ( GtkWidget *  widget)

Definition at line 69 of file compat.c.

Referenced by nsgtk_download_update().

Here is the caller graph for this function:

◆ nsgtk_widget_get_window()

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().

Here is the caller graph for this function:

◆ nsgtk_widget_has_focus()

gboolean nsgtk_widget_has_focus ( GtkWidget *  widget)

Definition at line 60 of file compat.c.

◆ nsgtk_widget_is_drawable()

gboolean nsgtk_widget_is_drawable ( GtkWidget *  widget)

Definition at line 96 of file compat.c.

Referenced by sexy_icon_entry_expose().

Here is the caller graph for this function:

◆ nsgtk_widget_modify_font()

void nsgtk_widget_modify_font ( GtkWidget *  widget,
PangoFontDescription *  font_desc 
)

Definition at line 393 of file compat.c.

Referenced by window_init().

Here is the caller graph for this function:

◆ nsgtk_widget_override_background_color()

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().

Here is the caller graph for this function:

◆ nsgtk_widget_set_alignment()

void nsgtk_widget_set_alignment ( GtkWidget *  widget,
GtkAlign  halign,
GtkAlign  valign 
)

Set the alignment of a widget.

sets both the horizontal and vertical alignement of a widget

Note
this type of alignemnt was not available prior to GTK 3.0 so we emulate it using gtk_misc_set_alignment.
Parameters
widgetThe widget to set alignent on.
halignThe horizontal alignment to set.
valignThe 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().

Here is the caller graph for this function:

◆ nsgtk_widget_set_can_focus()

void nsgtk_widget_set_can_focus ( GtkWidget *  widget,
gboolean  can_focus 
)

Definition at line 48 of file compat.c.

Referenced by gui_window_create().

Here is the caller graph for this function:

◆ nsgtk_widget_set_margins()

void nsgtk_widget_set_margins ( GtkWidget *  widget,
gint  hmargin,
gint  vmargin 
)

Set the margins of a widget.

Sets the margin all round a widget.

Note
this type of margin was not available prior to GTK 3.0 so we emulate it using gtk_misc_set_padding.
Parameters
widgetThe widget to set alignent on.
hmarginThe horizontal margin.
vmarginThe 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().

Here is the caller graph for this function:

◆ nsgtk_window_set_opacity()

void nsgtk_window_set_opacity ( GtkWindow *  window,
gdouble  opacity 
)

Definition at line 522 of file compat.c.