]> Pileus Git - ~andy/gtk/blob - gdk/win32/gdkwin32.h
Merge remote-tracking branch 'origin/master' into gdk-backend-wayland
[~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, 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_WIN32_H__
28 #define __GDK_WIN32_H__
29
30 #define __GDKWIN32_H_INSIDE__
31
32 #include <gdk/win32/gdkwin32cursor.h>
33 #include <gdk/win32/gdkwin32display.h>
34 #include <gdk/win32/gdkwin32displaymanager.h>
35 #include <gdk/win32/gdkwin32dnd.h>
36 #include <gdk/win32/gdkwin32keys.h>
37 #include <gdk/win32/gdkwin32screen.h>
38 #include <gdk/win32/gdkwin32window.h>
39
40 #undef __GDKWIN32_H_INSIDE__
41
42 #include <gdk/gdkprivate.h>
43
44 #ifndef STRICT
45 #define STRICT                  /* We want strict type checks */
46 #endif
47 #include <windows.h>
48 #include <commctrl.h>
49
50 G_BEGIN_DECLS
51
52 #ifdef INSIDE_GDK_WIN32
53
54 #include "gdkprivate-win32.h"
55
56 #define GDK_WINDOW_HWND(win)          (GDK_WINDOW_IMPL_WIN32(win->impl)->handle)
57 #else
58 /* definition for exported 'internals' go here */
59 #define GDK_WINDOW_HWND(d) (gdk_win32_window_get_handle (d))
60
61 #endif
62
63 /* These need to be here so gtkstatusicon.c can pick them up if needed. */
64 #ifndef WM_XBUTTONDOWN
65 #define WM_XBUTTONDOWN 0x020B
66 #endif
67 #ifndef WM_XBUTTONUP
68 #define WM_XBUTTONUP 0x020C
69 #endif
70 #ifndef GET_XBUTTON_WPARAM
71 #define GET_XBUTTON_WPARAM(w) (HIWORD(w))
72 #endif
73 #ifndef XBUTTON1
74 #define XBUTTON1 1
75 #endif
76 #ifndef XBUTTON2
77 #define XBUTTON2 2
78 #endif
79
80
81 /* Return true if the GdkWindow is a win32 implemented window */
82 gboolean      gdk_win32_window_is_win32 (GdkWindow *window);
83
84 /* Return the Gdk* for a particular HANDLE */
85 gpointer      gdk_win32_handle_table_lookup (HWND handle);
86 /* Translate from window to Windows handle */
87 HGDIOBJ       gdk_win32_window_get_handle (GdkWindow *window);
88
89 void          gdk_win32_selection_add_targets (GdkWindow  *owner,
90                                                GdkAtom     selection,
91                                                gint        n_targets,
92                                                GdkAtom    *targets);
93
94 /* For internal GTK use only */
95 GdkPixbuf    *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon);
96 HICON         gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf);
97 void          gdk_win32_set_modal_dialog_libgtk_only (HWND window);
98
99 GdkWindow *   gdk_win32_window_foreign_new_for_display (GdkDisplay *display,
100                                                         HWND        anid);
101 GdkWindow *   gdk_win32_window_lookup_for_display (GdkDisplay *display,
102                                                    HWND        anid);
103
104 G_END_DECLS
105
106 #endif /* __GDK_WIN32_H__ */