~azzar1/unity/dnd-enhancements

« back to all changes in this revision

Viewing changes to src/LauncherController.h

Import the work done so far with Compiz

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef LAUNCHERCONTROLLER_H
 
2
#define LAUNCHERCONTROLLER_H
 
3
 
 
4
/* Compiz */
 
5
#include <core/core.h>
 
6
 
 
7
#include <Nux/Nux.h>
 
8
#include <Nux/BaseWindow.h>
 
9
 
 
10
#include "BamfLauncherIcon.h"
 
11
#include "LauncherModel.h"
 
12
 
 
13
#include "FavoriteStore.h"
 
14
 
 
15
#include <libbamf/libbamf.h>
 
16
#include <sigc++/sigc++.h>
 
17
 
 
18
 
 
19
class Launcher;
 
20
 
 
21
class LauncherController : public sigc::trackable
 
22
{
 
23
 
 
24
public:
 
25
    LauncherController(Launcher* launcher, CompScreen *screen, nux::BaseWindow* window, NUX_FILE_LINE_PROTO);
 
26
    ~LauncherController();
 
27
 
 
28
 
 
29
private:
 
30
    BamfMatcher* m_Matcher;
 
31
    CompAction* m_ExpoAction;
 
32
    CompScreen* m_Screen;
 
33
    Launcher* m_Launcher;
 
34
    LauncherModel* _model;
 
35
    nux::BaseWindow* m_Window;
 
36
    std::list<LauncherIcon *> m_Icons;
 
37
    FavoriteStore* m_FavoriteStore;
 
38
 
 
39
    void InsertExpoAction ();
 
40
 
 
41
    void RegisterIcon (LauncherIcon *icon);
 
42
    
 
43
    void CreateFavorite (const char *file_path);
 
44
 
 
45
    void SetupBamf ();
 
46
 
 
47
    void OnIconShow (void *sender);
 
48
    
 
49
    void OnIconHide (void *sender);
 
50
    
 
51
    void OnIconRemove (void *sender);
 
52
    
 
53
    void OnExpoClicked ();
 
54
    
 
55
    /* statics */
 
56
    
 
57
    static bool BamfTimerCallback (void *data);
 
58
 
 
59
    static void OnViewOpened (BamfMatcher *matcher, BamfView *view, gpointer data);
 
60
};
 
61
 
 
62
#endif // LAUNCHERCONTROLLER_H