~cando/unity/fix_692444

« back to all changes in this revision

Viewing changes to src/Launcher.h

  • Committer: Mirco Müller
  • Date: 2011-02-03 17:36:30 UTC
  • mfrom: (803.1.15 unity.fix-701546-2)
  • Revision ID: mirco.mueller@ubuntu.com-20110203173630-vto9fp3jtpkn1wm9
added:
  resources/round_glow_hl_62x62.png
modified:
  src/BamfLauncherIcon.cpp
  src/BamfLauncherIcon.h
  src/Launcher.cpp
  src/Launcher.h
  src/LauncherEntryRemote.h
  src/LauncherIcon.cpp
  src/LauncherIcon.h
  src/SimpleLauncherIcon.cpp
  src/SimpleLauncherIcon.h
  src/UBusMessages.h
  src/unityshell.cpp
  src/unityshell.h
  unityshell.xml.in

The first part of a11y (keyboard-navigation) support for the launcher. By
default Alt-F1 sets the input-focus on the launcher and you can use
Up/Down to move the selection around, SPACE/RETURN activates the currently
selected icon, Shift-F10/Right opens the quicklist (keyboard-navigation
for this isn't merged yet), ESC (or opening Quicklist) exits keyboard-navigation
of launcher. Fixes LP: #701546

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "NuxGraphics/IOpenGLAsmShader.h"
34
34
#include "Nux/TimerProc.h"
35
35
#include "PluginAdapter.h"
36
 
 
 
36
 
37
37
#define ANIM_DURATION_SHORT 125
38
38
#define ANIM_DURATION       200
39
39
#define ANIM_DURATION_LONG  350
61
61
    URGENT_ANIMATION_WIGGLE,
62
62
  } UrgentAnimation;
63
63
 
64
 
  Launcher(nux::BaseWindow *parent, CompScreen *screen, NUX_FILE_LINE_PROTO);
 
64
  Launcher (nux::BaseWindow* parent, CompScreen* screen, NUX_FILE_LINE_PROTO);
65
65
  ~Launcher();
66
66
 
67
67
  virtual long ProcessEvent(nux::IEvent &ievent, long TraverseInfo, long ProcessEventInfo);
108
108
  virtual void RecvMouseMove(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags);
109
109
  virtual void RecvMouseWheel(int x, int y, int wheel_delta, unsigned long button_flags, unsigned long key_flags);
110
110
 
 
111
  virtual void RecvKeyPressed (unsigned int key_sym, unsigned long key_code, unsigned long key_state);
 
112
 
111
113
  virtual void RecvQuicklistOpened (QuicklistView *quicklist);
112
114
  virtual void RecvQuicklistClosed (QuicklistView *quicklist);
113
115
 
 
116
  void startKeyNavMode ();
 
117
  void exitKeyNavMode ();
 
118
 
114
119
  sigc::signal<void, LauncherIcon *, LauncherIcon *, bool> request_reorder_smart;
115
120
  sigc::signal<void, LauncherIcon *, LauncherIcon *, bool> request_reorder_before;
116
121
protected:
147
152
    bool          active_colored;
148
153
    bool          skip;
149
154
    bool          stick_thingy;
 
155
    bool          keyboard_nav_hl;
150
156
    int           window_indicators;
151
157
  } RenderArg;
152
158
 
238
244
                         int active,
239
245
                         nux::Geometry geo);
240
246
 
 
247
  void RenderKeyNavHighlight (nux::GraphicsEngine& GfxContext,
 
248
                              nux::Geometry        geo);
 
249
 
241
250
  void RenderIcon (nux::GraphicsEngine& GfxContext,
242
251
                   RenderArg const &arg,
243
252
                   nux::IntrusiveSP<nux::IOpenGLBaseTexture> icon,
279
288
  LauncherIcon* m_ActiveMenuIcon;
280
289
  LauncherIcon* m_LastSpreadIcon;
281
290
 
 
291
  // used by keyboard/a11y-navigation
 
292
  LauncherIcon* _current_icon;
 
293
  LauncherIcon* _last_selected_icon;
 
294
  int           _current_icon_index;
 
295
  int           _last_icon_index;
 
296
 
282
297
  QuicklistView* _active_quicklist;
283
298
 
284
299
  bool  _hovered;
285
300
  bool  _floating;
286
301
  bool  _autohide;
287
302
  bool  _hidden;
 
303
  bool  _was_hidden;
288
304
  bool  _mouse_inside_launcher;
289
305
  bool  _mouse_inside_trigger;
290
306
  bool  _key_show_launcher;
323
339
  nux::BaseTexture* _icon_shine_texture;
324
340
  nux::BaseTexture* _icon_outline_texture;
325
341
  nux::BaseTexture* _icon_glow_texture;
 
342
  nux::BaseTexture* _icon_glow_hl_texture;
326
343
  nux::BaseTexture* _progress_bar_trough;
327
344
  nux::BaseTexture* _progress_bar_fill;
328
345
  
349
366
  nux::BaseWindow* _parent;
350
367
  LauncherModel* _model;
351
368
  LauncherDragWindow* _drag_window;
352
 
 
353
369
  CompScreen* _screen;
354
370
 
355
371
  /* event times */