mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
IsThemeActive and dfns->defs
This commit is contained in:
parent
231f83cfa2
commit
2b7bd1f817
@ -1,17 +1,31 @@
|
||||
2003-10-07 Raymond Penners <raymond@dotsphinx.com>
|
||||
|
||||
* src/xp_theme.c: We now properly use IsThemeActive().
|
||||
|
||||
* src/xp_theme_defs.h: Renamed from xp_theme_dfns.h
|
||||
|
||||
2003-10-06 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style_main.c: Catch system settings changes, disable theme and color changes as they're too experimental
|
||||
* src/wimp_style_main.c: Catch system settings changes, disable
|
||||
theme and color changes as they're too experimental
|
||||
|
||||
* src/wimp_style.[ch]: Export some things, make them accept 0 args
|
||||
* src/xp_theme_dfns.h: New file. WinXP's UXTHEME constants, for building on platforms without them
|
||||
* src/xp_theme.c: Should be able to build on Win32 != [WinXP,2k3] now
|
||||
|
||||
* src/xp_theme_dfns.h: New file. WinXP's UXTHEME constants, for
|
||||
building on platforms without them
|
||||
|
||||
* src/xp_theme.c: Should be able to build on Win32 != [WinXP,2k3]
|
||||
now
|
||||
|
||||
2003-10-03 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c wimp_style_main.c: Refactor how we're doing styles. Much faster, lower memory consumption
|
||||
* src/wimp_style.c wimp_style_main.c: Refactor how we're doing
|
||||
styles. Much faster, lower memory consumption
|
||||
|
||||
2003-10-03 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style_main.c: Catch theme and color changes. Needs more testing and fine-tuning
|
||||
* src/wimp_style_main.c: Catch theme and color changes. Needs more
|
||||
testing and fine-tuning
|
||||
|
||||
2003-10-02 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
@ -19,8 +33,9 @@
|
||||
|
||||
2003-10-01 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
* src/wimp_style.c: Only set the delays if the param is installed. Silly gtk -
|
||||
installing those 3 params only in the menus...
|
||||
* src/wimp_style.c: Only set the delays if the param is
|
||||
installed. Silly gtk - installing those 3 params only in the
|
||||
menus...
|
||||
|
||||
2003-09-25 Dom Lachowicz <cinamod@hotmail.com>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
/* MS defines this when it includes its schema definitions */
|
||||
#ifndef TMSCHEMA_H
|
||||
#include "xp_theme_dfns.h"
|
||||
#include "xp_theme_defs.h"
|
||||
#endif
|
||||
|
||||
static const LPCWSTR class_descriptors[] =
|
||||
@ -109,12 +109,14 @@ typedef HRESULT (FAR PASCAL *DrawThemeBackgroundFunc)
|
||||
(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
|
||||
const RECT *pRect, const RECT *pClipRect);
|
||||
typedef HRESULT (FAR PASCAL *EnableThemeDialogTextureFunc)(HWND hwnd, DWORD dwFlags);
|
||||
typedef BOOL (FAR PASCAL *IsThemeActiveFunc)(VOID);
|
||||
|
||||
static GetThemeSysFontFunc get_theme_sys_font_func = NULL;
|
||||
static OpenThemeDataFunc open_theme_data_func = NULL;
|
||||
static CloseThemeDataFunc close_theme_data_func = NULL;
|
||||
static DrawThemeBackgroundFunc draw_theme_background_func = NULL;
|
||||
static EnableThemeDialogTextureFunc enable_theme_dialog_texture_func = NULL;
|
||||
static IsThemeActiveFunc is_theme_active_func = NULL;
|
||||
|
||||
void
|
||||
xp_theme_init(void)
|
||||
@ -125,6 +127,7 @@ xp_theme_init(void)
|
||||
uxtheme_dll = LoadLibrary("uxtheme.dll");
|
||||
memset(open_themes, 0, sizeof(open_themes));
|
||||
|
||||
is_theme_active_func = (IsThemeActiveFunc) GetProcAddress(uxtheme_dll, "IsThemeActive");
|
||||
open_theme_data_func = (OpenThemeDataFunc) GetProcAddress(uxtheme_dll, "OpenThemeData");
|
||||
close_theme_data_func = (CloseThemeDataFunc) GetProcAddress(uxtheme_dll, "CloseThemeData");
|
||||
draw_theme_background_func = (DrawThemeBackgroundFunc) GetProcAddress(uxtheme_dll, "DrawThemeBackground");
|
||||
@ -152,6 +155,7 @@ xp_theme_exit(void)
|
||||
FreeLibrary(uxtheme_dll);
|
||||
uxtheme_dll = NULL;
|
||||
|
||||
is_theme_active_func = NULL;
|
||||
open_theme_data_func = NULL;
|
||||
close_theme_data_func = NULL;
|
||||
draw_theme_background_func = NULL;
|
||||
@ -642,7 +646,7 @@ xp_theme_draw(GdkWindow *win, XpThemeElement element, GtkStyle *style,
|
||||
gboolean
|
||||
xp_theme_is_drawable(XpThemeElement element)
|
||||
{
|
||||
if (uxtheme_dll)
|
||||
if (is_theme_active_func && (*is_theme_active_func)())
|
||||
{
|
||||
return (xp_theme_get_handle_by_element(element) != NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user