• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LCD_GetYSize函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LCD_GetYSize函数的典型用法代码示例。如果您正苦于以下问题:C++ LCD_GetYSize函数的具体用法?C++ LCD_GetYSize怎么用?C++ LCD_GetYSize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LCD_GetYSize函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _ExecKeyboard

int _ExecKeyboard(void) {
  int y0 = 75;
  int XSize = LCD_GetXSize();
  int YSize = LCD_GetYSize();
  int XStep = XSize / 4;
  int YStep = (YSize - y0) / 4;
  int i;
  int Key;
  BUTTON_Handle ahButton[16];
  BUTTON_Handle hButtonESC;
  EDIT_Handle   hEdit;
  GUI_RECT rText = {0};
  rText.x1 = LCD_GetXSize() - 3;
  rText.y1 = 20;
  GUI_SetBkColor(GUI_BLUE);  
  GUI_Clear();
  GUI_SetFont(&GUI_FontComic18B_ASCII);
  GUI_SetColor(GUI_WHITE);
  GUI_DispStringInRect("µC/GUI", &rText, GUI_TA_RIGHT | GUI_TA_VCENTER);
  rText.y0 +=20;
  rText.y1 +=20;
  GUI_DispStringInRect("Touch screen demo", &rText, GUI_TA_RIGHT | GUI_TA_VCENTER);
  /* Create Keyboard Buttons */
  for (i=0; _acText[i]; i++) {
    int XPos = (i%4) * XStep + 3;
    int YPos = (i/4) * YStep + 3 + y0;
    char c = _acText[i];
    int Id = c ? c : 1;
    char ac[2] = {0};
    char *s= ac;
    ac[0] = c;
    ahButton[i] = BUTTON_Create( XPos, YPos, XStep - 5, YStep - 5, Id, BUTTON_CF_SHOW );
    BUTTON_SetText(ahButton[i], s);
    BUTTON_EnableMemdev(ahButton[i]);
  }
  hButtonESC = BUTTON_Create( 3, 3, 80, 25, GUI_ID_CANCEL, BUTTON_CF_SHOW );
  BUTTON_SetText(hButtonESC, "ESC");
  hEdit = EDIT_Create( 5, y0 - 30, XSize - 10, 25, ' ', 80, 0 );
  EDIT_SetFont(hEdit, &GUI_Font8x16);
  /* Handle Keyboard until ESC or ENTER is pressed */
  do {
    Key = GUIDEMO_WaitKey();
    switch (Key) {
    case 0:
    case GUI_ID_CANCEL:
     break;
    default:
      EDIT_AddKey(hEdit, Key);
    }
  } while ((Key != 'N') && (Key!=GUI_ID_CANCEL) && (Key!=0));
  /* Cleanup */
  for (i=0; i< countof(ahButton); i++) {
    BUTTON_Delete(ahButton[i]);
  }
  BUTTON_Delete(hButtonESC);
  EDIT_Delete(hEdit);
  return Key;
}
开发者ID:hyq19921011,项目名称:MyScop_GUI3.98,代码行数:58,代码来源:GUIDEMO_Touch.c


示例2: _DrawBkCircle

/*********************************************************************
*
*       _DrawBkCircle
*/
static void _DrawBkCircle(int DrawLogo) {
  static GUI_MEMDEV_Handle   hMemStretch;
  GUI_MEMDEV_Handle          hMemGradient;
  GUI_MEMDEV_Handle          hMemCircle;
  GUI_MEMDEV_Handle          hMemOld;
  int                        CircleWidth;
  int                        ySizeV;
  int                        xSize;
  int                        ySize;
  int                        i;
  U32                      * pData;

  xSize  = LCD_GetXSize();
  ySize  = LCD_GetYSize();
  ySizeV = LCD_GetVYSize();
  if (ySizeV > ySize) {
    GUI_SetBkColor(BK_COLOR_1);
    GUI_ClearRect(0, 0, xSize, ySizeV);
  }
  if (hMemStretch == 0) {
    CircleWidth  = (CIRCLE_RADIUS << 1) + 1;
    hMemCircle   = GUI_MEMDEV_CreateFixed(0, 0, CircleWidth, CircleWidth,   GUI_MEMDEV_NOTRANS, GUI_MEMDEV_APILIST_32, GUI_COLOR_CONV_8888);
    hMemStretch  = GUI_MEMDEV_CreateEx   (0, 0, xSize,       ySize,         GUI_MEMDEV_NOTRANS);
    hMemGradient = GUI_MEMDEV_CreateFixed(0, 0, 1,           CIRCLE_RADIUS, GUI_MEMDEV_NOTRANS, GUI_MEMDEV_APILIST_32, GUI_COLOR_CONV_8888);
    //
    // Initialize background
    //
    hMemOld = GUI_MEMDEV_Select(hMemCircle);
    GUI_SetBkColor(BK_COLOR_1);
    GUI_Clear();
    //
    // Create Gradient
    //
    GUI_MEMDEV_Select(hMemGradient);
    GUI_DrawGradientV(0, 0, 0, CIRCLE_RADIUS, BK_COLOR_0, BK_COLOR_1);
    //
    // Get color and draw circles
    //
    pData = (U32 *)GUI_MEMDEV_GetDataPtr(hMemGradient);
    GUI_MEMDEV_Select(hMemCircle);
    for (i = 0; i < CIRCLE_RADIUS; i++, pData++) {
      GUI_SetColor(*pData);
      GUI_DrawCircle(CIRCLE_RADIUS, CIRCLE_RADIUS, i);
    }
    //
    // Stretch and display
    //
    GUI_MEMDEV_Select(hMemStretch);
    GUI_MEMDEV_DrawPerspectiveX(hMemCircle, 0, 0, ySize, ySize, xSize, 0);
    GUI_MEMDEV_Delete(hMemCircle);
    GUI_MEMDEV_Delete(hMemGradient);
    GUI_MEMDEV_Select(hMemOld);
  }
  GUI_MEMDEV_Write(hMemStretch);
  if (DrawLogo) {
    GUI_DrawBitmap(&bmSTLogo70x35, LOGO_DIST_BORDER, LOGO_DIST_BORDER);
  }
}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:62,代码来源:GUIDEMO.c


