Back to index

unity  6.0.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes
unity::ShowdesktopHandler Class Reference

#include <UnityShowdesktopHandler.h>

Collaboration diagram for unity::ShowdesktopHandler:
Collaboration graph
[legend]

List of all members.

Public Types

enum  State { StateVisible = 0, StateFadeOut = 1, StateFadeIn = 2, StateInvisible = 3 }

Public Member Functions

 ShowdesktopHandler (ShowdesktopHandlerWindowInterface *uwi, compiz::WindowInputRemoverLockAcquireInterface *lock_acquire_interface)
 ~ShowdesktopHandler ()
void FadeOut ()
void FadeIn ()
ShowdesktopHandlerWindowInterface::PostPaintAction Animate (unsigned int ms)
void PaintOpacity (unsigned short &opacity)
unsigned int GetPaintMask ()
void HandleShapeEvent ()
void WindowFocusChangeNotify ()
void UpdateFrameRegion (CompRegion &r)
ShowdesktopHandler::State GetState ()

Static Public Member Functions

static bool ShouldHide (ShowdesktopHandlerWindowInterface *)
static void InhibitLeaveShowdesktopMode (guint32 xid)
static void AllowLeaveShowdesktopMode (guint32 xid)
static guint32 InhibitingXid ()

Static Public Attributes

static const unsigned int fade_time = 300
static std::list
< ShowdesktopHandlerWindowInterface * > 
animating_windows

Private Attributes

ShowdesktopHandlerWindowInterfaceshowdesktop_handler_window_interface_
compiz::WindowInputRemoverLockAcquireInterfacelock_acquire_interface_
compiz::WindowInputRemoverLock::Ptr remover_
ShowdesktopHandler::State state_
float progress_
bool was_hidden_

Static Private Attributes

static guint32 inhibiting_xid = 0

Detailed Description

Definition at line 107 of file UnityShowdesktopHandler.h.


Member Enumeration Documentation

Enumerator:
StateVisible 
StateFadeOut 
StateFadeIn 
StateInvisible 

Definition at line 114 of file UnityShowdesktopHandler.h.


Constructor & Destructor Documentation

Definition at line 82 of file UnityShowdesktopHandler.cpp.

Definition at line 91 of file UnityShowdesktopHandler.cpp.

{
}

Member Function Documentation

Definition at line 70 of file UnityShowdesktopHandler.cpp.

{
  if (inhibiting_xid == xid)
    inhibiting_xid = 0;
}

Here is the caller graph for this function:

Definition at line 139 of file UnityShowdesktopHandler.cpp.

{
  float inc = ms / static_cast <float> (fade_time);

  if (state_ == ShowdesktopHandler::StateFadeOut)
  {
    progress_ += inc;
    if (progress_ >= 1.0f)
    {
      progress_ = 1.0f;
      state_ = StateInvisible;
    }
  }
  else if (state_ == StateFadeIn)
  {
    progress_ -= inc;
    if (progress_ <= 0.0f)
    {
      progress_ = 0.0f;
      state_ = StateVisible;
    }
  }
  else if (state_ == StateVisible)
    return ShowdesktopHandlerWindowInterface::PostPaintAction::Remove;
  else if (state_ == StateInvisible)
    return ShowdesktopHandlerWindowInterface::PostPaintAction::Wait;

  return ShowdesktopHandlerWindowInterface::PostPaintAction::Damage;
}

Here is the caller graph for this function:

Definition at line 119 of file UnityShowdesktopHandler.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 177 of file UnityShowdesktopHandler.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 182 of file UnityShowdesktopHandler.cpp.

{
  /* Ignore sent events from the InputRemover */
  if (remover_)
  {
    remover_->refresh();
  }
}

Here is the caller graph for this function:

Definition at line 77 of file UnityShowdesktopHandler.cpp.

{
  return inhibiting_xid;
}

Here is the caller graph for this function:

Definition at line 63 of file UnityShowdesktopHandler.cpp.

{
  if (!inhibiting_xid)
    inhibiting_xid = xid;
}

Here is the caller graph for this function:

void unity::ShowdesktopHandler::PaintOpacity ( unsigned short &  opacity)

Definition at line 169 of file UnityShowdesktopHandler.cpp.

{
  if (progress_ == 1.0f || progress_ == 0.0f)
    opacity = std::numeric_limits <unsigned short>::max();
  else
    opacity *= (1.0f - progress_);
}

Here is the caller graph for this function:

Definition at line 36 of file UnityShowdesktopHandler.cpp.

{
  if (wi->OverrideRedirect())
    return false;

  if (!wi->Managed())
    return false;

  if (wi->Grabbed())
    return false;

  if (wi->DesktopOrDock())
   return false;

  if (wi->SkipTaskbarOrPager())
    return false;

  if (wi->Hidden())
    if ((wi->ShowDesktopMode() || wi->Shaded() || wi->Minimized()))
      return false;

  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 205 of file UnityShowdesktopHandler.cpp.

{
  r = CompRegion();

  /* Ensure no other plugins can touch this frame region */
  showdesktop_handler_window_interface_->OverrideFrameRegion (r);
}

Here is the call graph for this function:

Definition at line 191 of file UnityShowdesktopHandler.cpp.

{
  if (showdesktop_handler_window_interface_->Minimized())
  {
    for (ShowdesktopHandlerWindowInterface *w : animating_windows)
      w->DisableFocus();

    showdesktop_handler_window_interface_->MoveFocusAway();

    for (ShowdesktopHandlerWindowInterface *w : animating_windows)
      w->EnableFocus();
  }
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 135 of file UnityShowdesktopHandler.h.

const unsigned int unity::ShowdesktopHandler::fade_time = 300 [static]

Definition at line 134 of file UnityShowdesktopHandler.h.

guint32 unity::ShowdesktopHandler::inhibiting_xid = 0 [static, private]

Definition at line 149 of file UnityShowdesktopHandler.h.

Definition at line 144 of file UnityShowdesktopHandler.h.

Definition at line 147 of file UnityShowdesktopHandler.h.

Definition at line 145 of file UnityShowdesktopHandler.h.

Definition at line 143 of file UnityShowdesktopHandler.h.

Definition at line 146 of file UnityShowdesktopHandler.h.

Definition at line 148 of file UnityShowdesktopHandler.h.


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