Generate gtk/makefile.mingw.

2000-07-25  Tor Lillqvist  <tml@iki.fi>

	* configure.in: Generate gtk/makefile.mingw.

	* config.h.win32: Add GETTEXT_PACKAGE.

	* gdk/gdk.def
	* gtk/gtk.def: Updates.

	* gdk/gdkfont.h
	* gdk/gdkpixmap.h: Remove temporary Win32-only functions, we don't
	need them any longer.

	* gdk/gdkinput.h: Mark gdk_core_pointer for export/import.

	* gdk/win32/*.c: More work.

	* gdk/win32/gdkpango-win32.c: New file.

	* gtk/makefile.mingw.in: New file

	* gtk/makefile.cygwin: Removed

	* gtk/Makefile.am: Update accordingly.

	* gtk/gtkmain.c: Use gtk_win32_get_installation_directory().

	* gtk/gtktextdisplay.c: No need to include pangox.h, pango.h
	is enough.

	* gtk/gtktypeutils.c: Mark glib_debug_objects for import.
This commit is contained in:
Tor Lillqvist
2000-07-25 20:38:35 +00:00
committed by Tor Lillqvist
parent 5ac61d3eee
commit 20e675e1a3
33 changed files with 1074 additions and 349 deletions

View File

@ -2,13 +2,21 @@
* Makefile.am: Include the build directory. * Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile. * configure.in: Generate build/Makefile, build/win32/Makefile
and gtk/makefile.mingw.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf. * config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
Add GETTEXT_PACKAGE.
* gdk/gdk.def * gdk/gdk.def
* gtk/gtk.def: Updates. * gtk/gtk.def: Updates.
* gdk/gdkfont.h
* gdk/gdkpixmap.h: Remove temporary Win32-only functions, we don't
need them any longer.
* gdk/gdkinput.h: Mark gdk_core_pointer for export/import.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with * gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf. PANGOWIN32_LIBS and gdk_pixbuf.
@ -22,9 +30,24 @@
* gdk/win32/gdkinputprivate.h: Remove. * gdk/win32/gdkinputprivate.h: Remove.
* gdk/win32/gdkpango-win32.c: New file.
* gtk/makefile.mingw.in: New file
* gtk/makefile.cygwin: Removed
* gtk/Makefile.am: Update accordingly.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and * gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible. made externally visible.
* gtk/gtkmain.c: Use it.
* gtk/gtktextdisplay.c: No need to include pangox.h, pango.h
is enough.
* gtk/gtktypeutils.c: Mark glib_debug_objects for import.
2000-07-24 Elliot Lee <sopwith@redhat.com> 2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the * gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already. individual backends already.

View File

@ -2,13 +2,21 @@
* Makefile.am: Include the build directory. * Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile. * configure.in: Generate build/Makefile, build/win32/Makefile
and gtk/makefile.mingw.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf. * config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
Add GETTEXT_PACKAGE.
* gdk/gdk.def * gdk/gdk.def
* gtk/gtk.def: Updates. * gtk/gtk.def: Updates.
* gdk/gdkfont.h
* gdk/gdkpixmap.h: Remove temporary Win32-only functions, we don't
need them any longer.
* gdk/gdkinput.h: Mark gdk_core_pointer for export/import.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with * gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf. PANGOWIN32_LIBS and gdk_pixbuf.
@ -22,9 +30,24 @@
* gdk/win32/gdkinputprivate.h: Remove. * gdk/win32/gdkinputprivate.h: Remove.
* gdk/win32/gdkpango-win32.c: New file.
* gtk/makefile.mingw.in: New file
* gtk/makefile.cygwin: Removed
* gtk/Makefile.am: Update accordingly.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and * gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible. made externally visible.
* gtk/gtkmain.c: Use it.
* gtk/gtktextdisplay.c: No need to include pangox.h, pango.h
is enough.
* gtk/gtktypeutils.c: Mark glib_debug_objects for import.
2000-07-24 Elliot Lee <sopwith@redhat.com> 2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the * gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already. individual backends already.

View File

@ -2,13 +2,21 @@
* Makefile.am: Include the build directory. * Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile. * configure.in: Generate build/Makefile, build/win32/Makefile
and gtk/makefile.mingw.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf. * config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
Add GETTEXT_PACKAGE.
* gdk/gdk.def * gdk/gdk.def
* gtk/gtk.def: Updates. * gtk/gtk.def: Updates.
* gdk/gdkfont.h
* gdk/gdkpixmap.h: Remove temporary Win32-only functions, we don't
need them any longer.
* gdk/gdkinput.h: Mark gdk_core_pointer for export/import.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with * gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf. PANGOWIN32_LIBS and gdk_pixbuf.
@ -22,9 +30,24 @@
* gdk/win32/gdkinputprivate.h: Remove. * gdk/win32/gdkinputprivate.h: Remove.
* gdk/win32/gdkpango-win32.c: New file.
* gtk/makefile.mingw.in: New file
* gtk/makefile.cygwin: Removed
* gtk/Makefile.am: Update accordingly.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and * gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible. made externally visible.
* gtk/gtkmain.c: Use it.
* gtk/gtktextdisplay.c: No need to include pangox.h, pango.h
is enough.
* gtk/gtktypeutils.c: Mark glib_debug_objects for import.
2000-07-24 Elliot Lee <sopwith@redhat.com> 2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the * gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already. individual backends already.

View File

@ -2,13 +2,21 @@
* Makefile.am: Include the build directory. * Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile. * configure.in: Generate build/Makefile, build/win32/Makefile
and gtk/makefile.mingw.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf. * config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
Add GETTEXT_PACKAGE.
* gdk/gdk.def * gdk/gdk.def
* gtk/gtk.def: Updates. * gtk/gtk.def: Updates.
* gdk/gdkfont.h
* gdk/gdkpixmap.h: Remove temporary Win32-only functions, we don't
need them any longer.
* gdk/gdkinput.h: Mark gdk_core_pointer for export/import.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with * gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf. PANGOWIN32_LIBS and gdk_pixbuf.
@ -22,9 +30,24 @@
* gdk/win32/gdkinputprivate.h: Remove. * gdk/win32/gdkinputprivate.h: Remove.
* gdk/win32/gdkpango-win32.c: New file.
* gtk/makefile.mingw.in: New file
* gtk/makefile.cygwin: Removed
* gtk/Makefile.am: Update accordingly.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and * gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible. made externally visible.
* gtk/gtkmain.c: Use it.
* gtk/gtktextdisplay.c: No need to include pangox.h, pango.h
is enough.
* gtk/gtktypeutils.c: Mark glib_debug_objects for import.
2000-07-24 Elliot Lee <sopwith@redhat.com> 2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the * gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already. individual backends already.

View File

@ -2,13 +2,21 @@
* Makefile.am: Include the build directory. * Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile. * configure.in: Generate build/Makefile, build/win32/Makefile
and gtk/makefile.mingw.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf. * config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
Add GETTEXT_PACKAGE.
* gdk/gdk.def * gdk/gdk.def
* gtk/gtk.def: Updates. * gtk/gtk.def: Updates.
* gdk/gdkfont.h
* gdk/gdkpixmap.h: Remove temporary Win32-only functions, we don't
need them any longer.
* gdk/gdkinput.h: Mark gdk_core_pointer for export/import.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with * gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf. PANGOWIN32_LIBS and gdk_pixbuf.
@ -22,9 +30,24 @@
* gdk/win32/gdkinputprivate.h: Remove. * gdk/win32/gdkinputprivate.h: Remove.
* gdk/win32/gdkpango-win32.c: New file.
* gtk/makefile.mingw.in: New file
* gtk/makefile.cygwin: Removed
* gtk/Makefile.am: Update accordingly.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and * gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible. made externally visible.
* gtk/gtkmain.c: Use it.
* gtk/gtktextdisplay.c: No need to include pangox.h, pango.h
is enough.
* gtk/gtktypeutils.c: Mark glib_debug_objects for import.
2000-07-24 Elliot Lee <sopwith@redhat.com> 2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the * gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already. individual backends already.

View File

@ -2,13 +2,21 @@
* Makefile.am: Include the build directory. * Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile. * configure.in: Generate build/Makefile, build/win32/Makefile
and gtk/makefile.mingw.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf. * config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
Add GETTEXT_PACKAGE.
* gdk/gdk.def * gdk/gdk.def
* gtk/gtk.def: Updates. * gtk/gtk.def: Updates.
* gdk/gdkfont.h
* gdk/gdkpixmap.h: Remove temporary Win32-only functions, we don't
need them any longer.
* gdk/gdkinput.h: Mark gdk_core_pointer for export/import.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with * gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf. PANGOWIN32_LIBS and gdk_pixbuf.
@ -22,9 +30,24 @@
* gdk/win32/gdkinputprivate.h: Remove. * gdk/win32/gdkinputprivate.h: Remove.
* gdk/win32/gdkpango-win32.c: New file.
* gtk/makefile.mingw.in: New file
* gtk/makefile.cygwin: Removed
* gtk/Makefile.am: Update accordingly.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and * gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible. made externally visible.
* gtk/gtkmain.c: Use it.
* gtk/gtktextdisplay.c: No need to include pangox.h, pango.h
is enough.
* gtk/gtktypeutils.c: Mark glib_debug_objects for import.
2000-07-24 Elliot Lee <sopwith@redhat.com> 2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the * gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already. individual backends already.

View File

@ -2,13 +2,21 @@
* Makefile.am: Include the build directory. * Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile. * configure.in: Generate build/Makefile, build/win32/Makefile
and gtk/makefile.mingw.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf. * config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
Add GETTEXT_PACKAGE.
* gdk/gdk.def * gdk/gdk.def
* gtk/gtk.def: Updates. * gtk/gtk.def: Updates.
* gdk/gdkfont.h
* gdk/gdkpixmap.h: Remove temporary Win32-only functions, we don't
need them any longer.
* gdk/gdkinput.h: Mark gdk_core_pointer for export/import.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with * gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf. PANGOWIN32_LIBS and gdk_pixbuf.
@ -22,9 +30,24 @@
* gdk/win32/gdkinputprivate.h: Remove. * gdk/win32/gdkinputprivate.h: Remove.
* gdk/win32/gdkpango-win32.c: New file.
* gtk/makefile.mingw.in: New file
* gtk/makefile.cygwin: Removed
* gtk/Makefile.am: Update accordingly.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and * gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible. made externally visible.
* gtk/gtkmain.c: Use it.
* gtk/gtktextdisplay.c: No need to include pangox.h, pango.h
is enough.
* gtk/gtktypeutils.c: Mark glib_debug_objects for import.
2000-07-24 Elliot Lee <sopwith@redhat.com> 2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the * gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already. individual backends already.

View File

@ -195,3 +195,5 @@
#define USE_MMX 1 #define USE_MMX 1
/* #undef HAVE_SIGSETJMP */ /* #undef HAVE_SIGSETJMP */
#define GETTEXT_PACKAGE "gtk20"

View File

