summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2007-06-15 15:25:50 +0000
committerHans Breuer <hans@src.gnome.org>2007-06-15 15:25:50 +0000
commit49fc7e15ee345fbae8960dfc2c4437364f8acb50 (patch)
tree32a2f75541c52b2ddc8e8841a847821aea9c2353
parentb2dea46b691e4e4d990e36ba4a71d0dcabb86890 (diff)
downloadgtk+-49fc7e15ee345fbae8960dfc2c4437364f8acb50.tar.gz
updated explicit usage of RegisterClassExW to match the WNDCLASSEXW. True
2007-06-15 Hans Breuer <hans@breuer.org> * gtk/makefile.msc.in tests/makefile.msc : updated * gdk/win32/gdkwindow-win32.c : explicit usage of RegisterClassExW to match the WNDCLASSEXW. True dynamic linking of SetLayeredWindowAttributes * tests/testprint.c tests/testnouiprint.c : use G_PI svn path=/trunk/; revision=18140
-rw-r--r--ChangeLog8
-rw-r--r--gdk/win32/gdkwindow-win32.c24
-rw-r--r--gtk/makefile.msc.in19
-rw-r--r--tests/makefile.msc63
-rw-r--r--tests/testnouiprint.c2
-rw-r--r--tests/testprint.c2
6 files changed, 63 insertions, 55 deletions
diff --git a/ChangeLog b/ChangeLog
index d3227ca064..8e9869c709 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-06-15 Hans Breuer <hans@breuer.org>
+
+ * gtk/makefile.msc.in tests/makefile.msc : updated
+ * gdk/win32/gdkwindow-win32.c : explicit usage of RegisterClassExW
+ to match the WNDCLASSEXW.
+ True dynamic linking of SetLayeredWindowAttributes
+ * tests/testprint.c tests/testnouiprint.c : use G_PI
+
2007-06-14 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtk.symbols: Add missing symbol
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index ae0b7314d8..b3baab5afe 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -420,7 +420,7 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
{
if (klassTEMPSHADOW == 0)
{
- wcl.lpszClassName = "gdkWindowTempShadow";
+ wcl.lpszClassName = L"gdkWindowTempShadow";
wcl.style |= CS_SAVEBITS;
if (LOBYTE (g_win32_get_windows_version()) > 0x05 ||
LOWORD (g_win32_get_windows_version()) == 0x0105)
@@ -429,7 +429,7 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
wcl.style |= 0x00020000; /* CS_DROPSHADOW */
}
ONCE_PER_CLASS ();
- klassTEMPSHADOW = RegisterClassEx (&wcl);
+ klassTEMPSHADOW = RegisterClassExW (&wcl);
}
klass = klassTEMPSHADOW;
@@ -438,10 +438,10 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
{
if (klassTEMP == 0)
{
- wcl.lpszClassName = "gdkWindowTemp";
+ wcl.lpszClassName = L"gdkWindowTemp";
wcl.style |= CS_SAVEBITS;
ONCE_PER_CLASS ();
- klassTEMP = RegisterClassEx (&wcl);
+ klassTEMP = RegisterClassExW (&wcl);
}
klass = klassTEMP;
@@ -3551,6 +3551,8 @@ gdk_window_set_opacity (GdkWindow *window,
gdouble opacity)
{
LONG exstyle;
+ typedef BOOL (*PFN_SetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD);
+ PFN_SetLayeredWindowAttributes setLayeredWindowAttributes = NULL;
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (WINDOW_IS_TOPLEVEL (window));
@@ -3570,10 +3572,16 @@ gdk_window_set_opacity (GdkWindow *window,
GWL_EXSTYLE,
exstyle | WS_EX_LAYERED));
- API_CALL (SetLayeredWindowAttributes, (GDK_WINDOW_HWND (window),
- 0,
- opacity * 0xff,
- LWA_ALPHA));
+ setLayeredWindowAttributes =
+ (PFN_SetLayeredWindowAttributes)GetProcAddress (GetModuleHandle ("user32.dll"), "SetLayeredWindowAttributes");
+
+ if (setLayeredWindowAttributes)
+ {
+ API_CALL (setLayeredWindowAttributes, (GDK_WINDOW_HWND (window),
+ 0,
+ opacity * 0xff,
+ LWA_ALPHA));
+ }
}
void
diff --git a/gtk/makefile.msc.in b/gtk/makefile.msc.in
index 6121ce4a7d..412e2c0a88 100644
--- a/gtk/makefile.msc.in
+++ b/gtk/makefile.msc.in
@@ -39,7 +39,8 @@ DEFINES = \
-DGTK_HOST=\"win32\" \
-DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED \
-DGTK_PRINT_BACKENDS=\"file,lpr\" \
- -DGTK_PRINT_PREVIEW_COMMAND="\"evince --unlink-tempfile --preview %f\""
+ -DGTK_PRINT_PREVIEW_COMMAND="\"evince --unlink-tempfile --preview %f\"" \
+ -DGTK_LIBDIR=\"/magic/path/replaced/at/runtime\"
TOUCH = copy makefile.msc+nul
@@ -161,6 +162,7 @@ gtk_OBJECTS = \
gtkhseparator.obj \
gtkhsv.obj \
gtkiconcache.obj \
+ gtkiconcachevalidator.obj \
gtkiconfactory.obj \
gtkicontheme.obj \
gtkiconview.obj \
@@ -214,6 +216,7 @@ gtk_OBJECTS = \
gtkprintutils.obj \
gtkprogress.obj \
gtkprogressbar.obj \
+ gtkquery.obj \
gtkradioaction.obj \
gtkradiobutton.obj \
gtkradiotoolbutton.obj \
@@ -221,6 +224,7 @@ gtk_OBJECTS = \
gtkrange.obj \
gtkrbtree.obj \
gtkrc.obj \
+ gtkrecentaction.obj \
gtkrecentchooserdefault.obj \
gtkrecentchooserdialog.obj \
gtkrecentchoosermenu.obj \
@@ -231,13 +235,17 @@ gtk_OBJECTS = \
gtkrecentmanager.obj \
gtkruler.obj \
gtkscale.obj \
+ gtkscalebutton.obj \
gtkscrollbar.obj \
gtkscrolledwindow.obj \
+ gtksearchengine.obj \
+ gtksearchenginebeagle.obj \
+ gtksearchenginesimple.obj \
+ gtksearchenginetracker.obj \
gtkselection.obj \
gtkseparator.obj \
gtkseparatormenuitem.obj \
gtkseparatortoolitem.obj \
- gtksequence.obj \
gtksettings.obj \
gtksignal.obj \
gtksizegroup.obj \
@@ -274,6 +282,7 @@ gtk_OBJECTS = \
gtktoolbar.obj \
gtktoolbutton.obj \
gtktoolitem.obj \
+ gtktooltip.obj \
gtktooltips.obj \
gtktrayicon-win32.obj \
gtktree.obj \
@@ -294,6 +303,7 @@ gtk_OBJECTS = \
gtkvbbox.obj \
gtkvbox.obj \
gtkviewport.obj \
+ gtkvolumebutton.obj \
gtkvpaned.obj \
gtkvruler.obj \
gtkvscale.obj \
@@ -424,12 +434,14 @@ gtk_public_h_sources = \
gtkprivate.h \
gtkprogress.h \
gtkprogressbar.h \
+ gtkquery.h \
gtkradioaction.h \
gtkradiobutton.h \
gtkradiomenuitem.h \
gtkradiotoolbutton.h \
gtkrange.h \
gtkrc.h \
+ gtkrecentaction.h \
gtkrecentchooser.h \
gtkrecentchooserdialog.h \
gtkrecentchoosermenu.h \
@@ -438,8 +450,10 @@ gtk_public_h_sources = \
gtkrecentmanager.h \
gtkruler.h \
gtkscale.h \
+ gtkscalebutton.h \
gtkscrollbar.h \
gtkscrolledwindow.h \
+ gtksearchengine.h \
gtkselection.h \
gtkseparator.h \
gtkseparatormenuitem.h \
@@ -490,6 +504,7 @@ gtk_public_h_sources = \
gtkvbbox.h \
gtkvbox.h \
gtkviewport.h \
+ gtkvolumebutton.h \
gtkvpaned.h \
gtkvruler.h \
gtkvscale.h \
diff --git a/tests/makefile.msc b/tests/makefile.msc
index f849a82c43..2db726f867 100644
--- a/tests/makefile.msc
+++ b/tests/makefile.msc
@@ -41,22 +41,24 @@ all : \
#
TESTAPPS = \
autotestfilechooser floatingtest \
- testaccel testactions \
+ testaccel testactions testassistant \
+ testbbox \
testcairo testcalendar testcellrenderertext testcombo testcombochange \
testdnd \
testellipsise testentrycompletion \
testfilechooser testfilechooserbutton \
- testgtk \
+ testgrouping testgtk \
testicontheme testiconview testimage testinput \
testmenus testmenubars testmerge testmultidisplay testmultiscreen \
- testnotebookdnd \
- testrecentchooser testrgb \
+ testnouiprint testnotebookdnd \
+ testprint \
+ testrecentchooser testrecentchoosermenu testrgb testrichtext \
testselection testspinbutton \
- testtext testtextbuffer testtoolbar \
+ testtext testtextbuffer testtoolbar testtooltips \
testtreecolumns testtreeedit testtreeflow testtreefocus \
- testtreesort testtreeview treestoretest \
+ testtreemodel testtreesort testtreeview treestoretest \
testsocket testsocket_child teststatusicon \
- testthreads testxinerama \
+ testthreads testvolumebutton testxinerama \
simple
# syntax error : illegal character '-' in macro
@@ -71,25 +73,20 @@ one-test-app:
!ELSE
-!IFDEF EXTRA_testcairo
-EXTRA_LIBS = $(CAIRO_LIBS)
-!ENDIF
-
-!IFDEF EXTRA_testentrycompletion
EXTRA_OBJETCS = prop-editor.obj
-!ENDIF
-!IFDEF EXTRA_testfilechooserbutton
-EXTRA_OBJETCS = prop-editor.obj
+
+!IFDEF EXTRA_testprint
+EXTRA_OBJETCS = testprintfileoperation.obj
+EXTRA_LIBS = $(PANGOCAIRO_LIBS)
!ENDIF
-!IFDEF EXTRA_testgtk
-EXTRA_LIBS = $(CAIRO_LIBS)
-EXTRA_OBJETCS = prop-editor.obj
+!IFDEF EXTRA_testnouiprint
+EXTRA_LIBS = $(PANGOCAIRO_LIBS)
!ENDIF
-!IFDEF EXTRA_testiconview
-EXTRA_OBJETCS = prop-editor.obj
+!IFDEF EXTRA_testfilechooser
+EXTRA_LIBS = gdi32.lib user32.lib shell32.lib
!ENDIF
!IFDEF EXTRA_testsocket
@@ -100,29 +97,9 @@ EXTRA_OBJETCS = testsocket_common.obj
EXTRA_OBJETCS = testsocket_common.obj
!ENDIF
-!IFDEF EXTRA_testrecentchooser
-EXTRA_OBJETCS = prop-editor.obj
-!ENDIF
-
-!IFDEF EXTRA_testtreeview
-EXTRA_OBJETCS = prop-editor.obj
-!ENDIF
-
-!IFDEF EXTRA_testtext
-EXTRA_OBJETCS = prop-editor.obj
-!ENDIF
-
-!IFDEF EXTRA_testtoolbar
-EXTRA_OBJETCS = prop-editor.obj
-!ENDIF
-
-!IFDEF EXTRA_testfilechooser
-EXTRA_OBJETCS = prop-editor.obj
-EXTRA_LIBS = gdi32.lib user32.lib shell32.lib
-!ENDIF
-
-$(TESTAPP).exe : ../gtk/gtk-win32-$(GTK_VER).lib $(TESTAPP).obj
- $(CC) $(CFLAGS) $(TESTAPP).obj $(EXTRA_OBJETCS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(EXTRA_LIBS) $(LDFLAGS)
+$(TESTAPP).exe : ../gtk/gtk-win32-$(GTK_VER).lib $(TESTAPP).obj $(EXTRA_OBJETCS)
+ $(CC) $(CFLAGS) $(TESTAPP).obj $(EXTRA_OBJETCS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) \
+ $(PANGO_LIBS) $(GLIB_LIBS) $(CAIRO_LIBS) $(EXTRA_LIBS) $(LDFLAGS)
$(TESTAPP).obj : $(TESTAPP).c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"$(TESTAPP)\" $(TESTAPP).c
diff --git a/tests/testnouiprint.c b/tests/testnouiprint.c
index 1c39ae9a7c..09a678f375 100644
--- a/tests/testnouiprint.c
+++ b/tests/testnouiprint.c
@@ -42,7 +42,7 @@ draw_page (GtkPrintOperation *operation,
/* Draw some lines */
cairo_move_to (cr, 20, 10);
cairo_line_to (cr, 40, 20);
- cairo_arc (cr, 60, 60, 20, 0, M_PI);
+ cairo_arc (cr, 60, 60, 20, 0, G_PI);
cairo_line_to (cr, 80, 20);
cairo_set_source_rgb (cr, 0, 0, 0);
diff --git a/tests/testprint.c b/tests/testprint.c
index e39c3a9914..1da7af97d9 100644
--- a/tests/testprint.c
+++ b/tests/testprint.c
@@ -62,7 +62,7 @@ draw_page (GtkPrintOperation *operation,
/* Draw some lines */
cairo_move_to (cr, 20, 10);
cairo_line_to (cr, 40, 20);
- cairo_arc (cr, 60, 60, 20, 0, M_PI);
+ cairo_arc (cr, 60, 60, 20, 0, G_PI);
cairo_line_to (cr, 80, 20);
cairo_set_source_rgb (cr, 0, 0, 0);