X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Ftest6.C;fp=cinelerra-5.1%2Fguicast%2Ftest6.C;h=4ac6baea0d10190c3f4b9b3ae8dad4b7b9d2aee5;hb=6f73adad624d1ca2b397791784d0c778fcce8d39;hp=0000000000000000000000000000000000000000;hpb=ec59d6019f7fd79549dc6461469691203b23ac4c;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/test6.C b/cinelerra-5.1/guicast/test6.C new file mode 100644 index 00000000..4ac6baea --- /dev/null +++ b/cinelerra-5.1/guicast/test6.C @@ -0,0 +1,123 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "bcwindowbase.h" +#include "bcwindow.h" +#include "bcsignals.h" +#include "bccolors.h" +#include "clip.h" +#include "fonts.h" +#include "thread.h" +#include "vframe.h" + +/*c++ -g -I/mnt1/build5/cinelerra-5.1/guicast x.C \ + /mnt1/build5/cinelerra-5.1/guicast/x86_64/libguicast.a \ + -DHAVE_GL -DHAVE_XFT -I/usr/include/freetype2 -lGL -lX11 -lXext \ + -lXinerama -lXv -lpng -lfontconfig -lfreetype -lXft -pthread */ + +void wheel(VFrame *dst, float cx, float cy, float rad, int bg_color) +{ + int color_model = dst->get_color_model(); + int bpp = BC_CModels::calculate_pixelsize(color_model); + int bg_r = (bg_color>>16) & 0xff; + int bg_g = (bg_color>> 8) & 0xff; + int bg_b = (bg_color>> 0) & 0xff; + int w = dst->get_w(), h = dst->get_h(); + unsigned char **rows = dst->get_rows(); + for( int y=0; ylock_window("init"); + gui->resize_event(w, h); + gui->unlock_window(); + start(); + } + ~TestWindow() { delete gui; } + void run() { gui->run_window(); } + void close_window() { gui->close(0); } +}; + + +int main(int ac, char **av) +{ + BC_Signals signals; + signals.initialize(); + BC_WindowBase::init_resources(1.); + TestWindow test_window(100, 100, 256, 256); + test_window.join(); + return 0; +} +