Commit a7324bb0 authored by Aaron M. Ucko's avatar Aaron M. Ucko

Load /tmp/.../fltk1.1-1.1.7 into

branches/upstream/current.
parent 561e57f7
config.cache
config.h
config.log
config.status
configure
fltk-config
fltk.list
makeinclude
*.bck
This diff is collapsed.
This diff is collapsed.
......@@ -9,9 +9,11 @@
SET(FLTK_SOURCE_DIR "@FLTK_SOURCE_DIR@")
# The FLTK include file directories.
SET(FLUID_COMMAND "@FLTK_FLUID_COMMAND@")
SET(FLTK_EXECUTABLE_DIRS "@FLTK_EXECUTABLE_DIRS@")
SET(FLTK_LIBRARY_DIRS "@FLTK_LIBRARY_DIRS@")
SET(FLTK_LIBRARIES "fltk_images;fltk;fltk_gl;fltk_forms")
SET(FLTK_LIBRARIES "@FLTK_LIBRARIES@")
SET(FLTK_INCLUDE_DIRS "@FLTK_INCLUDE_DIRS@")
# The C and C++ flags added by FLTK to the cmake-configured flags.
SET(FLTK_REQUIRED_C_FLAGS "@FLTK_REQUIRED_C_FLAGS@")
......@@ -22,11 +24,14 @@ SET(FLTK_VERSION_MAJOR "@FLTK_VERSION_MAJOR@")
SET(FLTK_VERSION_MINOR "@FLTK_VERSION_MINOR@")
SET(FLTK_VERSION_PATCH "@FLTK_VERSION_PATCH@")
# The location of the UseFLTK.cmake file.
SET(FLTK_USE_FILE "@FLTK_USE_FILE@")
# The build settings file.
# Is FLTK using shared libraries?
SET(FLTK_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
SET(FLTK_BUILD_SETTINGS_FILE "@FLTK_BUILD_SETTINGS_FILE@")
# Whether FLTK was built with shared libraries.
SET(FLTK_BUILD_SHARED "@BUILD_SHARED_LIBS@")
# The location of the UseFLTK.cmake file.
SET(FLTK11_USE_FILE "@FLTK_USE_FILE@")
# The ExodusII library dependencies.
IF(NOT FLTK_NO_LIBRARY_DEPENDS)
INCLUDE("@FLTK_LIBRARY_DEPENDS_FILE@")
ENDIF(NOT FLTK_NO_LIBRARY_DEPENDS)
IF(NOT FLTK11_FOUND)
MESSAGE(FATAL_ERROR "Something went wrong. You are including FLTKUse.cmake but FLTK was not found")
ENDIF(NOT FLTK11_FOUND)
# -------------------------------------------------------------
# This macro automates wrapping of Fluid files
# Specify the output variable name and the list of sources
# The output variable can be directly added to the target.
#
# For example:
# FLTK_WRAP_FLUID(CubeView_SRCS CubeViewUI.fl)
# ADD_EXECUTABLE(CubeView CubeMain.cxx CubeView.cxx CubeView.h ${CubeView_SRCS})
# -------------------------------------------------------------
MACRO(FLTK_WRAP_FLUID VARIABLE)
FOREACH(src ${ARGN})
IF("${src}" MATCHES ".fl$")
GET_FILENAME_COMPONENT(fname ${src} NAME_WE)
GET_FILENAME_COMPONENT(fpath ${src} PATH)
GET_SOURCE_FILE_PROPERTY(gen ${src} GENERATED)
IF(gen)
SET(fluid_name "${src}")
ELSE(gen)
SET(fluid_name "${CMAKE_CURRENT_SOURCE_DIR}/${fpath}/${fname}.fl")
IF(NOT EXISTS "${fluid_name}")
SET(fluid_name "${CMAKE_CURRENT_BINARY_DIR}/${fpath}/${fname}.fl")
IF(NOT EXISTS "${fluid_name}")
SET(fluid_name "${fpath}/${fname}.fl")
IF(NOT EXISTS "${fluid_name}")
MESSAGE(SEND_ERROR "Cannot find Fluid source file: ${fpath}/${fname}.fl")
ENDIF(NOT EXISTS "${fluid_name}")
ENDIF(NOT EXISTS "${fluid_name}")
ENDIF(NOT EXISTS "${fluid_name}")
ENDIF(gen)
SET(cxx_name "${CMAKE_CURRENT_BINARY_DIR}/${fname}.cxx")
SET(h_name "${CMAKE_CURRENT_BINARY_DIR}/${fname}.h")
SET(${VARIABLE} "${${VARIABLE}};${cxx_name}")
ADD_CUSTOM_COMMAND(
OUTPUT ${cxx_name}
DEPENDS "${fluid_name}" "${FLUID_COMMAND}"
COMMAND ${FLUID_COMMAND}
ARGS -c ${fluid_name})
ADD_CUSTOM_COMMAND(
OUTPUT ${h_name}
DEPENDS "${fluid_name}" "${FLUID_COMMAND}"
COMMAND ${FLUID_COMMAND}
ARGS -c ${fluid_name})
ENDIF("${src}" MATCHES ".fl$")
ENDFOREACH(src)
ENDMACRO(FLTK_WRAP_FLUID VARIABLE)
# Make FLTK easier to use
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIRS})
LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS})
# Load the compiler settings used for FLTK.
IF(FLTK_BUILD_SETTINGS_FILE)
INCLUDE(CMakeImportBuildSettings)
CMAKE_IMPORT_BUILD_SETTINGS(${FLTK_BUILD_SETTINGS_FILE})
ENDIF(FLTK_BUILD_SETTINGS_FILE)
# Add compiler flags needed to use FLTK.
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLTK_REQUIRED_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLTK_REQUIRED_CXX_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLTK_REQUIRED_EXE_LINKER_FLAGS}")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FLTK_REQUIRED_SHARED_LINKER_FLAGS}")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${FLTK_REQUIRED_MODULE_LINKER_FLAGS}")
#ifdef HAVE_LIBZ
#include <zlib.h>
int main()
{
unsigned long compressedSize = 0;
unsigned char cd[100];
const unsigned char ud[100] = "";
unsigned long uncompressedSize = 0;
// Call zlib's compress function.
if(compress(cd, &compressedSize, ud, uncompressedSize) != Z_OK)
{
return 0;
}
return 1;
}
#endif
#ifdef HAVE_LIBJPEG
#include <stdio.h>
#include <jpeglib.h>
int main()
{
struct jpeg_decompress_struct cinfo;
jpeg_create_decompress(&cinfo);
jpeg_read_header(&cinfo, TRUE);
return 1;
}
#endif
#ifdef HAVE_LIBPNG
#include <png.h>
int main()
{
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
NULL, NULL);
png_infop info_ptr = png_create_info_struct(png_ptr);
png_set_sig_bytes(png_ptr, 8);
png_read_info(png_ptr, info_ptr);
return 0;
}
#endif
#ifdef HAVE_PNG_H
#include <png.h>
int main() { retunr 0;}
#endif
#ifdef HAVE_PNG_GET_VALID
#include <png.h>
int main()
{
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
NULL, NULL);
png_infop info_ptr = png_create_info_struct(png_ptr);
png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS);
return 0;
}
#endif
#ifdef HAVE_PNG_SET_TRNS_TO_ALPHA
#include <png.h>
int main()
{
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
NULL, NULL);
png_set_tRNS_to_alpha(png_ptr);
return 0;
}
#endif
#ifdef HAVE_LIBZ
#include <zlib.h>
int main()
{
unsigned long compressedSize = 0;
unsigned char cd[100];
const unsigned char ud[100] = "";
unsigned long uncompressedSize = 0;
// Call zlib's compress function.
if(compress(cd, &compressedSize, ud, uncompressedSize) != Z_OK)
{
return 0;
}
return 1;
}
#endif
#ifdef HAVE_LIBJPEG
#include <stdio.h>
#include <jpeglib.h>
int main()
{
struct jpeg_decompress_struct cinfo;
jpeg_create_decompress(&cinfo);
jpeg_read_header(&cinfo, TRUE);
return 1;
}
#endif
#ifdef HAVE_LIBPNG
#include <png.h>
int main()
{
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
NULL, NULL);
png_infop info_ptr = png_create_info_struct(png_ptr);
png_set_sig_bytes(png_ptr, 8);
png_read_info(png_ptr, info_ptr);
return 0;
}
#endif
#ifdef HAVE_PNG_H
#include <png.h>
int main() { retunr 0;}
#endif
#ifdef HAVE_PNG_GET_VALID
#include <png.h>
int main()
{
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
NULL, NULL);
png_infop info_ptr = png_create_info_struct(png_ptr);
png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS);
return 0;
}
#endif
#ifdef HAVE_PNG_SET_TRNS_TO_ALPHA
#include <png.h>
int main()
{
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
NULL, NULL);
png_set_tRNS_to_alpha(png_ptr);
return 0;
}
#endif
This diff is collapsed.
/*
* FluidPanel.h - 'Fluid Panel' Drop-In Preferences
*
* Copyright 1995-2002 Metrowerks Inc. All rights reserved.
*
*/
#ifndef _H_FluidPanel
#define _H_FluidPanel
#ifndef __TYPES__
# include <Types.h>
#endif
#pragma options align=mac68k
/* this is the name of the panel, as shown in the Finder */
#define kFluidPanelName "Fluid Panel"
/*
* AppleScript dictionary info. As a rule of thumb, dropin panels should use the
* same terminology and numeric code in their 'aete' that the IDE uses if there
* is already a similar item in the IDE's 'aete'. That is the case here, so we
* merely duplicate applicable 68K Project and 68K Linker user terms below.
*/
enum {
/* Symbolic Name Code AETE Terminology */
class_Fluid = 'Flid',
prefsPR_ProjectType = 'PR01', /* Project Type */
prefsPR_FileName = 'PR02', /* File Name */
prefsLN_GenerateSymFile = 'LN02', /* Generate SYM File */
/* enumeration for project type */
enumeration_ProjectType = 'PRPT',
enum_Project_Application = 'PRPA', /* application */
enum_Project_Library = 'PRPL', /* library */
enum_Project_SharedLibrary = 'PRPS', /* shared library */
enum_Project_CodeResource = 'PRPC', /* code resource */
enum_Project_MPWTool = 'PRPM' /* MPW tool */
};
/* internal codes for project type */
enum {
kProjTypeApplication,
kProjTypeLibrary,
kProjTypeSharedLib,
kProjTypeCodeResource,
kProjTypeMPWTool
};
/* This is the structure that is manipulated by the panel. The Fluid
* compiler & linker both "know" about this structure.
*/
typedef struct FluidPref {
short version; /* version # of prefs data */
short projtype; /* project type */
char outfile[32]; /* output file name */
Boolean linksym; /* generate SYM file */
short dotx; /* position of dot (!) */
short doty;
} FluidPref, **FluidPrefHandle;
#pragma options align=reset
#endif /* _H_FluidPanel */
/*
* Fluid Tool.c - Fluid Tool (68K and PowerPC) for CodeWarrior IDE
*
* Based on Metrowerks Sample Plugin:
* Copyright 1995-2002 Metrowerks Inc. All rights reserved.
*
*/
/* standard headers */
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <stat.h>
#include <errno.h>
/* system headers */
#if macintosh
#include <Files.h>
#include <Strings.h>
#endif
/* compiler headers */
#include "DropInCompilerLinker.h"
#include "CompilerMapping.h"
#include "CWPluginErrors.h"
/* project headers */
#include "../commonFiles/FluidPanel.h"
/* prototypes of local functions */
static CWResult Compile(CWPluginContext context);
static CWResult ProcessFile(CWPluginContext context, const char* text, Boolean include);
static CWResult ParseText(CWPluginContext context, const char* text);
static CWResult IncludeFile(CWPluginContext context, const char* inclname,
Boolean fullSearch);
int IsNewlineChar(char c);
/* local variables */
static long linecount;
#if CW_USE_PRAGMA_EXPORT
#pragma export on
#endif
/**
* inform the API about our capabilities by returning the DropInFlags structure
*/
CWPLUGIN_ENTRY(CWPlugin_GetDropInFlags)(const DropInFlags** flags, long* flagsSize)
{
static const DropInFlags sFlags = {
kCurrentDropInFlagsVersion,
CWDROPINCOMPILERTYPE,
DROPINCOMPILERLINKERAPIVERSION_7,
/*kCanpreprocess | */ kCompAllowDupFileNames,
Lang_MISC,
DROPINCOMPILERLINKERAPIVERSION
};
*flags = &sFlags;
*flagsSize = sizeof(sFlags);
return cwNoErr;
}