示例3: MainTask

/*********************************************************************
*
*       MainTask
*/
void MainTask(void) {
  GUI_MOVIE_INFO   Info;
  GUI_MOVIE_HANDLE hMovie;
  int              xSize, ySize;
#ifdef WIN32
  HANDLE           hFile;
  const char       acFileName[] = "C:\\Work\\Grafik\\Video\\FFmpeg\\FFmpeg.emf";
  #define PARAM    &hFile
#else
  FS_FILE        * pFile;
  const char       acFileName[] = "\\FFmpeg.emf";
  #define PARAM    pFile
#endif

  GUI_Init();
  //
  // Get display size
  //
  xSize = LCD_GetXSize();
  ySize = LCD_GetYSize();
  //
  // Create file handle
  //
#ifdef WIN32
  hFile = CreateFile(acFileName, GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
#else
  FS_Init();
  pFile = FS_FOpen(acFileName, "r");
#endif
  //
  // Get physical size of movie
  //
  if (GUI_MOVIE_GetInfoEx(_GetData, PARAM, &Info) == 0) {
    //
    // Check if display size fits
    //
    if ((Info.xSize <= xSize) && (Info.ySize <= ySize)) {
      //
      // Create and play movie
      //
      hMovie = GUI_MOVIE_CreateEx(_GetData, PARAM, _cbNotify);
      if (hMovie) {
        GUI_MOVIE_Show(hMovie, (xSize - Info.xSize) / 2, (ySize - Info.ySize) / 2, 1);
      }
    } else {
      //
      // Error message
      //
      GUI_SetFont(GUI_FONT_13_ASCII);
      GUI_DispStringHCenterAt("Video can not be shown.\n\nDisplay size too small.", xSize / 2, (ySize - GUI_GetFontSizeY()) / 2);
    }
  }
  while (1) {
    GUI_Exec();
    GUI_X_Delay(1);
  }
}
开发者ID:dadianxukong,项目名称:gps,代码行数:61,代码来源:MOVIE_ShowFromFS.c


示例4: k_InitMenu

/**
  * @brief  Initializes the menu.
  * @param  None.
  * @retval None.
  */
void k_InitMenu(void) 
{

  WM_HWIN  hItem;
  uint8_t i = 0;
  GUI_SetLayerVisEx (0, 0);
  GUI_DrawBitmap(&bmbackground, 0,0);     
  
  settings.d32 = k_BkupRestoreParameter(CALIBRATION_GENERAL_SETTINGS_BKP);
  
  GUI_SetLayerVisEx (0, 1);
  GUI_SelectLayer(1);
  GUI_Clear();

  WM_SetCallback(WM_HBKWIN, _cbBk);
  
  WM_CreateWindowAsChild(0,
                         0,
                         LCD_GetXSize(),
                         25,
                         WM_HBKWIN, 
                         WM_CF_SHOW | WM_CF_HASTRANS , 
                         _cbStatus, 
                         0);
     
  hIcon = ICONVIEW_CreateEx(0, 
                            26, 
                            LCD_GetXSize(), 
                            LCD_GetYSize()- 26, 
                            WM_HBKWIN, 
                            WM_CF_SHOW | WM_CF_HASTRANS | WM_CF_BGND ,
                            ICONVIEW_CF_AUTOSCROLLBAR_V,
                            ID_ICONVIEW_MENU, 
                            112, 
                            105);
  
  ICONVIEW_SetFont(hIcon, &GUI_Font13B_ASCII);
  
  ICONVIEW_SetBkColor(hIcon, ICONVIEW_CI_SEL, GUI_LIGHTBLUE |GUI_TRANSPARENT);
  
  ICONVIEW_SetSpace(hIcon, GUI_COORD_Y, 10);
  
  ICONVIEW_SetFrame(hIcon, GUI_COORD_Y, 10);
    
  for (i = 0; i < k_ModuleGetNumber(); i++)
  {
    ICONVIEW_AddBitmapItem(hIcon,module_prop[i].module->icon, (char *)module_prop[i].module->name);
  }

  if(settings.b.enable_sprite)
  {
    _ShowSprites();
  }
  
  hItem = BUTTON_CreateEx(0, 0, 40, 23, WM_HBKWIN, WM_CF_SHOW, 0, ID_BUTTON_BKGND);
  WM_SetCallback(hItem, _cbButton);
}
开发者ID:EarnestHein89,项目名称:STM32Cube_FW_F4,代码行数:62,代码来源:k_menu.c


示例5: _ShowFullScreen

/**
  * @brief  Show full screen
  * @param  None
  * @retval None
  */
static uint8_t _ShowFullScreen(void) 
{
  int XPos, YPos, nx, ny, n;
  WM_HWIN hItem;  
  
  if(hMovie != 0)
  {
    FullScreen = 1;
    WM_CreateWindowAsChild(0, 0, LCD_GetXSize(), LCD_GetYSize(), 
                           WM_HBKWIN, 
                           WM_CF_SHOW | WM_CF_STAYONTOP, 
                           _cbFullScreen, 
                           0);
    
    if((Video_Info.xSize != LCD_GetXSize()) ||(Video_Info.ySize != LCD_GetYSize()))
    {
      nx = (LCD_GetXSize() * 1000) / Video_Info.xSize;
      ny = (LCD_GetYSize() * 1000) / Video_Info.ySize; 
      
      if (nx < ny) {
        n = nx;
      } else {
        n = ny;
      }
      
      XPos = (LCD_GetXSize() - ((Video_Info.xSize * n) / 1000)) / 2;
      YPos = (LCD_GetYSize() - ((Video_Info.ySize * n) / 1000)) / 2;
      
      GUI_MOVIE_ShowScaled(hMovie, XPos, YPos, n, 1000, 0);
    }
    else
    {
      XPos = (LCD_GetXSize() - Video_Info.xSize) / 2;
      YPos = (LCD_GetYSize() - Video_Info.ySize) / 2;
      
      GUI_MOVIE_Show(hMovie, XPos, YPos, 0); 
      VideoPlayer_State = VIDEO_PLAY;
      hItem = WM_GetDialogItem(VIDEOPLAYER_hWin, ID_PLAY_BUTTON);
      WM_InvalidateWindow(hItem);
      WM_Update(hItem);      
    }
  }
  return 0;
}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:49,代码来源:videoplayer_win.c


示例6: Run_SpeedTest

/**
  * @brief  Run speed test
  * @param  None
  * @retval Pixels per second
  */
static int Run_SpeedTest(void) {
  int      TimeStart, i;
  U32      PixelsPerSecond;
  unsigned aColorIndex[8];
  int      xSize, ySize, vySize;
  GUI_RECT Rect, ClipRect;
  xSize  = LCD_GetXSize();
  ySize  = LCD_GetYSize();
  vySize = LCD_GetVYSize();
#if GUI_SUPPORT_CURSOR
  GUI_CURSOR_Hide();
#endif
  if (vySize > ySize) {
    ClipRect.x0 = 0;
    ClipRect.y0 = 0;
    ClipRect.x1 = xSize;
    ClipRect.y1 = ySize;
    GUI_SetClipRect(&ClipRect);
  }

  Stop_Test = 0;

  for (i = 0; i< 8; i++) {
    aColorIndex[i] = GUI_Color2Index(_aColor[i]);
  }
  TimeStart = GUI_GetTime();
  for (i = 0; ((GUI_GetTime() - TimeStart) < 5000) &&( Stop_Test == 0); i++) {
    GUI_SetColorIndex(aColorIndex[i&7]);

    /* Calculate random positions */
    Rect.x0 = rand() % xSize - xSize / 2;
    Rect.y0 = rand() % ySize - ySize / 2;
    Rect.x1 = Rect.x0 + 20 + rand() % xSize;
    Rect.y1 = Rect.y0 + 20 + rand() % ySize;
    GUI_FillRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1);

    /* Clip rectangle to visible area and add the number of pixels (for speed computation) */
    if (Rect.x1 >= xSize) {
      Rect.x1 = xSize - 1;
    }
    if (Rect.y1 >= ySize) {
      Rect.y1 = ySize - 1;
    }
    if (Rect.x0 < 0 ) {
      Rect.x0 = 0;
    }
    if (Rect.y1 < 0) {
      Rect.y1 = 0;
    }
    GUI_Exec();
    /* Allow short breaks so we do not use all available CPU time ... */
  }
  PixelsPerSecond = _GetPixelsPerSecond();
  GUI_SetClipRect(NULL);
  return PixelsPerSecond;
}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:61,代码来源:benchmark_win.c


