Back to index

unity  6.0.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions
WindowManagerDummy Class Reference
Inheritance diagram for WindowManagerDummy:
Inheritance graph
[legend]
Collaboration diagram for WindowManagerDummy:
Collaboration graph
[legend]

List of all members.

Public Types

enum  FocusVisibility { OnlyVisible, ForceUnminimizeInvisible, ForceUnminimizeOnCurrentDesktop }
typedef std::list
< Introspectable * > 
IntrospectableList

Public Member Functions

virtual void Decorate (guint32 xid)
virtual void Undecorate (guint32 xid)
void StartMove (guint32 xid, int, int)
virtual nux::Geometry GetWindowGeometry (guint32 xid) const =0
virtual nux::Geometry GetWindowSavedGeometry (guint32 xid) const =0
GVariant * Introspect ()
void AddChild (Introspectable *child)
void RemoveChild (Introspectable *child)
virtual IntrospectableList GetIntrospectableChildren ()
guint64 GetIntrospectionId () const

Static Public Member Functions

static WindowManagerDefault ()
static void SetDefault (WindowManager *manager)

Public Attributes

sigc::signal< void, guint32 > window_mapped
sigc::signal< void, guint32 > window_unmapped
sigc::signal< void, guint32 > window_maximized
sigc::signal< void, guint32 > window_restored
sigc::signal< void, guint32 > window_minimized
sigc::signal< void, guint32 > window_unminimized
sigc::signal< void, guint32 > window_shaded
sigc::signal< void, guint32 > window_unshaded
sigc::signal< void, guint32 > window_shown
sigc::signal< void, guint32 > window_hidden
sigc::signal< void, guint32 > window_resized
sigc::signal< void, guint32 > window_moved
sigc::signal< void, guint32 > window_focus_changed
sigc::signal< void, guint32 > window_decorated
sigc::signal< void, guint32 > window_undecorated
sigc::signal< void > initiate_spread
sigc::signal< void > terminate_spread
sigc::signal< void > initiate_expo
sigc::signal< void > terminate_expo
sigc::signal< void > compiz_screen_grabbed
sigc::signal< void > compiz_screen_ungrabbed
sigc::signal< void > compiz_screen_viewport_switch_started
sigc::signal< void > compiz_screen_viewport_switch_ended
sigc::signal< void, const char
*, const char
*, CompOption::Vector & > 
compiz_event

Protected Member Functions

std::string GetName () const
virtual std::string GetChildsName () const
 Please don't override this unless you really need to. The only valid reason is if you have a property that simply must be called 'Children'.

Private Member Functions

guint32 GetActiveWindow ()
unsigned long long GetWindowActiveNumber (guint32 xid)
bool IsScreenGrabbed ()
bool IsViewPortSwitchStarted ()
void ShowDesktop ()
bool IsWindowMaximized (guint32 xid)
bool IsWindowDecorated (guint32 xid)
bool IsWindowOnCurrentDesktop (guint32 xid)
bool IsWindowObscured (guint32 xid)
bool IsWindowMapped (guint32 xid)
bool IsWindowVisible (guint32 xid)
bool IsWindowOnTop (guint32 xid)
bool IsWindowClosable (guint32 xid)
bool IsWindowMinimizable (guint32 xid)
bool IsWindowMaximizable (guint32 xid)
void Restore (guint32 xid)
void RestoreAt (guint32 xid, int x, int y)
void Minimize (guint32 xid)
void Close (guint32 xid)
void Activate (guint32 xid)
void Raise (guint32 xid)
void Lower (guint32 xid)
void FocusWindowGroup (std::vector< Window > windows, FocusVisibility, int monitor, bool only_top_win)
bool ScaleWindowGroup (std::vector< Window > windows, int state, bool force)
int GetWindowMonitor (guint32 xid) const
nux::Geometry GetWindowGeometry (guint xid) const
nux::Geometry GetWindowSavedGeometry (guint xid) const
nux::Geometry GetScreenGeometry () const
nux::Geometry GetWorkAreaGeometry (guint32 xid) const
void SetWindowIconGeometry (Window window, nux::Geometry const &geo)
void CheckWindowIntersections (nux::Geometry const &region, bool &active, bool &any)
int WorkspaceCount ()
void TerminateScale ()
bool IsScaleActive ()
bool IsScaleActiveForGroup ()
void InitiateExpo ()
bool IsExpoActive ()
void MoveResizeWindow (guint32 xid, nux::Geometry geometry)
bool saveInputFocus ()
bool restoreInputFocus ()
void AddProperties (GVariantBuilder *builder)

