summaryrefslogtreecommitdiff
path: root/recordmydesktop/src
diff options
context:
space:
mode:
Diffstat (limited to 'recordmydesktop/src')
-rw-r--r--recordmydesktop/src/Makefile.am29
-rw-r--r--recordmydesktop/src/cache_audio.c3
-rw-r--r--recordmydesktop/src/cache_audio.h42
-rw-r--r--recordmydesktop/src/cache_frame.c2
-rw-r--r--recordmydesktop/src/cache_frame.h43
-rw-r--r--recordmydesktop/src/capture_sound.c5
-rw-r--r--recordmydesktop/src/capture_sound.h42
-rw-r--r--recordmydesktop/src/encode_cache.c5
-rw-r--r--recordmydesktop/src/encode_cache.h41
-rw-r--r--recordmydesktop/src/encode_image_buffer.c3
-rw-r--r--recordmydesktop/src/encode_image_buffer.h50
-rw-r--r--recordmydesktop/src/encode_sound_buffer.c3
-rw-r--r--recordmydesktop/src/encode_sound_buffer.h51
-rw-r--r--recordmydesktop/src/flush_to_ogg.c4
-rw-r--r--recordmydesktop/src/flush_to_ogg.h40
-rw-r--r--recordmydesktop/src/get_frame.c7
-rw-r--r--recordmydesktop/src/get_frame.h41
-rw-r--r--recordmydesktop/src/getzpixmap.c2
-rw-r--r--recordmydesktop/src/getzpixmap.h98
-rw-r--r--recordmydesktop/src/init_encoder.c1
-rw-r--r--recordmydesktop/src/init_encoder.h47
-rw-r--r--recordmydesktop/src/initialize_data.c5
-rw-r--r--recordmydesktop/src/load_cache.c4
-rw-r--r--recordmydesktop/src/load_cache.h42
-rw-r--r--recordmydesktop/src/make_dummy_pointer.c2
-rw-r--r--recordmydesktop/src/make_dummy_pointer.h58
-rw-r--r--recordmydesktop/src/opendev.c2
-rw-r--r--recordmydesktop/src/opendev.h84
-rw-r--r--recordmydesktop/src/parseargs.c1
-rw-r--r--recordmydesktop/src/poll_events.c7
-rw-r--r--recordmydesktop/src/poll_events.h49
-rw-r--r--recordmydesktop/src/queryextensions.c2
-rw-r--r--recordmydesktop/src/queryextensions.h53
-rw-r--r--recordmydesktop/src/recordmydesktop.c9
-rw-r--r--recordmydesktop/src/rectinsert.h6
-rw-r--r--recordmydesktop/src/rmd_cache.c3
-rw-r--r--recordmydesktop/src/rmd_cache.h89
-rw-r--r--recordmydesktop/src/rmd_error.c2
-rw-r--r--recordmydesktop/src/rmd_error.h49
-rw-r--r--recordmydesktop/src/rmd_frame.c4
-rw-r--r--recordmydesktop/src/rmd_frame.h101
-rw-r--r--recordmydesktop/src/rmd_jack.c2
-rw-r--r--recordmydesktop/src/rmd_jack.h63
-rw-r--r--recordmydesktop/src/rmd_rescue.c5
-rw-r--r--recordmydesktop/src/rmd_rescue.h42
-rw-r--r--recordmydesktop/src/rmd_timer.c1
-rw-r--r--recordmydesktop/src/rmd_timer.h44
-rw-r--r--recordmydesktop/src/rmdthreads.c13
-rw-r--r--recordmydesktop/src/rmdthreads.h43
-rw-r--r--recordmydesktop/src/setbrwindow.c2
-rw-r--r--recordmydesktop/src/setbrwindow.h53
-rw-r--r--recordmydesktop/src/shortcuts.c1
-rw-r--r--recordmydesktop/src/shortcuts.h57
-rw-r--r--recordmydesktop/src/specsfile.c1
-rw-r--r--recordmydesktop/src/specsfile.h59
-rw-r--r--recordmydesktop/src/update_image.c3
-rw-r--r--recordmydesktop/src/update_image.h70
-rw-r--r--recordmydesktop/src/wm_check.c2
-rw-r--r--recordmydesktop/src/wm_check.h45
59 files changed, 1614 insertions, 23 deletions
diff --git a/recordmydesktop/src/Makefile.am b/recordmydesktop/src/Makefile.am
index 55f7566..4c80b7c 100644
--- a/recordmydesktop/src/Makefile.am
+++ b/recordmydesktop/src/Makefile.am
@@ -2,44 +2,71 @@ bin_PROGRAMS = recordmydesktop
recordmydesktop_SOURCES = \
cache_audio.c \
+ cache_audio.h \
cache_frame.c \
+ cache_frame.h \
capture_sound.c \
+ capture_sound.h \
encode_cache.c \
+ encode_cache.h \
encode_image_buffer.c \
+ encode_image_buffer.h \
encode_sound_buffer.c \
+ encode_sound_buffer.h \
flush_to_ogg.c \
+ flush_to_ogg.h \
get_frame.c \
+ get_frame.h \
getzpixmap.c \
+ getzpixmap.h \
init_encoder.c \
+ init_encoder.h \
initialize_data.c \
initialize_data.h \
load_cache.c \
+ load_cache.h \
make_dummy_pointer.c \
+ make_dummy_pointer.h \
opendev.c \
+ opendev.h \
parseargs.c \
parseargs.h \
poll_events.c \
+ poll_events.h \
queryextensions.c \
+ queryextensions.h \
recordmydesktop.c \
rectinsert.c \
rectinsert.h \
register_callbacks.c \
register_callbacks.h \
rmd_cache.c \
+ rmd_cache.h \
rmd_error.c \
+ rmd_error.h \
rmd_frame.c \
+ rmd_frame.h \
rmd_jack.c \
+ rmd_jack.h \
rmd_rescue.c \
+ rmd_rescue.h \
rmd_timer.c \
+ rmd_timer.h \
rmdthreads.c \
+ rmdthreads.h \
setbrwindow.c \
+ setbrwindow.h \
shortcuts.c \
+ shortcuts.h \
skeleton.c \
specsfile.c \
+ specsfile.h \
update_image.c \
+ update_image.h \
yuv_utils.c \
yuv_utils.h \
- wm_check.c
+ wm_check.c \
+ wm_check.h
INCLUDES = $(all_includes) -I$(top_srcdir)/include
diff --git a/recordmydesktop/src/cache_audio.c b/recordmydesktop/src/cache_audio.c
index 27a8141..3322567 100644
--- a/recordmydesktop/src/cache_audio.c
+++ b/recordmydesktop/src/cache_audio.c
@@ -24,8 +24,9 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
+#include "cache_audio.h"
#include "recordmydesktop.h"
+#include "rmd_jack.h"
void *CacheSoundBuffer(ProgData *pdata){
diff --git a/recordmydesktop/src/cache_audio.h b/recordmydesktop/src/cache_audio.h
new file mode 100644
index 0000000..3c2a3ce
--- /dev/null
+++ b/recordmydesktop/src/cache_audio.h
@@ -0,0 +1,42 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef CACHE_AUDIO_H
+#define CACHE_AUDIO_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Sound caching thread. Simply writes the pcm buffers on disk
+*
+* \param pdata ProgData struct containing all program data
+*
+*/
+void *CacheSoundBuffer(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/cache_frame.c b/recordmydesktop/src/cache_frame.c
index faf2394..c00d314 100644
--- a/recordmydesktop/src/cache_frame.c
+++ b/recordmydesktop/src/cache_frame.c
@@ -26,7 +26,9 @@
#include <signal.h>
+#include "cache_frame.h"
#include "recordmydesktop.h"
+#include "rmd_cache.h"
//minimize hard disk access
diff --git a/recordmydesktop/src/cache_frame.h b/recordmydesktop/src/cache_frame.h
new file mode 100644
index 0000000..adf698c
--- /dev/null
+++ b/recordmydesktop/src/cache_frame.h
@@ -0,0 +1,43 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef CACHE_FRAME_H
+#define CACHE_FRAME_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Image caching thread. Copies the yuv buffer, compares with the last one and
+* caches the result.
+*
+* \param pdata ProgData struct containing all program data
+*
+*/
+void *CacheImageBuffer(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/capture_sound.c b/recordmydesktop/src/capture_sound.c
index d32715e..37a5c18 100644
--- a/recordmydesktop/src/capture_sound.c
+++ b/recordmydesktop/src/capture_sound.c
@@ -24,8 +24,13 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
+#include "opendev.h"
+#include "recordmydesktop.h"
+#include "rmd_jack.h"
+#include "capture_sound.h"
#include "recordmydesktop.h"
+#include "rmd_jack.h"
void *CaptureSound(ProgData *pdata){
diff --git a/recordmydesktop/src/capture_sound.h b/recordmydesktop/src/capture_sound.h
new file mode 100644
index 0000000..c2b6d18
--- /dev/null
+++ b/recordmydesktop/src/capture_sound.h
@@ -0,0 +1,42 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef CAPTURE_SOUND_H
+#define CAPTURE_SOUND_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Sound capturing thread. Data are placed on a
+* list to be picked up by other threads.
+*
+* \param pdata ProgData struct containing all program data
+*/
+void *CaptureSound(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/encode_cache.c b/recordmydesktop/src/encode_cache.c
index 1907d98..01a7968 100644
--- a/recordmydesktop/src/encode_cache.c
+++ b/recordmydesktop/src/encode_cache.c
@@ -24,7 +24,10 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
+#include "encode_cache.h"
+#include "flush_to_ogg.h"
+#include "init_encoder.h"
+#include "load_cache.h"
#include "recordmydesktop.h"
diff --git a/recordmydesktop/src/encode_cache.h b/recordmydesktop/src/encode_cache.h
new file mode 100644
index 0000000..661b00b
--- /dev/null
+++ b/recordmydesktop/src/encode_cache.h
@@ -0,0 +1,41 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef ENCODE_CACHE_H
+#define ENCODE_CACHE_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Encode cache into an
+* ogg stream.
+* \param pdata ProgData struct containing all program data
+*/
+void EncodeCache(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/encode_image_buffer.c b/recordmydesktop/src/encode_image_buffer.c
index 1242071..5b3f84d 100644
--- a/recordmydesktop/src/encode_image_buffer.c
+++ b/recordmydesktop/src/encode_image_buffer.c
@@ -24,8 +24,8 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
#include "recordmydesktop.h"
+#include "encode_image_buffer.h"
void *EncodeImageBuffer(ProgData *pdata){
@@ -90,4 +90,3 @@ void SyncEncodeImageBuffer(ProgData *pdata){
}
}
}
-
diff --git a/recordmydesktop/src/encode_image_buffer.h b/recordmydesktop/src/encode_image_buffer.h
new file mode 100644
index 0000000..e5bb51f
--- /dev/null
+++ b/recordmydesktop/src/encode_image_buffer.h
@@ -0,0 +1,50 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef ENCODE_IMAGE_BUFFER_H
+#define ENCODE_IMAGE_BUFFER_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* feed a yuv buffer to the theora encoder and submit outcome to
+* the ogg stream.
+* \param pdata ProgData struct containing all program data
+*/
+void *EncodeImageBuffer(ProgData *pdata);
+
+/**
+* As EncodeImageBuffer, only with the assumption that
+* this is not a thread on it's own
+*
+* \param pdata ProgData struct containing all program data
+*
+*/
+void SyncEncodeImageBuffer(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/encode_sound_buffer.c b/recordmydesktop/src/encode_sound_buffer.c
index 919b649..018de63 100644
--- a/recordmydesktop/src/encode_sound_buffer.c
+++ b/recordmydesktop/src/encode_sound_buffer.c
@@ -24,8 +24,9 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
+#include "encode_sound_buffer.h"
#include "recordmydesktop.h"
+#include "rmd_jack.h"
void *EncodeSoundBuffer(ProgData *pdata){
diff --git a/recordmydesktop/src/encode_sound_buffer.h b/recordmydesktop/src/encode_sound_buffer.h
new file mode 100644
index 0000000..1757240
--- /dev/null
+++ b/recordmydesktop/src/encode_sound_buffer.h
@@ -0,0 +1,51 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef ENCODE_SOUND_BUFFER_H
+#define ENCODE_SOUND_BUFFER_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Sound encoding thread. Picks up data from the buffer queue ,
+* encodes and places them on the vorbis stream.
+*
+* \param pdata ProgData struct containing all program data
+*/
+void *EncodeSoundBuffer(ProgData *pdata);
+
+/**
+* As EncodeSoundBuffer, only with the assumption that
+* this is not a thread on it's own
+*
+* \param pdata ProgData struct containing all program data
+*
+*/
+void SyncEncodeSoundBuffer(ProgData *pdata,signed char *buff);
+
+
+#endif
diff --git a/recordmydesktop/src/flush_to_ogg.c b/recordmydesktop/src/flush_to_ogg.c
index 8827503..7b32346 100644
--- a/recordmydesktop/src/flush_to_ogg.c
+++ b/recordmydesktop/src/flush_to_ogg.c
@@ -24,8 +24,12 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
+#include "encode_image_buffer.h"
+#include "encode_sound_buffer.h"
+#include "flush_to_ogg.h"
#include "recordmydesktop.h"
+
//we copy the page because the next call to ogg_stream_pageout
//will invalidate it. But we must have pages from
//both streams at every time in
diff --git a/recordmydesktop/src/flush_to_ogg.h b/recordmydesktop/src/flush_to_ogg.h
new file mode 100644
index 0000000..d7a2fcd
--- /dev/null
+++ b/recordmydesktop/src/flush_to_ogg.h
@@ -0,0 +1,40 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef FLUSH_TO_OGG_H
+#define FLUSH_TO_OGG_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Query theora and vorbis streams for ready packages and
+* flush them on the disk
+* \param pdata ProgData struct containing all program data
+*/
+void *FlushToOgg(ProgData *pdata);
+
+#endif
diff --git a/recordmydesktop/src/get_frame.c b/recordmydesktop/src/get_frame.c
index c732002..1de3c0e 100644
--- a/recordmydesktop/src/get_frame.c
+++ b/recordmydesktop/src/get_frame.c
@@ -24,9 +24,14 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
+#include "get_frame.h"
+#include "getzpixmap.h"
+#include "poll_events.h"
#include "recordmydesktop.h"
#include "rectinsert.h"
+#include "rmd_cache.h"
+#include "rmd_frame.h"
+#include "update_image.h"
#include "yuv_utils.h"
diff --git a/recordmydesktop/src/get_frame.h b/recordmydesktop/src/get_frame.h
new file mode 100644
index 0000000..9c4c6d0
--- /dev/null
+++ b/recordmydesktop/src/get_frame.h
@@ -0,0 +1,41 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef GET_FRAME_H
+#define GET_FRAME_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Retrieve frame form xserver, and transform to a yuv buffer,
+* either directly(full shots) or by calling UpdateImage.
+* \param pdata ProgData struct containing all program data
+*/
+void *GetFrame(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/getzpixmap.c b/recordmydesktop/src/getzpixmap.c
index 742ffb8..d4a7809 100644
--- a/recordmydesktop/src/getzpixmap.c
+++ b/recordmydesktop/src/getzpixmap.c
@@ -24,8 +24,8 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
#include "recordmydesktop.h"
+#include "getzpixmap.h"
int GetZPixmap(Display *dpy,
diff --git a/recordmydesktop/src/getzpixmap.h b/recordmydesktop/src/getzpixmap.h
new file mode 100644
index 0000000..68242b0
--- /dev/null
+++ b/recordmydesktop/src/getzpixmap.h
@@ -0,0 +1,98 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef GETZPIXMAP_H
+#define GETZPIXMAP_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Rerieve pixmap data from xserver
+*
+* \param dpy Connection to the server
+*
+* \param root root window of the display
+*
+* \param data (preallocated)buffer to place the data
+*
+* \param x x position of the screenshot
+*
+* \param y y position of the screenshot
+*
+* \param x x position of the screenshot
+*
+* \param width width of the screenshot
+*
+* \param height height position of the screenshot
+*
+* \returns 0 on Success 1 on Failure
+*/
+int GetZPixmap(Display *dpy,
+ Window root,
+ char *data,
+ int x,
+ int y,
+ int width,
+ int height);
+
+/**
+* Rerieve pixmap data from xserver through the MIT-Shm extension
+*
+* \param dpy Connection to the server
+*
+* \param root root window of the display
+*
+* \param shminfo Info for the shared memory segment
+*
+* \param shm_opcode Opcode of Shm extension
+*
+* \param data (preallocated)buffer to place the data
+*
+* \param x x position of the screenshot
+*
+* \param y y position of the screenshot
+*
+* \param x x position of the screenshot
+*
+* \param width width of the screenshot
+*
+* \param height height position of the screenshot
+*
+* \returns 0 on Success 1 on Failure
+*/
+int GetZPixmapSHM(Display *dpy,
+ Window root,
+ XShmSegmentInfo *shminfo,
+ int shm_opcode,
+ char *data,
+ int x,
+ int y,
+ int width,
+ int height);
+
+
+#endif
diff --git a/recordmydesktop/src/init_encoder.c b/recordmydesktop/src/init_encoder.c
index c5da4d5..ad3f608 100644
--- a/recordmydesktop/src/init_encoder.c
+++ b/recordmydesktop/src/init_encoder.c
@@ -27,6 +27,7 @@
#include <string.h>
+#include "init_encoder.h"
#include "recordmydesktop.h"
#include "skeleton.h"
diff --git a/recordmydesktop/src/init_encoder.h b/recordmydesktop/src/init_encoder.h
new file mode 100644
index 0000000..42ebaa8
--- /dev/null
+++ b/recordmydesktop/src/init_encoder.h
@@ -0,0 +1,47 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef INIT_ENCODER_H
+#define INIT_ENCODER_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Initialize theora,vorbis encoders, and their respective ogg streams.
+*
+* \param pdata ProgData struct containing all program data
+*
+* \param enc_data_t Encoding options
+*
+* \param buffer_ready when 1, the yuv buffer must be preallocated
+* when 0 InitEncoder will alocate a new one
+*
+*/
+void InitEncoder(ProgData *pdata,EncData *enc_data_t,int buffer_ready);
+
+
+#endif
diff --git a/recordmydesktop/src/initialize_data.c b/recordmydesktop/src/initialize_data.c
index 2b2bb6e..3ac5c77 100644
--- a/recordmydesktop/src/initialize_data.c
+++ b/recordmydesktop/src/initialize_data.c
@@ -26,6 +26,11 @@
#include "recordmydesktop.h"
#include "yuv_utils.h"
+#include "make_dummy_pointer.h"
+#include "opendev.h"
+#include "rmd_jack.h"
+#include "init_encoder.h"
+#include "rmd_cache.h"
#ifdef HAVE_LIBASOUND
diff --git a/recordmydesktop/src/load_cache.c b/recordmydesktop/src/load_cache.c
index afd1570..82db79f 100644
--- a/recordmydesktop/src/load_cache.c
+++ b/recordmydesktop/src/load_cache.c
@@ -26,7 +26,11 @@
#include <signal.h>
+#include "encode_image_buffer.h"
+#include "encode_sound_buffer.h"
+#include "load_cache.h"
#include "recordmydesktop.h"
+#include "rmd_cache.h"
//The number of bytes for every
diff --git a/recordmydesktop/src/load_cache.h b/recordmydesktop/src/load_cache.h
new file mode 100644
index 0000000..fca0cbb
--- /dev/null
+++ b/recordmydesktop/src/load_cache.h
@@ -0,0 +1,42 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef LOAD_CACHE
+#define LOAD_CACHE 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Cache loading and processing thread
+*
+* \param pdata ProgData struct containing all program data
+*
+*/
+void *LoadCache(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/make_dummy_pointer.c b/recordmydesktop/src/make_dummy_pointer.c
index 033e112..bbad17a 100644
--- a/recordmydesktop/src/make_dummy_pointer.c
+++ b/recordmydesktop/src/make_dummy_pointer.c
@@ -24,8 +24,8 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
#include "recordmydesktop.h"
+#include "make_dummy_pointer.h"
unsigned char *MakeDummyPointer(DisplaySpecs *specs,
diff --git a/recordmydesktop/src/make_dummy_pointer.h b/recordmydesktop/src/make_dummy_pointer.h
new file mode 100644
index 0000000..391416b
--- /dev/null
+++ b/recordmydesktop/src/make_dummy_pointer.h
@@ -0,0 +1,58 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef MAKE_DUMMY_POINTER_H
+#define MAKE_DUMMY_POINTER_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Create an array containing the data for the dummy pointer
+*
+* \param specs DisplaySpecs struct with
+* information about the display to be recorded
+*
+* \param size Pointer size, always square, always 16.(exists only
+* for the possibility to create more dummy cursors)
+* \param color 0 white, 1 black
+*
+* \param type Always 0.(exists only for the possibility to create
+* more dummy cursors)
+*
+* \param npxl Return of pixel value that denotes non-drawing, while
+* applying the cursor on the target image
+*
+* \returns Pointer to pixel data of the cursor
+*/
+unsigned char *MakeDummyPointer(DisplaySpecs *specs,
+ int size,
+ int color,
+ int type,
+ unsigned char *npxl);
+
+
+#endif
diff --git a/recordmydesktop/src/opendev.c b/recordmydesktop/src/opendev.c
index 7ea7f9d..a3ef1cd 100644
--- a/recordmydesktop/src/opendev.c
+++ b/recordmydesktop/src/opendev.c
@@ -44,6 +44,8 @@
#include <sys/soundcard.h>
#endif
+#include "opendev.h"
+
#ifdef HAVE_LIBASOUND
snd_pcm_t *OpenDev( const char *pcm_dev,
diff --git a/recordmydesktop/src/opendev.h b/recordmydesktop/src/opendev.h
new file mode 100644
index 0000000..c6ac144
--- /dev/null
+++ b/recordmydesktop/src/opendev.h
@@ -0,0 +1,84 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef OPENDEV_H
+#define OPENDEV_H 1
+
+#include "rmdtypes.h"
+
+
+#ifdef HAVE_LIBASOUND
+/**
+* Try to open (alsa) sound device, with the desired parameters,
+* and place the obtained ones on their place
+*
+* \param pcm_dev name of the device
+*
+* \param channels desired number of channels
+* (gets modified with the acieved value)
+*
+* \param frequency desired frequency(gets modified with the acieved value)
+*
+* \param buffsize Size of buffer
+*
+* \param periodsize Size of a period(can be NULL)
+*
+* \param periodtime Duration of a period(can be NULL)
+*
+* \param hardpause Set to 1 when the device has to be stopped during pause
+* and to 0 when it supports pausing
+* (can be NULL)
+*
+* \returns snd_pcm_t handle on success, NULL on failure
+*/
+snd_pcm_t *OpenDev( const char *pcm_dev,
+ unsigned int *channels,
+ unsigned int *frequency,
+ snd_pcm_uframes_t *buffsize,
+ snd_pcm_uframes_t *periodsize,
+ unsigned int *periodtime,
+ int *hardpause);
+#else
+/**
+* Try to open (OSS) sound device, with the desired parameters.
+*
+*
+* \param pcm_dev name of the device
+*
+* \param channels desired number of channels
+*
+* \param frequency desired frequency
+*
+*
+* \returns file descriptor of open device,-1 on failure
+*/
+int OpenDev( const char *pcm_dev,
+ unsigned int channels,
+ unsigned int frequency);
+#endif
+
+
+#endif
diff --git a/recordmydesktop/src/parseargs.c b/recordmydesktop/src/parseargs.c
index b6f38f3..12fb52e 100644
--- a/recordmydesktop/src/parseargs.c
+++ b/recordmydesktop/src/parseargs.c
@@ -26,6 +26,7 @@
#include "recordmydesktop.h"
+#include "rmd_rescue.h"
static void PrintConfig(void) {
diff --git a/recordmydesktop/src/poll_events.c b/recordmydesktop/src/poll_events.c
index c8263df..88c3f3c 100644
--- a/recordmydesktop/src/poll_events.c
+++ b/recordmydesktop/src/poll_events.c
@@ -36,10 +36,11 @@
#include <signal.h>
#include <pthread.h>
-#include "rmdfunc.h"
-#include "rmdtypes.h"
-#include "rmdmacro.h"
+#include "poll_events.h"
#include "rectinsert.h"
+#include "rmd_frame.h"
+#include "rmdmacro.h"
+#include "rmdtypes.h"
#define CLIP_EVENT_AREA(e,brwin,wgeom){\
diff --git a/recordmydesktop/src/poll_events.h b/recordmydesktop/src/poll_events.h
new file mode 100644
index 0000000..6195237
--- /dev/null
+++ b/recordmydesktop/src/poll_events.h
@@ -0,0 +1,49 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef POLL_EVENTS_H
+#define POLL_EVENTS_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Start listening to damage and substructure notify events
+* (needed before EventLoop call)
+* \param pdata ProgData struct containing all program data
+*/
+void InitEventsPolling(ProgData *pdata);
+
+/**
+* Loop calling XNextEvent.Retrieve and place on
+* list damage events that arive, create damage for new windows
+* and pickup key events for shortcuts.
+* \param pdata ProgData struct containing all program data
+*/
+void EventLoop(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/queryextensions.c b/recordmydesktop/src/queryextensions.c
index a733f34..dfc7120 100644
--- a/recordmydesktop/src/queryextensions.c
+++ b/recordmydesktop/src/queryextensions.c
@@ -24,10 +24,10 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
#include <X11/extensions/shape.h>
#include "recordmydesktop.h"
+#include "queryextensions.h"
void QueryExtensions(Display *dpy,
diff --git a/recordmydesktop/src/queryextensions.h b/recordmydesktop/src/queryextensions.h
new file mode 100644
index 0000000..bde9abd
--- /dev/null
+++ b/recordmydesktop/src/queryextensions.h
@@ -0,0 +1,53 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef QUERYEXTENSIONS_H
+#define QUERYEXTENSIONS_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Check if needed extensions are present
+*
+* \param dpy Connection to the server
+*
+* \param args ProgArgs struct containing the user-set options
+*
+* \param damage_event gets filled with damage event number
+*
+* \param damage_error gets filled with damage error number
+*
+* \note Can be an exit point if extensions are not found
+*/
+void QueryExtensions(Display *dpy,
+ ProgArgs *args,
+ int *damage_event,
+ int *damage_error,
+ int *shm_opcode);
+
+
+#endif
diff --git a/recordmydesktop/src/recordmydesktop.c b/recordmydesktop/src/recordmydesktop.c
index 53f776b..622a75e 100644
--- a/recordmydesktop/src/recordmydesktop.c
+++ b/recordmydesktop/src/recordmydesktop.c
@@ -24,10 +24,17 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
#include "recordmydesktop.h"
#include "initialize_data.h"
+#include "rmd_error.h"
#include "parseargs.h"
+#include "setbrwindow.h"
+#include "wm_check.h"
+#include "queryextensions.h"
+#include "shortcuts.h"
+#include "rmdthreads.h"
+#include "rmd_cache.h"
+#include "encode_cache.h"
int main(int argc,char **argv){
diff --git a/recordmydesktop/src/rectinsert.h b/recordmydesktop/src/rectinsert.h
index 013eb12..414f01f 100644
--- a/recordmydesktop/src/rectinsert.h
+++ b/recordmydesktop/src/rectinsert.h
@@ -45,5 +45,11 @@
*/
int RectInsert(RectArea **root, WGeometry *wgeom);
+/**
+* Clean up a list of areas marked for update.
+* \param root Root entry of the list
+*/
+void ClearList(RectArea **root);
+
#endif
diff --git a/recordmydesktop/src/rmd_cache.c b/recordmydesktop/src/rmd_cache.c
index 823b08b..1d05e67 100644
--- a/recordmydesktop/src/rmd_cache.c
+++ b/recordmydesktop/src/rmd_cache.c
@@ -24,8 +24,9 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
#include "recordmydesktop.h"
+#include "rmd_cache.h"
+#include "specsfile.h"
/**
diff --git a/recordmydesktop/src/rmd_cache.h b/recordmydesktop/src/rmd_cache.h
new file mode 100644
index 0000000..4ddb5e9
--- /dev/null
+++ b/recordmydesktop/src/rmd_cache.h
@@ -0,0 +1,89 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef RMD_CACHE_H
+#define RMD_CACHE_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Change file pointer to a new file while writting
+* (file name is incremented with CacheFileN)
+*
+* \param name base file name
+*
+* \param n number to be used as a postfix
+*
+* \param fp File pointer if compression is used(must be NULL otherwise)
+*
+* \param ucfp File pointer if compression is NOT used(must be NULL otherwise)
+*
+* \returns 0 on Success 1 on Failure
+*/
+int SwapCacheFilesWrite(char *name,int n,gzFile **fp,FILE **ucfp);
+
+/**
+* Change file pointer to a new file while reading
+* (file name is incremented with CacheFileN)
+*
+* \param name base file name
+*
+* \param n number to be used as a postfix
+*
+* \param fp File pointer if compression is used(must be NULL otherwise)
+*
+* \param ucfp File pointer if compression is NOT used(must be NULL otherwise)
+*
+* \returns 0 on Success 1 on Failure
+*/
+int SwapCacheFilesRead(char *name,int n,gzFile **fp,FILE **ucfp);
+
+/**
+* Delete all cache files
+*
+* \param cache_data_t Caching options(file names etc.)
+*
+* \returns 0 if all files and folders where deleted, 1 otherwise
+*/
+int PurgeCache(CacheData *cache_data_t,int sound);
+
+/**
+* Initializes paths and everything else needed to start caching
+*
+* \param pdata ProgData struct containing all program data
+*
+* \param enc_data_t Encoding options
+*
+* \param cache_data_t Caching options
+*
+*/
+void InitCacheData(ProgData *pdata,
+ EncData *enc_data_t,
+ CacheData *cache_data_t);
+
+
+#endif
diff --git a/recordmydesktop/src/rmd_error.c b/recordmydesktop/src/rmd_error.c
index 4c0a449..7d27d02 100644
--- a/recordmydesktop/src/rmd_error.c
+++ b/recordmydesktop/src/rmd_error.c
@@ -34,7 +34,7 @@
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
-#include "rmdfunc.h"
+#include "rmd_error.h"
int rmdErrorHandler( Display *dpy, XErrorEvent *e )
diff --git a/recordmydesktop/src/rmd_error.h b/recordmydesktop/src/rmd_error.h
new file mode 100644
index 0000000..82529c7
--- /dev/null
+++ b/recordmydesktop/src/rmd_error.h
@@ -0,0 +1,49 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef RMD_ERROR_H
+#define RMD_ERROR_H 1
+
+#include "rmdtypes.h"
+
+
+/*
+ * Handling of X errors.
+ * Ignores, bad access when registering shortcuts
+ * and BadWindow on XQueryTree
+ *
+ * \param dpy Connection to the X Server
+ *
+ * \param e XErrorEvent struct containing error info
+ *
+ * \returns 0 on the two ignored cases, calls exit(1)
+ * otherwise.
+ *
+ */
+int rmdErrorHandler(Display *dpy,XErrorEvent *e);
+
+
+#endif
diff --git a/recordmydesktop/src/rmd_frame.c b/recordmydesktop/src/rmd_frame.c
index 206e2ee..cc58d54 100644
--- a/recordmydesktop/src/rmd_frame.c
+++ b/recordmydesktop/src/rmd_frame.c
@@ -29,9 +29,13 @@
#include <X11/Xlib.h>
#include <X11/extensions/shape.h>
+#include "rmd_frame.h"
+
+
#define BORDER_WIDTH 6
#define OUTLINE_WIDTH 1
+
void rmdDrawFrame(Display *dpy,
int screen,
Window win,
diff --git a/recordmydesktop/src/rmd_frame.h b/recordmydesktop/src/rmd_frame.h
new file mode 100644
index 0000000..9d46662
--- /dev/null
+++ b/recordmydesktop/src/rmd_frame.h
@@ -0,0 +1,101 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef RMD_FRAME_H
+#define RMD_FRAME_H 1
+
+#include "rmdtypes.h"
+
+
+/*
+ * Create a frame that marks the recording area.
+ *
+ * \param dpy Connection to the X Server
+ *
+ * \param screen Recorded screen
+ *
+ * \param root Root window of the display
+ *
+ * \param x X pos of the recorded area
+ *
+ * \param y Y pos of the recorded area
+ *
+ * \param width Width of the recorded area
+ *
+ * \param height Height of the recorded area
+ *
+ * \returns The WindowID of the frame
+ *
+ */
+Window rmdFrameInit(Display *dpy,
+ int screen,
+ Window root,
+ int x,
+ int y,
+ int width,
+ int height);
+
+
+/*
+ * Move the frame (subtracts the borderwidth)
+ *
+ * \param dpy Connection to the X Server
+ *
+ * \param win WindowId of the frame
+ *
+ * \param x New X pos of the recorded area
+ *
+ * \param y New Y pos of the recorded area
+ *
+ */
+void rmdMoveFrame(Display *dpy,
+ Window win,
+ int x,
+ int y);
+
+
+/*
+ * Redraw the frame that marks the recording area.
+ *
+ * \param dpy Connection to the X Server
+ *
+ * \param screen Recorded screen
+ *
+ * \param win WindoID of the frame
+ *
+ * \param width Width of the recorded area
+ *
+ * \param height Height of the recorded area
+ *
+ */
+void rmdDrawFrame(Display *dpy,
+ int screen,
+ Window win,
+ int width,
+ int height);
+
+
+#endif
diff --git a/recordmydesktop/src/rmd_jack.c b/recordmydesktop/src/rmd_jack.c
index 6e5544e..edc7076 100644
--- a/recordmydesktop/src/rmd_jack.c
+++ b/recordmydesktop/src/rmd_jack.c
@@ -24,8 +24,8 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
#include "recordmydesktop.h"
+#include "rmd_jack.h"
#ifdef HAVE_JACK_H
diff --git a/recordmydesktop/src/rmd_jack.h b/recordmydesktop/src/rmd_jack.h
new file mode 100644
index 0000000..96492b0
--- /dev/null
+++ b/recordmydesktop/src/rmd_jack.h
@@ -0,0 +1,63 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef RMD_JACK_H
+#define RMD_JACK_H 1
+
+#include "rmdtypes.h"
+
+
+#ifdef HAVE_JACK_H
+
+size_t (*jack_ringbuffer_read_p)(jack_ringbuffer_t *rb,
+ char *dest, size_t cnt);
+size_t (*jack_ringbuffer_read_space_p)(const jack_ringbuffer_t *rb);
+
+/**
+* Load libjack, create and activate client,register ports
+*
+* \param jdata_t Pointer to JackData struct containing port
+* and client information
+*
+* \returns 0 on Success, error code on failure
+* (depending on where the error occured)
+*/
+int StartJackClient(JackData *jdata);
+
+/**
+* Close Jack Client
+*
+* \param jdata_t Pointer to JackData struct containing port
+* and client information
+*
+* \returns 0 on Success, 1 on failure
+*/
+int StopJackClient(JackData *jdata);
+
+#endif
+
+
+#endif
diff --git a/recordmydesktop/src/rmd_rescue.c b/recordmydesktop/src/rmd_rescue.c
index b4624fd..6f907d3 100644
--- a/recordmydesktop/src/rmd_rescue.c
+++ b/recordmydesktop/src/rmd_rescue.c
@@ -24,9 +24,12 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-#include "recordmydesktop.h"
+#include "encode_cache.h"
#include "initialize_data.h"
+#include "recordmydesktop.h"
#include "register_callbacks.h"
+#include "rmd_rescue.h"
+#include "specsfile.h"
int rmdRescue(const char *path){
diff --git a/recordmydesktop/src/rmd_rescue.h b/recordmydesktop/src/rmd_rescue.h
new file mode 100644
index 0000000..2fbf2da
--- /dev/null
+++ b/recordmydesktop/src/rmd_rescue.h
@@ -0,0 +1,42 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef RMD_RESCUE_H
+#define RMD_RESCUE_H 1
+
+/*
+ * Rescue a previous recording, found in
+ * the given path.
+ *
+ * \param path Path to the cache folder.
+ *
+ * \returns 0 on Success, 1 on failure
+ *
+ */
+int rmdRescue(const char *path);
+
+
+#endif
diff --git a/recordmydesktop/src/rmd_timer.c b/recordmydesktop/src/rmd_timer.c
index 28929ab..edc6f3e 100644
--- a/recordmydesktop/src/rmd_timer.c
+++ b/recordmydesktop/src/rmd_timer.c
@@ -33,6 +33,7 @@
#include <stdlib.h>
#include "recordmydesktop.h"
+#include "rmd_timer.h"
void *rmdTimer(ProgData *pdata){
diff --git a/recordmydesktop/src/rmd_timer.h b/recordmydesktop/src/rmd_timer.h
new file mode 100644
index 0000000..28b9898
--- /dev/null
+++ b/recordmydesktop/src/rmd_timer.h
@@ -0,0 +1,44 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef RMD_TIMER_H
+#define RMD_TIMER_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Loop ,signal timer cond var,sleep-\
+* ^ |
+* |________________________________/
+*
+*
+* \param pdata ProgData struct containing all program data
+*/
+void *rmdTimer(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/rmdthreads.c b/recordmydesktop/src/rmdthreads.c
index 705c383..d70e3b4 100644
--- a/recordmydesktop/src/rmdthreads.c
+++ b/recordmydesktop/src/rmdthreads.c
@@ -33,9 +33,18 @@
#include <pthread.h>
#include <unistd.h>
-#include "rmdfunc.h"
-#include "rmdtypes.h"
+#include "cache_audio.h"
+#include "cache_frame.h"
+#include "capture_sound.h"
+#include "encode_image_buffer.h"
+#include "encode_sound_buffer.h"
+#include "flush_to_ogg.h"
+#include "get_frame.h"
#include "register_callbacks.h"
+#include "rmd_jack.h"
+#include "rmd_timer.h"
+#include "rmdthreads.h"
+#include "rmdtypes.h"
void rmdThreads(ProgData *pdata){
diff --git a/recordmydesktop/src/rmdthreads.h b/recordmydesktop/src/rmdthreads.h
new file mode 100644
index 0000000..c832c1c
--- /dev/null
+++ b/recordmydesktop/src/rmdthreads.h
@@ -0,0 +1,43 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef RMDTHREADS_H
+#define RMDTHREADS_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Launch and wait capture threads.
+* Also creates and waits the encoding threads when
+* encode-on-the-fly is enabled.
+*
+* \param pdata ProgData struct containing all program data
+*/
+void rmdThreads(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/setbrwindow.c b/recordmydesktop/src/setbrwindow.c
index 2d1f453..ce82ddd 100644
--- a/recordmydesktop/src/setbrwindow.c
+++ b/recordmydesktop/src/setbrwindow.c
@@ -24,8 +24,8 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
#include "recordmydesktop.h"
+#include "setbrwindow.h"
/**
diff --git a/recordmydesktop/src/setbrwindow.h b/recordmydesktop/src/setbrwindow.h
new file mode 100644
index 0000000..0ed9c93
--- /dev/null
+++ b/recordmydesktop/src/setbrwindow.h
@@ -0,0 +1,53 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef SETBRWINDOW_H
+#define SETBRWINDOW_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Check and align window size
+*
+* \param dpy Connection to the server
+*
+* \param brwin BRWindow struct contaning the initial and final window
+*
+* \param specs DisplaySpecs struct with
+* information about the display to be recorded
+*
+* \param args ProgArgs struct containing the user-set options
+*
+* \returns 0 on Success 1 on Failure
+*/
+int SetBRWindow(Display *dpy,
+ BRWindow *brwin,
+ DisplaySpecs *specs,
+ ProgArgs *args);
+
+
+#endif
diff --git a/recordmydesktop/src/shortcuts.c b/recordmydesktop/src/shortcuts.c
index 9b4779a..215ff16 100644
--- a/recordmydesktop/src/shortcuts.c
+++ b/recordmydesktop/src/shortcuts.c
@@ -37,6 +37,7 @@
#include <X11/keysym.h>
#include "rmdtypes.h"
+#include "shortcuts.h"
int RegisterShortcut(Display *dpy,
Window root,
diff --git a/recordmydesktop/src/shortcuts.h b/recordmydesktop/src/shortcuts.h
new file mode 100644
index 0000000..ea93ba2
--- /dev/null
+++ b/recordmydesktop/src/shortcuts.h
@@ -0,0 +1,57 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef SHORTCUTS_H
+#define CHORTCUTS_H 1
+
+#include "rmdtypes.h"
+
+
+/*
+ * Check a shortcut combination and if valid,
+ * register it, on the root window.
+ *
+ * \param dpy Connection to the X Server
+ *
+ * \param root Root window id
+ *
+ * \param shortcut String represantation of the shortcut
+ *
+ * \param HotKey Pre-allocated struct that is filled with the
+ * modifiers and the keycode, for checks on incoming
+ * keypress events. Left untouched if the call fails.
+ *
+ *
+ * \returns 0 on Success, 1 on Failure.
+ *
+ */
+int RegisterShortcut(Display *dpy,
+ Window root,
+ const char *shortcut,
+ HotKey *hotkey);
+
+
+#endif
diff --git a/recordmydesktop/src/specsfile.c b/recordmydesktop/src/specsfile.c
index bc61ea4..d22d2b3 100644
--- a/recordmydesktop/src/specsfile.c
+++ b/recordmydesktop/src/specsfile.c
@@ -33,6 +33,7 @@
#include <stdio.h>
#include "rmdtypes.h"
+#include "specsfile.h"
int WriteSpecsFile(ProgData *pdata){
diff --git a/recordmydesktop/src/specsfile.h b/recordmydesktop/src/specsfile.h
new file mode 100644
index 0000000..eed0942
--- /dev/null
+++ b/recordmydesktop/src/specsfile.h
@@ -0,0 +1,59 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef SPECSFILE_H
+#define SPECSFILE_H 1
+
+#include "rmdtypes.h"
+
+
+/*
+ * Create a text file that holds the required
+ * capture attributes, in the cache directory.
+ *
+ * \param pdata ProgData struct containing all program data
+ *
+ * \returns 0 on Success, 1 on failure
+ *
+ */
+int WriteSpecsFile(ProgData *pdata);
+
+
+
+/*
+ * Read the text file that holds the required
+ * capture attributes, in the cache directory.
+ *
+ * \param pdata ProgData struct that will be fille
+ * with all program data
+ *
+ * \returns 0 on Success, 1 on failure
+ *
+ */
+int ReadSpecsFile(ProgData *pdata);
+
+
+#endif
diff --git a/recordmydesktop/src/update_image.c b/recordmydesktop/src/update_image.c
index 7a09920..efbe5a8 100644
--- a/recordmydesktop/src/update_image.c
+++ b/recordmydesktop/src/update_image.c
@@ -24,8 +24,9 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
+#include "getzpixmap.h"
#include "recordmydesktop.h"
+#include "update_image.h"
#include "yuv_utils.h"
diff --git a/recordmydesktop/src/update_image.h b/recordmydesktop/src/update_image.h
new file mode 100644
index 0000000..7c67e25
--- /dev/null
+++ b/recordmydesktop/src/update_image.h
@@ -0,0 +1,70 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef UPDATE_IMAGE_H
+#define UPDATE_IMAGE_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+* Retrieve and apply all changes, if xdamage is used.
+*
+* \param dpy Connection to the server
+*
+* \param yuv yuv_buffer that is to be modified
+*
+* \param specs DisplaySpecs struct with
+* information about the display to be recorded
+*
+* \param root Root entry of the list with damaged areas
+*
+* \param brwin BRWindow struct contaning the recording window specs
+*
+* \param enc Encoding options
+*
+* \param datatemp Buffer for pixel data to be
+* retrieved before placed on the yuv buffer
+*
+* \param noshmem don't use MIT_Shm extension
+*
+* \param no_quick_subsample Don't do quick subsampling
+*
+*/
+void UpdateImage(Display * dpy,
+ yuv_buffer *yuv,
+ DisplaySpecs *specs,
+ RectArea **root,
+ BRWindow *brwin,
+ EncData *enc,
+ char *datatemp,
+ int noshmem,
+ XShmSegmentInfo *shminfo,
+ int shm_opcode,
+ int no_quick_subsample);
+
+
+#endif
diff --git a/recordmydesktop/src/wm_check.c b/recordmydesktop/src/wm_check.c
index eea614b..555d960 100644
--- a/recordmydesktop/src/wm_check.c
+++ b/recordmydesktop/src/wm_check.c
@@ -24,8 +24,8 @@
* For further information contact me at johnvarouhakis@gmail.com *
******************************************************************************/
-
#include "recordmydesktop.h"
+#include "wm_check.h"
char *rmdWMCheck(Display *dpy,Window root){
diff --git a/recordmydesktop/src/wm_check.h b/recordmydesktop/src/wm_check.h
new file mode 100644
index 0000000..1867dc2
--- /dev/null
+++ b/recordmydesktop/src/wm_check.h
@@ -0,0 +1,45 @@
+/******************************************************************************
+* recordMyDesktop *
+*******************************************************************************
+* *
+* Copyright (C) 2006,2007,2008 John Varouhakis *
+* *
+* *
+* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+******************************************************************************/
+
+#ifndef WM_CHECK_H
+#define WM_CHECK_H 1
+
+#include "rmdtypes.h"
+
+
+/**
+*Check current running window manager.
+*
+* \param dpy Connection to the server
+*
+* \param root root window of the display
+*
+* \returns Window manager name
+*/
+char *rmdWMCheck(Display *dpy,Window root);
+
+
+#endif
© All Rights Reserved