@ -42,6 +42,7 @@ EXPORTS
gdk_colors_alloc gdk_colors_alloc
gdk_colors_free gdk_colors_free
gdk_colors_store gdk_colors_store
gdk_core_pointer
gdk_cursor_new gdk_cursor_new
gdk_cursor_new_from_pixmap gdk_cursor_new_from_pixmap
gdk_cursor_ref gdk_cursor_ref
@ -54,6 +55,7 @@ EXPORTS
gdk_dnd_init gdk_dnd_init
gdk_drag_abort gdk_drag_abort
gdk_drag_begin gdk_drag_begin
gdk_drag_context_get_type
gdk_drag_context_new gdk_drag_context_new
gdk_drag_context_ref gdk_drag_context_ref
gdk_drag_context_unref gdk_drag_context_unref
@ -65,9 +67,12 @@ EXPORTS
gdk_drag_status gdk_drag_status
gdk_draw_arc gdk_draw_arc
gdk_draw_drawable gdk_draw_drawable
gdk_draw_glyphs
gdk_draw_gray_image gdk_draw_gray_image
gdk_draw_image gdk_draw_image
gdk_draw_indexed_image gdk_draw_indexed_image
gdk_draw_layout
gdk_draw_layout_line
gdk_draw_line gdk_draw_line
gdk_draw_lines gdk_draw_lines
gdk_draw_point gdk_draw_point
@ -86,6 +91,7 @@ EXPORTS
gdk_drawable_get_size gdk_drawable_get_size
gdk_drawable_get_type gdk_drawable_get_type
gdk_drawable_get_visual gdk_drawable_get_visual
gdk_drawable_impl_win32_get_type
gdk_drawable_ref gdk_drawable_ref
gdk_drawable_set_colormap gdk_drawable_set_colormap
gdk_drawable_set_data gdk_drawable_set_data
@ -118,11 +124,10 @@ EXPORTS
gdk_exit gdk_exit
gdk_flush gdk_flush
gdk_font_equal gdk_font_equal
gdk_font_from_description
gdk_font_full_name_free gdk_font_full_name_free
gdk_font_full_name_get gdk_font_full_name_get
gdk_font_id gdk_font_id
gdk_font_list_free
gdk_font_list_new
gdk_font_load gdk_font_load
gdk_font_ref gdk_font_ref
gdk_font_unref gdk_font_unref
@ -135,6 +140,7 @@ EXPORTS
gdk_gc_new_with_values gdk_gc_new_with_values
gdk_gc_ref gdk_gc_ref
gdk_gc_set_background gdk_gc_set_background
gdk_gc_set_colormap
gdk_gc_set_clip_mask gdk_gc_set_clip_mask
gdk_gc_set_clip_origin gdk_gc_set_clip_origin
gdk_gc_set_clip_rectangle gdk_gc_set_clip_rectangle
@ -187,15 +193,19 @@ EXPORTS
gdk_key_repeat_restore gdk_key_repeat_restore
gdk_keyboard_grab gdk_keyboard_grab
gdk_keyboard_ungrab gdk_keyboard_ungrab
gdk_keyval_convert_case
gdk_keyval_from_name gdk_keyval_from_name
gdk_keyval_is_lower gdk_keyval_is_lower
gdk_keyval_is_upper gdk_keyval_is_upper
gdk_keyval_name gdk_keyval_name
gdk_keyval_to_lower gdk_keyval_to_lower
gdk_keyval_to_unicode
gdk_keyval_to_upper gdk_keyval_to_upper
gdk_list_visuals gdk_list_visuals
gdk_mbstowcs gdk_mbstowcs
gdk_null_window_warnings gdk_null_window_warnings
gdk_pango_context_get
gdk_pango_context_set_colormap
gdk_parent_root gdk_parent_root
gdk_pixmap_colormap_create_from_xpm gdk_pixmap_colormap_create_from_xpm
gdk_pixmap_colormap_create_from_xpm_d gdk_pixmap_colormap_create_from_xpm_d
@ -203,6 +213,7 @@ EXPORTS
gdk_pixmap_create_from_xpm gdk_pixmap_create_from_xpm
gdk_pixmap_create_from_xpm_d gdk_pixmap_create_from_xpm_d
gdk_pixmap_foreign_new gdk_pixmap_foreign_new
gdk_pixmap_get_type
gdk_pixmap_new gdk_pixmap_new
gdk_pointer_grab gdk_pointer_grab
gdk_pointer_is_grabbed gdk_pointer_is_grabbed
@ -225,6 +236,7 @@ EXPORTS
gdk_region_point_in gdk_region_point_in
gdk_region_polygon gdk_region_polygon
gdk_region_rect_in gdk_region_rect_in
gdk_region_rectangle
gdk_region_shrink gdk_region_shrink
gdk_region_subtract gdk_region_subtract
gdk_region_union gdk_region_union
@ -272,6 +284,7 @@ EXPORTS
gdk_threads_enter gdk_threads_enter
gdk_threads_leave gdk_threads_leave
gdk_threads_mutex gdk_threads_mutex
gdk_unicode_to_keyval
gdk_visual_get_best gdk_visual_get_best
gdk_visual_get_best_depth gdk_visual_get_best_depth
gdk_visual_get_best_type gdk_visual_get_best_type
@ -308,6 +321,7 @@ EXPORTS
gdk_window_get_user_data gdk_window_get_user_data
gdk_window_hide gdk_window_hide
gdk_window_invalidate_rect gdk_window_invalidate_rect
gdk_window_invalidate_region
gdk_window_is_viewable gdk_window_is_viewable
gdk_window_is_visible gdk_window_is_visible
gdk_window_lower gdk_window_lower
@ -315,6 +329,8 @@ EXPORTS
gdk_window_move gdk_window_move
gdk_window_move_resize gdk_window_move_resize
gdk_window_new gdk_window_new
gdk_window_object_get_type
gdk_window_peek_children
gdk_window_process_all_updates gdk_window_process_all_updates
gdk_window_process_updates gdk_window_process_updates
gdk_window_raise gdk_window_raise
@ -322,6 +338,7 @@ EXPORTS
gdk_window_remove_filter gdk_window_remove_filter
gdk_window_reparent gdk_window_reparent
gdk_window_resize gdk_window_resize
gdk_window_scroll
gdk_window_set_back_pixmap gdk_window_set_back_pixmap
gdk_window_set_background gdk_window_set_background
gdk_window_set_child_shapes gdk_window_set_child_shapes

View File

@ -25,13 +25,6 @@ struct _GdkFont
gint descent; gint descent;
}; };
#ifdef GDK_WINDOWING_WIN32
/* Temporary functions, will be replaced by something else for all backends
* eventually. Don't use!
*/
gchar** gdk_font_list_new (const gchar *font_pattern, gint *n_returned);
void gdk_font_list_free (gchar **font_list);
#endif
GdkFont* gdk_font_load (const gchar *font_name); GdkFont* gdk_font_load (const gchar *font_name);
GdkFont* gdk_fontset_load (const gchar *fontset_name); GdkFont* gdk_fontset_load (const gchar *fontset_name);

View File