示例7: MainTask

/*********************************************************************
*
*       MainTask
*/
void MainTask(void) {
  WM_HWIN hTree;
  TREEVIEW_ITEM_Handle hNode;
  int xSize, ySize;
  char acBuffer[(TREEVIEW_DEPTH << 1) + 1];

  //
  // Initialize emWin
  //
  WM_SetCreateFlags(WM_CF_MEMDEV);
  GUI_Init();
  xSize = LCD_GetXSize();
  ySize = LCD_GetYSize();
  //
  // Set defaults for background and widgets
  //
  WM_SetCallback(WM_HBKWIN, _cbBk);
  SCROLLBAR_SetDefaultSkin(SCROLLBAR_SKIN_FLEX);
  SCROLLBAR_SetDefaultWidth(20);
  SCROLLBAR_SetThumbSizeMin(25);
  //
  //
  //
  GUI_SetFont(GUI_FONT_24_ASCII);
  GUI_DispStringHCenterAt("Customized TREEVIEW widget", 160, 5);
  //
  // Create TREEVIEW
  //
  hTree = TREEVIEW_CreateEx(0, 35, xSize, ySize - 35, WM_HBKWIN, WM_CF_SHOW | WM_CF_HASTRANS, 0, GUI_ID_TREEVIEW0);
  TREEVIEW_SetAutoScrollV(hTree, 1);
  TREEVIEW_SetFont(hTree, GUI_FONT_24_ASCII);
  TREEVIEW_SetIndent(hTree, 30);
  TREEVIEW_SetTextIndent(hTree, 20);
  TREEVIEW_SetImage(hTree, TREEVIEW_BI_PLUS, &bmPlus);
  TREEVIEW_SetImage(hTree, TREEVIEW_BI_MINUS, &bmMinus);
  TREEVIEW_SetImage(hTree, TREEVIEW_BI_CLOSED, &bmClosed);
  TREEVIEW_SetImage(hTree, TREEVIEW_BI_OPEN, &bmOpen);
  TREEVIEW_SetImage(hTree, TREEVIEW_BI_LEAF, &bmLeaf);
  TREEVIEW_SetBitmapOffset(hTree, TREEVIEW_BI_PM, -21, -6);
  TREEVIEW_SetOwnerDraw(hTree, _TREEVIEW_OwnerDraw);
  TREEVIEW_SetBkColor(hTree, TREEVIEW_CI_SEL, USER_COLOR);
  TREEVIEW_SetBkColor(hTree, TREEVIEW_CI_UNSEL, GUI_BLACK);
  TREEVIEW_SetTextColor(hTree, TREEVIEW_CI_SEL, GUI_WHITE);
  TREEVIEW_SetTextColor(hTree, TREEVIEW_CI_UNSEL, GUI_WHITE);
  WIDGET_SetEffect(hTree, &WIDGET_Effect_None);
  //
  // Fill TREEVIEW
  //
  hNode = TREEVIEW_InsertItem(hTree, TREEVIEW_ITEM_TYPE_NODE, 0, 0, "Tree");
  _FillNode(hTree, hNode, NUM_CHILD_NODES, NUM_CHILD_ITEMS, TREEVIEW_DEPTH, TREEVIEW_DEPTH, acBuffer, acBuffer);
  TREEVIEW_ITEM_Expand(hNode);
  WM_SetFocus(hTree);
  while (1) {
    GUI_Delay(100);
  }
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:60,代码来源:WIDGET_CustomTreeview.c


示例8: _DrawBk

static void _DrawBk(int DrawLogo) {
  int xSize, ySize;

  xSize = LCD_GetXSize();
  ySize = LCD_GetYSize();
  GUI_DrawGradientV(0, 0, xSize, ySize, BK_COLOR_0, BK_COLOR_1);
  if (DrawLogo) {
    GUI_DrawBitmap(&bmSeggerLogo70x35, 5, 5);
  }
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:10,代码来源:GUIDEMO.c


示例9: _SetupAnimationData

/*********************************************************************
*
*       _SetupAnimationData
*/
static void _SetupAnimationData(ANIM_DATA * pData) {
  //
  // Get display size
  //
  pData->xSize = LCD_GetXSize();
  pData->ySize = LCD_GetYSize();
  pData->xPart = pData->xSize / 10;
  pData->yPart = pData->ySize / 10;
  pData->Size  = (pData->yPart * 4) / 5;
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:14,代码来源:ANIMATION_Basics.c


示例10: GUIDEMO_main

void GUIDEMO_main(void) {
  #if GUI_WINSUPPORT
    int i;
  #endif
  #if GUI_WINSUPPORT
    WM_SetCreateFlags(WM_CF_MEMDEV);  /* Automatically use memory devices on all windows */
    _ButtonSizeX = 27;
    _ButtonSizeY = 14;
    _ahButton[0] = BUTTON_Create(LCD_GetXSize() - _ButtonSizeX * 2 - 5,
                                 LCD_GetYSize() - _ButtonSizeY - 3,
                                 _ButtonSizeX, _ButtonSizeY, 
                                 'H' , WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
    _ahButton[1] = BUTTON_Create(LCD_GetXSize() - _ButtonSizeX - 3,
                                 LCD_GetYSize() - _ButtonSizeY - 3,
                                 _ButtonSizeX, _ButtonSizeY, 
                                 'N' , WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
    BUTTON_SetFont(_ahButton[0], &GUI_Font8_ASCII);
    BUTTON_SetFont(_ahButton[1], &GUI_Font8_ASCII);
    BUTTON_SetText(_ahButton[0], "Stop");
    BUTTON_SetText(_ahButton[1], "Next");
    _UpdateCmdWin();
    WM_ExecIdle();
  #endif
  /* Show Intro */
  GUIDEMO_Intro();
  /* Run the individual demos !  */
  for (_iTest = 0; _apfTest[_iTest]; _iTest++) {
    GUI_CONTEXT ContextOld;
    GUI_SaveContext(&ContextOld);
    _iTestMinor = 0;
    _UpdateCmdWin();
    (*_apfTest[_iTest])();
    _CmdNext = 0;
    GUI_RestoreContext(&ContextOld);
  }
  /* Cleanup */
  #if GUI_WINSUPPORT
    for (i = 0; i < countof(_ahButton); i++) {
      BUTTON_Delete(_ahButton[i]);
    }
  #endif
}
开发者ID:rttg125,项目名称:Intelligent-bedroom-system,代码行数:42,代码来源:GUIDEMO.c


示例11: k_InitMenu

/**
  * @brief  Initializes the menu.
  * @param  None.
  * @retval None
  */
void k_InitMenu(void) 
{

  WM_HWIN  hItem;
  uint8_t i = 0;
  
  
  settings.d32 = k_BkupRestoreParameter(CALIBRATION_GENERAL_SETTINGS_BKP);

  WM_SetCallback(WM_HBKWIN, _cbBk);
  
  hStatusWin = WM_CreateWindowAsChild(0,
                         0,
                         LCD_GetXSize(),
                         25,
                         WM_HBKWIN, 
                         WM_CF_SHOW | WM_CF_LATE_CLIP , 
                         _cbStatus, 
                         0);
     
  hIcon = ICONVIEW_CreateEx(0, 
                            26, 
                            LCD_GetXSize(), 
                            LCD_GetYSize()- 26, 
                            WM_HBKWIN, 
                            WM_CF_SHOW | WM_CF_HASTRANS,
                            ICONVIEW_CF_AUTOSCROLLBAR_V,
                            ID_ICONVIEW_MENU, 
                            92, 
                            90);
  
    
  ICONVIEW_SetFont(hIcon, &GUI_Font13B_ASCII);
  

  
  ICONVIEW_SetTextColor(hIcon, ICONVIEW_CI_UNSEL, GUI_BLUE);
  ICONVIEW_SetTextColor(hIcon, ICONVIEW_CI_SEL, GUI_BLUE);
  
    ICONVIEW_SetBkColor(hIcon, ICONVIEW_CI_SEL, GUI_LIGHTBLUE |GUI_TRANSPARENT);
  
  ICONVIEW_SetSpace(hIcon, GUI_COORD_Y, 10);
  
  ICONVIEW_SetFrame(hIcon, GUI_COORD_Y, 10);
          
  for (i = 0; i < k_ModuleGetNumber(); i++)
  {  
    ICONVIEW_AddBitmapItem(hIcon,module_prop[i].module->icon, (char *)module_prop[i].module->name); 
  }

  hItem = BUTTON_CreateEx(0, 0, 40, 23, WM_GetDesktopWindowEx(0), WM_CF_SHOW, 0, ID_BUTTON_BKGND);
  WM_SetCallback(hItem, _cbButton);

}
开发者ID:nidhiyanandh,项目名称:STM32Cube_FW_F4_V1.5.0_GCC_Makefile,代码行数:59,代码来源:k_menu.c


示例12: GUIDEMO_Graph

void GUIDEMO_Graph(void) {
  _YSize = (LCD_GetYSize() - 100);
  GUIDEMO_ShowIntro("Drawing a graph",
                    "\nOptimized drawing routine"
                    "\nfor drawing graph data");
  GUI_Clear();
  _Label();
  _DemoRandomGraph();
  GUIDEMO_NotifyStartNext();
  _DemoSineWave();
}
开发者ID:agb861,项目名称:ddd,代码行数:11,代码来源:GUIDEMO_Graph.c


示例13: GListBox_Init

LISTBOX_Handle GListBox_Init()
{
	int Entries = GUI_COUNTOF(g_stListBox) - 1;
	LISTBOX_Handle hListBox;

	int xSize = LCD_GetXSize();
	//int ySize = GUI_GetYDistOfFont(&GUI_Font13B_1) * Entries;
	int ySize = LCD_GetYSize();
	/* Create the listbox */
	hListBox = LISTBOX_Create(g_stListBox, 0, 0, xSize, ySize, WM_CF_SHOW);
	return hListBox;
}
开发者ID:dadianxukong,项目名称:gps,代码行数:12,代码来源:BASIC_HelloWorld.c


示例14: _StartPlay

/**
  * @brief  Start play
  * @param  filename: pointer to the video file name
  * @retval None
  */
static uint8_t _StartPlay(GUI_MOVIE_HANDLE *hmovie, char * filename, FIL * file, uint16_t x0, uint16_t y0) 
{

  static char tmp[FILEMGR_FILE_NAME_SIZE]; 
  int ms, frames;
  uint32_t duration;
  WM_HWIN  hItem;
  
  if(f_open(file, filename, FA_OPEN_EXISTING | FA_READ) == FR_OK)
  {
    
    
    PrevFrameIndex = 0;
    LostFrames = 0;
    previous_total = 0;
    
    GUI_MOVIE_GetInfoEx(_GetData, file, &Video_Info);
    
    *hmovie = GUI_MOVIE_CreateEx(_GetData, file, _cbNotify) ;
    GUI_MOVIE_SetPeriod (*hmovie, VIDEO_FRAME_TIME);
    
    if((Video_Info.xSize == 0) || (Video_Info.ySize == 0) || 
       (Video_Info.xSize > 1024) || (Video_Info.ySize > 768))
    {
      GUI_MOVIE_Delete(*hmovie);
      return 1;
    }
    
    GUI_MOVIE_Show(*hmovie, ((LCD_GetXSize() - Video_Info.xSize)/2), ((LCD_GetYSize() - Video_Info.ySize)/2), 0); 
    
    hTimer = WM_CreateTimer(playbackwin, 0, 1000, 0);  
    
    /* Update video total time */
    hItem = WM_GetDialogItem(playbackwin, ID_TIME);
    ms = Video_Info.msPerFrame;
    frames = Video_Info.NumFrames;
    duration = (frames * ms)/1000;
    sprintf((char *)tmp , "%02lu:%02lu", duration/60, duration%60 );
    TEXT_SetText(hItem, tmp);          
    WM_InvalidateWindow(playbackwin);  
    elapsed_time = 0;
    
    hItem = WM_GetDialogItem(playbackwin, ID_VIDEO_NAME);
    FILEMGR_GetFileOnly (tmp, filename);
    TEXT_SetText(hItem, tmp);
    
    hItem = WM_GetDialogItem(playbackwin, ID_ELAPSED_TIME);
    TEXT_SetText(hItem, "00:00");
    WM_InvalidateWindow(hItem);
    WM_Paint(hItem);
  }
  return 0;
}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:58,代码来源:video_player_win.c


示例15: GUIDEMO_DemoFrameWin

/*********************************************************************
*
*       GUIDEMO_DemoFrameWin
*/
void GUIDEMO_DemoFrameWin(void) {
    FRAMEWIN_Handle hFrame;
    LISTBOX_Handle hListBox;
    int xSize = LCD_GetXSize();
    int ySize = LCD_GetYSize();
    int i, x, y, w, h;
    const GUI_FONT* pFont = &GUI_FontComic18B_1;
    GUI_COLOR DesktopColorOld;
#if GUIDEMO_LARGE
    GUIDEMO_ShowIntro("Frame Window & Listbox", NULL);
#else
    GUIDEMO_ShowIntro("Frame Window\n & Listbox", NULL);
#endif
    DesktopColorOld = GUIDEMO_SetBkColor(GUI_RED);
    DesktopColorOld = WM_SetDesktopColor(DesktopColorOld);      /* Automatically update desktop window */
    x = BORDER;
#if GUIDEMO_LARGE
    y = 75;
#else
    y = BORDER;
#endif
    w = xSize - x - BORDER;
    h = ySize - y - BORDER;
    if (w > 140) {
        w = 140;
    }
    if (h > 120) {
        h = 120;
    }
    hFrame = FRAMEWIN_Create("Select language", NULL, WM_CF_SHOW, x, y, w, h);
    FRAMEWIN_SetActive(hFrame, 1);
    FRAMEWIN_SetMoveable(hFrame, 1);
    FRAMEWIN_AddMaxButton(hFrame, FRAMEWIN_BUTTON_RIGHT, 0);
    FRAMEWIN_AddMinButton(hFrame, FRAMEWIN_BUTTON_RIGHT, 1);
    FRAMEWIN_SetFont(hFrame, &GUI_Font13_ASCII);
    hListBox = LISTBOX_CreateAsChild(_asLang, WM_GetClientWindow(hFrame), 0, 0, 0, 0, WM_CF_SHOW | WM_SF_ANCHOR_LEFT | WM_SF_ANCHOR_TOP | WM_SF_ANCHOR_RIGHT | WM_SF_ANCHOR_BOTTOM);
    WM_SetFocus(hListBox);
    LISTBOX_SetFont(hListBox, pFont);
    GUIDEMO_Wait();
    for (i = 0; (i < 10) && !GUIDEMO_CheckCancel(); i++) {
        LISTBOX_IncSel(hListBox);
        GUIDEMO_Delay(250);
    }
    for (i = 0; (i < 10) && !GUIDEMO_CheckCancel(); i++) {
        LISTBOX_DecSel(hListBox);
        GUIDEMO_Delay(250);
    }
    GUIDEMO_Delay(500);
    LISTBOX_Delete(hListBox);
    FRAMEWIN_Delete(hFrame);
    WM_SetDesktopColor(DesktopColorOld);
}
开发者ID:joyceandpig,项目名称:STemWin-Bitmap,代码行数:56,代码来源:GUIDEMO_FrameWin.c


示例16: GUIDEMO_Intro

/*********************************************************************
*
*       GUIDEMO_Intro
*
**********************************************************************
*/
void GUIDEMO_Intro(void) {
  char acVersion[30] = "Version of emWin: ";
  int  xCenter, xSize, ySize;

  xSize   = LCD_GetXSize();
  ySize   = LCD_GetYSize();
  xCenter = xSize >> 1;

  GUIDEMO_DrawBk(0);
	GUI_AA_SetFactor(3);
	GUI_AA_DrawArc(60*3,60*3,50*3,50*3,0,180);
  GUI_SetTextMode(GUI_TM_TRANS);
  //
  // emWin
  //
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_FontRounded22);
  GUI_DispStringHCenterAt("emWin", xCenter, (FACTOR_EMWIN * ySize) >> SCREEN_DIV);
  //
  // emWin description
  //
  GUI_SetFont(&GUI_FontSouvenir18);
  GUI_DispStringHCenterAt("Universal graphic software\nfor embedded applications", xCenter, (FACTOR_DESC * ySize) >> SCREEN_DIV);
  //
  // Any text
  //
  GUI_SetColor(0x2288ff);
  GUI_DispStringHCenterAt("Any CPU - Any Display - Any Application", xCenter, (FACTOR_ANY_COMP * ySize) >> SCREEN_DIV);
  //
  // Compiled
  //
  GUI_SetFont(&GUI_Font10S_ASCII);
  GUI_DispStringHCenterAt("Compiled " __DATE__ " "__TIME__,          xCenter, ((FACTOR_ANY_COMP * ySize) >> SCREEN_DIV) + DIST_ANY_COMP);
  //
  // Version
  //
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_FontSouvenir18);
  strcat(acVersion, GUI_GetVersionString());
  GUI_DispStringHCenterAt(acVersion, xCenter,  (FACTOR_VERSION * ySize) >> SCREEN_DIV);
  //
  // Logo
  //
  GUI_DrawBitmap(&bmSeggerLogo, (xSize - bmSeggerLogo.XSize) >> 1, (FACTOR_LOGO * ySize) >> SCREEN_DIV);
  //
  // www.segger.com
  //
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_FontRounded22);
  GUI_DispStringHCenterAt("www.segger.com", xCenter, (FACTOR_WWW * ySize) >> SCREEN_DIV);
  GUIDEMO_Delay(5000);
}
开发者ID:tongjingyu,项目名称:nxp-os,代码行数:58,代码来源:GUIDEMO_Intro.c


示例17: _DemoVScreen

/*********************************************************************
*
*       _DemoVScreen
*/
static void _DemoVScreen(void) {
  GUI_RECT Rect;
  unsigned j;
  int      xSize;
  int      ySize;
  int      n;
  int      aDelay[] = { 20, 5 };

  xSize = LCD_GetXSize();
  ySize = LCD_GetYSize();
  GUI_SetFont(&GUI_FontComic24B_ASCII);
  GUI_SetTextMode(GUI_TM_TRANS);
  Rect.x0 = 0;
  Rect.y0 = 0;
  Rect.x1 = xSize - 1;
  Rect.y1 = ySize - 1;
  GUI_SetColor(GUI_WHITE);
  GUI_DispStringInRect("Default screen", &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER);
  GUI_Delay(250);
  Rect.y0 += ySize;
  Rect.y1 += ySize;
  GUI_DrawGradientV(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 0xFFFFFF, 0x000000);
  Rect.y1 -= ySize / 3;
  GUI_SetColor(GUI_DARKGREEN);
  GUI_DispStringInRect("Here is the virtual screen", &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER);
  n = ySize / 5;
  for (j = 0; j < GUI_COUNTOF(aDelay); j++) {
    if (_Loop(0, 5, n, aDelay[j]) == 1) {
      return;
    }
    GUI_SetOrg(0, ySize);
    GUI_Delay(250);
    if (_Loop(ySize, -5, n, aDelay[j]) == 1) {
      return;
    }
    GUI_SetOrg(0, 0);
    GUI_Delay(250);
    if (GUIDEMO_CheckCancel()) {
      return;
    }
  }
  for (j = 0; j < 5; j++) {
    GUI_SetOrg(0, ySize);
    GUI_Delay(200);
    GUI_SetOrg(0, 0);
    GUI_Delay(200);
    if (GUIDEMO_CheckCancel()) {
      return;
    }
  }
  GUIDEMO_Delay(1000);
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:56,代码来源:GUIDEMO_VScreen.c


示例18: GUIDEMO_Speed

void GUIDEMO_Speed(void) {
  int t = GUI_GetTime();
  int i = 0;
  int XSize = LCD_GET_XSIZE();
  int YSize = LCD_GET_YSIZE();
  I32 NumPixels=0;
  U16 aColorIndex[8];
  GUIDEMO_ShowIntro("High speed",
                    "Multi layer clipping"
                    "\nHighly optimized drivers"
                    );
  for (i = 0; i< 8; i++) {
    aColorIndex[i] = GUI_Color2Index(_aColor[i]);
  }  
  for (i = 0; (((t + 8000) - (int)GUI_GetTime()) > 0) && !GUIDEMO_CheckCancel(); i++) {
    GUI_RECT r;
    GUI_SetColorIndex(aColorIndex[i&7]);
    /* Calculate random positions */
    r.x0 = rand() % XSize - XSize / 2;
    r.y0 = rand() % YSize - YSize / 2;
    r.x1 = r.x0 + rand() % XSize;
    r.y1 = r.y0 + rand() % YSize;
    GUI_FillRect(r.x0, r.y0, r.x1, r.y1);
    /* Clip rectangle to visible area and add the number of pixels (for speed computation) */
    if (r.x1 >= XSize)
      r.x1 = XSize - 1;
    if (r.y1 >= YSize)
      r.y1 = YSize - 1;
    if (r.x0 < 0 )
      r.x0 = 0;
    if (r.y1 < 0)
      r.y1 = 0;
    NumPixels += (r.x1 - r.x0) * (r.y1 - r.y0);
    /* Allow short breaks so we do not use all available CPU time ... */
  }
  t = (GUI_GetTime() - t) / 100;
  GUI_Clear();
  GUIDEMO_NotifyStartNext();
  #if GUIDEMO_LARGE
    GUI_SetFont(&GUI_FontComic24B_ASCII);
  #else
    GUI_SetFont(&GUI_Font16B_ASCII);
  #endif
  GUI_SetColor(GUI_WHITE);
  GUI_DispStringAt("Pixels/sec: ", 10, (LCD_GetYSize() - GUI_GetFontSizeY()) / 2);
  if (t == 0)
    t++;
  GUI_DispDecMin(10 * (NumPixels / t));
  GUIDEMO_Wait();
}
开发者ID:DlutLiuZhao,项目名称:UCGUI,代码行数:50,代码来源:GUIDEMO_Speed.c


示例19: MainTask

void MainTask(void) {
  //
  // Init GUI
  //
  WM_SetCreateFlags(WM_CF_MEMDEV);
  GUI_Init();
  #if GUI_SUPPORT_CURSOR
    GUI_CURSOR_Hide();  // Hide cursor before first page is shown
  #endif
  //
  // Show SEGGER logo
  //
  GUI_Clear();
  GUI_SetColor(GUI_WHITE);
  GUI_FillRect(0, 0, LCD_GetXSize(), LCD_GetYSize());
  GUI_DrawBitmap(&bmIMAGE_SeggerLogo_300x150_565c, (LCD_GetXSize() - 300) / 2, (LCD_GetYSize() - 150) / 2);
  GUI_X_Delay(SEGGERDEMO_DELAY);
  GUI_Clear();
  //
  // Start GUIDEMO samples, GUIDEMO_Main is an endless loop itself. Therefor we can start it as task directly.
  //
  GUIDEMO_Main();
}
开发者ID:satyanarayangullapalli,项目名称:arm_lpc_1788_sdk,代码行数:23,代码来源:SEGGERDEMO.c


示例20: GUIDEMO_Intro

/*********************************************************************
*
*       GUIDEMO_Intro
*
**********************************************************************
*/
void GUIDEMO_Intro(void) {
  char acVersion[30] = "Version of STemWin: ";
  int  xCenter, xSize, ySize;

  xSize   = LCD_GetXSize();
  ySize   = LCD_GetYSize();
  xCenter = xSize >> 1;

  GUIDEMO_DrawBk(0);
  GUI_SetTextMode(GUI_TM_TRANS);
  //
  // emWin
  //
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_FontRounded22);
  GUI_DispStringHCenterAt("STemWin", xCenter, (FACTOR_EMWIN * ySize) >> SCREEN_DIV);
  //
  // emWin description
  //
  GUI_SetFont(&GUI_Font16_ASCII);
  GUI_DispStringHCenterAt("Universal graphic software\nfor embedded applications", xCenter, (FACTOR_DESC * ySize) >> SCREEN_DIV);
  //
  // Any text
  //
  GUI_SetColor(0x2288ff);
  GUI_DispStringHCenterAt("For STM32 MCU Products - Cortex M3 - Cortex M4", xCenter, (FACTOR_ANY_COMP * ySize) >> SCREEN_DIV);
  //
  // Compiled
  //
  GUI_SetFont(&GUI_Font10S_ASCII);
  GUI_DispStringHCenterAt("Compiled " __DATE__ " "__TIME__,          xCenter, ((FACTOR_ANY_COMP * ySize) >> SCREEN_DIV) + DIST_ANY_COMP);
  //
  // Version
  //
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_Font16_ASCII);
  strcat(acVersion, GUI_GetVersionString());
  GUI_DispStringHCenterAt(acVersion, xCenter,  (FACTOR_VERSION * ySize) >> SCREEN_DIV);
  //
  // Logo
  //
  GUI_DrawBitmap(&bmSTLogo, (xSize - bmSeggerLogo.XSize) >> 1, (FACTOR_LOGO * ySize) >> SCREEN_DIV);
  //
  // www.segger.com
  //
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_FontRounded22);
  GUI_DispStringHCenterAt("www.st.com/stm32", xCenter, (FACTOR_WWW * ySize) >> SCREEN_DIV);
  GUIDEMO_Delay(5000);
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:56,代码来源:GUIDEMO_Intro.c



注:本文中的LCD_GetYSize函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LCD_IO_WriteReg函数代码示例发布时间:2022-05-30
下一篇:
C++ LCD_ErrLog函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap