]> Pileus Git - ~andy/gtk/commitdiff
updated
authorHans Breuer <hans@breuer.org>
Sun, 21 Nov 2004 21:01:28 +0000 (21:01 +0000)
committerHans Breuer <hans@src.gnome.org>
Sun, 21 Nov 2004 21:01:28 +0000 (21:01 +0000)
2004-11-21  Hans Breuer  <hans@breuer.org>

* gdk/makefile.msc.in gtk/stock-icons/makefile.msc
  gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in : updated

* gdk/win32/gdkdrawable-win32.c : implement gdk_win32_draw_glyphs_transformed()
* gdk/win32/gdkgc-win32.c : implement _gdk_windowing_gc_get_foreground()

* demos/gtk-demo/rotated_text.c : use G_PI

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
demos/gtk-demo/makefile.msc.in
demos/gtk-demo/rotated_text.c
gdk/makefile.msc
gdk/win32/gdkdrawable-win32.c
gdk/win32/gdkgc-win32.c
gtk/stock-icons/makefile.msc

index 826dbed0cee3ad09086a1a9f034821c851cd4083..e789b4fc17081ebdd7de088d4ef6786e739aaee8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-11-21  Hans Breuer  <hans@breuer.org>
+
+       * gdk/makefile.msc.in gtk/stock-icons/makefile.msc 
+         gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in : updated
+
+       * gdk/win32/gdkdrawable-win32.c : implement gdk_win32_draw_glyphs_transformed()
+       * gdk/win32/gdkgc-win32.c : implement _gdk_windowing_gc_get_foreground()
+
+       * demos/gtk-demo/rotated_text.c : use G_PI
+
 Sat Nov 20 15:13:51 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of 
index 826dbed0cee3ad09086a1a9f034821c851cd4083..e789b4fc17081ebdd7de088d4ef6786e739aaee8 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-21  Hans Breuer  <hans@breuer.org>
+
+       * gdk/makefile.msc.in gtk/stock-icons/makefile.msc 
+         gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in : updated
+
+       * gdk/win32/gdkdrawable-win32.c : implement gdk_win32_draw_glyphs_transformed()
+       * gdk/win32/gdkgc-win32.c : implement _gdk_windowing_gc_get_foreground()
+
+       * demos/gtk-demo/rotated_text.c : use G_PI
+
 Sat Nov 20 15:13:51 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of 
index 826dbed0cee3ad09086a1a9f034821c851cd4083..e789b4fc17081ebdd7de088d4ef6786e739aaee8 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-21  Hans Breuer  <hans@breuer.org>
+
+       * gdk/makefile.msc.in gtk/stock-icons/makefile.msc 
+         gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in : updated
+
+       * gdk/win32/gdkdrawable-win32.c : implement gdk_win32_draw_glyphs_transformed()
+       * gdk/win32/gdkgc-win32.c : implement _gdk_windowing_gc_get_foreground()
+
+       * demos/gtk-demo/rotated_text.c : use G_PI
+
 Sat Nov 20 15:13:51 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of 
index 826dbed0cee3ad09086a1a9f034821c851cd4083..e789b4fc17081ebdd7de088d4ef6786e739aaee8 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-21  Hans Breuer  <hans@breuer.org>
+
+       * gdk/makefile.msc.in gtk/stock-icons/makefile.msc 
+         gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in : updated
+
+       * gdk/win32/gdkdrawable-win32.c : implement gdk_win32_draw_glyphs_transformed()
+       * gdk/win32/gdkgc-win32.c : implement _gdk_windowing_gc_get_foreground()
+
+       * demos/gtk-demo/rotated_text.c : use G_PI
+
 Sat Nov 20 15:13:51 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of 
index 4b83874b0047f071b236f9e7eb946fd52206b93e..f4d857c610860cd07f2270bfcfd13fb75d49982a 100644 (file)
@@ -52,6 +52,7 @@ DEMOS = \
        menus.c         \
        panes.c         \
        pixbufs.c               \
+       rotated_text.c  \
        sizegroup.c     \
        stock_browser.c \
        textview.c      \
@@ -80,6 +81,7 @@ OBJECTS = \
        menus.obj               \
        panes.obj               \
        pixbufs.obj     \
+       rotated_text.obj \
        sizegroup.obj   \
        stock_browser.obj       \
        textview.obj    \
index 1c37548dd256a930c58d8afbaa3eb72d50b80753..550101eda4ab22a3965f17e95151d053c821f5e5 100644 (file)
@@ -68,7 +68,7 @@ rotated_text_expose_event (GtkWidget      *widget,
       double angle = (360. * i) / N_WORDS;
 
       /* Gradient from red at angle == 60 to blue at angle == 300 */
-      color.red   = 65535 * (1 + cos ((angle - 60) * M_PI / 180.)) / 2;
+      color.red   = 65535 * (1 + cos ((angle - 60) * G_PI / 180.)) / 2;
       color.green = 0;
       color.blue  = 65535  - color.red;
     
index ef3cec5278d899b935505235b243b998c65a513c..fee146e148d77ad559911ef3e3a4fdadec5be23e 100644 (file)
@@ -148,7 +148,7 @@ gdkalias.h: gdk.symbols
 
 gdk.def: gdk.symbols
        echo EXPORTS > gdk.def
-       cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 gdk.symbols >> gdk.def
+       cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DGDK_WINDOWING_WIN32 gdk.symbols >> gdk.def
 
 libgdk-win32-$(GTK_VER)-0.dll : $(gdk_OBJECTS) gdk.def win32\gdk-win32.lib
        $(CC) $(CFLAGS) -LD -Fe$@ $(gdk_OBJECTS) win32\gdk-win32.lib $(EXTRALIBS) \
index bea0b0e909c21522d20d1e93c8338377a51df6c8..bdabde03832fa24811a6a12b2bd3576c6b851958 100644 (file)
@@ -1,6 +1,7 @@
 /* GDK - The GIMP Drawing Kit
  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * Copyright (C) 1998-2002 Tor Lillqvist
+ * Copyright (C) 1998-2004 Tor Lillqvist
+ * Copyright (C) 2001-2004 Hans Breuer
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -105,6 +106,13 @@ static void gdk_win32_draw_glyphs    (GdkDrawable      *drawable,
                                      gint              x,
                                      gint              y,
                                      PangoGlyphString *glyphs);
+static void gdk_win32_draw_glyphs_transformed (GdkDrawable      *drawable,
+                                            GdkGC            *gc,
+                                            PangoMatrix      *matrix,
+                                            PangoFont        *font,
+                                            gint              x,
+                                            gint              y,
+                                            PangoGlyphString *glyphs);
 static void gdk_win32_draw_image     (GdkDrawable     *drawable,
                                      GdkGC           *gc,
                                      GdkImage        *image,
@@ -181,6 +189,7 @@ gdk_drawable_impl_win32_class_init (GdkDrawableImplWin32Class *klass)
   drawable_class->draw_segments = gdk_win32_draw_segments;
   drawable_class->draw_lines = gdk_win32_draw_lines;
   drawable_class->draw_glyphs = gdk_win32_draw_glyphs;
+  drawable_class->draw_glyphs_transformed = gdk_win32_draw_glyphs_transformed;
   drawable_class->draw_image = gdk_win32_draw_image;
   
   drawable_class->set_colormap = gdk_win32_set_colormap;
@@ -1439,6 +1448,31 @@ draw_glyphs (GdkGCWin32 *gcwin32,
   pango_win32_render (hdc, font, glyphs, x, y);
 }
 
+static void
+draw_glyphs_transformed (GdkGCWin32 *gcwin32,
+                          HDC         hdc,
+                          gint        x_offset,
+                          gint        y_offset,
+                          va_list     args)
+{
+  PangoFont *font;
+  gint x;
+  gint y;
+  PangoGlyphString *glyphs;
+  PangoMatrix *matrix;
+
+  matrix = va_arg(args, PangoMatrix *);
+  font = va_arg (args, PangoFont *);
+  x = va_arg (args, gint);
+  y = va_arg (args, gint);
+  glyphs = va_arg (args, PangoGlyphString *);
+
+  x -= x_offset;
+  y -= y_offset;
+
+  pango_win32_render_transformed (hdc, matrix, font, glyphs, x, y);
+}
+
 static void
 gdk_win32_draw_glyphs (GdkDrawable      *drawable,
                       GdkGC            *gc,
@@ -1465,6 +1499,47 @@ gdk_win32_draw_glyphs (GdkDrawable      *drawable,
   gdk_region_destroy (region);
 }
 
+static void 
+gdk_win32_draw_glyphs_transformed (GdkDrawable      *drawable,
+                                            GdkGC            *gc,
+                                            PangoMatrix      *matrix,
+                                            PangoFont        *font,
+                                            gint              x,
+                                            gint              y,
+                                            PangoGlyphString *glyphs)
+{
+  GdkRectangle bounds;
+  GdkRegion *region;
+  PangoRectangle ink_rect;
+
+  pango_glyph_string_extents (glyphs, font, &ink_rect, NULL);
+
+  bounds.x = x + PANGO_PIXELS (ink_rect.x) - 1;
+  bounds.y = y + PANGO_PIXELS (ink_rect.y) - 1;
+  bounds.width = PANGO_PIXELS (ink_rect.width) + 2;
+  bounds.height = PANGO_PIXELS (ink_rect.height) + 2;
+  region = gdk_region_rectangle (&bounds);
+
+  if (matrix)
+    {
+      /* transform region */
+      bounds.x = bounds.x * matrix->xx + bounds.y * matrix->xy + matrix->x0;
+      bounds.y = bounds.x * matrix->yx + bounds.y * matrix->yy + matrix->x0;
+      bounds.width  = bounds.width  * matrix->xx + bounds.height * matrix->xy;
+      bounds.height = bounds.height * matrix->yx + bounds.width  * matrix->xy;
+      generic_draw (drawable, gc, GDK_GC_FOREGROUND|GDK_GC_FONT,
+                   draw_glyphs_transformed, region, matrix, font, x, y, glyphs);
+    }
+  else
+    { 
+       generic_draw (drawable, gc, GDK_GC_FOREGROUND|GDK_GC_FONT,
+                   draw_glyphs, region, font, x/PANGO_SCALE, y/PANGO_SCALE, glyphs);
+    }
+
+  gdk_region_destroy (region);
+}
+
 static void
 blit_from_pixmap (gboolean              use_fg_bg,
                  GdkDrawableImplWin32 *dest,
index ed652ea1c06d16fbaaab718566066e831bc7da0f..49beed4569a2b272c4b45cee7bc422879c9e238f 100644 (file)
@@ -1,6 +1,7 @@
 /* GDK - The GIMP Drawing Kit
  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * Copyright (C) 1998-2002 Tor Lillqvist
+ * Copyright (C) 1998-2004 Tor Lillqvist
+ * Copyright (C) 2000-2004 Hans Breuer
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -1259,3 +1260,23 @@ _gdk_win32_gdkregion_to_hrgn (GdkRegion *region,
 
   return (hrgn);
 }
+
+void
+_gdk_windowing_gc_get_foreground (GdkGC    *gc,
+                                 GdkColor *color)
+{
+  GdkGCWin32 *win32_gc;
+  GdkColormap *cmap;
+  
+  g_return_if_fail (GDK_IS_GC_WIN32 (gc));
+
+  win32_gc = GDK_GC_WIN32 (gc);
+
+  color->pixel = win32_gc->foreground;
+  cmap = gdk_gc_get_colormap (gc);
+
+  if (cmap)
+    gdk_colormap_query_color (cmap, win32_gc->foreground, color);
+  else
+    g_warning ("No colormap in _gdk_windowing_gc_get_foreground");
+}
index 5b4a3288f14e962342bb301936477eac2b00cc07..a78166afb07605df6404ca7375c510b5ee97d795 100644 (file)
@@ -84,6 +84,8 @@ VARIABLES = \
        stock_media_pause_24            stock_media_pause_24.png        \
        stock_media_play_16             stock_media_play_16.png \
        stock_media_play_24             stock_media_play_24.png \
+       stock_media_play_rtl_16         stock_media_play_rtl_16.png     \
+       stock_media_play_rtl_24         stock_media_play_rtl_24.png     \
        stock_media_previous_16         stock_media_previous_16.png     \
        stock_media_previous_24         stock_media_previous_24.png     \
        stock_media_record_16           stock_media_record_16.png       \