From 0e5314e0cfe947e51121061a02dee15c6a4c7496 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 9 Feb 2009 05:43:55 +0100 Subject: [PATCH] keep the display handles within a separate header --- src/gui/Makefile.am | 1 + src/gui/display-service.cpp | 2 +- src/include/display-facade.h | 15 ++------ src/include/display-handles.h | 55 ++++++++++++++++++++++++++++ src/include/dummy-player-facade.h | 9 +---- src/include/guinotification-facade.h | 5 ++- src/proc/Makefile.am | 4 +- 7 files changed, 67 insertions(+), 24 deletions(-) create mode 100644 src/include/display-handles.h diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 427375ad8..2fb9ce96d 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -56,6 +56,7 @@ gtk_gui_la_SOURCES = \ $(lumigui_srcdir)/gtk-lumiera.cpp \ $(lumigui_srcdir)/gtk-lumiera.hpp \ $(lumigui_srcdir)/notification-service.cpp \ + $(lumigui_srcdir)/display-service.cpp \ $(lumigui_srcdir)/window-manager.cpp \ $(lumigui_srcdir)/window-manager.hpp \ $(lumigui_srcdir)/workspace/actions.cpp \ diff --git a/src/gui/display-service.cpp b/src/gui/display-service.cpp index c61dce8ee..1c20dd4de 100644 --- a/src/gui/display-service.cpp +++ b/src/gui/display-service.cpp @@ -228,7 +228,7 @@ namespace gui { DisplayerSlot::DisplayerSlot (FrameDestination const& outputDestination) - : currBuffer_(0) + : currBuffer_(0) { put_ = 0; // mark as not allocated hasFrame_.connect (outputDestination); diff --git a/src/include/display-facade.h b/src/include/display-facade.h index d3681a08d..ef12fdb1d 100644 --- a/src/include/display-facade.h +++ b/src/include/display-facade.h @@ -1,5 +1,5 @@ /* - DISPLAY-FACADE.hpp - accessing a display for outputting frames + DISPLAY-FACADE.h - accessing a display for outputting frames Copyright (C) Lumiera.org 2009, Hermann Vosseler @@ -20,7 +20,7 @@ */ -/** @file display-facade.hpp +/** @file display-facade.h ** Major public Interface of the Lumiera GUI. While, generally speaking, the GUI ** controls the application and thus acts on its own, it exposes some services ** to the lower layers. Especially the lumiera::Display interface serves to @@ -37,18 +37,9 @@ #ifndef GUI_INTERFACE_DISPLAY_H #define GUI_INTERFACE_DISPLAY_H +#include "include/display-handles.h" -typedef unsigned char * LumieraDisplayFrame; - - -struct lumiera_displaySlot_struct - { - void (*put_)(lumiera_displaySlot_struct*, LumieraDisplayFrame); - }; -typedef struct lumiera_displaySlot_struct lumiera_displaySlot; -typedef lumiera_displaySlot* LumieraDisplaySlot; - diff --git a/src/include/display-handles.h b/src/include/display-handles.h new file mode 100644 index 000000000..467607427 --- /dev/null +++ b/src/include/display-handles.h @@ -0,0 +1,55 @@ +/* + DISPLAY-HANDLES.h - opaque handle types for playback and display + + Copyright (C) Lumiera.org + 2009, Hermann Vosseler + + This program 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. + + This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +/** @file display-handles.hpp + ** Opaque handles and similar typedefs used to communicate via the + ** lumiera::Display and lumiera::DummyPlayer facade interfaces. + ** + ** @see gui::DisplayService + ** + */ + + +#ifndef LUMIERA_DISPLAY_HANDLES_H +#define LUMIERA_DISPLAY_HANDLES_H + + + + +typedef unsigned char * LumieraDisplayFrame; + + +struct lumiera_displaySlot_struct + { + void (*put_)(lumiera_displaySlot_struct*, LumieraDisplayFrame); + }; +typedef struct lumiera_displaySlot_struct lumiera_displaySlot; +typedef lumiera_displaySlot* LumieraDisplaySlot; + + + +struct lumiera_playprocess_struct { }; +typedef struct lumiera_playprocess_struct lumiera_playprocess; +typedef lumiera_playprocess* LumieraPlayProcess; + + +#endif diff --git a/src/include/dummy-player-facade.h b/src/include/dummy-player-facade.h index 7b4daff02..0447172d1 100644 --- a/src/include/dummy-player-facade.h +++ b/src/include/dummy-player-facade.h @@ -1,5 +1,5 @@ /* - DUMMY-PLAYER-FACADE.hpp - access point to a dummy test player + DUMMY-PLAYER-FACADE.h - access point to a dummy test player Copyright (C) Lumiera.org 2009, Hermann Vosseler @@ -25,12 +25,7 @@ #define PROC_INTERFACE_DUMMYPLAYER_H #include "include/display-facade.h" - - -struct lumiera_playprocess_struct { }; -typedef struct lumiera_playprocess_struct lumiera_playprocess; -typedef lumiera_playprocess* LumieraPlayProcess; - +#include "include/display-handles.h" diff --git a/src/include/guinotification-facade.h b/src/include/guinotification-facade.h index c28f47d85..aba81ea0b 100644 --- a/src/include/guinotification-facade.h +++ b/src/include/guinotification-facade.h @@ -1,5 +1,5 @@ /* - GUINOTIFICATIONFACADE.hpp - access point for pushing informations into the GUI + GUINOTIFICATION-FACADE.h - access point for pushing informations into the GUI Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -20,7 +20,7 @@ */ -/** @file guinotification-facade.hpp +/** @file guinotification-facade.h ** Major public Interface of the Lumiera GUI. While generally speaking, the GUI ** controls the application and thus acts on its own, it exposes some services ** usable by scripts or the two lower layers. The main purpose of these services @@ -35,6 +35,7 @@ #define GUI_GUINOTIFICATION_H + #ifdef __cplusplus /* ============== C++ Interface ================= */ #include "include/interfaceproxy.hpp" diff --git a/src/proc/Makefile.am b/src/proc/Makefile.am index ad41212ee..a79f07183 100644 --- a/src/proc/Makefile.am +++ b/src/proc/Makefile.am @@ -24,7 +24,7 @@ noinst_LTLIBRARIES += liblumiproc.la liblumiproc_la_CFLAGS = $(AM_CFLAGS) -std=gnu99 -Wall -Wextra -Werror liblumiproc_la_CXXFLAGS = $(AM_CXXFLAGS) -Wall -Wextra -liblumiproc_la_SOURCES = \ +liblumiproc_la_SOURCES = \ $(liblumiproc_la_srcdir)/controllerfacade.cpp \ $(liblumiproc_la_srcdir)/facade.cpp \ $(liblumiproc_la_srcdir)/state.cpp \ @@ -205,7 +205,7 @@ noinst_HEADERS += \ $(liblumiproc_la_srcdir)/mobject/builderfacade.hpp \ $(liblumiproc_la_srcdir)/control/pathmanager.hpp \ $(liblumiproc_la_srcdir)/control/renderstate.hpp \ - $(liblumiproc_la_srcdir)/play/dummy-player-service.cpp \ + $(liblumiproc_la_srcdir)/play/tick-service.hpp \ $(liblumiproc_la_srcdir)/play/dummy-image-generator.hpp \ $(liblumiproc_la_srcdir)/mobject/interpolator.hpp \ $(liblumiproc_la_srcdir)/mobject/parameter.hpp \