[gimp] plug-ins: remove ddsplugin.h and add ddsread.h and ddswrite.h
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: remove ddsplugin.h and add ddsread.h and ddswrite.h
- Date: Wed, 2 Oct 2019 18:54:37 +0000 (UTC)
commit 871a31f70c15370217ffbfc4ad429cfda6328370
Author: Michael Natterer <mitch gimp org>
Date: Wed Oct 2 20:54:16 2019 +0200
plug-ins: remove ddsplugin.h and add ddsread.h and ddswrite.h
plug-ins/file-dds/Makefile.am | 3 ++-
plug-ins/file-dds/dds.c | 11 ++++++++-
plug-ins/file-dds/dds.h | 19 ++++++++++++----
plug-ins/file-dds/ddsread.c | 2 +-
plug-ins/file-dds/ddsread.h | 32 +++++++++++++++++++++++++++
plug-ins/file-dds/ddswrite.c | 23 +++++++++----------
plug-ins/file-dds/{ddsplugin.h => ddswrite.h} | 26 +++-------------------
7 files changed, 73 insertions(+), 43 deletions(-)
---
diff --git a/plug-ins/file-dds/Makefile.am b/plug-ins/file-dds/Makefile.am
index 267eeeaf3e..58d06baebe 100644
--- a/plug-ins/file-dds/Makefile.am
+++ b/plug-ins/file-dds/Makefile.am
@@ -31,9 +31,10 @@ file_dds_SOURCES = \
dds.h \
color.c \
color.h \
- ddsplugin.h \
ddsread.c \
+ ddsread.h \
ddswrite.c \
+ ddswrite.h \
dxt.c \
dxt.h \
dxt_tables.h \
diff --git a/plug-ins/file-dds/dds.c b/plug-ins/file-dds/dds.c
index 0186325cdc..58e585e3bc 100644
--- a/plug-ins/file-dds/dds.c
+++ b/plug-ins/file-dds/dds.c
@@ -33,11 +33,20 @@
#include <libgimp/stdplugins-intl.h>
-#include "ddsplugin.h"
#include "dds.h"
+#include "ddsread.h"
+#include "ddswrite.h"
#include "misc.h"
+#define LOAD_PROC "file-dds-load"
+#define SAVE_PROC "file-dds-save"
+
+#define DECODE_YCOCG_PROC "color-decode-ycocg"
+#define DECODE_YCOCG_SCALED_PROC "color-decode-ycocg-scaled"
+#define DECODE_ALPHA_EXP_PROC "color-decode-alpha-exp"
+
+
typedef struct _Dds Dds;
typedef struct _DdsClass DdsClass;
diff --git a/plug-ins/file-dds/dds.h b/plug-ins/file-dds/dds.h
index 8442c53bec..ef65ea0776 100644
--- a/plug-ins/file-dds/dds.h
+++ b/plug-ins/file-dds/dds.h
@@ -21,11 +21,22 @@
#ifndef __DDS_H__
#define __DDS_H__
+#define DDS_PLUGIN_VERSION_MAJOR 3
+#define DDS_PLUGIN_VERSION_MINOR 9
+#define DDS_PLUGIN_VERSION_REVISION 90
+
+#define DDS_PLUGIN_VERSION \
+ ((guint) (DDS_PLUGIN_VERSION_MAJOR << 16) | \
+ (guint) (DDS_PLUGIN_VERSION_MINOR << 8) | \
+ (guint) (DDS_PLUGIN_VERSION_REVISION))
+
+
#define FOURCC(a, b, c, d) \
- ((unsigned int)((unsigned int)(a) ) | \
- ((unsigned int)(b) << 8) | \
- ((unsigned int)(c) << 16) | \
- ((unsigned int)(d) << 24))
+ ((guint) ((guint)(a) ) | \
+ ((guint)(b) << 8) | \
+ ((guint)(c) << 16) | \
+ ((guint)(d) << 24))
+
typedef enum
{
diff --git a/plug-ins/file-dds/ddsread.c b/plug-ins/file-dds/ddsread.c
index e03dd5f6fe..b0aef5d416 100644
--- a/plug-ins/file-dds/ddsread.c
+++ b/plug-ins/file-dds/ddsread.c
@@ -42,7 +42,7 @@
#include <libgimp/stdplugins-intl.h>
-#include "ddsplugin.h"
+#include "ddsread.h"
#include "dds.h"
#include "dxt.h"
#include "endian_rw.h"
diff --git a/plug-ins/file-dds/ddsread.h b/plug-ins/file-dds/ddsread.h
new file mode 100644
index 0000000000..10757cc6ec
--- /dev/null
+++ b/plug-ins/file-dds/ddsread.h
@@ -0,0 +1,32 @@
+/*
+ * DDS GIMP plugin
+ *
+ * Copyright (C) 2004-2012 Shawn Kirst <skirst gmail com>,
+ * with parts (C) 2003 Arne Reuter <homepage arnereuter de> where specified.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef __DDSREAD_H__
+#define __DDSREAD_H__
+
+
+extern GimpPDBStatusType read_dds (GFile *file,
+ GimpImage **image,
+ gboolean interactive,
+ GimpProcedure *procedure,
+ GObject *config);
+
+
+#endif /* __DDSREAD_H__ */
diff --git a/plug-ins/file-dds/ddswrite.c b/plug-ins/file-dds/ddswrite.c
index 401f5e2b9d..b25f1827f1 100644
--- a/plug-ins/file-dds/ddswrite.c
+++ b/plug-ins/file-dds/ddswrite.c
@@ -35,7 +35,7 @@
#include <libgimp/stdplugins-intl.h>
-#include "ddsplugin.h"
+#include "ddswrite.h"
#include "dds.h"
#include "dxt.h"
#include "mipmap.h"
@@ -1936,24 +1936,21 @@ save_dialog (GimpImage *image,
GimpProcedure *procedure,
GObject *config)
{
- GtkWidget *dialog;
- GtkWidget *vbox;
- GtkWidget *hbox;
- GtkWidget *grid;
- GtkListStore *store;
- GtkWidget *opt;
- GtkWidget *check;
- GtkWidget *frame;
- GimpImageBaseType basetype;
- gboolean run;
+ GtkWidget *dialog;
+ GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *grid;
+ GtkListStore *store;
+ GtkWidget *opt;
+ GtkWidget *check;
+ GtkWidget *frame;
+ gboolean run;
if (is_cubemap || is_volume || is_array)
g_object_set (config,
"save-type", DDS_SAVE_SELECTED_LAYER,
NULL);
- basetype = gimp_image_base_type (image);
-
dialog = gimp_procedure_dialog_new (procedure,
GIMP_PROCEDURE_CONFIG (config),
_("Export Image as DDS"));
diff --git a/plug-ins/file-dds/ddsplugin.h b/plug-ins/file-dds/ddswrite.h
similarity index 55%
rename from plug-ins/file-dds/ddsplugin.h
rename to plug-ins/file-dds/ddswrite.h
index a75f034a05..414850d73b 100644
--- a/plug-ins/file-dds/ddsplugin.h
+++ b/plug-ins/file-dds/ddswrite.h
@@ -18,23 +18,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-#ifndef __DDSPLUGIN_H__
-#define __DDSPLUGIN_H__
+#ifndef __DDSWRITE_H__
+#define __DDSWRITE_H__
-#define DDS_PLUGIN_VERSION_MAJOR 3
-#define DDS_PLUGIN_VERSION_MINOR 9
-#define DDS_PLUGIN_VERSION_REVISION 90
-#define DDS_PLUGIN_VERSION \
- ((unsigned int)(DDS_PLUGIN_VERSION_MAJOR << 16) | \
- (unsigned int)(DDS_PLUGIN_VERSION_MINOR << 8) | \
- (unsigned int)(DDS_PLUGIN_VERSION_REVISION))
-
-extern GimpPDBStatusType read_dds (GFile *file,
- GimpImage **image,
- gboolean interactive,
- GimpProcedure *procedure,
- GObject *config);
extern GimpPDBStatusType write_dds (GFile *file,
GimpImage *image,
GimpDrawable *drawable,
@@ -43,11 +30,4 @@ extern GimpPDBStatusType write_dds (GFile *file,
GObject *config);
-#define LOAD_PROC "file-dds-load"
-#define SAVE_PROC "file-dds-save"
-
-#define DECODE_YCOCG_PROC "color-decode-ycocg"
-#define DECODE_YCOCG_SCALED_PROC "color-decode-ycocg-scaled"
-#define DECODE_ALPHA_EXP_PROC "color-decode-alpha-exp"
-
-#endif /* __DDSPLUGIN_H__ */
+#endif /* __DDSWRITE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]