[gimp] libgimpwidgets: add private headers for GimpPickButton implementations.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpwidgets: add private headers for GimpPickButton implementations.
- Date: Fri, 8 Dec 2017 23:07:56 +0000 (UTC)
commit ef6559b38f965f8877756a0ea7507ec5a33b3be2
Author: Jehan <jehan girinstud io>
Date: Fri Dec 8 23:57:09 2017 +0100
libgimpwidgets: add private headers for GimpPickButton implementations.
Though forward declarations of the implementations are ok, it is cleaner
to have proper header files for each variant (default, kwin, quartz
right now). Of course these new header files are not installed and must
be kept private for build only.
libgimpwidgets/Makefile.am | 8 ++++++--
libgimpwidgets/gimppickbutton-default.c | 3 +--
libgimpwidgets/gimppickbutton-default.h | 25 +++++++++++++++++++++++++
libgimpwidgets/gimppickbutton-kwin.c | 7 ++-----
libgimpwidgets/gimppickbutton-kwin.h | 25 +++++++++++++++++++++++++
libgimpwidgets/gimppickbutton-quartz.c | 4 +---
libgimpwidgets/gimppickbutton-quartz.h | 25 +++++++++++++++++++++++++
libgimpwidgets/gimppickbutton.c | 12 ++++++------
8 files changed, 91 insertions(+), 18 deletions(-)
---
diff --git a/libgimpwidgets/Makefile.am b/libgimpwidgets/Makefile.am
index 8703a3e..032be6e 100644
--- a/libgimpwidgets/Makefile.am
+++ b/libgimpwidgets/Makefile.am
@@ -293,10 +293,14 @@ EXTRA_DIST = \
if PLATFORM_OSX_QUARTZ
-libgimpwidgets_sources += gimppickbutton-quartz.c
+libgimpwidgets_sources += gimppickbutton-quartz.c gimppickbutton-quartz.h
AM_CPPFLAGS += "-xobjective-c"
else
-libgimpwidgets_sources += gimppickbutton-default.c gimppickbutton-kwin.c
+libgimpwidgets_sources += \
+ gimppickbutton-default.c \
+ gimppickbutton-default.h \
+ gimppickbutton-kwin.c \
+ gimppickbutton-kwin.h
endif
diff --git a/libgimpwidgets/gimppickbutton-default.c b/libgimpwidgets/gimppickbutton-default.c
index 28c7713..795c05a 100644
--- a/libgimpwidgets/gimppickbutton-default.c
+++ b/libgimpwidgets/gimppickbutton-default.c
@@ -35,6 +35,7 @@
#include "gimphelpui.h"
#include "gimpicons.h"
#include "gimppickbutton.h"
+#include "gimppickbutton-default.h"
#include "gimpwidgetsutils.h"
#include "cursors/gimp-color-picker-cursors.c"
@@ -60,8 +61,6 @@ static void gimp_pick_button_pick (GdkScreen *screen,
gint y_root,
GimpPickButton *button);
-void _gimp_pick_button_default_pick (GimpPickButton *button);
-
static GdkCursor *
make_cursor (GdkDisplay *display)
diff --git a/libgimpwidgets/gimppickbutton-default.h b/libgimpwidgets/gimppickbutton-default.h
new file mode 100644
index 0000000..53e5371
--- /dev/null
+++ b/libgimpwidgets/gimppickbutton-default.h
@@ -0,0 +1,25 @@
+/* LIBGIMP - The GIMP Library
+ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
+ *
+ * gimppickbutton-default.h
+ * Copyright (C) 2017 Jehan <jehan gimp org>
+ *
+ * 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+/* Private header file which is not meant to be exported. */
+#ifndef __GIMP_PICK_BUTTON_DEFAULT_H__
+#define __GIMP_PICK_BUTTON_DEFAULT_H__
+
+void _gimp_pick_button_default_pick (GimpPickButton *button);
+
+#endif /* __GIMP_PICK_BUTTON_DEFAULT_H__ */
+
+
diff --git a/libgimpwidgets/gimppickbutton-kwin.c b/libgimpwidgets/gimppickbutton-kwin.c
index ea95806..9842c4d 100644
--- a/libgimpwidgets/gimppickbutton-kwin.c
+++ b/libgimpwidgets/gimppickbutton-kwin.c
@@ -23,14 +23,11 @@
#include "gimpwidgetstypes.h"
#include "gimppickbutton.h"
+#include "gimppickbutton-default.h"
+#include "gimppickbutton-kwin.h"
#include "libgimp/libgimp-intl.h"
-void _gimp_pick_button_default_pick (GimpPickButton *button);
-
-gboolean _gimp_pick_button_kwin_available (void);
-void _gimp_pick_button_kwin_pick (GimpPickButton *button);
-
gboolean
_gimp_pick_button_kwin_available (void)
{
diff --git a/libgimpwidgets/gimppickbutton-kwin.h b/libgimpwidgets/gimppickbutton-kwin.h
new file mode 100644
index 0000000..25726a9
--- /dev/null
+++ b/libgimpwidgets/gimppickbutton-kwin.h
@@ -0,0 +1,25 @@
+/* LIBGIMP - The GIMP Library
+ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
+ *
+ * gimppickbutton-kwin.h
+ * Copyright (C) 2017 Jehan <jehan gimp org>
+ *
+ * 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+/* Private header file which is not meant to be exported. */
+#ifndef __GIMP_PICK_BUTTON_KWIN_H__
+#define __GIMP_PICK_BUTTON_KWIN_H__
+
+gboolean _gimp_pick_button_kwin_available (void);
+void _gimp_pick_button_kwin_pick (GimpPickButton *button);
+
+#endif /* __GIMP_PICK_BUTTON_KWIN_H__ */
+
diff --git a/libgimpwidgets/gimppickbutton-quartz.c b/libgimpwidgets/gimppickbutton-quartz.c
index 7241a2d..acf5577 100644
--- a/libgimpwidgets/gimppickbutton-quartz.c
+++ b/libgimpwidgets/gimppickbutton-quartz.c
@@ -24,6 +24,7 @@
#include "gimpwidgetstypes.h"
#include "gimppickbutton.h"
+#include "gimppickbutton-quartz.h"
#include "cursors/gimp-color-picker-cursors.c"
@@ -34,9 +35,6 @@
#endif
-void _gimp_pick_button_quartz_pick (GimpPickButton *button);
-
-
@interface GimpPickWindowController : NSObject
{
GimpPickButton *button;
diff --git a/libgimpwidgets/gimppickbutton-quartz.h b/libgimpwidgets/gimppickbutton-quartz.h
new file mode 100644
index 0000000..f1e7563
--- /dev/null
+++ b/libgimpwidgets/gimppickbutton-quartz.h
@@ -0,0 +1,25 @@
+/* LIBGIMP - The GIMP Library
+ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
+ *
+ * gimppickbutton-quartz.h
+ * Copyright (C) 2017 Jehan <jehan gimp org>
+ *
+ * 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+/* Private header file which is not meant to be exported. */
+#ifndef __GIMP_PICK_BUTTON_QUARTZ_H__
+#define __GIMP_PICK_BUTTON_QUARTZ_H__
+
+void _gimp_pick_button_quartz_pick (GimpPickButton *button);
+
+#endif /* __GIMP_PICK_BUTTON_QUARTZ_H__ */
+
+
diff --git a/libgimpwidgets/gimppickbutton.c b/libgimpwidgets/gimppickbutton.c
index 87523af..4499269 100644
--- a/libgimpwidgets/gimppickbutton.c
+++ b/libgimpwidgets/gimppickbutton.c
@@ -30,6 +30,12 @@
#include "gimphelpui.h"
#include "gimpicons.h"
#include "gimppickbutton.h"
+#include "gimppickbutton-default.h"
+#include "gimppickbutton-kwin.h"
+
+#ifdef GDK_WINDOWING_QUARTZ
+#include "gimppickbutton-quartz.h"
+#endif
#include "libgimp/libgimp-intl.h"
@@ -50,12 +56,6 @@ enum
LAST_SIGNAL
};
-/* entry points to gimppickbutton-{default,kwin,quartz}.c */
-void _gimp_pick_button_default_pick (GimpPickButton *button);
-gboolean _gimp_pick_button_kwin_available (void);
-void _gimp_pick_button_kwin_pick (GimpPickButton *button);
-void _gimp_pick_button_quartz_pick (GimpPickButton *button);
-
static void gimp_pick_button_dispose (GObject *object);
static void gimp_pick_button_clicked (GtkButton *button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]