Back to index

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

#include <annotate.h>

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

List of all members.

Public Member Functions

 Annotate ()
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 * draw_proxy
DBusGProxy * clear_proxy

Detailed Description

Definition at line 22 of file annotate.h.


Constructor & Destructor Documentation

Definition at line 20 of file annotate.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 draw[256];
       char clear[256];
       snprintf(draw, sizeof(draw), "/org/freedesktop/compiz/annotate/screen%d/draw", DefaultScreen(dpy));
       snprintf(clear, sizeof(clear), "/org/freedesktop/compiz/annotate/screen%d/clear_key", DefaultScreen(dpy));

       draw_proxy = dbus_g_proxy_new_for_name(bus, ofc, draw, ofc);
       clear_proxy = dbus_g_proxy_new_for_name(bus, ofc, clear, ofc);
}

Here is the call graph for this function:


Member Function Documentation

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

Implements Trace.

Definition at line 38 of file annotate.cc.

                                    {
       dbus_g_proxy_call_no_reply(draw_proxy, "activate",
                     G_TYPE_STRING, "root", G_TYPE_INT,    gint(ROOT),
                     G_TYPE_STRING, "x1",   G_TYPE_DOUBLE, gdouble(p.x),
                     G_TYPE_STRING, "y1",   G_TYPE_DOUBLE, gdouble(p.y),
                     G_TYPE_STRING, "x2",   G_TYPE_DOUBLE, gdouble(q.x),
                     G_TYPE_STRING, "y2",   G_TYPE_DOUBLE, gdouble(q.y),
                     G_TYPE_INVALID);
}

Here is the caller graph for this function:

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:

void Annotate::end_ ( ) [private, virtual]

Implements Trace.

Definition at line 47 of file annotate.cc.

                    {
       dbus_g_proxy_call_no_reply(clear_proxy, "activate",
                     G_TYPE_STRING, "root", G_TYPE_INT,    gint(ROOT),
                     G_TYPE_INVALID);
}
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 Annotate::start_ ( ) [inline, private, virtual]

Implements Trace.

Definition at line 28 of file annotate.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* Annotate::bus [private]

Definition at line 23 of file annotate.h.

DBusGProxy* Annotate::clear_proxy [private]

Definition at line 25 of file annotate.h.

DBusGProxy* Annotate::draw_proxy [private]

Definition at line 24 of file annotate.h.


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