Back to index

easystroke  0.5.5.1
fire.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008, Thomas Jaeger <ThJaeger@gmail.com>
00003  *
00004  * Permission to use, copy, modify, and/or distribute this software for any
00005  * purpose with or without fee is hereby granted, provided that the above
00006  * copyright notice and this permission notice appear in all copies.
00007  *
00008  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
00009  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00010  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00011  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00012  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
00013  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
00014  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00015  */
00016 #ifndef __FIRE_H__
00017 #define __FIRE_H__
00018 #include "util.h"
00019 #include "trace.h"
00020 #include "main.h"
00021 #include <dbus/dbus-glib.h>
00022 
00023 class Fire : public Trace, public Timeout {
00024        DBusGConnection *bus;
00025        DBusGProxy *point_proxy;
00026        DBusGProxy *clear_proxy;
00027        float leftover;
00028 
00029        virtual void draw(Point p, Point q);
00030        void add_point(float, float);
00031        virtual void start_() { if (remove_timeout()) timeout(); leftover = 0; }
00032        virtual void end_() { set_timeout(250); }
00033        virtual void timeout();
00034 public:
00035        Fire();
00036 };
00037 
00038 #endif