├── SignApk
├── SignApk.h
├── small.ico
├── SignApk.cpp
├── SignApk.ico
├── SignApk.rc
├── res
│ ├── add.png
│ ├── bg.bmp
│ ├── bg.png
│ ├── edit.png
│ ├── pack.png
│ ├── star.png
│ ├── button.png
│ ├── clear.png
│ ├── close.png
│ ├── combo.png
│ ├── delete.png
│ ├── radio.png
│ ├── star_d.png
│ ├── app_icon.png
│ ├── button_h.png
│ ├── button_p.png
│ ├── checkbox.png
│ ├── close_h.png
│ ├── close_p.png
│ ├── hui_line.png
│ ├── maximize.png
│ ├── menu_bk.png
│ ├── minimize.png
│ ├── radio_h.png
│ ├── radio_p.png
│ ├── restore.png
│ ├── restore_h.png
│ ├── restore_p.png
│ ├── settings.png
│ ├── slider_bg.png
│ ├── slider_fg.png
│ ├── checkbox_h.png
│ ├── checkbox_p.png
│ ├── list_header.png
│ ├── list_select.png
│ ├── maximize_h.png
│ ├── maximize_p.png
│ ├── minimize_h.png
│ ├── minimize_p.png
│ ├── progress_bg.png
│ ├── progress_fg.png
│ ├── scrollbar_h.png
│ ├── scrollbar_v.png
│ ├── sys_set_tab.png
│ ├── slider_thumb.png
│ ├── sys_set_tab_a.png
│ ├── list_header_sep.png
│ ├── combobox_nohighlight.png
│ ├── msg_box.xml
│ └── list_item.xml
├── main_frame.cpp
├── main_frame.hpp
├── message_box.cpp
├── win_impl_base.cpp
├── stdafx.cpp
├── stdafx.h
├── window_util.hpp
├── targetver.h
├── SignApk.vcproj.achellies-PC.achellies.user
├── message_box.hpp
├── debug.hpp
├── lock.hpp
├── Resource.h
├── win_impl_base.hpp
├── lock.cpp
└── window_util.cpp
├── signapk_java
├── SignApk.mf
├── platform.pk8
├── signapk.jar
├── com
│ └── android
│ │ └── signapk
│ │ ├── SignApk.class
│ │ └── SignApk$SignatureOutputStream.class
└── platform.x509.pem
├── 签名.txt
├── SignApk.png
├── SignApk.suo
├── Bin
├── SignApk.exe
├── apkpack.pk8
├── apktool.jar
├── signapk.jar
├── platform.pk8
├── settings.ini
├── platform.x509.pem
└── apkpack.x509.pem
├── include
├── UIList.h
├── UIControl.h
├── UIManager.h
├── UIRender.h
├── UIRichEdit.h
├── UIContainer.h
├── UICommonControls.h
├── PostConfig.h
├── wcestddef.h
├── UIRating.h
├── UIIEActiveX.h
├── UIDlgBuilder.h
├── UIDelegate.h
├── UIGIFControls.h
├── PreConfig.h
├── UIActiveX.h
├── UIGDIWindow_Win.h
├── GDIImage.h
├── UIEdit.h
├── UIMenu.h
├── UIUtil.h
├── UIMarkup.h
├── observer_impl_base.hpp
├── UISkWindow_Win.h
└── UIGdi.h
├── UIEngine
├── UICombo.cpp
├── UIEdit.cpp
├── UIList.cpp
├── UIActiveX.cpp
├── UIControl.cpp
├── UIManager.cpp
├── UIMarkup.cpp
├── UIRender.cpp
├── UIContainer.cpp
├── UIDlgBuilder.cpp
├── UIIEActiveX.cpp
├── UIRichEdit.cpp
├── UICommonControls.cpp
├── stdafx.cpp
├── UIlib.cpp
├── UIEngine.vcproj.achellies-PC.achellies.user
├── UIIEActiveX.h
├── UIDelegate.cpp
├── stdafx.h
└── UIUtil.cpp
├── third_party
├── drm
│ ├── base64.c
│ ├── base64.h
│ ├── md5.h
│ └── Rijndael.h
├── GdiOle
│ ├── GDIImage.bmp
│ ├── GDIImage.cpp
│ ├── GdiOleps.def
│ ├── GdiOle.vcxproj.user
│ ├── GdiOle.rgs
│ ├── stdafx.cpp
│ ├── GDIImage.htm
│ ├── GdiOle.def
│ ├── dllmain.h
│ ├── dllmain.cpp
│ ├── stdafx.h
│ ├── resource.h
│ ├── GdiOle.idl
│ ├── dlldata.c
│ ├── GDIImage.rgs
│ ├── targetver.h
│ ├── GdiOle.cpp
│ ├── GdiOle_i.c
│ ├── GdiOle_2010.sln
│ ├── ReadMe.txt
│ ├── GdiOle.sln
│ ├── GDIImage.h
│ ├── GdiOle.vcxproj.filters
│ ├── GdiOle.rc
│ └── GdiOle_i.h
├── Tinyxml
│ ├── tinystr.cpp
│ └── tinyxmlerror.cpp
└── gzip
│ ├── gziper.h
│ ├── inffast.h
│ ├── uncompr.c
│ ├── inftrees.h
│ ├── compress.c
│ ├── gziper.cpp
│ ├── adler32.c
│ ├── inflate.h
│ └── inffixed.h
├── README.md
├── mkkey.sh
└── SignApk.sln
/SignApk/SignApk.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "resource.h"
4 |
--------------------------------------------------------------------------------
/signapk_java/SignApk.mf:
--------------------------------------------------------------------------------
1 | Main-Class: com.android.signapk.SignApk
2 |
--------------------------------------------------------------------------------
/签名.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/签名.txt
--------------------------------------------------------------------------------
/SignApk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk.png
--------------------------------------------------------------------------------
/SignApk.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk.suo
--------------------------------------------------------------------------------
/Bin/SignApk.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/Bin/SignApk.exe
--------------------------------------------------------------------------------
/Bin/apkpack.pk8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/Bin/apkpack.pk8
--------------------------------------------------------------------------------
/Bin/apktool.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/Bin/apktool.jar
--------------------------------------------------------------------------------
/Bin/signapk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/Bin/signapk.jar
--------------------------------------------------------------------------------
/Bin/platform.pk8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/Bin/platform.pk8
--------------------------------------------------------------------------------
/SignApk/small.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/small.ico
--------------------------------------------------------------------------------
/include/UIList.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/include/UIList.h
--------------------------------------------------------------------------------
/SignApk/SignApk.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/SignApk.cpp
--------------------------------------------------------------------------------
/SignApk/SignApk.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/SignApk.ico
--------------------------------------------------------------------------------
/SignApk/SignApk.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/SignApk.rc
--------------------------------------------------------------------------------
/SignApk/res/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/add.png
--------------------------------------------------------------------------------
/SignApk/res/bg.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/bg.bmp
--------------------------------------------------------------------------------
/SignApk/res/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/bg.png
--------------------------------------------------------------------------------
/SignApk/res/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/edit.png
--------------------------------------------------------------------------------
/SignApk/res/pack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/pack.png
--------------------------------------------------------------------------------
/SignApk/res/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/star.png
--------------------------------------------------------------------------------
/UIEngine/UICombo.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UICombo.cpp
--------------------------------------------------------------------------------
/UIEngine/UIEdit.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIEdit.cpp
--------------------------------------------------------------------------------
/UIEngine/UIList.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIList.cpp
--------------------------------------------------------------------------------
/include/UIControl.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/include/UIControl.h
--------------------------------------------------------------------------------
/include/UIManager.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/include/UIManager.h
--------------------------------------------------------------------------------
/include/UIRender.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/include/UIRender.h
--------------------------------------------------------------------------------
/include/UIRichEdit.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/include/UIRichEdit.h
--------------------------------------------------------------------------------
/SignApk/main_frame.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/main_frame.cpp
--------------------------------------------------------------------------------
/SignApk/main_frame.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/main_frame.hpp
--------------------------------------------------------------------------------
/SignApk/res/button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/button.png
--------------------------------------------------------------------------------
/SignApk/res/clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/clear.png
--------------------------------------------------------------------------------
/SignApk/res/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/close.png
--------------------------------------------------------------------------------
/SignApk/res/combo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/combo.png
--------------------------------------------------------------------------------
/SignApk/res/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/delete.png
--------------------------------------------------------------------------------
/SignApk/res/radio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/radio.png
--------------------------------------------------------------------------------
/SignApk/res/star_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/star_d.png
--------------------------------------------------------------------------------
/UIEngine/UIActiveX.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIActiveX.cpp
--------------------------------------------------------------------------------
/UIEngine/UIControl.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIControl.cpp
--------------------------------------------------------------------------------
/UIEngine/UIManager.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIManager.cpp
--------------------------------------------------------------------------------
/UIEngine/UIMarkup.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIMarkup.cpp
--------------------------------------------------------------------------------
/UIEngine/UIRender.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIRender.cpp
--------------------------------------------------------------------------------
/include/UIContainer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/include/UIContainer.h
--------------------------------------------------------------------------------
/SignApk/message_box.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/message_box.cpp
--------------------------------------------------------------------------------
/SignApk/res/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/app_icon.png
--------------------------------------------------------------------------------
/SignApk/res/button_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/button_h.png
--------------------------------------------------------------------------------
/SignApk/res/button_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/button_p.png
--------------------------------------------------------------------------------
/SignApk/res/checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/checkbox.png
--------------------------------------------------------------------------------
/SignApk/res/close_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/close_h.png
--------------------------------------------------------------------------------
/SignApk/res/close_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/close_p.png
--------------------------------------------------------------------------------
/SignApk/res/hui_line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/hui_line.png
--------------------------------------------------------------------------------
/SignApk/res/maximize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/maximize.png
--------------------------------------------------------------------------------
/SignApk/res/menu_bk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/menu_bk.png
--------------------------------------------------------------------------------
/SignApk/res/minimize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/minimize.png
--------------------------------------------------------------------------------
/SignApk/res/radio_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/radio_h.png
--------------------------------------------------------------------------------
/SignApk/res/radio_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/radio_p.png
--------------------------------------------------------------------------------
/SignApk/res/restore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/restore.png
--------------------------------------------------------------------------------
/SignApk/res/restore_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/restore_h.png
--------------------------------------------------------------------------------
/SignApk/res/restore_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/restore_p.png
--------------------------------------------------------------------------------
/SignApk/res/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/settings.png
--------------------------------------------------------------------------------
/SignApk/res/slider_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/slider_bg.png
--------------------------------------------------------------------------------
/SignApk/res/slider_fg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/slider_fg.png
--------------------------------------------------------------------------------
/SignApk/win_impl_base.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/win_impl_base.cpp
--------------------------------------------------------------------------------
/UIEngine/UIContainer.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIContainer.cpp
--------------------------------------------------------------------------------
/UIEngine/UIDlgBuilder.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIDlgBuilder.cpp
--------------------------------------------------------------------------------
/UIEngine/UIIEActiveX.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIIEActiveX.cpp
--------------------------------------------------------------------------------
/UIEngine/UIRichEdit.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UIRichEdit.cpp
--------------------------------------------------------------------------------
/signapk_java/platform.pk8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/signapk_java/platform.pk8
--------------------------------------------------------------------------------
/signapk_java/signapk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/signapk_java/signapk.jar
--------------------------------------------------------------------------------
/third_party/drm/base64.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/third_party/drm/base64.c
--------------------------------------------------------------------------------
/third_party/drm/base64.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/third_party/drm/base64.h
--------------------------------------------------------------------------------
/SignApk/res/checkbox_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/checkbox_h.png
--------------------------------------------------------------------------------
/SignApk/res/checkbox_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/checkbox_p.png
--------------------------------------------------------------------------------
/SignApk/res/list_header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/list_header.png
--------------------------------------------------------------------------------
/SignApk/res/list_select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/list_select.png
--------------------------------------------------------------------------------
/SignApk/res/maximize_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/maximize_h.png
--------------------------------------------------------------------------------
/SignApk/res/maximize_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/maximize_p.png
--------------------------------------------------------------------------------
/SignApk/res/minimize_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/minimize_h.png
--------------------------------------------------------------------------------
/SignApk/res/minimize_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/minimize_p.png
--------------------------------------------------------------------------------
/SignApk/res/progress_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/progress_bg.png
--------------------------------------------------------------------------------
/SignApk/res/progress_fg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/progress_fg.png
--------------------------------------------------------------------------------
/SignApk/res/scrollbar_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/scrollbar_h.png
--------------------------------------------------------------------------------
/SignApk/res/scrollbar_v.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/scrollbar_v.png
--------------------------------------------------------------------------------
/SignApk/res/sys_set_tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/sys_set_tab.png
--------------------------------------------------------------------------------
/include/UICommonControls.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/include/UICommonControls.h
--------------------------------------------------------------------------------
/SignApk/res/slider_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/slider_thumb.png
--------------------------------------------------------------------------------
/SignApk/res/sys_set_tab_a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/sys_set_tab_a.png
--------------------------------------------------------------------------------
/UIEngine/UICommonControls.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/UIEngine/UICommonControls.cpp
--------------------------------------------------------------------------------
/SignApk/res/list_header_sep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/list_header_sep.png
--------------------------------------------------------------------------------
/third_party/GdiOle/GDIImage.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/third_party/GdiOle/GDIImage.bmp
--------------------------------------------------------------------------------
/third_party/GdiOle/GDIImage.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/third_party/GdiOle/GDIImage.cpp
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOleps.def:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/third_party/GdiOle/GdiOleps.def
--------------------------------------------------------------------------------
/third_party/Tinyxml/tinystr.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/third_party/Tinyxml/tinystr.cpp
--------------------------------------------------------------------------------
/SignApk/res/combobox_nohighlight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/SignApk/res/combobox_nohighlight.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | SignApk
2 | =======
3 |
4 |
5 |
6 | android
7 |
--------------------------------------------------------------------------------
/signapk_java/com/android/signapk/SignApk.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/signapk_java/com/android/signapk/SignApk.class
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/signapk_java/com/android/signapk/SignApk$SignatureOutputStream.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/achellies/SignApk/HEAD/signapk_java/com/android/signapk/SignApk$SignatureOutputStream.class
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle.rgs:
--------------------------------------------------------------------------------
1 | HKCR
2 | {
3 | NoRemove AppID
4 | {
5 | '%APPID%' = s 'GdiOle'
6 | 'GdiOle.DLL'
7 | {
8 | val AppID = s '%APPID%'
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/third_party/GdiOle/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // GdiOle.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
--------------------------------------------------------------------------------
/third_party/GdiOle/GDIImage.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | ATL 8.0 test page for object GDIImage
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/third_party/gzip/gziper.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef INCLUDE_GZIPER_H
3 | #define INCLUDE_GZIPER_H
4 |
5 | #include
6 |
7 | std::string decompress( void *compr, unsigned long len );
8 | std::string decompress2( void *compr, unsigned long len );
9 |
10 | #endif // INCLUDE_GZIPER_H
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle.def:
--------------------------------------------------------------------------------
1 | ; GdiOle.def : Declares the module parameters.
2 |
3 | LIBRARY "GdiOle.DLL"
4 |
5 | EXPORTS
6 | DllCanUnloadNow PRIVATE
7 | DllGetClassObject PRIVATE
8 | DllRegisterServer PRIVATE
9 | DllUnregisterServer PRIVATE
10 | DllInstall PRIVATE
11 |
--------------------------------------------------------------------------------
/SignApk/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // ApkPack.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 |
--------------------------------------------------------------------------------
/mkkey.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | AUTH='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
3 |
4 | openssl genrsa -3 -out apkpack.pem 2048
5 |
6 | openssl req -new -x509 -key apkpack.pem -out apkpack.x509.pem -days 10000 -subj "$AUTH"
7 |
8 | openssl pkcs8 -in apkpack.pem -topk8 -outform DER -out apkpack.pk8
9 |
--------------------------------------------------------------------------------
/third_party/GdiOle/dllmain.h:
--------------------------------------------------------------------------------
1 | // dllmain.h : Declaration of module class.
2 | #ifdef _USRDLL
3 |
4 | class CGdiOleModule : public CAtlDllModuleT< CGdiOleModule >
5 | {
6 | public :
7 | DECLARE_LIBID(LIBID_GdiOleLib)
8 | DECLARE_REGISTRY_APPID_RESOURCEID(IDR_GdiOle, "{68A116EC-E218-48FE-9E98-9998DFFD2921}")
9 | };
10 |
11 | extern class CGdiOleModule _AtlModule;
12 | #endif
--------------------------------------------------------------------------------
/Bin/settings.ini:
--------------------------------------------------------------------------------
1 | [jdk]
2 | jdk_path=D:\Program Files\Java\jdk1.7.0_01
3 | [keystore]
4 | keystore_path=D:\Project\samples\keystore_jdreader
5 | password=123456
6 | alias=jdreader
7 | android_sdk=D:\Android\android-sdk-windows
8 | output_path=D:\
9 | [pack]
10 | log=0
11 | package_type=0
12 | version_type=0
13 | [host]
14 | host=http://e.360buy.com/
15 | [sign_tool]
16 | sign_tool=0
17 |
--------------------------------------------------------------------------------
/third_party/GdiOle/dllmain.cpp:
--------------------------------------------------------------------------------
1 | // dllmain.cpp : Implementation of DllMain.
2 | #include "stdafx.h"
3 | #ifdef _USRDLL
4 | #include "resource.h"
5 | #include "GdiOle_i.h"
6 | #include "dllmain.h"
7 |
8 | CGdiOleModule _AtlModule;
9 |
10 | // DLL Entry Point
11 | extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
12 | {
13 | hInstance;
14 | return _AtlModule.DllMain(dwReason, lpReserved);
15 | }
16 | #endif
--------------------------------------------------------------------------------
/third_party/gzip/inffast.h:
--------------------------------------------------------------------------------
1 | /* inffast.h -- header to use inffast.c
2 | * Copyright (C) 1995-2003 Mark Adler
3 | * For conditions of distribution and use, see copyright notice in zlib.h
4 | */
5 |
6 | /* WARNING: this file should *not* be used by applications. It is
7 | part of the implementation of the compression library and is
8 | subject to change. Applications should only use zlib.h.
9 | */
10 |
11 | void inflate_fast OF((z_streamp strm, unsigned start));
12 |
--------------------------------------------------------------------------------
/UIEngine/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // DirectUI.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 | #if defined(UI_BUILD_FOR_WIN32) && !defined(UI_BUILD_FOR_WINCE)
10 | #pragma comment( lib, "winmm.lib" )
11 | #pragma comment( lib, "comctl32.lib" )
12 | #endif
13 |
--------------------------------------------------------------------------------
/third_party/GdiOle/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently,
3 | // but are changed infrequently
4 |
5 | #pragma once
6 |
7 | #ifndef STRICT
8 | #define STRICT
9 | #endif
10 |
11 | #include "targetver.h"
12 |
13 | #define _ATL_APARTMENT_THREADED
14 | #define _ATL_NO_AUTOMATIC_NAMESPACE
15 |
16 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
17 |
18 | #include "resource.h"
19 | #include
20 | #include
21 | #include
22 |
23 | using namespace ATL;
24 |
--------------------------------------------------------------------------------
/third_party/GdiOle/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by GdiOle.rc
4 | //
5 | #define IDS_PROJNAME 100
6 | #define IDR_GdiOle 101
7 | #define IDB_GDIIMAGE 102
8 | #define IDR_GDIIMAGE 103
9 |
10 | // Next default values for new objects
11 | //
12 | #ifdef APSTUDIO_INVOKED
13 | #ifndef APSTUDIO_READONLY_SYMBOLS
14 | #define _APS_NEXT_RESOURCE_VALUE 201
15 | #define _APS_NEXT_COMMAND_VALUE 32768
16 | #define _APS_NEXT_CONTROL_VALUE 201
17 | #define _APS_NEXT_SYMED_VALUE 104
18 | #endif
19 | #endif
20 |
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle.idl:
--------------------------------------------------------------------------------
1 | // GdiOle.idl : IDL source for ImageOle
2 | //
3 |
4 | // This file will be processed by the MIDL tool to
5 | // produce the type library (GdiOle.tlb) and marshalling code.
6 |
7 | #include "olectl.h"
8 | import "oaidl.idl";
9 | import "ocidl.idl";
10 |
11 | [
12 | object,
13 | uuid(109E151F-5C8F-4321-B842-46150141B11A),
14 | dual,
15 | nonextensible,
16 | helpstring("IGdiOle Interface"),
17 | pointer_default(unique)
18 | ]
19 | interface IGDIImage : IDispatch{
20 | };
21 |
22 | [
23 | uuid(2E22569D-D190-4744-9EF8-A45A75049E1F),
24 | version(1.0),
25 | helpstring("GdiOle 1.0 Type Library")
26 | ]
27 | library GdiOleLib
28 | {
29 | importlib("stdole2.tlb");
30 | [
31 | uuid(18583A78-3E42-472C-9871-F1D3104C7AF4),
32 | control,
33 | helpstring("GdiOle")
34 | ]
35 | coclass GDIImage
36 | {
37 | [default] interface IGDIImage;
38 | };
39 | };
40 |
--------------------------------------------------------------------------------
/third_party/GdiOle/dlldata.c:
--------------------------------------------------------------------------------
1 | /*********************************************************
2 | DllData file -- generated by MIDL compiler
3 |
4 | DO NOT ALTER THIS FILE
5 |
6 | This file is regenerated by MIDL on every IDL file compile.
7 |
8 | To completely reconstruct this file, delete it and rerun MIDL
9 | on all the IDL files in this DLL, specifying this file for the
10 | /dlldata command line option
11 |
12 | *********************************************************/
13 |
14 | #define PROXY_DELEGATION
15 |
16 | #include
17 |
18 | #ifdef __cplusplus
19 | extern "C" {
20 | #endif
21 |
22 | EXTERN_PROXY_FILE( GdiOle )
23 |
24 |
25 | PROXYFILE_LIST_START
26 | /* Start of list */
27 | REFERENCE_PROXY_FILE( GdiOle ),
28 | /* End of list */
29 | PROXYFILE_LIST_END
30 |
31 |
32 | DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
33 |
34 | #ifdef __cplusplus
35 | } /*extern "C" */
36 | #endif
37 |
38 | /* end of generated dlldata file */
39 |
--------------------------------------------------------------------------------
/include/PostConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | // DirectUI - UI Library
4 | //
5 | // Written by Bjarke Viksoe (bjarke@viksoe.dk)
6 | // Copyright (c) 2006-2007 Bjarke Viksoe.
7 | //
8 | // This code may be used in compiled form in any way you desire. These
9 | // source files may be redistributed by any means PROVIDING it is
10 | // not sold for profit without the authors written consent, and
11 | // providing that this notice and the authors name is included.
12 | //
13 | // This file is provided "as is" with no expressed or implied warranty.
14 | // The author accepts no liability if it causes any damage to you or your
15 | // computer whatsoever. It's free, so don't hassle me about it.
16 | //
17 | ////
18 | // Acknowledgements :
19 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
20 | //
21 | //
22 | //
23 | // Beware of bugs.
24 | //
25 | //
26 | //
27 | ////////////////////////////////////////////////////////
28 |
29 | #ifndef PostConfig_DEFINED
30 | #define PostConfig_DEFINED
31 |
32 | #endif
33 |
34 |
--------------------------------------------------------------------------------
/third_party/GdiOle/GDIImage.rgs:
--------------------------------------------------------------------------------
1 | HKCR
2 | {
3 | GdiOle.GDIImage.1 = s 'GDIImage Class'
4 | {
5 | CLSID = s '{1256AD0C-C8BD-429A-BEBE-3F1A87C49894}'
6 | 'Insertable'
7 | }
8 | GdiOle.GDIImage = s 'GDIImage Class'
9 | {
10 | CLSID = s '{1256AD0C-C8BD-429A-BEBE-3F1A87C49894}'
11 | CurVer = s 'GdiOle.GDIImage.1'
12 | }
13 | NoRemove CLSID
14 | {
15 | ForceRemove {1256AD0C-C8BD-429A-BEBE-3F1A87C49894} = s 'GDIImage Class'
16 | {
17 | ProgID = s 'GdiOle.GDIImage.1'
18 | VersionIndependentProgID = s 'GdiOle.GDIImage'
19 | ForceRemove 'Programmable'
20 | InprocServer32 = s '%MODULE%'
21 | {
22 | val ThreadingModel = s 'Apartment'
23 | }
24 | val AppID = s '%APPID%'
25 | ForceRemove 'Control'
26 | ForceRemove 'Insertable'
27 | ForceRemove 'ToolboxBitmap32' = s '%MODULE%, 102'
28 | 'MiscStatus' = s '0'
29 | {
30 | '1' = s '%OLEMISC%'
31 | }
32 | 'TypeLib' = s '{1024F232-BC4E-407E-9B00-EE306CB20996}'
33 | 'Version' = s '1.0'
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/SignApk/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 |
8 | #include "targetver.h"
9 |
10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
11 | // Windows Header Files:
12 | #include
13 |
14 | // C RunTime Header Files
15 | #include
16 | #include
17 | #include
18 | #include
19 |
20 | #define _CRT_SECURE_NO_DEPRECATE
21 |
22 | #include
23 | #include
24 | #include "UIlib.h"
25 | #include "debug.hpp"
26 |
27 | #pragma comment(lib, "DirectUI.lib")
28 |
29 | #define USE(FEATURE) (defined USE_##FEATURE && USE_##FEATURE)
30 | #define ENABLE(FEATURE) (defined ENABLE_##FEATURE && ENABLE_##FEATURE)
31 |
32 | #define USE_ZIP_SKIN 0
33 | #define USE_EMBEDED_RESOURCE 1
34 |
35 |
36 | // TODO: reference additional headers your program requires here
37 |
--------------------------------------------------------------------------------
/SignApk/window_util.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // window_util.hpp
3 | // ~~~~~~~~~~~~~~~
4 | //
5 | // Copyright (c) 2011 achellies (achellies at 163 dot com)
6 | //
7 | // This code may be used in compiled form in any way you desire. This
8 | // source file may be redistributed by any means PROVIDING it is
9 | // not sold for profit without the authors written consent, and
10 | // providing that this notice and the authors name is included.
11 | //
12 | // This file is provided "as is" with no expressed or implied warranty.
13 | // The author accepts no liability if it causes any damage to you or your
14 | // computer whatsoever. It's free, so don't hassle me about it.
15 | //
16 | // Beware of bugs.
17 | //
18 |
19 | #ifndef WINDOW_UTIL_HPP
20 | #define WINDOW_UTIL_HPP
21 |
22 | bool GetVerString(unsigned int maxStrSize, TCHAR *szComments,
23 | TCHAR *szCompanyName, TCHAR *szFileDescription,
24 | TCHAR *szFileVersion, TCHAR *szLegalCopyright,
25 | TCHAR *szProductName, TCHAR *szProductVersion);
26 |
27 | #endif // WINDOW_UTIL_HPP
--------------------------------------------------------------------------------
/UIEngine/UIlib.cpp:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | // DirectUI - UI Library
4 | //
5 | // Written by Bjarke Viksoe (bjarke@viksoe.dk)
6 | // Copyright (c) 2006-2007 Bjarke Viksoe.
7 | //
8 | // This code may be used in compiled form in any way you desire. These
9 | // source files may be redistributed by any means PROVIDING it is
10 | // not sold for profit without the authors written consent, and
11 | // providing that this notice and the authors name is included.
12 | //
13 | // This file is provided "as is" with no expressed or implied warranty.
14 | // The author accepts no liability if it causes any damage to you or your
15 | // computer whatsoever. It's free, so don't hassle me about it.
16 | //
17 | // Beware of bugs.
18 | //
19 | //
20 |
21 |
22 | #include "stdafx.h"
23 | #include "UIlib.h"
24 |
25 |
26 | BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID /*lpReserved*/)
27 | {
28 | switch( dwReason ) {
29 | case DLL_PROCESS_ATTACH:
30 | case DLL_THREAD_ATTACH:
31 | case DLL_THREAD_DETACH:
32 | case DLL_PROCESS_DETACH:
33 | ::DisableThreadLibraryCalls((HMODULE)hModule);
34 | break;
35 | }
36 | return TRUE;
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/SignApk/res/msg_box.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/SignApk/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // The following macros define the minimum required platform. The minimum required platform
4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
5 | // your application. The macros work by enabling all features available on platform versions up to and
6 | // including the version specified.
7 |
8 | // Modify the following defines if you have to target a platform prior to the ones specified below.
9 | // Refer to MSDN for the latest info on corresponding values for different platforms.
10 | #ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
11 | #define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
12 | #endif
13 |
14 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
15 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
16 | #endif
17 |
18 | #ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
19 | #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
20 | #endif
21 |
22 | #ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
23 | #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
24 | #endif
25 |
--------------------------------------------------------------------------------
/third_party/GdiOle/targetver.h:
--------------------------------------------------------------------------------
1 |
2 | #pragma once
3 |
4 | // The following macros define the minimum required platform. The minimum required platform
5 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
6 | // your application. The macros work by enabling all features available on platform versions up to and
7 | // including the version specified.
8 |
9 | // Modify the following defines if you have to target a platform prior to the ones specified below.
10 | // Refer to MSDN for the latest info on corresponding values for different platforms.
11 | #ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
12 | #define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
13 | #endif
14 |
15 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
16 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
17 | #endif
18 |
19 | #ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
20 | #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
21 | #endif
22 |
23 | #ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
24 | #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
25 | #endif
26 |
27 |
--------------------------------------------------------------------------------
/SignApk.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual Studio 2008
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SignApk", "SignApk\SignApk.vcproj", "{EE5C4A06-FE43-4B59-B611-864690D97CBA}"
5 | ProjectSection(ProjectDependencies) = postProject
6 | {5A3C2C47-9864-4228-A99C-6CDB70F5206C} = {5A3C2C47-9864-4228-A99C-6CDB70F5206C}
7 | EndProjectSection
8 | EndProject
9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UIEngine", "UIEngine\UIEngine.vcproj", "{5A3C2C47-9864-4228-A99C-6CDB70F5206C}"
10 | EndProject
11 | Global
12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
13 | Debug|Win32 = Debug|Win32
14 | Release|Win32 = Release|Win32
15 | EndGlobalSection
16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
17 | {EE5C4A06-FE43-4B59-B611-864690D97CBA}.Debug|Win32.ActiveCfg = Debug|Win32
18 | {EE5C4A06-FE43-4B59-B611-864690D97CBA}.Debug|Win32.Build.0 = Debug|Win32
19 | {EE5C4A06-FE43-4B59-B611-864690D97CBA}.Release|Win32.ActiveCfg = Release|Win32
20 | {EE5C4A06-FE43-4B59-B611-864690D97CBA}.Release|Win32.Build.0 = Release|Win32
21 | {5A3C2C47-9864-4228-A99C-6CDB70F5206C}.Debug|Win32.ActiveCfg = Debug|Win32
22 | {5A3C2C47-9864-4228-A99C-6CDB70F5206C}.Debug|Win32.Build.0 = Debug|Win32
23 | {5A3C2C47-9864-4228-A99C-6CDB70F5206C}.Release|Win32.ActiveCfg = Release|Win32
24 | {5A3C2C47-9864-4228-A99C-6CDB70F5206C}.Release|Win32.Build.0 = Release|Win32
25 | EndGlobalSection
26 | GlobalSection(SolutionProperties) = preSolution
27 | HideSolutionNode = FALSE
28 | EndGlobalSection
29 | EndGlobal
30 |
--------------------------------------------------------------------------------
/third_party/drm/md5.h:
--------------------------------------------------------------------------------
1 | #ifndef md5_h
2 | #define md5_h
3 |
4 | /*
5 | ** Copyright 1998 - 2001 Double Precision, Inc.
6 | ** See COPYING for distribution information.
7 | */
8 |
9 | /*
10 | ** RFC 1321 MD5 Message digest calculation.
11 | **
12 | ** Returns a pointer to a sixteen-byte message digest.
13 | */
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | #define MD5_DIGEST_SIZE 16
20 | #define MD5_BLOCK_SIZE 64
21 | #define MD5_WORD unsigned int
22 |
23 | typedef unsigned char MD5_DIGEST[MD5_DIGEST_SIZE];
24 |
25 | #ifdef MD5_INTERNAL
26 |
27 | struct MD5_CONTEXT {
28 |
29 | MD5_WORD A, B, C, D;
30 |
31 | unsigned char blk[MD5_BLOCK_SIZE];
32 | unsigned blk_ptr;
33 | } ;
34 |
35 | void md5_context_init(struct MD5_CONTEXT *);
36 | void md5_context_hash(struct MD5_CONTEXT *,
37 | const unsigned char[MD5_BLOCK_SIZE]);
38 | void md5_context_hashstream(struct MD5_CONTEXT *, const void *, unsigned);
39 | void md5_context_endstream(struct MD5_CONTEXT *, unsigned long);
40 | void md5_context_digest(struct MD5_CONTEXT *, MD5_DIGEST);
41 |
42 | void md5_context_restore(struct MD5_CONTEXT *, const MD5_DIGEST);
43 |
44 | #endif
45 |
46 | void md5_digest(const void *msg, unsigned int len, MD5_DIGEST);
47 |
48 | char *md5_crypt_redhat(const char *, const char *);
49 | #define md5_crypt md5_crypt_redhat
50 |
51 | const char *md5_hash_courier(const char *);
52 | const char *md5_hash_raw(const char *);
53 |
54 | #ifdef __cplusplus
55 | } ;
56 | #endif
57 |
58 | #endif
59 |
--------------------------------------------------------------------------------
/include/wcestddef.h:
--------------------------------------------------------------------------------
1 |
2 | #pragma once
3 |
4 | #pragma comment(linker, "/nodefaultlib:libc.lib")
5 | #pragma comment(linker, "/nodefaultlib:libcd.lib")
6 |
7 |
8 | #include
9 | #if defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP)
10 | #define SHELL_AYGSHELL
11 | #endif
12 |
13 | #ifdef _CE_DCOM
14 | #define _ATL_APARTMENT_THREADED
15 | #endif
16 |
17 | #if defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP)
18 | #ifndef _DEVICE_RESOLUTION_AWARE
19 | #define _DEVICE_RESOLUTION_AWARE
20 | #endif
21 | #endif
22 |
23 |
24 | #if _WIN32_WCE == 420 || _WIN32_WCE == 0x420
25 | // For Pocket PC 2003
26 | #pragma comment(lib, "ccrtrtti.lib")
27 | #endif
28 |
29 | #if _MSC_VER >= 1300
30 |
31 | // NOTE - this value is not strongly correlated to the Windows CE OS version being targeted
32 | #undef WINVER
33 | #define WINVER _WIN32_WCE
34 |
35 | #ifdef _DEVICE_RESOLUTION_AWARE
36 | #include "DeviceResolutionAware.h"
37 | #endif
38 |
39 | #if _WIN32_WCE < 0x500 && ( defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP) )
40 | #ifdef _X86_
41 | #if defined(_DEBUG)
42 | #pragma comment(lib, "libcmtx86d.lib")
43 | #else
44 | #pragma comment(lib, "libcmtx86.lib")
45 | #endif
46 | #endif
47 | #endif
48 |
49 | #include
50 |
51 | #endif// _MSC_VER >= 1300
52 |
53 | #ifdef SHELL_AYGSHELL
54 | #include
55 | #pragma comment(lib, "aygshell.lib")
56 | #endif // SHELL_AYGSHELL
57 |
58 | // TODO: reference additional headers your program requires here
59 |
--------------------------------------------------------------------------------
/include/UIRating.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIRATING_H__
2 | #define __UIRATING_H__
3 |
4 | #ifdef _MSC_VER
5 | #pragma once
6 | #endif
7 |
8 | namespace DuiLib {
9 | /////////////////////////////////////////////////////////////////////////////////////
10 | //
11 |
12 | // RatingUI
13 | extern const TCHAR* const kRatingUIClassName;// = _T("RatingUI");
14 | extern const TCHAR* const kRatingUIInterfaceName;// = _T("Rating");
15 |
16 | class CRatingUI : public CLabelUI
17 | {
18 | public:
19 | CRatingUI();
20 |
21 | ~CRatingUI();
22 |
23 | LPCTSTR GetClass() const;
24 | LPVOID GetInterface(LPCTSTR pstrName);
25 | UINT GetControlFlags() const;
26 |
27 | bool IsHorizontal();
28 | void SetHorizontal(bool bHorizontal = true);
29 | int GetMinValue() const;
30 | void SetMinValue(int nMin);
31 | int GetMaxValue() const;
32 | void SetMaxValue(int nMax);
33 | int GetValue() const;
34 | void SetValue(int nValue);
35 | LPCTSTR GetNormalImage() const;
36 | void SetNormalImage(LPCTSTR pStrImage);
37 | LPCTSTR GetDisabledImage() const;
38 | void SetDisabledImage(LPCTSTR pStrImage);
39 |
40 | void DoEvent(TEventUI& event);
41 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
42 |
43 | void DoPaint(void* ctx, const RECT& rcPaint);
44 | void PaintStatusImage(void* ctx);
45 |
46 | protected:
47 | bool m_bHorizontal;
48 | int m_nMax;
49 | int m_nMin;
50 | int m_nValue;
51 |
52 | UINT m_uButtonState;
53 |
54 | CStdString m_sNormalImage;
55 | CStdString m_sDisabledImage;
56 | };
57 |
58 | } // namespace DuiLib
59 |
60 | #endif // __UICOMBOEX_H__
61 |
--------------------------------------------------------------------------------
/UIEngine/UIEngine.vcproj.achellies-PC.achellies.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/Bin/platform.x509.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIEqDCCA5CgAwIBAgIJALOZgIbQVs/6MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYD
3 | VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
4 | VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE
5 | AxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
6 | Fw0wODA0MTUyMjQwNTBaFw0zNTA5MDEyMjQwNTBaMIGUMQswCQYDVQQGEwJVUzET
7 | MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G
8 | A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p
9 | ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI
10 | hvcNAQEBBQADggENADCCAQgCggEBAJx4BZKsDV04HN6qZezIpgBuNkgMbXIHsSAR
11 | vlCGOqvitV0Amt9xRtbyICKAx81Ne9smJDuKgGwms0sTdSOkkmgiSQTcAUk+fArP
12 | GgXIdPabA3tgMJ2QdNJCgOFrrSqHNDYZUer3KkgtCbIEsYdeEqyYwap3PWgAuer9
13 | 5W1Yvtjo2hb5o2AJnDeoNKbf7be2tEoEngeiafzPLFSW8s821k35CjuNjzSjuqtM
14 | 9TNxqydxmzulh1StDFP8FOHbRdUeI0+76TybpO35zlQmE1DsU1YHv2mi/0qgfbX3
15 | 6iANCabBtJ4hQC+J7RGQiTqrWpGA8VLoL4WkV1PPX8GQccXuyCcCAQOjgfwwgfkw
16 | HQYDVR0OBBYEFE/koLPdnLop9x1yh8Tnw48ghsKZMIHJBgNVHSMEgcEwgb6AFE/k
17 | oLPdnLop9x1yh8Tnw48ghsKZoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UE
18 | CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMH
19 | QW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAG
20 | CSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJALOZgIbQVs/6MAwGA1Ud
21 | EwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBAFclUbjZOh9z3g9tRp+G2tZwFAAp
22 | PIigzXzXeLc9r8wZf6t25iEuVsHHYc/EL9cz3lLFCuCIFM78CjtaGkNGBU2Cnx2C
23 | tCsgSL+ItdFJKe+F9g7dEtctVWV+IuPoXQTIMdYT0Zk4u4mCJH+jISVroS0dao+S
24 | 6h2xw3Mxe6DAN/DRr/ZFrvIkl5+6bnoUvAJccbmBOM7z3fwFlhfPJIRc97QNY4L3
25 | J17XOElatuWTG5QhdlxJG3L7aOCA29tYwgKdNHyLMozkPvaosVUz7fvpib1qSN1L
26 | IC7alMarjdW4OZID2q4u1EYjLk/pvZYTlMYwDlE448/Shebk5INTjLixs1c=
27 | -----END CERTIFICATE-----
28 |
--------------------------------------------------------------------------------
/SignApk/SignApk.vcproj.achellies-PC.achellies.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/signapk_java/platform.x509.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIEqDCCA5CgAwIBAgIJALOZgIbQVs/6MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYD
3 | VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
4 | VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE
5 | AxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
6 | Fw0wODA0MTUyMjQwNTBaFw0zNTA5MDEyMjQwNTBaMIGUMQswCQYDVQQGEwJVUzET
7 | MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G
8 | A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p
9 | ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI
10 | hvcNAQEBBQADggENADCCAQgCggEBAJx4BZKsDV04HN6qZezIpgBuNkgMbXIHsSAR
11 | vlCGOqvitV0Amt9xRtbyICKAx81Ne9smJDuKgGwms0sTdSOkkmgiSQTcAUk+fArP
12 | GgXIdPabA3tgMJ2QdNJCgOFrrSqHNDYZUer3KkgtCbIEsYdeEqyYwap3PWgAuer9
13 | 5W1Yvtjo2hb5o2AJnDeoNKbf7be2tEoEngeiafzPLFSW8s821k35CjuNjzSjuqtM
14 | 9TNxqydxmzulh1StDFP8FOHbRdUeI0+76TybpO35zlQmE1DsU1YHv2mi/0qgfbX3
15 | 6iANCabBtJ4hQC+J7RGQiTqrWpGA8VLoL4WkV1PPX8GQccXuyCcCAQOjgfwwgfkw
16 | HQYDVR0OBBYEFE/koLPdnLop9x1yh8Tnw48ghsKZMIHJBgNVHSMEgcEwgb6AFE/k
17 | oLPdnLop9x1yh8Tnw48ghsKZoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UE
18 | CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMH
19 | QW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAG
20 | CSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJALOZgIbQVs/6MAwGA1Ud
21 | EwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBAFclUbjZOh9z3g9tRp+G2tZwFAAp
22 | PIigzXzXeLc9r8wZf6t25iEuVsHHYc/EL9cz3lLFCuCIFM78CjtaGkNGBU2Cnx2C
23 | tCsgSL+ItdFJKe+F9g7dEtctVWV+IuPoXQTIMdYT0Zk4u4mCJH+jISVroS0dao+S
24 | 6h2xw3Mxe6DAN/DRr/ZFrvIkl5+6bnoUvAJccbmBOM7z3fwFlhfPJIRc97QNY4L3
25 | J17XOElatuWTG5QhdlxJG3L7aOCA29tYwgKdNHyLMozkPvaosVUz7fvpib1qSN1L
26 | IC7alMarjdW4OZID2q4u1EYjLk/pvZYTlMYwDlE448/Shebk5INTjLixs1c=
27 | -----END CERTIFICATE-----
28 |
--------------------------------------------------------------------------------
/Bin/apkpack.x509.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIEsDCCA5igAwIBAgIJAJwcy1ST84KjMA0GCSqGSIb3DQEBBQUAMIGWMQswCQYD
3 | VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
4 | VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE
5 | AxMHQW5kcm9pZDEkMCIGCSqGSIb3DQEJARYVYW5kcm9pZEBhbmRyb2lkLmNvbQ0N
6 | MCAXDTEyMDMwOTAzMzMyNFoYDzE5MDMwNjE5MjEwNTA4WjCBljELMAkGA1UEBhMC
7 | VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcx
8 | EDAOBgNVBAoTB0FuZHJvaWQxEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0Fu
9 | ZHJvaWQxJDAiBgkqhkiG9w0BCQEWFWFuZHJvaWRAYW5kcm9pZC5jb20NDTCCASAw
10 | DQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANLmfmm0RT5q55SHWpLvPZYqBUrg
11 | 4gfEbDBKCMoVLVCqVMAQXWkUTjcwsX2OQluadqhiwTPCJnpgo75N8bGr6W0ArYXZ
12 | EFab+pzPBWL+TLVC8g/JOvJYUOTIQQKur51W5mQ7qMFNEI51ST8+P+5TCpTEnycf
13 | OJiNtFhEcEesnJncOdxRVw9eU1kCQnQ6O5PVvg/t5QtpMz2VOEshGW6D1QUKJu1f
14 | pGDZoni7MY6X7P38VZ9GKI2RGE1V/M8JOvL1kUzBPiAgNIt9U2R0UO+Cj3bIb7Cm
15 | GFGHik3T8CldxS6lOaBOnTE3W0VfT+UyY3cXj5Ll0p4urYaJRdgCv5gzQZkCAQOj
16 | gf4wgfswHQYDVR0OBBYEFJCAPiMj538LtAVjezhRwPDMculhMIHLBgNVHSMEgcMw
17 | gcCAFJCAPiMj538LtAVjezhRwPDMculhoYGcpIGZMIGWMQswCQYDVQQGEwJVUzET
18 | MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G
19 | A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p
20 | ZDEkMCIGCSqGSIb3DQEJARYVYW5kcm9pZEBhbmRyb2lkLmNvbQ0NggkAnBzLVJPz
21 | gqMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAU6+fWOgpeCpNU8j+
22 | tGtoBnoy3upGHY/Lgktfk2Xp1wdGYr57Icjc7Y9uh8yyQxVqm1PrdJBbTFkbi2UO
23 | OjPpdGu9GWBZtRjA+xtgT60N7du/k9ZxlICL2nMYnYNscyb15QusOHMJ+3chB+/G
24 | Nyey9LWPA43jsMkHb06yMA+YWnBlicrwil9rKhFp03gOTwRcLWsLjxXZ4HSQw9fX
25 | PrmDXRkeb4rj5ehtlW5EEULcAIuqNlQvJrFocGbJtW0fQvaMj5KkxrIPsZHCD8X7
26 | Ag8R97z8GRoO9zHEOPsRu3LYAdxsxLtL8FRMmByCv5J9CQR5BFs6R0Qz4O+xosqp
27 | 2rh4ow==
28 | -----END CERTIFICATE-----
29 |
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle.cpp:
--------------------------------------------------------------------------------
1 | // GdiOle.cpp : Implementation of DLL Exports.
2 | #include "stdafx.h"
3 |
4 | #ifdef _USRDLL
5 | #include "resource.h"
6 | #include "GdiOle_i.h"
7 | #include "dllmain.h"
8 |
9 | // Used to determine whether the DLL can be unloaded by OLE
10 | STDAPI DllCanUnloadNow(void)
11 | {
12 | return _AtlModule.DllCanUnloadNow();
13 | }
14 |
15 |
16 | // Returns a class factory to create an object of the requested type
17 | STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
18 | {
19 | return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
20 | }
21 |
22 |
23 | // DllRegisterServer - Adds entries to the system registry
24 | STDAPI DllRegisterServer(void)
25 | {
26 | // registers object, typelib and all interfaces in typelib
27 | HRESULT hr = _AtlModule.DllRegisterServer();
28 | return hr;
29 | }
30 |
31 |
32 | // DllUnregisterServer - Removes entries from the system registry
33 | STDAPI DllUnregisterServer(void)
34 | {
35 | HRESULT hr = _AtlModule.DllUnregisterServer();
36 | return hr;
37 | }
38 |
39 | // DllInstall - Adds/Removes entries to the system registry per user
40 | // per machine.
41 | STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine)
42 | {
43 | HRESULT hr = E_FAIL;
44 | static const wchar_t szUserSwitch[] = L"user";
45 |
46 | #if _MSC_VER >= 1500
47 | if (pszCmdLine != NULL)
48 | {
49 | if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0)
50 | {
51 | AtlSetPerUserRegistration(true);
52 | }
53 | }
54 | #endif
55 |
56 | if (bInstall)
57 | {
58 | hr = DllRegisterServer();
59 | if (FAILED(hr))
60 | {
61 | DllUnregisterServer();
62 | }
63 | }
64 | else
65 | {
66 | hr = DllUnregisterServer();
67 | }
68 |
69 | return hr;
70 | }
71 |
72 |
73 | #endif // #ifdef _USRDLL
--------------------------------------------------------------------------------
/SignApk/message_box.hpp:
--------------------------------------------------------------------------------
1 | #ifndef MESSAGE_BOX_HPP
2 | #define MESSAGE_BOX_HPP
3 |
4 | //MB_ABORTRETRYIGNORE The message box contains three push buttons: Abort, Retry, and Ignore.
5 | //MB_OK The message box contains one push button: OK. This is the default.
6 | //MB_OKCANCEL The message box contains two push buttons: OK and Cancel.
7 | //MB_RETRYCANCEL The message box contains two push buttons: Retry and Cancel.
8 | //MB_YESNO The message box contains two push buttons: Yes and No.
9 | //MB_YESNOCANCEL The message box contains three push buttons: Yes, No, and Cancel.
10 | int DUIMessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType = MB_OK);
11 |
12 | class WindowImplBase;
13 | class CMessageBox : public WindowImplBase
14 | {
15 | friend int DUIMessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType);
16 | protected:
17 |
18 | CMessageBox(HWND hParent, const tString& caption, const tString& message, UINT uType);
19 | ~CMessageBox();
20 |
21 | protected:
22 |
23 | LPCTSTR GetWindowClassName() const;
24 |
25 | virtual void OnFinalMessage(HWND hWnd);
26 |
27 | virtual void Init();
28 |
29 | virtual LRESULT ResponseDefaultKeyEvent(WPARAM wParam);
30 |
31 | virtual tString GetSkinFile();
32 |
33 | virtual tString GetSkinFolder();
34 |
35 | virtual LONG GetStyle();
36 |
37 | virtual CControlUI* CreateControl(LPCTSTR pstrClass);
38 |
39 | virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
40 |
41 | virtual LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
42 |
43 | virtual LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
44 |
45 | protected:
46 | void Notify(TNotifyUI& msg);
47 |
48 | void OnPrepare(TNotifyUI& msg);
49 |
50 | private:
51 | HWND parent_;
52 | tString caption_;
53 | tString message_;
54 | UINT type_;
55 | };
56 |
57 | #endif // MESSAGE_BOX_HPP
--------------------------------------------------------------------------------
/third_party/Tinyxml/tinyxmlerror.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | www.sourceforge.net/projects/tinyxml
3 | Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any
7 | damages arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any
10 | purpose, including commercial applications, and to alter it and
11 | redistribute it freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must
14 | not claim that you wrote the original software. If you use this
15 | software in a product, an acknowledgment in the product documentation
16 | would be appreciated but is not required.
17 |
18 | 2. Altered source versions must be plainly marked as such, and
19 | must not be misrepresented as being the original software.
20 |
21 | 3. This notice may not be removed or altered from any source
22 | distribution.
23 | */
24 |
25 | #include "tinyxml.h"
26 |
27 | // The goal of the seperate error file is to make the first
28 | // step towards localization. tinyxml (currently) only supports
29 | // english error messages, but the could now be translated.
30 | //
31 | // It also cleans up the code a bit.
32 | //
33 |
34 | const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =
35 | {
36 | "No error",
37 | "Error",
38 | "Failed to open file",
39 | "Memory allocation failed.",
40 | "Error parsing Element.",
41 | "Failed to read Element name",
42 | "Error reading Element value.",
43 | "Error reading Attributes.",
44 | "Error: empty tag.",
45 | "Error reading end tag.",
46 | "Error parsing Unknown.",
47 | "Error parsing Comment.",
48 | "Error parsing Declaration.",
49 | "Error document empty.",
50 | "Error null (0) or unexpected EOF found in input stream.",
51 | "Error parsing CDATA.",
52 | "Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
53 | };
54 |
--------------------------------------------------------------------------------
/SignApk/res/list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/include/UIIEActiveX.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIIEACTIVEX_H__
2 | #define __UIIEACTIVEX_H__
3 |
4 | #pragma once
5 | #include
6 | #include "UIActiveX.h"
7 | struct IOleObject;
8 |
9 |
10 | namespace DuiLib {
11 | /////////////////////////////////////////////////////////////////////////////////////
12 | //
13 |
14 | class CIEActiveXCtrl;
15 |
16 | /////////////////////////////////////////////////////////////////////////////////////
17 | //
18 |
19 | class UILIB_API CIEActiveXUI : public CControlUI, public IMessageFilterUI
20 | {
21 | friend CIEActiveXCtrl;
22 | public:
23 | CIEActiveXUI();
24 | virtual ~CIEActiveXUI();
25 |
26 | LPCTSTR GetClass() const;
27 | LPVOID GetInterface(LPCTSTR pstrName);
28 |
29 | HWND GetHostWindow() const;
30 |
31 | bool IsDelayCreate() const;
32 | void SetDelayCreate(bool bDelayCreate = true);
33 |
34 | bool CreateControl(const CLSID clsid);
35 | bool CreateControl(LPCTSTR pstrCLSID);
36 | HRESULT GetControl(const IID iid, LPVOID* ppRet);
37 | CLSID GetClisd() const;
38 | CStdString GetModuleName() const;
39 | void SetModuleName(LPCTSTR pstrText);
40 |
41 | void SetVisible(bool bVisible = true);
42 | void SetInternVisible(bool bVisible = true);
43 | void SetPos(RECT rc);
44 | void DoPaint(HDC hDC, const RECT& rcPaint);
45 |
46 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
47 | void SetExternalUIHandler(IDocHostUIHandler* handler);
48 |
49 | LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
50 |
51 | BOOL Refresh();
52 | BOOL Stop();
53 | BOOL GoForward();
54 | BOOL GoBack();
55 |
56 | BOOL NavigateToURL(const WCHAR * pcszURL);
57 | protected:
58 | void ReleaseControl();
59 | bool DoCreateControl();
60 |
61 | protected:
62 | CLSID m_clsid;
63 | CStdString m_sModuleName;
64 | bool m_bCreated;
65 | bool m_bDelayCreate;
66 | IOleObject* m_pUnk;
67 | CIEActiveXCtrl* m_pControl;
68 | HWND m_hwndHost;
69 | IDocHostUIHandler* m_HostUIHandler;
70 | };
71 |
72 | } // namespace DuiLib
73 |
74 | #endif // __UIIEACTIVEX_H__
75 |
--------------------------------------------------------------------------------
/UIEngine/UIIEActiveX.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIIEACTIVEX_H__
2 | #define __UIIEACTIVEX_H__
3 |
4 | #pragma once
5 | #include
6 | #include "UIActiveX.h"
7 | struct IOleObject;
8 |
9 |
10 | namespace DuiLib {
11 | /////////////////////////////////////////////////////////////////////////////////////
12 | //
13 |
14 | class CIEActiveXCtrl;
15 |
16 | /////////////////////////////////////////////////////////////////////////////////////
17 | //
18 |
19 | class UILIB_API CIEActiveXUI : public CControlUI, public IMessageFilterUI
20 | {
21 | friend CIEActiveXCtrl;
22 | public:
23 | CIEActiveXUI();
24 | virtual ~CIEActiveXUI();
25 |
26 | LPCTSTR GetClass() const;
27 | LPVOID GetInterface(LPCTSTR pstrName);
28 |
29 | HWND GetHostWindow() const;
30 |
31 | bool IsDelayCreate() const;
32 | void SetDelayCreate(bool bDelayCreate = true);
33 |
34 | bool CreateControl(const CLSID clsid);
35 | bool CreateControl(LPCTSTR pstrCLSID);
36 | HRESULT GetControl(const IID iid, LPVOID* ppRet);
37 | CLSID GetClisd() const;
38 | CStdString GetModuleName() const;
39 | void SetModuleName(LPCTSTR pstrText);
40 |
41 | void SetVisible(bool bVisible = true);
42 | void SetInternVisible(bool bVisible = true);
43 | void SetPos(RECT rc);
44 | void DoPaint(HDC hDC, const RECT& rcPaint);
45 |
46 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
47 | void SetExternalUIHandler(IDocHostUIHandler* handler);
48 |
49 | LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
50 |
51 | BOOL Refresh();
52 | BOOL Stop();
53 | BOOL GoForward();
54 | BOOL GoBack();
55 |
56 | BOOL NavigateToURL(const WCHAR * pcszURL);
57 | protected:
58 | void ReleaseControl();
59 | bool DoCreateControl();
60 |
61 | protected:
62 | CLSID m_clsid;
63 | CStdString m_sModuleName;
64 | bool m_bCreated;
65 | bool m_bDelayCreate;
66 | IOleObject* m_pUnk;
67 | CIEActiveXCtrl* m_pControl;
68 | HWND m_hwndHost;
69 | IDocHostUIHandler* m_HostUIHandler;
70 | };
71 |
72 | } // namespace DuiLib
73 |
74 | #endif // __UIIEACTIVEX_H__
75 |
--------------------------------------------------------------------------------
/include/UIDlgBuilder.h:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | // DirectUI - UI Library
4 | //
5 | // Written by Bjarke Viksoe (bjarke@viksoe.dk)
6 | // Copyright (c) 2006-2007 Bjarke Viksoe.
7 | //
8 | // This code may be used in compiled form in any way you desire. These
9 | // source files may be redistributed by any means PROVIDING it is
10 | // not sold for profit without the authors written consent, and
11 | // providing that this notice and the authors name is included.
12 | //
13 | // This file is provided "as is" with no expressed or implied warranty.
14 | // The author accepts no liability if it causes any damage to you or your
15 | // computer whatsoever. It's free, so don't hassle me about it.
16 | //
17 | ////
18 | // Acknowledgements :
19 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
20 | //
21 | //
22 | //
23 | // Beware of bugs.
24 | //
25 | //
26 | //
27 | ////////////////////////////////////////////////////////
28 | #ifndef __UIDLGBUILDER_H__
29 | #define __UIDLGBUILDER_H__
30 |
31 | #ifdef _MSC_VER
32 | #pragma once
33 | #endif
34 |
35 | namespace DuiLib {
36 |
37 | class UILIB_API IDialogBuilderCallback
38 | {
39 | public:
40 | virtual CControlUI* CreateControl(LPCTSTR pstrClass, CPaintManagerUI* pManager) = 0;
41 | };
42 |
43 |
44 | class UILIB_API CDialogBuilder
45 | {
46 | public:
47 | CDialogBuilder();
48 | CControlUI* Create(STRINGorID xml, LPCTSTR type = NULL, IDialogBuilderCallback* pCallback = NULL,
49 | CPaintManagerUI* pManager = NULL, CControlUI* pParent = NULL);
50 | CControlUI* Create(IDialogBuilderCallback* pCallback = NULL, CPaintManagerUI* pManager = NULL,
51 | CControlUI* pParent = NULL);
52 |
53 | CMarkup* GetMarkup();
54 | void GetLastErrorMessage(LPTSTR pstrMessage, SIZE_T cchMax) const;
55 | void GetLastErrorLocation(LPTSTR pstrSource, SIZE_T cchMax) const;
56 | private:
57 | CControlUI* _Parse(CMarkupNode* parent, CControlUI* pParent = NULL, CPaintManagerUI* pManager = NULL);
58 |
59 | CMarkup m_xml;
60 | IDialogBuilderCallback* m_pCallback;
61 | LPCTSTR m_pstrtype;
62 | };
63 |
64 | } // namespace DuiLib
65 |
66 | #endif // __UIDLGBUILDER_H__
67 |
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle_i.c:
--------------------------------------------------------------------------------
1 |
2 |
3 | /* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
4 |
5 | /* link this file in with the server and any clients */
6 |
7 |
8 | /* File created by MIDL compiler version 7.00.0500 */
9 | /* at Wed Feb 29 16:09:22 2012
10 | */
11 | /* Compiler settings for .\GdiOle.idl:
12 | Oicf, W1, Zp8, env=Win32 (32b run)
13 | protocol : dce , ms_ext, c_ext, robust
14 | error checks: stub_data
15 | VC __declspec() decoration level:
16 | __declspec(uuid()), __declspec(selectany), __declspec(novtable)
17 | DECLSPEC_UUID(), MIDL_INTERFACE()
18 | */
19 | //@@MIDL_FILE_HEADING( )
20 |
21 | #pragma warning( disable: 4049 ) /* more than 64k source lines */
22 |
23 |
24 | #ifdef __cplusplus
25 | extern "C"{
26 | #endif
27 |
28 |
29 | #include
30 | #include
31 |
32 | #ifdef _MIDL_USE_GUIDDEF_
33 |
34 | #ifndef INITGUID
35 | #define INITGUID
36 | #include
37 | #undef INITGUID
38 | #else
39 | #include
40 | #endif
41 |
42 | #define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
43 | DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
44 |
45 | #else // !_MIDL_USE_GUIDDEF_
46 |
47 | #ifndef __IID_DEFINED__
48 | #define __IID_DEFINED__
49 |
50 | typedef struct _IID
51 | {
52 | unsigned long x;
53 | unsigned short s1;
54 | unsigned short s2;
55 | unsigned char c[8];
56 | } IID;
57 |
58 | #endif // __IID_DEFINED__
59 |
60 | #ifndef CLSID_DEFINED
61 | #define CLSID_DEFINED
62 | typedef IID CLSID;
63 | #endif // CLSID_DEFINED
64 |
65 | #define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
66 | const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
67 |
68 | #endif !_MIDL_USE_GUIDDEF_
69 |
70 | MIDL_DEFINE_GUID(IID, IID_IGDIImage,0x109E151F,0x5C8F,0x4321,0xB8,0x42,0x46,0x15,0x01,0x41,0xB1,0x1A);
71 |
72 |
73 | MIDL_DEFINE_GUID(IID, LIBID_GdiOleLib,0x2E22569D,0xD190,0x4744,0x9E,0xF8,0xA4,0x5A,0x75,0x04,0x9E,0x1F);
74 |
75 |
76 | MIDL_DEFINE_GUID(CLSID, CLSID_GDIImage,0x18583A78,0x3E42,0x472C,0x98,0x71,0xF1,0xD3,0x10,0x4C,0x7A,0xF4);
77 |
78 | #undef MIDL_DEFINE_GUID
79 |
80 | #ifdef __cplusplus
81 | }
82 | #endif
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/SignApk/debug.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // debug.hpp
3 | // ~~~~~~~~~
4 | //
5 | // Copyright (c) 2011 achellies (achellies at 163 dot com)
6 | //
7 | // This code may be used in compiled form in any way you desire. This
8 | // source file may be redistributed by any means PROVIDING it is
9 | // not sold for profit without the authors written consent, and
10 | // providing that this notice and the authors name is included.
11 | //
12 | // This file is provided "as is" with no expressed or implied warranty.
13 | // The author accepts no liability if it causes any damage to you or your
14 | // computer whatsoever. It's free, so don't hassle me about it.
15 | //
16 | // Beware of bugs.
17 | //
18 |
19 | #ifndef _DEBUG_HPP
20 | #define _DEBUG_HPP
21 |
22 | #include
23 |
24 | #define WIDEN2(x) L ## x
25 | #define WIDEN(x) WIDEN2(x)
26 | #define __WFILE__ WIDEN(__FILE__)
27 |
28 | #ifdef UNICODE
29 | #define __TFILE__ __WFILE__
30 | #else
31 | #define __TFILE__ __FILE__
32 | #endif
33 |
34 | #define DBG_THREADSAFE
35 |
36 | #define DBG_VERBOSE 1
37 | #define DBG_TERSE 2
38 | #define DBG_WARNING 3
39 | #define DBG_ERROR 4
40 |
41 | extern int g_iDebugLevel;
42 | extern bool g_bSaveLogFile;
43 | extern TCHAR g_bLogSavePath[MAX_PATH];
44 |
45 | BOOL DbgPrint(__in LPCTSTR lpszFormatString,...);
46 |
47 | #define DBGMSG(level, prefix, msg) { \
48 | INT dbgLevel = level; \
49 | if (g_iDebugLevel <= (dbgLevel)) { \
50 | DbgPrint(_T("%s\t\tFILE:%s\t\tLINE:%d\t\t"), prefix, __TFILE__, __LINE__);\
51 | DbgPrint(msg); \
52 | } \
53 | }
54 |
55 | #define DBGPRINT(level, msg) { \
56 | INT dbgLevel = level; \
57 | if (g_iDebugLevel <= (dbgLevel)) { \
58 | DbgPrint(_T("FILE:%s\t\tLINE:%d\t\t"), __TFILE__, __LINE__);\
59 | DbgPrint(msg); \
60 | } \
61 | }
62 |
63 | #ifdef _DEBUG
64 |
65 | #define VERBOSE(...) DBGPRINT(DBG_VERBOSE, ##__VA_ARGS__)
66 | #define TERSE(...) DBGPRINT(DBG_TERSE, ##__VA_ARGS__)
67 |
68 | #else // !DBG
69 |
70 | #define VERBOSE(...) __noop
71 | #define TERSE(...) __noop
72 | //#define WARNING(...) __noop
73 | //#define ERR(...) __noop
74 | //#define DBGMSG(level, prefix, ...) __noop
75 | //#define DBGPRINT(level, ...) __noop
76 |
77 | #endif
78 | #define WARNING(...) DBGMSG(DBG_WARNING,_T("WRN"), ##__VA_ARGS__)
79 | #define ERR(...) DBGMSG(DBG_ERROR,_T("ERR"), ##__VA_ARGS__)
80 |
81 | #endif // _DEBUG_HPP
--------------------------------------------------------------------------------
/third_party/gzip/uncompr.c:
--------------------------------------------------------------------------------
1 | /* uncompr.c -- decompress a memory buffer
2 | * Copyright (C) 1995-2003 Jean-loup Gailly.
3 | * For conditions of distribution and use, see copyright notice in zlib.h
4 | */
5 |
6 | /* @(#) $Id$ */
7 |
8 | #define ZLIB_INTERNAL
9 | #include "zlib.h"
10 |
11 | /* ===========================================================================
12 | Decompresses the source buffer into the destination buffer. sourceLen is
13 | the byte length of the source buffer. Upon entry, destLen is the total
14 | size of the destination buffer, which must be large enough to hold the
15 | entire uncompressed data. (The size of the uncompressed data must have
16 | been saved previously by the compressor and transmitted to the decompressor
17 | by some mechanism outside the scope of this compression library.)
18 | Upon exit, destLen is the actual size of the compressed buffer.
19 | This function can be used to decompress a whole file at once if the
20 | input file is mmap'ed.
21 |
22 | uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
23 | enough memory, Z_BUF_ERROR if there was not enough room in the output
24 | buffer, or Z_DATA_ERROR if the input data was corrupted.
25 | */
26 | int ZEXPORT uncompress (dest, destLen, source, sourceLen)
27 | Bytef *dest;
28 | uLongf *destLen;
29 | const Bytef *source;
30 | uLong sourceLen;
31 | {
32 | z_stream stream;
33 | int err;
34 |
35 | stream.next_in = (Bytef*)source;
36 | stream.avail_in = (uInt)sourceLen;
37 | /* Check for source > 64K on 16-bit machine: */
38 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
39 |
40 | stream.next_out = dest;
41 | stream.avail_out = (uInt)*destLen;
42 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
43 |
44 | stream.zalloc = (alloc_func)0;
45 | stream.zfree = (free_func)0;
46 |
47 | err = inflateInit(&stream);
48 | if (err != Z_OK) return err;
49 |
50 | err = inflate(&stream, Z_FINISH);
51 | if (err != Z_STREAM_END) {
52 | inflateEnd(&stream);
53 | if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
54 | return Z_DATA_ERROR;
55 | return err;
56 | }
57 | *destLen = stream.total_out;
58 |
59 | err = inflateEnd(&stream);
60 | return err;
61 | }
62 |
--------------------------------------------------------------------------------
/UIEngine/UIDelegate.cpp:
--------------------------------------------------------------------------------
1 | #include "StdAfx.h"
2 |
3 | namespace DuiLib {
4 |
5 | CDelegateBase::CDelegateBase(void* pObject, void* pFn)
6 | {
7 | m_pObject = pObject;
8 | m_pFn = pFn;
9 | }
10 |
11 | CDelegateBase::CDelegateBase(const CDelegateBase& rhs)
12 | {
13 | m_pObject = rhs.m_pObject;
14 | m_pFn = rhs.m_pFn;
15 | }
16 |
17 | CDelegateBase::~CDelegateBase()
18 | {
19 |
20 | }
21 |
22 | bool CDelegateBase::Equals(const CDelegateBase& rhs) const
23 | {
24 | return m_pObject == rhs.m_pObject && m_pFn == rhs.m_pFn;
25 | }
26 |
27 | bool CDelegateBase::operator() (void* param)
28 | {
29 | return Invoke(param);
30 | }
31 |
32 | void* CDelegateBase::GetFn()
33 | {
34 | return m_pFn;
35 | }
36 |
37 | void* CDelegateBase::GetObject()
38 | {
39 | return m_pObject;
40 | }
41 |
42 | CEventSource::~CEventSource()
43 | {
44 | for( int i = 0; i < m_aDelegates.GetSize(); i++ ) {
45 | CDelegateBase* pObject = static_cast(m_aDelegates[i]);
46 | if( pObject) delete pObject;
47 | }
48 | }
49 |
50 | CEventSource::operator bool()
51 | {
52 | return m_aDelegates.GetSize() > 0;
53 | }
54 |
55 | void CEventSource::operator+= (CDelegateBase& d)
56 | {
57 | for( int i = 0; i < m_aDelegates.GetSize(); i++ ) {
58 | CDelegateBase* pObject = static_cast(m_aDelegates[i]);
59 | if( pObject && pObject->Equals(d) ) return;
60 | }
61 |
62 | m_aDelegates.Add(d.Copy());
63 | }
64 |
65 | void CEventSource::operator+= (FnType pFn)
66 | {
67 | (*this) += MakeDelegate(pFn);
68 | }
69 |
70 | void CEventSource::operator-= (CDelegateBase& d)
71 | {
72 | for( int i = 0; i < m_aDelegates.GetSize(); i++ ) {
73 | CDelegateBase* pObject = static_cast(m_aDelegates[i]);
74 | if( pObject && pObject->Equals(d) ) {
75 | delete pObject;
76 | m_aDelegates.Remove(i);
77 | return;
78 | }
79 | }
80 | }
81 | void CEventSource::operator-= (FnType pFn)
82 | {
83 | (*this) -= MakeDelegate(pFn);
84 | }
85 |
86 | bool CEventSource::operator() (void* param)
87 | {
88 | for( int i = 0; i < m_aDelegates.GetSize(); i++ ) {
89 | CDelegateBase* pObject = static_cast(m_aDelegates[i]);
90 | if( pObject && !(*pObject)(param) ) return false;
91 | }
92 | return true;
93 | }
94 |
95 | } // namespace DuiLib
96 |
--------------------------------------------------------------------------------
/include/UIDelegate.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIDELEGATE_H__
2 | #define __UIDELEGATE_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib {
7 |
8 | class UILIB_API CDelegateBase
9 | {
10 | public:
11 | CDelegateBase(void* pObject, void* pFn);
12 | CDelegateBase(const CDelegateBase& rhs);
13 | virtual ~CDelegateBase();
14 | bool Equals(const CDelegateBase& rhs) const;
15 | bool operator() (void* param);
16 | virtual CDelegateBase* Copy() = 0;
17 |
18 | protected:
19 | void* GetFn();
20 | void* GetObject();
21 | virtual bool Invoke(void* param) = 0;
22 |
23 | private:
24 | void* m_pObject;
25 | void* m_pFn;
26 | };
27 |
28 | class CDelegateStatic: public CDelegateBase
29 | {
30 | typedef bool (*Fn)(void*);
31 | public:
32 | CDelegateStatic(Fn pFn) : CDelegateBase(NULL, pFn) { }
33 | CDelegateStatic(const CDelegateStatic& rhs) : CDelegateBase(rhs) { }
34 | virtual CDelegateBase* Copy() { return new CDelegateStatic(*this); }
35 |
36 | protected:
37 | virtual bool Invoke(void* param)
38 | {
39 | Fn pFn = (Fn)GetFn();
40 | return (*pFn)(param);
41 | }
42 | };
43 |
44 | template
45 | class CDelegate : public CDelegateBase
46 | {
47 | typedef bool (T::* Fn)(void*);
48 | public:
49 | CDelegate(O* pObj, Fn pFn) : CDelegateBase(pObj, &pFn), m_pFn(pFn) { }
50 | CDelegate(const CDelegate& rhs) : CDelegateBase(rhs) { m_pFn = rhs.m_pFn; }
51 | virtual CDelegateBase* Copy() { return new CDelegate(*this); }
52 |
53 | protected:
54 | virtual bool Invoke(void* param)
55 | {
56 | O* pObject = (O*) GetObject();
57 | return (pObject->*m_pFn)(param);
58 | }
59 |
60 | private:
61 | Fn m_pFn;
62 | };
63 |
64 | template
65 | CDelegate MakeDelegate(O* pObject, bool (T::* pFn)(void*))
66 | {
67 | return CDelegate(pObject, pFn);
68 | }
69 |
70 | inline CDelegateStatic MakeDelegate(bool (*pFn)(void*))
71 | {
72 | return CDelegateStatic(pFn);
73 | }
74 |
75 | class UILIB_API CEventSource
76 | {
77 | typedef bool (*FnType)(void*);
78 | public:
79 | ~CEventSource();
80 | operator bool();
81 | void operator+= (CDelegateBase& d);
82 | void operator+= (FnType pFn);
83 | void operator-= (CDelegateBase& d);
84 | void operator-= (FnType pFn);
85 | bool operator() (void* param);
86 |
87 | protected:
88 | CStdPtrArray m_aDelegates;
89 | };
90 |
91 | } // namespace DuiLib
92 |
93 | #endif // __UIDELEGATE_H__
--------------------------------------------------------------------------------
/SignApk/lock.hpp:
--------------------------------------------------------------------------------
1 | #ifndef _LOCK_HPP
2 | #define _LOCK_HPP
3 |
4 | class AutoCriticalSection;
5 | class CriticalSection
6 | {
7 | friend AutoCriticalSection;
8 | public:
9 | CriticalSection();
10 | ~CriticalSection();
11 | protected:
12 | void Lock();
13 | void Unlock();
14 | private:
15 | CRITICAL_SECTION m_criticalsection;
16 | };
17 | class AutoCriticalSection
18 | {
19 | public:
20 | AutoCriticalSection(CriticalSection& criticalsection);
21 | ~AutoCriticalSection();
22 | protected:
23 | AutoCriticalSection();
24 | AutoCriticalSection(const AutoCriticalSection& other); // Prevent copying
25 | AutoCriticalSection& operator = (const AutoCriticalSection& other); // Prevent assigning
26 | private:
27 | CriticalSection& m_criticalsection;
28 | };
29 |
30 | class CAutoMutex;
31 | class CMutex
32 | {
33 | public:
34 | friend CAutoMutex;
35 | CMutex(LPCTSTR lpszName);
36 | ~CMutex();
37 | protected:
38 | void Lock();
39 | void Unlock();
40 | private:
41 | HANDLE m_hMutex;
42 | };
43 |
44 | class CAutoMutex
45 | {
46 | public:
47 | CAutoMutex(CMutex& mutex);
48 | ~CAutoMutex();
49 | protected:
50 | CAutoMutex();
51 | CAutoMutex(const CAutoMutex& other); // Prevent copying
52 | CAutoMutex& operator = (const CAutoMutex& other); // Prevent assigning
53 | private:
54 | CMutex& m_mutex;
55 | };
56 |
57 | class CAutoEvent;
58 | class CManualEvent;
59 | class CEvent
60 | {
61 | friend CAutoEvent;
62 | friend CManualEvent;
63 | public:
64 | CEvent(LPCTSTR lpszName,BOOL bManualReset = TRUE,BOOL bInitialState = TRUE);
65 | ~CEvent();
66 | void Reset();
67 | void Set();
68 | bool IsLocked();
69 | protected:
70 | void Lock();
71 | void Unlock();
72 | private:
73 | HANDLE m_hEvent;
74 | };
75 | class CAutoEvent
76 | {
77 | public:
78 | CAutoEvent(CEvent& e);
79 | ~CAutoEvent();
80 | protected:
81 | CAutoEvent();
82 | CAutoEvent(const CAutoEvent& other); // Prevent copying
83 | CAutoEvent& operator = (const CAutoEvent& other); // Prevent assigning
84 | private:
85 | CEvent& m_event;
86 | };
87 | class CManualEvent
88 | {
89 | public:
90 | CManualEvent(CEvent& e);
91 | ~CManualEvent();
92 | void Lock();
93 | void Unlock();
94 | protected:
95 | CManualEvent();
96 | CManualEvent(const CManualEvent& other); // Prevent copying
97 | CManualEvent& operator = (const CManualEvent& other); // Prevent assigning
98 | private:
99 | CEvent& m_event;
100 | };
101 |
102 |
103 | #endif
--------------------------------------------------------------------------------
/include/UIGIFControls.h:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | // DirectUI - UI Library
4 | //
5 | // Written by Bjarke Viksoe (bjarke@viksoe.dk)
6 | // Copyright (c) 2006-2007 Bjarke Viksoe.
7 | //
8 | // This code may be used in compiled form in any way you desire. These
9 | // source files may be redistributed by any means PROVIDING it is
10 | // not sold for profit without the authors written consent, and
11 | // providing that this notice and the authors name is included.
12 | //
13 | // This file is provided "as is" with no expressed or implied warranty.
14 | // The author accepts no liability if it causes any damage to you or your
15 | // computer whatsoever. It's free, so don't hassle me about it.
16 | //
17 | ////
18 | // Acknowledgements :
19 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
20 | //
21 | //
22 | //
23 | // Beware of bugs.
24 | //
25 | //
26 | //
27 | ////////////////////////////////////////////////////////
28 | #ifndef __UIGIFCONTROLS_H__
29 | #define __UIGIFCONTROLS_H__
30 |
31 | #include "UICommonControls.h"
32 |
33 | #ifdef _MSC_VER
34 | #pragma once
35 | #endif
36 |
37 | #if defined(UI_BUILD_FOR_WIN32) && !defined(UI_BUILD_FOR_WINCE)
38 |
39 | class CGDIImage;
40 | namespace DuiLib {
41 | /////////////////////////////////////////////////////////////////////////////////////
42 | //
43 | enum eGifUpdateTimer
44 | {
45 | GifUpdateTimerId = 1000,
46 | GifUpdateTimerInterval = 360
47 | };
48 |
49 |
50 | class UILIB_API CGifLabelUI : public CLabelUI
51 | {
52 | public:
53 | CGifLabelUI();
54 |
55 | ~CGifLabelUI();
56 |
57 | LPCTSTR GetClass() const;
58 | LPVOID GetInterface(LPCTSTR pstrName);
59 |
60 | virtual void DoEvent(TEventUI& event);
61 |
62 | virtual void PaintBkImage(void* ctx);
63 |
64 | private:
65 | bool timer_started_;
66 | DWORD frame_count_;
67 | DWORD frame_index_;
68 |
69 | CStdString m_sPreBkImage;
70 | CGDIImage* m_pImage;
71 | };
72 |
73 | class UILIB_API CGifButtonUI : public CButtonUI
74 | {
75 | public:
76 | CGifButtonUI();
77 |
78 | ~CGifButtonUI();
79 |
80 | LPCTSTR GetClass() const;
81 | LPVOID GetInterface(LPCTSTR pstrName);
82 |
83 | virtual void DoEvent(TEventUI& event);
84 | virtual void PaintBkImage(void* ctx);
85 |
86 | private:
87 | bool timer_started_;
88 | DWORD frame_count_;
89 | DWORD frame_index_;
90 |
91 | CStdString m_sPreBkImage;
92 | CGDIImage* m_pImage;
93 | };
94 |
95 | } // namespace DuiLib
96 |
97 | #endif
98 |
99 | #endif // __UIGIFCONTROLS_H__
100 |
--------------------------------------------------------------------------------
/third_party/gzip/inftrees.h:
--------------------------------------------------------------------------------
1 | /* inftrees.h -- header to use inftrees.c
2 | * Copyright (C) 1995-2005 Mark Adler
3 | * For conditions of distribution and use, see copyright notice in zlib.h
4 | */
5 |
6 | /* WARNING: this file should *not* be used by applications. It is
7 | part of the implementation of the compression library and is
8 | subject to change. Applications should only use zlib.h.
9 | */
10 |
11 | /* Structure for decoding tables. Each entry provides either the
12 | information needed to do the operation requested by the code that
13 | indexed that table entry, or it provides a pointer to another
14 | table that indexes more bits of the code. op indicates whether
15 | the entry is a pointer to another table, a literal, a length or
16 | distance, an end-of-block, or an invalid code. For a table
17 | pointer, the low four bits of op is the number of index bits of
18 | that table. For a length or distance, the low four bits of op
19 | is the number of extra bits to get after the code. bits is
20 | the number of bits in this code or part of the code to drop off
21 | of the bit buffer. val is the actual byte to output in the case
22 | of a literal, the base length or distance, or the offset from
23 | the current table to the next table. Each entry is four bytes. */
24 | typedef struct {
25 | unsigned char op; /* operation, extra bits, table bits */
26 | unsigned char bits; /* bits in this part of the code */
27 | unsigned short val; /* offset in table or code value */
28 | } code;
29 |
30 | /* op values as set by inflate_table():
31 | 00000000 - literal
32 | 0000tttt - table link, tttt != 0 is the number of table index bits
33 | 0001eeee - length or distance, eeee is the number of extra bits
34 | 01100000 - end of block
35 | 01000000 - invalid code
36 | */
37 |
38 | /* Maximum size of dynamic tree. The maximum found in a long but non-
39 | exhaustive search was 1444 code structures (852 for length/literals
40 | and 592 for distances, the latter actually the result of an
41 | exhaustive search). The true maximum is not known, but the value
42 | below is more than safe. */
43 | #define ENOUGH 2048
44 | #define MAXD 592
45 |
46 | /* Type of code to build for inftable() */
47 | typedef enum {
48 | CODES,
49 | LENS,
50 | DISTS
51 | } codetype;
52 |
53 | extern int inflate_table OF((codetype type, unsigned short FAR *lens,
54 | unsigned codes, code FAR * FAR *table,
55 | unsigned FAR *bits, unsigned short FAR *work));
56 |
--------------------------------------------------------------------------------
/third_party/gzip/compress.c:
--------------------------------------------------------------------------------
1 | /* compress.c -- compress a memory buffer
2 | * Copyright (C) 1995-2003 Jean-loup Gailly.
3 | * For conditions of distribution and use, see copyright notice in zlib.h
4 | */
5 |
6 | /* @(#) $Id$ */
7 |
8 | #define ZLIB_INTERNAL
9 | #include "zlib.h"
10 |
11 | /* ===========================================================================
12 | Compresses the source buffer into the destination buffer. The level
13 | parameter has the same meaning as in deflateInit. sourceLen is the byte
14 | length of the source buffer. Upon entry, destLen is the total size of the
15 | destination buffer, which must be at least 0.1% larger than sourceLen plus
16 | 12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
17 |
18 | compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
19 | memory, Z_BUF_ERROR if there was not enough room in the output buffer,
20 | Z_STREAM_ERROR if the level parameter is invalid.
21 | */
22 | int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
23 | Bytef *dest;
24 | uLongf *destLen;
25 | const Bytef *source;
26 | uLong sourceLen;
27 | int level;
28 | {
29 | z_stream stream;
30 | int err;
31 |
32 | stream.next_in = (Bytef*)source;
33 | stream.avail_in = (uInt)sourceLen;
34 | #ifdef MAXSEG_64K
35 | /* Check for source > 64K on 16-bit machine: */
36 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
37 | #endif
38 | stream.next_out = dest;
39 | stream.avail_out = (uInt)*destLen;
40 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
41 |
42 | stream.zalloc = (alloc_func)0;
43 | stream.zfree = (free_func)0;
44 | stream.opaque = (voidpf)0;
45 |
46 | err = deflateInit(&stream, level);
47 | if (err != Z_OK) return err;
48 |
49 | err = deflate(&stream, Z_FINISH);
50 | if (err != Z_STREAM_END) {
51 | deflateEnd(&stream);
52 | return err == Z_OK ? Z_BUF_ERROR : err;
53 | }
54 | *destLen = stream.total_out;
55 |
56 | err = deflateEnd(&stream);
57 | return err;
58 | }
59 |
60 | /* ===========================================================================
61 | */
62 | int ZEXPORT compress (dest, destLen, source, sourceLen)
63 | Bytef *dest;
64 | uLongf *destLen;
65 | const Bytef *source;
66 | uLong sourceLen;
67 | {
68 | return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
69 | }
70 |
71 | /* ===========================================================================
72 | If the default memLevel or windowBits for deflateInit() is changed, then
73 | this function needs to be updated.
74 | */
75 | uLong ZEXPORT compressBound (sourceLen)
76 | uLong sourceLen;
77 | {
78 | return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
79 | }
80 |
--------------------------------------------------------------------------------
/SignApk/Resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by CMReadUpack.rc
4 | //
5 | #define IDR_SKINXML 101
6 | #define IDR_PNG_MINIMIZE 103
7 | #define IDR_PNG_MINIMIZE_H 104
8 | #define IDR_PNG_MINIMIZE_P 105
9 | #define IDR_PNG_MAXIMIZE 106
10 | #define IDR_PNG_MAXIMIZE_H 107
11 | #define IDR_PNG_MAXIMIZE_P 108
12 | #define IDR_PNG_RESTORE 109
13 | #define IDR_PNG_RESTORE_H 110
14 | #define IDR_PNG_RESTORE_P 111
15 | #define IDR_PNG_CLOSE 112
16 | #define IDR_PNG_CLOSE_H 113
17 | #define IDR_PNG_CLOSE_P 114
18 | #define IDR_PNG_BUTTON 115
19 | #define IDR_PNG_BUTTON_H 116
20 | #define IDR_PNG_BUTTON_P 117
21 | #define IDR_PNG_COMBOX 118
22 | #define IDR_PNG_SCROLLBAR_V 119
23 | #define IDR_PNG_SCROLLBAR_H 120
24 | #define IDR_PNG_MENU_BK 121
25 | #define IDR_PNG_MENU_EXPAND 122
26 | #define IDR_XML_MENU 123
27 | #define IDR_PNG_CHECKBOX 124
28 | #define IDR_PNG_CHECKBOX_H 125
29 | #define IDR_PNG_CHECKBOX_P 126
30 | #define IDR_PNG_RADIO 127
31 | #define IDR_PNG_RADIO_H 128
32 | #define IDR_PNG_RADIO_P 129
33 | #define IDR_PNG_SLIDER_BG 130
34 | #define IDR_PNG_SLIDER_FG 131
35 | #define IDR_PNG_SLIDER_THUMB 132
36 | #define IDR_PNG_RATING 133
37 | #define IDR_PNG_RATING_D 134
38 | #define IDR_PNG_BG 135
39 | #define IDR_BMP_BG 136
40 | #define IDR_XML_MSGBOX 137
41 | #define IDI_ICON1 138
42 | #define IDR_PNG_UNPACK 139
43 | #define IDR_PNG_LIST_HEADER 140
44 | #define IDR_PNG_LIST_SELECT 141
45 | #define IDR_PNG_LIST_HEADER_SEP 142
46 | #define IDR_XML_LIST_ITEM 143
47 |
48 | #define IDR_PNG_SEPERATOR 144
49 |
50 | #define IDR_PNG_PROGRESS_BG 145
51 | #define IDR_PNG_PROGRESS_FG 146
52 |
53 | #define IDR_PNG_PACK 301
54 | #define IDR_PNG_SETTING 302
55 | #define IDR_PNG_LOGO 303
56 | #define IDR_PNG_TAB_V 304
57 | #define IDR_PNG_TAB_V_P 305
58 | #define IDR_PNG_CLEAR 306
59 | #define IDR_PNG_ADD 307
60 | #define IDR_PNG_EDIT 308
61 | #define IDR_PNG_DELETE 309
62 |
63 | #define IDR_PNG_LOG2 310
64 |
65 | // Next default values for new objects
66 | //
67 | #ifdef APSTUDIO_INVOKED
68 | #ifndef APSTUDIO_READONLY_SYMBOLS
69 | #define _APS_NEXT_RESOURCE_VALUE 147
70 | #define _APS_NEXT_COMMAND_VALUE 40001
71 | #define _APS_NEXT_CONTROL_VALUE 1001
72 | #define _APS_NEXT_SYMED_VALUE 101
73 | #endif
74 | #endif
75 |
--------------------------------------------------------------------------------
/include/PreConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | // DirectUI - UI Library
4 | //
5 | // Written by Bjarke Viksoe (bjarke@viksoe.dk)
6 | // Copyright (c) 2006-2007 Bjarke Viksoe.
7 | //
8 | // This code may be used in compiled form in any way you desire. These
9 | // source files may be redistributed by any means PROVIDING it is
10 | // not sold for profit without the authors written consent, and
11 | // providing that this notice and the authors name is included.
12 | //
13 | // This file is provided "as is" with no expressed or implied warranty.
14 | // The author accepts no liability if it causes any damage to you or your
15 | // computer whatsoever. It's free, so don't hassle me about it.
16 | //
17 | ////
18 | // Acknowledgements :
19 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
20 | //
21 | //
22 | //
23 | // Beware of bugs.
24 | //
25 | //
26 | //
27 | ////////////////////////////////////////////////////////
28 | #ifndef PreConfig_DEFINED
29 | #define PreConfig_DEFINED
30 |
31 | //////////////////////////////////////////////////////////////////////
32 |
33 | #if !defined(UI_BUILD_FOR_ANDROID_NDK) && !defined(UI_BUILD_FOR_IOS) && !defined(UI_BUILD_FOR_PALM) && !defined(UI_BUILD_FOR_WINCE) && !defined(UI_BUILD_FOR_WIN32) && !defined(UI_BUILD_FOR_SYMBIAN) && !defined(UI_BUILD_FOR_UNIX) && !defined(UI_BUILD_FOR_MAC) && !defined(UI_BUILD_FOR_SDL) && !defined(UI_BUILD_FOR_BREW)
34 |
35 | #ifdef __APPLE__
36 | #include "TargetConditionals.h"
37 | #endif
38 |
39 | #if defined(PALMOS_SDK_VERSION)
40 | #define UI_BUILD_FOR_PALM
41 | #elif defined(UNDER_CE)
42 | #define UI_BUILD_FOR_WINCE
43 | #elif defined(WIN32)
44 | #define UI_BUILD_FOR_WIN32
45 | #elif defined(__SYMBIAN32__)
46 | #define UI_BUILD_FOR_WIN32
47 | #elif defined(linux)
48 | #define UI_BUILD_FOR_UNIX
49 | #elif TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
50 | #define UI_BUILD_FOR_IOS
51 | #elif defined(ANDROID_NDK)
52 | #define UI_BUILD_FOR_ANDROID_NDK
53 | #elif defined(ANROID)
54 | #define UI_BUILD_FOR_ANDROID
55 | #else
56 | #define UI_BUILD_FOR_MAC
57 | #endif
58 |
59 | #endif
60 |
61 | //////////////////////////////////////////////////////////////////////
62 |
63 | #if !defined(UI_DEBUG) && !defined(UI_RELEASE)
64 | #ifdef NDEBUG
65 | #define UI_RELEASE
66 | #else
67 | #define UI_DEBUG
68 | #endif
69 | #endif
70 |
71 | #if defined(UI_BUILD_FOR_WIN32) || defined(UI_BUILD_FOR_WINCE)
72 |
73 | // use the Raster GDI as the Render Engine
74 | #if !defined(UI_BUILD_FOR_WINGDI)
75 | #define UI_BUILD_FOR_WINGDI
76 | #endif
77 |
78 | // use the SKIA as Render Engine
79 | #if !defined(UI_BUILD_FOR_WINGDI)
80 | #if !defined(UI_BUILD_FOR_SKIA)
81 | #define UI_BUILD_FOR_SKIA
82 | #endif
83 | #endif
84 |
85 | //#define UI_BUILD_FOR_SKIA
86 | //#undef UI_BUILD_FOR_WINGDI
87 |
88 | #endif
89 |
90 | // switch this marco for the UI Designer
91 | //#define UI_BUILD_FOR_DESIGNER
92 |
93 | //#define USING_XUNZIP
94 |
95 | #define USING_SYSTEM_SUPPLIED_RICHEDIT
96 |
97 | #endif
98 |
99 |
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle_2010.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GdiOle", "GdiOle.vcxproj", "{22C938C3-474A-4BF5-9B28-482683F98EA1}"
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GdiOlePS", "GdiOlePS.vcxproj", "{9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug LIB|Win32 = Debug LIB|Win32
11 | Debug LIB|x64 = Debug LIB|x64
12 | Debug|Win32 = Debug|Win32
13 | Debug|x64 = Debug|x64
14 | Release LIB|Win32 = Release LIB|Win32
15 | Release LIB|x64 = Release LIB|x64
16 | Release|Win32 = Release|Win32
17 | Release|x64 = Release|x64
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug LIB|Win32.ActiveCfg = Debug LIB|Win32
21 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug LIB|Win32.Build.0 = Debug LIB|Win32
22 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug LIB|x64.ActiveCfg = Debug LIB|x64
23 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug LIB|x64.Build.0 = Debug LIB|x64
24 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug|Win32.ActiveCfg = Debug|Win32
25 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug|Win32.Build.0 = Debug|Win32
26 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug|x64.ActiveCfg = Debug|x64
27 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug|x64.Build.0 = Debug|x64
28 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release LIB|Win32.ActiveCfg = Release LIB|Win32
29 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release LIB|Win32.Build.0 = Release LIB|Win32
30 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release LIB|x64.ActiveCfg = Release LIB|x64
31 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release LIB|x64.Build.0 = Release LIB|x64
32 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release|Win32.ActiveCfg = Release|Win32
33 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release|Win32.Build.0 = Release|Win32
34 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release|x64.ActiveCfg = Release|x64
35 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release|x64.Build.0 = Release|x64
36 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Debug LIB|Win32.ActiveCfg = Debug LIB|Win32
37 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Debug LIB|x64.ActiveCfg = Debug LIB|x64
38 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Debug|Win32.ActiveCfg = Debug|Win32
39 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Debug|x64.ActiveCfg = Debug|x64
40 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Release LIB|Win32.ActiveCfg = Release LIB|Win32
41 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Release LIB|x64.ActiveCfg = Release LIB|x64
42 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Release|Win32.ActiveCfg = Release|Win32
43 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Release|x64.ActiveCfg = Release|x64
44 | EndGlobalSection
45 | GlobalSection(SolutionProperties) = preSolution
46 | HideSolutionNode = FALSE
47 | EndGlobalSection
48 | EndGlobal
49 |
--------------------------------------------------------------------------------
/third_party/GdiOle/ReadMe.txt:
--------------------------------------------------------------------------------
1 | ========================================================================
2 | ACTIVE TEMPLATE LIBRARY : GdiOle Project Overview
3 | ========================================================================
4 |
5 | AppWizard has created this GdiOle project for you to use as the starting point for
6 | writing your Dynamic Link Library (DLL).
7 |
8 | This file contains a summary of what you will find in each of the files that
9 | make up your project.
10 |
11 | GdiOle.vcproj
12 | This is the main project file for VC++ projects generated using an Application Wizard.
13 | It contains information about the version of Visual C++ that generated the file, and
14 | information about the platforms, configurations, and project features selected with the
15 | Application Wizard.
16 |
17 | GdiOle.idl
18 | This file contains the IDL definitions of the type library, the interfaces
19 | and co-classes defined in your project.
20 | This file will be processed by the MIDL compiler to generate:
21 | C++ interface definitions and GUID declarations (GdiOle.h)
22 | GUID definitions (GdiOle_i.c)
23 | A type library (GdiOle.tlb)
24 | Marshaling code (GdiOle_p.c and dlldata.c)
25 |
26 | GdiOle.h
27 | This file contains the C++ interface definitions and GUID declarations of the
28 | items defined in GdiOle.idl. It will be regenerated by MIDL during compilation.
29 |
30 | GdiOle.cpp
31 | This file contains the object map and the implementation of your DLL's exports.
32 |
33 | GdiOle.rc
34 | This is a listing of all of the Microsoft Windows resources that the
35 | program uses.
36 |
37 | GdiOle.def
38 | This module-definition file provides the linker with information about the exports
39 | required by your DLL. It contains exports for:
40 | DllGetClassObject
41 | DllCanUnloadNow
42 | DllRegisterServer
43 | DllUnregisterServer
44 |
45 | /////////////////////////////////////////////////////////////////////////////
46 | Other standard files:
47 |
48 | StdAfx.h, StdAfx.cpp
49 | These files are used to build a precompiled header (PCH) file
50 | named GdiOle.pch and a precompiled types file named StdAfx.obj.
51 |
52 | Resource.h
53 | This is the standard header file that defines resource IDs.
54 |
55 | /////////////////////////////////////////////////////////////////////////////
56 | Proxy/stub DLL project and module definition file:
57 |
58 | GdiOleps.vcproj
59 | This file is the project file for building a proxy/stub DLL if necessary.
60 | The IDL file in the main project must contain at least one interface and you must
61 | first compile the IDL file before building the proxy/stub DLL. This process generates
62 | dlldata.c, GdiOle_i.c and GdiOle_p.c which are required
63 | to build the proxy/stub DLL.
64 |
65 | GdiOleps.def
66 | This module definition file provides the linker with information about the exports
67 | required by the proxy/stub.
68 |
69 | /////////////////////////////////////////////////////////////////////////////
70 |
--------------------------------------------------------------------------------
/include/UIActiveX.h:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | // DirectUI - UI Library
4 | //
5 | // Written by Bjarke Viksoe (bjarke@viksoe.dk)
6 | // Copyright (c) 2006-2007 Bjarke Viksoe.
7 | //
8 | // This code may be used in compiled form in any way you desire. These
9 | // source files may be redistributed by any means PROVIDING it is
10 | // not sold for profit without the authors written consent, and
11 | // providing that this notice and the authors name is included.
12 | //
13 | // This file is provided "as is" with no expressed or implied warranty.
14 | // The author accepts no liability if it causes any damage to you or your
15 | // computer whatsoever. It's free, so don't hassle me about it.
16 | //
17 | ////
18 | // Acknowledgements :
19 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
20 | //
21 | //
22 | //
23 | // Beware of bugs.
24 | //
25 | //
26 | //
27 | ////////////////////////////////////////////////////////
28 |
29 | #ifndef __UIACTIVEX_H__
30 | #define __UIACTIVEX_H__
31 |
32 | #ifdef _MSC_VER
33 | #pragma once
34 | #endif
35 |
36 | #if defined(UI_BUILD_FOR_WIN32) && !defined(UI_BUILD_FOR_WINCE)
37 |
38 | #include
39 |
40 | namespace DuiLib {
41 | /////////////////////////////////////////////////////////////////////////////////////
42 | //
43 |
44 | class CActiveXCtrl;
45 |
46 | template< class T >
47 | class CSafeRelease
48 | {
49 | public:
50 | CSafeRelease(T* p) : m_p(p) { };
51 | ~CSafeRelease() { if( m_p != NULL ) m_p->Release(); };
52 | T* Detach() { T* t = m_p; m_p = NULL; return t; };
53 | T* m_p;
54 | };
55 |
56 | /////////////////////////////////////////////////////////////////////////////////////
57 | //
58 |
59 | class UILIB_API CActiveXUI : public CControlUI, public IMessageFilterUI
60 | {
61 | friend CActiveXCtrl;
62 | public:
63 | CActiveXUI();
64 | virtual ~CActiveXUI();
65 |
66 | LPCTSTR GetClass() const;
67 | LPVOID GetInterface(LPCTSTR pstrName);
68 |
69 | HWND GetHostWindow() const;
70 |
71 | bool IsDelayCreate() const;
72 | void SetDelayCreate(bool bDelayCreate = true);
73 |
74 | bool CreateControl(const CLSID clsid);
75 | bool CreateControl(LPCTSTR pstrCLSID);
76 | HRESULT GetControl(const IID iid, LPVOID* ppRet);
77 | CLSID GetClisd() const;
78 | CStdString GetModuleName() const;
79 | void SetModuleName(LPCTSTR pstrText);
80 |
81 | void SetVisible(bool bVisible = true);
82 | void SetInternVisible(bool bVisible = true);
83 | void SetPos(RECT rc);
84 | void DoPaint(void* ctx, const RECT& rcPaint);
85 |
86 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
87 |
88 | LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
89 |
90 | protected:
91 | void ReleaseControl();
92 | bool DoCreateControl();
93 |
94 | protected:
95 | CLSID m_clsid;
96 | CStdString m_sModuleName;
97 | bool m_bCreated;
98 | bool m_bDelayCreate;
99 | IOleObject* m_pUnk;
100 | CActiveXCtrl* m_pControl;
101 | HWND m_hwndHost;
102 | };
103 |
104 | } // namespace DuiLib
105 |
106 | #endif
107 |
108 | #endif // __UIACTIVEX_H__
109 |
--------------------------------------------------------------------------------
/SignApk/win_impl_base.hpp:
--------------------------------------------------------------------------------
1 | #ifndef WIN_IMPL_BASE_HPP
2 | #define WIN_IMPL_BASE_HPP
3 |
4 | #define USE(FEATURE) (defined USE_##FEATURE && USE_##FEATURE)
5 | #define ENABLE(FEATURE) (defined ENABLE_##FEATURE && ENABLE_##FEATURE)
6 |
7 | #define USE_ZIP_SKIN 0
8 | #define USE_EMBEDED_RESOURCE 1
9 |
10 | namespace DuiLib {
11 | class CWindowWnd;
12 | class INotifyUI;
13 | class IMessageFilterUI;
14 | class IDialogBuilderCallback;
15 | }
16 |
17 | #if USE(ZIP_SKIN)
18 | extern const TCHAR* const kResourceSkinZipFileName;// = _T("your_resource_package.zip");
19 | #endif
20 |
21 | class WindowImplBase : public CWindowWnd, public INotifyUI, public IMessageFilterUI, public IDialogBuilderCallback
22 | {
23 | public:
24 | WindowImplBase();
25 | virtual ~WindowImplBase();
26 |
27 | virtual void OnFinalMessage(HWND hWnd);
28 |
29 | virtual UINT GetClassStyle() const;
30 |
31 | virtual void Init();
32 |
33 | virtual CControlUI* CreateControl(LPCTSTR pstrClass, CPaintManagerUI* pManager);
34 |
35 | virtual LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
36 |
37 | virtual LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
38 |
39 | virtual LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
40 |
41 | #if defined(WIN32) && !defined(UNDER_CE)
42 | virtual LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
43 |
44 | virtual LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
45 |
46 | virtual LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
47 |
48 | virtual LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
49 |
50 | virtual LRESULT OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
51 |
52 | virtual LRESULT OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
53 | #endif
54 |
55 | virtual LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
56 |
57 | virtual LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
58 |
59 | virtual LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
60 |
61 | virtual LRESULT OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
62 |
63 | virtual LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
64 |
65 | virtual LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
66 |
67 | virtual LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
68 |
69 | virtual LRESULT OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
70 |
71 | virtual LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
72 |
73 | virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
74 |
75 | virtual LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
76 |
77 | virtual LONG GetStyle();
78 |
79 | protected:
80 | virtual tString GetSkinFolder() = 0;
81 | virtual tString GetSkinFile() = 0;
82 |
83 | virtual LRESULT ResponseDefaultKeyEvent(WPARAM wParam);
84 |
85 | protected:
86 | CPaintManagerUI paint_manager_;
87 | };
88 |
89 | #endif // WIN_IMPL_BASE_HPP
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GdiOle", "GdiOle.vcproj", "{22C938C3-474A-4BF5-9B28-482683F98EA1}"
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GdiOlePS", "GdiOlePS.vcproj", "{9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | {22C938C3-474A-4BF5-9B28-482683F98EA1} = {22C938C3-474A-4BF5-9B28-482683F98EA1}
9 | EndProjectSection
10 | EndProject
11 | Global
12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
13 | Debug LIB|Win32 = Debug LIB|Win32
14 | Debug LIB|x64 = Debug LIB|x64
15 | Debug|Win32 = Debug|Win32
16 | Debug|x64 = Debug|x64
17 | Release LIB|Win32 = Release LIB|Win32
18 | Release LIB|x64 = Release LIB|x64
19 | Release|Win32 = Release|Win32
20 | Release|x64 = Release|x64
21 | EndGlobalSection
22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
23 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug LIB|Win32.ActiveCfg = Debug LIB|Win32
24 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug LIB|Win32.Build.0 = Debug LIB|Win32
25 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug LIB|x64.ActiveCfg = Debug LIB|x64
26 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug LIB|x64.Build.0 = Debug LIB|x64
27 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug|Win32.ActiveCfg = Debug|Win32
28 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug|Win32.Build.0 = Debug|Win32
29 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug|x64.ActiveCfg = Debug|x64
30 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Debug|x64.Build.0 = Debug|x64
31 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release LIB|Win32.ActiveCfg = Release LIB|Win32
32 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release LIB|Win32.Build.0 = Release LIB|Win32
33 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release LIB|x64.ActiveCfg = Release LIB|x64
34 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release LIB|x64.Build.0 = Release LIB|x64
35 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release|Win32.ActiveCfg = Release|Win32
36 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release|Win32.Build.0 = Release|Win32
37 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release|x64.ActiveCfg = Release|x64
38 | {22C938C3-474A-4BF5-9B28-482683F98EA1}.Release|x64.Build.0 = Release|x64
39 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Debug LIB|Win32.ActiveCfg = Debug|x64
40 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Debug LIB|x64.ActiveCfg = Debug|x64
41 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Debug LIB|x64.Build.0 = Debug|x64
42 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Debug|Win32.ActiveCfg = Debug|Win32
43 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Debug|x64.ActiveCfg = Debug|x64
44 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Release LIB|Win32.ActiveCfg = Release|x64
45 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Release LIB|x64.ActiveCfg = Release|x64
46 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Release LIB|x64.Build.0 = Release|x64
47 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Release|Win32.ActiveCfg = Release|Win32
48 | {9BDDED4E-4A35-4B0E-B0CF-94D97FE2B365}.Release|x64.ActiveCfg = Release|x64
49 | EndGlobalSection
50 | GlobalSection(SolutionProperties) = preSolution
51 | HideSolutionNode = FALSE
52 | EndGlobalSection
53 | EndGlobal
54 |
--------------------------------------------------------------------------------
/third_party/GdiOle/GDIImage.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #include
5 |
6 | EXTERN_C const CLSID CLSID_GDIImage;
7 |
8 | class CGDIImage
9 | {
10 | typedef bool (__cdecl *ONFRAMECHANGED)(CGDIImage *pImage, LPARAM lParam);
11 |
12 | ULONG_PTR m_GdiToken;
13 | Gdiplus::Image *m_pImage;
14 | Gdiplus::PropertyItem* m_pItem;
15 | DWORD m_dwWidth;
16 | DWORD m_dwHeight;
17 | DWORD m_dwFramesCount;
18 | DWORD m_dwCurrentFrame;
19 | COLORREF m_clrBack;
20 |
21 | HANDLE m_hTimer;
22 | volatile LONG m_lRef;
23 |
24 | static VOID CALLBACK OnTimer(PVOID lpParameter, BOOLEAN TimerOrWaitFired);
25 |
26 | struct CALLBACK_STRUCT
27 | {
28 | CALLBACK_STRUCT(ONFRAMECHANGED _pOnFrameChangedProc, LPARAM _lParam):
29 | pOnFrameChangedProc(_pOnFrameChangedProc),
30 | lParam(_lParam)
31 | {};
32 |
33 | ONFRAMECHANGED pOnFrameChangedProc;
34 | LPARAM lParam;
35 |
36 | bool operator<(const CALLBACK_STRUCT &cb) const
37 | {
38 | return (pOnFrameChangedProc < cb.pOnFrameChangedProc || (pOnFrameChangedProc == cb.pOnFrameChangedProc && lParam < cb.lParam));
39 | }
40 | };
41 |
42 | CRITICAL_SECTION m_csCallback;
43 | typedef std::set tCALLBACK;
44 | tCALLBACK m_Callbacks;
45 | HWND m_hCallbackWnd;
46 | DWORD m_dwCallbackMsg;
47 |
48 | HGLOBAL m_global;
49 | IStream* m_stream;
50 |
51 | CGDIImage(LPCWSTR pszFileName, HWND hCallbackWnd, DWORD dwCallbackMsg);
52 | CGDIImage(const void * pVoid, int nSize, HWND hCallbackWnd, DWORD dwCallbackMsg);
53 | ~CGDIImage();
54 |
55 | public:
56 |
57 | static CGDIImage *CreateInstance(LPCWSTR pszFileName, HWND hCallbackWnd, DWORD dwCallbackMsg);
58 | static CGDIImage *CreateInstance(const void * pVoid, int nSize, HWND hCallbackWnd, DWORD dwCallbackMsg);
59 |
60 | bool IsInited()
61 | {
62 | return m_pImage != NULL;
63 | }
64 |
65 | void Draw(HDC hDC, int xDst, int yDst, int wDst, int hDst, int xSrc, int ySrc, int xBk, int yBk, int wBk, int hBk);
66 | void DrawFrame();
67 |
68 | DWORD GetFrameDelay(DWORD dwFrame);
69 | void SelectActiveFrame(DWORD dwFrame);
70 | DWORD GetFrameCount();
71 | DWORD GetWidth();
72 | DWORD GetHeight();
73 |
74 | void RegisterCallback(ONFRAMECHANGED pOnFrameChangedProc, LPARAM lParam);
75 | void UnregisterCallback(ONFRAMECHANGED pOnFrameChangedProc, LPARAM lParam);
76 |
77 | HDC CreateBackDC(COLORREF clrBack, int iPaddingW, int iPaddingH);
78 | void DeleteBackDC(HDC hBackDC);
79 |
80 | LONG AddRef()
81 | {
82 | return InterlockedIncrement(&m_lRef);
83 | }
84 |
85 | LONG Release()
86 | {
87 | LONG lRef = InterlockedDecrement(&m_lRef);
88 |
89 | if (lRef == 0)
90 | {
91 | delete this;
92 | }
93 |
94 | return lRef;
95 | }
96 | };
97 |
98 | EXTERN_C CGDIImage* GetImage(LPCTSTR pszFileName, HWND hCallbackWnd, DWORD dwCallbackMsg);
99 | EXTERN_C CGDIImage* GetImageFromStream(const void * pVoid, int nSize, HWND hCallbackWnd, DWORD dwCallbackMsg);
100 | EXTERN_C IOleObject* GetImageObject(CGDIImage* pImage, LPCTSTR pStrData, IOleClientSite *pOleClientSite, IStorage *pStorage, HWND hCallbackWnd, DWORD dwCallbackMsg);
101 | EXTERN_C IOleObject* GetImageObjectFromFile(LPCTSTR pszFileName, LPCTSTR pStrData, IOleClientSite *pOleClientSite, IStorage *pStorage, HWND hCallbackWnd, DWORD dwCallbackMsg);
102 |
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav
15 |
16 |
17 | {7dbb3ca9-205e-48d0-9516-b53920e761a1}
18 | False
19 |
20 |
21 |
22 |
23 | Source Files
24 |
25 |
26 | Source Files
27 |
28 |
29 | Source Files
30 |
31 |
32 | Source Files
33 |
34 |
35 | Source Files
36 |
37 |
38 | Generated Files
39 |
40 |
41 |
42 |
43 | Source Files
44 |
45 |
46 | Resource Files
47 |
48 |
49 | Resource Files
50 |
51 |
52 | Resource Files
53 |
54 |
55 |
56 |
57 |
58 |
59 | Source Files
60 |
61 |
62 |
63 |
64 | Header Files
65 |
66 |
67 | Header Files
68 |
69 |
70 | Header Files
71 |
72 |
73 | Header Files
74 |
75 |
76 | Header Files
77 |
78 |
79 | Header Files
80 |
81 |
82 | Header Files
83 |
84 |
85 | Generated Files
86 |
87 |
88 |
89 |
90 | Resource Files
91 |
92 |
93 |
--------------------------------------------------------------------------------
/include/UIGDIWindow_Win.h:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | // DirectUI - UI Library
4 | //
5 | // Written by Bjarke Viksoe (bjarke@viksoe.dk)
6 | // Copyright (c) 2006-2007 Bjarke Viksoe.
7 | //
8 | // This code may be used in compiled form in any way you desire. These
9 | // source files may be redistributed by any means PROVIDING it is
10 | // not sold for profit without the authors written consent, and
11 | // providing that this notice and the authors name is included.
12 | //
13 | // This file is provided "as is" with no expressed or implied warranty.
14 | // The author accepts no liability if it causes any damage to you or your
15 | // computer whatsoever. It's free, so don't hassle me about it.
16 | //
17 | ////
18 | // Acknowledgements :
19 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
20 | //
21 | //
22 | //
23 | // Beware of bugs.
24 | //
25 | //
26 | //
27 | ////////////////////////////////////////////////////////
28 |
29 | #ifndef __UIGDIWINDOW_WIN_H__
30 | #define __UIGDIWINDOW_WIN_H__
31 |
32 | namespace DuiLib {
33 |
34 | #ifdef UI_BUILD_FOR_WINGDI
35 |
36 | /////////////////////////////////////////////////////////////////////////////////////
37 | //
38 |
39 | class UILIB_API CWindowWnd
40 | {
41 | public:
42 | CWindowWnd();
43 | virtual ~CWindowWnd();
44 |
45 | HWND GetHWND() const;
46 | operator HWND() const;
47 |
48 | bool RegisterWindowClass();
49 | bool RegisterSuperclass();
50 |
51 | bool UnRegisterWindowClass();
52 | bool UnRegisterSuperclass();
53 |
54 | HWND Create(HWND hwndParent, LPCTSTR pstrName, DWORD dwStyle, DWORD dwExStyle, const RECT rc, HMENU hMenu = NULL);
55 | HWND Create(HWND hwndParent, LPCTSTR pstrName, DWORD dwStyle, DWORD dwExStyle, int x = CW_USEDEFAULT, int y = CW_USEDEFAULT, int cx = CW_USEDEFAULT, int cy = CW_USEDEFAULT, HMENU hMenu = NULL);
56 | HWND Subclass(HWND hWnd);
57 | void Unsubclass();
58 | void ShowWindow(bool bShow = true, bool bTakeFocus = true);
59 | UINT ShowModal();
60 | UINT ShowModal(HWND hWnd);
61 | void Close(UINT nRet = IDOK);
62 | void CenterWindow();
63 | void SetIcon(UINT nRes);
64 |
65 | LRESULT SendMessage(UINT uMsg, WPARAM wParam = 0, LPARAM lParam = 0L);
66 | LRESULT PostMessage(UINT uMsg, WPARAM wParam = 0, LPARAM lParam = 0L);
67 | void ResizeClient(int cx = -1, int cy = -1);
68 |
69 | protected:
70 | virtual LPCTSTR GetWindowClassName() const = 0;
71 | virtual LPCTSTR GetSuperClassName() const;
72 | virtual UINT GetClassStyle() const;
73 |
74 | virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
75 | virtual void OnFinalMessage(HWND hWnd);
76 |
77 | static LRESULT CALLBACK __WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
78 | static LRESULT CALLBACK __ControlProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
79 |
80 | protected:
81 | HWND m_hWnd;
82 | WNDPROC m_OldWndProc;
83 | bool m_bSubclassed;
84 | };
85 |
86 | /////////////////////////////////////////////////////////////////////////////////////
87 | //
88 |
89 | class UILIB_API CWaitCursor
90 | {
91 | public:
92 | CWaitCursor();
93 | ~CWaitCursor();
94 |
95 | protected:
96 | HCURSOR m_hOrigCursor;
97 | };
98 |
99 | #endif
100 |
101 | } // namespace DuiLib
102 |
103 | #endif // __UIGDIWINDOW_WIN_H__
104 |
--------------------------------------------------------------------------------
/include/GDIImage.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #if defined(UI_BUILD_FOR_WIN32) && !defined(UI_BUILD_FOR_WINCE)
3 | #include
4 |
5 | #include
6 |
7 | EXTERN_C const CLSID CLSID_GDIImage;
8 |
9 | class CGDIImage
10 | {
11 | typedef bool (__cdecl *ONFRAMECHANGED)(CGDIImage *pImage, LPARAM lParam);
12 |
13 | ULONG_PTR m_GdiToken;
14 | Gdiplus::Image *m_pImage;
15 | Gdiplus::PropertyItem* m_pItem;
16 | DWORD m_dwWidth;
17 | DWORD m_dwHeight;
18 | DWORD m_dwFramesCount;
19 | DWORD m_dwCurrentFrame;
20 | COLORREF m_clrBack;
21 |
22 | HANDLE m_hTimer;
23 | volatile LONG m_lRef;
24 |
25 | static VOID CALLBACK OnTimer(PVOID lpParameter, BOOLEAN TimerOrWaitFired);
26 |
27 | struct CALLBACK_STRUCT
28 | {
29 | CALLBACK_STRUCT(ONFRAMECHANGED _pOnFrameChangedProc, LPARAM _lParam):
30 | pOnFrameChangedProc(_pOnFrameChangedProc),
31 | lParam(_lParam)
32 | {};
33 |
34 | ONFRAMECHANGED pOnFrameChangedProc;
35 | LPARAM lParam;
36 |
37 | bool operator<(const CALLBACK_STRUCT &cb) const
38 | {
39 | return (pOnFrameChangedProc < cb.pOnFrameChangedProc || (pOnFrameChangedProc == cb.pOnFrameChangedProc && lParam < cb.lParam));
40 | }
41 | };
42 |
43 | CRITICAL_SECTION m_csCallback;
44 | typedef std::set tCALLBACK;
45 | tCALLBACK m_Callbacks;
46 | HWND m_hCallbackWnd;
47 | DWORD m_dwCallbackMsg;
48 |
49 | HGLOBAL m_global;
50 | IStream* m_stream;
51 |
52 | CGDIImage(LPCWSTR pszFileName, HWND hCallbackWnd, DWORD dwCallbackMsg);
53 | CGDIImage(const void * pVoid, int nSize, HWND hCallbackWnd, DWORD dwCallbackMsg);
54 | ~CGDIImage();
55 |
56 | public:
57 |
58 | static CGDIImage *CreateInstance(LPCWSTR pszFileName, HWND hCallbackWnd, DWORD dwCallbackMsg);
59 | static CGDIImage *CreateInstance(const void * pVoid, int nSize, HWND hCallbackWnd, DWORD dwCallbackMsg);
60 |
61 | bool IsInited()
62 | {
63 | return m_pImage != NULL;
64 | }
65 |
66 | void Draw(HDC hDC, int xDst, int yDst, int wDst, int hDst, int xSrc, int ySrc, int xBk, int yBk, int wBk, int hBk);
67 | void DrawFrame();
68 |
69 | DWORD GetFrameDelay(DWORD dwFrame);
70 | void SelectActiveFrame(DWORD dwFrame);
71 | DWORD GetFrameCount();
72 | DWORD GetWidth();
73 | DWORD GetHeight();
74 |
75 | void RegisterCallback(ONFRAMECHANGED pOnFrameChangedProc, LPARAM lParam);
76 | void UnregisterCallback(ONFRAMECHANGED pOnFrameChangedProc, LPARAM lParam);
77 |
78 | HDC CreateBackDC(COLORREF clrBack, int iPaddingW, int iPaddingH);
79 | void DeleteBackDC(HDC hBackDC);
80 |
81 | LONG AddRef()
82 | {
83 | return InterlockedIncrement(&m_lRef);
84 | }
85 |
86 | LONG Release()
87 | {
88 | LONG lRef = InterlockedDecrement(&m_lRef);
89 |
90 | if (lRef == 0)
91 | {
92 | delete this;
93 | }
94 |
95 | return lRef;
96 | }
97 | };
98 |
99 | EXTERN_C CGDIImage* GetImage(LPCWSTR pszFileName, HWND hCallbackWnd, DWORD dwCallbackMsg);
100 | EXTERN_C CGDIImage* GetImageFromStream(const void * pVoid, int nSize, HWND hCallbackWnd, DWORD dwCallbackMsg);
101 | EXTERN_C IOleObject* GetImageObject(CGDIImage* pImage, LPCWSTR pStrData, IOleClientSite *pOleClientSite, IStorage *pStorage, HWND hCallbackWnd, DWORD dwCallbackMsg);
102 | EXTERN_C IOleObject* GetImageObjectFromFile(LPCWSTR pszFileName, LPCWSTR pStrData, IOleClientSite *pOleClientSite, IStorage *pStorage, HWND hCallbackWnd, DWORD dwCallbackMsg);
103 |
104 | #endif
--------------------------------------------------------------------------------
/include/UIEdit.h:
--------------------------------------------------------------------------------
1 | // DirectUI - UI Library
2 | // Version 1.0.0
3 | // Released: 24th January, 2011 by:
4 | //
5 | // achellies
6 | // email: achellies@163.com
7 | // url: http://directui.googlecode.com/
8 | //
9 | //
10 | // Copyright (c) 2010-2011 achellies
11 | //
12 | // Permission is hereby granted, free of charge, to
13 | // any person obtaining a copy of this software and
14 | // associated documentation files (the "Software"),
15 | // to deal in the Software without restriction, including
16 | // without limitation the rights to use, copy, modify,
17 | // merge, publish, distribute, sublicense, and/or sell
18 | // copies of the Software, and to permit persons to whom
19 | // the Software is furnished to do so, subject to the
20 | // following conditions:
21 | //
22 | // The above copyright notice and this permission notice
23 | // shall be included in all copies or substantial portions
24 | // of the Software.
25 | //
26 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
27 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
28 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
29 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
30 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
31 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
32 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
34 | // OR OTHER DEALINGS IN THE SOFTWARE.
35 | //
36 | //
37 | // Acknowledgements :
38 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
39 | //
40 | // wangchyz (https://github.com/wangchyz/duilib/)
41 | //
42 | // Beware of bugs.
43 | //
44 | //
45 | //
46 | ////////////////////////////////////////////////////////
47 |
48 | #ifndef __UIEDIT_H__
49 | #define __UIEDIT_H__
50 |
51 | namespace DirectUI {
52 |
53 | /////////////////////////////////////////////////////////////////////////////////////
54 | //
55 |
56 | class CMultiLineEditWnd;
57 | class CMultiLineEditCanvasWnd;
58 |
59 | class UILIB_API CMultiLineEditUI : public CControlUI
60 | {
61 | friend CMultiLineEditWnd;
62 | friend CMultiLineEditCanvasWnd;
63 | public:
64 | CMultiLineEditUI();
65 | ~CMultiLineEditUI();
66 |
67 | LPCTSTR GetClass() const;
68 | LPCTSTR GetTypeName() const;
69 | UINT GetControlFlags() const;
70 |
71 | void Init();
72 |
73 | CStdString GetText() const;
74 | void SetText(LPCTSTR pstrText);
75 |
76 | void SetEnabled(bool bEnabled);
77 | void SetVisible(bool bVisible);
78 | void SetReadOnly(bool bReadOnly);
79 | void SetFocus(bool bReadOnly);
80 | bool IsReadOnly() const;
81 |
82 | void Event(TEventUI& event);
83 |
84 | SIZE EstimateSize(SIZE szAvailable);
85 | void SetPos(RECT rc);
86 | void SetPos(int left, int top, int right, int bottom);
87 |
88 | void PaintStatusImage(HDC hDC);
89 |
90 | void PaintText(HDC hDC);
91 |
92 | SIZE GetScrollPos() const;
93 | SIZE GetScrollRange() const;
94 | void SetScrollRange(SIZE szRange);
95 | void SetScrollPos(SIZE szPos);
96 | void LineUp();
97 | void LineDown();
98 | void PageUp();
99 | void PageDown();
100 | void HomeUp();
101 | void EndDown();
102 | void LineLeft();
103 | void LineRight();
104 | void PageLeft();
105 | void PageRight();
106 | void HomeLeft();
107 | void EndRight();
108 |
109 | protected:
110 | CMultiLineEditWnd* m_pWindow;
111 | CMultiLineEditCanvasWnd* m_pCanvas;
112 |
113 | CSize m_szScrollPos;
114 | CSize m_szScrollRange;
115 | };
116 |
117 | }; // namespace DirectUI
118 |
119 |
120 | #endif //#ifndef __UIEDIT_H__
121 |
122 |
--------------------------------------------------------------------------------
/UIEngine/stdafx.h:
--------------------------------------------------------------------------------
1 | // DirectUI - UI Library
2 | // Version 1.0.0
3 | // Released: 24th January, 2011 by:
4 | //
5 | // achellies
6 | // email: achellies@163.com
7 | // url: http://directui.googlecode.com/
8 | //
9 | //
10 | // Copyright (c) 2010-2011 achellies
11 | //
12 | // Permission is hereby granted, free of charge, to
13 | // any person obtaining a copy of this software and
14 | // associated documentation files (the "Software"),
15 | // to deal in the Software without restriction, including
16 | // without limitation the rights to use, copy, modify,
17 | // merge, publish, distribute, sublicense, and/or sell
18 | // copies of the Software, and to permit persons to whom
19 | // the Software is furnished to do so, subject to the
20 | // following conditions:
21 | //
22 | // The above copyright notice and this permission notice
23 | // shall be included in all copies or substantial portions
24 | // of the Software.
25 | //
26 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
27 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
28 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
29 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
30 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
31 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
32 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
34 | // OR OTHER DEALINGS IN THE SOFTWARE.
35 | //
36 | //
37 | // Acknowledgements :
38 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
39 | //
40 | // wangchyz (https://github.com/wangchyz/duilib/)
41 | //
42 | // Beware of bugs.
43 | //
44 | //
45 | //
46 | ////////////////////////////////////////////////////////
47 |
48 | // stdafx.h : include file for standard system include files,
49 | // or project specific include files that are used frequently, but
50 | // are changed infrequently
51 | //
52 |
53 | #pragma once
54 |
55 | #include "UIlib.h"
56 |
57 | #if defined(UI_BUILD_FOR_WINCE)
58 |
59 | #pragma comment(linker, "/nodefaultlib:libc.lib")
60 | #pragma comment(linker, "/nodefaultlib:libcd.lib")
61 |
62 | #ifdef WINVER
63 | #undef WINVER
64 | // NOTE - this value is not strongly correlated to the Windows CE OS version being targeted
65 | #define WINVER _WIN32_WCE
66 | #endif
67 |
68 | #include
69 | #if defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP)
70 | #define SHELL_AYGSHELL
71 | #endif
72 |
73 | #ifdef _CE_DCOM
74 | #define _ATL_APARTMENT_THREADED
75 | #endif
76 |
77 | #ifdef SHELL_AYGSHELL
78 | #include
79 | #pragma comment(lib, "aygshell.lib")
80 | #endif // SHELL_AYGSHELL
81 |
82 |
83 |
84 |
85 | #if defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP)
86 | #ifndef _DEVICE_RESOLUTION_AWARE
87 | #define _DEVICE_RESOLUTION_AWARE
88 | #endif
89 | #endif
90 |
91 | #ifdef _DEVICE_RESOLUTION_AWARE
92 | #include "DeviceResolutionAware.h"
93 | #endif
94 |
95 | #if _WIN32_WCE < 0x500 && ( defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP) )
96 | #pragma comment(lib, "ccrtrtti.lib")
97 | #ifdef _X86_
98 | #if defined(_DEBUG)
99 | #pragma comment(lib, "libcmtx86d.lib")
100 | #else
101 | #pragma comment(lib, "libcmtx86.lib")
102 | #endif
103 | #endif
104 | #endif
105 |
106 | #include
107 | #include
108 |
109 | #else
110 |
111 | #define _CRT_SECURE_NO_DEPRECATE
112 |
113 | #include
114 |
115 | #endif
116 |
117 | // TODO: reference additional headers your program requires here
118 | #define lengthof(x) (sizeof(x)/sizeof(*x))
119 | #define MAX max
120 | #define MIN min
121 | #define CLAMP(x,a,b) (MIN(b,MAX(a,x)))
122 |
--------------------------------------------------------------------------------
/include/UIMenu.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIMENU_H__
2 | #define __UIMENU_H__
3 |
4 | #ifdef _MSC_VER
5 | #pragma once
6 | #endif
7 |
8 | #include "observer_impl_base.hpp"
9 |
10 | namespace DuiLib {
11 |
12 | #define WM_MENU (WM_USER + 0xFF)
13 |
14 | /////////////////////////////////////////////////////////////////////////////////////
15 | //
16 | struct ContextMenuParam
17 | {
18 | // 1: remove all
19 | // 2: remove the sub menu
20 | WPARAM wParam;
21 | HWND hWnd;
22 | };
23 |
24 | enum MenuAlignment
25 | {
26 | eMenuAlignment_Left = 1 << 1,
27 | eMenuAlignment_Top = 1 << 2,
28 | eMenuAlignment_Right = 1 << 3,
29 | eMenuAlignment_Bottom = 1 << 4,
30 | };
31 |
32 | typedef class ObserverImpl ContextMenuObserver;
33 | typedef class ReceiverImpl ContextMenuReceiver;
34 |
35 | extern ContextMenuObserver s_context_menu_observer;
36 |
37 | // MenuUI
38 | extern const TCHAR* const kMenuUIClassName;// = _T("MenuUI");
39 | extern const TCHAR* const kMenuUIInterfaceName;// = _T("Menu");
40 |
41 | class CListUI;
42 | class CMenuUI : public CListUI
43 | {
44 | public:
45 | CMenuUI();
46 | ~CMenuUI();
47 |
48 | LPCTSTR GetClass() const;
49 | LPVOID GetInterface(LPCTSTR pstrName);
50 |
51 | virtual void DoEvent(TEventUI& event);
52 |
53 | virtual bool Add(CControlUI* pControl);
54 | virtual bool AddAt(CControlUI* pControl, int iIndex);
55 |
56 | virtual int GetItemIndex(CControlUI* pControl) const;
57 | virtual bool SetItemIndex(CControlUI* pControl, int iIndex);
58 | virtual bool Remove(CControlUI* pControl);
59 |
60 | SIZE EstimateSize(SIZE szAvailable);
61 |
62 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
63 | };
64 |
65 | /////////////////////////////////////////////////////////////////////////////////////
66 | //
67 | // CMenuBuilderCallback
68 | class CMenuBuilderCallback : public IDialogBuilderCallback
69 | {
70 | public:
71 | virtual CControlUI* CreateControl(LPCTSTR pstrClass, CPaintManagerUI* pManager);
72 | };
73 |
74 | /////////////////////////////////////////////////////////////////////////////////////
75 | //
76 | // CMenuWnd
77 | extern const TCHAR* const kMenuElementUIClassName;// = _T("MenuElementUI");
78 | extern const TCHAR* const kMenuElementUIInterfaceName;// = _T("MenuElement);
79 |
80 | class CMenuElementUI;
81 | class CMenuWnd : public CWindowWnd, public ContextMenuReceiver
82 | {
83 | public:
84 | CMenuWnd(HWND hParent = NULL);
85 | void Init(CMenuElementUI* pOwner, INotifyUI* pNotifyUI, STRINGorID xml, LPCTSTR pSkinType, POINT point);
86 | LPCTSTR GetWindowClassName() const;
87 | void OnFinalMessage(HWND hWnd);
88 |
89 | virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
90 |
91 | BOOL Receive(ContextMenuParam param);
92 |
93 | protected:
94 | HWND m_hParent;
95 | POINT m_BasedPoint;
96 | STRINGorID m_xml;
97 | CStdString m_sType;
98 | CPaintManagerUI m_pm;
99 | CMenuElementUI* m_pOwner;
100 | CMenuUI* m_pLayout;
101 | public:
102 | static INotifyUI* m_pNotifyUI;
103 | };
104 |
105 | /////////////////////////////////////////////////////////////////////////////////////
106 | //
107 | // MenuElementUI
108 | class CListContainerElementUI;
109 | class CMenuElementUI : public CListContainerElementUI
110 | {
111 | friend CMenuWnd;
112 | public:
113 | CMenuElementUI();
114 | ~CMenuElementUI();
115 |
116 | LPCTSTR GetClass() const;
117 | LPVOID GetInterface(LPCTSTR pstrName);
118 |
119 | void DoPaint(void* ctx, const RECT& rcPaint);
120 |
121 | void DrawItemText(void* ctx, const RECT& rcItem);
122 |
123 | SIZE EstimateSize(SIZE szAvailable);
124 |
125 | bool Activate();
126 |
127 | void DoEvent(TEventUI& event);
128 |
129 | void CreateMenuWnd();
130 |
131 | protected:
132 | CMenuWnd* m_pWindow;
133 | };
134 |
135 | } // namespace DuiLib
136 |
137 | #endif // __UIMENU_H__
138 |
--------------------------------------------------------------------------------
/SignApk/lock.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "lock.hpp"
3 |
4 |
5 | ///////////// CRITICAL_SECTION wrapper /////////////////
6 | CriticalSection::CriticalSection()
7 | {
8 | ::InitializeCriticalSection(&m_criticalsection);
9 | }
10 |
11 | CriticalSection::~CriticalSection()
12 | {
13 | ::DeleteCriticalSection(&m_criticalsection);
14 | }
15 |
16 | void CriticalSection::Lock()
17 | {
18 | ::EnterCriticalSection(&m_criticalsection);
19 | }
20 |
21 | void CriticalSection::Unlock()
22 | {
23 | ::LeaveCriticalSection(&m_criticalsection);
24 | }
25 |
26 | AutoCriticalSection::AutoCriticalSection(CriticalSection& criticalsection)
27 | :m_criticalsection(criticalsection)
28 | {
29 | m_criticalsection.Lock();
30 | }
31 |
32 | AutoCriticalSection::~AutoCriticalSection()
33 | {
34 | m_criticalsection.Unlock();
35 | }
36 |
37 | CMutex::CMutex(LPCTSTR lpszName)
38 | {
39 | m_hMutex = CreateMutex(NULL,FALSE,lpszName);
40 | }
41 |
42 | ///////////// MUTEX wrapper /////////////////
43 | CMutex::~CMutex()
44 | {
45 | if (m_hMutex != NULL)
46 | {
47 | CloseHandle(m_hMutex);
48 | }
49 | }
50 |
51 | void CMutex::Lock()
52 | {
53 | if (m_hMutex != NULL)
54 | {
55 | DWORD dwWaitResult = WaitForSingleObject(m_hMutex,INFINITE);
56 | switch (dwWaitResult)
57 | {
58 | // The thread got ownership of the mutex
59 | case WAIT_OBJECT_0:
60 | break;
61 | // The thread got ownership of an abandoned mutex
62 | case WAIT_ABANDONED:
63 | break;
64 | }
65 | }
66 | }
67 | void CMutex::Unlock()
68 | {
69 | if (m_hMutex != NULL)
70 | {
71 | ReleaseMutex(m_hMutex);
72 | }
73 | }
74 |
75 | CAutoMutex::CAutoMutex(CMutex& mutex)
76 | :m_mutex(mutex)
77 | {
78 | m_mutex.Lock();
79 | }
80 |
81 | CAutoMutex::~CAutoMutex()
82 | {
83 | m_mutex.Unlock();
84 | }
85 |
86 | ///////////// EVENT wrapper /////////////////
87 | CEvent::CEvent(LPCTSTR lpszName,BOOL bManualReset,BOOL bInitialState)
88 | {
89 | m_hEvent = CreateEvent(NULL,bManualReset,bInitialState,lpszName);
90 | }
91 |
92 | CEvent::~CEvent()
93 | {
94 | if (m_hEvent != NULL)
95 | {
96 | CloseHandle(m_hEvent);
97 | }
98 | }
99 |
100 | bool CEvent::IsLocked()
101 | {
102 | bool IsLocked = false;
103 | if (m_hEvent != NULL)
104 | {
105 | DWORD dwWaitResult = WaitForSingleObject(m_hEvent,1);
106 | switch (dwWaitResult)
107 | {
108 | // The thread got ownership of the mutex
109 | case WAIT_OBJECT_0:
110 | break;
111 | // The thread got ownership of an abandoned mutex
112 | case WAIT_ABANDONED:
113 | break;
114 | case WAIT_TIMEOUT:
115 | IsLocked = true;
116 | break;
117 | }
118 | }
119 | return IsLocked;
120 | }
121 |
122 | void CEvent::Lock()
123 | {
124 | if (m_hEvent != NULL)
125 | {
126 | DWORD dwWaitResult = WaitForSingleObject(m_hEvent,INFINITE);
127 | switch (dwWaitResult)
128 | {
129 | // The thread got ownership of the mutex
130 | case WAIT_OBJECT_0:
131 | break;
132 | // The thread got ownership of an abandoned mutex
133 | case WAIT_ABANDONED:
134 | break;
135 | }
136 | ResetEvent(m_hEvent);
137 | }
138 | }
139 | void CEvent::Unlock()
140 | {
141 | if (m_hEvent != NULL)
142 | {
143 | SetEvent(m_hEvent);
144 | }
145 | }
146 |
147 | void CEvent::Reset()
148 | {
149 | if (m_hEvent != NULL)
150 | {
151 | ResetEvent(m_hEvent);
152 | }
153 | }
154 |
155 | void CEvent::Set()
156 | {
157 | if (m_hEvent != NULL)
158 | {
159 | SetEvent(m_hEvent);
160 | }
161 | }
162 |
163 | CAutoEvent::CAutoEvent(CEvent& e)
164 | :m_event(e)
165 | {
166 | m_event.Lock();
167 | }
168 |
169 | CAutoEvent::~CAutoEvent()
170 | {
171 | m_event.Unlock();
172 | }
173 |
174 | CManualEvent::CManualEvent(CEvent& e)
175 | :m_event(e)
176 | {}
177 |
178 | CManualEvent::~CManualEvent()
179 | {
180 | m_event.Unlock();
181 | }
182 |
183 | void CManualEvent::Lock()
184 | {
185 | m_event.Lock();
186 | }
187 |
188 | void CManualEvent::Unlock()
189 | {
190 | m_event.Unlock();
191 | }
--------------------------------------------------------------------------------
/include/UIUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | // DirectUI - UI Library
4 | //
5 | // Written by Bjarke Viksoe (bjarke@viksoe.dk)
6 | // Copyright (c) 2006-2007 Bjarke Viksoe.
7 | //
8 | // This code may be used in compiled form in any way you desire. These
9 | // source files may be redistributed by any means PROVIDING it is
10 | // not sold for profit without the authors written consent, and
11 | // providing that this notice and the authors name is included.
12 | //
13 | // This file is provided "as is" with no expressed or implied warranty.
14 | // The author accepts no liability if it causes any damage to you or your
15 | // computer whatsoever. It's free, so don't hassle me about it.
16 | //
17 | ////
18 | // Acknowledgements :
19 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
20 | //
21 | //
22 | //
23 | // Beware of bugs.
24 | //
25 | //
26 | //
27 | ////////////////////////////////////////////////////////
28 | #ifndef __UIUTIL_H__
29 | #define __UIUTIL_H__
30 |
31 | #ifdef _MSC_VER
32 | #pragma once
33 | #endif
34 |
35 | namespace StringConvertor {
36 |
37 | #pragma warning(disable: 4996)
38 |
39 | UILIB_API LPSTR WideToAnsi(LPCWSTR str, int len = -1);
40 | UILIB_API LPSTR WideToUtf8(LPCWSTR str, int len = -1);
41 | UILIB_API LPWSTR WideStrDup(LPCWSTR str, int len = -1);
42 |
43 | UILIB_API LPWSTR AnsiToWide(LPCSTR str, int len = -1);
44 | UILIB_API __declspec(deprecated) LPSTR AnsiToUtf8(LPCSTR str, int len = -1);
45 | UILIB_API __declspec(deprecated) LPSTR AnsiStrDup(LPCSTR str, int len = -1);
46 |
47 | UILIB_API LPWSTR Utf8ToWide(LPCSTR str, int len = -1);
48 | UILIB_API __declspec(deprecated) LPSTR Utf8ToAnsi(LPCSTR str, int len = -1);
49 | static __inline LPSTR Utf8StrDup(LPCSTR str, int len = -1) { return AnsiStrDup(str, len); }
50 |
51 | //StringAlloc takes the number of characters, not bytes!
52 | UILIB_API __declspec(deprecated) LPWSTR StringAllocW(size_t len);
53 | UILIB_API __declspec(deprecated) LPSTR StringAllocA(size_t len);
54 | UILIB_API void StringFree(LPWSTR str);
55 | UILIB_API void StringFree(LPSTR str);
56 |
57 | #define StringFreeW StringFree
58 | #define StringFreeA StringFree
59 |
60 | #ifdef UNICODE
61 | static __declspec(deprecated) __inline LPTSTR WideToTchar(LPCWSTR str, int len = -1) { return WideStrDup(str, len); }
62 | static __declspec(deprecated) __inline LPTSTR AnsiToTchar(LPCSTR str, int len = -1) { return AnsiToWide(str, len); }
63 | static __declspec(deprecated) __inline LPTSTR Utf8ToTchar(LPCSTR str, int len = -1) { return Utf8ToWide(str, len); }
64 | static __declspec(deprecated) __inline LPWSTR TcharToWide(LPCTSTR str, int len = -1) { return WideStrDup(str, len); }
65 | static __declspec(deprecated) __inline LPSTR TcharToAnsi(LPCTSTR str, int len = -1) { return WideToAnsi(str, len); }
66 | static __declspec(deprecated) __inline LPSTR TcharToUtf8(LPCTSTR str, int len = -1) { return WideToUtf8(str, len); }
67 | static __declspec(deprecated) __inline LPTSTR TcharStrDup(LPCTSTR str, int len = -1) { return WideStrDup(str, len); }
68 | static __declspec(deprecated) __inline LPTSTR StringAlloc(size_t len) { return StringAllocW(len); }
69 | #else
70 | static __declspec(deprecated) __inline LPTSTR WideToTchar(LPCWSTR str, int len = -1) { return WideToAnsi(str, len); }
71 | static __declspec(deprecated) __inline LPTSTR AnsiToTchar(LPCSTR str, int len = -1) { return AnsiStrDup(str, len); }
72 | static __declspec(deprecated) __inline LPTSTR Utf8ToTchar(LPCSTR str, int len = -1) { return Utf8ToAnsi(str, len); }
73 | static __declspec(deprecated) __inline LPWSTR TcharToWide(LPCTSTR str, int len = -1) { return AnsiToWide(str, len); }
74 | static __declspec(deprecated) __inline LPSTR TcharToAnsi(LPCTSTR str, int len = -1) { return AnsiStrDup(str, len); }
75 | static __declspec(deprecated) __inline LPSTR TcharToUtf8(LPCTSTR str, int len = -1) { return AnsiToUtf8(str, len); }
76 | static __declspec(deprecated) __inline LPTSTR TcharStrDup(LPCTSTR str, int len = -1) { return AnsiStrDup(str, len); }
77 | static __declspec(deprecated) __inline LPTSTR StringAlloc(size_t len) { return StringAllocA(len); }
78 | #endif
79 |
80 | #pragma warning(default: 4996)
81 |
82 | } // namespace StringConvertor
83 |
84 | #endif //__UIUTIL_H__
85 |
--------------------------------------------------------------------------------
/third_party/GdiOle/GdiOle.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #ifndef APSTUDIO_INVOKED
11 | #include "targetver.h"
12 | #endif
13 | #include "winres.h"
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | #undef APSTUDIO_READONLY_SYMBOLS
17 |
18 | /////////////////////////////////////////////////////////////////////////////
19 | // Russian resources
20 |
21 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
22 | #ifdef _WIN32
23 | LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
24 | #pragma code_page(1251)
25 | #endif //_WIN32
26 |
27 | /////////////////////////////////////////////////////////////////////////////
28 | //
29 | // REGISTRY
30 | //
31 |
32 | IDR_GDIIMAGE REGISTRY "GDIImage.rgs"
33 |
34 | /////////////////////////////////////////////////////////////////////////////
35 | //
36 | // Bitmap
37 | //
38 |
39 | IDB_GDIIMAGE BITMAP "GDIImage.bmp"
40 | #endif // Russian resources
41 | /////////////////////////////////////////////////////////////////////////////
42 |
43 |
44 | /////////////////////////////////////////////////////////////////////////////
45 | // English (U.S.) resources
46 |
47 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
48 | #ifdef _WIN32
49 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
50 | #pragma code_page(1252)
51 | #endif //_WIN32
52 |
53 | #ifdef APSTUDIO_INVOKED
54 | /////////////////////////////////////////////////////////////////////////////
55 | //
56 | // TEXTINCLUDE
57 | //
58 |
59 | 1 TEXTINCLUDE
60 | BEGIN
61 | "resource.h\0"
62 | END
63 |
64 | 2 TEXTINCLUDE
65 | BEGIN
66 | "#ifndef APSTUDIO_INVOKED\r\n"
67 | "#include ""targetver.h""\r\n"
68 | "#endif\r\n"
69 | "#include ""winres.h""\r\n"
70 | "\0"
71 | END
72 |
73 | 3 TEXTINCLUDE
74 | BEGIN
75 | "1 TYPELIB ""GdiOle.tlb""\r\n"
76 | "\0"
77 | END
78 |
79 | #endif // APSTUDIO_INVOKED
80 |
81 |
82 | /////////////////////////////////////////////////////////////////////////////
83 | //
84 | // Version
85 | //
86 |
87 | VS_VERSION_INFO VERSIONINFO
88 | FILEVERSION 1,0,0,1
89 | PRODUCTVERSION 1,0,0,1
90 | FILEFLAGSMASK 0x3fL
91 | #ifdef _DEBUG
92 | FILEFLAGS 0x1L
93 | #else
94 | FILEFLAGS 0x0L
95 | #endif
96 | FILEOS 0x4L
97 | FILETYPE 0x2L
98 | FILESUBTYPE 0x0L
99 | BEGIN
100 | BLOCK "StringFileInfo"
101 | BEGIN
102 | BLOCK "040904e4"
103 | BEGIN
104 | VALUE "CompanyName", "TODO: "
105 | VALUE "FileDescription", "TODO: "
106 | VALUE "FileVersion", "1.0.0.1"
107 | VALUE "LegalCopyright", "TODO: (c) . All rights reserved."
108 | VALUE "InternalName", "GdiOle.dll"
109 | VALUE "OriginalFilename", "GdiOle.dll"
110 | VALUE "ProductName", "TODO: "
111 | VALUE "ProductVersion", "1.0.0.1"
112 | END
113 | END
114 | BLOCK "VarFileInfo"
115 | BEGIN
116 | VALUE "Translation", 0x409, 1252
117 | END
118 | END
119 |
120 |
121 | /////////////////////////////////////////////////////////////////////////////
122 | //
123 | // REGISTRY
124 | //
125 |
126 | IDR_GdiOle REGISTRY "GdiOle.rgs"
127 |
128 | /////////////////////////////////////////////////////////////////////////////
129 | //
130 | // String Table
131 | //
132 |
133 | STRINGTABLE
134 | BEGIN
135 | IDS_PROJNAME "GdiOle"
136 | END
137 |
138 | #endif // English (U.S.) resources
139 | /////////////////////////////////////////////////////////////////////////////
140 |
141 |
142 |
143 | #ifndef APSTUDIO_INVOKED
144 | /////////////////////////////////////////////////////////////////////////////
145 | //
146 | // Generated from the TEXTINCLUDE 3 resource.
147 | //
148 | 1 TYPELIB "GdiOle.tlb"
149 |
150 | /////////////////////////////////////////////////////////////////////////////
151 | #endif // not APSTUDIO_INVOKED
152 |
153 |
--------------------------------------------------------------------------------
/include/UIMarkup.h:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | // DirectUI - UI Library
4 | //
5 | // Written by Bjarke Viksoe (bjarke@viksoe.dk)
6 | // Copyright (c) 2006-2007 Bjarke Viksoe.
7 | //
8 | // This code may be used in compiled form in any way you desire. These
9 | // source files may be redistributed by any means PROVIDING it is
10 | // not sold for profit without the authors written consent, and
11 | // providing that this notice and the authors name is included.
12 | //
13 | // This file is provided "as is" with no expressed or implied warranty.
14 | // The author accepts no liability if it causes any damage to you or your
15 | // computer whatsoever. It's free, so don't hassle me about it.
16 | //
17 | ////
18 | // Acknowledgements :
19 | // Bjarke Viksoe (http://www.viksoe.dk/code/windowless1.htm)
20 | //
21 | //
22 | //
23 | // Beware of bugs.
24 | //
25 | //
26 | //
27 | ////////////////////////////////////////////////////////
28 | #ifndef __UIMARKUP_H__
29 | #define __UIMARKUP_H__
30 |
31 | #ifdef _MSC_VER
32 | #pragma once
33 | #endif
34 |
35 | namespace DuiLib {
36 |
37 | enum
38 | {
39 | XMLFILE_ENCODING_AUTODETECT = 0,
40 | XMLFILE_ENCODING_UTF8 = 1,
41 | XMLFILE_ENCODING_UNICODE = 2,
42 | XMLFILE_ENCODING_ASNI = 3,
43 | };
44 |
45 | class CMarkup;
46 | class CMarkupNode;
47 |
48 |
49 | class UILIB_API CMarkup
50 | {
51 | friend CMarkupNode;
52 | public:
53 | CMarkup(LPCTSTR pstrXML = NULL);
54 | ~CMarkup();
55 |
56 | bool Load(LPCTSTR pstrXML);
57 | bool LoadFromMem(BYTE* pByte, DWORD dwSize, int encoding = XMLFILE_ENCODING_AUTODETECT);
58 | bool LoadFromFile(LPCTSTR pstrFilename, CPaintManagerUI* pManager, int encoding = XMLFILE_ENCODING_AUTODETECT);
59 | void Release();
60 | bool IsValid() const;
61 |
62 | void SetPreserveWhitespace(bool bPreserve = true);
63 | void GetLastErrorMessage(LPTSTR pstrMessage, SIZE_T cchMax) const;
64 | void GetLastErrorLocation(LPTSTR pstrSource, SIZE_T cchMax) const;
65 |
66 | CMarkupNode GetRoot();
67 |
68 | private:
69 | typedef struct tagXMLELEMENT
70 | {
71 | ULONG iStart;
72 | ULONG iChild;
73 | ULONG iNext;
74 | ULONG iParent;
75 | ULONG iData;
76 | } XMLELEMENT;
77 |
78 | LPTSTR m_pstrXML;
79 | XMLELEMENT* m_pElements;
80 | ULONG m_nElements;
81 | ULONG m_nReservedElements;
82 | TCHAR m_szErrorMsg[100];
83 | TCHAR m_szErrorXML[50];
84 | bool m_bPreserveWhitespace;
85 |
86 | private:
87 | bool _Parse();
88 | bool _Parse(LPTSTR& pstrText, ULONG iParent);
89 | XMLELEMENT* _ReserveElement();
90 | inline void _SkipWhitespace(LPTSTR& pstr) const;
91 | inline void _SkipWhitespace(LPCTSTR& pstr) const;
92 | inline void _SkipIdentifier(LPTSTR& pstr) const;
93 | inline void _SkipIdentifier(LPCTSTR& pstr) const;
94 | bool _ParseData(LPTSTR& pstrText, LPTSTR& pstrData, char cEnd);
95 | void _ParseMetaChar(LPTSTR& pstrText, LPTSTR& pstrDest);
96 | bool _ParseAttributes(LPTSTR& pstrText);
97 | bool _Failed(LPCTSTR pstrError, LPCTSTR pstrLocation = NULL);
98 | };
99 |
100 |
101 | class UILIB_API CMarkupNode
102 | {
103 | friend CMarkup;
104 | private:
105 | CMarkupNode();
106 | CMarkupNode(CMarkup* pOwner, int iPos);
107 |
108 | public:
109 | bool IsValid() const;
110 |
111 | CMarkupNode GetParent();
112 | CMarkupNode GetSibling();
113 | CMarkupNode GetChild();
114 | CMarkupNode GetChild(LPCTSTR pstrName);
115 |
116 | bool HasSiblings() const;
117 | bool HasChildren() const;
118 | LPCTSTR GetName() const;
119 | LPCTSTR GetValue() const;
120 |
121 | bool HasAttributes();
122 | bool HasAttribute(LPCTSTR pstrName);
123 | int GetAttributeCount();
124 | LPCTSTR GetAttributeName(int iIndex);
125 | LPCTSTR GetAttributeValue(int iIndex);
126 | LPCTSTR GetAttributeValue(LPCTSTR pstrName);
127 | bool GetAttributeValue(int iIndex, LPTSTR pstrValue, SIZE_T cchMax);
128 | bool GetAttributeValue(LPCTSTR pstrName, LPTSTR pstrValue, SIZE_T cchMax);
129 |
130 | private:
131 | void _MapAttributes();
132 |
133 | enum { MAX_XML_ATTRIBUTES = 64 };
134 |
135 | typedef struct
136 | {
137 | ULONG iName;
138 | ULONG iValue;
139 | } XMLATTRIBUTE;
140 |
141 | int m_iPos;
142 | int m_nAttributes;
143 | XMLATTRIBUTE m_aAttributes[MAX_XML_ATTRIBUTES];
144 | CMarkup* m_pOwner;
145 | };
146 |
147 | } // namespace DuiLib
148 |
149 | #endif // __UIMARKUP_H__
150 |
--------------------------------------------------------------------------------
/include/observer_impl_base.hpp:
--------------------------------------------------------------------------------
1 | #ifndef OBSERVER_IMPL_BASE_HPP
2 | #define OBSERVER_IMPL_BASE_HPP
3 |
4 | #include