a question about the purpose of "header" in gdkdnd
- From: "xu victor" <gtkdevellist hotmail com>
- To: gtk-devel-list gnome org
- Subject: a question about the purpose of "header" in gdkdnd
- Date: Wed, 04 Feb 2004 01:12:46 +0000
Hi all:
i am a Newbie in GNOME, i met some questions when
i read the gdk.
it is from gdkdnd.c.
i don't know what the header's purpose ;
is there anybody can tell me?
///////////////////
static gint
motif_add_to_target_table (GList *targets)
{
GList *sorted = NULL;
gint index = -1;
gint i;
GList *tmp_list;
.............
if (index < 0)
{
/* We need to make sure that it exists _before_ we grab the
* server, since we can't open a new connection after we
* grab the server.
*/
motif_find_drag_window (TRUE);
.............
if (index < 0)
{
guchar *data;
............
MotifTargetTableHeader *header;
...........
data = g_malloc (total_size);
header = (MotifTargetTableHeader *)data;
p = data + sizeof(MotifTargetTableHeader);
header ->byte_order = local_byte_order;
header ->protocol_version = 0;
header ->n_lists = motif_n_target_lists;
header ->total_size = total_size;
for (i = 0; i < motif_n_target_lists ; i++)
{
............
}///////////
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]