Commit 166078e1 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

pass the modifier mask as GdkModifierType instead of guint.

2003-03-20  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as
	GdkModifierType instead of guint.

	* app/core/gimpmarshal.list
	* app/widgets/gimpcellrenderertoggle.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimppreview.c: use proper marshallers for signals
	that take flags as parameters.

	* app/core/gimpcontext.c: added the G_SIGNAL_TYPE_STATIC_SCOPE flag
	to the GimpRGB signal parameter.

2003-03-20  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/libgimpwidgets.types
	* libgimpwidgets/tmpl/gimpbutton.sgml
	* libgimpwidgets/tmpl/gimppickbutton.sgml: improved.
parent c1dffc05
2003-03-20 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as
GdkModifierType instead of guint.
* app/core/gimpmarshal.list
* app/widgets/gimpcellrenderertoggle.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimppreview.c: use proper marshallers for signals
that take flags as parameters.
* app/core/gimpcontext.c: added the G_SIGNAL_TYPE_STATIC_SCOPE flag
to the GimpRGB signal parameter.
2003-03-20 Michael Natterer <mitch@gimp.org>
Removed deprecated and broken list views
......@@ -382,7 +382,7 @@ gimp_context_class_init (GimpContextClass *klass)
NULL, NULL,
gimp_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
GIMP_TYPE_COLOR);
GIMP_TYPE_COLOR | G_SIGNAL_TYPE_STATIC_SCOPE);
gimp_context_signals[BACKGROUND_CHANGED] =
g_signal_new ("background_changed",
......@@ -392,7 +392,7 @@ gimp_context_class_init (GimpContextClass *klass)
NULL, NULL,
gimp_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
GIMP_TYPE_COLOR);
GIMP_TYPE_COLOR | G_SIGNAL_TYPE_STATIC_SCOPE);
gimp_context_signals[OPACITY_CHANGED] =
g_signal_new ("opacity_changed",
......
......@@ -29,6 +29,7 @@ VOID: DOUBLE
VOID: ENUM
VOID: ENUM, OBJECT
VOID: ENUM, POINTER
VOID: FLAGS
VOID: INT
VOID: INT, INT
VOID: INT, INT, INT, INT
......@@ -36,6 +37,5 @@ VOID: OBJECT
VOID: OBJECT, INT
VOID: OBJECT, POINTER
VOID: POINTER
VOID: STRING, UINT
VOID: UINT
VOID: STRING, FLAGS
VOID: VOID
......@@ -134,10 +134,10 @@ gimp_cell_renderer_toggle_class_init (GimpCellRendererToggleClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpCellRendererToggleClass, clicked),
NULL, NULL,
gimp_marshal_VOID__STRING_UINT,
gimp_marshal_VOID__STRING_FLAGS,
G_TYPE_NONE, 2,
G_TYPE_STRING,
G_TYPE_UINT);
GDK_TYPE_MODIFIER_TYPE);
object_class->finalize = gimp_cell_renderer_toggle_finalize;
object_class->get_property = gimp_cell_renderer_toggle_get_property;
......
......@@ -131,10 +131,10 @@ gimp_cell_renderer_viewable_class_init (GimpCellRendererViewableClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpCellRendererViewableClass, clicked),
NULL, NULL,
gimp_marshal_VOID__STRING_UINT,
gimp_marshal_VOID__STRING_FLAGS,
G_TYPE_NONE, 2,
G_TYPE_STRING,
G_TYPE_UINT);
GDK_TYPE_MODIFIER_TYPE);
object_class->finalize = gimp_cell_renderer_viewable_finalize;
object_class->get_property = gimp_cell_renderer_viewable_get_property;
......
......@@ -151,9 +151,9 @@ gimp_preview_class_init (GimpPreviewClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpPreviewClass, extended_clicked),
NULL, NULL,
gimp_marshal_VOID__UINT,
gimp_marshal_VOID__FLAGS,
G_TYPE_NONE, 1,
G_TYPE_UINT);
GDK_TYPE_MODIFIER_TYPE);
preview_signals[CONTEXT] =
g_signal_new ("context",
......
......@@ -151,9 +151,9 @@ gimp_preview_class_init (GimpPreviewClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpPreviewClass, extended_clicked),
NULL, NULL,
gimp_marshal_VOID__UINT,
gimp_marshal_VOID__FLAGS,
G_TYPE_NONE, 1,
G_TYPE_UINT);
GDK_TYPE_MODIFIER_TYPE);
preview_signals[CONTEXT] =
g_signal_new ("context",
......
2003-03-20 Sven Neumann <sven@gimp.org>
* libgimpwidgets/libgimpwidgets.types
* libgimpwidgets/tmpl/gimpbutton.sgml
* libgimpwidgets/tmpl/gimppickbutton.sgml: improved.
2003-03-15 Sven Neumann <sven@gimp.org>
* structure.xml: added short notes about all the top-level
......
......@@ -4,6 +4,7 @@
#include "devel-docs/libgimpwidgets/libgimpwidgets-include.c"
gimp_button_get_type
gimp_chain_button_get_type
gimp_color_button_get_type
gimp_color_display_get_type
......
......@@ -2,11 +2,13 @@
GimpButton
<!-- ##### SECTION Short_Description ##### -->
A #GtkButton with a little extra functionality.
<!-- ##### SECTION Long_Description ##### -->
<para>
#GimpButton adds an extra signal to the #GtkButton widget that allows
to distinguish a normal click from a click that was performed with
modifier keys pressed.
</para>
<!-- ##### SECTION See_Also ##### -->
......@@ -37,3 +39,11 @@ GimpButton
@state:
<!-- ##### SIGNAL GimpButton::extended-clicked ##### -->
<para>
</para>
@gimpbutton: the object which received the signal.
@arg1: the state of modifier keys when the button was clicked
......@@ -2,11 +2,13 @@
GimpPickButton
<!-- ##### SECTION Short_Description ##### -->
Widget to pick a color from screen.
<!-- ##### SECTION Long_Description ##### -->
<para>
#GimpPickButton is a specialized button. When clicked, it changes the
cursor to a color-picker pipette and allows the user to pick a color
from any point on the screen.
</para>
<!-- ##### SECTION See_Also ##### -->
......@@ -34,5 +36,5 @@ GimpPickButton
</para>
@gimppickbutton: the object which received the signal.
@arg1:
@arg1: pointer to a #GimpRGB structure that holds the picked color
......@@ -95,9 +95,9 @@ gimp_button_class_init (GimpButtonClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpButtonClass, extended_clicked),
NULL, NULL,
g_cclosure_marshal_VOID__UINT,
g_cclosure_marshal_VOID__FLAGS,
G_TYPE_NONE, 1,
G_TYPE_UINT);
GDK_TYPE_MODIFIER_TYPE);
widget_class->button_press_event = gimp_button_button_press;
widget_class->button_release_event = gimp_button_button_release;
......@@ -134,8 +134,8 @@ gimp_button_new (void)
* Emits the button's "extended_clicked" signal.
**/
void
gimp_button_extended_clicked (GimpButton *button,
guint state)
gimp_button_extended_clicked (GimpButton *button,
GdkModifierType state)
{
g_return_if_fail (GIMP_IS_BUTTON (button));
......
......@@ -42,18 +42,18 @@ typedef struct _GimpButtonClass GimpButtonClass;
struct _GimpButton
{
GtkButton parent_instance;
GtkButton parent_instance;
/*< private >*/
guint press_state;
GdkModifierType press_state;
};
struct _GimpButtonClass
{
GtkButtonClass parent_class;
void (* extended_clicked) (GimpButton *preview,
guint modifier_state);
void (* extended_clicked) (GimpButton *preview,
GdkModifierType modifier_state);
};
......@@ -61,8 +61,8 @@ GType gimp_button_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_button_new (void);
void gimp_button_extended_clicked (GimpButton *button,
guint state);
void gimp_button_extended_clicked (GimpButton *button,
GdkModifierType state);
G_END_DECLS
......
......@@ -134,10 +134,10 @@ gimp_cell_renderer_toggle_class_init (GimpCellRendererToggleClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpCellRendererToggleClass, clicked),
NULL, NULL,
gimp_marshal_VOID__STRING_UINT,
gimp_marshal_VOID__STRING_FLAGS,
G_TYPE_NONE, 2,
G_TYPE_STRING,
G_TYPE_UINT);
GDK_TYPE_MODIFIER_TYPE);
object_class->finalize = gimp_cell_renderer_toggle_finalize;
object_class->get_property = gimp_cell_renderer_toggle_get_property;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment