# Path: wimpiggy/util.py
# class AutoPropGObjectMixin(object):
# class AdHocStruct(object):
#     def __init__(self):
#     def _munge_property_name(self, name):
#     def do_get_property(self, pspec):
#     def do_set_property(self, pspec, value):
#     def _internal_set_property(self, name, value):
# def dump_exc():
#     def __repr__(self):
# def n_arg_signal(n):
# def non_none_list_accumulator(ihint, return_accu, handler_return):
# def gtk_main_quit_really():
#     def gtk_main_quit_forever():
# def gtk_main_quit_on_fatal_exceptions_enable():
#     def gtk_main_quit_on_fatal_exception(type, val, tb):


import subprocess
import sys
import os
import traceback
import os
import atexit
import errno
import gobject
import gtk
import gtk.gdk
from wimpiggy.util import one_arg_signal
        # unconditionally sets its colormap (using the default display) before
        # gtk_clipboard_for_display gets a chance to switch it to the proper
        # display.  So the end result is that we always need a valid default
        # display of some sort:
        gtk.gdk.display_manager_get().set_default_display(self.display)
        print "Opened new display %r" % (self.display,)

        os.environ["DBUS_SESSION_BUS_ADDRESS"] = _the_session._dbus_address

    def tearDown(self):
        # Could do cleanup here (close X11 connections, unset
        # os.environ["DBUS_SESSION_BUS_ADDRESS"], etc.), but our test runner
        # runs us in a forked off process that will exit immediately after
        # this, so who cares?
        pass

    def clone_display(self):
        clone = gtk.gdk.Display(self.display.get_name())
        print "Cloned new display %r" % (clone,)
        return clone


class MockEventReceiver(gobject.GObject):
    __gsignals__ = {
        "child-map-request-event": one_arg_signal,
        "child-configure-request-event": one_arg_signal,
        "wimpiggy-focus-in-event": one_arg_signal,
        "wimpiggy-focus-out-event": one_arg_signal,
        "wimpiggy-client-message-event": one_arg_signal,
        "wimpiggy-map-event": one_arg_signal,

# Path: wimpiggy/util.py
# class AutoPropGObjectMixin(object):
# class AdHocStruct(object):
#     def __init__(self):
#     def _munge_property_name(self, name):
#     def do_get_property(self, pspec):
#     def do_set_property(self, pspec, value):
#     def _internal_set_property(self, name, value):
# def dump_exc():
#     def __repr__(self):
# def n_arg_signal(n):
# def non_none_list_accumulator(ihint, return_accu, handler_return):
# def gtk_main_quit_really():
#     def gtk_main_quit_forever():
# def gtk_main_quit_on_fatal_exceptions_enable():
#     def gtk_main_quit_on_fatal_exception(type, val, tb):


# Path: wimpiggy/test.py
import subprocess
import sys
import os
import traceback
import os
import atexit
import errno
import gobject
import gtk
import gtk.gdk
from wimpiggy.util import one_arg_signal

        # unconditionally sets its colormap (using the default display) before
        # gtk_clipboard_for_display gets a chance to switch it to the proper
        # display.  So the end result is that we always need a valid default
        # display of some sort:
        gtk.gdk.display_manager_get().set_default_display(self.display)
        print "Opened new display %r" % (self.display,)

        os.environ["DBUS_SESSION_BUS_ADDRESS"] = _the_session._dbus_address

    def tearDown(self):
        # Could do cleanup here (close X11 connections, unset
        # os.environ["DBUS_SESSION_BUS_ADDRESS"], etc.), but our test runner
        # runs us in a forked off process that will exit immediately after
        # this, so who cares?
        pass

    def clone_display(self):
        clone = gtk.gdk.Display(self.display.get_name())
        print "Cloned new display %r" % (clone,)
        return clone


class MockEventReceiver(gobject.GObject):
    __gsignals__ = {
        "child-map-request-event": one_arg_signal,
        "child-configure-request-event": one_arg_signal,
        "wimpiggy-focus-in-event": one_arg_signal,
        "wimpiggy-focus-out-event": one_arg_signal,
        "wimpiggy-client-message-event": one_arg_signal,
        "wimpiggy-map-event": one_arg_signal,

        "wimpiggy-unmap-event": one_arg_signal,