~siretart/gxine/bug.542506

« back to all changes in this revision

Viewing changes to src/gtkxine.h

  • Committer: Bazaar Package Importer
  • Author(s): Siggi Langauf
  • Date: 2005-01-05 01:49:18 UTC
  • mto: (2.1.1 etch) (1.1.9 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20050105014918-wgldiqcd79ck2b0v
Tags: upstream-0.4.1
ImportĀ upstreamĀ versionĀ 0.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2001-2003 the xine project
3
 
 *
4
 
 * This program is free software; you can redistribute it and/or modify
5
 
 * it under the terms of the GNU General Public License as published by
6
 
 * the Free Software Foundation; either version 2 of the License, or
7
 
 * (at your option) any later version.
8
 
 *
9
 
 * This program is distributed in the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
 * GNU General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU General Public License
15
 
 * along with this program; if not, write to the Free Software
16
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
 
 *
18
 
 * $Id: gtkxine.h,v 1.26 2003/03/08 23:27:27 guenter Exp $
19
 
 *
20
 
 * the xine engine in a widget - header
21
 
 */
22
 
 
23
 
#ifndef HAVE_GTK_XINE_H
24
 
#define HAVE_GTK_XINE_H
25
 
 
26
 
#include <X11/X.h>
27
 
#include <X11/Xlib.h>
28
 
#include <X11/extensions/XShm.h>
29
 
#include <xine.h>
30
 
 
31
 
#ifdef __cplusplus
32
 
extern "C" {
33
 
#endif /* __cplusplus */
34
 
 
35
 
 
36
 
#define GTK_XINE(obj)              (GTK_CHECK_CAST ((obj), gtk_xine_get_type (), GtkXine))
37
 
#define GTK_XINE_CLASS(klass)      (GTK_CHECK_CLASS_CAST ((klass), gtk_xine_get_type (), GtkXineClass))
38
 
#define GTK_IS_XINE(obj)           (GTK_CHECK_TYPE (obj, gtk_xine_get_type ()))
39
 
#define GTK_IS_XINE_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), gtk_xine_get_type ()))
40
 
 
41
 
  typedef struct _GtkXine      GtkXine;
42
 
  typedef struct _GtkXineClass GtkXineClass;
43
 
 
44
 
  struct _GtkXine
45
 
  {
46
 
    GtkWidget                widget;
47
 
 
48
 
    xine_t                  *xine;
49
 
    xine_stream_t           *stream;
50
 
 
51
 
    char                     configfile[256];
52
 
 
53
 
    char                    *video_driver_id;
54
 
    char                    *audio_driver_id;
55
 
 
56
 
    xine_video_port_t       *video_port;
57
 
    xine_audio_port_t       *audio_port;
58
 
    x11_visual_t             vis;
59
 
    double                   display_ratio;
60
 
    Display                 *display;
61
 
    int                      screen;
62
 
    Window                   video_window;
63
 
    GC                       gc;
64
 
    pthread_t                thread;
65
 
    int                      completion_event;
66
 
    int                      child_pid;
67
 
 
68
 
    int                      xpos, ypos;
69
 
    float                    resize_factor;
70
 
    int                      oldwidth, oldheight;
71
 
 
72
 
    /* fullscreen stuff */
73
 
 
74
 
    int                      fullscreen_mode;
75
 
    int                      fullscreen_width, fullscreen_height;
76
 
    Window                   fullscreen_window, toplevel;
77
 
    Cursor                   no_cursor;
78
 
    Cursor                   on_cursor;
79
 
    gboolean                 cursor_visible;
80
 
 
81
 
    GdkVisibilityState       visibility;
82
 
 
83
 
    int                      have_xtest;
84
 
    int                      xtest_keycode;
85
 
 
86
 
    /* visualization */
87
 
    xine_post_t             *vis_plugin;
88
 
    char                    *vis_plugin_id;
89
 
 
90
 
  };
91
 
 
92
 
  struct _GtkXineClass
93
 
  {
94
 
    GtkWidgetClass parent_class;
95
 
  };
96
 
 
97
 
  GtkType    gtk_xine_get_type          (void);
98
 
  GtkWidget* gtk_xine_new               (const gchar *video_driver_id,
99
 
                                         const gchar *audio_driver_id);
100
 
  void       gtk_xine_set_visibility    (GtkXine *gtx,
101
 
                                         GdkVisibilityState state);
102
 
  void       gtk_xine_resize            (GtkXine *gtx,
103
 
                                         gint x, gint y,
104
 
                                         gint width,
105
 
                                         gint height);
106
 
  gint       gtk_xine_open              (GtkXine *gtx,
107
 
                                         const gchar *mrl);
108
 
  gint       gtk_xine_play              (GtkXine *gtx,
109
 
                                         gint pos,
110
 
                                         gint start_time);
111
 
  gint       gtk_xine_trick_mode        (GtkXine *gtx,
112
 
                                         gint mode,
113
 
                                         gint value);
114
 
  gint       gtk_xine_get_stream_info   (GtkXine *gtx,
115
 
                                         gint info);
116
 
  const gchar*gtk_xine_get_meta_info    (GtkXine *gtx,
117
 
                                         gint info);
118
 
  gint       gtk_xine_get_pos_length    (GtkXine *gtx,
119
 
                                         gint *pos_stream,  /* 0..65535     */
120
 
                                         gint *pos_time,    /* milliseconds */
121
 
                                         gint *length_time);/* milliseconds */
122
 
  void       gtk_xine_stop              (GtkXine *gtx);
123
 
 
124
 
  gint       gtk_xine_get_error         (GtkXine *gtx);
125
 
  gint       gtk_xine_get_status        (GtkXine *gtx);
126
 
 
127
 
  void       gtk_xine_set_param         (GtkXine *gtx,
128
 
                                         gint param,
129
 
                                         gint value);
130
 
  gint       gtk_xine_get_param         (GtkXine *gtx,
131
 
                                         gint param);
132
 
 
133
 
  gint       gtk_xine_get_audio_lang    (GtkXine *gtx,
134
 
                                         gint channel,
135
 
                                         gchar *lang);
136
 
  gint       gtk_xine_get_spu_lang      (GtkXine *gtx,
137
 
                                         gint channel,
138
 
                                         gchar *lang);
139
 
 
140
 
  void       gtk_xine_set_fullscreen    (GtkXine *gtx,
141
 
                                         gint fullscreen);
142
 
 
143
 
  gint       gtk_xine_is_fullscreen     (GtkXine *gtx);
144
 
 
145
 
  void       gtk_xine_set_resize_factor (GtkXine *gtx,
146
 
                                         double factor /* 0.0 => don't resize */);
147
 
 
148
 
  gint       gtk_xine_get_current_frame (GtkXine *gtx,
149
 
                                         gint *width,
150
 
                                         gint *height,
151
 
                                         gint *ratio_code,
152
 
                                         gint *format,
153
 
                                         uint8_t *img);
154
 
  gint       gtk_xine_get_log_section_count(GtkXine *gtx);
155
 
  gchar    **gtk_xine_get_log_names     (GtkXine *gtx);
156
 
  gchar    **gtk_xine_get_log           (GtkXine *gtx,
157
 
                                         gint buf);
158
 
  void       gtk_xine_register_log_cb   (GtkXine *gtx,
159
 
                                         xine_log_cb_t cb,
160
 
                                         void *user_data);
161
 
 
162
 
  gchar    **gtk_xine_get_browsable_input_plugin_ids (GtkXine *gtx) ;
163
 
  xine_mrl_t **gtk_xine_get_browse_mrls (GtkXine *gtx,
164
 
                                         const gchar *plugin_id,
165
 
                                         const gchar *start_mrl,
166
 
                                         gint *num_mrls);
167
 
  gchar    **gtk_xine_get_autoplay_input_plugin_ids (GtkXine *gtx);
168
 
  gchar    **gtk_xine_get_autoplay_mrls (GtkXine *gtx,
169
 
                                         const gchar *plugin_id,
170
 
                                         gint *num_mrls);
171
 
  gchar     *gtk_xine_get_file_extensions (GtkXine *gtx);
172
 
  gchar     *gtk_xine_get_mime_types      (GtkXine *gtx);
173
 
 
174
 
  const char *gtk_xine_config_register_string (GtkXine *gtx,
175
 
                                               const char *key,
176
 
                                               const char *def_value,
177
 
                                               const char *description,
178
 
                                               const char *help,
179
 
                                               int   exp_level,
180
 
                                               xine_config_cb_t changed_cb,
181
 
                                               void *cb_data);
182
 
  
183
 
  int   gtk_xine_config_register_range  (GtkXine *gtx,
184
 
                                         const char *key,
185
 
                                         int def_value,
186
 
                                         int min, int max,
187
 
                                         const char *description,
188
 
                                         const char *help,
189
 
                                         int   exp_level,
190
 
                                         xine_config_cb_t changed_cb,
191
 
                                         void *cb_data);
192
 
  
193
 
  int   gtk_xine_config_register_enum   (GtkXine *gtx,
194
 
                                         const char *key,
195
 
                                         int def_value,
196
 
                                         char **values,
197
 
                                         const char *description,
198
 
                                         const char *help,
199
 
                                         int   exp_level,
200
 
                                         xine_config_cb_t changed_cb,
201
 
                                         void *cb_data);
202
 
  
203
 
  int   gtk_xine_config_register_num    (GtkXine *gtx,
204
 
                                         const char *key,
205
 
                                         int def_value,
206
 
                                         const char *description,
207
 
                                         const char *help,
208
 
                                         int   exp_level,
209
 
                                         xine_config_cb_t changed_cb,
210
 
                                         void *cb_data);
211
 
  
212
 
  int   gtk_xine_config_register_bool   (GtkXine *gtx,
213
 
                                         const char *key,
214
 
                                         int def_value,
215
 
                                         const char *description,
216
 
                                         const char *help,
217
 
                                         int   exp_level,
218
 
                                         xine_config_cb_t changed_cb,
219
 
                                         void *cb_data);
220
 
 
221
 
  int   gtk_xine_config_get_first_entry (GtkXine *gtx, xine_cfg_entry_t *entry);
222
 
  int   gtk_xine_config_get_next_entry (GtkXine *gtx, xine_cfg_entry_t *entry);
223
 
  int   gtk_xine_config_lookup_entry (GtkXine *gtx,
224
 
                                    const gchar *key, xine_cfg_entry_t *entry);
225
 
  void  gtk_xine_config_update_entry (GtkXine *gtx,
226
 
                                      xine_cfg_entry_t *entry);
227
 
  void  gtk_xine_config_load         (GtkXine *gtx,
228
 
                                      const gchar *cfg_filename);
229
 
  void  gtk_xine_config_save         (GtkXine *gtx,
230
 
                                      const gchar *cfg_filename);
231
 
  void  gtk_xine_config_reset        (GtkXine *gtx);
232
 
 
233
 
  xine_event_queue_t *gtk_xine_event_new_queue (GtkXine *gtx);
234
 
 
235
 
  void  gtk_xine_event_send          (GtkXine *gtx,
236
 
                                      const xine_event_t *event);
237
 
 
238
 
  const char *const *gtk_xine_list_post_plugins_typed (GtkXine *gtx, int type);
239
 
  void  gtk_xine_set_vis             (GtkXine *gtx,
240
 
                                      char *id); /* NULL to disable */
241
 
 
242
 
  /* FIXME: OSD missing */
243
 
 
244
 
 
245
 
#ifdef __cplusplus
246
 
}
247
 
#endif /* __cplusplus */
248
 
 
249
 
 
250
 
 
251
 
#endif /* HAVE_GTK_XINE_H */
252