widget/gtk/compat/gdk/gdkdnd.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef GDKDND_WRAPPER_H
     6 #define GDKDND_WRAPPER_H
     8 #define gdk_drag_context_get_actions gdk_drag_context_get_actions_
     9 #define gdk_drag_context_list_targets gdk_drag_context_list_targets_
    10 #define gdk_drag_context_get_dest_window gdk_drag_context_get_dest_window_
    11 #include_next <gdk/gdkdnd.h>
    12 #undef gdk_drag_context_get_actions
    13 #undef gdk_drag_context_list_targets
    14 #undef gdk_drag_context_get_dest_window
    16 static inline GdkDragAction
    17 gdk_drag_context_get_actions(GdkDragContext *context)
    18 {
    19   return context->actions;
    20 }
    22 static inline GList *
    23 gdk_drag_context_list_targets(GdkDragContext *context)
    24 {
    25   return context->targets;
    26 }
    28 static inline GdkWindow *
    29 gdk_drag_context_get_dest_window(GdkDragContext *context)
    30 {
    31   return context->dest_window;
    32 }
    33 #endif /* GDKDND_WRAPPER_H */

mercurial