Detailed Description

Definition at line 24 of file WindowManager.cpp.


Member Typedef Documentation

Definition at line 34 of file Introspectable.h.


Member Enumeration Documentation

Enumerator:
OnlyVisible 
ForceUnminimizeInvisible 
ForceUnminimizeOnCurrentDesktop 

Definition at line 42 of file WindowManager.h.


Member Function Documentation

void WindowManagerDummy::Activate ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 121 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }

Definition at line 78 of file Introspectable.cpp.

{
  _children.push_back(child);
  child->_parents.push_back(this);
}

Here is the caller graph for this function:

void WindowManagerDummy::AddProperties ( GVariantBuilder *  builder) [inline, private, virtual]

Implements WindowManager.

Definition at line 234 of file WindowManager.cpp.

  {
  }
void WindowManagerDummy::CheckWindowIntersections ( nux::Geometry const &  region,
bool &  active,
bool &  any 
) [inline, private, virtual]

Implements WindowManager.

Definition at line 179 of file WindowManager.cpp.

  {
    active = false;
    any = false;
  }
void WindowManagerDummy::Close ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 116 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
virtual void WindowManager::Decorate ( guint32  xid) [inline, virtual, inherited]

Reimplemented in PluginAdapter.

Definition at line 86 of file WindowManager.h.

{};

Here is the caller graph for this function:

WindowManager * WindowManager::Default ( ) [static, inherited]

Reimplemented in PluginAdapter.

Definition at line 240 of file WindowManager.cpp.

void WindowManagerDummy::FocusWindowGroup ( std::vector< Window >  windows,
FocusVisibility  ,
int  monitor,
bool  only_top_win 
) [inline, private, virtual]

Implements WindowManager.

Definition at line 136 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
guint32 WindowManagerDummy::GetActiveWindow ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 26 of file WindowManager.cpp.

  {
    return 0;
  }
std::string unity::debug::Introspectable::GetChildsName ( ) const [protected, virtual, inherited]

Please don't override this unless you really need to. The only valid reason is if you have a property that simply must be called 'Children'.

Definition at line 92 of file Introspectable.cpp.

{
  return "Children";
}

Here is the caller graph for this function:

Introspectable::IntrospectableList unity::debug::Introspectable::GetIntrospectableChildren ( ) [virtual, inherited]

Reimplemented in unity::hud::View, unity::launcher::LauncherModel, unity::QuicklistView, and unity::dash::ResultView.

Definition at line 41 of file Introspectable.cpp.

{
  return _children;
}

Here is the caller graph for this function:

guint64 unity::debug::Introspectable::GetIntrospectionId ( ) const [inherited]

Definition at line 97 of file Introspectable.cpp.

{
  return _id;
}

Here is the caller graph for this function:

std::string WindowManager::GetName ( ) const [protected, virtual, inherited]

Implements unity::debug::Introspectable.

Definition at line 254 of file WindowManager.cpp.

{
  return "WindowManager";
}
nux::Geometry WindowManagerDummy::GetScreenGeometry ( ) const [inline, private, virtual]

Implements WindowManager.

Definition at line 164 of file WindowManager.cpp.

  {
    return nux::Geometry(0, 0, 1, 1);
  }
unsigned long long WindowManagerDummy::GetWindowActiveNumber ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 31 of file WindowManager.cpp.

  {
    return 0;
  }
virtual nux::Geometry WindowManager::GetWindowGeometry ( guint32  xid) const [pure virtual, inherited]

Implemented in PluginAdapter.

Here is the caller graph for this function:

nux::Geometry WindowManagerDummy::GetWindowGeometry ( guint  xid) const [inline, private]

Definition at line 152 of file WindowManager.cpp.

  {
    int width = (guint32)xid >> 16;
    int height = (guint32)xid & 0x0000FFFF;
    return nux::Geometry(0, 0, width, height);
  }
int WindowManagerDummy::GetWindowMonitor ( guint32  xid) const [inline, private, virtual]

Implements WindowManager.

Definition at line 147 of file WindowManager.cpp.

  {
    return -1;
  }
virtual nux::Geometry WindowManager::GetWindowSavedGeometry ( guint32  xid) const [pure virtual, inherited]

Implemented in PluginAdapter.

nux::Geometry WindowManagerDummy::GetWindowSavedGeometry ( guint  xid) const [inline, private]

Definition at line 159 of file WindowManager.cpp.

  {
    return nux::Geometry(0, 0, 1, 1);
  }
