📄 app.h
字号:
/******************************************************************
* SEAL 2.0 *
* Copyright (c) 1999-2002 SEAL Developers. All Rights Reserved. *
* *
* Web site: http://sealsystem.sourceforge.net/ *
* E-mail (current maintainer): orudge@users.sourceforge.net *
******************************************************************/
/*
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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __APP_H_INCLUDED__
#define __APP_H_INCLUDED__
#ifdef __cplusplus
extern "C" {
#endif
#include <stdarg.h>
#include "menus.h"
/* app messages */
/* message, when about button is pressed*
#ifndef MSG_ABOUTB
#define MSG_ABOUTB 106
#endif*/
/* message, when maximize button is pressed */
#ifndef MSG_MAXIMIZE
#define MSG_MAXIMIZE 101
#endif
/* message, when minimize button is pressed */
#ifndef MSG_MINIMIZE
#define MSG_MINIMIZE 102
#endif
/* message, when resize button is pressed */
#ifndef MSG_RESIZE
#define MSG_RESIZE 103
#endif
/* message, when system menu button is pressed */
#ifndef MSG_SYSMENU
#define MSG_SYSMENU 105
#endif
/* flags for t_appwin objects */
/* enable window to be maximized ( maximize button ) */
/**/
#define WF_MAXIMIZE 0x01
/* enable window to be minimized ( minimize button ) */
#define WF_MINIMIZE 0x02
/* if window is open in minimize mode */
#define WF_MINSIZE 0x04
/* if window is maximized */
#define WF_MAXSIZE 0x08
/* window has a system menu */
#define WF_SYSMENU 0x10
/* window has a About or Help button mode */
#define WF_ABOUT 0x20
/* buttons for message window */
/* insert "close" button into message window */
#define MB_CLOSE 0x0001
/* insert "cancel" button into message window */
#define MB_CANCEL 0x0002
/* insert "yes" button into message window */
#define MB_YES 0x0004
/* insert "no" button into message window */
#define MB_NO 0x0008
/* insert "help" button into message window */
#define MB_HELP 0x0010
/* insert "ok" button into message window */
#define MB_OK 0x0020
/* insert "continue" button into message window */
#define MB_CONTINUE 0x0040
/* insert "exit" button into message window */
#define MB_EXIT 0x0080
/* insert "yes to all" button into message window */
#define MB_YESTOALL 0x0100
/* insert "no to all" button into message window */
#define MB_NOTOALL 0x0200
/* captions for message window */
/* message window */
/* message window will contain Warning icon + title "Warning" */
#define MW_WARNING 1
/* message window will contain Error icon + title "Error" */
#define MW_ERROR 2
/* message window will contain Error icon + title "Error" */
#define MW_INFO 3
/* message window will contain Info icon + title "Error" */
#define MW_QUESTION 4
/* message window will contain Unavailable icon + title "Unavailable" */
#define MW_UNAVAILABLE 5
/* message window will contain Unavailable icon + title "Unavailable" */
#define MW_SETUP 6
/* ......all icons will find in "app.dat" file */
/* icons for message window */
/* it's internal definition for "app.c" file */
#define MI_ICONS 6
#define MI_WARNING 0
#define MI_ERROR 1
#define MI_INFO 2
#define MI_QUESTION 3
#define MI_UNAVAILABLE 4
#define MI_SETUP 5
/* message buttons names */
#ifndef TXT_CLOSE
#define TXT_CLOSE INI_TEXT("Close")
#endif
#ifndef TXT_CANCEL
#define TXT_CANCEL INI_TEXT("Cancel")
#endif
#ifndef TXT_YES
#define TXT_YES INI_TEXT("Yes")
#endif
#ifndef TXT_NO
#define TXT_NO INI_TEXT("No")
#endif
#ifndef TXT_HELP
#define TXT_HELP INI_TEXT("Help")
#endif
#ifndef TXT_OK
#define TXT_OK INI_TEXT("Ok")
#endif
#ifndef TXT_CONTINUE
#define TXT_CONTINUE INI_TEXT("Continue")
#endif
#ifndef TXT_EXIT
#define TXT_EXIT INI_TEXT("Exit")
#endif
#ifndef TXT_YESTOALL
#define TXT_YESTOALL INI_TEXT("Yes to all")
#endif
#ifndef TXT_NOTOALL
#define TXT_NOTOALL INI_TEXT("No to all")
#endif
/* message captions names */
#ifndef TXT_WARNING
#define TXT_WARNING INI_TEXT("Warning")
#endif
#ifndef TXT_ERROR
#define TXT_ERROR INI_TEXT("Error")
#endif
#ifndef TXT_INFO
#define TXT_INFO INI_TEXT("Info")
#endif
#ifndef TXT_QUESTION
#define TXT_QUESTION INI_TEXT("Question")
#endif
#ifndef TXT_UNAVAILABLE
#define TXT_UNAVAILABLE INI_TEXT("Unavailble")
#endif
#ifndef TXT_SETUP
#define TXT_SETUP INI_TEXT("Setup")
#endif
/*
t_app_info
- used for information-transfer between application and
desktop f.e. It's used in MSG_MINIMIZE message, when app_win
set event to EV_INFO, MSG_MINIMIZE and obj is pointer to this
structure
*/
typedef struct t_appinfo {
l_text title; /* the name of window */
p_object obj; /* pointer to the window */
l_char reserved[48]; /* reserved for future versions */
} t_appinfo;
typedef struct t_appinfo *p_appinfo;
extern t_appinfo appinfo; /* for transfers */
/*
palette of t_appwin object :
--------------------------
standard colors from Seal.ini file, from section [colors] :
index of palette name in [colors]
0 3D_background
1 window_active_title
2 window_active_title_gradient
3 window_pasive_title
4 window_pasive_title_gradient
5 window_active_caption
6 window_passive_caption
*/
extern l_color pal_appwin[];
/* appwin TAG */
#define TAG_APPWIN 0x0000040
typedef struct t_appwin *p_appwin;
/* t_appwin */
/*
appwin object makes inherited window object. When t_appwin.app_id is not ZERO but
the (id) of EXE/DLX file, it automatically destroy application when window is closed.
menu - not used now.
*/
typedef struct t_appwin {
struct t_window obclass;
/* (id) of application */
l_hdlx app_id;
/* system menu */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -