Index: xonox/branches/bensch/Makefile
===================================================================
--- /orxonox/branches/bensch/Makefile	(revision 1808)
+++ 	(revision )
@@ -1,9 +1,0 @@
-CC = gcc -Wall -pedantic -ansi
-
-all:
-	$(CC) lesson01.c -o lesson01 -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm
-
-clean:
-	@echo Cleaning up...
-	@rm lesson01
-	@echo Done.
Index: xonox/branches/bensch/README
===================================================================
--- /orxonox/branches/bensch/README	(revision 1808)
+++ 	(revision )
@@ -1,30 +1,0 @@
-Readme for NeHe's OpenGL Tutorial Lesson01 Linux/GLX port
-==========================================================
-
-Compilation:
-
-make
-
-Running:
-
-./lesson01
-
-Requirements:
-
-- OpenGL headers and libraries 
-- Xserver with GLX and XF86VidMode extensions (I used version 4.0.1)
-- gcc (any other ANSI C compiler should do it too; I used gcc 2.95.2)
-
-Known bugs/issues:
-
-- does not stop drawing even if iconified (though it is not visible)
-- does not explicitly select color depth
-
-Contact:
-
-If you have any problems, comments, or have useful hints, 
-email to Mihael.Vrbanec@stud.uni-karlsruhe.de
-
-Credits:
-Jeff Molofee (nehe@connect.ab.ca) for writing the tutorials.
-Mihael Vrbanec for the port to Linux/GLX and ANSI C
Index: xonox/branches/bensch/lesson01.c
===================================================================
--- /orxonox/branches/bensch/lesson01.c	(revision 1808)
+++ 	(revision )
@@ -1,296 +1,0 @@
-/*
- * This code was created by Jeff Molofee '99 
- * (ported to Linux/GLX by Mihael Vrbanec '00)
- *
- * If you've found this code useful, please let me know.
- *
- * Visit Jeff at http://nehe.gamedev.net/
- * 
- * or for port-specific comments, questions, bugreports etc. 
- * email to Mihael.Vrbanec@stud.uni-karlsruhe.de
- */
- 
-#include <stdio.h>
-#include <GL/glx.h>
-#include <GL/gl.h>
-#include <GL/glu.h>
-#include <X11/extensions/xf86vmode.h>
-#include <X11/keysym.h>
-
-/* stuff about our window grouped together */
-typedef struct {
-    Display *dpy;
-    int screen;
-    Window win;
-    GLXContext ctx;
-    XSetWindowAttributes attr;
-    Bool fs;
-    Bool doubleBuffered;
-    XF86VidModeModeInfo deskMode;
-    int x, y;
-    unsigned int width, height;
-    unsigned int depth;    
-} GLWindow;
-
-/* attributes for a single buffered visual in RGBA format with at least
- * 4 bits per color and a 16 bit depth buffer */
-static int attrListSgl[] = {GLX_RGBA, GLX_RED_SIZE, 4, 
-    GLX_GREEN_SIZE, 4, 
-    GLX_BLUE_SIZE, 4, 
-    GLX_DEPTH_SIZE, 16,
-    None};
-
-/* attributes for a double buffered visual in RGBA format with at least
- * 4 bits per color and a 16 bit depth buffer */
-static int attrListDbl[] = { GLX_RGBA, GLX_DOUBLEBUFFER, 
-    GLX_RED_SIZE, 4, 
-    GLX_GREEN_SIZE, 4, 
-    GLX_BLUE_SIZE, 4, 
-    GLX_DEPTH_SIZE, 16,
-    None };
-
-GLWindow GLWin;
-
-/* function called when our window is resized (should only happen in window mode) */
-void resizeGLScene(unsigned int width, unsigned int height)
-{
-    if (height == 0)    /* Prevent A Divide By Zero If The Window Is Too Small */
-        height = 1;
-    glViewport(0, 0, width, height);    /* Reset The Current Viewport And Perspective Transformation */
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-    gluPerspective(45.0f, (GLfloat)width / (GLfloat)height, 0.1f, 100.0f);
-    glMatrixMode(GL_MODELVIEW);
-}
-
-/* general OpenGL initialization function */
-int initGL(GLvoid)
-{
-    glShadeModel(GL_SMOOTH);
-    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
-    glClearDepth(1.0f);
-    glEnable(GL_DEPTH_TEST);
-    glDepthFunc(GL_LEQUAL);
-    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
-    /* we use resizeGLScene once to set up our initial perspective */
-    resizeGLScene(GLWin.width, GLWin.height);
-    glFlush();
-    return True;
-}
-
-/* Here goes our drawing code */
-int drawGLScene(GLvoid)
-{
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-    glLoadIdentity();
-    if (GLWin.doubleBuffered)
-    {
-        glXSwapBuffers(GLWin.dpy, GLWin.win);
-    }
-    return True;    
-}
-
-/* function to release/destroy our resources and restoring the old desktop */
-GLvoid killGLWindow(GLvoid)
-{
-    if (GLWin.ctx)
-    {
-        if (!glXMakeCurrent(GLWin.dpy, None, NULL))
-        {
-            printf("Could not release drawing context.\n");
-        }
-        glXDestroyContext(GLWin.dpy, GLWin.ctx);
-        GLWin.ctx = NULL;
-    }
-    /* switch back to original desktop resolution if we were in fs */
-    if (GLWin.fs)
-    {
-        XF86VidModeSwitchToMode(GLWin.dpy, GLWin.screen, &GLWin.deskMode);
-        XF86VidModeSetViewPort(GLWin.dpy, GLWin.screen, 0, 0);
-    }
-    XCloseDisplay(GLWin.dpy);
-}
-
-/* this function creates our window and sets it up properly */
-/* FIXME: bits is currently unused */
-Bool createGLWindow(char* title, int width, int height, int bits,
-                    Bool fullscreenflag)
-{
-    XVisualInfo *vi;
-    Colormap cmap;
-    int dpyWidth, dpyHeight;
-    int i;
-    int glxMajorVersion, glxMinorVersion;
-    int vidModeMajorVersion, vidModeMinorVersion;
-    XF86VidModeModeInfo **modes;
-    int modeNum;
-    int bestMode;
-    Atom wmDelete;
-    Window winDummy;
-    unsigned int borderDummy;
-    
-    GLWin.fs = fullscreenflag;
-    /* set best mode to current */
-    bestMode = 0;
-    /* get a connection */
-    GLWin.dpy = XOpenDisplay(0);
-    GLWin.screen = DefaultScreen(GLWin.dpy);
-    XF86VidModeQueryVersion(GLWin.dpy, &vidModeMajorVersion,
-        &vidModeMinorVersion);
-    printf("XF86VidModeExtension-Version %d.%d\n", vidModeMajorVersion,
-        vidModeMinorVersion);
-    XF86VidModeGetAllModeLines(GLWin.dpy, GLWin.screen, &modeNum, &modes);
-    /* save desktop-resolution before switching modes */
-    GLWin.deskMode = *modes[0];
-    /* look for mode with requested resolution */
-    for (i = 0; i < modeNum; i++)
-    {
-        if ((modes[i]->hdisplay == width) && (modes[i]->vdisplay == height))
-        {
-            bestMode = i;
-        }
-    }
-    /* get an appropriate visual */
-    vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListDbl);
-    if (vi == NULL)
-    {
-        vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListSgl);
-        GLWin.doubleBuffered = False;
-        printf("Only Singlebuffered Visual!\n");
-    }
-    else
-    {
-        GLWin.doubleBuffered = True;
-        printf("Got Doublebuffered Visual!\n");
-    }
-    glXQueryVersion(GLWin.dpy, &glxMajorVersion, &glxMinorVersion);
-    printf("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);
-    /* create a GLX context */
-    GLWin.ctx = glXCreateContext(GLWin.dpy, vi, 0, GL_TRUE);
-    /* create a color map */
-    cmap = XCreateColormap(GLWin.dpy, RootWindow(GLWin.dpy, vi->screen),
-        vi->visual, AllocNone);
-    GLWin.attr.colormap = cmap;
-    GLWin.attr.border_pixel = 0;
-
-    if (GLWin.fs)
-    {
-        XF86VidModeSwitchToMode(GLWin.dpy, GLWin.screen, modes[bestMode]);
-        XF86VidModeSetViewPort(GLWin.dpy, GLWin.screen, 0, 0);
-        dpyWidth = modes[bestMode]->hdisplay;
-        dpyHeight = modes[bestMode]->vdisplay;
-        printf("Resolution %dx%d\n", dpyWidth, dpyHeight);
-        XFree(modes);
-    
-        /* create a fullscreen window */
-        GLWin.attr.override_redirect = True;
-        GLWin.attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask |
-            StructureNotifyMask;
-        GLWin.win = XCreateWindow(GLWin.dpy, RootWindow(GLWin.dpy, vi->screen),
-            0, 0, dpyWidth, dpyHeight, 0, vi->depth, InputOutput, vi->visual,
-            CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect,
-            &GLWin.attr);
-        XWarpPointer(GLWin.dpy, None, GLWin.win, 0, 0, 0, 0, 0, 0);
-		XMapRaised(GLWin.dpy, GLWin.win);
-        XGrabKeyboard(GLWin.dpy, GLWin.win, True, GrabModeAsync,
-            GrabModeAsync, CurrentTime);
-        XGrabPointer(GLWin.dpy, GLWin.win, True, ButtonPressMask,
-            GrabModeAsync, GrabModeAsync, GLWin.win, None, CurrentTime);
-    }
-    else
-    {
-        /* create a window in window mode*/
-        GLWin.attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask |
-            StructureNotifyMask;
-        GLWin.win = XCreateWindow(GLWin.dpy, RootWindow(GLWin.dpy, vi->screen),
-            0, 0, width, height, 0, vi->depth, InputOutput, vi->visual,
-            CWBorderPixel | CWColormap | CWEventMask, &GLWin.attr);
-        /* only set window title and handle wm_delete_events if in windowed mode */
-        wmDelete = XInternAtom(GLWin.dpy, "WM_DELETE_WINDOW", True);
-        XSetWMProtocols(GLWin.dpy, GLWin.win, &wmDelete, 1);
-        XSetStandardProperties(GLWin.dpy, GLWin.win, title,
-            title, None, NULL, 0, NULL);
-        XMapRaised(GLWin.dpy, GLWin.win);
-    }       
-    /* connect the glx-context to the window */
-    glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx);
-    XGetGeometry(GLWin.dpy, GLWin.win, &winDummy, &GLWin.x, &GLWin.y,
-        &GLWin.width, &GLWin.height, &borderDummy, &GLWin.depth);
-    printf("Depth %d\n", GLWin.depth);
-    if (glXIsDirect(GLWin.dpy, GLWin.ctx)) 
-        printf("Congrats, you have Direct Rendering!\n");
-    else
-        printf("Sorry, no Direct Rendering possible!\n");
-    initGL();
-    return True;    
-}
-
-int main(int argc, char **argv)
-{
-    XEvent event;
-    Bool done;
-    
-    done = False;
-    /* default to fullscreen */
-    GLWin.fs = True;
-    createGLWindow("NeHe's OpenGL Framework", 640, 480, 24, GLWin.fs);
-
-    /* wait for events*/ 
-    while (!done)
-    {
-        /* handle the events in the queue */
-        while (XPending(GLWin.dpy) > 0)
-        {
-            XNextEvent(GLWin.dpy, &event);
-            switch (event.type)
-            {
-                case Expose:
-	                if (event.xexpose.count != 0)
-	                    break;
-                    drawGLScene();
-         	        break;
-            case ConfigureNotify:
-            /* call resizeGLScene only if our window-size changed */
-                if ((event.xconfigure.width != GLWin.width) || 
-                    (event.xconfigure.height != GLWin.height))
-                {
-                    GLWin.width = event.xconfigure.width;
-                    GLWin.height = event.xconfigure.height;
-                        printf("Resize event\n");
-                    resizeGLScene(event.xconfigure.width,
-                        event.xconfigure.height);
-                }
-                break;
-            /* exit in case of a mouse button press */
-            case ButtonPress:     
-                done = True;
-                break;
-            case KeyPress:
-                if (XLookupKeysym(&event.xkey, 0) == XK_Escape)
-                {
-                    done = True;
-                }
-                if (XLookupKeysym(&event.xkey,0) == XK_F1)
-                {
-                    killGLWindow();
-                    GLWin.fs = !GLWin.fs;
-                    createGLWindow("NeHe's OpenGL Framework", 640, 480, 24, GLWin.fs);
-                }
-                break;
-            case ClientMessage:    
-                if (*XGetAtomName(GLWin.dpy, event.xclient.message_type) == 
-                    *"WM_PROTOCOLS")
-                {
-                    printf("Exiting sanely...\n");
-                    done = True;
-                }
-                break;
-            default:
-                break;
-            }
-        }
-        drawGLScene();
-    }
-    killGLWindow();
-    exit (0);
-}
Index: /orxonox/branches/bensch/orxonox_gui.c
===================================================================
--- /orxonox/branches/bensch/orxonox_gui.c	(revision 1809)
+++ /orxonox/branches/bensch/orxonox_gui.c	(revision 1809)
@@ -0,0 +1,72 @@
+#include "orxonox_gui.h"
+#include "orxonox_gui_video.h"
+int verbose;
+int close_window = 0;
+int app_drawed = 0;
+
+
+gint delete_event ( GtkWidget *widget, GdkEvent *event, gpointer data )
+{
+  return FALSE;
+}
+
+
+int main( int argc, char *argv[] )
+  {
+
+    GtkWidget *window;
+    GtkWidget *button;
+    GtkWidget *table;
+    GtkWidget *vbox_main;
+    GtkWidget *hbox_video_audio;
+    GtkWidget *hbox_view_exec;
+    GtkWidget *label;
+    GtkWidget *frame;
+    GtkWidget *separator;
+
+    gtk_init (&argc, &argv);
+    /* Main Window */
+    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+    gtk_window_set_title ( GTK_WINDOW (window), "orxonox");
+    g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL);
+    g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL);
+    gtk_container_set_border_width (GTK_CONTAINER (window), 5);
+    
+    /*  VBOX - MAIN */
+    vbox_main = gtk_vbox_new (FALSE, 0);
+    {
+      hbox_video_audio = gtk_hbox_new (FALSE, 0);
+      
+      {
+	gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_video_frame(hbox_video_audio), TRUE, TRUE, 0);	
+	
+	gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_audio_frame(hbox_video_audio), TRUE, TRUE, 0);	
+      }
+      gtk_box_pack_start (GTK_BOX (vbox_main), hbox_video_audio, TRUE, TRUE, 0);
+      /*
+      {
+
+	files_frame ( vbox_main ); 
+      }
+      {
+	hbox_view_exec = gtk_hbox_new ( FALSE,0);
+	{
+	  info ( hbox_view_exec );
+	}
+	{
+	  exec_frame (hbox_view_exec);
+
+	}
+	gtk_box_pack_start (GTK_BOX (vbox_main), hbox_view_exec, TRUE, TRUE, 0);
+	} 
+      */
+    }
+    gtk_container_add (GTK_CONTAINER (window), vbox_main);
+    
+    gtk_widget_show_all  (window);
+   
+    app_drawed =1;
+    gtk_main ();
+    
+    return(0);
+  }
Index: /orxonox/branches/bensch/orxonox_gui.h
===================================================================
--- /orxonox/branches/bensch/orxonox_gui.h	(revision 1809)
+++ /orxonox/branches/bensch/orxonox_gui.h	(revision 1809)
@@ -0,0 +1,10 @@
+
+#ifndef _ORXONOX_GUI_H
+#define _ORXONOX_GUI_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+
+#endif /* _ORXONOX_GUI_H */
Index: /orxonox/branches/bensch/orxonox_gui_audio.c
===================================================================
--- /orxonox/branches/bensch/orxonox_gui_audio.c	(revision 1809)
+++ /orxonox/branches/bensch/orxonox_gui_audio.c	(revision 1809)
@@ -0,0 +1,27 @@
+#include "orxonox_gui.h"
+
+GtkWidget *orxonox_gui_audio_frame (GtkWidget *box )
+{
+  GtkWidget *frame;
+  GtkWidget *button;
+  GtkWidget *separator;
+
+  frame = gtk_frame_new ( "Audio-Options:");
+  {
+    GtkWidget *orxonox_gui_audio_vbox;
+    GtkWidget *label;
+    orxonox_gui_audio_vbox = gtk_vbox_new (FALSE, 0);
+    {
+
+	button = gtk_check_button_new_with_label ("Enable Sound");
+	/*	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), orxonox_fullscreen);
+	 */
+	gtk_box_pack_start(GTK_BOX (orxonox_gui_audio_vbox), button, TRUE, TRUE, 0);
+    }
+    gtk_container_add(GTK_CONTAINER(frame), orxonox_gui_audio_vbox);
+  }
+
+  return frame;
+
+}
+
Index: /orxonox/branches/bensch/orxonox_gui_audio.h
===================================================================
--- /orxonox/branches/bensch/orxonox_gui_audio.h	(revision 1809)
+++ /orxonox/branches/bensch/orxonox_gui_audio.h	(revision 1809)
@@ -0,0 +1,6 @@
+#ifndef _ORXONOX_GUI_AUDIO_H
+#define _ORXONOX_GUI_AUDIO_H
+
+GtkWidget *orxonox_gui_audio_frame (GtkWidget *box );
+
+#endif /* _ORXONOX_GUI_AUDIO_H */
Index: /orxonox/branches/bensch/orxonox_gui_exec.c
===================================================================
--- /orxonox/branches/bensch/orxonox_gui_exec.c	(revision 1809)
+++ /orxonox/branches/bensch/orxonox_gui_exec.c	(revision 1809)
@@ -0,0 +1,27 @@
+#include "orxonox_gui.h"
+
+GtkWidget *orxonox_gui_video_frame (GtkWidget *box )
+{
+  GtkWidget *frame;
+  GtkWidget *button;
+  GtkWidget *separator;
+
+  frame = gtk_frame_new ( "Video-Options:");
+  {
+    GtkWidget *orxonox_gui_video_vbox;
+    GtkWidget *label;
+    orxonox_gui_video_vbox = gtk_vbox_new (FALSE, 0);
+    {
+
+	button = gtk_check_button_new_with_label ("Fullscreen-mode");
+	/*	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), orxonox_fullscreen);
+	 */
+	gtk_box_pack_start(GTK_BOX (orxonox_gui_video_vbox), button, TRUE, TRUE, 0);
+    }
+    gtk_container_add(GTK_CONTAINER(frame), orxonox_gui_video_vbox);
+  }
+
+  return frame;
+
+}
+
Index: /orxonox/branches/bensch/orxonox_gui_video.c
===================================================================
--- /orxonox/branches/bensch/orxonox_gui_video.c	(revision 1809)
+++ /orxonox/branches/bensch/orxonox_gui_video.c	(revision 1809)
@@ -0,0 +1,27 @@
+#include "orxonox_gui.h"
+
+GtkWidget *orxonox_gui_video_frame (GtkWidget *box )
+{
+  GtkWidget *frame;
+  GtkWidget *button;
+  GtkWidget *separator;
+
+  frame = gtk_frame_new ( "Video-Options:");
+  {
+    GtkWidget *orxonox_gui_video_vbox;
+    GtkWidget *label;
+    orxonox_gui_video_vbox = gtk_vbox_new (FALSE, 0);
+    {
+
+	button = gtk_check_button_new_with_label ("Fullscreen-mode");
+	/*	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), orxonox_fullscreen);
+	 */
+	gtk_box_pack_start(GTK_BOX (orxonox_gui_video_vbox), button, TRUE, TRUE, 0);
+    }
+    gtk_container_add(GTK_CONTAINER(frame), orxonox_gui_video_vbox);
+  }
+
+  return frame;
+
+}
+
Index: /orxonox/branches/bensch/orxonox_gui_video.h
===================================================================
--- /orxonox/branches/bensch/orxonox_gui_video.h	(revision 1809)
+++ /orxonox/branches/bensch/orxonox_gui_video.h	(revision 1809)
@@ -0,0 +1,6 @@
+#ifndef _ORXONOX_GUI_VIDEO_H
+#define _ORXONOX_GUI_VIDEO_H
+
+GtkWidget *orxonox_gui_video_frame (GtkWidget *box );
+
+#endif /* _ORXONOX_GUI_VIDEO_H */