nux::Geometry WindowManagerDummy::GetWorkAreaGeometry ( guint32  xid) const [inline, private, virtual]

Implements WindowManager.

Definition at line 169 of file WindowManager.cpp.

  {
    return nux::Geometry(0, 0, 1, 1);
  }
void WindowManagerDummy::InitiateExpo ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 207 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
GVariant * unity::debug::Introspectable::Introspect ( ) [inherited]

Definition at line 47 of file Introspectable.cpp.

{
  GVariantBuilder  builder;
  GVariantBuilder  child_builder;
  gint             n_children = 0;

  g_variant_builder_init(&builder, G_VARIANT_TYPE("a{sv}"));
  g_variant_builder_add(&builder, "{sv}", "id", g_variant_new_uint64(_id));

  AddProperties(&builder);

  g_variant_builder_init(&child_builder, G_VARIANT_TYPE("as"));

  auto children = GetIntrospectableChildren();
  for (auto it = children.begin(); it != children.end(); it++)
  {
    if ((*it)->GetName() != "")
    {
      g_variant_builder_add(&child_builder, "s", (*it)->GetName().c_str());
      n_children++;
    }
  }

  GVariant* child_results = g_variant_builder_end(&child_builder);

  if (n_children > 0)
    g_variant_builder_add(&builder, "{sv}", GetChildsName().c_str(), child_results);
  return g_variant_builder_end(&builder);
}

Here is the call graph for this function:

bool WindowManagerDummy::IsExpoActive ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 212 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
    return false;
  }
bool WindowManagerDummy::IsScaleActive ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 195 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
    return false;
  }
bool WindowManagerDummy::IsScaleActiveForGroup ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 201 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
    return false;
  }
bool WindowManagerDummy::IsScreenGrabbed ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 36 of file WindowManager.cpp.

  {
    return false;
  }
bool WindowManagerDummy::IsViewPortSwitchStarted ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 41 of file WindowManager.cpp.

  {
    return false;
  }
bool WindowManagerDummy::IsWindowClosable ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 86 of file WindowManager.cpp.

  {
    return true;
  }
bool WindowManagerDummy::IsWindowDecorated ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 56 of file WindowManager.cpp.

  {
    return true;
  }
bool WindowManagerDummy::IsWindowMapped ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 71 of file WindowManager.cpp.

  {
    return true;
  }
bool WindowManagerDummy::IsWindowMaximizable ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 96 of file WindowManager.cpp.

  {
    return true;
  }
bool WindowManagerDummy::IsWindowMaximized ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 51 of file WindowManager.cpp.

  {
    return false;
  }
bool WindowManagerDummy::IsWindowMinimizable ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 91 of file WindowManager.cpp.

  {
    return true;
  }
bool WindowManagerDummy::IsWindowObscured ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 66 of file WindowManager.cpp.

  {
    return false;
  }
bool WindowManagerDummy::IsWindowOnCurrentDesktop ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 61 of file WindowManager.cpp.

  {
    return true;
  }
bool WindowManagerDummy::IsWindowOnTop ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 81 of file WindowManager.cpp.

  {
    return false;
  }
bool WindowManagerDummy::IsWindowVisible ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 76 of file WindowManager.cpp.

  {
    return true;
  }
void WindowManagerDummy::Lower ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 131 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
void WindowManagerDummy::Minimize ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 111 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
void WindowManagerDummy::MoveResizeWindow ( guint32  xid,
nux::Geometry  geometry 
) [inline, private, virtual]

Implements WindowManager.

Definition at line 218 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
void WindowManagerDummy::Raise ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 126 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }

Definition at line 85 of file Introspectable.cpp.

{
  _children.remove(child);
  child->_parents.remove(this);
}

Here is the caller graph for this function:

void WindowManagerDummy::Restore ( guint32  xid) [inline, private, virtual]

Implements WindowManager.

Definition at line 101 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
void WindowManagerDummy::RestoreAt ( guint32  xid,
int  x,
int  y 
) [inline, private, virtual]

Implements WindowManager.

Definition at line 106 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
bool WindowManagerDummy::restoreInputFocus ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 228 of file WindowManager.cpp.

  {
    return false;
  }
bool WindowManagerDummy::saveInputFocus ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 223 of file WindowManager.cpp.

  {
    return false;
  }
bool WindowManagerDummy::ScaleWindowGroup ( std::vector< Window >  windows,
int  state,
bool  force 
) [inline, private, virtual]

Implements WindowManager.

Definition at line 141 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
    return false;
  }
void WindowManager::SetDefault ( WindowManager manager) [static, inherited]

Definition at line 249 of file WindowManager.cpp.

{
  window_manager = manager;
}

Here is the caller graph for this function:

void WindowManagerDummy::SetWindowIconGeometry ( Window  window,
nux::Geometry const &  geo 
) [inline, private, virtual]

Implements WindowManager.

Definition at line 174 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
void WindowManagerDummy::ShowDesktop ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 46 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
void WindowManager::StartMove ( guint32  xid,
int  x,
int  y 
) [inherited]

Definition at line 261 of file WindowManager.cpp.

{
  if (x < 0 || y < 0)
    return;

  XEvent ev;
  Display* d = nux::GetGraphicsDisplay()->GetX11Display();

  /* We first need to ungrab the pointer. FIXME: Evil */

  XUngrabPointer(d, CurrentTime);

  // --------------------------------------------------------------------------
  // FIXME: This is a workaround until the non-paired events issue is fixed in
  // nux
  XButtonEvent bev =
  {
    ButtonRelease,
    0,
    False,
    d,
    0,
    0,
    0,
    CurrentTime,
    x, y,
    x, y,
    0,
    Button1,
    True
  };
  XEvent* e = (XEvent*)&bev;
  nux::GetWindowThread()->ProcessForeignEvent(e, NULL);

  ev.xclient.type    = ClientMessage;
  ev.xclient.display = d;

  ev.xclient.serial     = 0;
  ev.xclient.send_event = true;

  ev.xclient.window     = xid;
  ev.xclient.message_type = m_MoveResizeAtom;
  ev.xclient.format     = 32;

  ev.xclient.data.l[0] = x; // x_root
  ev.xclient.data.l[1] = y; // y_root
  ev.xclient.data.l[2] = NET_WM_MOVERESIZE_MOVE; //direction
  ev.xclient.data.l[3] = 1; // button
  ev.xclient.data.l[4] = 2; // source

  XSendEvent(d, DefaultRootWindow(d), FALSE,
             SubstructureRedirectMask | SubstructureNotifyMask,
             &ev);

  XSync(d, FALSE);
}
void WindowManagerDummy::TerminateScale ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 190 of file WindowManager.cpp.

  {
    g_debug("%s", G_STRFUNC);
  }
virtual void WindowManager::Undecorate ( guint32  xid) [inline, virtual, inherited]

Reimplemented in PluginAdapter.

Definition at line 87 of file WindowManager.h.

{};

Here is the caller graph for this function:

int WindowManagerDummy::WorkspaceCount ( ) [inline, private, virtual]

Implements WindowManager.

Definition at line 185 of file WindowManager.cpp.

  {
    return 1;
  }

Member Data Documentation

sigc::signal<void, const char*, const char*, CompOption::Vector&> WindowManager::compiz_event [inherited]

Definition at line 140 of file WindowManager.h.

sigc::signal<void> WindowManager::compiz_screen_grabbed [inherited]

Definition at line 135 of file WindowManager.h.

sigc::signal<void> WindowManager::compiz_screen_ungrabbed [inherited]

Definition at line 136 of file WindowManager.h.

Definition at line 138 of file WindowManager.h.

Definition at line 137 of file WindowManager.h.

sigc::signal<void> WindowManager::initiate_expo [inherited]

Definition at line 132 of file WindowManager.h.

sigc::signal<void> WindowManager::initiate_spread [inherited]

Definition at line 129 of file WindowManager.h.

sigc::signal<void> WindowManager::terminate_expo [inherited]

Definition at line 133 of file WindowManager.h.

sigc::signal<void> WindowManager::terminate_spread [inherited]

Definition at line 130 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_decorated [inherited]

Definition at line 126 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_focus_changed [inherited]

Definition at line 125 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_hidden [inherited]

Definition at line 122 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_mapped [inherited]

Definition at line 113 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_maximized [inherited]

Definition at line 115 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_minimized [inherited]

Definition at line 117 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_moved [inherited]

Definition at line 124 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_resized [inherited]

Definition at line 123 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_restored [inherited]

Definition at line 116 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_shaded [inherited]

Definition at line 119 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_shown [inherited]

Definition at line 121 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_undecorated [inherited]

Definition at line 127 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_unmapped [inherited]

Definition at line 114 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_unminimized [inherited]

Definition at line 118 of file WindowManager.h.

sigc::signal<void, guint32> WindowManager::window_unshaded [inherited]

Definition at line 120 of file WindowManager.h.


The documentation for this class was generated from the following file: