Mercurial > pidgin
comparison console/libgnt/gnt-skel.c @ 13850:0e1e59770cb0
[gaim-migrate @ 16308]
This is my first commit here. So don't yell at me if things get borked.
Also, I haven't looked at the auto-thingies yet. So don't puke at the
Makefiles.
Files in console/libgnt/ are for the 'Gaim/GObjectified Ncurses Toolkit'
library. Files in console/ uses libgaim and libgnt. Currently, only the
buddylist-ui is 'functional', ie. the buddy-list updates when someone
logs on or logs off. It still needs a lot of work.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 22 Jun 2006 08:33:54 +0000 |
parents | |
children | 5b288502a382 |
comparison
equal
deleted
inserted
replaced
13849:8d1c55309e3c | 13850:0e1e59770cb0 |
---|---|
1 #include "gn-skel.h" | |
2 | |
3 enum | |
4 { | |
5 SIGS = 1, | |
6 }; | |
7 | |
8 static GntWidgetClass *parent_class = NULL; | |
9 static guint signals[SIGS] = { 0 }; | |
10 | |
11 static void | |
12 gnt_skel_draw(GntWidget *widget) | |
13 { | |
14 DEBUG; | |
15 } | |
16 | |
17 static void | |
18 gnt_skel_size_request(GntWidget *widget) | |
19 { | |
20 } | |
21 | |
22 static void | |
23 gnt_skel_map(GntWidget *widget) | |
24 { | |
25 if (widget->priv.width == 0 || widget->priv.height == 0) | |
26 gnt_widget_size_request(widget); | |
27 DEBUG; | |
28 } | |
29 | |
30 static gboolean | |
31 gnt_skel_key_pressed(GntWidget *widget, const char *text) | |
32 { | |
33 return FALSE; | |
34 } | |
35 | |
36 static void | |
37 gnt_skel_class_init(GntWidgetClass *klass) | |
38 { | |
39 GObjectClass *obj_class = G_OBJECT_CLASS(klass); | |
40 | |
41 parent_class = GNT_WIDGET_CLASS(klass); | |
42 parent_class->draw = gnt_skel_draw; | |
43 parent_class->map = gnt_skel_map; | |
44 parent_class->size_request = gnt_skel_size_request; | |
45 parent_class->key_pressed = gnt_skel_key_pressed; | |
46 | |
47 DEBUG; | |
48 } | |
49 | |
50 static void | |
51 gnt_skel_init(GTypeInstance *instance, gpointer class) | |
52 { | |
53 DEBUG; | |
54 } | |
55 | |
56 /****************************************************************************** | |
57 * GntSkel API | |
58 *****************************************************************************/ | |
59 GType | |
60 gnt_skel_get_gtype(void) | |
61 { | |
62 static GType type = 0; | |
63 | |
64 if(type == 0) | |
65 { | |
66 static const GTypeInfo info = { | |
67 sizeof(GntSkelClass), | |
68 NULL, /* base_init */ | |
69 NULL, /* base_finalize */ | |
70 (GClassInitFunc)gnt_skel_class_init, | |
71 NULL, /* class_finalize */ | |
72 NULL, /* class_data */ | |
73 sizeof(GntSkel), | |
74 0, /* n_preallocs */ | |
75 gnt_skel_init, /* instance_init */ | |
76 }; | |
77 | |
78 type = g_type_register_static(GNT_TYPE_WIDGET, | |
79 "GntSkel", | |
80 &info, 0); | |
81 } | |
82 | |
83 return type; | |
84 } | |
85 | |
86 GntWidget *gnt_skel_new() | |
87 { | |
88 GntWidget *widget = g_object_new(GNT_TYPE_SKEL, NULL); | |
89 GntSkel *skel = GNT_SKEL(widget); | |
90 | |
91 return widget; | |
92 } | |
93 |