Back to index

Public Member Functions | Protected Member Functions | Private Attributes
Autostart Class Reference
Inheritance diagram for Autostart:
Inheritance graph
Collaboration diagram for Autostart:
Collaboration graph

List of all members.

Public Member Functions

 Autostart ()
virtual void set (const bool a_)
virtual bool get () const
virtual void notify ()
void connect (Base *s)

Protected Member Functions

void update ()

Private Attributes

bool a
std::string filename

Detailed Description

Definition at line 189 of file

Constructor & Destructor Documentation

Autostart::Autostart ( ) [inline]

Definition at line 193 of file

              std::string dir = getenv("HOME");
              dir += "/.config/autostart";
              filename = dir + "/easystroke.desktop";

              if (!is_dir(dir) && mkdir(dir.c_str(), 0777)) {
              a = is_file(filename);

Here is the call graph for this function:

Member Function Documentation

void Out< bool >::connect ( Base s) [inline, inherited]

Definition at line 54 of file var.h.

{ out.insert(s); }
virtual bool Autostart::get ( ) const [inline, virtual]

Implements Out< bool >.

Definition at line 208 of file

{ return a; }
virtual void Autostart::notify ( ) [inline, virtual]

Implements Base.

Definition at line 209 of file

              if (a) {
                     FILE *file = fopen(filename.c_str(), "w");
                     if (!file || fprintf(file, desktop_file, "easystroke") == -1)
                     if (file)
              } else {
                     if (remove(filename.c_str()) == -1)

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void Autostart::set ( const bool  a_) [inline, virtual]

Implements In< bool >.

Definition at line 204 of file

              a = a_;

Here is the call graph for this function:

void Out< bool >::update ( ) [inline, protected, inherited]

Definition at line 49 of file var.h.

              for (std::set<Base *>::iterator i = out.begin(); i != out.end(); i++)

Here is the caller graph for this function:

Member Data Documentation

bool Autostart::a [private]

Definition at line 190 of file

std::string Autostart::filename [private]

Definition at line 191 of file

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