2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
1999-09-28 01:58:10 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2003-03-13 21:08:37 +08:00
|
|
|
* gimpwidgets-utils.h
|
|
|
|
* Copyright (C) 1999-2003 Michael Natterer <mitch@gimp.org>
|
1999-09-28 01:58:10 +08:00
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
1999-09-28 01:58:10 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
1999-09-28 01:58:10 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1999-09-28 01:58:10 +08:00
|
|
|
*/
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-05-26 00:04:54 +08:00
|
|
|
#ifndef __GIMP_WIDGETS_UTILS_H__
|
|
|
|
#define __GIMP_WIDGETS_UTILS_H__
|
1999-09-28 01:58:10 +08:00
|
|
|
|
|
|
|
|
2005-09-10 02:07:31 +08:00
|
|
|
void gimp_menu_position (GtkMenu *menu,
|
|
|
|
gint *x,
|
|
|
|
gint *y);
|
|
|
|
void gimp_button_menu_position (GtkWidget *button,
|
|
|
|
GtkMenu *menu,
|
|
|
|
GtkPositionType position,
|
|
|
|
gint *x,
|
|
|
|
gint *y);
|
2003-05-29 19:34:30 +08:00
|
|
|
|
2005-09-10 02:07:31 +08:00
|
|
|
void gimp_table_attach_stock (GtkTable *table,
|
|
|
|
gint row,
|
|
|
|
const gchar *stock_id,
|
|
|
|
GtkWidget *widget,
|
|
|
|
gint colspan,
|
|
|
|
gboolean left_align);
|
2008-10-25 06:34:24 +08:00
|
|
|
void gimp_enum_radio_box_add (GtkBox *box,
|
|
|
|
GtkWidget *widget,
|
2008-10-29 01:40:32 +08:00
|
|
|
gint enum_value,
|
|
|
|
gboolean below);
|
2005-09-10 02:07:31 +08:00
|
|
|
void gimp_enum_radio_frame_add (GtkFrame *frame,
|
|
|
|
GtkWidget *widget,
|
2008-10-29 01:40:32 +08:00
|
|
|
gint enum_value,
|
|
|
|
gboolean below);
|
2003-05-29 19:34:30 +08:00
|
|
|
|
2005-09-10 02:07:31 +08:00
|
|
|
GtkIconSize gimp_get_icon_size (GtkWidget *widget,
|
|
|
|
const gchar *stock_id,
|
|
|
|
GtkIconSize max_size,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
2003-05-29 19:34:30 +08:00
|
|
|
|
2005-09-10 02:07:31 +08:00
|
|
|
const gchar * gimp_get_mod_name_shift (void);
|
|
|
|
const gchar * gimp_get_mod_name_control (void);
|
|
|
|
const gchar * gimp_get_mod_name_alt (void);
|
|
|
|
const gchar * gimp_get_mod_separator (void);
|
|
|
|
const gchar * gimp_get_mod_string (GdkModifierType modifiers);
|
2006-08-02 07:42:12 +08:00
|
|
|
gchar * gimp_suggest_modifiers (const gchar *message,
|
|
|
|
GdkModifierType modifiers,
|
|
|
|
const gchar *shift_format,
|
|
|
|
const gchar *control_format,
|
|
|
|
const gchar *alt_format);
|
2003-05-29 19:34:30 +08:00
|
|
|
|
2005-09-10 02:07:31 +08:00
|
|
|
void gimp_get_screen_resolution (GdkScreen *screen,
|
|
|
|
gdouble *xres,
|
|
|
|
gdouble *yres);
|
2002-12-20 00:33:29 +08:00
|
|
|
|
2005-09-10 02:07:31 +08:00
|
|
|
void gimp_rgb_get_gdk_color (const GimpRGB *rgb,
|
|
|
|
GdkColor *gdk_color);
|
|
|
|
void gimp_rgb_set_gdk_color (GimpRGB *rgb,
|
|
|
|
const GdkColor *gdk_color);
|
2003-06-11 00:44:44 +08:00
|
|
|
|
2005-09-10 02:07:31 +08:00
|
|
|
void gimp_window_set_hint (GtkWindow *window,
|
|
|
|
GimpWindowHint hint);
|
|
|
|
GdkNativeWindow gimp_window_get_native (GtkWindow *window);
|
2006-09-22 17:24:41 +08:00
|
|
|
void gimp_window_set_transient_for (GtkWindow *window,
|
|
|
|
guint32 parent_ID);
|
2003-11-21 04:36:55 +08:00
|
|
|
|
2005-09-10 02:07:31 +08:00
|
|
|
gboolean gimp_text_buffer_load (GtkTextBuffer *buffer,
|
|
|
|
const gchar *filename,
|
|
|
|
GError **error);
|
|
|
|
gboolean gimp_text_buffer_save (GtkTextBuffer *buffer,
|
|
|
|
const gchar *filename,
|
|
|
|
gboolean selection_only,
|
|
|
|
GError **error);
|
2004-10-25 06:26:11 +08:00
|
|
|
|
2005-09-10 02:07:31 +08:00
|
|
|
void gimp_toggle_button_set_visible (GtkToggleButton *toggle,
|
|
|
|
GtkWidget *widget);
|
2004-11-24 01:01:51 +08:00
|
|
|
|
2005-09-16 08:46:21 +08:00
|
|
|
void gimp_widget_set_accel_help (GtkWidget *widget,
|
|
|
|
GtkAction *action);
|
|
|
|
|
2006-10-09 16:17:22 +08:00
|
|
|
const gchar * gimp_get_message_stock_id (GimpMessageSeverity severity);
|
2006-08-11 20:56:26 +08:00
|
|
|
|
2008-09-30 19:16:28 +08:00
|
|
|
void gimp_pango_layout_set_scale (PangoLayout *layout,
|
|
|
|
double scale);
|
2008-03-19 17:29:30 +08:00
|
|
|
void gimp_pango_layout_set_weight (PangoLayout *layout,
|
|
|
|
PangoWeight weight);
|
|
|
|
|
2002-12-20 00:33:29 +08:00
|
|
|
|
2001-05-26 00:04:54 +08:00
|
|
|
#endif /* __GIMP_WIDGETS_UTILS_H__ */
|