/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */

/*
 * tkIntPlatDecls.h --
 *
 * This file contains the declarations for all platform dependent
 * unsupported functions that are exported by the Tk library. These
 * interfaces are not guaranteed to remain the same between versions.
 * Use at your own risk.
 *
 * This file was adapted from tkIntPlatDecls.h of the Tk library distribution.
 *
 * Copyright (c) 1998-1999 by Scriptics Corporation.
 *
 *   This software is copyrighted by the Regents of the University of
 *   California, Sun Microsystems, Inc., and other parties.  The following
 *   terms apply to all files associated with the software unless
 *   explicitly disclaimed in individual files.
 * 
 *   The authors hereby grant permission to use, copy, modify, distribute,
 *   and license this software and its documentation for any purpose,
 *   provided that existing copyright notices are retained in all copies
 *   and that this notice is included verbatim in any distributions. No
 *   written agreement, license, or royalty fee is required for any of the
 *   authorized uses.  Modifications to this software may be copyrighted by
 *   their authors and need not follow the licensing terms described here,
 *   provided that the new terms are clearly indicated on the first page of
 *   each file where they apply.
 * 
 *   IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
 *   FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
 *   ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
 *   DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
 *   POSSIBILITY OF SUCH DAMAGE.
 * 
 *   THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
 *   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
 *   NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND
 *   THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
 *   MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 *
 *   GOVERNMENT USE: If you are acquiring this software on behalf of the
 *   U.S. government, the Government shall have only "Restricted Rights" in
 *   the software and related documentation as defined in the Federal
 *   Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
 *   are acquiring the software on behalf of the Department of Defense, the
 *   software shall be classified as "Commercial Computer Software" and the
 *   Government shall have only "Restricted Rights" as defined in Clause
 *   252.227-7013 (b) (3) of DFARs.  Notwithstanding the foregoing, the
 *   authors grant the U.S. Government and others acting in its behalf
 *   permission to use and distribute the software in accordance with the
 *   terms specified in this license.
 *
 * Copyright 2015 George A. Howlett. All rights reserved.  
 *
 *   Redistribution and use in source and binary forms, with or without
 *   modification, are permitted provided that the following conditions are
 *   met:
 *
 *   1) Redistributions of source code must retain the above copyright
 *      notice, this list of conditions and the following disclaimer.
 *   2) Redistributions in binary form must reproduce the above copyright
 *      notice, this list of conditions and the following disclaimer in the
 *      documentation and/or other materials provided with the
 *      distribution.
 *   3) Neither the name of the authors nor the names of its contributors
 *      may be used to endorse or promote products derived from this
 *      software without specific prior written permission.
 *   4) Products derived from this software may not be called "BLT" nor may
 *      "BLT" appear in their names without specific prior written
 *      permission from the author.
 *
 *   THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED
 *   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 *   DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 *   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 *   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 *   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 *   BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 *   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

#ifndef _TKINTPLATDECLS
#define _TKINTPLATDECLS

#ifdef BUILD_tk
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT
#endif

/*
 * WARNING: This file is automatically generated by the tools/genStubs.tcl
 * script.  Any modifications to the function declarations below should be made
 * in the generic/tkInt.decls script.
 */

/* !BEGIN!: Do not edit below this line. */

/*
 * Exported function declarations:
 */

#ifdef __WIN32__
/* 16 */
extern HDC TkWinGetDrawableDC(Display *display, Drawable drawable, 
        TkWinDCState *state);
/* 22 */
extern void TkWinReleaseDrawableDC(Drawable drawable, HDC hdc, 
        TkWinDCState *state);
#endif /* __WIN32__ */

typedef struct TkIntPlatStubs {
    int magic;
    struct TkIntPlatStubHooks *hooks;

    void *hook0;
    void *hook1;
    void *hook2;
    void *hook3;
    void *hook4;
    void *hook5;
    void *hook6;
    void *hook7;
    void *hook8;
    void *hook9;
    void *hook10;
    void *hook11;
    void *hook12;
    void *hook13;
    void *hook14;
    void *hook15;
#ifdef WIN32
    HDC (*tkWinGetDrawableDC)(Display *display, Drawable drawable, 
        TkWinDCState *state);   /* 16 */
#else 
    void *hook16;
#endif
    void *hook17;
    void *hook18;
    void *hook19;
    void *hook20;
    void *hook21;
#ifdef WIN32
    void (*tkWinReleaseDrawableDC)(Drawable drawable, HDC hdc, 
        TkWinDCState *state);   /* 22 */
#else
    void *hook22;
#endif
    void *hook23;
    void *hook24;
    void *hook25;
    void *hook26;
    void *hook27;
    void *hook28;
    void *hook29;
    void *hook30;
    void *hook31;
    void *hook32;
    void *hook33;
    void *hook34;
    void *hook35;
    void *hook36;
    void *hook37;
    void *hook38;
    void *hook39;
    void *hook40;
    void *hook41;
    void *hook42;
    void *hook43;
    void *hook44;
    void *hook45;
    void *hook46;
    void *hook47;
    void *hook48;
    void *hook49;
    void *hook50;
    void *hook51;
    void *hook52;
    void *hook53;
    void *hook54;
    void *hook55;
    void *hook56;
    void *hook57;
    void *hook58;
    void *hook59;
    void *hook60;
    void *hook61;
    void *hook62;
    void *hook63;
    void *hook64;
    void *hook65;
    void *hook66;
} TkIntPlatStubs;

#ifdef __cplusplus
extern "C" {
#endif
extern TkIntPlatStubs *tkIntPlatStubsPtr;
#ifdef __cplusplus
}
#endif

#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)

/*
 * Inline function declarations:
 */
#ifdef __WIN32__
#ifndef TkWinGetDrawableDC
#define TkWinGetDrawableDC \
        (tkIntPlatStubsPtr->tkWinGetDrawableDC) /* 16 */
#endif
#ifndef TkWinReleaseDrawableDC
#define TkWinReleaseDrawableDC \
        (tkIntPlatStubsPtr->tkWinReleaseDrawableDC) /* 22 */
#endif
#endif /* __WIN32__ */

#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */

/* !END!: Do not edit above this line. */

#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT

#endif /* _TKINTPLATDECLS */
