mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-28 16:17:09 +08:00
78 lines
3.6 KiB
Plaintext
78 lines
3.6 KiB
Plaintext
.\" This manpage is Copyright (C) 2000 Wei Yongming
|
|
.\" 2000 BluePoint Software
|
|
.\"
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
.\" preserved on all copies.
|
|
.\"
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
.\" permission notice identical to this one
|
|
.\"
|
|
.\" Since MiniGUI is constantly changing, this
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
.\" have taken the same level of care in the production of this manual,
|
|
.\" which is licensed free of charge, as they might when working
|
|
.\" professionally.
|
|
.\"
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
.TH "Init" "3" "July 2000" "MiniGUI"
|
|
.SH "NAME"
|
|
Init \- Initialization and termination of MiniGUI.
|
|
.SH "SYNOPSIS"
|
|
.B #include <minigui/minigui.h>
|
|
.PP
|
|
.BI "BOOL GUIAPI InitGUI" "(void);"
|
|
.br
|
|
.BI "void GUIAPI TerminateGUI" "(int rcByGUI);"
|
|
.br
|
|
.BI "void GUIAPI MiniGUIPanic" "(int exitcode);"
|
|
.br
|
|
.BI "void GUIAPI SuspendGUI" "(void);"
|
|
.br
|
|
.BI "BOOL GUIAPI ResumeGUI" "(void);"
|
|
.br
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
\fBInitGUI\fP function initializes MiniGUI support system. It will allocate and load resources used by MiniGUI, create threads which act as mini servers, and more important, set vedio mode according to MiniGUI.cfg file.
|
|
.PP
|
|
This function will be called automatically by \fBmain\fP function. Applications should avoid calling this function directly. \fBmain\fP function has been implemented in libminigui as following:
|
|
.PP
|
|
.nf
|
|
int main(int args, const char* agr[])
|
|
{
|
|
int iRet = 0;
|
|
if (!PreInitGUI (args, agr, &iRet))
|
|
return iRet;
|
|
if (!InitGUI()) return -1;
|
|
iRet = MiniGUIMain (args, agr);
|
|
TerminateGUI (iRet);
|
|
iRet = PostTerminateGUI (args, agr, iRet);
|
|
return iRet;
|
|
}
|
|
.fi
|
|
.PP
|
|
\fBTerminateGUI\fP function is normally called by application's main function. According to the returned value of \fBMiniGUIMain\fR function, \fBTerminateGUI\fR either suspends calling thread and waits system threads, or just kills all threads except calling thread, frees resources used by MiniGUI, sets vedio card back to text mode, and then terminates MiniGUI application.
|
|
.PP
|
|
\fBrcByGUI\fR is the return value of \fBMiniGUIMain\fP function. If \fBrcByGUI\fR >= 0, calling thread will suspend; if \fBrcByGUI\fR < 0, application will terminate.
|
|
.PP
|
|
This function will be called automatically by \fBmain\fP function. Applications should avoid calling this function directly.
|
|
.PP
|
|
\fBMiniGUIPanic\fP function will abnormally terminate MiniGUI application, so it be not recommended to use.
|
|
.PP
|
|
You can use \fBSuspendGUI\fP function to suspend the reponse of MiniGUI to user, then you must call the function named \fBResumeGUI\fP to restore the response.
|
|
.PP
|
|
If you call the function \fBSuspendGUI\fP to suspend the response of MiniGUI to user, you need call \fBResumeGUI\fP function to restore the action of MiniGUI. In fact, the function \fBResumeGUI\fP performs the same things as the function \fBInitGUI\fP does, except that it don't save the original termio.
|
|
|
|
.SH "SEE ALSO"
|
|
.BR miniguiMain "(3)"
|
|
|
|
.SH "AUTHOR"
|
|
.PP
|
|
This manual page was edited by WEI Yongming <ymwei@minigui.org>.
|
|
If you have any problems, comments or found some bugs, please send messages to me.
|