X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcin-manual-latex.git;a=blobdiff_plain;f=parts%2FDeveloper.tex;h=d0f9d43b60652b933ba861e209b1ff991f646b2d;hp=c61067f6fbe785b91d6a4dba635ee79ad5efe01a;hb=8ae04ebbdfed2039874f88b77ce4dbfd365a58d3;hpb=686c08c43e0947398ad946038cae2018c2a66551 diff --git a/parts/Developer.tex b/parts/Developer.tex index c61067f..d0f9d43 100644 --- a/parts/Developer.tex +++ b/parts/Developer.tex @@ -381,6 +381,7 @@ capabilities. The second is that cmake 3.5.1 is required for OpenCV 4.2. \item Workaround already in use by \CGG{} - using 3.4.1 for older distros and 4.2 for newer \item Your workaround - upgrade cmake to 3.5.1 for upgrade to 4.2; add non-free to the compile; and use binaries that you do not know what they contain since no source code to compile. +Look into opencv4/opencv2/core/types.hpp:711;27 \end{description} \textbf{webp} @@ -399,6 +400,14 @@ compile; and use binaries that you do not know what they contain since no source \item Your workaround - upgrade on those systems to cmake 3.5 \end{description} +\textbf{x10tv} +\begin{description}[noitemsep] + \item Status - this is the x10 TV remote control + \item Problem - INPUT\_PROP\_POINTING\_STICK not defined error on older distros + \item Workaround already in use by \CGG{} - leaving out of Ubuntu14, Ubuntu, Centos7 + \item Your workaround - look into /usr/include/linux/input-event-codes.h +\end{description} + \textbf{libvpx} \begin{description}[noitemsep] \item Status - currently at version 1.8.1 @@ -410,7 +419,7 @@ compile; and use binaries that you do not know what they contain since no source \section{Find Lock Problems with Booby Trap} \label{sec:find_lock_problems_booby_trap} -A Booby Trap is used in CinGG for setting a trap to catch lock problems that might have been missed. It will trap boobies only if compile by adding \textit{-{}-with-booby} on the configuration command line. This is the default if you compile using \texttt{./bld.sh} from the GIT repository. It should not interfere with normal execution. +A Booby Trap is used in \CGG{} for setting a trap to catch lock problems that might have been missed. It will trap boobies only if compile by adding \textit{-{}-with-booby} on the configuration command line. This is the default if you compile using \texttt{./bld.sh} from the GIT repository. It should not interfere with normal execution. If you have the time and inclination, enable \textit{-{}-with-booby} and send any trap output that you find. Maybe you will catch some boobies and if you do, send a snapshot of any boobies you find. @@ -509,9 +518,15 @@ Key in: \qquad \texttt{prof2} Key in: \qquad \texttt{make clean all install} -Later, if you wanttitle to remove this from the system, +Because \textit{smap} may have to be found in the system if \textit{How to use} below does not work, you will have to do the following: +\newline +\newline +Key in: \qquad \texttt{cp -a smap /usr/local/bin} + -key in: \qquad \texttt{make uninstall} +Later, if you want to remove this from the system, + +Key in: \qquad \texttt{make uninstall} \subsection{How to use} \label{sub:how_to_use} @@ -624,5 +639,80 @@ $\dots$\\ \textbf{10.200t 0.001u+0.000s 21.566r 47.3\%}\\ \textit{--- profile end ---} -The summary line above in Bold represents the User time, System time, Real time and the percentage is how much Timer time elapsed over Real time so in this case the measurement covers 47.3\% of time.\\ +The summary line above in Bold represents the User time, System time, Real time and the percentage is how much Timer time elapsed over Real time so in this case the measurement covers 47.3\% of time. + So why use a Profiler? Because it is the ``ls'' for executable functions!! + +\section{How to Create a new Theme} +\label{sec:how_create_theme} + +A \textit{Theme} is a base class object that is created and customized as \textit{ThemeName}. +It is constructed during program initialization in a theme plugin +\texttt{PluginTClient}, +defined in \texttt{plugins/theme\_name} source directory. + +\texttt{theme\_name.C} and \texttt{theme\_name.h} are derived \textit{Theme} class object constructors. + +A \textit{Theme} is constructed during initialization in \texttt{init\_theme} (\texttt{mwindow.C}). The theme plugin is accessed using the \textit{name} from preferences and then the theme plugin is loaded which contains the code to construct the theme. A \textit{Theme} object has functions and data that \CGG{} uses to do a variety of customizations, such as \texttt{default\_window\_positions}, and it can modify GUI defaults like \\ +\texttt{default\_text\_color} when it is initialized. + +The theme plugin contains a \textit{new\_theme} function that allocates and constructs a +\textit{ThemeName} object with base classes of \textit{BC\_Theme} (gui setup), \textit{Theme} (\CGG{} defaults), and \textit{ThemeName}, with definitions and overrides that create the custom theme. To create a new theme, a new plugin is needed: + +\begin{lstlisting}[numbers=none] + #include "header files.h" + PluginClient* new_plugin(PluginServer *server) + { + return new NameMain(server); + } + + NameMain::NameMain(PluginServer *server) + : PluginTClient(server) + { + } + + NameMain::~NameMain() + { + } + const char* NameMain::plugin_title() { return N_("Name"); } + + Theme* NameMain::new_theme() + { + theme = new ThemeName; + extern unsigned char _binary_theme_name_data_start[]; + theme->set_data(_binary_theme_name_data_start); + return theme; + } + + Name::Name() + : Theme() + { + } + + Name::~Name() + { + delete stuff; + } +\end{lstlisting} + +When a theme is constructed by \texttt{NameMain::new\_theme()}, it sets a pointer to a +block of data created in the plugin build that contains all of the png data +files in the \texttt{plugins/theme\_name/data} directory. These images may define or override the appearance of gui images, such as \textit{ok.png} (the ok button). There are usually a large number of images that need to be defined. The theme plugin adds them to the theme image data in the \texttt{theme $\rightarrow$ initialize()} function. The best list of theme image setup is probably in SUV (\texttt{plugins/theme\_suv/suv}). + +The easy way to create a new theme is to copy an existing theme and change +its name to \textit{ThemeName}, change \texttt{plugin\_title()} to the new name, and then tweak the definitions until you are happy with the results. The file +names and Makefile also need to be updated to the new theme name. The source +can by manually rebuilt by invoking \textit{make} in the \texttt{plugins/theme\_name} +directory. + +Once the new theme is built into the plugin library, it will automatically be discovered by the plugin probe +and it will become an available theme in \textit{Preferences}. + +If you are ready to add it to the main build, then \textit{theme\_name} should be +included in the DIRS targets of the \texttt{plugins/Makefile}, and \texttt{plugin\_defs} needs \textit{theme\_name} in the themes list. + +Themes usually require considerable time to create from scratch. For +example, the SUV theme has over 800 lines in the initialize function, and has over +500 png images in the data directory. Most of these images and data values are +required to be initialized by the custom theme constructor; very tedious and +time consuming work. Creating a new theme is usually a lot of work.