]> git.sesse.net Git - vlc/blob - modules/gui/gtk/common.h
ebe339c43d7d28788c020f4442a36b01dff5a266
[vlc] / modules / gui / gtk / common.h
1 /*****************************************************************************
2  * gtk_common.h: private Gtk+ interface description
3  *****************************************************************************
4  * Copyright (C) 1999, 2000 VideoLAN
5  * $Id: common.h,v 1.7 2003/01/26 14:49:09 fenrir Exp $
6  *
7  * Authors: Samuel Hocevar <sam@zoy.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Drag'n'drop stuff
26  *****************************************************************************/
27 #define DROP_ACCEPT_TEXT_URI_LIST  0
28 #define DROP_ACCEPT_TEXT_PLAIN     1
29 #define DROP_ACCEPT_STRING         2
30
31 #define DROP_ACCEPT_END            3
32
33 /*****************************************************************************
34  * intf_sys_t: description and status of Gtk+ interface
35  *****************************************************************************/
36 struct intf_sys_t
37 {
38     /* the gtk_main module */
39     module_t *          p_gtk_main;
40
41     /* special actions */
42     vlc_bool_t          b_playing;
43     vlc_bool_t          b_popup_changed;                   /* display menu ? */
44     vlc_bool_t          b_window_changed;        /* window display toggled ? */
45     vlc_bool_t          b_playlist_changed;    /* playlist display toggled ? */
46     vlc_bool_t          b_slider_free;                      /* slider status */
47     vlc_bool_t          b_deinterlace_update;
48
49     /* menus handlers */
50     vlc_bool_t          b_aout_update;
51     vlc_bool_t          b_vout_update;
52
53     vlc_bool_t          b_program_update;   /* do we need to update programs
54                                                                         menu */
55     vlc_bool_t          b_title_update;  /* do we need to update title menus */
56     vlc_bool_t          b_chapter_update;            /* do we need to update
57                                                                chapter menus */
58     vlc_bool_t          b_audio_update;  /* do we need to update audio menus */
59     vlc_bool_t          b_spu_update;      /* do we need to update spu menus */
60
61     /* windows and widgets */
62     GtkWidget *         p_window;                             /* main window */
63     GtkWidget *         p_popup;                               /* popup menu */
64     GtkWidget *         p_playwin;                               /* playlist */
65     GtkWidget *         p_modules;                         /* module manager */
66     GtkWidget *         p_about;                             /* about window */
67     GtkWidget *         p_open;                          /* multiopen window */
68     GtkWidget *         p_jump;                               /* jump window */
69     GtkWidget *         p_sout;                             /* stream output */
70
71     GtkTooltips *       p_tooltips;                              /* tooltips */
72
73     /* The input thread */
74     input_thread_t *    p_input;
75
76     /* The slider */
77     GtkFrame *          p_slider_frame;
78     GtkAdjustment *     p_adj;                   /* slider adjustment object */
79     float               f_adj_oldvalue;                    /* previous value */
80
81     /* The messages window */
82     GtkWidget *         p_messages;                       /* messages window */
83     GtkText *           p_messages_text;                   /* messages frame */
84     msg_subscription_t* p_sub;                  /* message bank subscription */
85
86     /* Playlist management */
87     int                 i_playing;                 /* playlist selected item */
88
89     /* The window labels for DVD mode */
90     GtkLabel *          p_label_title;
91     GtkLabel *          p_label_chapter;
92     guint               i_part;                           /* current chapter */
93
94     /* audio part */
95     vlc_bool_t          b_mute;
96 };
97
98 /*****************************************************************************
99  * Prototypes
100  *****************************************************************************/
101 gint E_(GtkModeManage)   ( intf_thread_t * p_intf );
102 void E_(GtkDisplayDate)  ( GtkAdjustment *p_adj );
103
104 /*****************************************************************************
105  * Useful macro
106  ****************************************************************************/
107 #define  GtkGetIntf( widget ) E_(__GtkGetIntf)( GTK_WIDGET( widget ) )
108 void * E_(__GtkGetIntf)( GtkWidget * );
109