Importing EDE2 code to svn... NOTE: It doesn't compile! Stuff thats broken: edewm, eworkpanel, eiconman,

emenueditor
This commit is contained in:
Vedran Ljubovic
2006-08-20 18:43:09 +00:00
commit 65018f75b7
1004 changed files with 88271 additions and 0 deletions

38
edewm/tests/Makefile Normal file
View File

@@ -0,0 +1,38 @@
#
# $Id: Makefile 1696 2006-07-21 13:23:37Z karijes $
#
# Part of Equinox Desktop Environment (EDE).
# Copyright (c) 2000-2006 EDE Authors.
#
# This program is licenced under terms of the
# GNU General Public Licence version 2 or newer.
# See COPYING for details.
include ../../makeinclude
define make_test
ALL += $1
$1 : $1.cpp
echo Compiling $$<...
$(CXX) $(CXXFLAGS) $$< -o $$@ $(LIBS)
endef
# Note: $(eval...) must be used instead plain $(call...)
# since variables will not be expanded correctly
$(eval $(call make_test, basic_moveresize))
sound_test.o : sound_test.cpp
echo "Compiling $<..."
$(CXX) $(CXXFLAGS) -c $<
Sound.o : ../Sound.cpp
echo "Compiling $<..."
$(CXX) $(CXXFLAGS) -c $<
sound_test: sound_test.o Sound.o
$(CXX) sound_test.o Sound.o ../debug.o -o $@ $(LIBS)
all: $(ALL) sound_test
clean:
$(RM) $(ALL)
$(RM) *.o

View File

@@ -0,0 +1,95 @@
#include <efltk/Fl.h>
#include <efltk/Fl_Window.h>
#include <efltk/Fl_Box.h>
#include <efltk/Fl_Group.h>
#include <efltk/Fl_Button.h>
#include <stdio.h>
#define MRSIZE 2
void cb_move_left(Fl_Widget*, void* ww)
{
Fl_Window* win = (Fl_Window*) ww;
printf("move left(before) x: %i y: %i\n", win->x(), win->y());
win->position(win->x() - MRSIZE, win->y());
printf("move left(after) x: %i y: %i\n", win->x(), win->y());
}
void cb_move_right(Fl_Widget*, void* ww)
{
Fl_Window* win = (Fl_Window*) ww;
printf("move right(before) x: %i y: %i\n", win->x(), win->y());
win->position(win->x() + MRSIZE, win->y());
printf("move right(after) x: %i y: %i\n", win->x(), win->y());
}
void cb_move_up(Fl_Widget*, void* ww)
{
Fl_Window* win = (Fl_Window*) ww;
printf("move up(before) x: %i y: %i\n", win->x(), win->y());
win->position(win->x(), win->y() - MRSIZE);
printf("move up(after) x: %i y: %i\n", win->x(), win->y());
}
void cb_move_down(Fl_Widget*, void* ww)
{
Fl_Window* win = (Fl_Window*) ww;
printf("move down(before) x: %i y: %i\n", win->x(), win->y());
win->position(win->x(), win->y() + MRSIZE);
printf("move down(after) x: %i y: %i\n", win->x(), win->y());
}
int main (int argc, char **argv)
{
Fl_Window* win = new Fl_Window(300, 290, "Basic Window Operations");
win->shortcut(0xff1b);
Fl_Box* bbb = new Fl_Box(10, 10, 280, 50, "Below buttons should apply changes to this window");
bbb->align(FL_ALIGN_INSIDE|FL_ALIGN_WRAP);
Fl_Group* move_group = new Fl_Group(10, 85, 280, 75, "Move");
move_group->box(FL_ENGRAVED_BOX);
move_group->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
Fl_Button* move_up = new Fl_Button(130, 10, 25, 25, "^");
move_up->callback(cb_move_up, win);
//move_left->label_type(FL_SYMBOL_LABEL);
Fl_Button* move_down = new Fl_Button(130, 35, 25, 25, "v");
move_down->callback(cb_move_down, win);
//move_right->label_type(FL_SYMBOL_LABEL);
Fl_Button* move_left = new Fl_Button(105, 35, 25, 25, "<");
move_left->callback(cb_move_left, win);
//move_up->label_type(FL_SYMBOL_LABEL);
Fl_Button* move_right = new Fl_Button(155, 35, 25, 25, ">");
move_right->callback(cb_move_right, win);
//move_down->label_type(FL_SYMBOL_LABEL);
move_group->end();
Fl_Group* resize_group = new Fl_Group(10, 190, 280, 75, "Resize");
resize_group->box(FL_ENGRAVED_BOX);
resize_group->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
Fl_Button* resize_up = new Fl_Button(130, 10, 25, 25, "^");
//resize_left->label_type(FL_SYMBOL_LABEL);
Fl_Button* resize_down = new Fl_Button(130, 35, 25, 25, "v");
//resize_right->label_type(FL_SYMBOL_LABEL);
Fl_Button* resize_left = new Fl_Button(105, 35, 25, 25, "<");
//resize_up->label_type(FL_SYMBOL_LABEL);
Fl_Button* resize_right = new Fl_Button(155, 35, 25, 25, ">");
//resize_down->label_type(FL_SYMBOL_LABEL);
resize_group->end();
win->end();
win->show(argc, argv);
return Fl::run();
}

