Add GimpPickButton implementation for Windows
Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/8506
This commit is contained in:
@ -316,6 +316,8 @@ EXTRA_DIST = \
|
||||
if PLATFORM_OSX_QUARTZ
|
||||
libgimpwidgets_sources += gimppickbutton-quartz.c gimppickbutton-quartz.h
|
||||
AM_CPPFLAGS += "-xobjective-c"
|
||||
else if PLATFORM_WIN32
|
||||
libgimpwidgets_sources += gimppickbutton-win32.c gimppickbutton-win32.h
|
||||
else
|
||||
libgimpwidgets_sources += \
|
||||
gimppickbutton-default.c \
|
||||
|
1136
libgimpwidgets/gimppickbutton-win32.c
Normal file
1136
libgimpwidgets/gimppickbutton-win32.c
Normal file
File diff suppressed because it is too large
Load Diff
23
libgimpwidgets/gimppickbutton-win32.h
Normal file
23
libgimpwidgets/gimppickbutton-win32.h
Normal file
@ -0,0 +1,23 @@
|
||||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimppickbutton-win32.h
|
||||
* Copyright (C) 2022 Luca Bacci <luca.bacci@outlook.com>
|
||||
*
|
||||
* 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
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* Private header file which is not meant to be exported. */
|
||||
#ifndef __GIMP_PICK_BUTTON_WIN32_H__
|
||||
#define __GIMP_PICK_BUTTON_WIN32_H__
|
||||
|
||||
void _gimp_pick_button_win32_pick (GimpPickButton *button);
|
||||
|
||||
#endif /* __GIMP_PICK_BUTTON_WIN32_H__ */
|
@ -34,12 +34,15 @@
|
||||
#include "gimphelpui.h"
|
||||
#include "gimpicons.h"
|
||||
#include "gimppickbutton.h"
|
||||
|
||||
#if defined (GDK_WINDOWING_QUARTZ)
|
||||
#include "gimppickbutton-quartz.h"
|
||||
#elif defined (GDK_WINDOWING_WIN32)
|
||||
#include "gimppickbutton-win32.h"
|
||||
#else
|
||||
#include "gimppickbutton-default.h"
|
||||
#include "gimppickbutton-kwin.h"
|
||||
#include "gimppickbutton-xdg.h"
|
||||
|
||||
#ifdef GDK_WINDOWING_QUARTZ
|
||||
#include "gimppickbutton-quartz.h"
|
||||
#endif
|
||||
|
||||
#include "libgimp/libgimp-intl.h"
|
||||
@ -142,9 +145,11 @@ gimp_pick_button_dispose (GObject *object)
|
||||
static void
|
||||
gimp_pick_button_clicked (GtkButton *button)
|
||||
{
|
||||
#ifdef GDK_WINDOWING_QUARTZ
|
||||
#if defined (GDK_WINDOWING_QUARTZ)
|
||||
_gimp_pick_button_quartz_pick (GIMP_PICK_BUTTON (button));
|
||||
#elif defined GDK_WINDOWING_X11
|
||||
#elif defined (GDK_WINDOWING_WIN32)
|
||||
_gimp_pick_button_win32_pick (GIMP_PICK_BUTTON (button));
|
||||
#elif defined (GDK_WINDOWING_X11)
|
||||
/* It's a bit weird as we use the default pick code both in first and
|
||||
* last cases. It's because when running GIMP on X11 in particular,
|
||||
* the portals don't return color space information. So the returned
|
||||
|
Reference in New Issue
Block a user