abmain.c

来自「phab_sample」· C语言 代码 · 共 88 行

C
88
字号
/* M a i n l i n e                                       *//*                            AppBuilder Photon Code Lib *//*                                         Version 1.12E */#ifdef __USAGE%C - This is a QNX/Photon Application.%C [options]Options:  -s server   Server node or device name  -x x        Initial x position  -y y        Initial y position  -h h        Initial h dimension  -w w        Initial w dimensionExamples:%C -s4  Run using Photon server on node 4%C -s//4/dev/photon  Same as above%C -x10 -y10 -h200 -w300  Run at initial position 10,10 with initial   dimension of 200x300.#endif/* Standard headers */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>/* Toolkit headers */#include <Ph.h>#include <Pt.h>#include <Ap.h>/* Local headers */#include "abimport.h"#include "proto.h"#include "abwidgets.h"#include "ablinks.h"#include "abdefine.h"#include "abevents.h"#include "abvars.h"/* AppBuilder globals */char		ab_exe_path[PATH_MAX];static void ApClassInit( void );voidmain ( int argc, char *argv[] )	{	ab_winstate = 0;	/* AppBuilder Initialization */	ApInitialize( argc, argv );	/* Setup class table used by this application */	ApClassInit( );	/* Display main window */	ApLinkWindow( NULL, &appl_links[0], NULL );	/* Loop until user quits application */	PtMainLoop( );	}static voidApClassInit( void )	{	ApAddClass( "PtWindow", &PtWindow );	ApAddClass( "PtScrollArea", &PtScrollArea );	ApAddClass( "PtButton", &PtButton );	ApAddClass( "PtGroup", &PtGroup );	ApAddClass( "PtPane", &PtPane );	ApAddClass( "PtText", &PtText );	ApAddClass( "PtLabel", &PtLabel );	}

⌨️ 快捷键说明

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