source: trunk/gtk/tr_cell_renderer_progress.h @ 759

Last change on this file since 759 was 759, checked in by joshe, 15 years ago

Replace the old progress cell renderer with a new one for silly license reasons.

  • Property svn:keywords set to Date Rev Author Id
File size: 2.9 KB
Line 
1/*
2  $Id: tr_cell_renderer_progress.h 759 2006-08-13 00:22:05Z joshe $
3
4  Copyright (c) 2006 Joshua Elsasser. All rights reserved.
5   
6  Redistribution and use in source and binary forms, with or without
7  modification, are permitted provided that the following conditions
8  are met:
9   
10   1. Redistributions of source code must retain the above copyright
11      notice, this list of conditions and the following disclaimer.
12   2. Redistributions in binary form must reproduce the above copyright
13      notice, this list of conditions and the following disclaimer in the
14      documentation and/or other materials provided with the distribution.
15   
16  THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS "AS IS" AND
17  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  POSSIBILITY OF SUCH DAMAGE.
27*/
28
29#ifndef TR_CELL_RENDERER_PROGRESS_H
30#define TR_CELL_RENDERER_PROGRESS_H
31
32#include <glib-object.h>
33#include <gtk/gtk.h>
34
35#define TR_CELL_RENDERER_PROGRESS_TYPE (tr_cell_renderer_progress_get_type())
36#define TR_CELL_RENDERER_PROGRESS(obj) \
37  (G_TYPE_CHECK_INSTANCE_CAST((obj), TR_CELL_RENDERER_PROGRESS_TYPE, \
38  TrCellRendererProgress))
39#define TR_CELL_RENDERER_PROGRESS_CLASS(klass) \
40  (G_TYPE_CHECK_CLASS_CAST((klass), TR_CELL_RENDERER_PROGRESS_TYPE,\
41                           TrCellRendererProgressClass))
42#define TR_IS_CELL_RENDERER_PROGRESS(obj) \
43  (G_TYPE_CHECK_INSTANCE_TYPE((obj), TR_CELL_RENDERER_PROGRESS_TYPE))
44#define TR_IS_CELL_RENDERER_PROGRESS_CLASS(klass) \
45  (G_TYPE_CHECK_CLASS_TYPE((klass), TR_CELL_RENDERER_PROGRESS_TYPE))
46#define TR_CELL_RENDERER_PROGRESS_GET_CLASS(obj) \
47  (G_TYPE_INSTANCE_GET_CLASS((obj), TR_CELL_RENDERER_PROGRESS_TYPE, \
48                             TrCellRendererProgressClass))
49
50typedef struct _TrCellRendererProgress TrCellRendererProgress;
51typedef struct _TrCellRendererProgressClass TrCellRendererProgressClass;
52
53/* treat the contents of this structure as private */
54struct _TrCellRendererProgress {
55  GtkCellRenderer parent;
56  GtkCellRenderer *rend;
57  GtkStyle *style;
58  char *text;
59  char *spacer;
60  int barwidth;
61  int barheight;
62  gfloat progress;
63  gboolean disposed;
64};
65
66struct _TrCellRendererProgressClass {
67  GtkCellRendererClass parent;
68};
69
70GType
71tr_cell_renderer_progress_get_type(void);
72
73GtkCellRenderer *
74tr_cell_renderer_progress_new(void);
75
76void
77tr_cell_renderer_progress_reset_style(TrCellRendererProgress *self);
78
79#endif
Note: See TracBrowser for help on using the repository browser.