music.c: cosmetix
[k8lowj.git] / src / poll.h
blob7b1ca52b37679616bd273b65b4f12d8d57e11804
1 /* logjam - a GTK client for LiveJournal.
2 * Copyright (C) 2000-2004 Evan Martin <martine@danga.com>
4 * vim: tabstop=4 shiftwidth=4 noexpandtab :
5 */
7 #ifndef __LOGJAM_POLL_H__
8 #define __LOGJAM_POLL_H__
10 typedef enum {
11 PQ_RADIO = 0, /* first three */
12 PQ_COMBO, /* must be */
13 PQ_CHECK, /* in this order */
14 PQ_TEXT,
15 PQ_SCALE
16 } PQType;
18 typedef struct {
19 PQType type;
20 char *question;
21 } PollQuestion;
23 typedef struct {
24 PollQuestion question;
25 GSList *answers;
26 } PollQuestionMulti;
28 typedef struct {
29 PollQuestion question;
30 int size, width;
31 } PollQuestionText;
33 typedef struct {
34 PollQuestion question;
35 int from, to, by;
36 } PollQuestionScale;
38 typedef enum {
39 PSEC_ALL,
40 PSEC_FRIENDS,
41 PSEC_NONE
42 } PollSecurity;
44 typedef struct {
45 char *name;
46 PollSecurity viewers, voters;
47 GSList *questions;
48 } Poll;
50 PollQuestion *pollmultidlg_run(GtkWindow * parent, PollQuestionMulti * pqm);
51 PollQuestion *polltextdlg_run(GtkWindow * parent, PollQuestionText * pqt);
52 PollQuestion *pollscaledlg_run(GtkWindow * parent, PollQuestionScale * pqs);
54 void poll_question_free(PollQuestion * pq);
56 #endif /* __LOGJAM_POLL_H__ */