summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-05-10 16:53:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-05-10 16:53:18 +0300
commit62df0036431a1d507cf7749f639c86d0cbf9b2fb (patch)
tree6c4040b69e41b9260905b946a0a6c1c6445b2e7b
parent194c1f7f232cf5692f091ce51c0fb9098cd75f0e (diff)
base UI code that compiles
-rw-r--r--src/mir_core/mir_core.mk168
-rw-r--r--src/mir_core/mir_core.project5
-rw-r--r--src/mir_core/src/Linux/CCtrlBase.cpp72
-rw-r--r--src/mir_core/src/Linux/CDlgBase.cpp276
4 files changed, 126 insertions, 395 deletions
diff --git a/src/mir_core/mir_core.mk b/src/mir_core/mir_core.mk
index 875f47a2da..fa62392e26 100644
--- a/src/mir_core/mir_core.mk
+++ b/src/mir_core/mir_core.mk
@@ -38,7 +38,7 @@ PreprocessOnlySwitch :=-E
ObjectsFileList :=$(IntermediateDirectory)/ObjectsList.txt
PCHCompileFlags :=
LinkOptions := $(shell wx-config --libs --unicode=yes)
-IncludePath := $(IncludeSwitch). $(IncludeSwitch). $(IncludeSwitch)../../include $(IncludeSwitch)"`pkg-config --cflags --libs elementary`"
+IncludePath := $(IncludeSwitch). $(IncludeSwitch). $(IncludeSwitch)../../include
IncludePCH :=
RcIncludePath :=
Libs :=
@@ -52,8 +52,8 @@ LibPath := $(LibraryPathSwitch).
AR := ar rcus
CXX := g++
CC := gcc
-CXXFLAGS := -g $(shell wx-config --cxxflags --unicode=yes) -fPIC $(Preprocessors)
-CFLAGS := -g $(shell wx-config --cxxflags --unicode=yes) -fPIC $(Preprocessors)
+CXXFLAGS := -g $(pkg-config --cflags --libs elementary) -fPIC $(Preprocessors)
+CFLAGS := -g $(pkg-config --cflags --libs elementary) -fPIC $(Preprocessors)
ASFLAGS :=
AS := as
@@ -62,9 +62,9 @@ AS := as
## User defined environment variables
##
CodeLiteDir:=/usr/share/codelite
-Objects0=$(IntermediateDirectory)/src_logger.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_md5.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_mstring.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_db.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_stdafx.cxx$(ObjectSuffix) $(IntermediateDirectory)/src_http.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_tinyxml2.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_sha256.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_utf.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/src_Linux_strutil.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_utils.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_memory.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_Linux_CDbLink.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_tinyxml2_utils.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_Linux_fileutil.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_lists.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_bitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_binbuffer.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/src_sha1.cpp$(ObjectSuffix)
+Objects0=$(IntermediateDirectory)/src_Linux_CDbLink.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_binbuffer.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_bitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_lists.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_Linux_fileutil.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_memory.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_utils.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_Linux_strutil.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_tinyxml2_utils.cpp$(ObjectSuffix) \
+ $(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_utf.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_tinyxml2.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_http.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_stdafx.cxx$(ObjectSuffix) $(IntermediateDirectory)/src_sha256.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_db.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_sha1.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_mstring.cpp$(ObjectSuffix) $(IntermediateDirectory)/src_md5.cpp$(ObjectSuffix) \
+ $(IntermediateDirectory)/src_logger.cpp$(ObjectSuffix)
@@ -96,111 +96,111 @@ PreBuild:
##
## Objects
##
-$(IntermediateDirectory)/src_logger.cpp$(ObjectSuffix): src/logger.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/logger.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_logger.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_logger.cpp$(PreprocessSuffix): src/logger.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_logger.cpp$(PreprocessSuffix) src/logger.cpp
-
-$(IntermediateDirectory)/src_md5.cpp$(ObjectSuffix): src/md5.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/md5.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_md5.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_md5.cpp$(PreprocessSuffix): src/md5.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_md5.cpp$(PreprocessSuffix) src/md5.cpp
-
-$(IntermediateDirectory)/src_mstring.cpp$(ObjectSuffix): src/mstring.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/mstring.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_mstring.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_mstring.cpp$(PreprocessSuffix): src/mstring.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_mstring.cpp$(PreprocessSuffix) src/mstring.cpp
-
-$(IntermediateDirectory)/src_db.cpp$(ObjectSuffix): src/db.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/db.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_db.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_db.cpp$(PreprocessSuffix): src/db.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_db.cpp$(PreprocessSuffix) src/db.cpp
-
-$(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(ObjectSuffix): src/Linux/CDlgBase.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/CDlgBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(PreprocessSuffix): src/Linux/CDlgBase.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(PreprocessSuffix) src/Linux/CDlgBase.cpp
-
-$(IntermediateDirectory)/src_stdafx.cxx$(ObjectSuffix): src/stdafx.cxx
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/stdafx.cxx" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_stdafx.cxx$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_stdafx.cxx$(PreprocessSuffix): src/stdafx.cxx
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_stdafx.cxx$(PreprocessSuffix) src/stdafx.cxx
-
-$(IntermediateDirectory)/src_http.cpp$(ObjectSuffix): src/http.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/http.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_http.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_http.cpp$(PreprocessSuffix): src/http.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_http.cpp$(PreprocessSuffix) src/http.cpp
+$(IntermediateDirectory)/src_Linux_CDbLink.cpp$(ObjectSuffix): src/Linux/CDbLink.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/CDbLink.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_CDbLink.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_Linux_CDbLink.cpp$(PreprocessSuffix): src/Linux/CDbLink.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_CDbLink.cpp$(PreprocessSuffix) src/Linux/CDbLink.cpp
-$(IntermediateDirectory)/src_tinyxml2.cpp$(ObjectSuffix): src/tinyxml2.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/tinyxml2.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_tinyxml2.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_tinyxml2.cpp$(PreprocessSuffix): src/tinyxml2.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_tinyxml2.cpp$(PreprocessSuffix) src/tinyxml2.cpp
+$(IntermediateDirectory)/src_binbuffer.cpp$(ObjectSuffix): src/binbuffer.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/binbuffer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_binbuffer.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_binbuffer.cpp$(PreprocessSuffix): src/binbuffer.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_binbuffer.cpp$(PreprocessSuffix) src/binbuffer.cpp
-$(IntermediateDirectory)/src_sha256.cpp$(ObjectSuffix): src/sha256.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/sha256.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_sha256.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_sha256.cpp$(PreprocessSuffix): src/sha256.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_sha256.cpp$(PreprocessSuffix) src/sha256.cpp
+$(IntermediateDirectory)/src_bitmaps.cpp$(ObjectSuffix): src/bitmaps.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/bitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_bitmaps.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_bitmaps.cpp$(PreprocessSuffix): src/bitmaps.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_bitmaps.cpp$(PreprocessSuffix) src/bitmaps.cpp
-$(IntermediateDirectory)/src_utf.cpp$(ObjectSuffix): src/utf.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/utf.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_utf.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_utf.cpp$(PreprocessSuffix): src/utf.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_utf.cpp$(PreprocessSuffix) src/utf.cpp
+$(IntermediateDirectory)/src_lists.cpp$(ObjectSuffix): src/lists.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/lists.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_lists.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_lists.cpp$(PreprocessSuffix): src/lists.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_lists.cpp$(PreprocessSuffix) src/lists.cpp
-$(IntermediateDirectory)/src_Linux_strutil.cpp$(ObjectSuffix): src/Linux/strutil.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/strutil.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_strutil.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_Linux_strutil.cpp$(PreprocessSuffix): src/Linux/strutil.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_strutil.cpp$(PreprocessSuffix) src/Linux/strutil.cpp
+$(IntermediateDirectory)/src_Linux_fileutil.cpp$(ObjectSuffix): src/Linux/fileutil.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/fileutil.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_fileutil.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_Linux_fileutil.cpp$(PreprocessSuffix): src/Linux/fileutil.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_fileutil.cpp$(PreprocessSuffix) src/Linux/fileutil.cpp
-$(IntermediateDirectory)/src_utils.cpp$(ObjectSuffix): src/utils.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/utils.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_utils.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_utils.cpp$(PreprocessSuffix): src/utils.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_utils.cpp$(PreprocessSuffix) src/utils.cpp
+$(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(ObjectSuffix): src/Linux/CCtrlBase.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/CCtrlBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(PreprocessSuffix): src/Linux/CCtrlBase.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(PreprocessSuffix) src/Linux/CCtrlBase.cpp
$(IntermediateDirectory)/src_memory.cpp$(ObjectSuffix): src/memory.cpp
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/memory.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_memory.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/src_memory.cpp$(PreprocessSuffix): src/memory.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_memory.cpp$(PreprocessSuffix) src/memory.cpp
-$(IntermediateDirectory)/src_Linux_CDbLink.cpp$(ObjectSuffix): src/Linux/CDbLink.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/CDbLink.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_CDbLink.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_Linux_CDbLink.cpp$(PreprocessSuffix): src/Linux/CDbLink.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_CDbLink.cpp$(PreprocessSuffix) src/Linux/CDbLink.cpp
+$(IntermediateDirectory)/src_utils.cpp$(ObjectSuffix): src/utils.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/utils.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_utils.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_utils.cpp$(PreprocessSuffix): src/utils.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_utils.cpp$(PreprocessSuffix) src/utils.cpp
-$(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(ObjectSuffix): src/Linux/CCtrlBase.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/CCtrlBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(PreprocessSuffix): src/Linux/CCtrlBase.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_CCtrlBase.cpp$(PreprocessSuffix) src/Linux/CCtrlBase.cpp
+$(IntermediateDirectory)/src_Linux_strutil.cpp$(ObjectSuffix): src/Linux/strutil.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/strutil.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_strutil.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_Linux_strutil.cpp$(PreprocessSuffix): src/Linux/strutil.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_strutil.cpp$(PreprocessSuffix) src/Linux/strutil.cpp
$(IntermediateDirectory)/src_tinyxml2_utils.cpp$(ObjectSuffix): src/tinyxml2_utils.cpp
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/tinyxml2_utils.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_tinyxml2_utils.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/src_tinyxml2_utils.cpp$(PreprocessSuffix): src/tinyxml2_utils.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_tinyxml2_utils.cpp$(PreprocessSuffix) src/tinyxml2_utils.cpp
-$(IntermediateDirectory)/src_Linux_fileutil.cpp$(ObjectSuffix): src/Linux/fileutil.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/fileutil.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_fileutil.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_Linux_fileutil.cpp$(PreprocessSuffix): src/Linux/fileutil.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_fileutil.cpp$(PreprocessSuffix) src/Linux/fileutil.cpp
+$(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(ObjectSuffix): src/Linux/CDlgBase.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/Linux/CDlgBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(PreprocessSuffix): src/Linux/CDlgBase.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_Linux_CDlgBase.cpp$(PreprocessSuffix) src/Linux/CDlgBase.cpp
-$(IntermediateDirectory)/src_lists.cpp$(ObjectSuffix): src/lists.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/lists.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_lists.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_lists.cpp$(PreprocessSuffix): src/lists.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_lists.cpp$(PreprocessSuffix) src/lists.cpp
+$(IntermediateDirectory)/src_utf.cpp$(ObjectSuffix): src/utf.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/utf.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_utf.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_utf.cpp$(PreprocessSuffix): src/utf.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_utf.cpp$(PreprocessSuffix) src/utf.cpp
-$(IntermediateDirectory)/src_bitmaps.cpp$(ObjectSuffix): src/bitmaps.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/bitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_bitmaps.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_bitmaps.cpp$(PreprocessSuffix): src/bitmaps.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_bitmaps.cpp$(PreprocessSuffix) src/bitmaps.cpp
+$(IntermediateDirectory)/src_tinyxml2.cpp$(ObjectSuffix): src/tinyxml2.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/tinyxml2.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_tinyxml2.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_tinyxml2.cpp$(PreprocessSuffix): src/tinyxml2.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_tinyxml2.cpp$(PreprocessSuffix) src/tinyxml2.cpp
-$(IntermediateDirectory)/src_binbuffer.cpp$(ObjectSuffix): src/binbuffer.cpp
- $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/binbuffer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_binbuffer.cpp$(ObjectSuffix) $(IncludePath)
-$(IntermediateDirectory)/src_binbuffer.cpp$(PreprocessSuffix): src/binbuffer.cpp
- $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_binbuffer.cpp$(PreprocessSuffix) src/binbuffer.cpp
+$(IntermediateDirectory)/src_http.cpp$(ObjectSuffix): src/http.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/http.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_http.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_http.cpp$(PreprocessSuffix): src/http.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_http.cpp$(PreprocessSuffix) src/http.cpp
+
+$(IntermediateDirectory)/src_stdafx.cxx$(ObjectSuffix): src/stdafx.cxx
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/stdafx.cxx" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_stdafx.cxx$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_stdafx.cxx$(PreprocessSuffix): src/stdafx.cxx
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_stdafx.cxx$(PreprocessSuffix) src/stdafx.cxx
+
+$(IntermediateDirectory)/src_sha256.cpp$(ObjectSuffix): src/sha256.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/sha256.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_sha256.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_sha256.cpp$(PreprocessSuffix): src/sha256.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_sha256.cpp$(PreprocessSuffix) src/sha256.cpp
+
+$(IntermediateDirectory)/src_db.cpp$(ObjectSuffix): src/db.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/db.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_db.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_db.cpp$(PreprocessSuffix): src/db.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_db.cpp$(PreprocessSuffix) src/db.cpp
$(IntermediateDirectory)/src_sha1.cpp$(ObjectSuffix): src/sha1.cpp
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/sha1.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_sha1.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/src_sha1.cpp$(PreprocessSuffix): src/sha1.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_sha1.cpp$(PreprocessSuffix) src/sha1.cpp
+$(IntermediateDirectory)/src_mstring.cpp$(ObjectSuffix): src/mstring.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/mstring.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_mstring.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_mstring.cpp$(PreprocessSuffix): src/mstring.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_mstring.cpp$(PreprocessSuffix) src/mstring.cpp
+
+$(IntermediateDirectory)/src_md5.cpp$(ObjectSuffix): src/md5.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/md5.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_md5.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_md5.cpp$(PreprocessSuffix): src/md5.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_md5.cpp$(PreprocessSuffix) src/md5.cpp
+
+$(IntermediateDirectory)/src_logger.cpp$(ObjectSuffix): src/logger.cpp
+ $(CXX) $(IncludePCH) $(SourceSwitch) "/home/ghazan/miranda-ng/src/mir_core/src/logger.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_logger.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/src_logger.cpp$(PreprocessSuffix): src/logger.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_logger.cpp$(PreprocessSuffix) src/logger.cpp
+
##
## Clean
##
diff --git a/src/mir_core/mir_core.project b/src/mir_core/mir_core.project
index 70005786ae..5b379a7eb1 100644
--- a/src/mir_core/mir_core.project
+++ b/src/mir_core/mir_core.project
@@ -43,10 +43,9 @@
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
- <Compiler Options="-g;$(shell wx-config --cxxflags --unicode=yes) -fPIC" C_Options="-g;$(shell wx-config --cxxflags --unicode=yes) -fPIC" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
+ <Compiler Options="-g;$(pkg-config --cflags --libs elementary) -fPIC" C_Options="-g;$(pkg-config --cflags --libs elementary) -fPIC" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
<IncludePath Value="../../include"/>
- <IncludePath Value="`pkg-config --cflags --libs elementary`"/>
</Compiler>
<Linker Options="$(shell wx-config --libs --unicode=yes)" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
@@ -84,7 +83,7 @@
</Completion>
</Configuration>
<Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
- <Compiler Options="-O2;$(shell wx-config --cxxflags --debug=no --unicode=yes) -fPIC" C_Options="-O2;$(shell wx-config --cxxflags --debug=no --unicode=yes) -fPIC" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
+ <Compiler Options="-O2;$(pkg-config --cflags --libs elementary) -fPIC" C_Options="-O2;$(pkg-config --cflags --libs elementary) -fPIC" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
<IncludePath Value="../../include"/>
<IncludePath Value="`pkg-config --cflags --libs elementary`"/>
diff --git a/src/mir_core/src/Linux/CCtrlBase.cpp b/src/mir_core/src/Linux/CCtrlBase.cpp
index 58787b02db..bfb7d7e7fc 100644
--- a/src/mir_core/src/Linux/CCtrlBase.cpp
+++ b/src/mir_core/src/Linux/CCtrlBase.cpp
@@ -47,12 +47,12 @@ CCtrlBase::~CCtrlBase()
void CCtrlBase::OnInit()
{
- m_hwnd = (m_idCtrl && m_parentWnd && m_parentWnd->GetHwnd()) ? GetDlgItem(m_parentWnd->GetHwnd(), m_idCtrl) : nullptr;
+ m_hwnd = nullptr;
}
void CCtrlBase::OnDestroy()
{
- PVOID bullshit[2]; // vfptr + hwnd
+ void *bullshit[2]; // vfptr + hwnd
bullshit[1] = m_hwnd;
CCtrlBase *pCtrl = arControls.find((CCtrlBase*)&bullshit);
if (pCtrl) {
@@ -70,21 +70,22 @@ bool CCtrlBase::OnApply()
}
void CCtrlBase::OnReset()
-{}
+{
+}
void CCtrlBase::Show(bool bShow)
{
- ::ShowWindow(m_hwnd, bShow ? SW_SHOW : SW_HIDE);
+ // ::ShowWindow(m_hwnd, bShow ? SW_SHOW : SW_HIDE);
}
void CCtrlBase::Enable(bool bIsEnable)
{
- ::EnableWindow(m_hwnd, bIsEnable);
+ // ::EnableWindow(m_hwnd, bIsEnable);
}
bool CCtrlBase::Enabled() const
{
- return (m_hwnd) ? IsWindowEnabled(m_hwnd) != 0 : false;
+ return (m_hwnd != nullptr);
}
void CCtrlBase::NotifyChange()
@@ -103,49 +104,39 @@ void CCtrlBase::NotifyChange()
LRESULT CCtrlBase::SendMsg(UINT Msg, WPARAM wParam, LPARAM lParam) const
{
- return ::SendMessage(m_hwnd, Msg, wParam, lParam);
+ // return ::SendMessage(m_hwnd, Msg, wParam, lParam);
}
void CCtrlBase::SetText(const wchar_t *text)
{
- ::SetWindowText(m_hwnd, text);
+ // ::SetWindowText(m_hwnd, text);
}
void CCtrlBase::SetTextA(const char *text)
{
- ::SetWindowTextA(m_hwnd, text);
+ // ::SetWindowTextA(m_hwnd, text);
}
void CCtrlBase::SetDraw(bool bEnable)
{
- ::SendMessage(m_hwnd, WM_SETREDRAW, bEnable, 0);
+ // ::SendMessage(m_hwnd, WM_SETREDRAW, bEnable, 0);
}
void CCtrlBase::SetInt(int value)
{
wchar_t buf[32] = { 0 };
mir_snwprintf(buf, L"%d", value);
- SetWindowText(m_hwnd, buf);
+ SetText(buf);
}
wchar_t* CCtrlBase::GetText() const
{
- int length = GetWindowTextLengthW(m_hwnd);
- wchar_t *result = (wchar_t *)mir_alloc((length+1) * sizeof(wchar_t));
- if (length)
- GetWindowTextW(m_hwnd, result, length+1);
- result[length] = 0;
- return result;
+ return mir_wstrdup(L"");
}
char* CCtrlBase::GetTextA() const
{
- int length = GetWindowTextLengthA(m_hwnd);
- char *result = (char *)mir_alloc((length+1) * sizeof(char));
- if (length)
- GetWindowTextA(m_hwnd, result, length+1);
- result[length] = 0;
- return result;
+ return mir_strdup("");
}
char* CCtrlBase::GetTextU() const
@@ -155,14 +146,14 @@ char* CCtrlBase::GetTextU() const
wchar_t* CCtrlBase::GetText(wchar_t *buf, size_t size) const
{
- GetWindowTextW(m_hwnd, buf, (int)size);
+ // GetWindowTextW(m_hwnd, buf, (int)size);
buf[size - 1] = 0;
return buf;
}
char* CCtrlBase::GetTextA(char *buf, size_t size) const
{
- GetWindowTextA(m_hwnd, buf, (int)size);
+ // GetWindowTextA(m_hwnd, buf, (int)size);
buf[size - 1] = 0;
return buf;
}
@@ -176,10 +167,11 @@ char* CCtrlBase::GetTextU(char *buf, size_t size) const
int CCtrlBase::GetInt() const
{
- int length = GetWindowTextLengthW(m_hwnd) + 1;
- wchar_t *result = (wchar_t *)_alloca(length * sizeof(wchar_t));
- GetWindowTextW(m_hwnd, result, length);
- return _wtoi(result);
+ // int length = GetWindowTextLengthW(m_hwnd) + 1;
+ // wchar_t *result = (wchar_t *)_alloca(length * sizeof(wchar_t));
+ // GetWindowTextW(m_hwnd, result, length);
+ // return _wtoi(result);
+ return 0;
}
void CCtrlBase::GetCaretPos(CContextMenuPos &pos) const
@@ -187,8 +179,8 @@ void CCtrlBase::GetCaretPos(CContextMenuPos &pos) const
pos.pCtrl = this;
pos.iCurr = -1;
- if (pos.pt.x == 0 && pos.pt.y == 0)
- GetCursorPos(&pos.pt);
+ // if (pos.pt.x == 0 && pos.pt.y == 0)
+ // GetCursorPos(&pos.pt);
}
LRESULT CCtrlBase::CustomWndProc(UINT, WPARAM, LPARAM)
@@ -196,23 +188,9 @@ LRESULT CCtrlBase::CustomWndProc(UINT, WPARAM, LPARAM)
return FALSE;
}
-LRESULT CALLBACK CCtrlBase::GlobalSubclassWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- PVOID bullshit[2]; // vfptr + hwnd
- bullshit[1] = hwnd;
- CCtrlBase *pCtrl = arControls.find((CCtrlBase*)&bullshit);
- if (pCtrl) {
- LRESULT res = pCtrl->CustomWndProc(msg, wParam, lParam);
- if (res != 0)
- return res;
- }
-
- return mir_callNextSubclass(hwnd, GlobalSubclassWndProc, msg, wParam, lParam);
-}
-
void CCtrlBase::Subclass()
{
- mir_subclassWindow(m_hwnd, GlobalSubclassWndProc);
+ // mir_subclassWindow(m_hwnd, GlobalSubclassWndProc);
mir_cslock lck(csCtrl);
arControls.insert(this);
@@ -220,5 +198,5 @@ void CCtrlBase::Subclass()
void CCtrlBase::Unsubclass()
{
- mir_unsubclassWindow(m_hwnd, GlobalSubclassWndProc);
+ // mir_unsubclassWindow(m_hwnd, GlobalSubclassWndProc);
}
diff --git a/src/mir_core/src/Linux/CDlgBase.cpp b/src/mir_core/src/Linux/CDlgBase.cpp
index d6c798eb41..425e71ee31 100644
--- a/src/mir_core/src/Linux/CDlgBase.cpp
+++ b/src/mir_core/src/Linux/CDlgBase.cpp
@@ -57,8 +57,8 @@ CDlgBase::CDlgBase(CMPluginBase &pPlug, int idDialog)
CDlgBase::~CDlgBase()
{
m_bInitialized = false; // prevent double call of destructor
- if (m_hwnd)
- DestroyWindow(m_hwnd);
+ // if (m_hwnd)
+ // DestroyWindow(m_hwnd);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -96,23 +96,24 @@ void CDlgBase::OnTimer(CTimer*)
void CDlgBase::Close()
{
- ::SendMessage(m_hwnd, WM_CLOSE, 0, 0);
+ // ::SendMessage(m_hwnd, WM_CLOSE, 0, 0);
}
void CDlgBase::Create()
{
- CreateDialogParam(GetInst(), MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this);
+ // CreateDialogParam(GetInst(), MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this);
}
int CDlgBase::DoModal()
{
m_isModal = true;
- return DialogBoxParam(GetInst(), MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this);
+ // return DialogBoxParam(GetInst(), MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this);
+ return 0; //!!!!!!!!
}
void CDlgBase::EndModal(INT_PTR nResult)
{
- ::EndDialog(m_hwnd, nResult);
+ // ::EndDialog(m_hwnd, nResult);
}
HINSTANCE CDlgBase::GetInst() const
@@ -127,31 +128,31 @@ void CDlgBase::NotifyChange(void)
OnChange();
- if (m_hwndParent)
- SendMessage(m_hwndParent, PSM_CHANGED, (WPARAM)m_hwnd, 0);
+ // if (m_hwndParent)
+ // SendMessage(m_hwndParent, PSM_CHANGED, (WPARAM)m_hwnd, 0);
}
void CDlgBase::Resize()
{
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ // SendMessage(m_hwnd, WM_SIZE, 0, 0);
}
void CDlgBase::SetCaption(const wchar_t *ptszCaption)
{
- if (m_hwnd && ptszCaption)
- SetWindowText(m_hwnd, ptszCaption);
+ // if (m_hwnd && ptszCaption)
+ // SetText(ptszCaption);
}
void CDlgBase::SetDraw(bool bEnable)
{
- ::SendMessage(m_hwnd, WM_SETREDRAW, bEnable, 0);
+ // ::SendMessage(m_hwnd, WM_SETREDRAW, bEnable, 0);
}
void CDlgBase::Show(int nCmdShow)
{
if (m_hwnd == nullptr)
Create();
- ShowWindow(m_hwnd, nCmdShow);
+ // ShowWindow(m_hwnd, nCmdShow);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -176,260 +177,14 @@ int CDlgBase::Resizer(UTILRESIZECONTROL*)
BOOL CALLBACK CDlgBase::GlobalFieldEnum(HWND hwnd, LPARAM lParam)
{
- CDlgBase *pDlg = (CDlgBase*)lParam;
- int id = GetWindowLongPtrW(hwnd, GWLP_ID);
- if (id <= 0)
- return TRUE;
-
- // already declared inside the class? skipping
- CCtrlBase *ctrl = pDlg->FindControl(id);
- if (ctrl != nullptr)
- return TRUE;
-
- wchar_t wszClass[100];
- GetClassNameW(hwnd, wszClass, _countof(wszClass));
- if (!wcsicmp(wszClass, L"Static"))
- new CCtrlLabel(pDlg, id);
- if (!wcsicmp(wszClass, L"Edit"))
- new CCtrlEdit(pDlg, id);
- else if (!wcsicmp(wszClass, L"ComboBox"))
- new CCtrlCombo(pDlg, id);
- else if (!wcsicmp(wszClass, L"Button")) {
- switch (GetWindowLongW(hwnd, GWL_STYLE) & (BS_CHECKBOX | BS_RADIOBUTTON | BS_AUTOCHECKBOX | BS_AUTORADIOBUTTON)) {
- case BS_CHECKBOX:
- case BS_AUTOCHECKBOX:
- case BS_RADIOBUTTON:
- case BS_AUTORADIOBUTTON:
- new CCtrlCheck(pDlg, id);
- break;
-
- default:
- new CCtrlButton(pDlg, id);
- }
- }
- else if (!wcsicmp(wszClass, L"RichEdit50W"))
- new CCtrlRichEdit(pDlg, id);
- else if (!wcsicmp(wszClass, L"msctls_updown32"))
- new CCtrlSpin(pDlg, id);
-
return TRUE;
}
INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
- switch (msg) {
- case WM_INITDIALOG:
- m_bInitialized = m_bSucceeded = false;
- TranslateDialog_LP(m_hwnd, &m_pPlugin);
-
- ::EnumChildWindows(m_hwnd, &GlobalFieldEnum, LPARAM(this));
-
- NotifyControls(&CCtrlBase::OnInit);
- if (!OnInitDialog())
- return FALSE;
-
- for (auto &it : m_controls)
- if (it->m_bNotifiable)
- it->OnChange(it);
-
- m_bInitialized = true;
- return TRUE;
-
- case WM_CTLCOLOREDIT:
- case WM_CTLCOLORSTATIC:
- if (CCtrlBase *ctrl = FindControl(HWND(lParam))) {
- if (ctrl->m_bUseSystemColors) {
- SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
- return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
- }
- }
- break;
-
- case WM_GETMINMAXINFO:
- if (m_iMinHeight != -1 && m_iMinWidth != -1) {
- MINMAXINFO *lpmmi = (MINMAXINFO*)lParam;
- lpmmi->ptMinTrackSize.y = m_iMinHeight;
- lpmmi->ptMinTrackSize.x = m_iMinWidth;
- return 0;
- }
- break;
-
- case WM_MEASUREITEM:
- if (!Menu_MeasureItem(lParam)) {
- MEASUREITEMSTRUCT *param = (MEASUREITEMSTRUCT *)lParam;
- if (param && param->CtlID)
- if (CCtrlBase *ctrl = FindControl(param->CtlID))
- return ctrl->OnMeasureItem(param);
- }
- return FALSE;
-
- case WM_DRAWITEM:
- if (!Menu_DrawItem(lParam)) {
- DRAWITEMSTRUCT *param = (DRAWITEMSTRUCT *)lParam;
- if (param && param->CtlID)
- if (CCtrlBase *ctrl = FindControl(param->CtlID))
- return ctrl->OnDrawItem(param);
- }
- return FALSE;
-
- case WM_DELETEITEM:
- {
- DELETEITEMSTRUCT *param = (DELETEITEMSTRUCT *)lParam;
- if (param && param->CtlID)
- if (CCtrlBase *ctrl = FindControl(param->CtlID))
- return ctrl->OnDeleteItem(param);
- }
- return FALSE;
-
- case WM_COMMAND:
- {
- HWND hwndCtrl = (HWND)lParam;
- uint16_t idCtrl = LOWORD(wParam);
- uint16_t idCode = HIWORD(wParam);
- if (CCtrlBase *ctrl = FindControl(idCtrl)) {
- BOOL result = ctrl->OnCommand(hwndCtrl, idCtrl, idCode);
- if (result != FALSE)
- return result;
- }
-
- if (idCode == BN_CLICKED) {
- // close dialog automatically if 'Cancel' button is pressed
- if (idCtrl == IDCANCEL && (m_autoClose & CLOSE_ON_CANCEL)) {
- m_bExiting = true;
- PostMessage(m_hwnd, WM_CLOSE, 0, 0);
- }
-
- // close dialog automatically if 'OK' button is pressed
- if (idCtrl == IDOK && (m_autoClose & CLOSE_ON_OK)) {
- // validate dialog data first
- if (VerifyControls(&CCtrlBase::OnApply)) {
- m_bExiting = true;
-
- // everything ok? good, let's close it
- if (OnApply()) {
- m_bSucceeded = true;
- PostMessage(m_hwnd, WM_CLOSE, 0, 0);
- }
- else m_bExiting = false;
- }
- }
- }
- }
- return FALSE;
-
- case WM_NOTIFY:
- {
- int idCtrl = wParam;
- NMHDR *pnmh = (NMHDR *)lParam;
- if (pnmh->idFrom == 0) {
- switch (pnmh->code) {
- case PSN_APPLY:
- if (LPPSHNOTIFY(lParam)->lParam != 3) // IDC_APPLY
- m_bExiting = true;
-
- if (!VerifyControls(&CCtrlBase::OnApply))
- m_bExiting = false;
- else if (!OnApply())
- m_bExiting = false;
- break;
-
- case PSN_RESET:
- NotifyControls(&CCtrlBase::OnReset);
- OnReset();
- break;
-
- case PSN_WIZFINISH:
- m_OnFinishWizard(this);
- break;
- }
- }
-
- if (CCtrlBase *ctrl = FindControl(pnmh->idFrom))
- return ctrl->OnNotify(idCtrl, pnmh);
- }
- return FALSE;
-
- case WM_HSCROLL:
- if (auto *pCtrl = FindControl(HWND(lParam)))
- pCtrl->OnCommand(HWND(lParam), pCtrl->m_idCtrl, WM_HSCROLL);
- break;
-
- case PSM_CHANGED:
- if (m_bInitialized)
- OnChange();
- break;
-
- case WM_CONTEXTMENU:
- if (CCtrlBase *ctrl = FindControl(HWND(wParam))) {
- CContextMenuPos pos = {};
- if (lParam != -1) {
- pos.pt.x = GET_X_LPARAM(lParam);
- pos.pt.y = GET_Y_LPARAM(lParam);
- }
- ctrl->GetCaretPos(pos);
- ctrl->OnBuildMenu(&pos);
- }
- break;
-
- case WM_SIZE:
- if (m_forceResizable || (GetWindowLongPtr(m_hwnd, GWL_STYLE) & WS_THICKFRAME))
- Utils_ResizeDialog(m_hwnd, m_pPlugin.getInst(), MAKEINTRESOURCEA(m_idDialog), GlobalDlgResizer);
- return TRUE;
-
- case WM_TIMER:
- if (CTimer *timer = FindTimer(wParam))
- return timer->OnTimer();
- return FALSE;
-
- case WM_CLOSE:
- if (OnClose()) {
- m_bExiting = true;
- if (m_isModal)
- EndModal(m_bSucceeded ? IDOK : FALSE);
- else
- DestroyWindow(m_hwnd);
- }
- return TRUE;
-
- case WM_DESTROY:
- m_bExiting = true;
- OnDestroy();
- NotifyControls(&CCtrlBase::OnDestroy);
- {
- mir_cslock lck(csDialogs);
- int idx = arDialogs.getIndex(this);
- if (idx != -1)
- arDialogs.remove(idx);
- }
- m_hwnd = nullptr;
- if (m_bInitialized) {
- if (m_isModal)
- m_isModal = false;
- else // modeless dialogs MUST be allocated with 'new'
- delete this;
- }
-
- return TRUE;
- }
-
return FALSE;
}
-INT_PTR CALLBACK CDlgBase::GlobalDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- CDlgBase *wnd;
- if (msg == WM_INITDIALOG) {
- wnd = (CDlgBase*)lParam;
- wnd->m_hwnd = hwnd;
-
- mir_cslock lck(csDialogs);
- arDialogs.insert(wnd);
- }
- else wnd = CDlgBase::Find(hwnd);
-
- return (wnd == nullptr) ? FALSE : wnd->DlgProc(msg, wParam, lParam);
-}
-
int CDlgBase::GlobalDlgResizer(HWND hwnd, LPARAM, UTILRESIZECONTROL *urc)
{
CDlgBase *wnd = CDlgBase::Find(hwnd);
@@ -438,7 +193,6 @@ int CDlgBase::GlobalDlgResizer(HWND hwnd, LPARAM, UTILRESIZECONTROL *urc)
void CDlgBase::ThemeDialogBackground(BOOL tabbed)
{
- EnableThemeDialogTexture(m_hwnd, (tabbed ? ETDT_ENABLE : ETDT_DISABLE) | ETDT_USETABTEXTURE);
}
void CDlgBase::AddControl(CCtrlBase *ctrl)
@@ -500,7 +254,7 @@ CTimer* CDlgBase::FindTimer(int idEvent)
CDlgBase* CDlgBase::Find(HWND hwnd)
{
- PVOID bullshit[2]; // vfptr + hwnd
+ void *bullshit[2]; // vfptr + hwnd
bullshit[1] = hwnd;
return arDialogs.find((CDlgBase*)&bullshit);
}