diff --git a/Makefile b/Makefile index 19aa5b1..fbadc33 100644 --- a/Makefile +++ b/Makefile @@ -86,7 +86,7 @@ LINKER = g++ GTKFLAGS = `pkg-config --cflags gtk+-3.0 gladeui-2.0 gtksourceview-3.0` GTKLIBS = `pkg-config --libs gtk+-3.0 gladeui-2.0 gtksourceview-3.0` -COMPILER_FLAGS = -Wall -c -std=c++11 -fpic -o +COMPILER_FLAGS = -DWITH_GTKSOURCEVIEW=1 -Wall -c -std=c++11 -fpic -o LINKER_FLAGS = -shared ${GTKLIBS} LINKER_DEPENDENCIES = -lphpcpp diff --git a/main.cpp b/main.cpp index 93bf2a7..2dbdb56 100644 --- a/main.cpp +++ b/main.cpp @@ -3095,6 +3095,7 @@ extern "C" gtkarrowtype.constant("RIGHT", (int)GTK_ARROW_RIGHT); gtkarrowtype.constant("NONE", (int)GTK_ARROW_NONE); +#ifdef WITH_GTKSOURCEVIEW // GtkSourceSmartHomeEndType Php::Class gtksourcesmarthomeendtype("GtkSourceSmartHomeEndType"); @@ -3159,7 +3160,7 @@ extern "C" gtksourceview.method<&GtkSourceView_::get_gutter>("get_gutter"); gtksourceview.method<&GtkSourceView_::set_background_pattern>("set_background_pattern"); gtksourceview.method<&GtkSourceView_::get_background_pattern>("get_background_pattern"); - +#endif @@ -3370,12 +3371,14 @@ extern "C" extension.add(std::move(gtkarrowtype)); +#ifdef WITH_GTKSOURCEVIEW // GtkSourceView extension.add(std::move(gtksourcesmarthomeendtype)); extension.add(std::move(gtksourcedrawspacesflags)); extension.add(std::move(gtksourcebackgroundpatterntype)); extension.add(std::move(gtksourceview)); - +#endif + // return the extension return extension; } diff --git a/main.h b/main.h index 5bc1beb..dfc19a1 100644 --- a/main.h +++ b/main.h @@ -263,12 +263,12 @@ #include "src/GtkArrowType.h" // #include "src/GtkMenuButton.h" - +#ifdef WITH_GTKSOURCEVIEW #include "src/GtkSourceSmartHomeEndType.h" #include "src/GtkSourceDrawSpacesFlags.h" #include "src/GtkSourceBackgroundPatternType.h" #include "src/GtkSourceView.h" - +#endif GValue phpgtk_get_gvalue(Php::Value phpgtk_value, GType type_column); diff --git a/src/GdkEvent.h b/src/GdkEvent.h index 1b44049..12bf989 100644 --- a/src/GdkEvent.h +++ b/src/GdkEvent.h @@ -32,8 +32,6 @@ * Populate GdkEvent to PHPGTK::GDKEVENT */ void populate(GdkEvent *event); - - Php::Value __get(const Php::Value &name); }; #endif \ No newline at end of file