/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */ /* this file is part of evince, a gnome document viewer * * * Author: * Lukas Bezdicka <255993@mail.muni.cz> * * Evince is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Evince is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "ev-presentation-timer.h" struct _EvPresentationTimerPrivate { cairo_surface_t *surface; }; #define EV_PRESENTATION_TIMER_GET_PRIVATE(object) \ (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_PRESENTATION_TIMER, EvPresentationTimerPrivate)) G_DEFINE_TYPE (EvPresentationTimer, ev_presentation_timer, GTK_TYPE_DRAWING_AREA); static gboolean ev_presentation_timer_draw(GtkWidget *timer, cairo_t *cr) { cairo_set_source_rgb(cr, 0, 0, 0); cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(cr, 40.0); cairo_move_to(cr, 10.0, 50.0); cairo_show_text(cr, "Disziplin ist Macht."); return FALSE; } static void ev_presentation_timer_init (EvPresentationTimer *ev_timer) { // ev_timer->priv = EV_DSCWINDOW_GET_PRIVATE (ev_timer); } static void ev_presentation_timer_class_init (EvPresentationTimerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); //GtkDrawingAreaClass *drawing_area_class = GTK_DRAWING_AREA_CLASS (klass); g_type_class_add_private (object_class, sizeof (EvPresentationTimerPrivate)); widget_class->draw = ev_presentation_timer_draw; /*object_class->finalize = ev_presentation_timer_finalize;*/ } GtkWidget * ev_presentation_timer_new (void) { EvPresentationTimer *ev_timer; ev_timer = g_object_new (EV_TYPE_PRESENTATION_TIMER, NULL); return GTK_WIDGET (ev_timer); }