forked from AuroraMiddleware/gtk
GDK-W32: remove trailing whitespace everywhere
This commit is contained in:
parent
5ed5d11632
commit
cd54a54346
@ -124,7 +124,7 @@ gchar *fname;
|
||||
fclose(f);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
p = line;
|
||||
while (fgets(line, sizeof(line), f))
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ hcursor_from_type (GdkCursorType cursor_type)
|
||||
if (cursors[i].builtin)
|
||||
return LoadCursor (NULL, cursors[i].builtin);
|
||||
}
|
||||
|
||||
|
||||
w = GetSystemMetrics (SM_CXCURSOR);
|
||||
h = GetSystemMetrics (SM_CYCURSOR);
|
||||
|
||||
@ -69,13 +69,13 @@ hcursor_from_type (GdkCursorType cursor_type)
|
||||
{
|
||||
ofs = (y * w) / 8;
|
||||
j = y * cursors[i].width;
|
||||
|
||||
|
||||
for (x = 0; x < cursors[i].width && x < w ; x++, j++)
|
||||
{
|
||||
gint pofs = ofs + x / 8;
|
||||
guchar data = (cursors[i].data[j/4] & (0xc0 >> (2 * (j%4)))) >> (2 * (3 - (j%4)));
|
||||
gint bit = 7 - (j % cursors[i].width) % 8;
|
||||
|
||||
|
||||
if (data)
|
||||
{
|
||||
RESET_BIT (and_plane[pofs], bit);
|
||||
@ -100,7 +100,7 @@ hcursor_from_type (GdkCursorType cursor_type)
|
||||
WIN32_API_FAILED ("CreateCursor");
|
||||
g_free (and_plane);
|
||||
g_free (xor_plane);
|
||||
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ static struct {
|
||||
{ "wait", IDC_WAIT }
|
||||
};
|
||||
|
||||
GdkCursor*
|
||||
GdkCursor*
|
||||
_gdk_win32_display_get_cursor_for_name (GdkDisplay *display,
|
||||
const gchar *name)
|
||||
{
|
||||
@ -253,7 +253,7 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
|
||||
/* Colour cursor */
|
||||
|
||||
gboolean no_alpha;
|
||||
|
||||
|
||||
if (!GDI_CALL (GetDIBits, (hdc, ii.hbmColor, 0, 1, NULL, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
goto out1;
|
||||
|
||||
@ -265,7 +265,7 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
|
||||
bmi.bi.biHeight = -h;
|
||||
|
||||
bits = g_malloc0 (4 * w * h);
|
||||
|
||||
|
||||
/* color data */
|
||||
if (!GDI_CALL (GetDIBits, (hdc, ii.hbmColor, 0, h, bits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
goto out2;
|
||||
@ -316,9 +316,9 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
|
||||
|
||||
w = bmi.bi.biWidth;
|
||||
h = ABS (bmi.bi.biHeight) / 2;
|
||||
|
||||
|
||||
bits = g_malloc0 (4 * w * h);
|
||||
|
||||
|
||||
/* masks */
|
||||
if (!GDI_CALL (GetDIBits, (hdc, ii.hbmMask, 0, h*2, bits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS)))
|
||||
goto out2;
|
||||
@ -458,7 +458,7 @@ _gdk_win32_display_supports_cursor_alpha (GdkDisplay *display)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gboolean
|
||||
_gdk_win32_display_supports_cursor_color (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (display == _gdk_display, FALSE);
|
||||
@ -479,13 +479,13 @@ _gdk_win32_display_get_default_cursor_size (GdkDisplay *display,
|
||||
*height = GetSystemMetrics (SM_CYCURSOR);
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
_gdk_win32_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height)
|
||||
{
|
||||
g_return_if_fail (display == _gdk_display);
|
||||
|
||||
|
||||
if (width)
|
||||
*width = GetSystemMetrics (SM_CXCURSOR);
|
||||
if (height)
|
||||
@ -806,6 +806,6 @@ gdk_win32_cursor_class_init(GdkWin32CursorClass *klass)
|
||||
GdkCursorClass *cursor_class = GDK_CURSOR_CLASS (klass);
|
||||
|
||||
object_class->finalize = _gdk_win32_cursor_finalize;
|
||||
|
||||
|
||||
cursor_class->get_surface = _gdk_win32_cursor_get_surface;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ _gdk_device_virtual_set_active (GdkDevice *device,
|
||||
return;
|
||||
|
||||
virtual->active_device = new_active;
|
||||
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
{
|
||||
_gdk_device_reset_axes (device);
|
||||
@ -116,10 +116,10 @@ _gdk_device_virtual_set_active (GdkDevice *device,
|
||||
for (i = 0; i < n_axes; i++)
|
||||
{
|
||||
_gdk_device_get_axis_info (new_active, i,
|
||||
&label_atom, &use,
|
||||
&label_atom, &use,
|
||||
&min_value, &max_value, &resolution);
|
||||
_gdk_device_add_axis (device,
|
||||
label_atom, use,
|
||||
label_atom, use,
|
||||
min_value, max_value, resolution);
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ gdk_device_win32_query_state (GdkDevice *device,
|
||||
|
||||
if (win_y)
|
||||
*win_y += _gdk_offset_y;
|
||||
|
||||
|
||||
if (root_x)
|
||||
*root_x += _gdk_offset_x;
|
||||
|
||||
|
@ -89,7 +89,7 @@ gdk_device_manager_win32_class_init (GdkDeviceManagerWin32Class *klass)
|
||||
}
|
||||
|
||||
static GdkDevice *
|
||||
create_pointer (GdkDeviceManager *device_manager,
|
||||
create_pointer (GdkDeviceManager *device_manager,
|
||||
GType g_type,
|
||||
const char *name,
|
||||
GdkDeviceType type)
|
||||
@ -106,7 +106,7 @@ create_pointer (GdkDeviceManager *device_manager,
|
||||
}
|
||||
|
||||
static GdkDevice *
|
||||
create_keyboard (GdkDeviceManager *device_manager,
|
||||
create_keyboard (GdkDeviceManager *device_manager,
|
||||
GType g_type,
|
||||
const char *name,
|
||||
GdkDeviceType type)
|
||||
@ -408,7 +408,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
|
||||
|
||||
wintab32_dll_path = g_malloc (n + 1 + strlen (WINTAB32_DLL));
|
||||
k = GetSystemDirectory (wintab32_dll_path, n);
|
||||
|
||||
|
||||
if (k == 0 || k > n)
|
||||
{
|
||||
g_free (wintab32_dll_path);
|
||||
@ -706,12 +706,12 @@ gdk_device_manager_win32_constructed (GObject *object)
|
||||
GdkDeviceManagerWin32 *device_manager;
|
||||
|
||||
device_manager = GDK_DEVICE_MANAGER_WIN32 (object);
|
||||
device_manager->core_pointer =
|
||||
device_manager->core_pointer =
|
||||
create_pointer (GDK_DEVICE_MANAGER (device_manager),
|
||||
GDK_TYPE_DEVICE_VIRTUAL,
|
||||
"Virtual Core Pointer",
|
||||
GDK_DEVICE_TYPE_MASTER);
|
||||
device_manager->system_pointer =
|
||||
device_manager->system_pointer =
|
||||
create_pointer (GDK_DEVICE_MANAGER (device_manager),
|
||||
GDK_TYPE_DEVICE_WIN32,
|
||||
"System Aggregated Pointer",
|
||||
@ -721,12 +721,12 @@ gdk_device_manager_win32_constructed (GObject *object)
|
||||
_gdk_device_set_associated_device (device_manager->system_pointer, device_manager->core_pointer);
|
||||
_gdk_device_add_slave (device_manager->core_pointer, device_manager->system_pointer);
|
||||
|
||||
device_manager->core_keyboard =
|
||||
device_manager->core_keyboard =
|
||||
create_keyboard (GDK_DEVICE_MANAGER (device_manager),
|
||||
GDK_TYPE_DEVICE_VIRTUAL,
|
||||
"Virtual Core Keyboard",
|
||||
GDK_DEVICE_TYPE_MASTER);
|
||||
device_manager->system_keyboard =
|
||||
device_manager->system_keyboard =
|
||||
create_keyboard (GDK_DEVICE_MANAGER (device_manager),
|
||||
GDK_TYPE_DEVICE_WIN32,
|
||||
"System Aggregated Keyboard",
|
||||
@ -754,7 +754,7 @@ gdk_device_manager_win32_list_devices (GdkDeviceManager *device_manager,
|
||||
devices = g_list_prepend (devices, device_manager_win32->core_keyboard);
|
||||
devices = g_list_prepend (devices, device_manager_win32->core_pointer);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (type == GDK_DEVICE_TYPE_SLAVE)
|
||||
{
|
||||
|
@ -439,7 +439,7 @@ failed:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static gboolean
|
||||
gdk_win32_display_request_selection_notification (GdkDisplay *display,
|
||||
GdkAtom selection)
|
||||
|
||||
@ -486,7 +486,7 @@ gdk_win32_display_store_clipboard (GdkDisplay *display,
|
||||
{
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static gboolean
|
||||
gdk_win32_display_supports_shapes (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
|
||||
@ -631,6 +631,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
|
||||
display_class->text_property_to_utf8_list = _gdk_win32_display_text_property_to_utf8_list;
|
||||
display_class->utf8_to_string_target = _gdk_win32_display_utf8_to_string_target;
|
||||
display_class->make_gl_context_current = _gdk_win32_display_make_gl_context_current;
|
||||
|
||||
|
||||
_gdk_win32_windowing_init ();
|
||||
}
|
||||
|
@ -67,7 +67,7 @@
|
||||
* the current Windows code page. See gdkim-win32.c for more info on that.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* The mingw.org compiler does not export GUIDS in it's import library. To work
|
||||
* around that, define INITGUID to have the GUIDS declared. */
|
||||
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
|
||||
|
@ -22,7 +22,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
/* Cannot use TrackMouseEvent, as the stupid WM_MOUSELEAVE message
|
||||
@ -32,7 +32,7 @@
|
||||
* GDK_LEAVE_NOTIFY events, which would help get rid of those pesky
|
||||
* tooltips sometimes popping up in the wrong place.
|
||||
*
|
||||
* Update: a combination of TrackMouseEvent, GetCursorPos and
|
||||
* Update: a combination of TrackMouseEvent, GetCursorPos and
|
||||
* GetWindowPos can and is actually used to get rid of those
|
||||
* pesky tooltips. It should be possible to use this for the
|
||||
* whole ENTER/LEAVE NOTIFY handling but some platforms may
|
||||
@ -85,7 +85,7 @@
|
||||
#define SWP_NOCLIENTSIZE 0x0800
|
||||
#define SWP_NOCLIENTMOVE 0x1000
|
||||
#define SWP_STATECHANGED 0x8000
|
||||
/*
|
||||
/*
|
||||
* Private function declarations
|
||||
*/
|
||||
|
||||
@ -235,7 +235,7 @@ generate_grab_broken_event (GdkDeviceManager *device_manager,
|
||||
_gdk_win32_append_event (event);
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
static LRESULT
|
||||
inner_window_procedure (HWND hwnd,
|
||||
UINT message,
|
||||
WPARAM wparam,
|
||||
@ -282,7 +282,7 @@ _gdk_win32_window_procedure (HWND hwnd,
|
||||
|
||||
GDK_NOTE (EVENTS, g_print ("%s%*s%s %p",
|
||||
(debug_indent > 0 ? "\n" : ""),
|
||||
debug_indent, "",
|
||||
debug_indent, "",
|
||||
_gdk_win32_message_to_string (message), hwnd));
|
||||
debug_indent += 2;
|
||||
retval = inner_window_procedure (hwnd, message, wparam, lparam);
|
||||
@ -293,7 +293,7 @@ _gdk_win32_window_procedure (HWND hwnd,
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
_gdk_events_init (void)
|
||||
{
|
||||
GSource *source;
|
||||
@ -385,7 +385,7 @@ _gdk_events_init (void)
|
||||
#endif
|
||||
|
||||
source = g_source_new (&event_funcs, sizeof (GSource));
|
||||
g_source_set_name (source, "GDK Win32 event source");
|
||||
g_source_set_name (source, "GDK Win32 event source");
|
||||
g_source_set_priority (source, GDK_PRIORITY_EVENTS);
|
||||
|
||||
#ifdef G_WITH_CYGWIN
|
||||
@ -396,7 +396,7 @@ _gdk_events_init (void)
|
||||
event_poll_fd.fd = G_WIN32_MSG_HANDLE;
|
||||
#endif
|
||||
event_poll_fd.events = G_IO_IN;
|
||||
|
||||
|
||||
g_source_add_poll (source, &event_poll_fd);
|
||||
g_source_set_can_recurse (source, TRUE);
|
||||
g_source_attach (source, NULL);
|
||||
@ -545,7 +545,7 @@ static gint
|
||||
build_pointer_event_state (MSG *msg)
|
||||
{
|
||||
gint state;
|
||||
|
||||
|
||||
state = 0;
|
||||
|
||||
if (msg->wParam & MK_CONTROL)
|
||||
@ -595,7 +595,7 @@ build_wm_ime_composition_event (GdkEvent *event,
|
||||
BYTE *key_state)
|
||||
{
|
||||
event->key.time = _gdk_win32_get_next_tick (msg->time);
|
||||
|
||||
|
||||
build_key_event_state (event, key_state);
|
||||
|
||||
event->key.hardware_keycode = 0; /* FIXME: What should it be? */
|
||||
@ -702,7 +702,7 @@ _gdk_win32_print_event (const GdkEvent *event)
|
||||
event->button.x_root, event->button.y_root);
|
||||
print_event_state (event->button.state);
|
||||
break;
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
if (event->key.length == 0)
|
||||
escaped = g_strdup ("");
|
||||
@ -804,8 +804,8 @@ _gdk_win32_print_event (const GdkEvent *event)
|
||||
default:
|
||||
/* Nothing */
|
||||
break;
|
||||
}
|
||||
g_print ("%s", (debug_indent == 0 ? "\n" : ""));
|
||||
}
|
||||
g_print ("%s", (debug_indent == 0 ? "\n" : ""));
|
||||
}
|
||||
|
||||
static char *
|
||||
@ -846,14 +846,14 @@ fixup_event (GdkEvent *event)
|
||||
if ((event->any.type == GDK_OWNER_CHANGE) &&
|
||||
(event->owner_change.owner != NULL))
|
||||
g_object_ref (event->owner_change.owner);
|
||||
event->any.send_event = InSendMessage ();
|
||||
event->any.send_event = InSendMessage ();
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_win32_append_event (GdkEvent *event)
|
||||
{
|
||||
GList *link;
|
||||
|
||||
|
||||
fixup_event (event);
|
||||
#if 1
|
||||
link = _gdk_event_queue_append (_gdk_display, event);
|
||||
@ -875,7 +875,7 @@ fill_key_event_string (GdkEvent *event)
|
||||
/* Fill in event->string crudely, since various programs
|
||||
* depend on it.
|
||||
*/
|
||||
|
||||
|
||||
c = 0;
|
||||
if (event->key.keyval != GDK_KEY_VoidSymbol)
|
||||
c = gdk_keyval_to_unicode (event->key.keyval);
|
||||
@ -884,7 +884,7 @@ fill_key_event_string (GdkEvent *event)
|
||||
{
|
||||
gsize bytes_written;
|
||||
gint len;
|
||||
|
||||
|
||||
/* Apply the control key - Taken from Xlib
|
||||
*/
|
||||
if (event->key.state & GDK_CONTROL_MASK)
|
||||
@ -904,10 +904,10 @@ fill_key_event_string (GdkEvent *event)
|
||||
else if (c == '/')
|
||||
c = '_' & 0x1F;
|
||||
}
|
||||
|
||||
|
||||
len = g_unichar_to_utf8 (c, buf);
|
||||
buf[len] = '\0';
|
||||
|
||||
|
||||
event->key.string = g_locale_from_utf8 (buf, len,
|
||||
NULL, &bytes_written,
|
||||
NULL);
|
||||
@ -925,7 +925,7 @@ fill_key_event_string (GdkEvent *event)
|
||||
event->key.length = 1;
|
||||
event->key.string = g_strdup ("\r");
|
||||
}
|
||||
|
||||
|
||||
if (!event->key.string)
|
||||
{
|
||||
event->key.length = 0;
|
||||
@ -953,7 +953,7 @@ apply_event_filters (GdkWindow *window,
|
||||
* more events and append them after it if it likes.
|
||||
*/
|
||||
node = _gdk_event_queue_append (_gdk_display, event);
|
||||
|
||||
|
||||
tmp_list = *filters;
|
||||
while (tmp_list)
|
||||
{
|
||||
@ -1122,7 +1122,7 @@ send_crossing_event (GdkDisplay *display,
|
||||
|
||||
pt = *screen_pt;
|
||||
ScreenToClient (GDK_WINDOW_HWND (window), &pt);
|
||||
|
||||
|
||||
event = gdk_event_new (type);
|
||||
event->crossing.window = window;
|
||||
event->crossing.subwindow = subwindow;
|
||||
@ -1435,12 +1435,12 @@ _gdk_win32_emit_configure_event (GdkWindow *window)
|
||||
|
||||
window->width = client_rect.right - client_rect.left;
|
||||
window->height = client_rect.bottom - client_rect.top;
|
||||
|
||||
|
||||
window->x = point.x;
|
||||
window->y = point.y;
|
||||
|
||||
_gdk_window_update_size (window);
|
||||
|
||||
|
||||
if (window->event_mask & GDK_STRUCTURE_MASK)
|
||||
{
|
||||
GdkEvent *event = gdk_event_new (GDK_CONFIGURE);
|
||||
@ -1449,7 +1449,7 @@ _gdk_win32_emit_configure_event (GdkWindow *window)
|
||||
|
||||
event->configure.width = client_rect.right - client_rect.left;
|
||||
event->configure.height = client_rect.bottom - client_rect.top;
|
||||
|
||||
|
||||
event->configure.x = point.x;
|
||||
event->configure.y = point.y;
|
||||
|
||||
@ -1552,7 +1552,7 @@ handle_wm_paint (MSG *msg,
|
||||
DeleteObject (hrgn);
|
||||
}
|
||||
|
||||
static VOID CALLBACK
|
||||
static VOID CALLBACK
|
||||
modal_timer_proc (HWND hwnd,
|
||||
UINT msg,
|
||||
UINT_PTR id,
|
||||
@ -1876,7 +1876,7 @@ gdk_event_translate (MSG *msg,
|
||||
/* Apply global filters */
|
||||
|
||||
GdkFilterReturn result = apply_event_filters (NULL, msg, &_gdk_default_filters);
|
||||
|
||||
|
||||
/* If result is GDK_FILTER_CONTINUE, we continue as if nothing
|
||||
* happened. If it is GDK_FILTER_REMOVE or GDK_FILTER_TRANSLATE,
|
||||
* we return TRUE, and DefWindowProcW() will not be called.
|
||||
@ -1923,7 +1923,7 @@ gdk_event_translate (MSG *msg,
|
||||
* #define return to a syntax error...
|
||||
*/
|
||||
#define return GOTO_DONE_INSTEAD
|
||||
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window) && window->filters)
|
||||
{
|
||||
/* Apply per-window filters */
|
||||
@ -2035,7 +2035,7 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
case WM_KEYUP:
|
||||
case WM_KEYDOWN:
|
||||
GDK_NOTE (EVENTS,
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" %s ch:%.02x %s",
|
||||
_gdk_win32_key_to_string (msg->lParam),
|
||||
(int) msg->wParam,
|
||||
@ -2094,7 +2094,7 @@ gdk_event_translate (MSG *msg,
|
||||
API_CALL (GetKeyboardState, (key_state));
|
||||
|
||||
/* g_print ("ctrl:%02x lctrl:%02x rctrl:%02x alt:%02x lalt:%02x ralt:%02x\n", key_state[VK_CONTROL], key_state[VK_LCONTROL], key_state[VK_RCONTROL], key_state[VK_MENU], key_state[VK_LMENU], key_state[VK_RMENU]); */
|
||||
|
||||
|
||||
build_key_event_state (event, key_state);
|
||||
|
||||
if (msg->wParam == VK_PACKET &&
|
||||
@ -2192,7 +2192,7 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
_gdk_win32_append_event (event);
|
||||
}
|
||||
|
||||
|
||||
if (window->event_mask & GDK_KEY_RELEASE_MASK)
|
||||
{
|
||||
/* Build a key release event. */
|
||||
@ -2227,7 +2227,7 @@ gdk_event_translate (MSG *msg,
|
||||
button = 5;
|
||||
|
||||
buttondown0:
|
||||
GDK_NOTE (EVENTS,
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" (%d,%d)",
|
||||
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
|
||||
|
||||
@ -2266,7 +2266,7 @@ gdk_event_translate (MSG *msg,
|
||||
button = 5;
|
||||
|
||||
buttonup0:
|
||||
GDK_NOTE (EVENTS,
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" (%d,%d)",
|
||||
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
|
||||
|
||||
@ -2344,7 +2344,7 @@ gdk_event_translate (MSG *msg,
|
||||
if (mouse_window != new_window)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" mouse_sinwod %p -> %p",
|
||||
mouse_window ? GDK_WINDOW_HWND (mouse_window) : NULL,
|
||||
mouse_window ? GDK_WINDOW_HWND (mouse_window) : NULL,
|
||||
new_window ? GDK_WINDOW_HWND (new_window) : NULL));
|
||||
synthesize_crossing_events (_gdk_display,
|
||||
mouse_window, new_window,
|
||||
@ -2358,7 +2358,7 @@ gdk_event_translate (MSG *msg,
|
||||
if (new_window != NULL)
|
||||
track_mouse_event (TME_LEAVE, GDK_WINDOW_HWND (new_window));
|
||||
}
|
||||
else if (new_window != NULL &&
|
||||
else if (new_window != NULL &&
|
||||
new_window == mouse_window_ignored_leave)
|
||||
{
|
||||
/* If we ignored a leave event for this window and we're now getting
|
||||
@ -2423,7 +2423,7 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
/* The synapitics trackpad drivers have this irritating
|
||||
feature where it pops up a window right under the pointer
|
||||
when you scroll. We ignore the leave and enter events for
|
||||
when you scroll. We ignore the leave and enter events for
|
||||
this window */
|
||||
if (GetClassNameA (hwnd, classname, sizeof(classname)) &&
|
||||
strcmp (classname, SYNAPSIS_ICON_WINDOW_CLASS) == 0)
|
||||
@ -2464,7 +2464,7 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
if ((hwnd = WindowFromPoint (point)) == NULL)
|
||||
break;
|
||||
|
||||
|
||||
{
|
||||
char classname[64];
|
||||
|
||||
@ -2519,7 +2519,7 @@ gdk_event_translate (MSG *msg,
|
||||
gdk_event_set_source_device (event, device_manager_win32->system_pointer);
|
||||
|
||||
_gdk_win32_append_event (event);
|
||||
|
||||
|
||||
return_val = TRUE;
|
||||
break;
|
||||
|
||||
@ -2563,7 +2563,7 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
case WM_MOUSEACTIVATE:
|
||||
{
|
||||
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP
|
||||
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP
|
||||
|| !window->accept_focus)
|
||||
{
|
||||
*ret_valp = MA_NOACTIVATE;
|
||||
@ -2604,7 +2604,7 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
GDK_NOTE (EVENTS, g_print (" %p", (HANDLE) msg->wParam));
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
break;
|
||||
|
||||
@ -2717,7 +2717,7 @@ gdk_event_translate (MSG *msg,
|
||||
windowpos->cx, windowpos->cy, windowpos->x, windowpos->y));
|
||||
|
||||
/* Break grabs on unmap or minimize */
|
||||
if (windowpos->flags & SWP_HIDEWINDOW ||
|
||||
if (windowpos->flags & SWP_HIDEWINDOW ||
|
||||
((windowpos->flags & SWP_STATECHANGED) && IsIconic (msg->hwnd)))
|
||||
{
|
||||
GdkDevice *device = gdk_device_manager_get_client_pointer (device_manager);
|
||||
@ -2767,14 +2767,14 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
/* Whenever one window changes iconified state we need to also
|
||||
* change the iconified state in all transient related windows,
|
||||
* as windows doesn't give icons for transient childrens.
|
||||
* as windows doesn't give icons for transient childrens.
|
||||
*/
|
||||
if ((old_state & GDK_WINDOW_STATE_ICONIFIED) !=
|
||||
if ((old_state & GDK_WINDOW_STATE_ICONIFIED) !=
|
||||
(new_state & GDK_WINDOW_STATE_ICONIFIED))
|
||||
do_show_window (window, (new_state & GDK_WINDOW_STATE_ICONIFIED));
|
||||
|
||||
|
||||
/* When un-minimizing, make sure we're stacked under any
|
||||
/* When un-minimizing, make sure we're stacked under any
|
||||
transient-type windows. */
|
||||
if (!(old_state & GDK_WINDOW_STATE_ICONIFIED) &&
|
||||
(new_state & GDK_WINDOW_STATE_ICONIFIED))
|
||||
@ -2834,7 +2834,7 @@ gdk_event_translate (MSG *msg,
|
||||
(msg->wParam == WMSZ_TOP ? "TOP" :
|
||||
(msg->wParam == WMSZ_TOPRIGHT ? "TOPRIGHT" :
|
||||
(msg->wParam == WMSZ_RIGHT ? "RIGHT" :
|
||||
|
||||
|
||||
(msg->wParam == WMSZ_BOTTOMRIGHT ? "BOTTOMRIGHT" :
|
||||
"???")))))))),
|
||||
_gdk_win32_rect_to_string (&rect),
|
||||
@ -2862,7 +2862,7 @@ gdk_event_translate (MSG *msg,
|
||||
ClientToScreen (GDK_WINDOW_HWND (window), &point);
|
||||
rect.right = point.x;
|
||||
rect.bottom = point.y;
|
||||
|
||||
|
||||
GDK_NOTE (EVENTS, g_print (" (also BASE_SIZE, using %s)",
|
||||
_gdk_win32_rect_to_string (&rect)));
|
||||
}
|
||||
@ -3171,11 +3171,11 @@ gdk_event_translate (MSG *msg,
|
||||
case WM_DISPLAYCHANGE:
|
||||
handle_display_change ();
|
||||
break;
|
||||
|
||||
|
||||
case WM_DWMCOMPOSITIONCHANGED:
|
||||
_gdk_win32_window_enable_transparency (window);
|
||||
break;
|
||||
|
||||
|
||||
case WM_DESTROYCLIPBOARD:
|
||||
if (!_ignore_destroy_clipboard)
|
||||
{
|
||||
@ -3308,12 +3308,12 @@ gdk_event_translate (MSG *msg,
|
||||
GDK_NOTE (EVENTS, g_print (" %d %p",
|
||||
(int) msg->wParam, (gpointer) msg->lParam));
|
||||
goto wintab;
|
||||
|
||||
|
||||
case WT_CSRCHANGE:
|
||||
GDK_NOTE (EVENTS, g_print (" %d %p",
|
||||
(int) msg->wParam, (gpointer) msg->lParam));
|
||||
goto wintab;
|
||||
|
||||
|
||||
case WT_PROXIMITY:
|
||||
GDK_NOTE (EVENTS, g_print (" %p %d %d",
|
||||
(gpointer) msg->wParam,
|
||||
@ -3338,7 +3338,7 @@ done:
|
||||
|
||||
if (window)
|
||||
g_object_unref (window);
|
||||
|
||||
|
||||
#undef return
|
||||
return return_val;
|
||||
}
|
||||
@ -3350,7 +3350,7 @@ _gdk_win32_display_queue_events (GdkDisplay *display)
|
||||
|
||||
if (modal_win32_dialog != NULL)
|
||||
return;
|
||||
|
||||
|
||||
while (!_gdk_event_queue_find_first (display) &&
|
||||
PeekMessageW (&msg, NULL, 0, 0, PM_REMOVE))
|
||||
{
|
||||
@ -3385,7 +3385,7 @@ static gboolean
|
||||
gdk_event_check (GSource *source)
|
||||
{
|
||||
gboolean retval;
|
||||
|
||||
|
||||
gdk_threads_enter ();
|
||||
|
||||
if (_gdk_display->event_pause_count > 0)
|
||||
@ -3408,7 +3408,7 @@ gdk_event_dispatch (GSource *source,
|
||||
gpointer user_data)
|
||||
{
|
||||
GdkEvent *event;
|
||||
|
||||
|
||||
gdk_threads_enter ();
|
||||
|
||||
_gdk_win32_display_queue_events (_gdk_display);
|
||||
@ -3417,18 +3417,18 @@ gdk_event_dispatch (GSource *source,
|
||||
if (event)
|
||||
{
|
||||
_gdk_event_emit (event);
|
||||
|
||||
|
||||
gdk_event_free (event);
|
||||
|
||||
/* Do drag & drop if it is still pending */
|
||||
if (_dnd_source_state == GDK_WIN32_DND_PENDING)
|
||||
if (_dnd_source_state == GDK_WIN32_DND_PENDING)
|
||||
{
|
||||
_dnd_source_state = GDK_WIN32_DND_DRAGGING;
|
||||
_gdk_win32_dnd_do_dragdrop ();
|
||||
_dnd_source_state = GDK_WIN32_DND_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gdk_threads_leave ();
|
||||
|
||||
return TRUE;
|
||||
|
@ -27,7 +27,7 @@
|
||||
* win32_x/win32_y < -16383) after scrolling. They needed to be moved
|
||||
* back to the real position determined by gdk_window_compute_position().
|
||||
* This is handled in gdk_window_postmove().
|
||||
*
|
||||
*
|
||||
* The X11 version by Owen Taylor <otaylor@redhat.com>
|
||||
* Copyright Red Hat, Inc. 2000
|
||||
* Win32 hack by Tor Lillqvist <tml@iki.fi>
|
||||
@ -80,15 +80,15 @@ _gdk_window_move_resize_child (GdkWindow *window,
|
||||
|
||||
_gdk_win32_window_tmp_unset_parent_bg (window);
|
||||
_gdk_win32_window_tmp_unset_bg (window, TRUE);
|
||||
|
||||
|
||||
GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,%d,%d,%d,%d,"
|
||||
"NOACTIVATE|NOZORDER)\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
window->x + window->parent->abs_x, window->y + window->parent->abs_y,
|
||||
window->x + window->parent->abs_x, window->y + window->parent->abs_y,
|
||||
width, height));
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
window->x + window->parent->abs_x, window->y + window->parent->abs_y,
|
||||
window->x + window->parent->abs_x, window->y + window->parent->abs_y,
|
||||
width, height,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER));
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -19,12 +19,12 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
/* This file should really be one level up, in the backend-independent
|
||||
* GDK, and the x11/gdkinput.c could also be removed.
|
||||
*
|
||||
*
|
||||
* That stuff in x11/gdkinput.c which really *is* X11-dependent should
|
||||
* be in x11/gdkinput-x11.c.
|
||||
*/
|
||||
|
@ -72,14 +72,14 @@ static void
|
||||
print_keysym_tab (void)
|
||||
{
|
||||
gint vk;
|
||||
|
||||
|
||||
g_print ("keymap:%s%s\n",
|
||||
_gdk_keyboard_has_altgr ? " (uses AltGr)" : "",
|
||||
(gdk_shift_modifiers & GDK_LOCK_MASK) ? " (has ShiftLock)" : "");
|
||||
for (vk = 0; vk < KEY_STATE_SIZE; vk++)
|
||||
{
|
||||
gint state;
|
||||
|
||||
|
||||
g_print ("%#.02x: ", vk);
|
||||
for (state = 0; state < 4; state++)
|
||||
{
|
||||
@ -387,7 +387,7 @@ update_keymap (void)
|
||||
for (shift = 0; shift < 4; shift++)
|
||||
{
|
||||
guint *ksymp = keysym_tab + vk*4 + shift;
|
||||
|
||||
|
||||
set_shift_vks (key_state, shift);
|
||||
|
||||
*ksymp = 0;
|
||||
@ -468,7 +468,7 @@ update_keymap (void)
|
||||
(keysym_tab[vk*4 + 3] != GDK_KEY_VoidSymbol &&
|
||||
keysym_tab[vk*4 + 1] != keysym_tab[vk*4 + 3]))
|
||||
_gdk_keyboard_has_altgr = TRUE;
|
||||
|
||||
|
||||
if (!capslock_tested)
|
||||
{
|
||||
/* Can we use this virtual key to determine the CapsLock
|
||||
@ -483,9 +483,9 @@ update_keymap (void)
|
||||
keysym_tab[vk*4 + 1] != gdk_keyval_to_upper (keysym_tab[vk*4 + 0]))
|
||||
{
|
||||
guchar chars[2];
|
||||
|
||||
|
||||
capslock_tested = TRUE;
|
||||
|
||||
|
||||
key_state[VK_SHIFT] = 0;
|
||||
key_state[VK_CONTROL] = key_state[VK_MENU] = 0;
|
||||
key_state[VK_CAPITAL] = 1;
|
||||
@ -502,12 +502,12 @@ update_keymap (void)
|
||||
}
|
||||
}
|
||||
key_state[VK_CAPITAL] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
GDK_NOTE (EVENTS, print_keysym_tab ());
|
||||
}
|
||||
}
|
||||
|
||||
GdkKeymap*
|
||||
_gdk_win32_display_get_keymap (GdkDisplay *display)
|
||||
@ -581,14 +581,14 @@ gdk_win32_keymap_get_entries_for_keyval (GdkKeymap *keymap,
|
||||
g_return_val_if_fail (keys != NULL, FALSE);
|
||||
g_return_val_if_fail (n_keys != NULL, FALSE);
|
||||
g_return_val_if_fail (keyval != 0, FALSE);
|
||||
|
||||
|
||||
retval = g_array_new (FALSE, FALSE, sizeof (GdkKeymapKey));
|
||||
|
||||
/* Accept only the default keymap */
|
||||
if (keymap == NULL || keymap == gdk_keymap_get_default ())
|
||||
{
|
||||
gint vk;
|
||||
|
||||
|
||||
update_keymap ();
|
||||
|
||||
for (vk = 0; vk < KEY_STATE_SIZE; vk++)
|
||||
@ -600,13 +600,13 @@ gdk_win32_keymap_get_entries_for_keyval (GdkKeymap *keymap,
|
||||
if (keysym_tab[vk*4+i] == keyval)
|
||||
{
|
||||
GdkKeymapKey key;
|
||||
|
||||
|
||||
key.keycode = vk;
|
||||
|
||||
|
||||
/* 2 levels (normal, shift), two groups (normal, AltGr) */
|
||||
key.group = i / 2;
|
||||
key.level = i % 2;
|
||||
|
||||
|
||||
g_array_append_val (retval, key);
|
||||
}
|
||||
}
|
||||
@ -639,7 +639,7 @@ gdk_win32_keymap_get_entries_for_keyval (GdkKeymap *keymap,
|
||||
*keys = NULL;
|
||||
*n_keys = 0;
|
||||
}
|
||||
|
||||
|
||||
g_array_free (retval, retval->len > 0 ? FALSE : TRUE);
|
||||
|
||||
return *n_keys > 0;
|
||||
@ -669,17 +669,17 @@ gdk_win32_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
*n_entries = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (keys)
|
||||
key_array = g_array_new (FALSE, FALSE, sizeof (GdkKeymapKey));
|
||||
else
|
||||
key_array = NULL;
|
||||
|
||||
|
||||
if (keyvals)
|
||||
keyval_array = g_array_new (FALSE, FALSE, sizeof (guint));
|
||||
else
|
||||
keyval_array = NULL;
|
||||
|
||||
|
||||
/* Accept only the default keymap */
|
||||
if (keymap == NULL || keymap == gdk_keymap_get_default ())
|
||||
{
|
||||
@ -692,12 +692,12 @@ gdk_win32_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
if (key_array)
|
||||
{
|
||||
GdkKeymapKey key;
|
||||
|
||||
|
||||
key.keycode = hardware_keycode;
|
||||
|
||||
|
||||
key.group = i / 2;
|
||||
key.level = i % 2;
|
||||
|
||||
|
||||
g_array_append_val (key_array, key);
|
||||
}
|
||||
|
||||
@ -727,7 +727,7 @@ gdk_win32_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
|
||||
if (keyvals)
|
||||
*keyvals = NULL;
|
||||
|
||||
|
||||
*n_entries = 0;
|
||||
}
|
||||
|
||||
@ -748,20 +748,20 @@ gdk_win32_keymap_lookup_key (GdkKeymap *keymap,
|
||||
g_return_val_if_fail (keymap == NULL || GDK_IS_KEYMAP (keymap), 0);
|
||||
g_return_val_if_fail (key != NULL, 0);
|
||||
g_return_val_if_fail (key->group < 4, 0);
|
||||
|
||||
|
||||
/* Accept only the default keymap */
|
||||
if (keymap != NULL && keymap != gdk_keymap_get_default ())
|
||||
return 0;
|
||||
|
||||
update_keymap ();
|
||||
|
||||
|
||||
if (key->keycode >= KEY_STATE_SIZE ||
|
||||
key->group < 0 || key->group >= 2 ||
|
||||
key->level < 0 || key->level >= 2)
|
||||
return 0;
|
||||
|
||||
|
||||
sym = keysym_tab[key->keycode*4 + key->group*2 + key->level];
|
||||
|
||||
|
||||
if (sym == GDK_KEY_VoidSymbol)
|
||||
return 0;
|
||||
else
|
||||
@ -783,10 +783,10 @@ gdk_win32_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
gint shift_level;
|
||||
gboolean ignore_shift = FALSE;
|
||||
gboolean ignore_group = FALSE;
|
||||
|
||||
|
||||
g_return_val_if_fail (keymap == NULL || GDK_IS_KEYMAP (keymap), FALSE);
|
||||
g_return_val_if_fail (group < 4, FALSE);
|
||||
|
||||
|
||||
#if 0
|
||||
GDK_NOTE (EVENTS, g_print ("gdk_keymap_translate_keyboard_state: keycode=%#x state=%#x group=%d\n",
|
||||
hardware_keycode, state, group));
|
||||
@ -896,7 +896,7 @@ gdk_win32_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
(ignore_group ? 0 : GDK_MOD2_MASK) |
|
||||
(ignore_shift ? 0 : (GDK_SHIFT_MASK|GDK_LOCK_MASK));
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
GDK_NOTE (EVENTS, g_print ("... group=%d level=%d cmods=%#x keyval=%s\n",
|
||||
group, shift_level, tmp_modifiers, gdk_keyval_name (tmp_keyval)));
|
||||
|
@ -20,7 +20,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -49,16 +49,16 @@ static gboolean gdk_synchronize = FALSE;
|
||||
static gboolean dummy;
|
||||
|
||||
const GOptionEntry _gdk_windowing_args[] = {
|
||||
{ "sync", 0, 0, G_OPTION_ARG_NONE, &gdk_synchronize,
|
||||
{ "sync", 0, 0, G_OPTION_ARG_NONE, &gdk_synchronize,
|
||||
/* Description of --sync in --help output */ N_("Don't batch GDI requests"), NULL },
|
||||
{ "no-wintab", 0, 0, G_OPTION_ARG_NONE, &_gdk_input_ignore_wintab,
|
||||
{ "no-wintab", 0, 0, G_OPTION_ARG_NONE, &_gdk_input_ignore_wintab,
|
||||
/* Description of --no-wintab in --help output */ N_("Don't use the Wintab API for tablet support"), NULL },
|
||||
{ "ignore-wintab", 0, 0, G_OPTION_ARG_NONE, &_gdk_input_ignore_wintab,
|
||||
{ "ignore-wintab", 0, 0, G_OPTION_ARG_NONE, &_gdk_input_ignore_wintab,
|
||||
/* Description of --ignore-wintab in --help output */ N_("Same as --no-wintab"), NULL },
|
||||
{ "use-wintab", 0, 0, G_OPTION_ARG_NONE, &dummy,
|
||||
/* Description of --use-wintab in --help output */ N_("Do use the Wintab API [default]"), NULL },
|
||||
{ "max-colors", 0, 0, G_OPTION_ARG_INT, &_gdk_max_colors,
|
||||
/* Description of --max-colors=COLORS in --help output */ N_("Size of the palette in 8 bit mode"),
|
||||
{ "max-colors", 0, 0, G_OPTION_ARG_INT, &_gdk_max_colors,
|
||||
/* Description of --max-colors=COLORS in --help output */ N_("Size of the palette in 8 bit mode"),
|
||||
/* Placeholder in --max-colors=COLORS in --help output */ N_("COLORS") },
|
||||
{ NULL }
|
||||
};
|
||||
@ -327,7 +327,7 @@ _gdk_win32_drag_protocol_to_string (GdkDragProtocol protocol)
|
||||
default: return static_printf ("illegal_%d", protocol);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gchar *
|
||||
@ -353,7 +353,7 @@ _gdk_win32_window_state_to_string (GdkWindowState state)
|
||||
BIT (STICKY);
|
||||
#undef BIT
|
||||
|
||||
return static_printf ("%s", buf);
|
||||
return static_printf ("%s", buf);
|
||||
}
|
||||
|
||||
gchar *
|
||||
@ -395,7 +395,7 @@ _gdk_win32_window_style_to_string (LONG style)
|
||||
BIT (VSCROLL);
|
||||
#undef BIT
|
||||
|
||||
return static_printf ("%s", buf);
|
||||
return static_printf ("%s", buf);
|
||||
}
|
||||
|
||||
gchar *
|
||||
@ -441,7 +441,7 @@ _gdk_win32_window_exstyle_to_string (LONG style)
|
||||
BIT (WINDOWEDGE);
|
||||
#undef BIT
|
||||
|
||||
return static_printf ("%s", buf);
|
||||
return static_printf ("%s", buf);
|
||||
}
|
||||
|
||||
gchar *
|
||||
@ -473,7 +473,7 @@ _gdk_win32_window_pos_bits_to_string (UINT flags)
|
||||
BIT (ASYNCWINDOWPOS);
|
||||
#undef BIT
|
||||
|
||||
return static_printf ("%s", buf);
|
||||
return static_printf ("%s", buf);
|
||||
}
|
||||
|
||||
gchar *
|
||||
@ -497,7 +497,7 @@ _gdk_win32_drag_action_to_string (GdkDragAction actions)
|
||||
BIT (ASK);
|
||||
#undef BIT
|
||||
|
||||
return static_printf ("%s", buf);
|
||||
return static_printf ("%s", buf);
|
||||
}
|
||||
|
||||
gchar *
|
||||
@ -869,7 +869,7 @@ _gdk_win32_key_to_string (LONG lParam)
|
||||
|
||||
return static_printf ("unk-%#lx", lParam);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
_gdk_win32_cf_to_string (UINT format)
|
||||
{
|
||||
@ -913,7 +913,7 @@ _gdk_win32_cf_to_string (UINT format)
|
||||
return static_printf ("unk-%#lx", format);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
_gdk_win32_data_to_string (const guchar *data,
|
||||
int nbytes)
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_PRIVATE_WIN32_H__
|
||||
@ -239,7 +239,7 @@ void _gdk_other_api_failed (const gchar *where,
|
||||
#define WIN32_API_FAILED(api) _gdk_win32_api_failed (G_STRLOC , api)
|
||||
#define WIN32_GDI_FAILED(api) WIN32_API_FAILED (api)
|
||||
#define OTHER_API_FAILED(api) _gdk_other_api_failed (G_STRLOC, api)
|
||||
|
||||
|
||||
/* These two macros call a GDI or other Win32 API and if the return
|
||||
* value is zero or NULL, print a warning message. The majority of GDI
|
||||
* calls return zero or NULL on failure. The value of the macros is nonzero
|
||||
@ -248,7 +248,7 @@ void _gdk_other_api_failed (const gchar *where,
|
||||
|
||||
#define GDI_CALL(api, arglist) (api arglist ? 1 : (WIN32_GDI_FAILED (#api), 0))
|
||||
#define API_CALL(api, arglist) (api arglist ? 1 : (WIN32_API_FAILED (#api), 0))
|
||||
|
||||
|
||||
extern LRESULT CALLBACK _gdk_win32_window_procedure (HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
extern GdkWindow *_gdk_root;
|
||||
@ -499,7 +499,7 @@ GdkDisplay *_gdk_win32_display_open (const gchar *display_name);
|
||||
GdkAtom _gdk_win32_display_manager_atom_intern (GdkDisplayManager *manager,
|
||||
const gchar *atom_name,
|
||||
gint only_if_exists);
|
||||
gchar *_gdk_win32_display_manager_get_atom_name (GdkDisplayManager *manager,
|
||||
gchar *_gdk_win32_display_manager_get_atom_name (GdkDisplayManager *manager,
|
||||
GdkAtom atom);
|
||||
void _gdk_win32_append_event (GdkEvent *event);
|
||||
void _gdk_win32_emit_configure_event (GdkWindow *window);
|
||||
|
@ -20,7 +20,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -42,7 +42,7 @@ _gdk_win32_display_manager_atom_intern (GdkDisplayManager *manager,
|
||||
ATOM win32_atom;
|
||||
GdkAtom retval;
|
||||
static GHashTable *atom_hash = NULL;
|
||||
|
||||
|
||||
if (!atom_hash)
|
||||
atom_hash = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
|
||||
@ -76,8 +76,8 @@ _gdk_win32_display_manager_atom_intern (GdkDisplayManager *manager,
|
||||
win32_atom = GlobalAddAtom (atom_name);
|
||||
retval = GUINT_TO_POINTER ((guint) win32_atom);
|
||||
}
|
||||
g_hash_table_insert (atom_hash,
|
||||
g_strdup (atom_name),
|
||||
g_hash_table_insert (atom_hash,
|
||||
g_strdup (atom_name),
|
||||
retval);
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ _gdk_win32_display_manager_atom_intern (GdkDisplayManager *manager,
|
||||
}
|
||||
|
||||
gchar *
|
||||
_gdk_win32_display_manager_get_atom_name (GdkDisplayManager *manager,
|
||||
_gdk_win32_display_manager_get_atom_name (GdkDisplayManager *manager,
|
||||
GdkAtom atom)
|
||||
{
|
||||
ATOM win32_atom;
|
||||
@ -103,9 +103,9 @@ _gdk_win32_display_manager_get_atom_name (GdkDisplayManager *manager,
|
||||
else if (GDK_SELECTION_TYPE_PIXMAP == atom) return g_strdup ("PIXMAP");
|
||||
else if (GDK_SELECTION_TYPE_WINDOW == atom) return g_strdup ("WINDOW");
|
||||
else if (GDK_SELECTION_TYPE_STRING == atom) return g_strdup ("STRING");
|
||||
|
||||
|
||||
win32_atom = GPOINTER_TO_UINT (atom);
|
||||
|
||||
|
||||
if (win32_atom < 0xC000)
|
||||
return g_strdup_printf ("#%p", atom);
|
||||
else if (GlobalGetAtomName (win32_atom, name, sizeof (name)) == 0)
|
||||
@ -161,7 +161,7 @@ _gdk_win32_window_change_property (GdkWindow *window,
|
||||
GDK_NOTE (DND, {
|
||||
gchar *prop_name = gdk_atom_name (property);
|
||||
gchar *type_name = gdk_atom_name (type);
|
||||
|
||||
|
||||
g_print ("gdk_property_change: %p %s %s %s %d*%d bits: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
prop_name,
|
||||
@ -213,7 +213,7 @@ _gdk_win32_window_change_property (GdkWindow *window,
|
||||
for (i = 0; i < wclen; i++)
|
||||
if (wcptr[i] == '\n' && (i == 0 || wcptr[i - 1] != '\r'))
|
||||
size += 2;
|
||||
|
||||
|
||||
if (!(hdata = GlobalAlloc (GMEM_MOVEABLE, size)))
|
||||
{
|
||||
WIN32_API_FAILED ("GlobalAlloc");
|
||||
@ -239,7 +239,7 @@ _gdk_win32_window_change_property (GdkWindow *window,
|
||||
hdata));
|
||||
if (!SetClipboardData (CF_UNICODETEXT, hdata))
|
||||
WIN32_API_FAILED ("SetClipboardData");
|
||||
|
||||
|
||||
if (!CloseClipboard ())
|
||||
WIN32_API_FAILED ("CloseClipboard");
|
||||
}
|
||||
@ -438,7 +438,7 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
|
||||
*/
|
||||
int nHeight = (0 > ncm.lfMenuFont.lfHeight ? - 3 * ncm.lfMenuFont.lfHeight / 4 : 10);
|
||||
if (OUT_STRING_PRECIS == ncm.lfMenuFont.lfOutPrecision)
|
||||
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : ignoring bitmap font '%s'\n",
|
||||
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : ignoring bitmap font '%s'\n",
|
||||
name, ncm.lfMenuFont.lfFaceName));
|
||||
else if (ncm.lfMenuFont.lfFaceName && strlen(ncm.lfMenuFont.lfFaceName) > 0 &&
|
||||
/* Avoid issues like those described in bug #135098 */
|
||||
|
@ -20,7 +20,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -102,7 +102,7 @@ _gdk_win32_selection_init (void)
|
||||
}
|
||||
|
||||
g_slist_free (pixbuf_formats);
|
||||
|
||||
|
||||
text_plain = gdk_atom_intern ("text/plain", FALSE);
|
||||
text_plain_charset_utf_8= gdk_atom_intern ("text/plain;charset=utf-8", FALSE);
|
||||
text_plain_charset_CP1252 = gdk_atom_intern ("text/plain;charset=CP1252", FALSE);
|
||||
@ -123,7 +123,7 @@ _gdk_win32_selection_init (void)
|
||||
* This routine strips out all non-allowed C0 and C1 characters
|
||||
* from the input string and also canonicalizes \r, and \r\n to \n
|
||||
*/
|
||||
static gchar *
|
||||
static gchar *
|
||||
sanitize_utf8 (const gchar *src,
|
||||
gint length)
|
||||
{
|
||||
@ -146,7 +146,7 @@ sanitize_utf8 (const gchar *src,
|
||||
gunichar ch = g_utf8_get_char (p);
|
||||
char buf[7];
|
||||
gint buflen;
|
||||
|
||||
|
||||
if (!((ch < 0x20 && ch != '\t' && ch != '\n') || (ch >= 0x7f && ch < 0xa0)))
|
||||
{
|
||||
buflen = g_unichar_to_utf8 (ch, buf);
|
||||
@ -166,7 +166,7 @@ _gdk_utf8_to_string_target_internal (const gchar *str,
|
||||
gint length)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
|
||||
gchar *tmp_str = sanitize_utf8 (str, length);
|
||||
gchar *result = g_convert_with_fallback (tmp_str, -1,
|
||||
"ISO-8859-1", "UTF-8",
|
||||
@ -177,7 +177,7 @@ _gdk_utf8_to_string_target_internal (const gchar *str,
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
|
||||
g_free (tmp_str);
|
||||
return result;
|
||||
}
|
||||
@ -244,10 +244,10 @@ get_mapped_gdk_atom_name (GdkAtom gdk_target)
|
||||
|
||||
if (gdk_target == _image_jpeg)
|
||||
return g_strdup ("JFIF");
|
||||
|
||||
|
||||
if (gdk_target == _image_gif)
|
||||
return g_strdup ("GIF");
|
||||
|
||||
|
||||
return gdk_atom_name (gdk_target);
|
||||
}
|
||||
|
||||
@ -355,7 +355,7 @@ _gdk_win32_display_get_selection_owner (GdkDisplay *display,
|
||||
|
||||
GDK_NOTE (DND, {
|
||||
gchar *sel_name = gdk_atom_name (selection);
|
||||
|
||||
|
||||
g_print ("gdk_selection_owner_get: %s = %p\n",
|
||||
sel_name,
|
||||
(window ? GDK_WINDOW_HWND (window) : NULL));
|
||||
@ -405,7 +405,7 @@ _gdk_win32_display_convert_selection (GdkDisplay *display,
|
||||
GDK_NOTE (DND, {
|
||||
gchar *sel_name = gdk_atom_name (selection);
|
||||
gchar *tgt_name = gdk_atom_name (target);
|
||||
|
||||
|
||||
g_print ("gdk_selection_convert: %p %s %s\n",
|
||||
GDK_WINDOW_HWND (requestor),
|
||||
sel_name, tgt_name);
|
||||
@ -496,7 +496,7 @@ _gdk_win32_display_convert_selection (GdkDisplay *display,
|
||||
|
||||
GDK_NOTE (DND, {
|
||||
int i;
|
||||
|
||||
|
||||
g_print ("... ");
|
||||
for (i = 0; i < ntargets; i++)
|
||||
{
|
||||
@ -649,7 +649,7 @@ _gdk_win32_display_convert_selection (GdkDisplay *display,
|
||||
{
|
||||
new_length = data_length + sizeof (BITMAPFILEHEADER);
|
||||
}
|
||||
|
||||
|
||||
data = g_try_malloc (new_length);
|
||||
|
||||
if (data)
|
||||
@ -702,7 +702,7 @@ _gdk_win32_display_convert_selection (GdkDisplay *display,
|
||||
if (p[3] != 0)
|
||||
{
|
||||
gdouble inverse_alpha = 255./p[3];
|
||||
|
||||
|
||||
p[0] = p[0] * inverse_alpha + 0.5;
|
||||
p[1] = p[1] * inverse_alpha + 0.5;
|
||||
p[2] = p[2] * inverse_alpha + 0.5;
|
||||
@ -762,7 +762,7 @@ _gdk_win32_display_convert_selection (GdkDisplay *display,
|
||||
{
|
||||
char sFormat[80];
|
||||
|
||||
if (GetClipboardFormatName (fmt, sFormat, 80) > 0 &&
|
||||
if (GetClipboardFormatName (fmt, sFormat, 80) > 0 &&
|
||||
strcmp (sFormat, mapped_target_name) == 0)
|
||||
{
|
||||
if ((hdata = GetClipboardData (fmt)) != NULL)
|
||||
@ -774,9 +774,9 @@ _gdk_win32_display_convert_selection (GdkDisplay *display,
|
||||
if ((ptr = GlobalLock (hdata)) != NULL)
|
||||
{
|
||||
length = GlobalSize (hdata);
|
||||
|
||||
|
||||
GDK_NOTE (DND, g_print ("... %s: %d bytes\n", mapped_target_name, length));
|
||||
|
||||
|
||||
selection_property_store (requestor, target, 8,
|
||||
g_memdup (ptr, length), length);
|
||||
GlobalUnlock (hdata);
|
||||
@ -827,7 +827,7 @@ _gdk_win32_display_get_selection_property (GdkDisplay *display,
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (requestor))
|
||||
return 0;
|
||||
|
||||
|
||||
GDK_NOTE (DND, g_print ("gdk_selection_property_get: %p",
|
||||
GDK_WINDOW_HWND (requestor)));
|
||||
|
||||
@ -893,7 +893,7 @@ _gdk_win32_display_send_selection_notify (GdkDisplay *display,
|
||||
gchar *sel_name = gdk_atom_name (selection);
|
||||
gchar *tgt_name = gdk_atom_name (target);
|
||||
gchar *prop_name = gdk_atom_name (property);
|
||||
|
||||
|
||||
g_print ("gdk_selection_send_notify_for_display: %p %s %s %s (no-op)\n",
|
||||
requestor, sel_name, tgt_name, prop_name);
|
||||
g_free (sel_name);
|
||||
@ -909,7 +909,7 @@ _gdk_win32_display_send_selection_notify (GdkDisplay *display,
|
||||
gint
|
||||
gdk_text_property_to_text_list_for_display (GdkDisplay *display,
|
||||
GdkAtom encoding,
|
||||
gint format,
|
||||
gint format,
|
||||
const guchar *text,
|
||||
gint length,
|
||||
gchar ***list)
|
||||
@ -922,12 +922,12 @@ gdk_text_property_to_text_list_for_display (GdkDisplay *display,
|
||||
|
||||
GDK_NOTE (DND, {
|
||||
gchar *enc_name = gdk_atom_name (encoding);
|
||||
|
||||
|
||||
g_print ("gdk_text_property_to_text_list_for_display: %s %d %.20s %d\n",
|
||||
enc_name, format, text, length);
|
||||
g_free (enc_name);
|
||||
});
|
||||
|
||||
|
||||
if (!list)
|
||||
return 0;
|
||||
|
||||
@ -937,7 +937,7 @@ gdk_text_property_to_text_list_for_display (GdkDisplay *display,
|
||||
source_charset = g_strdup ("UTF-8");
|
||||
else
|
||||
source_charset = gdk_atom_name (encoding);
|
||||
|
||||
|
||||
g_get_charset (&charset);
|
||||
|
||||
result = g_convert ((const gchar *) text, length, charset, source_charset,
|
||||
@ -949,7 +949,7 @@ gdk_text_property_to_text_list_for_display (GdkDisplay *display,
|
||||
|
||||
*list = g_new (gchar *, 1);
|
||||
**list = result;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -979,7 +979,7 @@ make_list (const gchar *text,
|
||||
while (p < text + length)
|
||||
{
|
||||
gchar *str;
|
||||
|
||||
|
||||
q = p;
|
||||
while (*q && q < text + length)
|
||||
q++;
|
||||
@ -1013,7 +1013,7 @@ make_list (const gchar *text,
|
||||
*list = g_new (gchar *, n_strings + 1);
|
||||
|
||||
(*list)[n_strings] = NULL;
|
||||
|
||||
|
||||
i = n_strings;
|
||||
tmp_list = strings;
|
||||
while (tmp_list)
|
||||
@ -1123,7 +1123,7 @@ gdk_utf8_to_compound_text_for_display (GdkDisplay *display,
|
||||
|
||||
if (format)
|
||||
*format = 0;
|
||||
|
||||
|
||||
if (ctext)
|
||||
*ctext = NULL;
|
||||
|
||||
@ -1162,7 +1162,7 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
|
||||
|
||||
GDK_NOTE (DND, {
|
||||
gchar *sel_name = gdk_atom_name (selection);
|
||||
|
||||
|
||||
g_print ("gdk_win32_selection_add_targets: %p: %s: ",
|
||||
owner ? GDK_WINDOW_HWND (owner) : NULL,
|
||||
sel_name);
|
||||
@ -1206,7 +1206,7 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
|
||||
UINT cf;
|
||||
gchar *target_name;
|
||||
int j;
|
||||
|
||||
|
||||
for (j = 0; j < n_known_pixbuf_formats; j++)
|
||||
if (targets[i] == known_pixbuf_formats[j])
|
||||
{
|
||||
@ -1222,7 +1222,7 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* If it is one of the pixmap formats, already handled or not
|
||||
* needed.
|
||||
*/
|
||||
@ -1257,7 +1257,7 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
|
||||
g_hash_table_replace (_format_atom_table,
|
||||
GINT_TO_POINTER (cf),
|
||||
targets[i]);
|
||||
|
||||
|
||||
GDK_NOTE (DND, g_print ("... SetClipboardData(%s,NULL)\n",
|
||||
_gdk_win32_cf_to_string (cf)));
|
||||
SetClipboardData (cf, NULL);
|
||||
|
@ -20,7 +20,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -75,7 +75,7 @@ _gdk_visual_init_internal (GdkScreen *screen, gboolean is_rgba)
|
||||
|
||||
if (max_colors != NULL)
|
||||
_gdk_max_colors = atoi (max_colors);
|
||||
|
||||
|
||||
map_entries = _gdk_max_colors;
|
||||
|
||||
if (map_entries >= 16 && map_entries < sizepalette)
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WIN32_H__
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WIN32_CURSOR_H__
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WIN32_DISPLAY_H__
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -76,6 +76,6 @@ gdk_win32_handle_table_lookup (HWND handle)
|
||||
|
||||
if (handle_ht)
|
||||
data = g_hash_table_lookup (handle_ht, &handle);
|
||||
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WIN32_SCREEN_H__
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WIN32_WINDOW_H__
|
||||
|
@ -22,7 +22,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -124,7 +124,7 @@ _gdk_window_impl_win32_get_type (void)
|
||||
"GdkWindowImplWin32",
|
||||
&object_info, 0);
|
||||
}
|
||||
|
||||
|
||||
return object_type;
|
||||
}
|
||||
|
||||
@ -148,11 +148,11 @@ gdk_window_impl_win32_finalize (GObject *object)
|
||||
{
|
||||
GdkWindow *wrapper;
|
||||
GdkWindowImplWin32 *window_impl;
|
||||
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW_IMPL_WIN32 (object));
|
||||
|
||||
window_impl = GDK_WINDOW_IMPL_WIN32 (object);
|
||||
|
||||
|
||||
wrapper = window_impl->wrapper;
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (wrapper))
|
||||
@ -218,7 +218,7 @@ _gdk_windowing_window_init (GdkScreen *screen)
|
||||
GdkWindowImplWin32 *impl_win32;
|
||||
|
||||
g_assert (_gdk_root == NULL);
|
||||
|
||||
|
||||
_gdk_root = _gdk_display_create_window (_gdk_display);
|
||||
|
||||
window = (GdkWindow *)_gdk_root;
|
||||
@ -304,7 +304,7 @@ get_default_title (void)
|
||||
|
||||
/* RegisterGdkClass
|
||||
* is a wrapper function for RegisterWindowClassEx.
|
||||
* It creates at least one unique class for every
|
||||
* It creates at least one unique class for every
|
||||
* GdkWindowType. If support for single window-specific icons
|
||||
* is ever needed (e.g Dialog specific), every such window should
|
||||
* get its own class
|
||||
@ -318,7 +318,7 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
|
||||
static ATOM klassTEMPSHADOW = 0;
|
||||
static HICON hAppIcon = NULL;
|
||||
static HICON hAppIconSm = NULL;
|
||||
static WNDCLASSEXW wcl;
|
||||
static WNDCLASSEXW wcl;
|
||||
ATOM klass = 0;
|
||||
|
||||
wcl.cbSize = sizeof (WNDCLASSEX);
|
||||
@ -378,8 +378,8 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
|
||||
wcl.hIcon = CopyIcon (hAppIcon); \
|
||||
wcl.hIconSm = CopyIcon (hAppIconSm); \
|
||||
wcl.hbrBackground = NULL; \
|
||||
wcl.hCursor = LoadCursor (NULL, IDC_ARROW);
|
||||
|
||||
wcl.hCursor = LoadCursor (NULL, IDC_ARROW);
|
||||
|
||||
switch (wtype)
|
||||
{
|
||||
case GDK_WINDOW_TOPLEVEL:
|
||||
@ -394,12 +394,12 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
|
||||
}
|
||||
klass = klassTOPLEVEL;
|
||||
break;
|
||||
|
||||
|
||||
case GDK_WINDOW_CHILD:
|
||||
if (0 == klassCHILD)
|
||||
{
|
||||
wcl.lpszClassName = L"gdkWindowChild";
|
||||
|
||||
|
||||
/* XXX: Find out whether GL Widgets are done for GDK_WINDOW_CHILD
|
||||
* MSDN says CS_PARENTDC should not be used for GL Context
|
||||
* creation
|
||||
@ -410,7 +410,7 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
|
||||
}
|
||||
klass = klassCHILD;
|
||||
break;
|
||||
|
||||
|
||||
case GDK_WINDOW_TEMP:
|
||||
if ((wtype_hint == GDK_WINDOW_TYPE_HINT_MENU) ||
|
||||
(wtype_hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU) ||
|
||||
@ -442,12 +442,12 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
|
||||
klass = klassTEMP;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (klass == 0)
|
||||
{
|
||||
WIN32_API_FAILED ("RegisterClassExW");
|
||||
@ -466,7 +466,7 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
|
||||
* is used.
|
||||
*
|
||||
* The visual parameter, is based on GDK_WA_VISUAL if set already.
|
||||
* From attributes the only things used is: colormap, title,
|
||||
* From attributes the only things used is: colormap, title,
|
||||
* wmclass and type_hint. [1]. We are checking redundant information
|
||||
* and complain if that changes, which would break this implementation
|
||||
* again.
|
||||
@ -648,7 +648,7 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
|
||||
title = "";
|
||||
|
||||
impl->native_event_mask = GDK_STRUCTURE_MASK | event_mask;
|
||||
|
||||
|
||||
if (attributes_mask & GDK_WA_TYPE_HINT)
|
||||
gdk_window_set_type_hint (window, attributes->type_hint);
|
||||
|
||||
@ -658,7 +658,7 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
|
||||
klass = RegisterGdkClass (window->window_type, impl->type_hint);
|
||||
|
||||
wtitle = g_utf8_to_utf16 (title, -1, NULL, NULL, NULL);
|
||||
|
||||
|
||||
hwndNew = CreateWindowExW (dwExStyle,
|
||||
MAKEINTRESOURCEW (klass),
|
||||
wtitle,
|
||||
@ -677,7 +677,7 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
|
||||
hwndNew);
|
||||
|
||||
/* HB: IHMO due to a race condition the handle was increased by
|
||||
* one, which causes much trouble. Because I can't find the
|
||||
* one, which causes much trouble. Because I can't find the
|
||||
* real bug, try to workaround it ...
|
||||
* To reproduce: compile with MSVC 5, DEBUG=1
|
||||
*/
|
||||
@ -714,7 +714,7 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
|
||||
title,
|
||||
window_width, window_height,
|
||||
window->x - offset_x,
|
||||
window->y - offset_y,
|
||||
window->y - offset_y,
|
||||
hparent,
|
||||
GDK_WINDOW_HWND (window)));
|
||||
|
||||
@ -762,11 +762,11 @@ gdk_win32_window_foreign_new_for_display (GdkDisplay *display,
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
impl->wrapper = window;
|
||||
parent = GetParent (anid);
|
||||
|
||||
|
||||
window->parent = gdk_win32_handle_table_lookup (parent);
|
||||
if (!window->parent || GDK_WINDOW_TYPE (window->parent) == GDK_WINDOW_FOREIGN)
|
||||
window->parent = _gdk_root;
|
||||
|
||||
|
||||
window->parent->children = g_list_prepend (window->parent->children, window);
|
||||
window->parent->impl_window->native_children =
|
||||
g_list_prepend (window->parent->impl_window->native_children, window);
|
||||
@ -818,7 +818,7 @@ gdk_win32_window_destroy (GdkWindow *window,
|
||||
GSList *tmp;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_win32_window_destroy: %p\n",
|
||||
GDK_WINDOW_HWND (window)));
|
||||
|
||||
@ -859,7 +859,7 @@ gdk_win32_window_destroy_foreign (GdkWindow *window)
|
||||
*/
|
||||
gdk_window_hide (window);
|
||||
gdk_window_reparent (window, NULL, 0, 0);
|
||||
|
||||
|
||||
PostMessage (GDK_WINDOW_HWND (window), WM_CLOSE, 0, 0);
|
||||
}
|
||||
|
||||
@ -883,7 +883,7 @@ gdk_win32_window_destroy_notify (GdkWindow *window)
|
||||
|
||||
_gdk_window_destroy (window, TRUE);
|
||||
}
|
||||
|
||||
|
||||
gdk_win32_handle_table_remove (GDK_WINDOW_HWND (window));
|
||||
g_object_unref (window);
|
||||
}
|
||||
@ -897,7 +897,7 @@ get_outer_rect (GdkWindow *window,
|
||||
rect->left = rect->top = 0;
|
||||
rect->right = width;
|
||||
rect->bottom = height;
|
||||
|
||||
|
||||
_gdk_win32_adjust_client_rect (window, rect);
|
||||
}
|
||||
|
||||
@ -925,7 +925,7 @@ adjust_for_gravity_hints (GdkWindow *window,
|
||||
*x -= (outer_rect->right - outer_rect->left) / 2;
|
||||
*x += window->width / 2;
|
||||
break;
|
||||
|
||||
|
||||
case GDK_GRAVITY_SOUTH_EAST:
|
||||
case GDK_GRAVITY_EAST:
|
||||
case GDK_GRAVITY_NORTH_EAST:
|
||||
@ -988,29 +988,29 @@ show_window_internal (GdkWindow *window,
|
||||
GDK_WINDOW_HWND (window),
|
||||
_gdk_win32_window_state_to_string (window->state),
|
||||
(deiconify ? " deiconify" : "")));
|
||||
|
||||
|
||||
/* If asked to show (not deiconify) an withdrawn and iconified
|
||||
* window, do that.
|
||||
*/
|
||||
if (!deiconify &&
|
||||
!already_mapped &&
|
||||
(window->state & GDK_WINDOW_STATE_ICONIFIED))
|
||||
{
|
||||
{
|
||||
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWMINNOACTIVE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* If asked to just show an iconified window, do nothing. */
|
||||
if (!deiconify && (window->state & GDK_WINDOW_STATE_ICONIFIED))
|
||||
return;
|
||||
|
||||
|
||||
/* If asked to deiconify an already noniconified window, do
|
||||
* nothing. (Especially, don't cause the window to rise and
|
||||
* activate. There are different calls for that.)
|
||||
*/
|
||||
if (deiconify && !(window->state & GDK_WINDOW_STATE_ICONIFIED))
|
||||
return;
|
||||
|
||||
|
||||
/* If asked to show (but not raise) a window that is already
|
||||
* visible, do nothing.
|
||||
*/
|
||||
@ -1018,7 +1018,7 @@ show_window_internal (GdkWindow *window,
|
||||
return;
|
||||
|
||||
/* Other cases */
|
||||
|
||||
|
||||
if (!already_mapped)
|
||||
focus_on_map = window->focus_on_map;
|
||||
|
||||
@ -1040,7 +1040,7 @@ show_window_internal (GdkWindow *window,
|
||||
}
|
||||
|
||||
/* For initial map of "normal" windows we want to emulate WM window
|
||||
* positioning behaviour, which means:
|
||||
* positioning behaviour, which means:
|
||||
* + Use user specified position if GDK_HINT_POS or GDK_HINT_USER_POS
|
||||
* otherwise:
|
||||
* + default to the initial CW_USEDEFAULT placement,
|
||||
@ -1199,7 +1199,7 @@ show_window_internal (GdkWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_window_show (GdkWindow *window,
|
||||
gdk_win32_window_show (GdkWindow *window,
|
||||
gboolean already_mapped)
|
||||
{
|
||||
show_window_internal (window, FALSE, FALSE);
|
||||
@ -1214,17 +1214,17 @@ gdk_win32_window_hide (GdkWindow *window)
|
||||
GDK_NOTE (MISC, g_print ("gdk_win32_window_hide: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
_gdk_win32_window_state_to_string (window->state)));
|
||||
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
gdk_synthesize_window_state (window,
|
||||
0,
|
||||
GDK_WINDOW_STATE_WITHDRAWN);
|
||||
|
||||
|
||||
_gdk_window_clear_update_area (window);
|
||||
|
||||
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
|
||||
ShowOwnedPopups (GDK_WINDOW_HWND (window), FALSE);
|
||||
|
||||
|
||||
if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
|
||||
{
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), HWND_BOTTOM,
|
||||
@ -1401,7 +1401,7 @@ gdk_win32_window_move_resize (GdkWindow *window,
|
||||
window_impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
window_impl->inhibit_configure = TRUE;
|
||||
|
||||
/* We ignore changes to the window being moved or resized by the
|
||||
/* We ignore changes to the window being moved or resized by the
|
||||
user, as we don't want to fight the user */
|
||||
if (GDK_WINDOW_HWND (window) == _modal_move_resize_window)
|
||||
goto out;
|
||||
@ -1474,7 +1474,7 @@ gdk_win32_window_reparent (GdkWindow *window,
|
||||
|
||||
API_CALL (SetParent, (GDK_WINDOW_HWND (window),
|
||||
GDK_WINDOW_HWND (new_parent)));
|
||||
|
||||
|
||||
API_CALL (MoveWindow, (GDK_WINDOW_HWND (window),
|
||||
x, y, window->width, window->height, TRUE));
|
||||
|
||||
@ -1483,7 +1483,7 @@ gdk_win32_window_reparent (GdkWindow *window,
|
||||
*/
|
||||
if (GDK_WINDOW_TYPE (new_parent) == GDK_WINDOW_FOREIGN)
|
||||
new_parent = _gdk_root;
|
||||
|
||||
|
||||
window->parent = new_parent;
|
||||
|
||||
/* Switch the window type as appropriate */
|
||||
@ -1571,7 +1571,7 @@ gdk_win32_window_set_urgency_hint (GdkWindow *window,
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD);
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
@ -1587,7 +1587,7 @@ gdk_win32_window_set_urgency_hint (GdkWindow *window,
|
||||
flashwinfo.dwFlags = FLASHW_STOP;
|
||||
flashwinfo.uCount = 0;
|
||||
flashwinfo.dwTimeout = 0;
|
||||
|
||||
|
||||
flashWindowEx (&flashwinfo);
|
||||
}
|
||||
else
|
||||
@ -1606,8 +1606,8 @@ get_effective_window_decorations (GdkWindow *window,
|
||||
|
||||
if (gdk_window_get_decorations (window, decoration))
|
||||
return TRUE;
|
||||
|
||||
if (window->window_type != GDK_WINDOW_TOPLEVEL)
|
||||
|
||||
if (window->window_type != GDK_WINDOW_TOPLEVEL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -1667,10 +1667,10 @@ get_effective_window_decorations (GdkWindow *window,
|
||||
*decoration = (GDK_DECOR_ALL | GDK_DECOR_RESIZEH | GDK_DECOR_MENU |
|
||||
GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE);
|
||||
return TRUE;
|
||||
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_DOCK:
|
||||
return FALSE;
|
||||
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_DESKTOP:
|
||||
return FALSE;
|
||||
|
||||
@ -1681,7 +1681,7 @@ get_effective_window_decorations (GdkWindow *window,
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1694,7 +1694,7 @@ gdk_win32_window_set_geometry_hints (GdkWindow *window,
|
||||
FullscreenInfo *fi;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
@ -1718,7 +1718,7 @@ gdk_win32_window_set_geometry_hints (GdkWindow *window,
|
||||
GDK_NOTE (MISC, g_print ("... MIN_SIZE: %dx%d\n",
|
||||
geometry->min_width, geometry->min_height));
|
||||
}
|
||||
|
||||
|
||||
if (geom_mask & GDK_HINT_MAX_SIZE)
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("... MAX_SIZE: %dx%d\n",
|
||||
@ -1730,13 +1730,13 @@ gdk_win32_window_set_geometry_hints (GdkWindow *window,
|
||||
GDK_NOTE (MISC, g_print ("... BASE_SIZE: %dx%d\n",
|
||||
geometry->base_width, geometry->base_height));
|
||||
}
|
||||
|
||||
|
||||
if (geom_mask & GDK_HINT_RESIZE_INC)
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("... RESIZE_INC: (%d,%d)\n",
|
||||
geometry->width_inc, geometry->height_inc));
|
||||
}
|
||||
|
||||
|
||||
if (geom_mask & GDK_HINT_ASPECT)
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("... ASPECT: %g--%g\n",
|
||||
@ -1766,10 +1766,10 @@ gdk_win32_window_set_title (GdkWindow *window,
|
||||
/* Empty window titles not allowed, so set it to just a period. */
|
||||
if (!title[0])
|
||||
title = ".";
|
||||
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_title: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window), title));
|
||||
|
||||
|
||||
GDK_NOTE (MISC_OR_EVENTS, title = g_strdup_printf ("%p %s", GDK_WINDOW_HWND (window), title));
|
||||
|
||||
wtitle = g_utf8_to_utf16 (title, -1, NULL, NULL, NULL);
|
||||
@ -1784,7 +1784,7 @@ gdk_win32_window_set_role (GdkWindow *window,
|
||||
const gchar *role)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_role: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
(role ? role : "NULL")));
|
||||
@ -1792,7 +1792,7 @@ gdk_win32_window_set_role (GdkWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_window_set_transient_for (GdkWindow *window,
|
||||
gdk_win32_window_set_transient_for (GdkWindow *window,
|
||||
GdkWindow *parent)
|
||||
{
|
||||
HWND window_id, parent_id;
|
||||
@ -1960,10 +1960,10 @@ gdk_win32_window_set_device_cursor (GdkWindow *window,
|
||||
GdkWin32Cursor *cursor_private;
|
||||
HCURSOR hcursor;
|
||||
HCURSOR hprevcursor;
|
||||
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
cursor_private = (GdkWin32Cursor*) cursor;
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
@ -1971,7 +1971,7 @@ gdk_win32_window_set_device_cursor (GdkWindow *window,
|
||||
hcursor = NULL;
|
||||
else
|
||||
hcursor = cursor_private->hcursor;
|
||||
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_win32_window_set_cursor: %p: %p\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
hcursor));
|
||||
@ -2017,7 +2017,7 @@ gdk_win32_window_get_geometry (GdkWindow *window,
|
||||
{
|
||||
if (!window)
|
||||
window = _gdk_root;
|
||||
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
{
|
||||
RECT rect;
|
||||
@ -2085,7 +2085,7 @@ gdk_win32_window_get_root_coords (GdkWindow *window,
|
||||
ClientToScreen (GDK_WINDOW_HWND (window), &pt);
|
||||
tx = pt.x;
|
||||
ty = pt.y;
|
||||
|
||||
|
||||
if (root_x)
|
||||
*root_x = tx + _gdk_offset_x;
|
||||
if (root_y)
|
||||
@ -2126,7 +2126,7 @@ gdk_win32_window_get_frame_extents (GdkWindow *window,
|
||||
rect->y = 0;
|
||||
rect->width = 1;
|
||||
rect->height = 1;
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
@ -2183,7 +2183,7 @@ gdk_display_warp_device (GdkDisplay *display,
|
||||
GDK_DEVICE_GET_CLASS (device)->warp (device, screen, x, y);
|
||||
}
|
||||
|
||||
static GdkEventMask
|
||||
static GdkEventMask
|
||||
gdk_win32_window_get_events (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWin32 *impl;
|
||||
@ -2196,7 +2196,7 @@ gdk_win32_window_get_events (GdkWindow *window)
|
||||
return impl->native_event_mask;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
gdk_win32_window_set_events (GdkWindow *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
@ -2231,7 +2231,7 @@ do_shape_combine_region (GdkWindow *window,
|
||||
CombineRgn (hrgn, hrgn, tmp, RGN_OR);
|
||||
DeleteObject (tmp);
|
||||
}
|
||||
|
||||
|
||||
SetWindowRgn (GDK_WINDOW_HWND (window), hrgn, TRUE);
|
||||
}
|
||||
|
||||
@ -2349,7 +2349,7 @@ gdk_win32_window_set_icon_list (GdkWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_window_set_icon_name (GdkWindow *window,
|
||||
gdk_win32_window_set_icon_name (GdkWindow *window,
|
||||
const gchar *name)
|
||||
{
|
||||
/* In case I manage to confuse this again (or somebody else does):
|
||||
@ -2363,7 +2363,7 @@ gdk_win32_window_set_icon_name (GdkWindow *window,
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
|
||||
#if 0
|
||||
/* This is not the correct thing to do. We should keep both the
|
||||
* "normal" window title, and the icon name. When the window is
|
||||
@ -2385,14 +2385,14 @@ gdk_win32_window_get_group (GdkWindow *window)
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return NULL;
|
||||
|
||||
|
||||
g_warning ("gdk_window_get_group not yet implemented");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_window_set_group (GdkWindow *window,
|
||||
gdk_win32_window_set_group (GdkWindow *window,
|
||||
GdkWindow *leader)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
@ -2401,7 +2401,7 @@ gdk_win32_window_set_group (GdkWindow *window,
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window) || GDK_WINDOW_DESTROYED (leader))
|
||||
return;
|
||||
|
||||
|
||||
g_warning ("gdk_window_set_group not implemented");
|
||||
}
|
||||
|
||||
@ -2474,7 +2474,7 @@ update_style_bits (GdkWindow *window)
|
||||
GDK_WINDOW_HWND (window),
|
||||
_gdk_win32_window_style_to_string (old_style),
|
||||
_gdk_win32_window_style_to_string (new_style)));
|
||||
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, new_style);
|
||||
}
|
||||
|
||||
@ -2484,7 +2484,7 @@ update_style_bits (GdkWindow *window)
|
||||
GDK_WINDOW_HWND (window),
|
||||
_gdk_win32_window_exstyle_to_string (old_exstyle),
|
||||
_gdk_win32_window_exstyle_to_string (new_exstyle)));
|
||||
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE, new_exstyle);
|
||||
}
|
||||
|
||||
@ -2499,7 +2499,7 @@ update_style_bits (GdkWindow *window)
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_FRAMECHANGED | SWP_NOACTIVATE |
|
||||
SWP_FRAMECHANGED | SWP_NOACTIVATE |
|
||||
SWP_NOREPOSITION | SWP_NOZORDER);
|
||||
|
||||
}
|
||||
@ -2543,10 +2543,10 @@ static GQuark
|
||||
get_decorations_quark ()
|
||||
{
|
||||
static GQuark quark = 0;
|
||||
|
||||
|
||||
if (!quark)
|
||||
quark = g_quark_from_static_string ("gdk-window-decorations");
|
||||
|
||||
|
||||
return quark;
|
||||
}
|
||||
|
||||
@ -2555,9 +2555,9 @@ gdk_win32_window_set_decorations (GdkWindow *window,
|
||||
GdkWMDecoration decorations)
|
||||
{
|
||||
GdkWMDecoration* decorations_copy;
|
||||
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_decorations: %p: %s %s%s%s%s%s%s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
(decorations & GDK_DECOR_ALL ? "clearing" : "setting"),
|
||||
@ -2580,7 +2580,7 @@ gdk_win32_window_get_decorations (GdkWindow *window,
|
||||
GdkWMDecoration *decorations)
|
||||
{
|
||||
GdkWMDecoration* decorations_set;
|
||||
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
decorations_set = g_object_get_qdata (G_OBJECT (window), get_decorations_quark ());
|
||||
@ -2594,10 +2594,10 @@ static GQuark
|
||||
get_functions_quark ()
|
||||
{
|
||||
static GQuark quark = 0;
|
||||
|
||||
|
||||
if (!quark)
|
||||
quark = g_quark_from_static_string ("gdk-window-functions");
|
||||
|
||||
|
||||
return quark;
|
||||
}
|
||||
|
||||
@ -2608,7 +2608,7 @@ gdk_win32_window_set_functions (GdkWindow *window,
|
||||
GdkWMFunction* functions_copy;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_functions: %p: %s %s%s%s%s%s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
(functions & GDK_FUNC_ALL ? "clearing" : "setting"),
|
||||
@ -2630,7 +2630,7 @@ _gdk_window_get_functions (GdkWindow *window,
|
||||
GdkWMFunction *functions)
|
||||
{
|
||||
GdkWMFunction* functions_set;
|
||||
|
||||
|
||||
functions_set = g_object_get_qdata (G_OBJECT (window), get_functions_quark ());
|
||||
if (functions_set)
|
||||
*functions = *functions_set;
|
||||
@ -2648,9 +2648,9 @@ gdk_win32_window_begin_resize_drag (GdkWindow *window,
|
||||
guint32 timestamp)
|
||||
{
|
||||
WPARAM winedge;
|
||||
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
@ -2662,7 +2662,7 @@ gdk_win32_window_begin_resize_drag (GdkWindow *window,
|
||||
*/
|
||||
if (button != 1)
|
||||
return;
|
||||
|
||||
|
||||
/* Must break the automatic grab that occured when the button was
|
||||
* pressed, otherwise it won't work.
|
||||
*/
|
||||
@ -2717,7 +2717,7 @@ gdk_win32_window_begin_move_drag (GdkWindow *window,
|
||||
guint32 timestamp)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
@ -2729,7 +2729,7 @@ gdk_win32_window_begin_move_drag (GdkWindow *window,
|
||||
*/
|
||||
if (button != 1)
|
||||
return;
|
||||
|
||||
|
||||
/* Must break the automatic grab that occured when the button was pressed,
|
||||
* otherwise it won't work.
|
||||
*/
|
||||
@ -2785,7 +2785,7 @@ gdk_win32_window_deiconify (GdkWindow *window)
|
||||
_gdk_win32_window_state_to_string (window->state)));
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
{
|
||||
{
|
||||
show_window_internal (window, GDK_WINDOW_IS_MAPPED (window), TRUE);
|
||||
}
|
||||
else
|
||||
@ -2901,7 +2901,7 @@ gdk_win32_window_fullscreen (GdkWindow *window)
|
||||
/* Send state change before configure event */
|
||||
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN);
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
|
||||
(fi->style & ~WS_OVERLAPPEDWINDOW) | WS_POPUP);
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
|
||||
@ -2930,7 +2930,7 @@ gdk_win32_window_unfullscreen (GdkWindow *window)
|
||||
fi->r.left, fi->r.top,
|
||||
fi->r.right - fi->r.left, fi->r.bottom - fi->r.top,
|
||||
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
|
||||
|
||||
|
||||
g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
|
||||
g_free (fi);
|
||||
update_style_bits (window);
|
||||
@ -2997,7 +2997,7 @@ gdk_win32_window_focus (GdkWindow *window,
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_focus: %p: %s\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
_gdk_win32_window_state_to_string (window->state)));
|
||||
@ -3014,7 +3014,7 @@ gdk_win32_window_set_modal_hint (GdkWindow *window,
|
||||
gboolean modal)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
@ -3030,7 +3030,7 @@ gdk_win32_window_set_modal_hint (GdkWindow *window,
|
||||
#if 0
|
||||
/* Not sure about this one.. -- Cody */
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
modal ? HWND_TOPMOST : HWND_NOTOPMOST,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE));
|
||||
@ -3083,7 +3083,7 @@ gdk_win32_window_set_skip_taskbar_hint (GdkWindow *window,
|
||||
#if 0 /* Should we also turn off the minimize and maximize buttons? */
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
|
||||
GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE) & ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU));
|
||||
|
||||
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
0, 0, 0, 0,
|
||||
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
|
||||
@ -3112,7 +3112,7 @@ gdk_win32_window_set_type_hint (GdkWindow *window,
|
||||
GdkWindowTypeHint hint)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
@ -3135,7 +3135,7 @@ static GdkWindowTypeHint
|
||||
gdk_win32_window_get_type_hint (GdkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_WINDOW_TYPE_HINT_NORMAL);
|
||||
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return GDK_WINDOW_TYPE_HINT_NORMAL;
|
||||
|
||||
@ -3166,7 +3166,7 @@ cairo_region_to_hrgn (const cairo_region_t *region,
|
||||
for (i = 0; i < nrects; i++)
|
||||
{
|
||||
rect = ((RECT *) rgndata->Buffer) + rgndata->rdh.nCount++;
|
||||
|
||||
|
||||
cairo_region_get_rectangle (region, i, &r);
|
||||
rect->left = r.x + x_origin;
|
||||
rect->right = rect->left + r.width;
|
||||
@ -3210,7 +3210,7 @@ gdk_win32_window_shape_combine_region (GdkWindow *window,
|
||||
HRGN hrgn;
|
||||
|
||||
hrgn = cairo_region_to_hrgn (shape_region, 0, 0);
|
||||
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_win32_window_shape_combine_region: %p: %p\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
hrgn));
|
||||
@ -3253,7 +3253,7 @@ gdk_win32_window_set_opacity (GdkWindow *window,
|
||||
GWL_EXSTYLE,
|
||||
exstyle | WS_EX_LAYERED);
|
||||
|
||||
setLayeredWindowAttributes =
|
||||
setLayeredWindowAttributes =
|
||||
(PFN_SetLayeredWindowAttributes)GetProcAddress (GetModuleHandle ("user32.dll"), "SetLayeredWindowAttributes");
|
||||
|
||||
if (setLayeredWindowAttributes)
|
||||
@ -3302,7 +3302,7 @@ gdk_win32_window_is_win32 (GdkWindow *window)
|
||||
/**
|
||||
* _gdk_win32_acquire_dc
|
||||
* @impl: a Win32 #GdkWindowImplWin32 implementation
|
||||
*
|
||||
*
|
||||
* Gets a DC with the given drawable selected into it.
|
||||
*
|
||||
* Returns: The DC, on success. Otherwise
|
||||
@ -3310,7 +3310,7 @@ gdk_win32_window_is_win32 (GdkWindow *window)
|
||||
* _gdk_win32_impl_release_dc() must be called
|
||||
* release the DC when you are done using it.
|
||||
**/
|
||||
static HDC
|
||||
static HDC
|
||||
_gdk_win32_impl_acquire_dc (GdkWindowImplWin32 *impl)
|
||||
{
|
||||
if (GDK_IS_WINDOW_IMPL_WIN32 (impl) &&
|
||||
@ -3338,7 +3338,7 @@ _gdk_win32_impl_acquire_dc (GdkWindowImplWin32 *impl)
|
||||
/**
|
||||
* _gdk_win32_impl_release_dc
|
||||
* @impl: a Win32 #GdkWindowImplWin32 implementation
|
||||
*
|
||||
*
|
||||
* Releases the reference count for the DC
|
||||
* from _gdk_win32_impl_acquire_dc()
|
||||
**/
|
||||
@ -3355,7 +3355,7 @@ _gdk_win32_impl_release_dc (GdkWindowImplWin32 *impl)
|
||||
GDI_CALL (SelectObject, (impl->hdc, impl->saved_dc_bitmap));
|
||||
impl->saved_dc_bitmap = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (impl->hdc)
|
||||
{
|
||||
GDI_CALL (ReleaseDC, (impl->handle, impl->hdc));
|
||||
@ -3416,7 +3416,7 @@ gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass)
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gdk_window_impl_win32_finalize;
|
||||
|
||||
|
||||
impl_class->ref_cairo_surface = gdk_win32_ref_cairo_surface;
|
||||
|
||||
impl_class->show = gdk_win32_window_show;
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WINDOW_WIN32_H__
|
||||
@ -84,8 +84,8 @@ struct _GdkWindowImplWin32
|
||||
int hdc_count;
|
||||
HBITMAP saved_dc_bitmap; /* Original bitmap for dc */
|
||||
};
|
||||
|
||||
struct _GdkWindowImplWin32Class
|
||||
|
||||
struct _GdkWindowImplWin32Class
|
||||
{
|
||||
GdkWindowImplClass parent_class;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user