summaryrefslogtreecommitdiff
path: root/bindings/swig/package/swsearchable.i
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/swig/package/swsearchable.i')
-rw-r--r--bindings/swig/package/swsearchable.i25
1 files changed, 25 insertions, 0 deletions
diff --git a/bindings/swig/package/swsearchable.i b/bindings/swig/package/swsearchable.i
new file mode 100644
index 0000000..6f6cbde
--- /dev/null
+++ b/bindings/swig/package/swsearchable.i
@@ -0,0 +1,25 @@
+%{
+#include "swsearchable.h"
+%}
+
+%ignore sword::SWSearchable::search;
+%ignore sword::SWSearchable::createSearchFramework;
+%ignore sword::SWSearchable::nullPercent;
+
+%include "swsearchable.h"
+
+%extend sword::SWSearchable {
+ bool isSearchSupported(const char *istr, int searchType = 0,
+ int flags = 0,
+ SWKey * scope = 0) {
+ bool checksupported = true;
+ self->search(istr, searchType, flags, scope, &checksupported);
+ return checksupported;
+ }
+
+ ListKey &doSearch(const char *istr, int searchType = 0, int flags = 0,
+ SWKey *scope = 0) {
+ return self->search(istr, searchType, flags, scope);
+ }
+};
+