diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2022-07-14 15:21:56 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2022-07-15 10:14:57 +0200 |
commit | fe56f701d772b2ffb9369bc5fcffd14a1826d770 (patch) | |
tree | d2cc6e4571e2b814639086ec9942b12ac0da0c28 /tdegtk | |
parent | 83f3d0a1115dfecaaab4cd784a436f53de22aeec (diff) | |
download | gtk3-tqt-engine-fe56f701d772b2ffb9369bc5fcffd14a1826d770.tar.gz gtk3-tqt-engine-fe56f701d772b2ffb9369bc5fcffd14a1826d770.zip |
Conversion to the cmake building system.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdegtk')
-rw-r--r-- | tdegtk/CMakeLists.txt | 69 | ||||
-rw-r--r-- | tdegtk/tdegtk-draw.cpp | 2 | ||||
-rw-r--r-- | tdegtk/tdegtk-tabwidgetdata.h | 2 | ||||
-rw-r--r-- | tdegtk/tdegtk-theme.cpp | 23 |
4 files changed, 83 insertions, 13 deletions
diff --git a/tdegtk/CMakeLists.txt b/tdegtk/CMakeLists.txt new file mode 100644 index 0000000..0737888 --- /dev/null +++ b/tdegtk/CMakeLists.txt @@ -0,0 +1,69 @@ +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} + ${CAIRO_INCLUDE_DIRS} + ${GTK3_INCLUDE_DIRS} + ${PANGO_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} + ${CAIRO_LIBARY_DIRS} + ${GTK3_LIBRARY_DIRS} + ${PANGO_LIBRARY_DIRS} +) + + +##### tqtcairo (shared) + +tde_add_library( tqtcairo SHARED AUTOMOC + + SOURCES + tqtcairopainter.cpp + + LINK + tdeui-shared + ${GLADE_LIBRARIES} + ${GTK3_LIBRARIES} + + VERSION 0.0.0 + + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### tdegtk (shared) + +tde_add_library( tdegtk SHARED AUTOMOC + + SOURCES + exponential-blur.c + gtkroundedbox.c + tdegtk-cairo-support.c + tdegtk-draw.cpp + tdegtk-engine.c + tdegtk-support.c + tdegtk-hooks.cpp + tdegtk-signals.cpp + tdegtk-widgetlookup.cpp + tdegtk-utils.cpp + tdegtk-tabwidgetdata.cpp + tdegtk-animations.cpp + tdegtk-baseengine.cpp + tdegtk-theme.cpp + + LINK + tdecore-shared + tdeui-shared + tqtcairo-shared + ${GLADE_LIBRARIES} + ${GTK3_LIBRARIES} + + VERSION 0.0.0 + + DESTINATION ${GTK3_LIBDIR}/gtk-3.0/${GTK3_BIN_VERSION}/theming-engines +) diff --git a/tdegtk/tdegtk-draw.cpp b/tdegtk/tdegtk-draw.cpp index 33cd63b..61548e1 100644 --- a/tdegtk/tdegtk-draw.cpp +++ b/tdegtk/tdegtk-draw.cpp @@ -1727,7 +1727,7 @@ tdegtk_draw_common_frame (DRAW_ARGS) state = gtk_theming_engine_get_state(engine); widget = m_widgetLookup.find(cr, path); - TQString widgetPath(Gtk::gtk_widget_path(widget)); + TQString widgetPath(Gtk::gtk_widget_path(widget).c_str()); if (gtk_theming_engine_has_class(engine, GTK_STYLE_CLASS_SCROLLBAR)) { #ifdef DRAW_SCROLLBAR_PIECES_INSTEAD_OF_ENTIRE_BAR diff --git a/tdegtk/tdegtk-tabwidgetdata.h b/tdegtk/tdegtk-tabwidgetdata.h index e7284bf..fb2a243 100644 --- a/tdegtk/tdegtk-tabwidgetdata.h +++ b/tdegtk/tdegtk-tabwidgetdata.h @@ -1,5 +1,5 @@ #ifndef tdegtk_tabwidgetdata_h -#define tdegtk_widgetdata_h +#define tdegtk_tabwidgetdata_h /* * this file was largely taken from the oxygen gtk engine * Copyright (c) 2010 Hugo Pereira Da Costa <hugo@oxygen-icons.org> diff --git a/tdegtk/tdegtk-theme.cpp b/tdegtk/tdegtk-theme.cpp index 842c10d..aa7751e 100644 --- a/tdegtk/tdegtk-theme.cpp +++ b/tdegtk/tdegtk-theme.cpp @@ -48,23 +48,24 @@ bool m_scrollbarBack2 = false; bool m_scrollbarForward2 = false; #include <gmodule.h> +#include <kdemacros.h> extern "C" { #include <gtk/gtk.h> #include "tdegtk-engine.h" - G_MODULE_EXPORT void theme_init(GTypeModule *module); + KDE_EXPORT void theme_init(GTypeModule *module); - G_MODULE_EXPORT void theme_exit(void); + KDE_EXPORT void theme_exit(void); - G_MODULE_EXPORT GtkThemingEngine* create_engine(void); + KDE_EXPORT GtkThemingEngine* create_engine(void); - G_MODULE_EXPORT void theme_init(GTypeModule *module) { + KDE_EXPORT void theme_init(GTypeModule *module) { tdegtk_engine_register_types(module); } - G_MODULE_EXPORT void theme_exit(void) { + KDE_EXPORT void theme_exit(void) { // } } @@ -200,7 +201,7 @@ TQString tdeFindDir(const TQString& suffix, const TQString& file1, const TQStrin } TQString runCommand(const TQString& command) { - FILE* p = popen(command.latin1(), "r"); + FILE* p = popen(command.local8Bit(), "r"); if (p == NULL) { return TQString(); } @@ -344,7 +345,7 @@ GtkIconSet* generateIconSet(const std::string& gtkIconName, const std::string& t // loop over provided path to see if at least one icon is found for (TQStringList::const_iterator pathIter = pathList.begin(); pathIter != pathList.end(); ++pathIter) { - std::string filename((*pathIter + '/' + iconFileStream.str()).latin1()); + std::string filename((*pathIter + '/' + iconFileStream.str().c_str()).local8Bit()); if (!std::ifstream(filename.c_str())) { continue; } @@ -410,7 +411,7 @@ void setColour(TQString name, TQString state, TQColor color, TQString widgetType if (state == ":normal") { state = ""; } - gtk3_tqt_load_resource_string(parse_rc_string(name + ": " + colorString(color), widgetTypes + state).latin1()); + gtk3_tqt_load_resource_string(parse_rc_string(name + ": " + colorString(color), widgetTypes + state).local8Bit()); } static TQStringList iconInheritsDirs(const TQString& icondir) { @@ -756,7 +757,7 @@ void writeGtkThemeControlFile(int forceRecreate) { // This cache matches the current icon theme and style themeFile.close(); - gtk3_tqt_reload_theme_definition_file(themeFilePath.latin1()); + gtk3_tqt_reload_theme_definition_file(themeFilePath.local8Bit()); return; } @@ -766,7 +767,7 @@ void writeGtkThemeControlFile(int forceRecreate) { if (gtk3TQtDebug) { // Load possibly modified theme control file before writing a new one - gtk3_tqt_reload_theme_definition_file(themeFilePath.latin1()); + gtk3_tqt_reload_theme_definition_file(themeFilePath.local8Bit()); } themeFile.open(IO_WriteOnly | IO_Truncate); @@ -1029,7 +1030,7 @@ void writeGtkThemeControlFile(int forceRecreate) { themeFile.close(); if (!gtk3TQtDebug) { - gtk3_tqt_reload_theme_definition_file(themeFilePath.latin1()); + gtk3_tqt_reload_theme_definition_file(themeFilePath.local8Bit()); } } // ========================================================================================================= |