]> code.delx.au - gnu-emacs/blobdiff - src/w32gui.h
Fix input methods for GTK.
[gnu-emacs] / src / w32gui.h
index c1cf636d5dba37c05a610a5920fa94c12d1f2a7c..9f59290027cb1a0fd457f7ed734a7718a6b1e0a8 100644 (file)
@@ -18,17 +18,41 @@ along with GNU Emacs; see the file COPYING.  If not, write to
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#ifndef __W32GUI_H__
-#define __W32GUI_H__
-
+#ifndef EMACS_W32GUI_H
+#define EMACS_W32GUI_H
 #include <windows.h>
+
 #include "w32bdf.h"
 
+/* Emulate XCharStruct.  */
+typedef struct _XCharStruct
+{
+  short rbearing;
+  short lbearing;
+  short width;
+  short ascent;
+  short descent;
+} XCharStruct;
+
+enum w32_char_font_type
+{
+  UNKNOWN_FONT,
+  ANSI_FONT,
+  UNICODE_FONT,
+  BDF_1D_FONT,
+  BDF_2D_FONT
+};
+
 typedef struct W32FontStruct {
+  enum w32_char_font_type font_type;
   TEXTMETRIC tm;
   HFONT hfont;
   bdffont *bdf;
   int double_byte_p;
+  XCharStruct max_bounds;
+  XCharStruct scratch;
+  /* Only store info for ascii chars, if not fixed pitch.  */
+  XCharStruct * per_char;
 } W32FontStruct;
 
 typedef struct W32FontStruct XFontStruct;
@@ -54,6 +78,14 @@ typedef DWORD Time;
 typedef HWND Window;
 typedef HCURSOR Cursor;
 
+/* Windows equivalent of XImage.  */
+typedef struct _XImage
+{
+  unsigned char * data;
+  BITMAPINFO info;
+  /* Optional RGBQUAD array for palette follows (see BITMAPINFO docs).  */
+} XImage;
+
 #define FACE_DEFAULT (~0)
 
 extern HINSTANCE hinst;
@@ -98,4 +130,4 @@ extern int nCmdShow;
 
 extern int XParseGeometry ();
 
-#endif
+#endif /* EMACS_W32GUI_H */