1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
2 /* this file is part of evince, a gnome document viewer
6 * Lukas Bezdicka <255993@mail.muni.cz>
8 * Evince is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * Evince is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 #include <glib/gi18n.h>
32 #include "ev-presentation-timer.h"
34 struct _EvPresentationTimerPrivate
36 cairo_surface_t *surface;
39 #define EV_PRESENTATION_TIMER_GET_PRIVATE(object) \
40 (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_PRESENTATION_TIMER, EvPresentationTimerPrivate))
42 G_DEFINE_TYPE (EvPresentationTimer, ev_presentation_timer, GTK_TYPE_DRAWING_AREA);
46 ev_presentation_timer_draw(GtkWidget *timer, cairo_t *cr)
48 cairo_set_source_rgb(cr, 0, 0, 0);
49 cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
50 CAIRO_FONT_WEIGHT_NORMAL);
51 cairo_set_font_size(cr, 40.0);
53 cairo_move_to(cr, 10.0, 50.0);
54 cairo_show_text(cr, "Disziplin ist Macht.");
60 ev_presentation_timer_init (EvPresentationTimer *ev_timer)
62 // ev_timer->priv = EV_DSCWINDOW_GET_PRIVATE (ev_timer);
66 ev_presentation_timer_class_init (EvPresentationTimerClass *klass)
68 GObjectClass *object_class = G_OBJECT_CLASS (klass);
69 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
70 //GtkDrawingAreaClass *drawing_area_class = GTK_DRAWING_AREA_CLASS (klass);
71 g_type_class_add_private (object_class, sizeof (EvPresentationTimerPrivate));
72 widget_class->draw = ev_presentation_timer_draw;
74 /*object_class->finalize = ev_presentation_timer_finalize;*/
78 ev_presentation_timer_new (void)
80 EvPresentationTimer *ev_timer;
82 ev_timer = g_object_new (EV_TYPE_PRESENTATION_TIMER, NULL);
83 return GTK_WIDGET (ev_timer);