1999-09-28 01:58:10 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* 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
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (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
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
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
|
|
|
|
|
|
|
|
2003-09-24 04:27:12 +08:00
|
|
|
void gimp_menu_position (GtkMenu *menu,
|
|
|
|
gint *x,
|
2003-11-20 02:08:15 +08:00
|
|
|
gint *y);
|
2003-09-24 04:27:12 +08:00
|
|
|
void gimp_button_menu_position (GtkWidget *button,
|
|
|
|
GtkMenu *menu,
|
|
|
|
GtkPositionType position,
|
|
|
|
gint *x,
|
|
|
|
gint *y);
|
2003-05-29 19:34:30 +08:00
|
|
|
|
2003-09-24 04:27:12 +08:00
|
|
|
void gimp_table_attach_stock (GtkTable *table,
|
|
|
|
gint row,
|
2005-09-03 01:22:29 +08:00
|
|
|
const gchar *stock_id,
|
2003-09-24 04:27:12 +08:00
|
|
|
GtkWidget *widget,
|
|
|
|
gint colspan,
|
2005-09-03 01:22:29 +08:00
|
|
|
gboolean left_align);
|
2004-10-12 20:06:50 +08:00
|
|
|
void gimp_enum_radio_frame_add (GtkFrame *frame,
|
|
|
|
GtkWidget *widget,
|
|
|
|
gint enum_value);
|
2003-05-29 19:34:30 +08:00
|
|
|
|
2003-09-24 04:27:12 +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
|
|
|
|
|
|
|
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);
|
2004-06-29 07:30:57 +08:00
|
|
|
const gchar * gimp_get_mod_string (GdkModifierType modifiers);
|
2004-07-21 02:50:20 +08:00
|
|
|
gchar * gimp_get_accel_string (guint key,
|
|
|
|
GdkModifierType modifiers);
|
2003-05-29 19:34:30 +08:00
|
|
|
|
2003-09-24 04:27:12 +08:00
|
|
|
void gimp_get_screen_resolution (GdkScreen *screen,
|
|
|
|
gdouble *xres,
|
|
|
|
gdouble *yres);
|
2002-12-20 00:33:29 +08:00
|
|
|
|
2003-09-24 04:27:12 +08:00
|
|
|
void gimp_rgb_get_gdk_color (const GimpRGB *rgb,
|
|
|
|
GdkColor *gdk_color);
|
2003-10-22 22:31:44 +08:00
|
|
|
void gimp_rgb_set_gdk_color (GimpRGB *rgb,
|
|
|
|
const GdkColor *gdk_color);
|
2003-06-11 00:44:44 +08:00
|
|
|
|
2004-01-17 07:18:23 +08:00
|
|
|
void gimp_window_set_hint (GtkWindow *window,
|
|
|
|
GimpWindowHint hint);
|
2003-11-21 04:36:55 +08:00
|
|
|
|
2004-08-11 06:21:56 +08:00
|
|
|
void gimp_dialog_set_sensitive (GtkDialog *dialog,
|
|
|
|
gboolean sensitive);
|
|
|
|
|
2004-11-04 22:24:32 +08:00
|
|
|
gboolean gimp_text_buffer_load (GtkTextBuffer *buffer,
|
|
|
|
const gchar *filename,
|
|
|
|
GError **error);
|
2004-10-25 06:26:11 +08:00
|
|
|
gboolean gimp_text_buffer_save (GtkTextBuffer *buffer,
|
|
|
|
const gchar *filename,
|
|
|
|
gboolean selection_only,
|
|
|
|
GError **error);
|
|
|
|
|
2004-11-24 01:01:51 +08:00
|
|
|
void gimp_toggle_button_set_visible (GtkToggleButton *toggle,
|
|
|
|
GtkWidget *widget);
|
|
|
|
|
2005-01-21 22:58:03 +08:00
|
|
|
GClosure * gimp_action_get_accel_closure (GtkAction *action);
|
|
|
|
|
2002-12-20 00:33:29 +08:00
|
|
|
|
2001-05-26 00:04:54 +08:00
|
|
|
#endif /* __GIMP_WIDGETS_UTILS_H__ */
|