]> Pileus Git - ~andy/gtk/blob - gdk/win32/gdkprivate-win32.h
98cf2a01dfb95fe990804c73dd0dd18ef209445a
[~andy/gtk] / gdk / win32 / gdkprivate-win32.h
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
25  */
26
27 #ifndef __GDK_PRIVATE_WIN32_H__
28 #define __GDK_PRIVATE_WIN32_H__
29
30 #include <gdk/gdkprivate.h>
31 #include "gdkwin32.h"
32
33 void     gdk_win32_handle_table_insert    (HANDLE   handle,
34                                            gpointer data);
35 void     gdk_win32_handle_table_remove    (HANDLE handle);
36
37 GdkGC *  _gdk_win32_gc_new       (GdkDrawable        *drawable,
38                                   GdkGCValues        *values,
39                                   GdkGCValuesMask     values_mask);
40 COLORREF gdk_colormap_color      (GdkColormap        *colormap,
41                                   gulong              pixel);
42 HRGN     BitmapToRegion          (HBITMAP hBmp);
43
44 gchar  *gdk_font_full_name_get   (GdkFont *font);
45
46 void    gdk_sel_prop_store       (GdkWindow *owner,
47                                   GdkAtom    type,
48                                   gint       format,
49                                   guchar    *data,
50                                   gint       length);
51
52 gint    gdk_nmbstowcs            (GdkWChar    *dest,
53                                   const gchar *src,
54                                   gint         src_len,
55                                   gint         dest_max);
56 gint    gdk_nmbstowchar_ts       (wchar_t     *dest,
57                                   const gchar *src,
58                                   gint         src_len,
59                                   gint         dest_max);
60
61 void    gdk_wchar_text_handle    (GdkFont       *font,
62                                   const wchar_t *wcstr,
63                                   int            wclen,
64                                   void         (*handler)(GdkWin32SingleFont *,
65                                                           const wchar_t *,
66                                                           int,
67                                                           void *),
68                                   void          *arg);
69
70 #ifdef G_ENABLE_DEBUG
71 gchar *gdk_win32_color_to_string (const GdkColor *);
72 gchar *gdk_win32_message_name    (UINT msg);
73 #endif
74
75 gchar  *gdk_win32_last_error_string (void);
76 void    gdk_win32_api_failed        (const gchar *where,
77                                      gint line,
78                                      const gchar *api);
79 void    gdk_other_api_failed        (const gchar *where,
80                                      gint line,
81                                      const gchar *api);
82 void    gdk_win32_gdi_failed        (const gchar *where,
83                                      gint line,
84                                      const gchar *api);
85
86 #ifdef __GNUC__
87 #define WIN32_API_FAILED(api) gdk_win32_api_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
88 #define WIN32_GDI_FAILED(api) gdk_win32_gdi_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
89 #define OTHER_API_FAILED(api) gdk_other_api_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
90 #else
91 #define WIN32_API_FAILED(api) gdk_win32_api_failed (__FILE__, __LINE__, api)
92 #define WIN32_GDI_FAILED(api) gdk_win32_gdi_failed (__FILE__, __LINE__, api)
93 #define OTHER_API_FAILED(api) gdk_other_api_failed (__FILE__, __LINE__, api)
94 #endif
95  
96 extern LRESULT CALLBACK gdk_window_procedure (HWND, UINT, WPARAM, LPARAM);
97
98 extern HWND              gdk_root_window;
99 extern gboolean          gdk_event_func_from_window_proc;
100
101 extern HDC               gdk_display_hdc;
102 extern HINSTANCE         gdk_dll_hinstance;
103 extern HINSTANCE         gdk_app_hmodule;
104
105 extern UINT              gdk_selection_notify_msg;
106 extern UINT              gdk_selection_request_msg;
107 extern UINT              gdk_selection_clear_msg;
108 extern GdkAtom           gdk_clipboard_atom;
109 extern GdkAtom           gdk_win32_dropfiles_atom;
110 extern GdkAtom           gdk_ole2_dnd_atom;
111
112 extern DWORD             windows_version;
113 #define IS_WIN_NT()      (windows_version < 0x80000000)
114
115 extern gint              gdk_input_ignore_wintab;
116
117 #endif /* __GDK_PRIVATE_WIN32_H__ */