⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sma_swim.h

📁 sharp的arm920t 7A400的评估板附带光盘Sharp KEVLH7A400 v0.3b Welcome to the SHARP KEV7A400 Evaluation board
💻 H
字号:
/**********************************************************************
 * $Workfile:   SMA_swim.h  $
 * $Revision:   1.1  $
 * $Author:   WellsK  $
 * $Date:   Aug 30 2002 13:18:12  $
 *
 * Project: Simple Windowing Interface Manager (SWIM)
 *
 * Description:
 *  This package provides a simple windows manager that provides the
 *  following functions:
 *     Windows initialization and validity checks
 *        Must be in physical display space
 *     Color support for background, primary pen, and fill
 *     Simple graphics primatives (pixels, lines, boxes)
 *     Window deallocation
 * 
 *  A maximum number of windows, defined by WINDOWSMAX can be created.
 *  A window can be reclaimed after it has been initialized.
 *
 * Revision History:
 * $Log:   //smaicnt2/pvcs/VM/CHIPS/archives/SOC/Source/Graphics/SWIM/SMA_swim.h-arc  $
 * 
 *    Rev 1.1   Aug 30 2002 13:18:12   WellsK
 * Corrected C/C++ wrapper.
 * 
 *    Rev 1.0   Aug 27 2002 08:36:00   WellsK
 * Initial revision.
 * 
 *
 * SHARP MICROELECTRONICS OF THE AMERICAS MAKES NO REPRESENTATION
 * OR WARRANTIES WITH RESPECT TO THE PERFORMANCE OF THIS SOFTWARE,
 * AND SPECIFICALLY DISCLAIMS ANY RESPONSIBILITY FOR ANY DAMAGES, 
 * SPECIAL OR CONSEQUENTIAL, CONNECTED WITH THE USE OF THIS SOFTWARE.
 *
 * SHARP MICROELECTRONICS OF THE AMERICAS PROVIDES THIS SOFTWARE SOLELY 
 * FOR THE PURPOSE OF SOFTWARE DEVELOPMENT INCORPORATING THE USE OF A 
 * SHARP MICROCONTROLLER OR SYSTEM-ON-CHIP PRODUCT. USE OF THIS SOURCE
 * FILE IMPLIES ACCEPTANCE OF THESE CONDITIONS.
 *
 * COPYRIGHT (C) 2002 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
 *     CAMAS, WA
 *********************************************************************/
#ifndef SWIM_H
#define SWIM_H

#ifdef __cplusplus
#if __cplusplus
extern "C"
{
#endif // __cplusplus
#endif // __cplusplus

#include "SMA_types.h"
#include "SMA_fonts.h"
#include "SMA_colors.h"

//**********************************************************************
// Default configuration values
//**********************************************************************
// Maximum number of windows
#define WINDOWSMAX 12

//**********************************************************************
// Window information structure
//**********************************************************************
// This structure is used to store information about a specific window
typedef struct
{
    INT_32 xpsize;     // Physical (absolute) horizontal screen size
    INT_32 ypsize;     // Physical (absolute) vertical screen size
    INT_32 xpmin;      // Physical left edge of window
    INT_32 ypmin;      // Physical top edge of window
    INT_32 xpmax;      // Physical right edge of window
    INT_32 ypmax;      // Physical bottom edge of window
    INT_32 bdsize;     // Size of window frame in pixels
    INT_32 xvsize;     // Virtual horizontal window size
    INT_32 yvsize;     // Virtual vertical window size
    INT_32 xpvmin;     // Physical left edge of draw window
    INT_32 ypvmin;     // Physical top edge of draw window
    INT_32 xpvmax;     // Physical right edge of draw window
    INT_32 ypvmax;     // Physical bottom edge of draw window
    INT_32 xvpos;      // Next virtual 'x' position of output
    INT_32 yvpos;      // Next virtual 'y' position of output
    color_type pen;    // Pen/text color
    color_type bkg;    // Window/text background color
    color_type fill;   // Fill/border color
    font_type *font;   // Selected font structure
    color_type *fb;    // Frame buffer address for the physical display
    INT_32 winused;    // Window used flag
} swim_window_type;

//**********************************************************************
// Global data
//**********************************************************************
// Array of window configuration structures
extern swim_window_type window [WINDOWSMAX];

//**********************************************************************
// Graphics primative drawing functions
//**********************************************************************
// Puts a pixel at (X, Y) in the pen color
void swim_put_pixel (INT_32 win, INT_32 x1, INT_32 y1);

// Draw a line in the virtual window
void swim_put_line (INT_32 win, INT_32 x1, INT_32 y1, INT_32 x2,
    INT_32 y2);

// Fills the draw area of the display with the selected color
void swim_clear_screen (INT_32 win, color_type colr);

// Place a box with corners (X1, Y1) and (X2, Y2). Use pen color
// for edges and fill color for center
void swim_put_box (INT_32 win, INT_32 x1, INT_32 y1, INT_32 x2,
    INT_32 y2);

//**********************************************************************
// Initialization, selection, and de-initialization functions
//**********************************************************************
// Initialize a window
INT_32 swim_window_open (INT_32 xsize, INT_32 ysize, color_type *fbaddr,
    INT_32 xwin_min, INT_32 ywin_min, INT_32 xwin_max, INT_32 ywin_max,
    INT_32 border_width, color_type pcolor, color_type bkcolor,
    color_type fcolor, INT_32 override);

// Destroy a window
void swim_window_close (INT_32 win);

// Set the pen color
void swim_set_pen_color (INT_32 win, color_type pen_color);

// Set fill color (used for boxes and circles)
void swim_set_fill_color (INT_32 win, color_type fill_color);

// Set background color
void swim_set_bkg_color (INT_32 win, color_type bkg_color);

#ifdef __cplusplus
}
#endif

#endif // SWIM_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -