gtk2/gdk/win32/gdkx.h
Tor Lillqvist 0ad4aa57d6 New font private structures, related to fontsets.
1999-11-07  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkprivate.h: New font private structures, related to
fontsets.

* gdk/win32/gdkfont.c: New functions gdk_font_list_new() and
gdk_font_list_free(). On X11, will just be wrappers to
XListFonts() and XFreeFontNames(). On Win32, the code previously
in gtkfontsel.c is now here.

New function gdk_font_xlfd_create(). On X11 will get the FONT
property of the font (for GDK_FONT_FONTs), or call
XBaseFontNameListOfFontSet (for GDK_FONT_FONTSETs), on Win32
builds a XLFD style name from the font information in the LOGFONT
struct(s).

New function gdk_font_xlfd_free(), which correspondingly frees the
string returned by gdk_font_xlfd_create().

Implement fontsets on Win32. Add a function that iterates over a
wide char string and calls a callback function for each substring
of wide chars from the same Unicode subrange (and thus probably
available in the same real font).

Improve the XLFD emulation a bit.

* gdk/win32/gdkim.c (gdk_nmbstowchar_ts): Small bugfix.

* gdk/win32/gdkevents.c: Workaround for suspected bug on Win2k
Beta3, WM_IME_CHAR messages don't seem to contain the composed
multi-byte char as with the Active IMM on Win9x. Oh well, handle
WM_IME_COMPOSITION with GCS_RESULTSTR instead, use
ImmGetCompositionStringW() to get the composed Unicode chars.

* gdk/win32/gdkgc.c
* gdk/win32/gdkdraw.c: Changes needed because of the font private
struct changes.

* gdk/win32/gdk.def: Add the new functions.
1999-11-08 00:09:29 +00:00

61 lines
2.5 KiB
C

/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* 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.
*/
/*
* Modified by the GTK+ Team and others 1997-1999. 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/.
*/
#ifndef __GDK_X_H__
#define __GDK_X_H__
#include <gdk/gdk.h>
#include <gdkprivate.h>
#include <time.h>
#include <locale.h>
#define GDK_ROOT_WINDOW() ((guint32) HWND_DESKTOP)
#define GDK_ROOT_PARENT() ((GdkWindow *) gdk_root_parent)
#define GDK_DISPLAY() NULL
#define GDK_DRAWABLE_XDISPLAY(win) NULL
#define GDK_DRAWABLE_XID(win) (((GdkDrawablePrivate*) win)->xwindow)
#define GDK_WINDOW_XDISPLAY GDK_DRAWABLE_XDISPLAY
#define GDK_WINDOW_XWINDOW GDK_DRAWABLE_XID
#define GDK_IMAGE_XDISPLAY(image) NULL
#define GDK_IMAGE_XIMAGE(image) (((GdkImagePrivate*) image)->ximage)
#define GDK_GC_XDISPLAY(gc) NULL
#define GDK_GC_XGC(gc) (((GdkGCPrivate*) gc)->xgc)
#define GDK_COLORMAP_XDISPLAY(cmap) NULL
#define GDK_COLORMAP_XCOLORMAP(cmap) (((GdkColormapPrivate*) cmap)->xcolormap)
#define GDK_VISUAL_XVISUAL(vis) (((GdkVisualPrivate*) vis)->xvisual)
#define GDK_FONT_XDISPLAY(font) NULL
GdkVisual* gdkx_visual_get (VisualID xvisualid);
/* XXX: Do not use this function until it is fixed. An X Colormap
* is useless unless we also have the visual. */
GdkColormap* gdkx_colormap_get (Colormap xcolormap);
/* Functions to create GDK pixmaps and windows from their native equivalents */
GdkPixmap *gdk_pixmap_foreign_new (guint32 anid);
GdkWindow *gdk_window_foreign_new (guint32 anid);
#endif /* __GDK_X_H__ */