Back to index

easystroke  0.5.5.1
Public Member Functions | Private Member Functions | Private Attributes
Water Class Reference

#include <water.h>

Inheritance diagram for Water:
Inheritance graph
[legend]
Collaboration diagram for Water:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Water ()
void draw (Point p)
void start (Point p)
void end ()
virtual void timeout ()

Private Member Functions

virtual void draw (Point p, Point q)
virtual void start_ ()
virtual void end_ ()

Private Attributes

DBusGConnection * bus
DBusGProxy * line_proxy

Detailed Description

Definition at line 22 of file water.h.


Constructor & Destructor Documentation

Definition at line 20 of file water.cc.

             {
       const char *ofc = "org.freedesktop.compiz";
       GError *error = 0;
       bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
       if (!bus) {
              g_error_free(error);
              throw DBusException();
       }
       char line[256];
       snprintf(line, sizeof(line), "/org/freedesktop/compiz/water/screen%d/line", DefaultScreen(dpy));
       line_proxy = dbus_g_proxy_new_for_name(bus, ofc, line, ofc);
}

Member Function Documentation

void Water::draw ( Point  p,
Point  q 
) [private, virtual]

Implements Trace.

Definition at line 33 of file water.cc.

                                 {
       dbus_g_proxy_call_no_reply(line_proxy, "activate",
                     G_TYPE_STRING, "root", G_TYPE_INT, gint(ROOT),
                     G_TYPE_STRING, "x0",   G_TYPE_INT, gint32(p.x),
                     G_TYPE_STRING, "y0",   G_TYPE_INT, gint32(p.y),
                     G_TYPE_STRING, "x1",   G_TYPE_INT, gint32(q.x),
                     G_TYPE_STRING, "y1",   G_TYPE_INT, gint32(q.y),
                     G_TYPE_INVALID);
}
void Trace::draw ( Point  p) [inline, inherited]

Definition at line 38 of file trace.h.

{ draw(last, p); last = p; }

Here is the call graph for this function:

Here is the caller graph for this function:

void Trace::end ( ) [inherited]

Definition at line 781 of file main.cc.

                {
       if (!active)
              return;
       active = false;
       XFixesShowCursor(dpy, ROOT);
       end_();
}

Here is the call graph for this function:

virtual void Water::end_ ( ) [inline, private, virtual]

Implements Trace.

Definition at line 28 of file water.h.

{}
void Trace::start ( Trace::Point  p) [inherited]

Definition at line 774 of file main.cc.

                              {
       last = p;
       active = true;
       XFixesHideCursor(dpy, ROOT);
       start_();
}

Here is the call graph for this function:

virtual void Water::start_ ( ) [inline, private, virtual]

Implements Trace.

Definition at line 27 of file water.h.

{}
virtual void Trace::timeout ( ) [inline, virtual, inherited]

Reimplemented in Fire, and Shape.

Definition at line 41 of file trace.h.

{}

Member Data Documentation

DBusGConnection* Water::bus [private]

Definition at line 23 of file water.h.

DBusGProxy* Water::line_proxy [private]

Definition at line 24 of file water.h.


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