gnome-scan r740 - in trunk: . modules/gsane
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r740 - in trunk: . modules/gsane
- Date: Tue, 23 Dec 2008 22:20:14 +0000 (UTC)
Author: bersace
Date: Tue Dec 23 22:20:14 2008
New Revision: 740
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=740&view=rev
Log:
Added primary hint handler.
Added:
trunk/modules/gsane/gsane-option-primary.c
trunk/modules/gsane/gsane-option-primary.h
Modified:
trunk/ChangeLog
trunk/modules/gsane/Makefile.am
trunk/modules/gsane/gsane-module.c
trunk/modules/gsane/gsane-option-handler.c
Modified: trunk/modules/gsane/Makefile.am
==============================================================================
--- trunk/modules/gsane/Makefile.am (original)
+++ trunk/modules/gsane/Makefile.am Tue Dec 23 22:20:14 2008
@@ -20,6 +20,8 @@
gsane-option-handler-generic.c \
gsane-option-source.h \
gsane-option-source.c \
+ gsane-option-primary.h \
+ gsane-option-primary.c \
gsane-option-manager.h \
gsane-option-manager.c \
gsane-processor.h \
Modified: trunk/modules/gsane/gsane-module.c
==============================================================================
--- trunk/modules/gsane/gsane-module.c (original)
+++ trunk/modules/gsane/gsane-module.c Tue Dec 23 22:20:14 2008
@@ -31,6 +31,7 @@
#include "gsane-option-manager.h"
#include "gsane-option-handler-generic.h"
#include "gsane-option-source.h"
+#include "gsane-option-primary.h"
#include "gsane-backend.h"
#include "gsane-scanner.h"
@@ -66,6 +67,7 @@
gsane_option_manager_add_rule_by_type(gsane_option_manager, SANE_TYPE_FIXED, GSANE_TYPE_OPTION_HANDLER_GENERIC);
gsane_option_manager_add_rule_by_type(gsane_option_manager, SANE_TYPE_STRING, GSANE_TYPE_OPTION_HANDLER_GENERIC);
gsane_option_manager_add_rules_by_name(gsane_option_manager, GSANE_TYPE_OPTION_SOURCE, "source", "doc-source", NULL);
+ gsane_option_manager_add_rules_by_name(gsane_option_manager, GSANE_TYPE_OPTION_PRIMARY, "resolution", "mode", NULL);
}
G_MODULE_EXPORT void
Modified: trunk/modules/gsane/gsane-option-handler.c
==============================================================================
--- trunk/modules/gsane/gsane-option-handler.c (original)
+++ trunk/modules/gsane/gsane-option-handler.c Tue Dec 23 22:20:14 2008
@@ -392,7 +392,7 @@
.value_table = NULL,
};
static GTypeFundamentalInfo finfo = {
- .type_flags = G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE,
+ .type_flags = G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE,
};
if (G_UNLIKELY(type == 0)) {
Added: trunk/modules/gsane/gsane-option-primary.c
==============================================================================
--- (empty file)
+++ trunk/modules/gsane/gsane-option-primary.c Tue Dec 23 22:20:14 2008
@@ -0,0 +1,36 @@
+/* GSane - SANE GNOME Scan backend
+ * Copyright  2007-2008 Ãtienne Bersac <bersace gnome org>
+ *
+ * GSane is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * GSane 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GSane. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#include "gsane-option-primary.h"
+
+G_DEFINE_TYPE(GSaneOptionPrimary, gsane_option_primary, GSANE_TYPE_OPTION_HANDLER_GENERIC)
+
+static void
+gsane_option_primary_init(GSaneOptionPrimary* self)
+{
+}
+
+static void
+gsane_option_primary_class_init(GSaneOptionPrimaryClass *klass)
+{
+ GSaneOptionHandlerGenericClass* hg_class = GSANE_OPTION_HANDLER_GENERIC_CLASS(klass);
+ hg_class->option_hint = GNOME_SCAN_OPTION_HINT_PRIMARY;
+}
Added: trunk/modules/gsane/gsane-option-primary.h
==============================================================================
--- (empty file)
+++ trunk/modules/gsane/gsane-option-primary.h Tue Dec 23 22:20:14 2008
@@ -0,0 +1,48 @@
+/* GSane - SANE GNOME Scan backend
+ * Copyright  2007-2008 Ãtienne Bersac <bersace gnome org>
+ *
+ * GSane is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * GSane 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GSane. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GSANE_OPTION_PRIMARY_H_
+#define _GSANE_OPTION_PRIMARY_H_
+
+#include "gsane-option-handler-generic.h"
+
+G_BEGIN_DECLS
+
+#define GSANE_TYPE_OPTION_PRIMARY (gsane_option_primary_get_type())
+#define GSANE_OPTION_PRIMARY(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GSANE_TYPE_OPTION_PRIMARY, GSaneOptionPrimary))
+#define GSANE_OPTION_PRIMARY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSANE_TYPE_OPTION_PRIMARY, GSaneOptionPrimaryClass))
+
+typedef struct _GSaneOptionPrimaryClass GSaneOptionPrimaryClass;
+typedef struct _GSaneOptionPrimary GSaneOptionPrimary;
+
+struct _GSaneOptionPrimaryClass {
+ GSaneOptionHandlerGenericClass parent_class;
+};
+
+struct _GSaneOptionPrimary {
+ GSaneOptionHandlerGenericClass parent_instance;
+};
+
+GType gsane_option_primary_get_type(void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]