annotate audacious/textbox.h @ 874:55128a9463a1 trunk

[svn] - cosmetic adjustment
author nenolod
date Fri, 24 Mar 2006 13:30:29 -0800
parents cb178e5ad177
children f12d7e208b43
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /* BMP - Cross-platform multimedia player
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 * Copyright (C) 2003-2004 BMP development team.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * Based on XMMS:
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 * Copyright (C) 1998-2003 XMMS development team.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 * (at your option) any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 #ifndef TEXTBOX_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 #define TEXTBOX_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25 #include <glib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 #include <gdk/gdk.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 #include <pango/pango.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29 #include "skin.h"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 #include "widget.h"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 #define TEXTBOX_SCROLL_TIMEOUT 200
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 #define TEXTBOX_SCROLL_SMOOTH_TIMEOUT 30
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 #define TEXT_BOX(x) ((TextBox *)(x))
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 struct _TextBox {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 Widget tb_widget;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 GdkPixmap *tb_pixmap;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 gchar *tb_text, *tb_pixmap_text;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 gint tb_pixmap_width;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41 gint tb_offset;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 gboolean tb_scroll_allowed, tb_scroll_enabled;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 gboolean tb_is_scrollable, tb_is_dragging;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 gint tb_timeout_tag, tb_drag_x, tb_drag_off;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 gint tb_nominal_y, tb_nominal_height;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 gint tb_skin_id;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 SkinPixmapId tb_skin_index;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 PangoFontDescription *tb_font;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 gint tb_font_ascent, tb_font_descent;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 gchar *tb_fontname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 };
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 typedef struct _TextBox TextBox;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 void textbox_set_text(TextBox * tb, const gchar * text);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 void textbox_set_scroll(TextBox * tb, gboolean s);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 TextBox *create_textbox(GList ** wlist, GdkPixmap * parent, GdkGC * gc,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 gint x, gint y, gint w, gboolean allow_scroll,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 SkinPixmapId si);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 void textbox_set_xfont(TextBox * tb, gboolean use_xfont,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61 const gchar * fontname);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 void textbox_free(TextBox * tb);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 #endif