1 /* GIMP - The GNU Image Manipulation Program 2 * Copyright (C) 1995 Spencer Kimball and Peter Mattis 3 * 4 * gimpwidgets-utils.h 5 * Copyright (C) 1999-2003 Michael Natterer <mitch@gimp.org> 6 * 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <https://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __APP_GIMP_WIDGETS_UTILS_H__ 22 #define __APP_GIMP_WIDGETS_UTILS_H__ 23 24 25 void gimp_menu_position (GtkMenu *menu, 26 gint *x, 27 gint *y); 28 void gimp_button_menu_position (GtkWidget *button, 29 GtkMenu *menu, 30 GtkPositionType position, 31 gint *x, 32 gint *y); 33 void gimp_table_attach_icon (GtkTable *table, 34 gint row, 35 const gchar *icon_name, 36 GtkWidget *widget, 37 gint colspan, 38 gboolean left_align); 39 void gimp_enum_radio_box_add (GtkBox *box, 40 GtkWidget *widget, 41 gint enum_value, 42 gboolean below); 43 void gimp_enum_radio_frame_add (GtkFrame *frame, 44 GtkWidget *widget, 45 gint enum_value, 46 gboolean below); 47 GdkPixbuf * gimp_widget_load_icon (GtkWidget *widget, 48 const gchar *icon_name, 49 gint size); 50 GtkIconSize gimp_get_icon_size (GtkWidget *widget, 51 const gchar *icon_name, 52 GtkIconSize max_size, 53 gint width, 54 gint height); 55 GimpTabStyle gimp_preview_tab_style_to_icon (GimpTabStyle tab_style); 56 57 const gchar * gimp_get_mod_string (GdkModifierType modifiers); 58 gchar * gimp_suggest_modifiers (const gchar *message, 59 GdkModifierType modifiers, 60 const gchar *extend_selection_format, 61 const gchar *toggle_behavior_format, 62 const gchar *alt_format); 63 GimpChannelOps gimp_modifiers_to_channel_op (GdkModifierType modifiers); 64 GdkModifierType gimp_replace_virtual_modifiers (GdkModifierType modifiers); 65 GdkModifierType gimp_get_primary_accelerator_mask(void); 66 GdkModifierType gimp_get_extend_selection_mask (void); 67 GdkModifierType gimp_get_modify_selection_mask (void); 68 GdkModifierType gimp_get_toggle_behavior_mask (void); 69 GdkModifierType gimp_get_constrain_behavior_mask (void); 70 GdkModifierType gimp_get_all_modifiers_mask (void); 71 72 void gimp_get_monitor_resolution (GdkScreen *screen, 73 gint monitor, 74 gdouble *xres, 75 gdouble *yres); 76 void gimp_rgb_get_gdk_color (const GimpRGB *rgb, 77 GdkColor *gdk_color); 78 void gimp_rgb_set_gdk_color (GimpRGB *rgb, 79 const GdkColor *gdk_color); 80 void gimp_window_set_hint (GtkWindow *window, 81 GimpWindowHint hint); 82 guint32 gimp_window_get_native_id (GtkWindow *window); 83 void gimp_window_set_transient_for (GtkWindow *window, 84 guint32 parent_ID); 85 void gimp_widget_set_accel_help (GtkWidget *widget, 86 GimpAction *action); 87 88 const gchar * gimp_get_message_icon_name (GimpMessageSeverity severity); 89 gboolean gimp_get_color_tag_color (GimpColorTag color_tag, 90 GimpRGB *color, 91 gboolean inherited); 92 93 void gimp_pango_layout_set_scale (PangoLayout *layout, 94 double scale); 95 void gimp_pango_layout_set_weight (PangoLayout *layout, 96 PangoWeight weight); 97 void gimp_highlight_widget (GtkWidget *widget, 98 gboolean highlight); 99 void gimp_widget_blink (GtkWidget *widget); 100 void gimp_widget_blink_cancel (GtkWidget *widget); 101 GtkWidget * gimp_dock_with_window_new (GimpDialogFactory *factory, 102 GdkScreen *screen, 103 gint monitor, 104 gboolean toolbox); 105 GtkWidget * gimp_tools_get_tool_options_gui (GimpToolOptions *tool_options); 106 void gimp_tools_set_tool_options_gui (GimpToolOptions *tool_options, 107 GtkWidget *widget); 108 void gimp_tools_set_tool_options_gui_func 109 (GimpToolOptions *tool_options, 110 GimpToolOptionsGUIFunc func); 111 112 void gimp_widget_flush_expose (GtkWidget *widget); 113 114 gboolean gimp_widget_get_fully_opaque (GtkWidget *widget); 115 void gimp_widget_set_fully_opaque (GtkWidget *widget, 116 gboolean fully_opaque); 117 118 void gimp_gtk_container_clear (GtkContainer *container); 119 120 void gimp_gtk_adjustment_chain (GtkAdjustment *adjustment1, 121 GtkAdjustment *adjustment2); 122 123 const gchar * gimp_print_event (const GdkEvent *event); 124 125 gboolean gimp_color_profile_store_add_defaults 126 (GimpColorProfileStore *store, 127 GimpColorConfig *config, 128 GimpImageBaseType base_type, 129 GimpPrecision precision, 130 GError **error); 131 132 void gimp_color_profile_chooser_dialog_connect_path 133 (GtkWidget *dialog, 134 GObject *config, 135 const gchar *property_name); 136 137 138 #endif /* __APP_GIMP_WIDGETS_UTILS_H__ */ 139