本文整理汇总了C++中Display::Init方法的典型用法代码示例。如果您正苦于以下问题:C++ Display::Init方法的具体用法?C++ Display::Init怎么用?C++ Display::Init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::Init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDisplay
Word BURGER_API Burger::GameApp::SwitchVideo(void)
{
Word uResult = 10;
// Is switching allowed?
if (m_bAllowWindowSwitching) {
// Is there a display class?
Display *pDisplay = GetDisplay();
if (pDisplay) {
#if defined(BURGER_WINDOWS)
static_cast<WindowsApp *>(this)->KillInputFocus();
#endif
pDisplay->Init(pDisplay->GetWidth(),pDisplay->GetHeight(),pDisplay->GetDepth(),pDisplay->GetFlags()^Display::FULLSCREEN);
#if defined(BURGER_WINDOWS)
static_cast<WindowsApp *>(this)->GetInputFocus();
#endif
uResult = 0;
}
}
return uResult;
}
示例2: UserMain
void UserMain(void * pd) {
InitializeStack();
OSChangePrio(MAIN_PRIO);
EnableAutoUpdate();
EnableTaskMonitor();
#ifndef _DEBUG
EnableSmartTraps();
#endif
#ifdef _DEBUG
InitializeNetworkGDB_and_Wait();
#endif
// int fd = OpenSerial(9, 115200, 1, 8, eParityNone); // NetBurner 2.0: jack X5 - UART9, jack X4 - UART8
PortsInit();
iprintf("Initialization the LCD...\r\n");
Display dis;
dis.Init();
// Tab *ta = new Tab("A", 170, 0, 22, 17, 8, 5 );
// Tab *tb = new Tab("B", 170, 16, 22, 17, 8, 5 );
// Tab *tc = new Tab("C", 170, 32, 22, 17, 7, 4 );
// Tab *td = new Tab("All", 170, 48, 22, 16, 5, 4 );
Tab *ta = new Tab("A", 170, 0, 22, 22, 8, 6 );
Tab *tb = new Tab("B", 170, 21, 22, 22, 8, 6 );
Tab *tc = new Tab("C", 170, 42, 22, 22, 7, 6 );
Menu m;
m.ta = ta;
m.tb = tb;
m.tc = tc;
// m.td = td;
m.disp = &dis;
// Initialization Queues
OSQInit( &BuzzerQueue, Buzzer_queue_data, BUZZER_QUEUE_SIZE );
OSQInit( &DisplayQueue, Display_queue_data, DISPLAY_QUEUE_SIZE );
// Initialization Tasks
if( OSTaskCreate(PollKeyboardTask,
// (void *) &fd,
(void *) &m,
(void *) &PollKeyboardTaskStack[USER_TASK_STK_SIZE],
(void *) PollKeyboardTaskStack,
MAIN_PRIO - 2 ) != OS_NO_ERR)
{
iprintf( "*** Error creating PollKeyboardTask\r\n" );
}
if( OSTaskCreate(DisplayingLCDTask,
(void *) &m,
(void *) &DisplayingLCDTaskStack[USER_TASK_STK_SIZE],
(void *) DisplayingLCDTaskStack,
MAIN_PRIO - 1 ) != OS_NO_ERR)
{
iprintf( "*** Error creating DisplayingLCDTask\r\n" );
}
if( OSTaskCreate(BuzzerTask,
NULL,
(void *) &BuzzerTaskStack[USER_TASK_STK_SIZE],
(void *) BuzzerTaskStack,
MAIN_PRIO - 3 ) != OS_NO_ERR)
{
iprintf( "*** Error creating BuzzerTask\r\n" );
}
iprintf("Application started\n");
while (1) {
OSTimeDly(20);
}
}