Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
null-displayer.cpp
Go to the documentation of this file.
1/*
2 NullDisplayer.hpp - fallback video displayer to not display video at all
3
4 Copyright (C)
5 2025, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
14
21#include "stage/gtk-base.hpp"
23#include "lib/format-cout.hpp"
24
25
26namespace stage {
27namespace output {
28
29 NullDisplayer::NullDisplayer (Gtk::Widget& drawing_area,
30 uint width, uint height)
31 : Displayer{width,height}
32 , drawingArea_{drawing_area}
33 {
34 REQUIRE (width > 0);
35 REQUIRE (height > 0);
36 cout << "NullDisplayer("<<&drawing_area<<"): "<<width<<" x "<<height<<endl;
37 }
38
39 void
40 NullDisplayer::put (void* const image)
41 {
42 int video_x = 0,
43 video_y = 0,
44 video_width = 0,
45 video_height = 0;
46
48 drawingArea_.get_width(),
49 drawingArea_.get_height(),
50 video_x, video_y, video_width, video_height);
51
52 GdkWindow *window = drawingArea_.get_window()->gobj();
53 REQUIRE (window != NULL);
54 cout << "put("<<util::showAdr(image)<<")\t x="<<video_x<<" y="<<video_y<<" w:"<<video_width<<" h:"<<video_height<<endl;
55 }
56
57
58}} // namespace stage::output
A Displayer is a class which is responsible for rendering an image in some way (ie: Xvideo,...
Definition displayer.hpp:62
void calculateVideoLayout(int widgetWidth, int widgetHeight, int &imgOrg_x, int &imgOrg_y, int &imgWidth, int &imgHeight)
Calculates the coordinates for placing a video image inside a widget.
Definition displayer.cpp:45
void put(void *const image) override
NULL-implementation: accept anything, do nothing.
NullDisplayer(Gtk::Widget &drawing_area, uint width, uint height)
Automatically use custom string conversion in C++ stream output.
A set of basic GTK includes for the UI.
unsigned int uint
Definition integral.hpp:29
return NULL
Definition llist.h:586
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
ostream & showAdr(ostream &stream, void const *addr)
preconfigured format for pretty-printing of addresses
Passive deactivated video displayer.