]> Pileus Git - ~andy/gtk/blob - gdk/win32/gdkwin32.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gdk / win32 / gdkwin32.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, see <http://www.gnu.org/licenses/>.
16  */
17
18 /*
19  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
20  * file for a list of people on the GTK+ Team.  See the ChangeLog
21  * files for a list of changes.  These files are distributed with
22  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
23  */
24
25 #ifndef __GDK_WIN32_H__
26 #define __GDK_WIN32_H__
27
28 #define __GDKWIN32_H_INSIDE__
29
30 #include <gdk/win32/gdkwin32cursor.h>
31 #include <gdk/win32/gdkwin32display.h>
32 #include <gdk/win32/gdkwin32displaymanager.h>
33 #include <gdk/win32/gdkwin32dnd.h>
34 #include <gdk/win32/gdkwin32keys.h>
35 #include <gdk/win32/gdkwin32screen.h>
36 #include <gdk/win32/gdkwin32window.h>
37
38 #undef __GDKWIN32_H_INSIDE__
39
40 #include <gdk/gdkprivate.h>
41
42 #ifndef STRICT
43 #define STRICT                  /* We want strict type checks */
44 #endif
45 #include <windows.h>
46 #include <commctrl.h>
47
48 G_BEGIN_DECLS
49
50 #ifdef INSIDE_GDK_WIN32
51
52 #include "gdkprivate-win32.h"
53
54 #define GDK_WINDOW_HWND(win)          (GDK_WINDOW_IMPL_WIN32(win->impl)->handle)
55 #else
56 /* definition for exported 'internals' go here */
57 #define GDK_WINDOW_HWND(d) (gdk_win32_window_get_handle (d))
58
59 #endif
60
61 /* These need to be here so gtkstatusicon.c can pick them up if needed. */
62 #ifndef WM_XBUTTONDOWN
63 #define WM_XBUTTONDOWN 0x020B
64 #endif
65 #ifndef WM_XBUTTONUP
66 #define WM_XBUTTONUP 0x020C
67 #endif
68 #ifndef GET_XBUTTON_WPARAM
69 #define GET_XBUTTON_WPARAM(w) (HIWORD(w))
70 #endif
71 #ifndef XBUTTON1
72 #define XBUTTON1 1
73 #endif
74 #ifndef XBUTTON2
75 #define XBUTTON2 2
76 #endif
77
78
79 /* Return true if the GdkWindow is a win32 implemented window */
80 gboolean      gdk_win32_window_is_win32 (GdkWindow *window);
81 HWND          gdk_win32_window_get_impl_hwnd (GdkWindow *window);
82
83 /* Return the Gdk* for a particular HANDLE */
84 gpointer      gdk_win32_handle_table_lookup (HWND handle);
85 /* Translate from window to Windows handle */
86 HGDIOBJ       gdk_win32_window_get_handle (GdkWindow *window);
87
88 void          gdk_win32_selection_add_targets (GdkWindow  *owner,
89                                                GdkAtom     selection,
90                                                gint        n_targets,
91                                                GdkAtom    *targets);
92
93 /* For internal GTK use only */
94 GdkPixbuf    *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon);
95 HICON         gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf);
96 void          gdk_win32_set_modal_dialog_libgtk_only (HWND window);
97
98 GdkWindow *   gdk_win32_window_foreign_new_for_display (GdkDisplay *display,
99                                                         HWND        anid);
100 GdkWindow *   gdk_win32_window_lookup_for_display (GdkDisplay *display,
101                                                    HWND        anid);
102
103 G_END_DECLS
104
105 #endif /* __GDK_WIN32_H__ */