src/gtkcellrendererprogress.h

Mon, 20 Jan 2003 09:10:23 +0000

author
Christian Hammond <chipx86@chipx86.com>
date
Mon, 20 Jan 2003 09:10:23 +0000
changeset 4359
cf899ee07d1d
parent 3832
7574044fa85d
child 8046
c581b20a47d6
permissions
-rw-r--r--

[gaim-migrate @ 4625]
Wow, okay, where to begin with this one ;)

I rewrote the whole conversation backend. It is now core/UI split. Here's
how it works..

Every conversation is represented by a gaim_conversation structure. This
branches out into gaim_im and gaim_chat structures. Every conversation
lives in (well, normally, but it doesn't have to) a gaim_window structure.
This is a _CORE_ representation of a window. There can be multiple
gaim_window structures around.

The gaim_window and gaim_conversation structures have UI-specific operation
structures associated with them. At the moment, the only UI is GTK+, and
this will be for some time. Don't start thinking you can write a QT UI now.
It's just not going to happen.

Everything that is done on a conversation is done through the core API.
This API does core processing and then calls the UI operations for the
rendering and anything else.

Now, what does this give the user?

- Multiple windows.
- Multiple tabs per window.
- Draggable tabs.
- Send As menu is moved to the menubar.
- Menubar for chats.
- Some very cool stuff in the future, like replacing, say, IRC chat windows
with an X-Chat interface, or whatever.
- Later on, customizable window/conversation positioning.

For developers:

- Fully documented API
- Core/UI split
- Variable checking and mostly sane handling of incorrect variables.
- Logical structure to conversations, both core and UI.
- Some very cool stuff in the future, like replacing, say, IRC chat windows
with an X-Chat interface, or whatever.
- Later on, customizable window/conversation positioning.
- Oh yeah, and the beginning of a stock icon system.

Now, there are things that aren't there yet. You will see tabs even if you
have them turned off. This will be fixed in time. Also, the preferences
will change to work with the new structure. I'm starting school in 2 days,
so it may not be done immediately, but hopefully in the next week.

Enjoy!

3832
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
1 /* gtkcellrendererprogress.h
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
2 * Copyright (C) 2002, Sean Egan <bj91704@binghamton.edu>
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
3 *
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
7 * (at your option) any later version.
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
8 *
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
12 * GNU General Public License for more details.
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
13 *
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
17 *
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
18 */
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
19
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
20 #ifndef __GTK_CELL_RENDERER_PROGRESS_H__
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
21 #define __GTK_CELL_RENDERER_PROGRESS_H__
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
22
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
23 #include <gtk/gtkcellrenderer.h>
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
24
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
25 #ifdef __cplusplus
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
26 extern "C" {
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
27 #endif /* __cplusplus */
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
28
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
29
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
30 #define GTK_TYPE_CELL_RENDERER_PROGRESS (gtk_cell_renderer_progress_get_type())
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
31 #define GTK_CELL_RENDERER_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgress))
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
32 #define GTK_CELL_RENDERER_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgressClass))
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
33 #define GTK_IS_CELL_PROGRESS_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER_PROGRESS))
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
34 #define GTK_IS_CELL_PROGRESS_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_PROGRESS))
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
35 #define GTK_CELL_RENDERER_PROGRESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgressClass))
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
36
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
37 typedef struct _GtkCellRendererProgress GtkCellRendererProgress;
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
38 typedef struct _GtkCellRendererProgressClass GtkCellRendererProgressClass;
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
39
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
40 struct _GtkCellRendererProgress {
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
41 GtkCellRenderer parent;
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
42
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
43 gdouble progress;
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
44 gchar *text;
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
45 gboolean text_set;
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
46 };
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
47
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
48 struct _GtkCellRendererProgressClass {
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
49 GtkCellRendererClass parent_class;
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
50 };
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
51
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
52 GType gtk_cell_renderer_progress_get_type (void);
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
53 GtkCellRenderer *gtk_cell_renderer_progress_new (void);
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
54
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
55
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
56 #ifdef __cplusplus
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
57 }
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
58 #endif /* __cplusplus */
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
59
7574044fa85d [gaim-migrate @ 3981]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
60 #endif /* __GTK_CELL_RENDERER_PROGRESS_H__ */

mercurial