/* * CINELERRA * Copyright (C) 2020 William Morrow * * 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 */ #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; }