history.h
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:3k
源码类别:

midi

开发平台:

Unix_Linux

  1. /*****************************************************************************
  2.  * history.h: vlc_history_t (web-browser-like back/forward history) handling
  3.  *****************************************************************************
  4.  * Copyright (C) 2004 Commonwealth Scientific and Industrial Research
  5.  *                    Organisation (CSIRO) Australia
  6.  * Copyright (C) 2004 the VideoLAN team
  7.  *
  8.  * $Id: bfa8e92b4b46891676057b77ee7afb5a426842af $
  9.  *
  10.  * Authors: Andre Pang <Andre.Pang@csiro.au>
  11.  *
  12.  * This program is free software; you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation; either version 2 of the License, or
  15.  * (at your option) any later version.
  16.  *
  17.  * This program is distributed in the hope that it will be useful,
  18.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20.  * GNU General Public License for more details.
  21.  *
  22.  * You should have received a copy of the GNU General Public License
  23.  * along with this program; if not, write to the Free Software
  24.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  25.  *****************************************************************************/
  26. #ifndef __VLC_HISTORY_H__
  27. #define __VLC_HISTORY_H__
  28. #include "xarray.h"
  29. struct history_item_t
  30. {
  31.     char * psz_name;
  32.     char * psz_uri;
  33. };
  34. struct history_t
  35. {
  36.     unsigned int i_index; /* current index into history */
  37.     XArray * p_xarray;
  38. };
  39. typedef struct history_item_t history_item_t;
  40. typedef struct history_t history_t;
  41. /*****************************************************************************
  42.  * Exported prototypes
  43.  *****************************************************************************/
  44. history_t       * history_New                        ( void );
  45. bool        history_GoBackSavingCurrentItem    ( history_t *,
  46.                                                        history_item_t * );
  47. bool        history_GoForwardSavingCurrentItem ( history_t *,
  48.                                                        history_item_t * );
  49. bool        history_CanGoBack                  ( history_t * );
  50. bool        history_CanGoForward               ( history_t * );
  51. history_item_t  * history_Item                       ( history_t * );
  52. void              history_Prune                      ( history_t * );
  53. void              history_PruneAndInsert             ( history_t *,
  54.                                                        history_item_t * );
  55. unsigned int      history_Count                      ( history_t * );
  56. unsigned int      history_Index                      ( history_t * );
  57. history_item_t  * historyItem_New                    ( char *, char * );
  58. #endif /* __VLC_HISTORY_H__ */