Commit ef6559b3 authored by Jehan's avatar Jehan

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.
parent 06bbf3e4
......@@ -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
......
......@@ -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)
......
/* 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__ */
......@@ -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)
{
......
/* 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__ */
......@@ -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;
......
/* 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__ */
......@@ -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);
......
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