src/win32/win32dep.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 4132
01b236a90e54
child 4406
a7d91dbcdae8
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!

3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1 /*
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2 * win32dep.h
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3 */
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
4
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
5 #ifndef _WIN32DEP_H_
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
6 #define _WIN32DEP_H_
3712
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
7 #include <winsock.h>
3950
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
8 #include <gtk/gtk.h>
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
9 #include <gdk/gdkevents.h>
4132
01b236a90e54 [gaim-migrate @ 4350]
Herman Bloggs <herman@bluedigits.com>
parents: 4097
diff changeset
10 #include "wgaimerror.h"
3778
7d3d0c93cb2d [gaim-migrate @ 3918]
Herman Bloggs <herman@bluedigits.com>
parents: 3712
diff changeset
11 #include "libc_interface.h"
3950
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
12 #include "systray.h"
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
13
3712
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
14 /*
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
15 * PROTOS
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
16 */
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
17
3950
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
18 /**
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
19 ** win32dep.c
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
20 **/
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
21 /* Misc */
4097
3ad9e41eb933 [gaim-migrate @ 4312]
Herman Bloggs <herman@bluedigits.com>
parents: 4042
diff changeset
22 FARPROC wgaim_find_and_loadproc(char*, char*);
3950
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
23 HINSTANCE wgaim_hinstance(void);
3973
acade2595b85 [gaim-migrate @ 4157]
Herman Bloggs <herman@bluedigits.com>
parents: 3950
diff changeset
24 extern void wgaim_im_blink(GtkWidget*);
3950
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
25
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
26 /* Determine Gaim paths */
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
27 extern char* wgaim_install_dir(void);
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
28 extern char* wgaim_lib_dir(void);
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
29 extern char* wgaim_locale_dir(void);
3950
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
30
0cab330f1cd6 [gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents: 3907
diff changeset
31 /* init / cleanup */
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
32 extern void wgaim_init(void);
3907
7de53cfd3660 [gaim-migrate @ 4060]
Herman Bloggs <herman@bluedigits.com>
parents: 3778
diff changeset
33 extern void wgaim_cleanup(void);
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
34
3712
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
35 /*
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
36 * MACROS
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
37 */
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
38
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
39 /*
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
40 * Gaim specific
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
41 */
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
42 #define DATADIR wgaim_install_dir()
3712
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
43 #define LIBDIR wgaim_lib_dir()
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
44 #define LOCALEDIR wgaim_locale_dir()
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
45
3712
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
46 /*
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
47 * Gtk specific
d926a65b5f89 [gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
48 */
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
49 /* Needed for accessing global variables outside the current module */
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
50 #ifdef G_MODULE_IMPORT
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
51 #undef G_MODULE_IMPORT
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
52 #endif
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
53 #define G_MODULE_IMPORT __declspec(dllimport)
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
54
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
55
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
56 #endif /* _WIN32DEP_H_ */
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
57

mercurial