@ -125,7 +125,7 @@ void gdk_input_set_extension_events (GdkWindow *window,
gint mask, gint mask,
GdkExtensionMode mode); GdkExtensionMode mode);
extern GdkDevice *gdk_core_pointer; GDKVAR GdkDevice *gdk_core_pointer;
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -42,15 +42,6 @@ GdkPixmap* gdk_pixmap_new (GdkWindow *window,
gint width, gint width,
gint height, gint height,
gint depth); gint depth);
#ifdef GDK_WINDOWING_WIN32
GdkPixmap* gdk_pixmap_create_on_shared_image
(GdkImage **image_return,
GdkWindow *window,
GdkVisual *visual,
gint width,
gint height,
gint depth);
#endif
GdkBitmap* gdk_bitmap_create_from_data (GdkWindow *window, GdkBitmap* gdk_bitmap_create_from_data (GdkWindow *window,
const gchar *data, const gchar *data,
gint width, gint width,

View File

@ -37,7 +37,6 @@
#include "gdkproperty.h" #include "gdkproperty.h"
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkprivate-win32.h" #include "gdkprivate-win32.h"
#include "gdkdrawable-win32.h"
#ifdef OLE2_DND #ifdef OLE2_DND
#include <ole2.h> #include <ole2.h>
@ -50,7 +49,7 @@
#include <gdk/gdk.h> #include <gdk/gdk.h>
typedef struct _GdkDragContextPrivate GdkDragContextPrivate; typedef struct _GdkDragContextPrivateWin32 GdkDragContextPrivateWin32;
typedef enum { typedef enum {
GDK_DRAG_STATUS_DRAG, GDK_DRAG_STATUS_DRAG,
@ -89,10 +88,8 @@ static int nformats;
/* Structure that holds information about a drag in progress. /* Structure that holds information about a drag in progress.
* this is used on both source and destination sides. * this is used on both source and destination sides.
*/ */
struct _GdkDragContextPrivate { struct _GdkDragContextPrivateWin32 {
GdkDragContext context; gint ref_count;
guint ref_count;
guint16 last_x; /* Coordinates from last event */ guint16 last_x; /* Coordinates from last event */
guint16 last_y; guint16 last_y;
@ -100,65 +97,111 @@ struct _GdkDragContextPrivate {
guint drag_status; /* Current status of drag */ guint drag_status; /* Current status of drag */
}; };
#define PRIVATE_DATA(context) ((GdkDragContextPrivateWin32 *) GDK_DRAG_CONTEXT (context)->windowing_data)
GdkDragContext *current_dest_drag = NULL; GdkDragContext *current_dest_drag = NULL;
/* Drag Contexts */ static void gdk_drag_context_init (GdkDragContext *dragcontext);
static void gdk_drag_context_class_init (GdkDragContextClass *klass);
static void gdk_drag_context_finalize (GObject *object);
static gpointer parent_class = NULL;
static GList *contexts; static GList *contexts;
GType
gdk_drag_context_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
static const GTypeInfo object_info =
{
sizeof (GdkDragContextClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_drag_context_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkDragContext),
0, /* n_preallocs */
(GInstanceInitFunc) gdk_drag_context_init,
};
object_type = g_type_register_static (G_TYPE_OBJECT,
"GdkDragContext",
&object_info);
}
return object_type;
}
static void
gdk_drag_context_init (GdkDragContext *dragcontext)
{
GdkDragContextPrivateWin32 *private = g_new0 (GdkDragContextPrivateWin32, 1);
dragcontext->windowing_data = private;
private->ref_count = 1;
contexts = g_list_prepend (contexts, dragcontext);
}
static void
gdk_drag_context_class_init (GdkDragContextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gdk_drag_context_finalize;
}
static void
gdk_drag_context_finalize (GObject *object)
{
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
GdkDragContextPrivateWin32 *private = PRIVATE_DATA (context);
g_list_free (context->targets);
if (context->source_window)
{
gdk_window_unref (context->source_window);
}
if (context->dest_window)
gdk_window_unref (context->dest_window);
contexts = g_list_remove (contexts, context);
g_free (private);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
/* Drag Contexts */
GdkDragContext * GdkDragContext *
gdk_drag_context_new (void) gdk_drag_context_new (void)
{ {
GdkDragContextPrivate *result; return g_object_new (gdk_drag_context_get_type (), NULL);
result = g_new0 (GdkDragContextPrivate, 1);
result->ref_count = 1;
contexts = g_list_prepend (contexts, result);
return (GdkDragContext *) result;
} }
void void
gdk_drag_context_ref (GdkDragContext *context) gdk_drag_context_ref (GdkDragContext *context)
{ {
g_return_if_fail (context != NULL); g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
((GdkDragContextPrivate *)context)->ref_count++; g_object_ref (G_OBJECT (context));
} }
void void
gdk_drag_context_unref (GdkDragContext *context) gdk_drag_context_unref (GdkDragContext *context)
{ {
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
g_return_if_fail (context != NULL);
if (private->ref_count <= 0) g_object_unref (G_OBJECT (context));
abort ();
private->ref_count--;
GDK_NOTE (DND, g_print ("gdk_drag_context_unref: %d%s\n",
private->ref_count,
(private->ref_count == 0 ? " freeing" : "")));
if (private->ref_count == 0)
{
g_dataset_destroy (private);
g_list_free (context->targets);
if (context->source_window)
gdk_drawable_unref (context->source_window);
if (context->dest_window)
gdk_drawable_unref (context->dest_window);
contexts = g_list_remove (contexts, private);
g_free (private);
}
} }
#if 0 #if 0
@ -223,13 +266,13 @@ static ULONG STDMETHODCALLTYPE
idroptarget_addref (LPDROPTARGET This) idroptarget_addref (LPDROPTARGET This)
{ {
target_drag_context *ctx = (target_drag_context *) This; target_drag_context *ctx = (target_drag_context *) This;
GdkDragContextPrivate *private = (GdkDragContextPrivate *) ctx->context; GdkDragContextPrivateWin32 *private = PRIVATE_DATA (ctx->context);
int ref_count = ++private->ref_count;
gdk_drag_context_ref (ctx->context); gdk_drag_context_ref (ctx->context);
GDK_NOTE (DND, g_print ("idroptarget_addref %#x %d\n", GDK_NOTE (DND, g_print ("idroptarget_addref %#x %d\n", This, ref_count));
This, private->ref_count));
return private->ref_count; return ref_count;
} }
static HRESULT STDMETHODCALLTYPE static HRESULT STDMETHODCALLTYPE
@ -268,12 +311,11 @@ static ULONG STDMETHODCALLTYPE
idroptarget_release (LPDROPTARGET This) idroptarget_release (LPDROPTARGET This)
{ {
target_drag_context *ctx = (target_drag_context *) This; target_drag_context *ctx = (target_drag_context *) This;
GdkDragContextPrivate *private = (GdkDragContextPrivate *) ctx->context; GdkDragContextPrivateWin32 *private = PRIVATE_DATA (ctx->context);
int ref_count = private->ref_count - 1; int ref_count = --private->ref_count;
gdk_drag_context_unref (ctx->context); gdk_drag_context_unref (ctx->context);
GDK_NOTE (DND, g_print ("idroptarget_release %#x %d\n", GDK_NOTE (DND, g_print ("idroptarget_release %#x %d\n", This, ref_count));
This, ref_count));
if (ref_count == 0) if (ref_count == 0)
g_free (This); g_free (This);
@ -328,7 +370,7 @@ static ULONG STDMETHODCALLTYPE
idropsource_addref (LPDROPSOURCE This) idropsource_addref (LPDROPSOURCE This)
{ {
source_drag_context *ctx = (source_drag_context *) This; source_drag_context *ctx = (source_drag_context *) This;
GdkDragContextPrivate *private = (GdkDragContextPrivate *) ctx->context; GdkDragContextPrivateWin32 *private = PRIVATE_DATA (ctx->context);
gdk_drag_context_ref (ctx->context); gdk_drag_context_ref (ctx->context);
GDK_NOTE (DND, g_print ("idropsource_addref %#x %d\n", GDK_NOTE (DND, g_print ("idropsource_addref %#x %d\n",
@ -372,12 +414,11 @@ static ULONG STDMETHODCALLTYPE
idropsource_release (LPDROPSOURCE This) idropsource_release (LPDROPSOURCE This)
{ {
source_drag_context *ctx = (source_drag_context *) This; source_drag_context *ctx = (source_drag_context *) This;
GdkDragContextPrivate *private = (GdkDragContextPrivate *) ctx->context; GdkDragContextPrivateWin32 *private = PRIVATE_DATA (ctx->context);
int ref_count = private->ref_count - 1; int ref_count = --private->ref_count;
gdk_drag_context_unref (ctx->context); gdk_drag_context_unref (ctx->context);
GDK_NOTE (DND, g_print ("idropsource_release %#x %d\n", GDK_NOTE (DND, g_print ("idropsource_release %#x %d\n", This, ref_count));
This, ref_count));
if (ref_count == 0) if (ref_count == 0)
g_free (This); g_free (This);
@ -904,7 +945,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
gpointer data) gpointer data)
{ {
GdkDragContext *context; GdkDragContext *context;
GdkDragContextPrivate *private; GdkDragContextPrivateWin32 *private;
static GdkAtom text_uri_list_atom = GDK_NONE; static GdkAtom text_uri_list_atom = GDK_NONE;
GString *result; GString *result;
MSG *msg = (MSG *) xev; MSG *msg = (MSG *) xev;
@ -921,7 +962,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
GDK_NOTE (DND, g_print ("WM_DROPFILES: %#x\n", msg->hwnd)); GDK_NOTE (DND, g_print ("WM_DROPFILES: %#x\n", msg->hwnd));
context = gdk_drag_context_new (); context = gdk_drag_context_new ();
private = (GdkDragContextPrivate *) context; private = PRIVATE_DATA (context);
context->protocol = GDK_DRAG_PROTO_WIN32_DROPFILES; context->protocol = GDK_DRAG_PROTO_WIN32_DROPFILES;
context->is_source = FALSE; context->is_source = FALSE;
context->source_window = gdk_parent_root; context->source_window = gdk_parent_root;
@ -1108,7 +1149,7 @@ gdk_drag_find_window (GdkDragContext *context,
GdkWindow **dest_window, GdkWindow **dest_window,
GdkDragProtocol *protocol) GdkDragProtocol *protocol)
{ {
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; GdkDragContextPrivateWin32 *private = PRIVATE_DATA (context);
HWND recipient; HWND recipient;
POINT pt; POINT pt;

View File

@ -31,8 +31,6 @@
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkprivate-win32.h" #include "gdkprivate-win32.h"
#include "gdkdrawable-win32.h"
#include "gdkpixmap-win32.h"
static void gdk_win32_draw_rectangle (GdkDrawable *drawable, static void gdk_win32_draw_rectangle (GdkDrawable *drawable,
GdkGC *gc, GdkGC *gc,

View File

@ -51,9 +51,6 @@
#include "gdk.h" #include "gdk.h"
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkdrawable-win32.h"
#include "gdkwindow-win32.h"
#include "gdkpixmap-win32.h"
#include "gdkinput-win32.h" #include "gdkinput-win32.h"
#include "gdkkeysyms.h" #include "gdkkeysyms.h"
@ -1366,7 +1363,7 @@ gdk_event_translate (GdkEvent *event,
GdkWindowImplWin32 *window_impl; GdkWindowImplWin32 *window_impl;
#define ASSIGN_WINDOW(rhs) \ #define ASSIGN_WINDOW(rhs) \
(window = rhs, \ (window = rhs, \
window_impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl)) window_impl = (window ? GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl) : NULL))
GdkWindow *orig_window, *new_window; GdkWindow *orig_window, *new_window;
GdkColormapPrivateWin32 *colormap_private; GdkColormapPrivateWin32 *colormap_private;
@ -1387,15 +1384,13 @@ gdk_event_translate (GdkEvent *event,
if (ret_val_flagp) if (ret_val_flagp)
*ret_val_flagp = FALSE; *ret_val_flagp = FALSE;
ASSIGN_WINDOW (gdk_win32_handle_table_lookup (msg->hwnd)); ASSIGN_WINDOW (gdk_win32_handle_table_lookup ((GdkNativeWindow) msg->hwnd));
orig_window = window; orig_window = window;
event->any.window = window; event->any.window = window;
event->any.send_event = FALSE; event->any.send_event = FALSE;
if (window != NULL) if (window == NULL)
gdk_drawable_ref (window);
else
{ {
/* Handle WM_QUIT here ? */ /* Handle WM_QUIT here ? */
if (msg->message == WM_QUIT) if (msg->message == WM_QUIT)
@ -1423,6 +1418,8 @@ gdk_event_translate (GdkEvent *event,
return FALSE; return FALSE;
} }
gdk_drawable_ref (window);
if (!GDK_WINDOW_DESTROYED (window)) if (!GDK_WINDOW_DESTROYED (window))
{ {
/* Check for filters for this window */ /* Check for filters for this window */
@ -2124,7 +2121,7 @@ gdk_event_translate (GdkEvent *event,
if ((hwnd = WindowFromPoint (pt)) == NULL) if ((hwnd = WindowFromPoint (pt)) == NULL)
break; break;
msg->hwnd = hwnd; msg->hwnd = hwnd;
if ((new_window = gdk_win32_handle_table_lookup (msg->hwnd)) == NULL) if ((new_window = gdk_win32_handle_table_lookup ((GdkNativeWindow) msg->hwnd)) == NULL)
break; break;
if (new_window != window) if (new_window != window)
{ {

View File

@ -24,11 +24,11 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/ */
#include "config.h"
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <pango/pangowin32.h>
#include "gdkfont.h" #include "gdkfont.h"
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkprivate-win32.h" #include "gdkprivate-win32.h"
@ -1135,26 +1135,126 @@ check_unicode_subranges (UINT charset,
return retval; return retval;
} }
GdkWin32SingleFont* static GdkWin32SingleFont *
gdk_font_load_internal (const gchar *font_name) gdk_font_load_logfont (LOGFONT *lfp)
{ {
GdkWin32SingleFont *singlefont; GdkWin32SingleFont *singlefont;
HFONT hfont; HFONT hfont;
LOGFONT logfont; LOGFONT logfont;
CHARSETINFO csi; CHARSETINFO csi;
DWORD fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet,
fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily;
HGDIOBJ oldfont; HGDIOBJ oldfont;
char *lpszFace; int tries;
gchar face[100]; gchar face[100];
int numfields, n1, n2, tries; for (tries = 0; ; tries++)
{
GDK_NOTE (MISC, g_print ("... trying %d,%d,%d,%d,"
"%d,%d,%d,%d,"
"%d,%d,%d,"
"%d,%#.02x,\"%s\"\n",
lfp->lfHeight, lfp->lfWidth,
lfp->lfEscapement, lfp->lfOrientation,
lfp->lfWeight, lfp->lfItalic,
lfp->lfUnderline, lfp->lfStrikeOut,
lfp->lfCharSet,
lfp->lfOutPrecision, lfp->lfClipPrecision,
lfp->lfQuality, lfp->lfPitchAndFamily,
lfp->lfFaceName));
hfont = CreateFontIndirect (lfp);
if (hfont != NULL)
break;
/* If we fail, try some similar fonts often found on Windows. */
if (tries == 0)
{
if (g_strcasecmp (lfp->lfFaceName, "helvetica") == 0)
strcpy (lfp->lfFaceName, "arial");
else if (g_strcasecmp (lfp->lfFaceName, "new century schoolbook") == 0)
strcpy (lfp->lfFaceName, "century schoolbook");
else if (g_strcasecmp (lfp->lfFaceName, "courier") == 0)
strcpy (lfp->lfFaceName, "courier new");
else if (g_strcasecmp (lfp->lfFaceName, "lucida") == 0)
strcpy (lfp->lfFaceName, "lucida sans unicode");
else if (g_strcasecmp (lfp->lfFaceName, "lucidatypewriter") == 0)
strcpy (lfp->lfFaceName, "lucida console");
else if (g_strcasecmp (lfp->lfFaceName, "times") == 0)
strcpy (lfp->lfFaceName, "times new roman");
}
else if (tries == 1)
{
if (g_strcasecmp (lfp->lfFaceName, "courier") == 0)
{
strcpy (lfp->lfFaceName, "");
lfp->lfPitchAndFamily |= FF_MODERN;
}
else if (g_strcasecmp (lfp->lfFaceName, "times new roman") == 0)
{
strcpy (lfp->lfFaceName, "");
lfp->lfPitchAndFamily |= FF_ROMAN;
}
else if (g_strcasecmp (lfp->lfFaceName, "helvetica") == 0
|| g_strcasecmp (lfp->lfFaceName, "lucida") == 0)
{
strcpy (lfp->lfFaceName, "");
lfp->lfPitchAndFamily |= FF_SWISS;
}
else
{
strcpy (lfp->lfFaceName, "");
lfp->lfPitchAndFamily = (lfp->lfPitchAndFamily & 0x0F) | FF_DONTCARE;
}
}
else
break;
tries++;
}
if (!hfont)
return NULL;
singlefont = g_new (GdkWin32SingleFont, 1);
singlefont->hfont = hfont;
GetObject (singlefont->hfont, sizeof (logfont), &logfont);
oldfont = SelectObject (gdk_display_hdc, singlefont->hfont);
memset (&singlefont->fs, 0, sizeof (singlefont->fs));
singlefont->charset = GetTextCharsetInfo (gdk_display_hdc, &singlefont->fs, 0);
GetTextFace (gdk_display_hdc, sizeof (face), face);
SelectObject (gdk_display_hdc, oldfont);
if (TranslateCharsetInfo ((DWORD *) singlefont->charset, &csi,
TCI_SRCCHARSET)
&& singlefont->charset != MAC_CHARSET)
singlefont->codepage = csi.ciACP;
else
singlefont->codepage = 0;
GDK_NOTE (MISC, (g_print ("... = %#x %s cs %s cp%d\n",
singlefont->hfont, face,
charset_name (singlefont->charset),
singlefont->codepage),
g_print ("... Unicode subranges:"),
print_unicode_subranges (&singlefont->fs)));
if (check_unicode_subranges (singlefont->charset, &singlefont->fs))
GDK_NOTE (MISC, (g_print ("... Guesstimated Unicode subranges:"),
print_unicode_subranges (&singlefont->fs)));
return singlefont;
}
static GdkWin32SingleFont *
gdk_font_load_internal (const gchar *font_name)
{
GdkWin32SingleFont *singlefont;
LOGFONT logfont;
char *fn;
int numfields, n1, n2;
char foundry[32], family[100], weight[32], slant[32], set_width[32], char foundry[32], family[100], weight[32], slant[32], set_width[32],
spacing[32], registry[32], encoding[32]; spacing[32], registry[32], encoding[32];
char pixel_size[10], point_size[10], res_x[10], res_y[10], avg_width[10]; char pixel_size[10], point_size[10], res_x[10], res_y[10], avg_width[10];
int c; int c;
char *p; char *p;
int nHeight, nWidth, nEscapement, nOrientation, fnWeight;
int logpixelsy; int logpixelsy;
g_return_val_if_fail (font_name != NULL, NULL); g_return_val_if_fail (font_name != NULL, NULL);
@ -1172,20 +1272,22 @@ gdk_font_load_internal (const gchar *font_name)
if (numfields == 0) if (numfields == 0)
{ {
/* Probably a plain Windows font name */ /* Probably a plain Windows font name */
nHeight = 0; logfont.lfHeight = 0;
nWidth = 0; logfont.lfWidth = 0;
nEscapement = 0; logfont.lfEscapement = 0;
nOrientation = 0; logfont.lfOrientation = 0;
fnWeight = FW_DONTCARE; logfont.lfWeight = FW_DONTCARE;
fdwItalic = FALSE; logfont.lfItalic = FALSE;
fdwUnderline = FALSE; logfont.lfUnderline = FALSE;
fdwStrikeOut = FALSE; logfont.lfStrikeOut = FALSE;
fdwCharSet = ANSI_CHARSET; logfont.lfCharSet = ANSI_CHARSET;
fdwOutputPrecision = OUT_TT_PRECIS; logfont.lfOutPrecision = OUT_TT_PRECIS;
fdwClipPrecision = CLIP_DEFAULT_PRECIS; logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
fdwQuality = PROOF_QUALITY; logfont.lfQuality = PROOF_QUALITY;
fdwPitchAndFamily = DEFAULT_PITCH; logfont.lfPitchAndFamily = DEFAULT_PITCH;
lpszFace = g_filename_from_utf8 (font_name); fn = g_filename_from_utf8 (font_name);
strcpy (logfont.lfFaceName, fn);
g_free (fn);
} }
else if (numfields != 5) else if (numfields != 5)
{ {
@ -1238,260 +1340,157 @@ gdk_font_load_internal (const gchar *font_name)
if (strcmp (pixel_size, "*") == 0) if (strcmp (pixel_size, "*") == 0)
if (strcmp (point_size, "*") == 0) if (strcmp (point_size, "*") == 0)
nHeight = 0; logfont.lfHeight = 0;
else else
nHeight = (int) (((double) atoi (point_size))/720.*logpixelsy); logfont.lfHeight = (int) (((double) atoi (point_size))/720.*logpixelsy);
else else
nHeight = atoi (pixel_size); logfont.lfHeight = atoi (pixel_size);
nWidth = 0; logfont.lfWidth = 0;
nEscapement = 0; logfont.lfEscapement = 0;
nOrientation = 0; logfont.lfOrientation = 0;
if (g_strcasecmp (weight, "thin") == 0) if (g_strcasecmp (weight, "thin") == 0)
fnWeight = FW_THIN; logfont.lfWeight = FW_THIN;
else if (g_strcasecmp (weight, "extralight") == 0) else if (g_strcasecmp (weight, "extralight") == 0)
fnWeight = FW_EXTRALIGHT; logfont.lfWeight = FW_EXTRALIGHT;
else if (g_strcasecmp (weight, "ultralight") == 0) else if (g_strcasecmp (weight, "ultralight") == 0)
#ifdef FW_ULTRALIGHT #ifdef FW_ULTRALIGHT
fnWeight = FW_ULTRALIGHT; logfont.lfWeight = FW_ULTRALIGHT;
#else #else
fnWeight = FW_EXTRALIGHT; /* In fact, FW_ULTRALIGHT really is logfont.lfWeight = FW_EXTRALIGHT; /* In fact, FW_ULTRALIGHT really is
* defined as FW_EXTRALIGHT anyway. * defined as FW_EXTRALIGHT anyway.
*/ */
#endif #endif
else if (g_strcasecmp (weight, "light") == 0) else if (g_strcasecmp (weight, "light") == 0)
fnWeight = FW_LIGHT; logfont.lfWeight = FW_LIGHT;
else if (g_strcasecmp (weight, "normal") == 0) else if (g_strcasecmp (weight, "normal") == 0)
fnWeight = FW_NORMAL; logfont.lfWeight = FW_NORMAL;
else if (g_strcasecmp (weight, "regular") == 0) else if (g_strcasecmp (weight, "regular") == 0)
fnWeight = FW_REGULAR; logfont.lfWeight = FW_REGULAR;
else if (g_strcasecmp (weight, "medium") == 0) else if (g_strcasecmp (weight, "medium") == 0)
fnWeight = FW_MEDIUM; logfont.lfWeight = FW_MEDIUM;
else if (g_strcasecmp (weight, "semibold") == 0) else if (g_strcasecmp (weight, "semibold") == 0)
fnWeight = FW_SEMIBOLD; logfont.lfWeight = FW_SEMIBOLD;
else if (g_strcasecmp (weight, "demibold") == 0) else if (g_strcasecmp (weight, "demibold") == 0)
#ifdef FW_DEMIBOLD #ifdef FW_DEMIBOLD
fnWeight = FW_DEMIBOLD; logfont.lfWeight = FW_DEMIBOLD;
#else #else
fnWeight = FW_SEMIBOLD; /* As above */ logfont.lfWeight = FW_SEMIBOLD; /* As above */
#endif #endif
else if (g_strcasecmp (weight, "bold") == 0) else if (g_strcasecmp (weight, "bold") == 0)
fnWeight = FW_BOLD; logfont.lfWeight = FW_BOLD;
else if (g_strcasecmp (weight, "extrabold") == 0) else if (g_strcasecmp (weight, "extrabold") == 0)
fnWeight = FW_EXTRABOLD; logfont.lfWeight = FW_EXTRABOLD;
else if (g_strcasecmp (weight, "ultrabold") == 0) else if (g_strcasecmp (weight, "ultrabold") == 0)
#ifdef FW_ULTRABOLD #ifdef FW_ULTRABOLD
fnWeight = FW_ULTRABOLD; logfont.lfWeight = FW_ULTRABOLD;
#else #else
fnWeight = FW_EXTRABOLD; /* As above */ logfont.lfWeight = FW_EXTRABOLD; /* As above */
#endif #endif
else if (g_strcasecmp (weight, "heavy") == 0) else if (g_strcasecmp (weight, "heavy") == 0)
fnWeight = FW_HEAVY; logfont.lfWeight = FW_HEAVY;
else if (g_strcasecmp (weight, "black") == 0) else if (g_strcasecmp (weight, "black") == 0)
#ifdef FW_BLACK #ifdef FW_BLACK
fnWeight = FW_BLACK; logfont.lfWeight = FW_BLACK;
#else #else
fnWeight = FW_HEAVY; /* As above */ logfont.lfWeight = FW_HEAVY; /* As above */
#endif #endif
else else
fnWeight = FW_DONTCARE; logfont.lfWeight = FW_DONTCARE;
if (g_strcasecmp (slant, "italic") == 0 if (g_strcasecmp (slant, "italic") == 0
|| g_strcasecmp (slant, "oblique") == 0 || g_strcasecmp (slant, "oblique") == 0
|| g_strcasecmp (slant, "i") == 0 || g_strcasecmp (slant, "i") == 0
|| g_strcasecmp (slant, "o") == 0) || g_strcasecmp (slant, "o") == 0)
fdwItalic = TRUE; logfont.lfItalic = TRUE;
else else
fdwItalic = FALSE; logfont.lfItalic = FALSE;
fdwUnderline = FALSE; logfont.lfUnderline = FALSE;
fdwStrikeOut = FALSE; logfont.lfStrikeOut = FALSE;
if (g_strcasecmp (registry, "iso8859") == 0) if (g_strcasecmp (registry, "iso8859") == 0)
if (strcmp (encoding, "1") == 0) if (strcmp (encoding, "1") == 0)
fdwCharSet = ANSI_CHARSET; logfont.lfCharSet = ANSI_CHARSET;
else if (strcmp (encoding, "2") == 0) else if (strcmp (encoding, "2") == 0)
fdwCharSet = EASTEUROPE_CHARSET; logfont.lfCharSet = EASTEUROPE_CHARSET;
else if (strcmp (encoding, "7") == 0) else if (strcmp (encoding, "7") == 0)
fdwCharSet = GREEK_CHARSET; logfont.lfCharSet = GREEK_CHARSET;
else if (strcmp (encoding, "8") == 0) else if (strcmp (encoding, "8") == 0)
fdwCharSet = HEBREW_CHARSET; logfont.lfCharSet = HEBREW_CHARSET;
else if (strcmp (encoding, "9") == 0) else if (strcmp (encoding, "9") == 0)
fdwCharSet = TURKISH_CHARSET; logfont.lfCharSet = TURKISH_CHARSET;
else else
fdwCharSet = ANSI_CHARSET; /* XXX ??? */ logfont.lfCharSet = ANSI_CHARSET; /* XXX ??? */
else if (g_strcasecmp (registry, "jisx0208.1983") == 0) else if (g_strcasecmp (registry, "jisx0208.1983") == 0)
fdwCharSet = SHIFTJIS_CHARSET; logfont.lfCharSet = SHIFTJIS_CHARSET;
else if (g_strcasecmp (registry, "ksc5601.1987") == 0) else if (g_strcasecmp (registry, "ksc5601.1987") == 0)
fdwCharSet = HANGEUL_CHARSET; logfont.lfCharSet = HANGEUL_CHARSET;
else if (g_strcasecmp (registry, "gb2312.1980") == 0) else if (g_strcasecmp (registry, "gb2312.1980") == 0)
fdwCharSet = GB2312_CHARSET; logfont.lfCharSet = GB2312_CHARSET;
else if (g_strcasecmp (registry, "big5") == 0) else if (g_strcasecmp (registry, "big5") == 0)
fdwCharSet = CHINESEBIG5_CHARSET; logfont.lfCharSet = CHINESEBIG5_CHARSET;
else if (g_strcasecmp (registry, "windows") == 0 else if (g_strcasecmp (registry, "windows") == 0
|| g_strcasecmp (registry, "microsoft") == 0) || g_strcasecmp (registry, "microsoft") == 0)
if (g_strcasecmp (encoding, "symbol") == 0) if (g_strcasecmp (encoding, "symbol") == 0)
fdwCharSet = SYMBOL_CHARSET; logfont.lfCharSet = SYMBOL_CHARSET;
else if (g_strcasecmp (encoding, "shiftjis") == 0) else if (g_strcasecmp (encoding, "shiftjis") == 0)
fdwCharSet = SHIFTJIS_CHARSET; logfont.lfCharSet = SHIFTJIS_CHARSET;
else if (g_strcasecmp (encoding, "gb2312") == 0) else if (g_strcasecmp (encoding, "gb2312") == 0)
fdwCharSet = GB2312_CHARSET; logfont.lfCharSet = GB2312_CHARSET;
else if (g_strcasecmp (encoding, "hangeul") == 0) else if (g_strcasecmp (encoding, "hangeul") == 0)
fdwCharSet = HANGEUL_CHARSET; logfont.lfCharSet = HANGEUL_CHARSET;
else if (g_strcasecmp (encoding, "big5") == 0) else if (g_strcasecmp (encoding, "big5") == 0)
fdwCharSet = CHINESEBIG5_CHARSET; logfont.lfCharSet = CHINESEBIG5_CHARSET;
else if (g_strcasecmp (encoding, "johab") == 0) else if (g_strcasecmp (encoding, "johab") == 0)
fdwCharSet = JOHAB_CHARSET; logfont.lfCharSet = JOHAB_CHARSET;
else if (g_strcasecmp (encoding, "hebrew") == 0) else if (g_strcasecmp (encoding, "hebrew") == 0)
fdwCharSet = HEBREW_CHARSET; logfont.lfCharSet = HEBREW_CHARSET;
else if (g_strcasecmp (encoding, "arabic") == 0) else if (g_strcasecmp (encoding, "arabic") == 0)
fdwCharSet = ARABIC_CHARSET; logfont.lfCharSet = ARABIC_CHARSET;
else if (g_strcasecmp (encoding, "greek") == 0) else if (g_strcasecmp (encoding, "greek") == 0)
fdwCharSet = GREEK_CHARSET; logfont.lfCharSet = GREEK_CHARSET;
else if (g_strcasecmp (encoding, "turkish") == 0) else if (g_strcasecmp (encoding, "turkish") == 0)
fdwCharSet = TURKISH_CHARSET; logfont.lfCharSet = TURKISH_CHARSET;
else if (g_strcasecmp (encoding, "easteurope") == 0) else if (g_strcasecmp (encoding, "easteurope") == 0)
fdwCharSet = EASTEUROPE_CHARSET; logfont.lfCharSet = EASTEUROPE_CHARSET;
else if (g_strcasecmp (encoding, "russian") == 0) else if (g_strcasecmp (encoding, "russian") == 0)
fdwCharSet = RUSSIAN_CHARSET; logfont.lfCharSet = RUSSIAN_CHARSET;
else if (g_strcasecmp (encoding, "mac") == 0) else if (g_strcasecmp (encoding, "mac") == 0)
fdwCharSet = MAC_CHARSET; logfont.lfCharSet = MAC_CHARSET;
else if (g_strcasecmp (encoding, "baltic") == 0) else if (g_strcasecmp (encoding, "baltic") == 0)
fdwCharSet = BALTIC_CHARSET; logfont.lfCharSet = BALTIC_CHARSET;
else if (g_strcasecmp (encoding, "cp1251") == 0) else if (g_strcasecmp (encoding, "cp1251") == 0)
fdwCharSet = RUSSIAN_CHARSET; logfont.lfCharSet = RUSSIAN_CHARSET;
else else
fdwCharSet = ANSI_CHARSET; /* XXX ??? */ logfont.lfCharSet = ANSI_CHARSET; /* XXX ??? */
else else
fdwCharSet = ANSI_CHARSET; /* XXX ??? */ logfont.lfCharSet = ANSI_CHARSET; /* XXX ??? */
fdwOutputPrecision = OUT_TT_PRECIS; logfont.lfOutPrecision = OUT_TT_PRECIS;
fdwClipPrecision = CLIP_DEFAULT_PRECIS; logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
fdwQuality = PROOF_QUALITY; logfont.lfQuality = PROOF_QUALITY;
if (g_strcasecmp (spacing, "m") == 0) if (g_strcasecmp (spacing, "m") == 0)
fdwPitchAndFamily = FIXED_PITCH; logfont.lfPitchAndFamily = FIXED_PITCH;
else if (g_strcasecmp (spacing, "p") == 0) else if (g_strcasecmp (spacing, "p") == 0)
fdwPitchAndFamily = VARIABLE_PITCH; logfont.lfPitchAndFamily = VARIABLE_PITCH;
else else
fdwPitchAndFamily = DEFAULT_PITCH; logfont.lfPitchAndFamily = DEFAULT_PITCH;
lpszFace = g_filename_from_utf8 (family); fn = g_filename_from_utf8 (family);
strcpy (logfont.lfFaceName, fn);
g_free (fn);
} }
for (tries = 0; ; tries++) return gdk_font_load_logfont (&logfont);
{
GDK_NOTE (MISC, g_print ("... trying CreateFont(%d,%d,%d,%d,"
"%d,%d,%d,%d,"
"%d,%d,%d,"
"%d,%#.02x,\"%s\")\n",
nHeight, nWidth, nEscapement, nOrientation,
fnWeight, fdwItalic, fdwUnderline, fdwStrikeOut,
fdwCharSet, fdwOutputPrecision, fdwClipPrecision,
fdwQuality, fdwPitchAndFamily, lpszFace));
hfont = CreateFont (nHeight, nWidth, nEscapement, nOrientation,
fnWeight, fdwItalic, fdwUnderline, fdwStrikeOut,
fdwCharSet, fdwOutputPrecision, fdwClipPrecision,
fdwQuality, fdwPitchAndFamily, lpszFace);
/* After the first try lpszFace contains a return value
* from g_filename_from_utf8(), so free it.
*/
if (tries == 0)
g_free (lpszFace);
if (hfont != NULL)
break;
/* If we fail, try some similar fonts often found on Windows. */
if (tries == 0)
{
if (g_strcasecmp (family, "helvetica") == 0)
lpszFace = "arial";
else if (g_strcasecmp (family, "new century schoolbook") == 0)
lpszFace = "century schoolbook";
else if (g_strcasecmp (family, "courier") == 0)
lpszFace = "courier new";
else if (g_strcasecmp (family, "lucida") == 0)
lpszFace = "lucida sans unicode";
else if (g_strcasecmp (family, "lucidatypewriter") == 0)
lpszFace = "lucida console";
else if (g_strcasecmp (family, "times") == 0)
lpszFace = "times new roman";
}
else if (tries == 1)
{
if (g_strcasecmp (family, "courier") == 0)
{
lpszFace = "";
fdwPitchAndFamily |= FF_MODERN;
}
else if (g_strcasecmp (family, "times new roman") == 0)
{
lpszFace = "";
fdwPitchAndFamily |= FF_ROMAN;
}
else if (g_strcasecmp (family, "helvetica") == 0
|| g_strcasecmp (family, "lucida") == 0)
{
lpszFace = "";
fdwPitchAndFamily |= FF_SWISS;
}
else
{
lpszFace = "";
fdwPitchAndFamily = (fdwPitchAndFamily & 0x0F) | FF_DONTCARE;
}
}
else
break;
tries++;
}
if (!hfont)
return NULL;
singlefont = g_new (GdkWin32SingleFont, 1);
singlefont->hfont = hfont;
GetObject (singlefont->hfont, sizeof (logfont), &logfont);
oldfont = SelectObject (gdk_display_hdc, singlefont->hfont);
memset (&singlefont->fs, 0, sizeof (singlefont->fs));
singlefont->charset = GetTextCharsetInfo (gdk_display_hdc, &singlefont->fs, 0);
GetTextFace (gdk_display_hdc, sizeof (face), face);
SelectObject (gdk_display_hdc, oldfont);
if (TranslateCharsetInfo ((DWORD *) singlefont->charset, &csi,
TCI_SRCCHARSET)
&& singlefont->charset != MAC_CHARSET)
singlefont->codepage = csi.ciACP;
else
singlefont->codepage = 0;
GDK_NOTE (MISC, (g_print ("... = %#x %s cs %s cp%d\n",
singlefont->hfont, face,
charset_name (singlefont->charset),
singlefont->codepage),
g_print ("... Unicode subranges:"),
print_unicode_subranges (&singlefont->fs)));
if (check_unicode_subranges (singlefont->charset, &singlefont->fs))
GDK_NOTE (MISC, (g_print ("... Guesstimated Unicode subranges:"),
print_unicode_subranges (&singlefont->fs)));
return singlefont;
} }
GdkFont* static GdkFont *
gdk_font_load (const gchar *font_name) gdk_font_from_one_singlefont (GdkWin32SingleFont *singlefont)
{ {
GdkFont *font; GdkFont *font;
GdkFontPrivateWin32 *private; GdkFontPrivateWin32 *private;
GdkWin32SingleFont *singlefont;
HGDIOBJ oldfont; HGDIOBJ oldfont;
HANDLE *f; HANDLE *f;
TEXTMETRIC textmetric; TEXTMETRIC textmetric;
g_return_val_if_fail (font_name != NULL, NULL);
font = gdk_font_hash_lookup (GDK_FONT_FONTSET, font_name);
if (font)
return font;
singlefont = gdk_font_load_internal (font_name);
private = g_new (GdkFontPrivateWin32, 1); private = g_new (GdkFontPrivateWin32, 1);
font = (GdkFont*) private; font = (GdkFont*) private;
@ -1513,9 +1512,71 @@ gdk_font_load (const gchar *font_name)
GDK_NOTE (MISC, g_print ("... asc %d desc %d\n", GDK_NOTE (MISC, g_print ("... asc %d desc %d\n",
font->ascent, font->descent)); font->ascent, font->descent));
return font;
}
GdkFont*
gdk_font_load (const gchar *font_name)
{
GdkFont *font;
g_return_val_if_fail (font_name != NULL, NULL);
font = gdk_font_hash_lookup (GDK_FONT_FONTSET, font_name);
if (font)
return font;
gdk_font_hash_insert (GDK_FONT_FONTSET, font, font_name); gdk_font_hash_insert (GDK_FONT_FONTSET, font, font_name);
return font; return gdk_font_from_one_singlefont (gdk_font_load_internal (font_name));
}
/**
* gdk_font_from_description:
* @font_desc: a #PangoFontDescription.
*
* Load a #GdkFont based on a Pango font description. This font will
* only be an approximation of the Pango font, and
* internationalization will not be handled correctly. This function
* should only be used for legacy code that cannot be easily converted
* to use Pango. Using Pango directly will produce better results.
*
* Return value: the newly loaded font, or %NULL if the font
* cannot be loaded.
**/
GdkFont*
gdk_font_from_description (PangoFontDescription *font_desc)
{
PangoFontMap *font_map;
PangoFont *font;
GdkFont *result = NULL;
g_return_val_if_fail (font_desc != NULL, NULL);
font_map = pango_win32_font_map_for_display ();
font = pango_font_map_load_font (font_map, font_desc);
if (font)
{
gint n_subfonts;
PangoWin32Subfont *subfont_ids;
n_subfonts = pango_win32_list_subfonts (font, PANGO_WIN32_U_BASIC_LATIN,
&subfont_ids);
if (n_subfonts > 0)
{
LOGFONT *lfp =
pango_win32_font_subfont_logfont (font, subfont_ids[0]);
result = gdk_font_from_one_singlefont (gdk_font_load_logfont (lfp));
g_free (lfp);
}
g_free (subfont_ids);
g_object_unref (G_OBJECT (font));
}
return result;
} }
GdkFont* GdkFont*

View File

@ -34,9 +34,6 @@
#include "gdkregion-generic.h" #include "gdkregion-generic.h"
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkprivate-win32.h" #include "gdkprivate-win32.h"
#include "gdkdrawable-win32.h"
#include "gdkwindow-win32.h"
#include "gdkpixmap-win32.h"
static void gdk_win32_gc_destroy (GdkGC *gc); static void gdk_win32_gc_destroy (GdkGC *gc);
static void gdk_win32_gc_get_values (GdkGC *gc, static void gdk_win32_gc_get_values (GdkGC *gc,

View File

@ -34,7 +34,6 @@
#include "gdkinput.h" #include "gdkinput.h"
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkprivate-win32.h" #include "gdkprivate-win32.h"
#include "gdkwindow-win32.h"
#include "gdkinput-win32.h" #include "gdkinput-win32.h"
#ifdef HAVE_WINTAB #ifdef HAVE_WINTAB

View File

@ -37,7 +37,6 @@
#include "gdkkeysyms.h" #include "gdkkeysyms.h"
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkprivate-win32.h" #include "gdkprivate-win32.h"
#include "gdkwindow-win32.h"
#include "gdkinput-win32.h" #include "gdkinput-win32.h"
#include <objbase.h> #include <objbase.h>

View File

@ -0,0 +1,28 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "gdkprivate-win32.h"
#include "gdkpango.h"
#include <pango/pangowin32.h>
PangoContext *
gdk_pango_context_get (void)
{
return pango_win32_get_context ();
}

View File

@ -34,9 +34,6 @@
#include "gdkpixmap.h" #include "gdkpixmap.h"
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkprivate-win32.h" #include "gdkprivate-win32.h"
#include "gdkdrawable-win32.h"
#include "gdkwindow-win32.h"
#include "gdkpixmap-win32.h"
static void gdk_pixmap_impl_win32_get_size (GdkDrawable *drawable, static void gdk_pixmap_impl_win32_get_size (GdkDrawable *drawable,
gint *width, gint *width,

View File

@ -39,7 +39,7 @@ GdkGC * _gdk_win32_gc_new (GdkDrawable *drawable,
GdkGCValuesMask values_mask); GdkGCValuesMask values_mask);
COLORREF gdk_colormap_color (GdkColormap *colormap, COLORREF gdk_colormap_color (GdkColormap *colormap,
gulong pixel); gulong pixel);
HRGN BitmapToRegion (HBITMAP hBmp); HRGN BitmapToRegion (HBITMAP hBmp);
gchar *gdk_font_full_name_get (GdkFont *font); gchar *gdk_font_full_name_get (GdkFont *font);

View File

@ -36,6 +36,9 @@
#include <windows.h> #include <windows.h>
#include <commctrl.h> #include <commctrl.h>
#include <gdk/win32/gdkwindow-win32.h>
#include <gdk/win32/gdkpixmap-win32.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
@ -306,11 +309,14 @@ GDKVAR gchar *gdk_progclass;
GDKVAR ATOM gdk_selection_property; GDKVAR ATOM gdk_selection_property;
/* Functions to create GDK pixmaps and windows from their native equivalents */ /* Functions to create GDK pixmaps and windows from their native equivalents */
GdkPixmap *gdk_pixmap_foreign_new (guint32 anid); GdkPixmap *gdk_pixmap_foreign_new (GdkNativeWindow anid);
GdkWindow *gdk_window_foreign_new (guint32 anid); GdkWindow *gdk_window_foreign_new (GdkNativeWindow anid);
/* Return the Gdk* for a particular HANDLE */ /* Return the Gdk* for a particular HANDLE */
gpointer gdk_win32_handle_table_lookup (HANDLE handle); gpointer gdk_win32_handle_table_lookup (GdkNativeWindow handle);
#define gdk_window_lookup(hwnd) (GdkWindow*) gdk_win32_handle_table_lookup (hwnd)
#define gdk_pixmap_lookup(hbm) (GdkPixmap*) gdk_win32_handle_table_lookup (hbm)
/* Return a device context to draw in a drawable, given a GDK GC, /* Return a device context to draw in a drawable, given a GDK GC,
* and a mask indicating which GC values might be used (for efficiency, * and a mask indicating which GC values might be used (for efficiency,

View File

@ -32,8 +32,6 @@
#include "gdkwindow.h" #include "gdkwindow.h"
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkprivate-win32.h" #include "gdkprivate-win32.h"
#include "gdkwindow-win32.h"
#include "gdkpixmap-win32.h"
static gboolean gdk_window_gravity_works (void); static gboolean gdk_window_gravity_works (void);
static void gdk_window_set_static_win_gravity (GdkWindow *window, static void gdk_window_set_static_win_gravity (GdkWindow *window,
@ -157,7 +155,7 @@ gdk_window_impl_win32_get_colormap (GdkDrawable *drawable)
if (!((GdkWindowObject *) drawable_impl->wrapper)->input_only && if (!((GdkWindowObject *) drawable_impl->wrapper)->input_only &&
drawable_impl->colormap == NULL) drawable_impl->colormap == NULL)
{ {
g_assert_not_reached (); drawable_impl->colormap = gdk_colormap_get_system ();
} }
return drawable_impl->colormap; return drawable_impl->colormap;
@ -637,7 +635,7 @@ gdk_window_foreign_new (GdkNativeWindow anid)
draw_impl = GDK_DRAWABLE_IMPL_WIN32 (private->impl); draw_impl = GDK_DRAWABLE_IMPL_WIN32 (private->impl);
draw_impl->wrapper = GDK_DRAWABLE (window); draw_impl->wrapper = GDK_DRAWABLE (window);
private->parent = gdk_win32_handle_table_lookup (parent); private->parent = gdk_win32_handle_table_lookup ((GdkNativeWindow) parent);
parent_private = (GdkWindowObject *)private->parent; parent_private = (GdkWindowObject *)private->parent;
@ -1638,7 +1636,7 @@ gdk_window_get_pointer (GdkWindow *window,
ScreenToClient (hwndc, &point); ScreenToClient (hwndc, &point);
} while (hwndc != hwnd && (hwnd = hwndc, 1)); /* Ouch! */ } while (hwndc != hwnd && (hwnd = hwndc, 1)); /* Ouch! */
return_val = gdk_win32_handle_table_lookup (hwnd); return_val = gdk_win32_handle_table_lookup ((GdkNativeWindow) hwnd);
if (mask) if (mask)
{ {
@ -1696,7 +1694,7 @@ gdk_window_at_pointer (gint *win_x,
ScreenToClient (hwndc, &point); ScreenToClient (hwndc, &point);
} while (hwndc != hwnd && (hwnd = hwndc, 1)); } while (hwndc != hwnd && (hwnd = hwndc, 1));
window = gdk_win32_handle_table_lookup (hwnd); window = gdk_win32_handle_table_lookup ((GdkNativeWindow) hwnd);
if (window && (win_x || win_y)) if (window && (win_x || win_y))
{ {

View File

@ -552,6 +552,9 @@ testdnd_LDADD = $(LDADDS)
simple_LDADD = $(LDADDS) simple_LDADD = $(LDADDS)
#testthreads_LDADD = $(LDADDS) #testthreads_LDADD = $(LDADDS)
makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gtk/makefile.mingw.in
cd $(top_builddir) && CONFIG_FILES=gtk/$@ CONFIG_HEADERS= $(SHELL) ./config.status
.PHONY: files test test-debug .PHONY: files test test-debug
files: files:
@ -595,7 +598,8 @@ EXTRA_DIST += @STRIP_BEGIN@ \
gtk.def \ gtk.def \
gtk.rc \ gtk.rc \
makefile.msc \ makefile.msc \
makefile.cygwin \ makefile.mingw \
makefile.mingw.in \
$(gtkconf_DATA) \ $(gtkconf_DATA) \
@STRIP_END@ @STRIP_END@

View File

@ -20,22 +20,16 @@ EXPORTS
GTK_TYPE_DEBUG_FLAG GTK_TYPE_DEBUG_FLAG
GTK_TYPE_DEST_DEFAULTS GTK_TYPE_DEST_DEFAULTS
GTK_TYPE_DIRECTION_TYPE GTK_TYPE_DIRECTION_TYPE
GTK_TYPE_FONT_FILTER_TYPE
GTK_TYPE_FONT_METRIC_TYPE
GTK_TYPE_FONT_TYPE
GTK_TYPE_FUNDAMENTAL_TYPE GTK_TYPE_FUNDAMENTAL_TYPE
GTK_TYPE_GDK_AXIS_USE GTK_TYPE_GDK_AXIS_USE
GTK_TYPE_GDK_BYTE_ORDER GTK_TYPE_GDK_BYTE_ORDER
GTK_TYPE_GDK_CAP_STYLE GTK_TYPE_GDK_CAP_STYLE
GTK_TYPE_GDK_COLOR GTK_TYPE_GDK_COLOR
GTK_TYPE_GDK_COLORMAP
GTK_TYPE_GDK_COLOR_CONTEXT_MODE GTK_TYPE_GDK_COLOR_CONTEXT_MODE
GTK_TYPE_GDK_CROSSING_MODE GTK_TYPE_GDK_CROSSING_MODE
GTK_TYPE_GDK_CURSOR_TYPE GTK_TYPE_GDK_CURSOR_TYPE
GTK_TYPE_GDK_DRAG_ACTION GTK_TYPE_GDK_DRAG_ACTION
GTK_TYPE_GDK_DRAG_CONTEXT
GTK_TYPE_GDK_DRAG_PROTOCOL GTK_TYPE_GDK_DRAG_PROTOCOL
GTK_TYPE_GDK_DRAWABLE_TYPE
GTK_TYPE_GDK_EVENT GTK_TYPE_GDK_EVENT
GTK_TYPE_GDK_EVENT_MASK GTK_TYPE_GDK_EVENT_MASK
GTK_TYPE_GDK_EVENT_TYPE GTK_TYPE_GDK_EVENT_TYPE
@ -47,6 +41,7 @@ EXPORTS
GTK_TYPE_GDK_FONT_TYPE GTK_TYPE_GDK_FONT_TYPE
GTK_TYPE_GDK_FUNCTION GTK_TYPE_GDK_FUNCTION
GTK_TYPE_GDK_GC_VALUES_MASK GTK_TYPE_GDK_GC_VALUES_MASK
GTK_TYPE_GDK_GRAB_STATUS
GTK_TYPE_GDK_IC_ATTRIBUTES_TYPE GTK_TYPE_GDK_IC_ATTRIBUTES_TYPE
GTK_TYPE_GDK_IMAGE_TYPE GTK_TYPE_GDK_IMAGE_TYPE
GTK_TYPE_GDK_IM_STYLE GTK_TYPE_GDK_IM_STYLE
@ -61,6 +56,7 @@ EXPORTS
GTK_TYPE_GDK_PROPERTY_STATE GTK_TYPE_GDK_PROPERTY_STATE
GTK_TYPE_GDK_PROP_MODE GTK_TYPE_GDK_PROP_MODE
GTK_TYPE_GDK_RGB_DITHER GTK_TYPE_GDK_RGB_DITHER
GTK_TYPE_GDK_SCROLL_DIRECTION
GTK_TYPE_GDK_SELECTION GTK_TYPE_GDK_SELECTION
GTK_TYPE_GDK_SELECTION_TYPE GTK_TYPE_GDK_SELECTION_TYPE
GTK_TYPE_GDK_STATUS GTK_TYPE_GDK_STATUS
@ -69,13 +65,12 @@ EXPORTS
GTK_TYPE_GDK_VISIBILITY_STATE GTK_TYPE_GDK_VISIBILITY_STATE
GTK_TYPE_GDK_VISUAL GTK_TYPE_GDK_VISUAL
GTK_TYPE_GDK_VISUAL_TYPE GTK_TYPE_GDK_VISUAL_TYPE
GTK_TYPE_GDK_WINDOW
GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE
GTK_TYPE_GDK_WINDOW_CLASS GTK_TYPE_GDK_WINDOW_CLASS
GTK_TYPE_GDK_WINDOW_HINTS GTK_TYPE_GDK_WINDOW_HINTS
GTK_TYPE_GDK_WINDOW_TYPE
GTK_TYPE_GDK_WM_DECORATION GTK_TYPE_GDK_WM_DECORATION
GTK_TYPE_GDK_WM_FUNCTION GTK_TYPE_GDK_WM_FUNCTION
GTK_TYPE_IDENTIFIER
GTK_TYPE_JUSTIFICATION GTK_TYPE_JUSTIFICATION
GTK_TYPE_MATCH_TYPE GTK_TYPE_MATCH_TYPE
GTK_TYPE_MENU_DIRECTION_TYPE GTK_TYPE_MENU_DIRECTION_TYPE
@ -107,10 +102,13 @@ EXPORTS
GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY
GTK_TYPE_SPIN_TYPE GTK_TYPE_SPIN_TYPE
GTK_TYPE_STATE_TYPE GTK_TYPE_STATE_TYPE
GTK_TYPE_STYLE
GTK_TYPE_SUBMENU_DIRECTION GTK_TYPE_SUBMENU_DIRECTION
GTK_TYPE_SUBMENU_PLACEMENT GTK_TYPE_SUBMENU_PLACEMENT
GTK_TYPE_TARGET_FLAGS GTK_TYPE_TARGET_FLAGS
GTK_TYPE_TEXT_DIRECTION
GTK_TYPE_TEXT_VIEW_DELETE_TYPE
GTK_TYPE_TEXT_VIEW_MOVEMENT_STEP
GTK_TYPE_TEXT_VIEW_SCROLL_TYPE
GTK_TYPE_TOOLBAR_CHILD_TYPE GTK_TYPE_TOOLBAR_CHILD_TYPE
GTK_TYPE_TOOLBAR_SPACE_STYLE GTK_TYPE_TOOLBAR_SPACE_STYLE
GTK_TYPE_TOOLBAR_STYLE GTK_TYPE_TOOLBAR_STYLE
@ -121,6 +119,7 @@ EXPORTS
GTK_TYPE_WIDGET_FLAGS GTK_TYPE_WIDGET_FLAGS
GTK_TYPE_WINDOW_POSITION GTK_TYPE_WINDOW_POSITION
GTK_TYPE_WINDOW_TYPE GTK_TYPE_WINDOW_TYPE
GTK_TYPE_WRAP_MODE
gtk_accel_group_activate gtk_accel_group_activate
gtk_accel_group_add gtk_accel_group_add
gtk_accel_group_attach gtk_accel_group_attach
@ -513,7 +512,6 @@ EXPORTS
gtk_font_selection_dialog_get_preview_text gtk_font_selection_dialog_get_preview_text
gtk_font_selection_dialog_get_type gtk_font_selection_dialog_get_type
gtk_font_selection_dialog_new gtk_font_selection_dialog_new
gtk_font_selection_dialog_set_filter
gtk_font_selection_dialog_set_font_name gtk_font_selection_dialog_set_font_name
gtk_font_selection_dialog_set_preview_text gtk_font_selection_dialog_set_preview_text
gtk_font_selection_get_font gtk_font_selection_get_font
@ -521,7 +519,6 @@ EXPORTS
gtk_font_selection_get_preview_text gtk_font_selection_get_preview_text
gtk_font_selection_get_type gtk_font_selection_get_type
gtk_font_selection_new gtk_font_selection_new
gtk_font_selection_set_filter
gtk_font_selection_set_font_name gtk_font_selection_set_font_name
gtk_font_selection_set_preview_text gtk_font_selection_set_preview_text
gtk_frame_get_type gtk_frame_get_type
@ -1002,6 +999,7 @@ EXPORTS
gtk_scrolled_window_set_hadjustment gtk_scrolled_window_set_hadjustment
gtk_scrolled_window_set_placement gtk_scrolled_window_set_placement
gtk_scrolled_window_set_policy gtk_scrolled_window_set_policy
gtk_scrolled_window_set_shadow_type
gtk_scrolled_window_set_vadjustment gtk_scrolled_window_set_vadjustment
gtk_selection_add_target gtk_selection_add_target
gtk_selection_add_targets gtk_selection_add_targets
@ -1241,6 +1239,7 @@ EXPORTS
gtk_widget_get_colormap gtk_widget_get_colormap
gtk_widget_get_composite_name gtk_widget_get_composite_name
gtk_widget_get_default_colormap gtk_widget_get_default_colormap
gtk_widget_get_default_direction
gtk_widget_get_default_style gtk_widget_get_default_style
gtk_widget_get_default_visual gtk_widget_get_default_visual
gtk_widget_get_events gtk_widget_get_events
@ -1269,12 +1268,10 @@ EXPORTS
gtk_widget_pop_colormap gtk_widget_pop_colormap
gtk_widget_pop_composite_child gtk_widget_pop_composite_child
gtk_widget_pop_style gtk_widget_pop_style
gtk_widget_pop_visual
gtk_widget_popup gtk_widget_popup
gtk_widget_push_colormap gtk_widget_push_colormap
gtk_widget_push_composite_child gtk_widget_push_composite_child
gtk_widget_push_style gtk_widget_push_style
gtk_widget_push_visual
gtk_widget_queue_clear gtk_widget_queue_clear
gtk_widget_queue_clear_area gtk_widget_queue_clear_area
gtk_widget_queue_draw gtk_widget_queue_draw
@ -1293,8 +1290,9 @@ EXPORTS
gtk_widget_set_colormap gtk_widget_set_colormap
gtk_widget_set_composite_name gtk_widget_set_composite_name
gtk_widget_set_default_colormap gtk_widget_set_default_colormap
gtk_widget_set_default_direction
gtk_widget_set_default_style gtk_widget_set_default_style
gtk_widget_set_default_visual gtk_widget_set_direction
gtk_widget_set_events gtk_widget_set_events
gtk_widget_set_extension_events gtk_widget_set_extension_events
gtk_widget_set_name gtk_widget_set_name
@ -1307,7 +1305,6 @@ EXPORTS
gtk_widget_set_style gtk_widget_set_style
gtk_widget_set_uposition gtk_widget_set_uposition
gtk_widget_set_usize gtk_widget_set_usize
gtk_widget_set_visual
gtk_widget_setv gtk_widget_setv
gtk_widget_shape_combine_mask gtk_widget_shape_combine_mask
gtk_widget_show gtk_widget_show

View File

@ -29,7 +29,10 @@
#if defined (GDK_WINDOWING_X11) #if defined (GDK_WINDOWING_X11)
#include "x11/gdkx.h" #include "x11/gdkx.h"
#elif defined (GDK_WINDOWING_WIN32)
#include "win32/gdkwin32.h"
#endif #endif
#include "gdk/gdkkeysyms.h" #include "gdk/gdkkeysyms.h"
#include "gtkcolorsel.h" #include "gtkcolorsel.h"
#include "gtkhsv.h" #include "gtkhsv.h"

View File

@ -405,11 +405,11 @@ gtk_init_check (int *argc,
#else #else
{ {
/* GTk+ locale dir is %WinDir%\gtk+\locale */ /* GTk+ locale dir is %WinDir%\gtk+\locale */
extern char *get_gtk_sysconf_directory (); bindtextdomain (GETTEXT_PACKAGE,
bindtextdomain (GETTEXT_PACKAGE, g_strconcat (get_gtk_sysconf_directory (), g_strconcat (gtk_win32_get_installation_directory (),
G_DIR_SEPARATOR_S, G_DIR_SEPARATOR_S,
"locale", "locale",
NULL)); NULL));
} }
#endif #endif
#endif #endif

View File

@ -317,7 +317,7 @@ gtk_plug_key_press_event (GtkWidget *widget,
GDK_WINDOW_XWINDOW (plug->socket_window), GDK_WINDOW_XWINDOW (plug->socket_window),
RevertToParent, event->time); RevertToParent, event->time);
#elif defined (GDK_WINDOWING_WIN32) #elif defined (GDK_WINDOWING_WIN32)
SetFocus (GDK_WINDOW_XWINDOW (plug->socket_window)); SetFocus (GDK_WINDOW_HWND (plug->socket_window));
#endif #endif
gdk_flush (); gdk_flush ();
gdk_error_trap_pop (); gdk_error_trap_pop ();
@ -495,12 +495,12 @@ gtk_plug_forward_key_press (GtkPlug *plug, GdkEventKey *event)
break; break;
} }
PostMessage (GDK_WINDOW_XWINDOW (plug->socket_window), PostMessage (GDK_WINDOW_HWND (plug->socket_window),
WM_KEYDOWN, wParam, lParam); WM_KEYDOWN, wParam, lParam);
if (!no_WM_CHAR) if (!no_WM_CHAR)
PostMessage (GDK_WINDOW_XWINDOW (plug->socket_window), PostMessage (GDK_WINDOW_HWND (plug->socket_window),
WM_CHAR, wParam, lParam); WM_CHAR, wParam, lParam);
PostMessage (GDK_WINDOW_XWINDOW (plug->socket_window), PostMessage (GDK_WINDOW_HWND (plug->socket_window),
WM_KEYUP, wParam, lParam); WM_KEYUP, wParam, lParam);
#endif #endif
} }

View File

@ -50,8 +50,8 @@
#include "gtktextdisplay.h" #include "gtktextdisplay.h"
#include "gtktextiterprivate.h" #include "gtktextiterprivate.h"
#include <pango/pangox.h>
#include "x11/gdkx.h" #include <pango/pango.h>
typedef struct _GtkTextRenderState GtkTextRenderState; typedef struct _GtkTextRenderState GtkTextRenderState;

View File

@ -111,7 +111,12 @@ GType GTK_TYPE_IDENTIFIER = 0;
/* Hack to communicate with GLib object debugging for now /* Hack to communicate with GLib object debugging for now
*/ */
extern gboolean glib_debug_objects; #ifdef G_OS_WIN32
#define IMPORT __declspec(dllimport)
#else
#define IMPORT
#endif
extern IMPORT gboolean glib_debug_objects;
void void
gtk_type_init (void) gtk_type_init (void)

431
gtk/makefile.mingw.in Normal file
View File

@ -0,0 +1,431 @@
## Makefile for building the GTK DLL with gcc on Win32
## Use: make -f makefile.mingw
## There is no install target, you have to decide where and
## how to install for yourself.
# This is the location of pthreads for Win32,
# see http://sourceware.cygnus.com/pthreads-win32/
PTHREADS = ../../pthreads-snap-1999-05-30
PTHREAD_LIB = -L $(PTHREADS) -lpthread
PTHREAD_INC = -I $(PTHREADS)
OPTIMIZE = -g
TOP = ../..
include ../build/win32/make.mingw
################################################################
# Possibly override GTK+ version from build/win32/module.defs
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
GDK_LIBS = -L ../gdk -lgdk-win32-$(GTK_VER)
GTK_LIBS = -L . -lgtk-win32-$(GTK_VER)
GDK_PIXBUF_LIBS = -L ../gdk-pixbuf -lgdk_pixbuf-$(GTK_VER)
# Perl and awk are needed to generate some source files.
# These generated source files are distributed with the Win32 GTk+ source
# distributions, so don't worry if you don't have perl and awk.
PERL = perl
AWK = awk
INCLUDES = -I . -I .. -I ../gdk -I ../gdk-pixbuf
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(INTL_CFLAGS)
DEFINES = -DGTK_DISABLE_COMPAT_H -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\"
all : \
../config.h \
gtkcompat.h \
generated \
gtk-win32-$(GTK_VER).dll \
testcalendar.exe \
testdnd.exe \
testgtk.exe \
testinput.exe \
testrgb.exe \
testselection.exe \
testtext.exe \
testtextbuffer.exe
simple.exe
gtk_OBJECTS = \
fnmatch.o \
gdk-pixbuf-loader.o \
gtkaccelgroup.o \
gtkaccellabel.o \
gtkadjustment.o \
gtkalignment.o \
gtkarg.o \
gtkarrow.o \
gtkaspectframe.o \
gtkbin.o \
gtkbindings.o \
gtkbbox.o \
gtkbox.o \
gtkbutton.o \
gtkcalendar.o \
gtkcheckbutton.o \
gtkcheckmenuitem.o \
gtkclist.o \
gtkcolorsel.o \
gtkcolorseldialog.o \
gtkcombo.o \
gtkcontainer.o \
gtkctree.o \
gtkcurve.o \
gtkdata.o \
gtkdialog.o \
gtkdnd.o \
gtkdrawingarea.o \
gtkeditable.o \
gtkentry.o \
gtkeventbox.o \
gtkfilesel.o \
gtkfixed.o \
gtkfontsel.o \
gtkframe.o \
gtkgamma.o \
gtkgc.o \
gtkhandlebox.o \
gtkhbbox.o \
gtkhbox.o \
gtkhpaned.o \
gtkhruler.o \
gtkhscale.o \
gtkhscrollbar.o \
gtkhseparator.o \
gtkhsv.o \
gtkimage.o \
gtkimcontext.o \
gtkimcontextsimple.o \
gtkimmulticontext.o \
gtkinputdialog.o \
gtkinvisible.o \
gtkitem.o \
gtkitemfactory.o \
gtklabel.o \
gtklayout.o \
gtklist.o \
gtklistitem.o \
gtkmain.o \
gtkmarshal.o \
gtkmenu.o \
gtkmenubar.o \
gtkmenufactory.o \
gtkmenuitem.o \
gtkmenushell.o \
gtkmisc.o \
gtknotebook.o \
gtkobject.o \
gtkoptionmenu.o \
gtkpacker.o \
gtkpaned.o \
gtkpixmap.o \
gtkplug.o \
gtkpreview.o \
gtkprogress.o \
gtkprogressbar.o \
gtkradiobutton.o \
gtkradiomenuitem.o \
gtkrange.o \
gtkrc.o \
gtkruler.o \
gtkscale.o \
gtkscrollbar.o \
gtkscrolledwindow.o \
gtkselection.o \
gtkseparator.o \
gtksignal.o \
gtksocket.o \
gtkspinbutton.o \
gtkstyle.o \
gtkstatusbar.o \
gtktable.o \
gtktearoffmenuitem.o \
gtktext.o \
gtktextbtree.o \
gtktextbuffer.o \
gtktextchild.o \
gtktextdisplay.o \
gtktextiter.o \
gtktextlayout.o \
gtktextmark.o \
gtktextsegment.o \
gtktexttag.o \
gtktexttagtable.o \
gtktexttypes.o \
gtktextview.o \
gtkthemes.o \
gtktipsquery.o \
gtktogglebutton.o \
gtktoolbar.o \
gtktooltips.o \
gtktree.o \
gtktreeitem.o \
gtktypeutils.o \
gtkvbbox.o \
gtkvbox.o \
gtkviewport.o \
gtkvpaned.o \
gtkvruler.o \
gtkvscale.o \
gtkvscrollbar.o \
gtkvseparator.o \
gtkwidget.o \
gtkwindow.o
# Source headers which are non-autogenerated headers
source_headers = \
gtk.h \
gtkaccelgroup.h \
gtkaccellabel.h \
gtkadjustment.h \
gtkalignment.h \
gtkarg.h \
gtkarrow.h \
gtkaspectframe.h \
gtkbin.h \
gtkbindings.h \
gtkbbox.h \
gtkbox.h \
gtkbutton.h \
gtkcalendar.h \
gtkcheckbutton.h \
gtkcheckmenuitem.h \
gtkclist.h \
gtkcolorsel.h \
gtkcolorseldialog.h \
gtkcombo.h \
gtkcompat.h \
gtkcontainer.h \
gtkctree.h \
gtkcurve.h \
gtkdata.h \
gtkdebug.h \
gtkdialog.h \
gtkdnd.h \
gtkdrawingarea.h \
gtkeditable.h \
gtkentry.h \
gtkenums.h \
gtkeventbox.h \
gtkfilesel.h \
gtkfixed.h \
gtkfontsel.h \
gtkframe.h \
gtkgamma.h \
gtkgc.h \
gtkhandlebox.h \
gtkhbbox.h \
gtkhbox.h \
gtkhpaned.h \
gtkhruler.h \
gtkhscale.h \
gtkhscrollbar.h \
gtkhseparator.h \
gtkhsv.h \
gtkimage.h \
gtkimcontext.h \
gtkimmulticontext.h \
gtkinputdialog.h \
gtkinvisible.h \
gtkitem.h \
gtkitemfactory.h \
gtklabel.h \
gtklayout.h \
gtklist.h \
gtklistitem.h \
gtkmain.h \
gtkmenu.h \
gtkmenubar.h \
gtkmenufactory.h \
gtkmenuitem.h \
gtkmenushell.h \
gtkmisc.h \
gtknotebook.h \
gtkobject.h \
gtkoptionmenu.h \
gtkpacker.h \
gtkpaned.h \
gdk-pixbuf-loader.h \
gtkpixmap.h \
gtkplug.h \
gtkpreview.h \
gtkprivate.h \
gtkprogress.h \
gtkprogressbar.h \
gtkradiobutton.h \
gtkradiomenuitem.h \
gtkrange.h \
gtkrc.h \
gtkruler.h \
gtkscale.h \
gtkscrollbar.h \
gtkscrolledwindow.h \
gtkselection.h \
gtkseparator.h \
gtksignal.h \
gtksocket.h \
gtkspinbutton.h \
gtkstyle.h \
gtkstatusbar.h \
gtktable.h \
gtktearoffmenuitem.h \
gtktextbuffer.h \
gtktextiter.h \
gtktextmark.h \
gtktexttag.h \
gtktexttagtable.h \
gtktextview.h \
gtktext.h \
gtkthemes.h \
gtktipsquery.h \
gtktogglebutton.h \
gtktoolbar.h \
gtktooltips.h \
gtktree.h \
gtktreeitem.h \
gtktypeutils.h \
gtkvbbox.h \
gtkvbox.h \
gtkviewport.h \
gtkvpaned.h \
gtkvruler.h \
gtkvscale.h \
gtkvscrollbar.h \
gtkvseparator.h \
gtkwidget.h \
gtkwindow.h
# More headers to use when autogenerating.
gdk_headers = \
../gdk/gdkcc.h \
../gdk/gdkcolor.h \
../gdk/gdkcursor.h \
../gdk/gdkdnd.h \
../gdk/gdkdrawable.h \
../gdk/gdkevents.h \
../gdk/gdkfont.h \
../gdk/gdkgc.h \
../gdk/gdkim.h \
../gdk/gdkimage.h \
../gdk/gdkinput.h \
../gdk/gdkpixmap.h \
../gdk/gdkproperty.h \
../gdk/gdkregion.h \
../gdk/gdkrgb.h \
../gdk/gdkselection.h \
../gdk/gdktypes.h \
../gdk/gdkvisual.h \
../gdk/gdkwindow.h
../config.h : ../config.h.win32
cp $< $@
gtkcompat.h : gtkcompat.h.win32
cp $< $@
GENERATED = gtk.defs gtktypebuiltins.h gtktypebuiltins_vars.c gtktypebuiltins_ids.c gtktypebuiltins_evals.c gtkmarshal.h gtkmarshal.c
#
# Generated source files:
#
generated : $(GENERATED)
gtk.defs : makeenums.pl gtk-boxed.defs $(source_headers) $(gdk_headers)
$(PERL) makeenums.pl defs $(source_headers) $(gdk_headers) >gd.tmp
cat gd.tmp gtk-boxed.defs >gtk.defs
rm gd.tmp
# generate type identifier header (GTK_TYPE_WIDGET_FLAGS)
gtktypebuiltins.h: gtk.defs maketypes.awk
$(AWK) -f maketypes.awk gtk.defs macros >gtktypebuiltins.h
# generate type identifier variables (GTK_TYPE_WIDGET_FLAGS)
gtktypebuiltins_vars.c: gtk.defs maketypes.awk
$(AWK) -f maketypes.awk gtk.defs variables >gtktypebuiltins_vars.c
# generate type entries for type-id registration
gtktypebuiltins_ids.c: gtk.defs maketypes.awk
$(AWK) -f maketypes.awk gtk.defs entries >gtktypebuiltins_ids.c
# generate enum value arrays
gtktypebuiltins_evals.c: makeenums.pl gtk.defs
$(PERL) makeenums.pl arrays $(source_headers) $(gdk_headers) >gtktypebuiltins_evals.c
gtkmarshal.h gtkmarshal.c : gtkmarshal.list genmarshal.pl
$(PERL) genmarshal.pl gtkmarshal.list s-gmh s-gmc
-rm gtkmarshal.c
mv s-gmc gtkmarshal.c
-rm gtkmarshal.h
mv s-gmh gtkmarshal.h
#
# Linking:
#
gtk-win32-$(GTK_VER).dll : generated $(gtk_OBJECTS) gtk.def
$(GLIB)/build-dll gtk-win32 $(GTK_VER) gtk.def $(gtk_OBJECTS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) -luser32
#
# Test programs:
#
testcalendar.exe : testcalendar.o
$(CC) $(CFLAGS) -o $@ testcalendar.o $(GTK_LIBS) $(GDK_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
# Must have separate rules for these objects that don't go in the DLL
testcalendar.o : testcalendar.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testcalendar\" testcalendar.c
testdnd.exe : testdnd.o
$(CC) $(CFLAGS) -o $@ testdnd.o $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testdnd.o : testdnd.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testdnd\" testdnd.c
testgtk.exe : testgtk.o
$(CC) $(CFLAGS) -o $@ testgtk.o $(GTK_LIBS) $(GDK_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testgtk.o : testgtk.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testgtk\" testgtk.c
testinput.exe : testinput.o
$(CC) $(CFLAGS) -o $@ testinput.o $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testinput.o : testinput.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testinput\" testinput.c
testrgb.exe : testrgb.o
$(CC) $(CFLAGS) -o $@ testrgb.o $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testrgb.o : testrgb.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testrgb\" testrgb.c
testselection.exe : testselection.o
$(CC) $(CFLAGS) -o $@ testselection.o $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testselection.o : testselection.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testselection\" testselection.c
testthreads.exe : testthreads.o
$(CC) $(CFLAGS) -o $@ testthreads.o $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(PTHREAD_LIB) $(LDFLAGS)
testthreads.o : testthreads.c
$(CC) $(CFLAGS) -I$(PTHREAD_INC) -c -DG_LOG_DOMAIN=\"testthreads\" -DUSE_PTHREADS=1 testthreads.c
simple.exe : simple.o
$(CC) $(CFLAGS) -o $@ simple.o $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
simple.o : simple.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"simple\" simple.c
# The rmgen target removes just the generated source files
rmgen:
-rm $(GENERATED)
# Hack to get an updated makefile.mingw automatically after updating
# makefile.mingw.in. Only for developer use.
makefile.mingw: makefile.mingw.in
sed -e 's,@GTK_MAJOR[_]VERSION@,@GTK_MAJOR_VERSION@,' \
-e 's,@GTK_MINOR[_]VERSION@,@GTK_MINOR_VERSION@,' <$< >$@

View File

@ -12,7 +12,7 @@
# and LOCALEDIR macros # and LOCALEDIR macros
ifndef PACKAGE ifndef PACKAGE
PACKAGE = gtk+ PACKAGE = gtk20
endif endif
ifndef INSTALLSUBDIR ifndef INSTALLSUBDIR
INSTALLSUBDIR = $(PACKAGE) INSTALLSUBDIR = $(PACKAGE)