View File

@@ -0,0 +1,61 @@
# data file for the eFLTK User Interface Designer (eFLUID)
version 2.0003
header_name {.h}
code_name {.cpp}
gridx 5
gridy 5
snap 3
Function {} {open
} {
Fl_Window {} {
label {Basic Window Operations} open
xywh {361 170 300 290} resizable visible
} {
Fl_Box {} {
label {Below buttons should apply changes to this window}
xywh {10 10 280 50} align FL_ALIGN_INSIDE|FL_ALIGN_WRAP
}
Fl_Group {} {
label Move open
xywh {10 85 280 75} align FL_ALIGN_TOP|FL_ALIGN_LEFT box ENGRAVED_BOX
} {
Fl_Button {} {
label {@<}
xywh {130 10 25 25} label_type SYMBOL_LABEL
}
Fl_Button {} {
label {@<}
xywh {130 35 25 25} label_type SYMBOL_LABEL
}
Fl_Button {} {
label {@<}
xywh {105 35 25 25} label_type SYMBOL_LABEL
}
Fl_Button {} {
label {@>}
xywh {155 35 25 25} label_type SYMBOL_LABEL
}
}
Fl_Group {} {
label Resize open selected
xywh {10 190 280 75} align FL_ALIGN_TOP|FL_ALIGN_LEFT box ENGRAVED_BOX
} {
Fl_Button {} {
label {@<}
xywh {130 10 25 25} label_type SYMBOL_LABEL
}
Fl_Button {} {
label {@<}
xywh {130 35 25 25} label_type SYMBOL_LABEL
}
Fl_Button {} {
label {@<}
xywh {105 35 25 25} label_type SYMBOL_LABEL
}
Fl_Button {} {
label {@>}
xywh {155 35 25 25} label_type SYMBOL_LABEL
}
}
}
}

BIN
edewm/tests/demo.ogg Normal file

Binary file not shown.

View File

@@ -0,0 +1,14 @@
#include "../Sound.h"
#include <stdio.h>
int main()
{
puts("playing...\n");
SoundSystem ss;
ss.init();
ss.play("demo.ogg");
ss.shutdown();
puts("done\n");
return 0;
}

View File

@@ -0,0 +1,70 @@
#!/bin/sh
#
# $Id: testpositions.sh 1672 2006-07-11 14:13:16Z karijes $
#
#=
#= Usage: testpositions.sh [OPTIONS]
#=
#= Test position where will be placed newly created windows.
#=
#= Options:
#= -p [program] run program
#= -t [number] run [program] [number] times
#= -h show this help
#=
#= Example: testpositions.sh -e gvim -t 1000, which
#= will run 1000 instances of gvim.
#=
#= NOTE: if you try this with some heavier programs
#= (mozilla, ooffice, etc.) swapping and possible X crashes
#= are not due window manager. Just warned you !
#=
PROGRAM="xterm"
TIMES="10"
help()
{
sed -ne "/^#= /{ s/^#= //p }" $0
exit 0
}
main()
{
if [ $# -eq 0 ]; then
help
fi
argv=$@
for argv do
case $argv in
-h)
help
continue;;
-p)
unset PROGRAM
continue;;
-t)
unset TIMES
continue;;
esac
if [ "$PROGRAM" = "" ];then
PROGRAM=$argv
continue
elif [ "$TIMES" = "" ];then
TIMES=$argv
else
echo "Bad parameter '$argv'."
echo "Run $0 -h for options."
exit 0
fi
done
for((i = 1; i <= $TIMES; i++))
do
`$PROGRAM`&
done
}
main $@