1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
|
===============================================================================
This is a discription of the structures of the plugin and how it (should) work.
===============================================================================
1. General information
2. Directory information
3. File information
1. src/ (libxmms_singit.so)
2. src/dialogs/ (libdialogs.a)
3. src/displayer/clist/ (libdisplayer_clist.so)
4. src/displayer/fullscreen/ (libdisplayer_fullscreen.so)
5. src/displayer/karaoke_window/ (libdisplayer_karaoke_window.so)
6. src/displayer/opengl/ (libdisplayer_opengl.so)
7. src/include
8. src/widgets/ (libwidgets.a)
4. Internal "data" flow
1. Main plugin
2. Displayer plugins
1. General information
======================
There are some header files, with the same name, one with the extension "_private"
one without. The private version is for the main plugin, the non private version
is for the displayer plugins.
2. Directory information
========================
data - this dir contains the data, which will be installed (just a font for now)
dialogs - all the dialogs used by the plugin
displayer - the different displayer plugins (clist, window, fullscreen, opengl)
editor - the lyric editor files
include - include files for the plugins
widgets - contains the colorbutton widget from gimp and the karaoke widget
3. File information
===================
3.1. src/ (libxmms_singit.so)
-----------------------------
singit_macros_private.h - some (debug) macros
main.c - implements the conntection between xmms and the plugin
- very simple functions
- starts and stop the timeout
singit_main.[hc] - implements the main thread funtion
- checks for a new song and handles reload
- calls plugin and dialog funtions for song and time change
debug.c - defines a debug function (included by "singit_macros.h")
singit_sha.[hc] - implements the SHA hash algorithm
- used to get a quick information, if the content of a file has changed
singit_tools.[hc] - some helper funtions
singit_song.[hc] - implements the song structure and many funtion to handle a song
- search, test, get, check update
singit_song_private.h - funtions to parse, load and save files
singit_song_text.c - load, parse and save text files
singit_song_id3v2xx.c - load, parse (and save) id3v2xx tags (not tested)
singit_song_midi.c - load and parse midi files (not implemented)
singit_config.c - implements the SingitConfig structure
- funtions to handle the struct and updates
singit_config_private.h - the private header - not for plugins
singit_plugin_data.[hc] - a small structure to keep all plugin data (status - enabled / initialized...)
singit_plugin_scanner.[hc] - scans for plugins, calls their funtions and fills the PluginData struct
3.2. src/dialogs/ (libdialogs.a)
--------------------------------
dlg_input_number.[hc] - implements a dialog to get an integer number from the user
dlg_messagebox.[hc] - implements message box with multiple buttons and events
dlg_multiline.[hc] - implements a dialog to edit comma seperated values in a text view
dlg_singit_about.[hc] - about dialog
dlg_singit_config.[hc] - implements a dialog to edit the global configuration structure
and handle the displayer plugins
dlg_singit_id3.[hc] - a dialog to view id3 data (will be a full editor someday...)
id3_tables.h - huge structures defining tables with information for id3v1 and id3v2xx
3.3. src/displayer/clist/ (libdisplayer_clist.so)
-------------------------------------------------
displayer_clist.c - implemention of the navigation displayer
3.4. src/displayer/fullscreen/ (libdisplayer_fullscreen.so)
-----------------------------------------------------------
displayer_fullscreen.c - a fullscreen displayer
3.5. src/displayer/karaoke_window/ (libdisplayer_karaoke_window.so)
-------------------------------------------------------------------
displayer_karaoke_window.c - the main windowed displayer
3.6. src/displayer/opengl/ (libdisplayer_opengl.so)
---------------------------------------------------
c_wrapper.[hc]* - wrapps the c++ functions and classes for c-access
ccamera.[hc]* - controlls the overall movement of the scene
cfrequenceparticleengine.[hc]* - simple particle engine based on opengl spectrum analyser
- not used anymore
cpicture.[hc]* - class to load bmp, tga and sgi pictures
cscene.[hc]* - builds and controls the whole scene
ctexture.[hc]* - class to represent a loaded texture
- derivated from CPicture
data.[hc]* - textures saved as a char[] array
displayer_opengl.[hc] - main displayer file
dlg_opengl_config.[hc] - config dialog of the displayer
- just a test - useable
gdkgl.[hc] - files from gtkglarea library (see README - Credits)
gtkglarea.[hc]
gtkglmaterialdialog.[hc] - files from gtkglmaterialdialog (see README - Credits)
maths.[hc]* - mathematic vector and trigonomic funtions
- implememnts CMatrix
utilities.[hc]* - some utiliy funtions used by cpicture and ctexture
3.7. src/include
----------------
singit_config.h - defines the config structure
singit_dialogs.h - functions to show editor / config / id3 / about dialogs
singit_displayer_plugin.h - displayer plugin struct
singit_macros.h - some global macros (i18n / program name / my email / my name)
singit_song.h - defines the song structure and funtions for
create / free / time token management
singit_wgt_karaoke.h - the karaoke widget
3.8. src/widgets/ (libwidgets.a)
--------------------------------
wgt_colorbutton.[hc] - a button from gimp which allows a user to select a color and displays it
wgt_singit_karaoke.c - the main widget of the displayer
4. Internal "data" flow
=======================
4.1. Main plugin
----------------
In this section I try to explain, how the plugin is working
At the beginning (main.c [singit_init] ->
singit_main.c [singit_main_init])
the plugin starts the main thread (singit_main.c [thread_func])
and initializes the displayer plugins (singit_plugin_scanner.c [plugins_init])
singit_main.c [thread_func]
- - - - - - - - - - - - - -
While there is no song change (time >= 0) the threads looks for a song / lyric file change.
The thread informs all enabled plugins about the current status (song / time / next token).
It sets the editors time and tells the plugins to show or hide.
The rest belongs to the different plugins.
If you are really interested to get involved in the plugin development and need more information
feel free to contact me.
4.2. Displayer plugins
----------------------
First all enabled plugins are initialized ["init" funtion].
Immediately after the init the update function of the plugin is called to
let the plugin adapt to the main configuration.
While the main thread is running the plugin may get calls to its
show / hide / toggle / update / set_time - callbacks
When the main plugin finishes it calls the finish function of all initialized
displayer plugins.
The displayer plugin can disable itself by a call of the disable callback
including its plugin struct. (expl.: plugin_struct.disable(&plugin_struct);)
Jan-Marek Glogowski <glogow@stud.fbi.fh-darmstadt.de>
Last modified: 2002-06-30
|