[Cl-fltk-cvs] CVS cl-fltk/wrapper
dlah
dlah at common-lisp.net
Mon Feb 27 08:26:42 UTC 2006
Update of /project/cl-fltk/cvsroot/cl-fltk/wrapper
In directory clnet:/tmp/cvs-serv18184/wrapper
Added Files:
Makefile ask.cc ask.h button.cc button.h cl-fltk.h group.cc
group.h progressbar.cc progressbar.h run.cc run.h style.cc
style.h widget.cc widget.h window.cc window.h
Log Message:
Initial import
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/Makefile 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/Makefile 2006/02/27 08:26:42 1.1
CXX=g++
CXXFLAGS=`fltk-config --cflags` -O2 -Wall -fPIC -I. -D DEBUG
OSTYPE=$(shell uname)
ifeq ($(OSTYPE), Darwin)
#when using fltk-config --ldflags complains about missing file for -lsupc++
LIBS=`fltk-config --libs` -lpthread -framework Carbon -framework ApplicationServices
SHARED=-dynamiclib
else
#linux
LIBS=`fltk-config --ldstaticflags`
SHARED=-shared
endif
AR=ar cr
FLTK_WRAPPER_LIB=libcl-fltk.so
FLTK_WRAPPER_STATIC_LIB=libcl-fltk.a
TEST_LDFLAGS=-L. -lcl-fltk `fltk-config --libs`
SOURCES=\
run.cc\
window.cc\
button.cc\
group.cc\
widget.cc\
style.cc\
ask.cc\
progressbar.cc
TESTS=\
test/hello\
test/helloask\
test/progressbar
TEST_OBJS=$(TESTS:=.o)
all: $(FLTK_WRAPPER_LIB) $(FLTK_WRAPPER_STATIC_LIB)
test: $(TESTS) all
include $(SOURCES:.cc=.d)
$(TESTS): $(FLTK_WRAPPER_LIB) $(TEST_OBJS)
$(CXX) -o $@ $(@:=.o) $(CXXFLAGS) $(LIBS) $(TEST_LDFLAGS)
fltk-config --post $@
$(FLTK_WRAPPER_LIB): $(SOURCES:.cc=.o)
$(CXX) $(SHARED) $^ -o $@ $(LIBS)
$(FLTK_WRAPPER_STATIC_LIB): $(SOURCES:.cc=.o)
$(AR) $@ $^
clean:
rm -f *.o *.d cl-fltk.so
rm -f $(TESTS) $(TESTS:=.o)
%.d: %.cc
$(CXX) -MM $(CXXFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/ask.cc 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/ask.cc 2006/02/27 08:26:42 1.1
#include "ask.h"
int fl_ask_ask(char* message)
{
debug("%s:%s %s\n", __FILE__, __FUNCTION__, message);
return ask(message);
}
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/ask.h 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/ask.h 2006/02/27 08:26:42 1.1
#ifndef _CLFLTK_ASK_H_
#define _CLFLTK_ASK_H_
#include "cl-fltk.h"
#include <fltk/ask.h>
using namespace fltk;
extern "C" int fl_ask_ask(char*);
#endif
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/button.cc 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/button.cc 2006/02/27 08:26:42 1.1
#include "button.h"
Button* new_button(int x,int y,int w,int h,const char *text)
{
debug("%s:%s %d, %d, %d, %d, %s\n", __FILE__, __FUNCTION__, x, y, w, h, text);
return new Button(x, y, w, h, text);
}
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/button.h 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/button.h 2006/02/27 08:26:42 1.1
#ifndef _CLFLTK_BUTTON_H_
#define _CLFLTK_BUTTON_H_
#include "cl-fltk.h"
#include <fltk/Button.h>
using namespace fltk;
extern "C" Button* new_button(int x,int y,int w,int h,const char *text);
#endif
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/cl-fltk.h 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/cl-fltk.h 2006/02/27 08:26:42 1.1
#ifndef _CLFLTK_H_
#define _CLFLTK_H_
#ifdef DEBUG
#include <stdio.h>
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define debug(...)
#endif
#endif
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/group.cc 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/group.cc 2006/02/27 08:26:42 1.1
#include "group.h"
void fl_group_end(Group *group)
{
debug("%s:%s %x\n", __FILE__, __FUNCTION__, (unsigned int) group);
group->end();
}
void fl_group_begin(Group *group)
{
debug("%s:%s %x\n", __FILE__, __FUNCTION__, (unsigned int) group);
group->begin();
}
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/group.h 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/group.h 2006/02/27 08:26:42 1.1
#ifndef _CLFLTK_GROUP_CLASS_H_
#define _CLFLTK_GROUP_CLASS_H_
#include "cl-fltk.h"
#include <FL/Fl_Group.H>
using namespace fltk;
extern "C" void fl_group_end(Group *group);
extern "C" void fl_group_begin(Group *group);
#endif
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/progressbar.cc 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/progressbar.cc 2006/02/27 08:26:42 1.1
#include "progressbar.h"
#include <stdio.h>
ProgressBar* new_progressbar(int x, int y, int w, int h, const char *lbl = 0)
{
return new ProgressBar(x, y, w, h, lbl);
}
void fl_progressbar_range(ProgressBar* pb, double min, double max, double step = 1)
{
pb->range(min, max, step);
}
void fl_progressbar_step(ProgressBar* pb, double step)
{
pb->step(step);
}
double fl_progressbar_get_minimum(ProgressBar* pb)
{
return pb->minimum();
}
double fl_progressbar_get_maximum(ProgressBar* pb)
{
return pb->maximum();
}
void fl_progressbar_minimum(ProgressBar* pb, double nm)
{
pb->minimum(nm);
}
void fl_progressbar_maximum(ProgressBar* pb, double nm)
{
pb->maximum(nm);
}
double fl_progressbar_get_position(ProgressBar* pb)
{
return pb->position();
}
double fl_progressbar_get_step(ProgressBar* pb)
{
return pb->step();
}
void fl_progressbar_position(ProgressBar* pb, double pos)
{
pb->position(pos);
}
void fl_progressbar_showtext(ProgressBar* pb, bool st)
{
pb->showtext(st);
}
bool fl_progressbar_get_showtext(ProgressBar* pb)
{
return pb->showtext();
}
void fl_progressbar_text_color(ProgressBar* pb, Color col)
{
pb->text_color(col);
}
Color fl_progressbar_get_text_color(ProgressBar* pb)
{
return pb->text_color();
}
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/progressbar.h 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/progressbar.h 2006/02/27 08:26:42 1.1
#ifndef _CLFLTK_PROGRESSBAR_H_
#define _CLFLTK_PROGRESSBAR_H_
#include "fltk/ProgressBar.h"
using namespace fltk;
extern "C" {
ProgressBar* new_progressbar(int x, int y, int w, int h, const char *lbl);
void fl_progressbar_range(ProgressBar* pb, double min, double max, double step);
void fl_progressbar_step(ProgressBar* pb, double step);
double fl_progressbar_get_minimum(ProgressBar* pb);
double fl_progressbar_get_maximum(ProgressBar* pb);
void fl_progressbar_minimum(ProgressBar* pb, double nm);
void fl_progressbar_maximum(ProgressBar* pb, double nm);
double fl_progressbar_get_position(ProgressBar* pb);
double fl_progressbar_get_step(ProgressBar* pb);
void fl_progressbar_position(ProgressBar* pb, double pos);
void fl_progressbar_showtext(ProgressBar* pb, bool st);
bool fl_progressbar_get_showtext(ProgressBar* pb);
void fl_progressbar_text_color(ProgressBar* pb, Color col);
Color fl_progressbar_get_text_color(ProgressBar* pb);
}
#endif
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/run.cc 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/run.cc 2006/02/27 08:26:42 1.1
#include "run.h"
void callback(Widget *w, Callback* c, void* p)
{
debug("%s:%s: %x, %x, %x\n", __FILE__, __FUNCTION__, (unsigned int)w, (unsigned int)c, (unsigned int)p);
w->callback(c,p);
}
void fl_run()
{
debug("%s:%s\n", __FILE__, __FUNCTION__);
run();
}
void fl_run_add_timeout(float t,TimeoutHandler* th, void* v=0)
{
debug("%s:%s: %f, %x, %x\n", __FILE__, __FUNCTION__, t, (unsigned int)th, (unsigned int)v);
add_timeout(t, *th, v);
}
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/run.h 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/run.h 2006/02/27 08:26:42 1.1
#ifndef _CLFLTK_FL_H_
#define _CLFLTK_FL_H_
#include "cl-fltk.h"
#include <fltk/run.h>
using namespace fltk;
#include <fltk/Widget.h>
extern "C" {
void callback(Widget* w, Callback* c, void* p) ;
void fl_run();
void fl_run_add_timeout(float t, TimeoutHandler*, void* v);
}
#endif
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/style.cc 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/style.cc 2006/02/27 08:26:42 1.1
#include "style.h"
Box *__UP_BOX = UP_BOX;
Box *__DOWN_BOX = DOWN_BOX;
Box *__THIN_UP_BOX = THIN_UP_BOX;
Box *__THIN_DOWN_BOX = THIN_DOWN_BOX;
Box *__ENGRAVED_BOX = ENGRAVED_BOX;
Box *__EMBOSSED_BOX = EMBOSSED_BOX;
Box *__BORDER_BOX = BORDER_BOX;
Box *__FLAT_BOX = FLAT_BOX;
Box *__HIGHLIGHT_UP_BOX = HIGHLIGHT_UP_BOX;
Box *__HIGHLIGHT_DOWN_BOX = HIGHLIGHT_DOWN_BOX;
Box *__ROUND_UP_BOX = ROUND_UP_BOX;
Box *__ROUND_DOWN_BOX = ROUND_DOWN_BOX;
Box *__DIAMOND_UP_BOX = DIAMOND_UP_BOX;
Box *__DIAMOND_DOWN_BOX = DIAMOND_DOWN_BOX;
Box *__NO_BOX = NO_BOX;
Box *__SHADOW_BOX = SHADOW_BOX;
Box *__ROUNDED_BOX = ROUNDED_BOX;
Box *__RSHADOW_BOX = RSHADOW_BOX;
Box *__RFLAT_BOX = RFLAT_BOX;
Box *__OVAL_BOX = OVAL_BOX;
Box *__OSHADOW_BOX = OSHADOW_BOX;
Box *__OFLAT_BOX = OFLAT_BOX;
Box *__BORDER_FRAME = BORDER_FRAME;
Box *__DOTTED_FRAME = DOTTED_FRAME;
Box *__PLASTIC_UP_BOX = PLASTIC_UP_BOX;
Box *__PLASTIC_DOWN_BOX = PLASTIC_DOWN_BOX;
Font *__HELVETICA = HELVETICA;
Font *__HELVETICA_BOLD = HELVETICA_BOLD;
Font *__HELVETICA_ITALIC = HELVETICA_ITALIC;
Font *__HELVETICA_BOLD_ITALIC = HELVETICA_BOLD_ITALIC;
Font *__COURIER = COURIER;
Font *__COURIER_BOLD = COURIER_BOLD;
Font *__COURIER_ITALIC = COURIER_ITALIC;
Font *__COURIER_BOLD_ITALIC = COURIER_BOLD_ITALIC;
Font *__TIMES = TIMES;
Font *__TIMES_BOLD = TIMES_BOLD;
Font *__TIMES_ITALIC = TIMES_ITALIC;
Font *__TIMES_BOLD_ITALIC = TIMES_BOLD_ITALIC;
Font *__SYMBOL_FONT = SYMBOL_FONT;
Font *__SCREEN_FONT = SCREEN_FONT;
Font *__SCREEN_BOLD_FONT = SCREEN_BOLD_FONT;
Font *__ZAPF_DINGBATS = ZAPF_DINGBATS;
LabelType *__NO_LABEL = NO_LABEL;
LabelType *__NORMAL_LABEL = NORMAL_LABEL;
LabelType *__SYMBOL_LABEL = SYMBOL_LABEL; // same as NORMAL_LABEL
LabelType *__SHADOW_LABEL = SHADOW_LABEL;
LabelType *__ENGRAVED_LABEL = ENGRAVED_LABEL;
LabelType *__EMBOSSED_LABEL = EMBOSSED_LABEL;
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/style.h 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/style.h 2006/02/27 08:26:42 1.1
#ifndef _CLFLTK_STYLE_H_
#define _CLFLTK_STYLE_H_
#include "cl-fltk.h"
#include <fltk/Widget.h>
using namespace fltk;
extern "C" Box *__UP_BOX;
extern "C" Box *__UP_BOX;
extern "C" Box *__DOWN_BOX;
extern "C" Box *__THIN_UP_BOX;
extern "C" Box *__THIN_DOWN_BOX;
extern "C" Box *__ENGRAVED_BOX;
extern "C" Box *__EMBOSSED_BOX;
extern "C" Box *__BORDER_BOX;
extern "C" Box *__FLAT_BOX;
extern "C" Box *__HIGHLIGHT_UP_BOX;
extern "C" Box *__HIGHLIGHT_DOWN_BOX;
extern "C" Box *__ROUND_UP_BOX;
extern "C" Box *__ROUND_DOWN_BOX;
extern "C" Box *__DIAMOND_UP_BOX;
extern "C" Box *__DIAMOND_DOWN_BOX;
extern "C" Box *__NO_BOX;
extern "C" Box *__SHADOW_BOX;
extern "C" Box *__ROUNDED_BOX;
extern "C" Box *__RSHADOW_BOX;
extern "C" Box *__RFLAT_BOX;
extern "C" Box *__OVAL_BOX;
extern "C" Box *__OSHADOW_BOX;
extern "C" Box *__OFLAT_BOX;
extern "C" Box *__BORDER_FRAME;
extern "C" Box *__DOTTED_FRAME;
extern "C" Box *__PLASTIC_UP_BOX;
extern "C" Box *__PLASTIC_DOWN_BOX;
extern "C" Font *__HELVETICA;
extern "C" Font *__HELVETICA_BOLD;
extern "C" Font *__HELVETICA_ITALIC;
extern "C" Font *__HELVETICA_BOLD_ITALIC;
extern "C" Font *__COURIER;
extern "C" Font *__COURIER_BOLD;
extern "C" Font *__COURIER_ITALIC;
extern "C" Font *__COURIER_BOLD_ITALIC;
extern "C" Font *__TIMES;
extern "C" Font *__TIMES_BOLD;
extern "C" Font *__TIMES_ITALIC;
extern "C" Font *__TIMES_BOLD_ITALIC;
extern "C" Font *__SYMBOL_FONT;
extern "C" Font *__SCREEN_FONT;
extern "C" Font *__SCREEN_BOLD_FONT;
extern "C" Font *__ZAPF_DINGBATS;
extern "C" LabelType *__NO_LABEL;
extern "C" LabelType *__NORMAL_LABEL;
extern "C" LabelType *__SYMBOL_LABEL;
extern "C" LabelType *__SHADOW_LABEL;
extern "C" LabelType *__ENGRAVED_LABEL;
extern "C" LabelType *__EMBOSSED_LABEL;
#endif
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/widget.cc 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/widget.cc 2006/02/27 08:26:42 1.1
#include "widget.h"
Widget* new_widget(int x, int y, int width, int height, const char* text)
{
debug("%s:%s %d, %d, %d, %d, %s\n", __FILE__, __FUNCTION__, x, y, width, height, text);
return new Widget(x, y, width, height, text);
}
void fl_widget_box(Widget* widget, Box* box)
{
debug("%s:%s %x, %x\n", __FILE__, __FUNCTION__, (unsigned int)widget, (unsigned int)box);
widget->box(box);
}
void fl_widget_labelfont(Widget* widget, Font* labelfont)
[64 lines skipped]
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/widget.h 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/widget.h 2006/02/27 08:26:42 1.1
[91 lines skipped]
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/window.cc 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/window.cc 2006/02/27 08:26:42 1.1
[104 lines skipped]
--- /project/cl-fltk/cvsroot/cl-fltk/wrapper/window.h 2006/02/27 08:26:42 NONE
+++ /project/cl-fltk/cvsroot/cl-fltk/wrapper/window.h 2006/02/27 08:26:42 1.1
[118 lines skipped]
More information about the Cl-fltk-cvs
mailing list