Commit 49fc7e15 authored by Hans Breuer's avatar Hans Breuer Committed by Hans Breuer

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
parent b2dea46b
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
......
......@@ -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
......
......@@ -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 \
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment