aboutsummaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/inc/thmutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/inc/thmutil.h')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inc/thmutil.h117
1 files changed, 33 insertions, 84 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/thmutil.h b/src/libs/dutil/WixToolset.DUtil/inc/thmutil.h
index cd286854..2f0bfeac 100644
--- a/src/libs/dutil/WixToolset.DUtil/inc/thmutil.h
+++ b/src/libs/dutil/WixToolset.DUtil/inc/thmutil.h
@@ -8,6 +8,7 @@ extern "C" {
8 8
9// forward declare 9// forward declare
10 10
11typedef struct _THEME_CONTROL THEME_CONTROL;
11typedef struct _THEME THEME; 12typedef struct _THEME THEME;
12 13
13#define ReleaseTheme(p) if (p) { ThemeFree(p); p = NULL; } 14#define ReleaseTheme(p) if (p) { ThemeFree(p); p = NULL; }
@@ -194,11 +195,12 @@ struct THEME_ASSIGN_CONTROL_ID
194{ 195{
195 WORD wId; // id to apply to control 196 WORD wId; // id to apply to control
196 LPCWSTR wzName; // name of control to match 197 LPCWSTR wzName; // name of control to match
198 const THEME_CONTROL** ppControl;
197}; 199};
198 200
199const WORD THEME_FIRST_ASSIGN_CONTROL_ID = 0x4000; // Recommended first control id to be assigned. 201const WORD THEME_FIRST_ASSIGN_CONTROL_ID = 0x4000; // Recommended first control id to be assigned.
200 202
201struct THEME_CONTROL 203typedef struct _THEME_CONTROL
202{ 204{
203 THEME_CONTROL_TYPE type; 205 THEME_CONTROL_TYPE type;
204 206
@@ -296,7 +298,7 @@ struct THEME_CONTROL
296 HWND hWnd; 298 HWND hWnd;
297 DWORD dwData; // type specific data 299 DWORD dwData; // type specific data
298 THEME* pTheme; 300 THEME* pTheme;
299}; 301} THEME_CONTROL;
300 302
301 303
302struct THEME_IMAGELIST 304struct THEME_IMAGELIST
@@ -580,8 +582,7 @@ HRESULT DAPI ThemeLoadStrings(
580 582
581 *******************************************************************/ 583 *******************************************************************/
582HRESULT DAPI ThemeLoadRichEditFromFile( 584HRESULT DAPI ThemeLoadRichEditFromFile(
583 __in THEME* pTheme, 585 __in const THEME_CONTROL* pThemeControl,
584 __in DWORD dwControl,
585 __in_z LPCWSTR wzFileName, 586 __in_z LPCWSTR wzFileName,
586 __in HMODULE hModule 587 __in HMODULE hModule
587 ); 588 );
@@ -591,19 +592,7 @@ HRESULT DAPI ThemeLoadRichEditFromFile(
591 592
592 *******************************************************************/ 593 *******************************************************************/
593HRESULT DAPI ThemeLoadRichEditFromResource( 594HRESULT DAPI ThemeLoadRichEditFromResource(
594 __in THEME* pTheme, 595 __in const THEME_CONTROL* pThemeControl,
595 __in DWORD dwControl,
596 __in_z LPCSTR szResourceName,
597 __in HMODULE hModule
598 );
599
600/********************************************************************
601 ThemeLoadRichEditFromResourceToHWnd - Attach a richedit control (by
602 HWND) to resource data.
603
604 *******************************************************************/
605HRESULT DAPI ThemeLoadRichEditFromResourceToHWnd(
606 __in HWND hWnd,
607 __in_z LPCSTR szResourceName, 596 __in_z LPCSTR szResourceName,
608 __in HMODULE hModule 597 __in HMODULE hModule
609 ); 598 );
@@ -682,18 +671,28 @@ ThemeShowChild - shows a control's specified child control, hiding the rest.
682 671
683*******************************************************************/ 672*******************************************************************/
684void DAPI ThemeShowChild( 673void DAPI ThemeShowChild(
685 __in THEME* pTheme,
686 __in THEME_CONTROL* pParentControl, 674 __in THEME_CONTROL* pParentControl,
687 __in DWORD dwIndex 675 __in DWORD dwIndex
688 ); 676 );
689 677
690/******************************************************************** 678/********************************************************************
691 ThemeControlExists - check if a control with the specified id exists. 679 ThemeControlExistsByHwnd - check if a control with the specified hWnd exists.
680
681 *******************************************************************/
682BOOL DAPI ThemeControlExistsByHWnd(
683 __in const THEME* pTheme,
684 __in HWND hWnd,
685 __out_opt const THEME_CONTROL** ppThemeControl
686 );
687
688/********************************************************************
689 ThemeControlExistsById - check if a control with the specified id exists.
692 690
693 *******************************************************************/ 691 *******************************************************************/
694BOOL DAPI ThemeControlExists( 692BOOL DAPI ThemeControlExistsById(
695 __in const THEME* pTheme, 693 __in const THEME* pTheme,
696 __in DWORD dwControl 694 __in WORD wId,
695 __out_opt const THEME_CONTROL** ppThemeControl
697 ); 696 );
698 697
699/******************************************************************** 698/********************************************************************
@@ -701,8 +700,7 @@ BOOL DAPI ThemeControlExists(
701 700
702 *******************************************************************/ 701 *******************************************************************/
703void DAPI ThemeControlEnable( 702void DAPI ThemeControlEnable(
704 __in THEME* pTheme, 703 __in const THEME_CONTROL* pThemeControl,
705 __in DWORD dwControl,
706 __in BOOL fEnable 704 __in BOOL fEnable
707 ); 705 );
708 706
@@ -711,8 +709,7 @@ void DAPI ThemeControlEnable(
711 709
712 *******************************************************************/ 710 *******************************************************************/
713BOOL DAPI ThemeControlEnabled( 711BOOL DAPI ThemeControlEnabled(
714 __in THEME* pTheme, 712 __in const THEME_CONTROL* pThemeControl
715 __in DWORD dwControl
716 ); 713 );
717 714
718/******************************************************************** 715/********************************************************************
@@ -720,8 +717,7 @@ BOOL DAPI ThemeControlEnabled(
720 717
721 *******************************************************************/ 718 *******************************************************************/
722void DAPI ThemeControlElevates( 719void DAPI ThemeControlElevates(
723 __in THEME* pTheme, 720 __in const THEME_CONTROL* pThemeControl,
724 __in DWORD dwControl,
725 __in BOOL fElevates 721 __in BOOL fElevates
726 ); 722 );
727 723
@@ -730,8 +726,7 @@ void DAPI ThemeControlElevates(
730 726
731 *******************************************************************/ 727 *******************************************************************/
732void DAPI ThemeShowControl( 728void DAPI ThemeShowControl(
733 __in THEME* pTheme, 729 __in const THEME_CONTROL* pThemeControl,
734 __in DWORD dwControl,
735 __in int nCmdShow 730 __in int nCmdShow
736 ); 731 );
737 732
@@ -741,8 +736,7 @@ conditional text and notes.
741 736
742*******************************************************************/ 737*******************************************************************/
743void DAPI ThemeShowControlEx( 738void DAPI ThemeShowControlEx(
744 __in THEME* pTheme, 739 __in const THEME_CONTROL* pThemeControl,
745 __in DWORD dwControl,
746 __in int nCmdShow 740 __in int nCmdShow
747 ); 741 );
748 742
@@ -751,24 +745,7 @@ void DAPI ThemeShowControlEx(
751 745
752 *******************************************************************/ 746 *******************************************************************/
753BOOL DAPI ThemeControlVisible( 747BOOL DAPI ThemeControlVisible(
754 __in THEME* pTheme, 748 __in const THEME_CONTROL* pThemeControl
755 __in DWORD dwControl
756 );
757
758BOOL DAPI ThemePostControlMessage(
759 __in THEME* pTheme,
760 __in DWORD dwControl,
761 __in UINT Msg,
762 __in WPARAM wParam,
763 __in LPARAM lParam
764 );
765
766LRESULT DAPI ThemeSendControlMessage(
767 __in const THEME* pTheme,
768 __in DWORD dwControl,
769 __in UINT Msg,
770 __in WPARAM wParam,
771 __in LPARAM lParam
772 ); 749 );
773 750
774/******************************************************************** 751/********************************************************************
@@ -790,34 +767,12 @@ HRESULT DAPI ThemeDrawControl(
790 ); 767 );
791 768
792/******************************************************************** 769/********************************************************************
793 ThemeHoverControl - mark a control as hover.
794
795*******************************************************************/
796BOOL DAPI ThemeHoverControl(
797 __in THEME* pTheme,
798 __in HWND hwndParent,
799 __in HWND hwndControl
800 );
801
802/********************************************************************
803 ThemeIsControlChecked - gets whether a control is checked. Only 770 ThemeIsControlChecked - gets whether a control is checked. Only
804 really useful for checkbox controls. 771 really useful for checkbox controls.
805 772
806*******************************************************************/ 773*******************************************************************/
807BOOL DAPI ThemeIsControlChecked( 774BOOL DAPI ThemeIsControlChecked(
808 __in THEME* pTheme, 775 __in const THEME_CONTROL* pThemeControl
809 __in DWORD dwControl
810 );
811
812/********************************************************************
813 ThemeSetControlColor - sets the color of text for a control.
814
815*******************************************************************/
816BOOL DAPI ThemeSetControlColor(
817 __in THEME* pTheme,
818 __in HDC hdc,
819 __in HWND hWnd,
820 __out HBRUSH* phBackgroundBrush
821 ); 776 );
822 777
823/******************************************************************** 778/********************************************************************
@@ -826,8 +781,7 @@ BOOL DAPI ThemeSetControlColor(
826 781
827*******************************************************************/ 782*******************************************************************/
828HRESULT DAPI ThemeSetProgressControl( 783HRESULT DAPI ThemeSetProgressControl(
829 __in THEME* pTheme, 784 __in const THEME_CONTROL* pThemeControl,
830 __in DWORD dwControl,
831 __in DWORD dwProgressPercentage 785 __in DWORD dwProgressPercentage
832 ); 786 );
833 787
@@ -837,8 +791,7 @@ HRESULT DAPI ThemeSetProgressControl(
837 791
838*******************************************************************/ 792*******************************************************************/
839HRESULT DAPI ThemeSetProgressControlColor( 793HRESULT DAPI ThemeSetProgressControlColor(
840 __in THEME* pTheme, 794 __in const THEME_CONTROL* pThemeControl,
841 __in DWORD dwControl,
842 __in DWORD dwColorIndex 795 __in DWORD dwColorIndex
843 ); 796 );
844 797
@@ -847,8 +800,7 @@ HRESULT DAPI ThemeSetProgressControlColor(
847 800
848*******************************************************************/ 801*******************************************************************/
849HRESULT DAPI ThemeSetTextControl( 802HRESULT DAPI ThemeSetTextControl(
850 __in const THEME* pTheme, 803 __in const THEME_CONTROL* pThemeControl,
851 __in DWORD dwControl,
852 __in_z_opt LPCWSTR wzText 804 __in_z_opt LPCWSTR wzText
853 ); 805 );
854 806
@@ -858,8 +810,7 @@ ThemeSetTextControl - sets the text of a control and optionally
858 810
859*******************************************************************/ 811*******************************************************************/
860HRESULT DAPI ThemeSetTextControlEx( 812HRESULT DAPI ThemeSetTextControlEx(
861 __in const THEME* pTheme, 813 __in const THEME_CONTROL* pThemeControl,
862 __in DWORD dwControl,
863 __in BOOL fUpdate, 814 __in BOOL fUpdate,
864 __in_z_opt LPCWSTR wzText 815 __in_z_opt LPCWSTR wzText
865 ); 816 );
@@ -869,8 +820,7 @@ HRESULT DAPI ThemeSetTextControlEx(
869 820
870*******************************************************************/ 821*******************************************************************/
871HRESULT DAPI ThemeGetTextControl( 822HRESULT DAPI ThemeGetTextControl(
872 __in const THEME* pTheme, 823 __in const THEME_CONTROL* pThemeControl,
873 __in DWORD dwControl,
874 __inout_z LPWSTR* psczText 824 __inout_z LPWSTR* psczText
875 ); 825 );
876 826
@@ -889,8 +839,7 @@ HRESULT DAPI ThemeUpdateCaption(
889 839
890*******************************************************************/ 840*******************************************************************/
891void DAPI ThemeSetFocus( 841void DAPI ThemeSetFocus(
892 __in THEME* pTheme, 842 __in const THEME_CONTROL* pThemeControl
893 __in DWORD dwControl
894 ); 843 );
895 844
896#ifdef __cplusplus 845#ifdef __cplusplus