mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
d8b2f46c18
2004-07-07 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text) * gdk/win32/gdkfont-win32.c (gdk_text_extents) * gdk/win32/gdkproperty-win32.c (find_common_locale, gdk_property_change) * gdk/win32/gdkselection-win32.c (gdk_selection_convert): Use g_utf8_to_utf16() instead of the removed _gdk_utf8_to_ucs2() (see below). * gdk/win32/gdkglobals-win32.c * gdk/win32/gdkmain-win32.c (_gdk_windowing_init) * gdk/win3/gdkprivate-win32.h: Add a variable for the TARGETS atom. Initialize it. Declare it. Drop the variable for the COMPOUND_TEXT atom. * gdk/win32/gdkim-win32.c (gdk_wcstombs): Don't return UTF-8. This function is supposed to return the string in the locale's charset and encoding. Use g_convert(). (gdk_mbstowcs): Similarily, don't take an UTF-8 string, but a string in the locale's charset. Use g_convert(). (_gdk_ucs2_to_utf8, _gdk_utf8_to_wcs, _gdk_utf8_to_ucs2): Delete. The UCS-2 functions didn't handle surrogates anyway. Use GLib's UTF-16 functions instead. Windows uses UTF-16. * gdk/win32/gdkprivate-win32.h: Remove declarations of the deleted functions mentioned above. * gdk/win32/gdkproperty-win32.c (gdk_property_change): Use CF_TEXT also if the string is of type STRING, i.e. ISO-8859-1, and the current codepage is 1252, and contains no C1 chars. Accept also UTF8_STRING. * gdk/win32/gdkselection-win32.c (_gdk_selection_property_store): Mark as static. When storing STRING data, convert to Latin-1. (#140537) (gdk_selection_owner_set_for_display): Now that STRING is always ISO-8859-1, use UTF8_STRING when sending the selection request to ourselves. (gdk_selection_convert): Handle also UTF8_STRING. (#140537, John Ehresman) (gdk_text_property_to_text_list_for_display): Make work more like X11 version. Do obey the encoding parameter. (gdk_string_to_compound_text_for_display, gdk_utf8_to_compound_text_for_display): Don't even pretend supporting COMPOUND_TEXT. (gdk_utf8_to_string_target): Convert to ISO-8859-1, like on X11. (sanitize_utf8): Zero-terminate string.
69 lines
2.0 KiB
C
69 lines
2.0 KiB
C
/* GDK - The GIMP Drawing Kit
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
* Copyright (C) 1998-2002 Tor Lillqvist
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser 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
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser 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.
|
|
*/
|
|
|
|
/*
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
* files for a list of changes. These files are distributed with
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
*/
|
|
|
|
#include <config.h>
|
|
#include "gdktypes.h"
|
|
#include "gdkprivate-win32.h"
|
|
|
|
GdkDisplay *_gdk_display = NULL;
|
|
GdkScreen *_gdk_screen = NULL;
|
|
GdkWindow *_gdk_parent_root = NULL;
|
|
|
|
gint _gdk_num_monitors;
|
|
GdkRectangle *_gdk_monitors;
|
|
|
|
gint _gdk_offset_x, _gdk_offset_y;
|
|
|
|
HWND _gdk_root_window = NULL;
|
|
HDC _gdk_display_hdc;
|
|
HINSTANCE _gdk_dll_hinstance;
|
|
HINSTANCE _gdk_app_hmodule;
|
|
|
|
HKL _gdk_input_locale;
|
|
gboolean _gdk_input_locale_is_ime;
|
|
UINT _gdk_input_codepage;
|
|
|
|
WORD _cf_rtf;
|
|
WORD _cf_utf8_string;
|
|
|
|
GdkAtom _utf8_string;
|
|
GdkAtom _text_uri_list;
|
|
GdkAtom _targets;
|
|
|
|
GdkAtom _local_dnd;
|
|
GdkAtom _gdk_win32_dropfiles;
|
|
GdkAtom _gdk_ole2_dnd;
|
|
|
|
GdkAtom _gdk_selection_property;
|
|
|
|
GdkAtom _wm_transient_for;
|
|
|
|
DWORD _windows_version;
|
|
|
|
gint _gdk_input_ignore_wintab = TRUE;
|
|
gint _gdk_max_colors = 0;
|