| GIMP Application Reference Manual | ||||
|---|---|---|---|---|
void gimp_enum_radio_frame_add (GtkFrame *frame, GtkWidget *widget, gint enum_value); 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); void gimp_table_attach_stock (GtkTable *table, gint row, const gchar *stock_id, GtkWidget *widget, gint colspan, gboolean left_align); GtkIconSize gimp_get_icon_size (GtkWidget *widget, const gchar *stock_id, GtkIconSize max_size, gint width, gint height); 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); gchar* gimp_suggest_modifiers (const gchar *message, GdkModifierType modifiers, const gchar *shift_format, const gchar *control_format, const gchar *alt_format); void gimp_get_screen_resolution (GdkScreen *screen, gdouble *xres, gdouble *yres); void gimp_rgb_get_gdk_color (const GimpRGB *rgb, GdkColor *gdk_color); void gimp_rgb_set_gdk_color (GimpRGB *rgb, const GdkColor *gdk_color); void gimp_window_set_hint (GtkWindow *window, GimpWindowHint hint); GdkNativeWindow gimp_window_get_native (GtkWindow *window); void gimp_window_set_transient_for (GtkWindow *window, guint32 parent_ID); 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); void gimp_toggle_button_set_visible (GtkToggleButton *toggle, GtkWidget *widget); void gimp_widget_set_accel_help (GtkWidget *widget, GtkAction *action); const gchar* gimp_get_message_stock_id (GimpMessageSeverity severity); void gimp_pango_layout_set_weight (PangoLayout *layout, PangoWeight weight);
void gimp_enum_radio_frame_add (GtkFrame *frame, GtkWidget *widget, gint enum_value);
|
|
|
|
|
void gimp_menu_position (GtkMenu *menu, gint *x, gint *y);
Positions a GtkMenu so that it pops up on screen. This function takes care of the preferred popup direction (taken from the widget render direction) and it handles multiple monitors representing a single GdkScreen (Xinerama).
You should call this function with x and y initialized to the
origin of the menu. This is typically the center of the widget the
menu is popped up from. gimp_menu_position() will then decide if
and how these initial values need to be changed.
|
a GtkMenu widget |
|
pointer to horizontal position |
|
pointer to vertical position |
void gimp_button_menu_position (GtkWidget *button, GtkMenu *menu, GtkPositionType position, gint *x, gint *y);
Utility function to position a menu that pops up from a button.
|
a button widget to popup the menu from |
|
the menu to position |
|
the preferred popup direction for the menu (left or right) |
|
return location for x coordinate |
|
return location for y coordinate |
void gimp_table_attach_stock (GtkTable *table, gint row, const gchar *stock_id, GtkWidget *widget, gint colspan, gboolean left_align);
|
|
|
|
|
|
|
|
|
|
|
GtkIconSize gimp_get_icon_size (GtkWidget *widget, const gchar *stock_id, GtkIconSize max_size, gint width, gint height);
|
|
|
|
|
|
|
|
|
|
Returns : |
const gchar* gimp_get_mod_string (GdkModifierType modifiers);
|
|
Returns : |
gchar* gimp_suggest_modifiers (const gchar *message, GdkModifierType modifiers, const gchar *shift_format, const gchar *control_format, const gchar *alt_format);
Utility function to build a message suggesting to use some
modifiers for performing different actions (only Shift, Ctrl and
Alt are currently supported). If some of these modifiers are
already active, they will not be suggested. The optional format
strings shift_format, control_format and alt_format may be used
to describe what the modifier will do. They must contain a single
'%s' which will be replaced by the name of the modifier. They
can also be NULL if the modifier name should be left alone.
|
initial text for the message |
|
bit mask of modifiers that should be suggested |
|
optional format string for the Shift modifier |
|
optional format string for the Ctrl modifier |
|
optional format string for the Alt modifier |
Returns : |
a newly allocated string containing the message. |
void gimp_get_screen_resolution (GdkScreen *screen, gdouble *xres, gdouble *yres);
Retrieves the screen resolution from GDK. If screen is NULL, the
default screen is used.
void gimp_rgb_get_gdk_color (const GimpRGB *rgb, GdkColor *gdk_color);
Initializes gdk_color from a GimpRGB. This function does not
allocate the color for you. Depending on how you want to use it,
you may have to call gdk_colormap_alloc_color().
void gimp_rgb_set_gdk_color (GimpRGB *rgb, const GdkColor *gdk_color);
Initializes rgb from a GdkColor. This function does not touch
the alpha value of rgb.
void gimp_window_set_hint (GtkWindow *window, GimpWindowHint hint);
|
|
|
GdkNativeWindow gimp_window_get_native (GtkWindow *window);
This function is used to pass a window handle to plug-ins so that they can set their dialog windows transient to the parent window.
void gimp_window_set_transient_for (GtkWindow *window, guint32 parent_ID);
|
|
|
gboolean gimp_text_buffer_load (GtkTextBuffer *buffer, const gchar *filename, GError **error);
|
|
|
|
|
|
Returns : |
gboolean gimp_text_buffer_save (GtkTextBuffer *buffer, const gchar *filename, gboolean selection_only, GError **error);
|
|
|
|
|
|
|
|
Returns : |
void gimp_toggle_button_set_visible (GtkToggleButton *toggle, GtkWidget *widget);
|
|
|
void gimp_widget_set_accel_help (GtkWidget *widget, GtkAction *action);
|
|
|
const gchar* gimp_get_message_stock_id (GimpMessageSeverity severity);
|
|
Returns : |
void gimp_pango_layout_set_weight (PangoLayout *layout, PangoWeight weight);
|
|
|