Skip to content

Commit

Permalink
Theme pragma SUPPORT_THEME_HOOKS (#11052)
Browse files Browse the repository at this point in the history
  • Loading branch information
gerhardol committed Jun 17, 2023
1 parent 84976b6 commit c7be739
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GitUI/Interops/LVGROUPW.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace System
{
#if SUPPORT_THEME_HOOKS
internal static partial class NativeMethods
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
Expand All @@ -19,4 +20,5 @@ public unsafe struct LVGROUPW
public LVGA uAlign;
}
}
#endif
}
2 changes: 2 additions & 0 deletions GitUI/Interops/LVHITTESTINFO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
internal static partial class NativeMethods
{
#if SUPPORT_THEME_HOOKS
/// <summary>
/// see http://msdn.microsoft.com/en-us/library/bb774754%28v=VS.85%29.aspx.
/// </summary>
Expand All @@ -15,5 +16,6 @@ public struct LVHITTESTINFO
// Vista/Win7+
public int iGroup;
}
#endif
}
}
2 changes: 2 additions & 0 deletions GitUI/Interops/ListViewGroupMask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ namespace System
{
internal static partial class NativeMethods
{
#if SUPPORT_THEME_HOOKS
public enum ListViewGroupMask : uint
{
None = 0x00000,
Expand All @@ -20,5 +21,6 @@ public enum ListViewGroupMask : uint
Subset = 0x08000,
SubsetItems = 0x10000
}
#endif
}
}
2 changes: 2 additions & 0 deletions GitUI/Interops/NMHDR.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace System
{
#if SUPPORT_THEME_HOOKS
internal static partial class NativeMethods
{
public struct NMHDR
Expand All @@ -9,4 +10,5 @@ public struct NMHDR
public int code;
}
}
#endif
}
2 changes: 2 additions & 0 deletions GitUI/Theming/Renderers/ButtonRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ public enum CheckBox
CBS_EXCLUDEDDISABLED = 20,
}

#if SUPPORT_THEME_HOOKS
public enum GroupBox
{
GBS_NORMAL = 1,
Expand All @@ -295,6 +296,7 @@ public enum CommandLink
CMDLGS_DISABLED = 4,
CMDLGS_DEFAULTED = 5,
}
#endif
}
}
}
4 changes: 4 additions & 0 deletions GitUI/Theming/Renderers/ComboBoxRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public enum DropDown
CBXS_DISABLED = 4,
}

#if SUPPORT_THEME_HOOKS
public enum DropDownRight
{
CBXSR_NORMAL = 1,
Expand All @@ -251,6 +252,7 @@ public enum TransparentBack
CBTBS_DISABLED = 3,
CBTBS_FOCUSED = 4,
}
#endif

public enum Border
{
Expand All @@ -268,13 +270,15 @@ public enum Readonly
CBRO_DISABLED = 4,
}

#if SUPPORT_THEME_HOOKS
public enum CueBanner
{
CBCB_NORMAL = 1,
CBCB_HOT = 2,
CBCB_PRESSED = 3,
CBCB_DISABLED = 4,
}
#endif
}
}
}
4 changes: 4 additions & 0 deletions GitUI/Theming/Renderers/EditRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,15 @@ public enum Background
EBS_ASSIST = 6,
}

#if SUPPORT_THEME_HOOKS
public enum BackgroundWithBorder
{
EBWBS_NORMAL = 1,
EBWBS_HOT = 2,
EBWBS_DISABLED = 3,
EBWBS_FOCUSED = 4,
}
#endif

public enum BorderNoScroll
{
Expand All @@ -201,6 +203,7 @@ public enum BorderNoScroll
EPSN_DISABLED = 4,
}

#if SUPPORT_THEME_HOOKS
public enum BorderHScroll
{
EPSH_NORMAL = 1,
Expand All @@ -224,6 +227,7 @@ public enum BorderHVScroll
EPSHV_FOCUSED = 3,
EPSHV_DISABLED = 4,
}
#endif
}
}
}
2 changes: 2 additions & 0 deletions GitUI/Theming/Renderers/HeaderRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public enum Item
HIS_ICONSORTEDPRESSED = 12,
}

#if SUPPORT_THEME_HOOKS
public enum ItemLeft
{
HILS_NORMAL = 1,
Expand Down Expand Up @@ -206,6 +207,7 @@ public enum DropDownFilter
HDDFS_SOFTHOT = 2,
HDDFS_HOT = 3
}
#endif

public enum SortArrow
{
Expand Down
2 changes: 2 additions & 0 deletions GitUI/Theming/Renderers/ListViewRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ public enum ExpandButton
LVEB_PUSHED = 3,
}

#if SUPPORT_THEME_HOOKS
public enum GroupHeader
{
LVGH_OPEN = 1,
Expand Down Expand Up @@ -289,6 +290,7 @@ public enum GroupHeaderLine
LVGHL_CLOSEMIXEDSELECTION = 15,
LVGHL_CLOSEMIXEDSELECTIONHOT = 16,
}
#endif

public enum ListItem
{
Expand Down
2 changes: 2 additions & 0 deletions GitUI/Theming/Renderers/ScrollBarRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ public enum ArrowButton
ABS_RIGHTHOVER = 20,
}

#if SUPPORT_THEME_HOOKS
public enum SizeBox
{
SZB_HALFBOTTOMLEFTALIGN = 6,
Expand All @@ -316,6 +317,7 @@ public enum SizeBox
SZB_TOPLEFTALIGN = 4,
SZB_TOPRIGHTALIGN = 3,
}
#endif

public enum TrackThumb
{
Expand Down
2 changes: 2 additions & 0 deletions GitUI/Theming/Renderers/SpinRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public enum Down
DNS_DISABLED = 4,
}

#if SUPPORT_THEME_HOOKS
public enum UpHorizontal
{
UPHZS_NORMAL = 1,
Expand All @@ -154,6 +155,7 @@ public enum DownHorizontal
DNHZS_PRESSED = 3,
DNHZS_DISABLED = 4,
}
#endif
}
}
}
2 changes: 2 additions & 0 deletions GitUI/Theming/Renderers/TooltipRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ private enum Parts
TTP_WRENCH = 7,
}

#if SUPPORT_THEME_HOOKS
private class State
{
public enum Close
Expand Down Expand Up @@ -93,5 +94,6 @@ public enum Wrench
TTWS_PRESSED = 3,
}
}
#endif
}
}

0 comments on commit c7be739

Please sign in to comment.