]> Pileus Git - ~andy/gtk/blob - gdk/win32/gdkprivate-win32.h
gdk/gdk.def Update.
[~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 /* Routines from gdkgeometry-win32.c */
34 void
35 _gdk_window_init_position (GdkWindow *window);
36 void
37 _gdk_window_move_resize_child (GdkWindow *window,
38                                gint       x,
39                                gint       y,
40                                gint       width,
41                                gint       height);
42
43 void gdk_win32_selection_init (void);
44 void gdk_win32_dnd_exit (void);
45
46 void     gdk_win32_handle_table_insert    (HANDLE   *handle,
47                                            gpointer data);
48 void     gdk_win32_handle_table_remove    (HANDLE handle);
49
50 GdkGC *  _gdk_win32_gc_new       (GdkDrawable        *drawable,
51                                   GdkGCValues        *values,
52                                   GdkGCValuesMask     values_mask);
53
54 GdkImage* _gdk_win32_get_image (GdkDrawable    *drawable,
55                                 gint            x,
56                                 gint            y,
57                                 gint            width,
58                                 gint            height);
59
60 COLORREF gdk_colormap_color      (GdkColormap        *colormap,
61                                   gulong              pixel);
62
63 HRGN     BitmapToRegion          (HBITMAP hBmp);
64
65 gchar  *gdk_font_full_name_get   (GdkFont *font);
66
67 void    gdk_sel_prop_store       (GdkWindow *owner,
68                                   GdkAtom    type,
69                                   gint       format,
70                                   guchar    *data,
71                                   gint       length);
72
73 gint    gdk_nmbstowcs            (GdkWChar    *dest,
74                                   const gchar *src,
75                                   gint         src_len,
76                                   gint         dest_max);
77 gint    gdk_nmbstowchar_ts       (wchar_t     *dest,
78                                   const gchar *src,
79                                   gint         src_len,
80                                   gint         dest_max);
81
82 void    gdk_wchar_text_handle    (GdkFont       *font,
83                                   const wchar_t *wcstr,
84                                   int            wclen,
85                                   void         (*handler)(GdkWin32SingleFont *,
86                                                           const wchar_t *,
87                                                           int,
88                                                           void *),
89                                   void          *arg);
90
91 #ifdef G_ENABLE_DEBUG
92 gchar *gdk_win32_color_to_string      (const        GdkColor *color);
93 gchar *gdk_win32_cap_style_to_string  (GdkCapStyle  cap_style);
94 gchar *gdk_win32_fill_style_to_string (GdkFill      fill);
95 gchar *gdk_win32_function_to_string   (GdkFunction  function);
96 gchar *gdk_win32_join_style_to_string (GdkJoinStyle join_style);
97 gchar *gdk_win32_line_style_to_string (GdkLineStyle line_style);
98 gchar *gdk_win32_message_name         (UINT         msg);
99 #endif
100
101 gchar  *gdk_win32_last_error_string (void);
102 void    gdk_win32_api_failed        (const gchar *where,
103                                      gint line,
104                                      const gchar *api);
105 void    gdk_other_api_failed        (const gchar *where,
106                                      gint line,
107                                      const gchar *api);
108 void    gdk_win32_gdi_failed        (const gchar *where,
109                                      gint line,
110                                      const gchar *api);
111
112 #ifdef __GNUC__
113 #define WIN32_API_FAILED(api) gdk_win32_api_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
114 #define WIN32_GDI_FAILED(api) gdk_win32_gdi_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
115 #define OTHER_API_FAILED(api) gdk_other_api_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
116 #else
117 #define WIN32_API_FAILED(api) gdk_win32_api_failed (__FILE__, __LINE__, api)
118 #define WIN32_GDI_FAILED(api) gdk_win32_gdi_failed (__FILE__, __LINE__, api)
119 #define OTHER_API_FAILED(api) gdk_other_api_failed (__FILE__, __LINE__, api)
120 #endif
121  
122 extern LRESULT CALLBACK gdk_window_procedure (HWND, UINT, WPARAM, LPARAM);
123
124 extern HWND              gdk_root_window;
125 extern gboolean          gdk_event_func_from_window_proc;
126
127 extern HDC               gdk_display_hdc;
128 extern HINSTANCE         gdk_dll_hinstance;
129 extern HINSTANCE         gdk_app_hmodule;
130
131 extern UINT              gdk_selection_notify_msg;
132 extern UINT              gdk_selection_request_msg;
133 extern UINT              gdk_selection_clear_msg;
134 extern GdkAtom           gdk_clipboard_atom;
135 extern GdkAtom           gdk_win32_dropfiles_atom;
136 extern GdkAtom           gdk_ole2_dnd_atom;
137
138 extern DWORD             windows_version;
139 #define IS_WIN_NT()      (windows_version < 0x80000000)
140
141 extern gint              gdk_input_ignore_wintab;
142
143 #define IMAGE_PRIVATE_DATA(image) ((GdkImagePrivateWin32 *) GDK_IMAGE (image)->windowing_data)
144
145 #endif /* __GDK_PRIVATE_WIN32_H__ */