📄 sublcdhistory.c
字号:
* FuncPtr
*****************************************************************************/
FuncPtr GetCurrSubLCDScreenEntryFunc(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __MMI_SUBLCD__
return gCurrEntrySubLCDFn;
#endif
return 0;
}
/*****************************************************************************
* FUNCTION
* GetSubLCDScreenCountInHistory
* DESCRIPTION
* Get the screen numbers in subLCD history
* PARAMETERS
* void
* RETURNS
* S16 - screen count
*****************************************************************************/
S16 GetSubLCDScreenCountInHistory(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __MMI_SUBLCD__
return (S16)(NodeIndex + 1);
#endif
return 0;
}
/*****************************************************************************
* FUNCTION
* GetSubLCDHistory
* DESCRIPTION
* Used to get sub LCD history buffer for a screen id
* PARAMETERS
* scrnId [IN]
* ptrHistory [?]
* scrnID(?) [IN] History *ptrHistory
* RETURNS
* FuncPtr
*****************************************************************************/
U8 GetSubLCDHistory(U16 scrnId, SubLCDHistoryNodeEx *ptrHistory)
{
#ifdef __MMI_SUBLCD__
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S16 count;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (count = 0; ((count < MAX_SUBLCD_HISTORY) && ((count <= NodeIndex) && (NodeIndex != -1))); count++)
{
if (SubLCDHistoryData[count].scrnID == scrnId)
{
ptrHistory->scrnID = SubLCDHistoryData[count].scrnID;
ptrHistory->entryFuncPtr = SubLCDHistoryData[count].entryFuncPtr;
if (SubLCDHistoryData[count].guiLen)
{
memcpy(ptrHistory->guiBuffer, SubLCDHistoryData[count].guiBuffer, MAX_GUI_BUFFER);
}
else
{
memset(ptrHistory->guiBuffer, 0, MAX_GUI_BUFFER);
}
return TRUE;
}
}
#endif /* __MMI_SUBLCD__ */
return FALSE;
}
/*****************************************************************************
* FUNCTION
* GetCurrSubLCDGuiBuffer
* DESCRIPTION
* gets current Sub LCD screen gui buffer
* PARAMETERS
* scrnId [IN]
* scrnid(?) [IN]
* RETURNS
* FuncPtr
*****************************************************************************/
U8 *GetCurrSubLCDGuiBuffer(U16 scrnId)
{
#ifdef __MMI_SUBLCD__
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S16 count;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (count = 0; ((count < MAX_SUBLCD_HISTORY) && ((count <= NodeIndex) && (NodeIndex != -1))); count++)
{
if (SubLCDHistoryData[count].scrnID == scrnId)
{
return SubLCDHistoryData[count].guiBuffer;
}
}
#endif /* __MMI_SUBLCD__ */
return NULL;
}
/*****************************************************************************
* FUNCTION
* GetPreviousSubLCDScrnIdOf
* DESCRIPTION
* Queries previous scrn id of this Id
* PARAMETERS
* scrnId [IN]
* previousScrnId [?]
* scrnid(?) [IN]
* RETURNS
* FuncPtr
*****************************************************************************/
pBOOL GetPreviousSubLCDScrnIdOf(U16 scrnId, U16 *previousScrnId)
{
#ifdef __MMI_SUBLCD__
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S16 count;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (count = 0; ((count < MAX_SUBLCD_HISTORY) && ((count <= NodeIndex) && (NodeIndex != -1))); count++)
{
if (SubLCDHistoryData[count].scrnID == scrnId)
{
if ((count - 1) >= 0)
{
*previousScrnId = SubLCDHistoryData[count - 1].scrnID;
return MMI_TRUE;
}
return MMI_FALSE;
}
}
#endif /* __MMI_SUBLCD__ */
return MMI_FALSE;
}
/*****************************************************************************
* FUNCTION
* GetNextSubLCDScrnIdOf
* DESCRIPTION
* Queries next scrn id of this Id
* PARAMETERS
* scrnId [IN]
* nextScrnId [?]
* scrnid(?) [IN]
* RETURNS
* FuncPtr
*****************************************************************************/
pBOOL GetNextSubLCDScrnIdOf(U16 scrnId, U16 *nextScrnId)
{
#ifdef __MMI_SUBLCD__
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S16 count;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (count = 0; ((count < MAX_SUBLCD_HISTORY) && ((count <= NodeIndex) && (NodeIndex != -1))); count++)
{
if (SubLCDHistoryData[count].scrnID == scrnId)
{
if ((count + 1) <= NodeIndex)
{
*nextScrnId = SubLCDHistoryData[count + 1].scrnID;
return MMI_TRUE;
}
return MMI_FALSE;
}
}
#endif /* __MMI_SUBLCD__ */
return MMI_FALSE;
}
/*****************************************************************************
* FUNCTION
* GetSubLCActiveScreenId
* DESCRIPTION
* Get current screen id of Sub LCD
*
* This is used to clear all the interrupt event handlers
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
U16 GetSubLCActiveScreenId(void)
{
#ifdef __MMI_SUBLCD__
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return gCurrTopSubLCDScrnID;
#endif /* __MMI_SUBLCD__ */
return 0;
}
/*****************************************************************************
* FUNCTION
* GetSubLCDExitScrnId
* DESCRIPTION
* Gets current exit screen id of Sub LCD
* PARAMETERS
* void
* U16(?) [IN] Scrnid
* RETURNS
* FuncPtr
*****************************************************************************/
U16 GetSubLCDExitScrnId(void)
{
#ifdef __MMI_SUBLCD__
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return gCurrExitSubLCDScrnID;
#endif /* __MMI_SUBLCD__ */
return 0;
}
/*****************************************************************************
* FUNCTION
* GetSubLCDScrnId
* DESCRIPTION
* Gets the id of Sub LCD screen
* PARAMETERS
* index [IN]
* RETURNS
* FuncPtr
*****************************************************************************/
U16 GetSubLCDScrnId(U16 index)
{
#ifdef __MMI_SUBLCD__
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (index <= NodeIndex)
{
return (SubLCDHistoryData[index].scrnID);
}
#endif /* __MMI_SUBLCD__ */
return 0;
}
/*****************************************************************************
* FUNCTION
* SubLCDHistoryDump
* DESCRIPTION
* Dumps the Sub-LCD history to file or debug window
*
* SubLCDHistoryDump will be used for dbugging purposes
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void SubLCDHistoryDump(void)
{
#ifdef __MMI_SUBLCD__
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S16 count = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (NodeIndex >= 0)
{
count = NodeIndex;
do
{
MMI_TRACE((MMI_TRACE_G1_FRM, MMI_FRM_INFO_SUBHIST_DUMP_HDLR,
count, SubLCDHistoryData[count].scrnID, SubLCDHistoryData[count].entryFuncPtr));
if (count > 0 && count < MAX_SUBLCD_HISTORY)
{
--count;
}
else
{
break;
}
} while ((count != NodeIndex) && (SubLCDHistoryData[count].entryFuncPtr != NULL));
}
MMI_TRACE((MMI_TRACE_G1_FRM, MMI_FRM_INFO_SUBHIST_DUMP_ROOTHDLR));
#endif /* __MMI_SUBLCD__ */
}
#ifdef __MMI_UI_TAB_PANE__
/*****************************************************************************
* FUNCTION
* disable_subLCD_history_saving
* DESCRIPTION
* Disable SubLCD history saving
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void disable_subLCD_history_saving(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __MMI_SUBLCD__
disable_subLCD_history_save = 1;
#endif
}
/*****************************************************************************
* FUNCTION
* enable_subLCD_history_saving
* DESCRIPTION
* Enables SubLCD history saving
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void enable_subLCD_history_saving(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __MMI_SUBLCD__
disable_subLCD_history_save = 0;
#endif
}
/*****************************************************************************
* FUNCTION
* change_curr_subLCD_gui_buffer
* DESCRIPTION
* Changes the current subLCD gui buffer of the current screen
*
* This is used by tab pane as as tab pane history is on top of the screen.
* PARAMETERS
* gui_buffer [?]
* RETURNS
* void
*****************************************************************************/
void change_curr_subLCD_gui_buffer(U8 *gui_buffer)
{
#ifdef __MMI_SUBLCD__
/*----------------------------------------------------------------*/
/* Local Variables
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -