Back to index

unity  6.0.0
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
unity::dash Namespace Reference

Namespaces

namespace  impl

Classes

class  AbstractPlacesGroup
class  Controller
class  DashLayout
class  DashView
class  FilterAllButton
class  FilterBar
class  FilterBasicButton
class  FilterExpanderLabel
class  FilterFactory
class  FilterGenreButton
class  FilterGenre
class  FilterMultiRangeButton
class  FilterMultiRange
class  FilterRatingsButton
class  FilterRatingsWidget
class  LensBar
class  LensBarIcon
class  LensScrollView
class  LensView
class  ResultRenderer
class  ResultRendererHorizontalTile
struct  TextureContainer
class  ResultRendererTile
class  ResultView
class  ResultViewGrid
class  Style
class  ApplicationPreview
class  Categories
class  Category
class  CheckOptionFilter
class  LensDirectoryReader
class  FilesystemLenses
class  FilterOption
class  Filter
class  FilterAdaptor
class  Filters
class  GenericPreview
class  HomeLens
 A special Lens implementation that merges together a set of source Lens instances. More...
class  Lens
class  Lenses
class  Model
class  RowAdaptorBase
class  MultiRangeFilter
class  TrackPreview
class  AlbumPreview
class  Preview
class  NoPreview
class  RadioOptionFilter
class  RatingsFilter
class  Result
class  Results

Typedefs

typedef std::tuple< int, int > ResultListBounds

Enumerations

enum  MultiRangeSide { LEFT = 0, RIGHT, CENTER }
enum  MultiRangeArrow { LEFT = 0, RIGHT, BOTH, NONE }
enum  StockIcon {
  CHECKMARK, CROSS, GRID_VIEW, FLOW_VIEW,
  STAR
}
enum  Alignment { LEFT = 0, CENTER, RIGHT }
enum  Orientation { UP, DOWN, LEFT = 0, RIGHT }
enum  BlendMode { NORMAL, MULTIPLY, SCREEN }
enum  FontWeight { LIGHT, REGULAR, BOLD }
enum  Segment { LEFT = 0, MIDDLE, RIGHT }
enum  Arrow { LEFT = 0, RIGHT, BOTH, NONE }
enum  FilterColumn {
  ID = 0, NAME, ICON_HINT, RENDERER_NAME,
  RENDERER_STATE, VISIBLE, COLLAPSED, FILTERING
}
enum  HandledType { NOT_HANDLED = 0, SHOW_DASH, HIDE_DASH, GOTO_DASH_URI }
enum  ViewType { HIDDEN = 0, HOME_VIEW, LENS_VIEW }
enum  ModelType { REMOTE, LOCAL }

Functions

 NUX_IMPLEMENT_OBJECT_TYPE (AbstractPlacesGroup)
 NUX_IMPLEMENT_OBJECT_TYPE (DashView)
 NUX_IMPLEMENT_OBJECT_TYPE (FilterBar)
 NUX_IMPLEMENT_OBJECT_TYPE (FilterExpanderLabel)
 NUX_IMPLEMENT_OBJECT_TYPE (FilterGenre)
 NUX_IMPLEMENT_OBJECT_TYPE (FilterMultiRange)
static void _UpdateRatingToMouse (RatingsFilter::Ptr filter, int x)
 NUX_IMPLEMENT_OBJECT_TYPE (FilterRatingsWidget)
 NUX_IMPLEMENT_OBJECT_TYPE (LensBar)
 NUX_IMPLEMENT_OBJECT_TYPE (LensBarIcon)
 NUX_IMPLEMENT_OBJECT_TYPE (LensView)
 NUX_IMPLEMENT_OBJECT_TYPE (ResultRenderer)
 NUX_IMPLEMENT_OBJECT_TYPE (ResultRendererHorizontalTile)
 NUX_IMPLEMENT_OBJECT_TYPE (ResultRendererTile)
 NUX_IMPLEMENT_OBJECT_TYPE (ResultView)
 NUX_IMPLEMENT_OBJECT_TYPE (ResultViewGrid)
GdkPixbuf * _icon_hint_get_drag_pixbuf (std::string icon_hint)
static void _blurinner (guchar *pixel, gint *zR, gint *zG, gint *zB, gint *zA, gint alpha, gint aprec, gint zprec)
static void _blurrow (guchar *pixels, gint width, gint height, gint channels, gint line, gint alpha, gint aprec, gint zprec)
static void _blurcol (guchar *pixels, gint width, gint height, gint channels, gint x, gint alpha, gint aprec, gint zprec)
void _expblur (guchar *pixels, gint width, gint height, gint channels, gint radius, gint aprec, gint zprec)

Variables

const char window_title [] = "unity-dash"

Typedef Documentation

typedef std::tuple<int, int> unity::dash::ResultListBounds

Definition at line 480 of file ResultViewGrid.cpp.


Enumeration Type Documentation

Enumerator:
LEFT 
CENTER 
RIGHT 

Definition at line 47 of file DashStyle.h.

                     {
  LEFT,
  CENTER,
  RIGHT
};
Enumerator:
LEFT 
RIGHT 
BOTH 
NONE 

Definition at line 78 of file DashStyle.h.

                 {
  LEFT,
  RIGHT,
  BOTH,
  NONE
};
Enumerator:
NORMAL 
MULTIPLY 
SCREEN 

Definition at line 60 of file DashStyle.h.

Enumerator:
ID 
NAME 
ICON_HINT 
RENDERER_NAME 
RENDERER_STATE 
VISIBLE 
COLLAPSED 
FILTERING 

Definition at line 37 of file Filter.h.

Enumerator:
LIGHT 
REGULAR 
BOLD 

Definition at line 66 of file DashStyle.h.

                      {
  LIGHT,
  REGULAR,
  BOLD
};
Enumerator:
NOT_HANDLED 
SHOW_DASH 
HIDE_DASH 
GOTO_DASH_URI 

Definition at line 39 of file Lens.h.

Enumerator:
REMOTE 
LOCAL 

Definition at line 38 of file Model.h.

{
  REMOTE,
  LOCAL
};
Enumerator:
LEFT 
RIGHT 
BOTH 
NONE 

Definition at line 45 of file FilterMultiRangeButton.h.

                           : unsigned int
{
  LEFT = 0,
  RIGHT,
  BOTH,
  NONE
};
Enumerator:
LEFT 
RIGHT 
CENTER 

Definition at line 38 of file FilterMultiRangeButton.h.

                          : unsigned int
{
  LEFT = 0,
  RIGHT,
  CENTER
};
Enumerator:
UP 
DOWN 
LEFT 
RIGHT 

Definition at line 53 of file DashStyle.h.

                       {
  UP,
  DOWN,
  LEFT,
  RIGHT
};
Enumerator:
LEFT 
MIDDLE 
RIGHT 

Definition at line 72 of file DashStyle.h.

                   {
  LEFT,
  MIDDLE,
  RIGHT
};
Enumerator:
CHECKMARK 
CROSS 
GRID_VIEW 
FLOW_VIEW 
STAR 

Definition at line 39 of file DashStyle.h.

Enumerator:
HIDDEN 
HOME_VIEW 
LENS_VIEW 

Definition at line 47 of file Lens.h.


Function Documentation

static void unity::dash::_blurcol ( guchar *  pixels,
gint  width,
gint  height,
gint  channels,
gint  x,
gint  alpha,
gint  aprec,
gint  zprec 
) [inline, static]

Definition at line 570 of file DashStyle.cpp.

{
  gint zR;
  gint zG;
  gint zB;
  gint zA;
  gint index;
  guchar* ptr;

  ptr = pixels;

  ptr += x * channels;

  zR = *((guchar*) ptr    ) << zprec;
  zG = *((guchar*) ptr + 1) << zprec;
  zB = *((guchar*) ptr + 2) << zprec;
  zA = *((guchar*) ptr + 3) << zprec;

  for (index = width; index < (height - 1) * width; index += width)
    _blurinner((guchar*) &ptr[index * channels], &zR, &zG, &zB, &zA, alpha,
               aprec, zprec);

  for (index = (height - 2) * width; index >= 0; index -= width)
    _blurinner((guchar*) &ptr[index * channels], &zR, &zG, &zB, &zA, alpha,
               aprec, zprec);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity::dash::_blurinner ( guchar *  pixel,
gint *  zR,
gint *  zG,
gint *  zB,
gint *  zA,
gint  alpha,
gint  aprec,
gint  zprec 
) [inline, static]

Definition at line 508 of file DashStyle.cpp.

{
  gint   r;
  gint   g;
  gint   b;
  guchar a;

  r = *pixel;
  g = *(pixel + 1);
  b = *(pixel + 2);
  a = *(pixel + 3);

  *zR += (alpha * ((r << zprec) - *zR)) >> aprec;
  *zG += (alpha * ((g << zprec) - *zG)) >> aprec;
  *zB += (alpha * ((b << zprec) - *zB)) >> aprec;
  *zA += (alpha * ((a << zprec) - *zA)) >> aprec;

  *pixel       = *zR >> zprec;
  *(pixel + 1) = *zG >> zprec;
  *(pixel + 2) = *zB >> zprec;
  *(pixel + 3) = *zA >> zprec;
}

Here is the caller graph for this function:

static void unity::dash::_blurrow ( guchar *  pixels,
gint  width,
gint  height,
gint  channels,
gint  line,
gint  alpha,
gint  aprec,
gint  zprec 
) [inline, static]

Definition at line 538 of file DashStyle.cpp.

{
  gint    zR;
  gint    zG;
  gint    zB;
  gint    zA;
  gint    index;
  guchar* scanline;

  scanline = &(pixels[line * width * channels]);

  zR = *scanline << zprec;
  zG = *(scanline + 1) << zprec;
  zB = *(scanline + 2) << zprec;
  zA = *(scanline + 3) << zprec;

  for (index = 0; index < width; index ++)
    _blurinner(&scanline[index * channels], &zR, &zG, &zB, &zA, alpha, aprec,
               zprec);

  for (index = width - 2; index >= 0; index--)
    _blurinner(&scanline[index * channels], &zR, &zG, &zB, &zA, alpha, aprec,
               zprec);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity::dash::_expblur ( guchar *  pixels,
gint  width,
gint  height,
gint  channels,
gint  radius,
gint  aprec,
gint  zprec 
)

Definition at line 618 of file DashStyle.cpp.

{
  gint alpha;
  gint row = 0;
  gint col = 0;

  if (radius < 1)
    return;

  // calculate the alpha such that 90% of
  // the kernel is within the radius.
  // (Kernel extends to infinity)
  alpha = (gint) ((1 << aprec) * (1.0f - expf (-2.3f / (radius + 1.f))));

  for (; row < height; row++)
    _blurrow(pixels, width, height, channels, row, alpha, aprec, zprec);

  for(; col < width; col++)
    _blurcol(pixels, width, height, channels, col, alpha, aprec, zprec);

  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

GdkPixbuf* unity::dash::_icon_hint_get_drag_pixbuf ( std::string  icon_hint)

Definition at line 698 of file ResultViewGrid.cpp.

{
  GdkPixbuf *pbuf;
  GtkIconTheme *theme;
  GtkIconInfo *info;
  GError *error = NULL;
  GIcon *icon;
  int size = 64;
  if (icon_hint.empty())
    icon_hint = "application-default-icon";
  if (g_str_has_prefix(icon_hint.c_str(), "/"))
  {
    pbuf = gdk_pixbuf_new_from_file_at_scale (icon_hint.c_str(),
                                              size, size, FALSE, &error);
    if (error != NULL || !pbuf || !GDK_IS_PIXBUF (pbuf))
    {
      icon_hint = "application-default-icon";
      g_error_free (error);
      error = NULL;
    }
    else
      return pbuf;
  }
  theme = gtk_icon_theme_get_default();
  icon = g_icon_new_for_string(icon_hint.c_str(), NULL);

  if (G_IS_ICON(icon))
  {
     info = gtk_icon_theme_lookup_by_gicon(theme, icon, size, (GtkIconLookupFlags)0);
      g_object_unref(icon);
  }
  else
  {
     info = gtk_icon_theme_lookup_icon(theme,
                                        icon_hint.c_str(),
                                        size,
                                        (GtkIconLookupFlags) 0);
  }

  if (!info)
  {
      info = gtk_icon_theme_lookup_icon(theme,
                                        "application-default-icon",
                                        size,
                                        (GtkIconLookupFlags) 0);
  }

  if (gtk_icon_info_get_filename(info) == NULL)
  {
      gtk_icon_info_free(info);
      info = gtk_icon_theme_lookup_icon(theme,
                                        "application-default-icon",
                                        size,
                                        (GtkIconLookupFlags) 0);
  }

  pbuf = gtk_icon_info_load_icon(info, &error);

  if (error != NULL)
  {
    LOG_WARN (logger) << "could not find a pixbuf for " << icon_hint;
    g_error_free (error);
    pbuf = NULL;
  }

  gtk_icon_info_free(info);
  return pbuf;
}

Here is the caller graph for this function:

static void unity::dash::_UpdateRatingToMouse ( RatingsFilter::Ptr  filter,
int  x 
) [static]

Definition at line 169 of file FilterRatingsButton.cpp.

{
  int width = 180;
  float new_rating = (static_cast<float>(x) / width);

  // FIXME: change to * 2 once we decide to support also half-stars
  new_rating = ceil((num_stars * 1) * new_rating) / (num_stars * 1);
  new_rating = (new_rating > 1) ? 1 : ((new_rating < 0) ? 0 : new_rating);

  if (filter)
    filter->rating = new_rating;
}

Here is the caller graph for this function:

unity::dash::NUX_IMPLEMENT_OBJECT_TYPE ( AbstractPlacesGroup  )
unity::dash::NUX_IMPLEMENT_OBJECT_TYPE ( FilterRatingsWidget  )
unity::dash::NUX_IMPLEMENT_OBJECT_TYPE ( ResultRendererTile  ) [static]
unity::dash::NUX_IMPLEMENT_OBJECT_TYPE ( ResultRendererHorizontalTile  ) [static]
unity::dash::NUX_IMPLEMENT_OBJECT_TYPE ( FilterExpanderLabel  )

Variable Documentation

const char unity::dash::window_title[] = "unity-dash"

Definition at line 35 of file DashController.cpp.