1 /* 2 * DO NOT EDIT THIS FILE - it is generated by Glade. 3 */ 4 5 #ifdef HAVE_CONFIG_H 6 # include <config.h> 7 #endif 8 9 #include <gtk/gtk.h> 10 11 /* 12 * Standard gettext macros. 13 */ 14 #ifdef ENABLE_NLS 15 # include <libintl.h> 16 # undef _ 17 # define _(String) dgettext (PACKAGE, String) 18 # define Q_(String) g_strip_context ((String), gettext (String)) 19 # ifdef gettext_noop 20 # define N_(String) gettext_noop (String) 21 # else 22 # define N_(String) (String) 23 # endif 24 #else 25 # define textdomain(String) (String) 26 # define gettext(String) (String) 27 # define dgettext(Domain,Message) (Message) 28 # define dcgettext(Domain,Message,Type) (Message) 29 # define bindtextdomain(Domain,Directory) (Domain) 30 # define _(String) (String) 31 # define Q_(String) g_strip_context ((String), (String)) 32 # define N_(String) (String) 33 #endif 34 35 #if GTK_MAJOR_VERSION < 3 || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 12) 36 #define gtk_widget_set_margin_start(W, M) gtk_widget_set_margin_left(W, M) 37 #define gtk_widget_set_margin_end(W, M) gtk_widget_set_margin_right(W, M) 38 #endif 39 40 #if GTK_MAJOR_VERSION < 3 || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 4) 41 #define GTK_GRID(W) GTK_TABLE(W) 42 #define gtk_grid_new() gtk_table_new(10, 10, FALSE) 43 #define gtk_grid_attach(G, W, L, T, W, H) gtk_table_attach(G, W, L, L + W, T, T + H, 0, 0, 0, 0) 44 #endif 45 46 #if GTK_MAJOR_VERSION < 3 || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20) 47 #define gtk_widget_set_focus_on_click(A, B) gtk_button_set_focus_on_click(GTK_BUTTON(A), B) 48 #endif 49 50 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 15 51 #define gtk_label_set_xalign(A, B) gtk_misc_set_alignment(GTK_MISC(A), B, 0.5) 52 #define gtk_label_set_yalign(A, B) gtk_misc_set_alignment(GTK_MISC(A), 0.5, B) 53 #define gtk_button_new_from_icon_name(A, B) gtk_button_new_with_label(A) 54 #endif 55 56 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION > 9 57 #define TOOL_ICON_CANCEL _("_Cancel") 58 #define TOOL_ICON_SAVE _("_Save") 59 #define TOOL_ICON_OPEN _("_Open") 60 #define TOOL_ICON_CLOSE _("_Close") 61 #else 62 #define TOOL_ICON_CANCEL GTK_STOCK_CANCEL 63 #define TOOL_ICON_SAVE GTK_STOCK_SAVE 64 #define TOOL_ICON_OPEN GTK_STOCK_OPEN 65 #define TOOL_ICON_CLOSE GTK_STOCK_CLOSE 66 #endif 67 68 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 4 69 #define GTK_GRID(A) GTK_TABLE(A) 70 #define gtk_grid_new() gtk_table_new(1, 1, FALSE) 71 #define tool_grid_resize(A, B, C) gtk_table_resize(GTK_TABLE(A), B, C) 72 #define gtk_grid_attach(A, B, X, Y, W, H) gtk_table_attach(A, B, X, X+W, Y, Y+H, 0, 0, 0, 0) 73 #else 74 #define tool_grid_resize(A, B, C) 75 #endif 76 77 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 2 78 79 #endif 80 81 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION > 2 82 #define gtk_hbox_new(A, B) gtk_box_new(GTK_ORIENTATION_HORIZONTAL, B) 83 #define gtk_vbox_new(A, B) gtk_box_new(GTK_ORIENTATION_VERTICAL, B) 84 #define gtk_hseparator_new() gtk_separator_new(GTK_ORIENTATION_HORIZONTAL) 85 #define gtk_vseparator_new() gtk_separator_new(GTK_ORIENTATION_VERTICAL) 86 #define gtk_hscale_new_with_range(A, B, C) gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, A, B, C) 87 #define gtk_vscale_new_with_range(A, B, C) gtk_scale_new_with_range(GTK_ORIENTATION_VERTICAL, A, B, C) 88 #define gtk_hpaned_new() gtk_paned_new(GTK_ORIENTATION_HORIZONTAL) 89 #define gtk_vpaned_new() gtk_paned_new(GTK_ORIENTATION_VERTICAL) 90 #endif 91 92 #if GTK_MAJOR_VERSION < 3 93 #define cairo_region_t GdkRegion 94 #define cairo_region_destroy(Obj) gdk_region_destroy(Obj) 95 #define gdk_window_get_clip_region(Obj) gdk_drawable_get_clip_region(GDK_DRAWABLE(Obj)) 96 #endif 97 98 #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 26 && GTK_MINOR_VERSION > 23 99 #define gtk_combo_box_text_append(Obj, id, tt) gtk_combo_box_text_append_text(Obj, tt) 100 #define gtk_combo_box_text_remove(Obj, id) gtk_combo_box_remove_text(GTK_COMBO_BOX(Obj), id) 101 #endif 102 103 #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 24 104 #define GTK_COMBO_BOX_TEXT(Obj) GTK_COMBO_BOX(Obj) 105 #define gtk_combo_box_text_new() gtk_combo_box_new_text() 106 #define gtk_combo_box_text_new_with_entry() gtk_combo_box_entry_new_text() 107 #define gtk_combo_box_text_append_text(Obj, tt) gtk_combo_box_append_text(Obj, tt) 108 #define gtk_combo_box_text_append(Obj, id, tt) gtk_combo_box_append_text(Obj, tt) 109 #define gtk_combo_box_text_remove(Obj, id) gtk_combo_box_remove_text(GTK_COMBO_BOX(Obj), id) 110 #define gdk_window_get_screen(Obj) gdk_drawable_get_screen(Obj) 111 #endif 112 113 #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 22 114 #define gtk_dialog_get_content_area(Obj) (Obj->vbox) 115 #define gtk_dialog_get_action_area(Obj) (Obj->action_area) 116 #define gtk_color_selection_dialog_get_color_selection(Obj) (Obj->colorsel) 117 #define GDK_KEY_Home GDK_Home 118 #define GDK_KEY_0 GDK_0 119 #define GDK_KEY_1 GDK_1 120 #define GDK_KEY_2 GDK_2 121 #define GDK_KEY_3 GDK_3 122 #define GDK_KEY_4 GDK_4 123 #define GDK_KEY_5 GDK_5 124 #define GDK_KEY_6 GDK_6 125 #define GDK_KEY_7 GDK_7 126 #define GDK_KEY_8 GDK_8 127 #define GDK_KEY_9 GDK_9 128 #define GDK_KEY_f GDK_f 129 #define GDK_KEY_F GDK_F 130 #define GDK_KEY_i GDK_i 131 #define GDK_KEY_I GDK_I 132 #define GDK_KEY_n GDK_n 133 #define GDK_KEY_o GDK_o 134 #define GDK_KEY_p GDK_p 135 #define GDK_KEY_r GDK_r 136 #define GDK_KEY_R GDK_R 137 #define GDK_KEY_s GDK_s 138 #define GDK_KEY_S GDK_S 139 #define GDK_KEY_v GDK_v 140 #define GDK_KEY_V GDK_V 141 #define GDK_KEY_Menu GDK_Menu 142 #define GDK_KEY_Escape GDK_Escape 143 #define GDK_KEY_space GDK_space 144 #define GDK_KEY_Page_Up GDK_Page_Up 145 #define GDK_KEY_Page_Down GDK_Page_Down 146 #define GDK_KEY_Up GDK_Up 147 #define GDK_KEY_Down GDK_Down 148 #define GDK_KEY_Right GDK_Right 149 #define GDK_KEY_Left GDK_Left 150 #define GDK_KEY_Shift_L GDK_Shift_L 151 #define GDK_KEY_Shift_R GDK_Shift_R 152 #define GDK_KEY_Delete GDK_Delete 153 #define GDK_KEY_BackSpace GDK_BackSpace 154 #define gtk_widget_is_drawable(Obj) GDK_IS_DRAWABLE(Obj->window) 155 #define gtk_widget_get_window(Obj) (Obj->window) 156 #define gtk_widget_get_visible(Obj) GTK_WIDGET_VISIBLE(Obj) 157 #define gtk_widget_get_allocation(Obj, alloc) {(alloc)->x = Obj->allocation.x; (alloc)->y = Obj->allocation.y; (alloc)->width = Obj->allocation.width; (alloc)->height = Obj->allocation.height;} 158 #define gtk_widget_set_can_default(Obj, test) {if (test) {GTK_WIDGET_SET_FLAGS(Obj, GTK_CAN_DEFAULT);};} 159 #define gtk_widget_set_can_focus(Obj, test) {if (test) {GTK_WIDGET_SET_FLAGS(Obj, GTK_CAN_FOCUS);};} 160 #define gtk_widget_set_window(Obj, win) {Obj->window = win;} 161 #define gtk_widget_set_realized(Obj, test) {if (test) {GTK_WIDGET_SET_FLAGS(Obj, GTK_REALIZED);};} 162 #define gtk_widget_set_has_window(Obj, test) {} 163 #endif 164 #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 20 165 #define gtk_widget_style_attach(Obj) {Obj->style = gtk_style_attach(Obj->style, Obj->window);} 166 #define gtk_widget_get_mapped(Obj) GTK_WIDGET_MAPPED(Obj) 167 #endif 168 #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 12 169 #define gtk_widget_set_tooltip_text(Obj, tt) gtk_tooltips_set_tip(tooltips, Obj, tt, NULL) 170 #define gtk_tool_item_set_tooltip_text(Obj, tt) gtk_tool_item_set_tooltip(Obj, tooltips, tt, NULL) 171 #endif 172 #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 5 173 #define GTK_STOCK_EDIT GTK_STOCK_PROPERTIES 174 #endif 175 176 /* 177 * Public Functions. 178 */ 179 180 /* 181 * This function returns a widget in a component created by Glade. 182 * Call it with the toplevel widget in the component (i.e. a window/dialog), 183 * or alternatively any widget in the component, and the name of the widget 184 * you want returned. 185 */ 186 GtkWidget* lookup_widget (GtkWidget *widget, 187 const gchar *widget_name); 188 189 190 /* Use this function to set the directory containing installed pixmaps. */ 191 void add_pixmap_directory (const gchar *directory); 192 193 194 /* 195 * Private Functions. 196 */ 197 198 /* This is used to create the pixmaps used in the interface. */ 199 GtkWidget* create_pixmap (GtkWidget *widget, 200 const gchar *filename); 201 202 /* This is used to create the pixbufs used in the interface. */ 203 GdkPixbuf* create_pixbuf (const gchar *filename); 204 205 /* This is used to set ATK action descriptions. */ 206 void glade_set_atk_action_description (AtkAction *action, 207 const gchar *action_name, 208 const gchar *description); 209 210