Back to index

easystroke  0.5.5.1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
Modifiers Class Reference
Inheritance diagram for Modifiers:
Inheritance graph
[legend]
Collaboration diagram for Modifiers:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Modifiers (guint mods_, Glib::ustring str_)
bool operator== (const Modifiers &m)
virtual void timeout ()
 ~Modifiers ()

Private Member Functions

bool remove_timeout ()
void set_timeout (int ms)

Static Private Member Functions

static void update_mods ()

Private Attributes

guint mods
Glib::ustring str
OSDosd

Static Private Attributes

static std::set< Modifiers * > all

Detailed Description

Definition at line 1662 of file main.cc.


Constructor & Destructor Documentation

Modifiers::Modifiers ( guint  mods_,
Glib::ustring  str_ 
) [inline]

Definition at line 1681 of file main.cc.

                                                : mods(mods_), str(str_), osd(NULL) {
              if (prefs.show_osd.get())
                     set_timeout(150);
              all.insert(this);
              update_mods();
       }

Here is the call graph for this function:

Modifiers::~Modifiers ( ) [inline]

Definition at line 1693 of file main.cc.

                    {
              all.erase(this);
              update_mods();
              delete osd;
       }

Here is the call graph for this function:


Member Function Documentation

bool Modifiers::operator== ( const Modifiers m) [inline]

Definition at line 1687 of file main.cc.

                                           {
              return mods == m.mods && str == m.str;
       }
bool Timeout::remove_timeout ( ) [inline, inherited]

Definition at line 32 of file util.h.

                             {
              if (c) {
                     c->disconnect();
                     c = 0;
                     return true;
              }
              return false;
       }

Here is the caller graph for this function:

void Timeout::set_timeout ( int  ms) [inline, inherited]

Definition at line 40 of file util.h.

                                {
              remove_timeout();
              connection = Glib::signal_timeout().connect(sigc::mem_fun(*this, &Timeout::to), ms);
              c = &connection;
       }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void Modifiers::timeout ( ) [inline, virtual]

Implements Timeout.

Definition at line 1690 of file main.cc.

                              {
              osd = new OSD(str);
       }
static void Modifiers::update_mods ( ) [inline, static, private]

Definition at line 1664 of file main.cc.

                                 {
              static guint mod_state = 0;
              guint new_state = 0;
              for (std::set<Modifiers *>::iterator i = all.begin(); i != all.end(); i++)
                     new_state |= (*i)->mods;
              for (int i = 0; i < n_modkeys; i++) {
                     guint mask = modkeys[i].mask;
                     if ((mod_state & mask) ^ (new_state & mask))
                            XTestFakeKeyEvent(dpy, XKeysymToKeycode(dpy, modkeys[i].sym), new_state & mask, 0);
              }
              mod_state = new_state;
       }

Here is the caller graph for this function:


Member Data Documentation

std::set< Modifiers * > Modifiers::all [static, private]

Definition at line 1663 of file main.cc.

guint Modifiers::mods [private]

Definition at line 1677 of file main.cc.

OSD* Modifiers::osd [private]

Definition at line 1679 of file main.cc.

Glib::ustring Modifiers::str [private]

Definition at line 1678 of file main.cc.


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