2003-11-11 17:55:45 +00:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2001-11-16 14:13:10 +00:00
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
1999-10-31 21:00:32 +00:00
|
|
|
*
|
2000-02-26 03:41:06 +00:00
|
|
|
* gimpcolorbutton.h
|
2001-01-10 22:49:45 +00:00
|
|
|
* Copyright (C) 1999-2001 Sven Neumann
|
1999-10-31 21:00:32 +00:00
|
|
|
*
|
2009-01-17 22:28:01 +00:00
|
|
|
* This library is free software: you can redistribute it and/or
|
1999-11-17 21:13:50 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1999-10-31 21:00:32 +00:00
|
|
|
* License as published by the Free Software Foundation; either
|
2009-01-17 22:28:01 +00:00
|
|
|
* version 3 of the License, or (at your option) any later version.
|
2003-11-11 17:55:45 +00:00
|
|
|
*
|
|
|
|
* This library 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
|
1999-12-26 07:54:39 +00:00
|
|
|
* Lesser General Public License for more details.
|
1999-10-31 21:00:32 +00:00
|
|
|
*
|
1999-11-17 21:13:50 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2009-01-17 22:28:01 +00:00
|
|
|
* License along with this library. If not, see
|
2018-07-11 23:27:07 +02:00
|
|
|
* <https://www.gnu.org/licenses/>.
|
1999-10-31 21:00:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* This provides a button with a color preview. The preview
|
|
|
|
* can handle transparency by showing the checkerboard.
|
|
|
|
* On click, a color selector is opened, which is already
|
|
|
|
* fully functional wired to the preview button.
|
|
|
|
*/
|
|
|
|
|
2011-04-28 14:30:41 +02:00
|
|
|
#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
|
|
|
|
#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
1999-10-31 21:00:32 +00:00
|
|
|
#ifndef __GIMP_COLOR_BUTTON_H__
|
|
|
|
#define __GIMP_COLOR_BUTTON_H__
|
|
|
|
|
2001-09-21 10:47:19 +00:00
|
|
|
#include <libgimpwidgets/gimpbutton.h>
|
2001-01-15 06:24:24 +00:00
|
|
|
|
2001-11-22 23:46:13 +00:00
|
|
|
G_BEGIN_DECLS
|
1999-10-31 21:00:32 +00:00
|
|
|
|
|
|
|
|
2024-08-03 02:48:07 +00:00
|
|
|
#define GIMP_TYPE_COLOR_BUTTON (gimp_color_button_get_type ())
|
|
|
|
G_DECLARE_DERIVABLE_TYPE (GimpColorButton, gimp_color_button, GIMP, COLOR_BUTTON, GimpButton)
|
2001-01-15 06:24:24 +00:00
|
|
|
|
1999-10-31 21:00:32 +00:00
|
|
|
struct _GimpColorButtonClass
|
|
|
|
{
|
2001-09-21 10:47:19 +00:00
|
|
|
GimpButtonClass parent_class;
|
1999-10-31 21:00:32 +00:00
|
|
|
|
2004-11-04 12:15:49 +00:00
|
|
|
/* signals */
|
|
|
|
void (* color_changed) (GimpColorButton *button);
|
|
|
|
|
|
|
|
/* virtual functions */
|
|
|
|
GType (* get_action_type) (GimpColorButton *button);
|
2004-01-29 00:21:33 +00:00
|
|
|
|
|
|
|
/* Padding for future expansion */
|
2010-12-31 17:35:10 +01:00
|
|
|
void (* _gimp_reserved1) (void);
|
2004-01-29 00:21:33 +00:00
|
|
|
void (* _gimp_reserved2) (void);
|
|
|
|
void (* _gimp_reserved3) (void);
|
|
|
|
void (* _gimp_reserved4) (void);
|
2018-05-03 12:51:36 +02:00
|
|
|
void (* _gimp_reserved5) (void);
|
|
|
|
void (* _gimp_reserved6) (void);
|
|
|
|
void (* _gimp_reserved7) (void);
|
|
|
|
void (* _gimp_reserved8) (void);
|
1999-10-31 21:00:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2016-09-07 02:22:57 +02:00
|
|
|
GtkWidget * gimp_color_button_new (const gchar *title,
|
|
|
|
gint width,
|
|
|
|
gint height,
|
2023-11-24 15:35:50 +01:00
|
|
|
GeglColor *color,
|
2016-09-07 02:22:57 +02:00
|
|
|
GimpColorAreaType type);
|
|
|
|
|
|
|
|
void gimp_color_button_set_title (GimpColorButton *button,
|
|
|
|
const gchar *title);
|
|
|
|
const gchar * gimp_color_button_get_title (GimpColorButton *button);
|
|
|
|
|
|
|
|
void gimp_color_button_set_color (GimpColorButton *button,
|
2023-11-24 15:35:50 +01:00
|
|
|
GeglColor *color);
|
|
|
|
GeglColor * gimp_color_button_get_color (GimpColorButton *button);
|
2016-09-07 02:22:57 +02:00
|
|
|
|
|
|
|
gboolean gimp_color_button_has_alpha (GimpColorButton *button);
|
|
|
|
void gimp_color_button_set_type (GimpColorButton *button,
|
|
|
|
GimpColorAreaType type);
|
|
|
|
|
|
|
|
gboolean gimp_color_button_get_update (GimpColorButton *button);
|
|
|
|
void gimp_color_button_set_update (GimpColorButton *button,
|
|
|
|
gboolean continuous);
|
|
|
|
|
|
|
|
void gimp_color_button_set_color_config (GimpColorButton *button,
|
|
|
|
GimpColorConfig *config);
|
|
|
|
|
2023-03-09 02:24:35 +01:00
|
|
|
GSimpleActionGroup * gimp_color_button_get_action_group (GimpColorButton *button);
|
2003-11-11 17:55:45 +00:00
|
|
|
|
1999-10-31 21:00:32 +00:00
|
|
|
|
2001-11-23 00:15:42 +00:00
|
|
|
G_END_DECLS
|
1999-10-31 21:00:32 +00:00
|
|
|
|
2001-05-04 20:39:29 +00:00
|
|
|
#endif /* __GIMP_COLOR_BUTTON_H__ */
|