24#ifndef NETSURF_GTK_COMPAT_H_
25#define NETSURF_GTK_COMPAT_H_
32#if GTK_CHECK_VERSION(3,10,0)
33#define NSGTK_USE_ICON_NAME
35#undef NSGTK_USE_ICON_NAME
39#ifdef NSGTK_USE_ICON_NAME
40#define NSGTK_STOCK_ADD "list-add"
41#define NSGTK_STOCK_CANCEL "_Cancel"
42#define NSGTK_STOCK_CLEAR "edit-clear"
43#define NSGTK_STOCK_CLOSE "window-close"
44#define NSGTK_STOCK_HOME "go-home"
45#define NSGTK_STOCK_INFO "dialog-information"
46#define NSGTK_STOCK_REFRESH "view-refresh"
47#define NSGTK_STOCK_SAVE "document-save"
48#define NSGTK_STOCK_SAVE_AS "document-save-as"
49#define NSGTK_STOCK_STOP "process-stop"
50#define NSGTK_STOCK_OK "_OK"
51#define NSGTK_STOCK_OPEN "_Open"
52#define NSGTK_STOCK_OPEN_MENU "open-menu"
54#define NSGTK_STOCK_ADD GTK_STOCK_ADD
55#define NSGTK_STOCK_CANCEL GTK_STOCK_CANCEL
56#define NSGTK_STOCK_CLEAR GTK_STOCK_CLEAR
57#define NSGTK_STOCK_CLOSE GTK_STOCK_CLOSE
58#define NSGTK_STOCK_HOME GTK_STOCK_HOME
59#define NSGTK_STOCK_INFO GTK_STOCK_INFO
60#define NSGTK_STOCK_REFRESH GTK_STOCK_REFRESH
61#define NSGTK_STOCK_SAVE GTK_STOCK_SAVE
62#define NSGTK_STOCK_SAVE_AS GTK_STOCK_SAVE_AS
63#define NSGTK_STOCK_STOP GTK_STOCK_STOP
64#define NSGTK_STOCK_OK GTK_STOCK_OK
65#define NSGTK_STOCK_OPEN GTK_STOCK_OPEN
66#define NSGTK_STOCK_OPEN_MENU GTK_STOCK_JUSTIFY_FILL
70#if !GTK_CHECK_VERSION(3,0,0)
82#define G_VALUE_INIT { 0, { { 0 } } }
135#if !GTK_CHECK_VERSION(2,16,0)
148#if GTK_CHECK_VERSION (2, 90, 7)
149#define GDK_KEY(symbol) GDK_KEY_##symbol
151#include <gdk/gdkkeysyms.h>
152#define GDK_KEY(symbol) GDK_##symbol
155#if !GTK_CHECK_VERSION(3,0,0)
160#define GTK_STATE_FLAG_NORMAL GTK_STATE_NORMAL
162#if GTK_CHECK_VERSION(2,22,0)
164 GTK_IN_DESTRUCTION = 1 << 0,
166#define GTK_OBJECT_FLAGS(obj) (GTK_OBJECT (obj)->flags)
169#define gtk_widget_in_destruction(widget) \
170 (GTK_OBJECT_FLAGS(GTK_OBJECT(widget)) & GTK_IN_DESTRUCTION)
247gboolean
nsgtk_show_uri(GdkScreen *screen,
const gchar *uri, guint32 timestamp, GError **error);
@ GTK_ENTRY_ICON_SECONDARY
GtkWidget * nsgtk_image_new_from_stock(const gchar *stock_id, GtkIconSize size)
Creates a GtkImage displaying a stock icon.
void nsgtk_layout_set_vadjustment(GtkLayout *layout, GtkAdjustment *adj)
void nsgtk_window_set_opacity(GtkWindow *window, gdouble opacity)
GtkStateFlags nsgtk_widget_get_state_flags(GtkWidget *widget)
void nsgtk_widget_get_allocation(GtkWidget *widget, GtkAllocation *allocation)
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.
void nsgtk_widget_override_background_color(GtkWidget *widget, GtkStateFlags state, uint16_t a, uint16_t r, uint16_t g, uint16_t b)
gboolean nsgtk_show_uri(GdkScreen *screen, const gchar *uri, guint32 timestamp, GError **error)
gboolean nsgtk_widget_is_drawable(GtkWidget *widget)
gchar * nsgtk_combo_box_text_get_active_text(GtkWidget *combo_box)
void nsgtk_combo_box_text_append_text(GtkWidget *combo_box, const gchar *text)
void nsgtk_dialog_set_has_separator(GtkDialog *dialog, gboolean setting)
GtkWidget * nsgtk_image_new_from_pixbuf_icon(GdkPixbuf *pixbuf, GtkIconSize size)
creates a new image widget of an appropriate icon size from a pixbuf.
void nsgtk_widget_set_margins(GtkWidget *widget, gint hmargin, gint vmargin)
Set the margins of a widget.
gboolean nsgtk_stock_lookup(const gchar *stock_id, GtkStockItem *item)
Fills item with the registered values for stock_id.
gboolean nsgtk_widget_get_visible(GtkWidget *widget)
const PangoFontDescription * nsgtk_style_context_get_font(GtkStyleContext *style, GtkStateFlags state)
void nsgtk_layout_set_hadjustment(GtkLayout *layout, GtkAdjustment *adj)
GdkWindow * nsgtk_widget_get_window(GtkWidget *widget)
GtkWidget * nsgtk_hbox_new(gboolean homogeneous, gint spacing)
GtkStyleContext * nsgtk_widget_get_style_context(GtkWidget *widget)
gulong nsgtk_connect_draw_event(GtkWidget *widget, GCallback callback, gpointer g)
void nsgdk_cursor_unref(GdkCursor *cursor)
GtkStateType GtkStateFlags
gdouble nsgtk_adjustment_get_page_increment(GtkAdjustment *adjustment)
void nsgtk_widget_set_can_focus(GtkWidget *widget, gboolean can_focus)
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 ...
void nsgtk_entry_set_icon_from_pixbuf(GtkWidget *entry, GtkEntryIconPosition icon_pos, GdkPixbuf *pixbuf)
GtkStateType nsgtk_widget_get_state(GtkWidget *widget)
void nsgtk_widget_set_alignment(GtkWidget *widget, GtkAlign halign, GtkAlign valign)
Set the alignment of a widget.
GtkWidget * nsgtk_dialog_get_content_area(GtkDialog *dialog)
GtkWidget * nsgtk_entry_new(void)
gboolean nsgtk_icon_size_lookup_for_settings(GtkSettings *settings, GtkIconSize size, gint *width, gint *height)
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.
gdouble nsgtk_adjustment_get_upper(GtkAdjustment *adjustment)
gboolean nsgtk_widget_has_focus(GtkWidget *widget)
gdouble nsgtk_adjustment_get_lower(GtkAdjustment *adjustment)
GtkWidget * nsgtk_vbox_new(gboolean homogeneous, gint spacing)
GtkWidget * nsgtk_button_new_from_stock(const gchar *stock_id)
Creates a new GtkButton containing the image and text from a stock item.
GtkWidget * nsgtk_image_menu_item_new_with_mnemonic(const gchar *label)
Creates a new GtkImageMenuItem containing a label.
GtkAdjustment * nsgtk_layout_get_vadjustment(GtkLayout *layout)
void nsgtk_image_menu_item_set_image(GtkWidget *image_menu_item, GtkWidget *image)
Sets the image of image_menu_item to the given widget.
GtkWidget * nsgtk_combo_box_text_new(void)
gboolean nsgtk_widget_get_mapped(GtkWidget *widget)
void nsgtk_scrolled_window_add_with_viewport(GtkScrolledWindow *window, GtkWidget *child)
GtkAdjustment * nsgtk_layout_get_hadjustment(GtkLayout *layout)
GdkWindow * nsgtk_layout_get_bin_window(GtkLayout *layout)
gdouble nsgtk_adjustment_get_step_increment(GtkAdjustment *adjustment)
void nsgtk_widget_modify_font(GtkWidget *widget, PangoFontDescription *font_desc)
void nsgtk_menu_popup_at_pointer(GtkMenu *menu, const GdkEvent *trigger_event)
Displays menu and makes it available for selection.
gboolean nsgtk_widget_get_realized(GtkWidget *widget)
static struct print_settings * settings
@ SEXY_ICON_ENTRY_SECONDARY
@ SEXY_ICON_ENTRY_PRIMARY
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.