GTK+中文社区(gtk.awaysoft.com)

 找回密码
 马上加入

QQ登录

只需一步,快速开始

查看: 3276|回复: 0

expected specifier-qualifier-list before ‘GdaValueType’

[复制链接]

该用户从未签到

发表于 2012-2-29 11:08:28 | 显示全部楼层 |阅读模式
不知有哪位知道这个是原因引起的错误:
expected specifier-qualifier-list before ‘GdaValueType’
完整代码如下:
#ifndef PARSER_H
#define PARSER_H

#include <gtk/gtk.h>
#include <glade/glade.h>
#include <libgda/libgda.h>
#include <glib/gprintf.h>

typedef struct _DgField {
  gchar *name;        /* field name appearing in an SQL query */
  gboolean required;  /* whether this field is required */
  GdaValueType type;  /* corresponding application data type */
} DgField;

typedef GList DgFields;  /* field names appearing in an SQL query */

typedef struct _DgExtractor {
  gchar *query;      /* text comprising SQL query used to extract data */
  DgFields *fields;  /* field names appearing in SQL query used to extract data */
} DgExtractor;

typedef struct _DgSelector {
  GtkCList *clist;   /* widget from which user selects data */
  DgFields *fields;  /* pointers to constructed fields whose corresponding data is available for selection */
} DgSelector;

typedef struct _DgExposer {
  GtkWidget *widget;  /* widget used to expose retrieved query data */
  DgField *field;     /* pointers to constructed fields whose corresponding data is available for exposure */
} DgExposer;

typedef GList DgExposers;

typedef enum _DgQueryType {
  DG_QUERY_TYPE_ORDINARY,       /* ordinary SQL query */
  DG_QUERY_TYPE_EMPTYCHECK,     /* check that result set of SQL query is empty */
  DG_QUERY_TYPE_NONEMPTYCHECK,  /* check that result set of SQL query is nonempty */
  DG_QUERY_TYPE_EMPTYTEST       /* take action according to whether result set of SQL query is empty */
} DgQueryType;

typedef GList DgQueries;  /* queries used to manipulate the database */

typedef struct _DgQuery {
  DgQueryType type;         /* specify whether the result set should be checked */
  gchar *query;             /* text comprising SQL query used to manipulate database */
  gchar *error_message;     /* when a check fails this error message is displayed */
  DgQueries *emptycase;     /* when a test yields empty these queries are executed */
  DgQueries *nonemptycase;  /* when a test yields nonempty these queries are executed */
} DgQuery;

typedef struct _DgExecutor {
  GtkToggleButton *atb;  /* add toggle button */
  GtkToggleButton *mtb;  /* modify toggle button */
  GtkToggleButton *rtb;  /* remove toggle button */
  GtkToggleButton *stb;  /* submit toggle button */
  GtkToggleButton *ctb;  /* cancel toggle button */
  DgQueries *inserter;   /* queries used to manipulate the database upon an add request */
  DgQueries *updater;    /* queries used to manipulate the database upon a modify request */
  DgQueries *deleter;    /* queries used to manipulate the database upon a remove request */
} DgExecutor;

typedef struct _DgManipulator {
  DgExposers *exps;  /* widget used to expose data to user and possibly allow manipulation */
  DgExecutor *exec;  /* when set to some value points to actions which may be carried out */
} DgManipulator;

typedef enum _DgControlState {
  DG_NONE,    /* user has not initiated any operation */
  DG_ADD,     /* user has initiated an add operation */
  DG_MODIFY,  /* user has initiated a modify operation */
  DG_REMOVE   /* user has initiated a remove operation */
} DgControlState;

typedef GList DgControls;

struct _DgXML;

typedef struct _DgControl {
  gchar *cname;          /* control name used to identify control */
  DgExtractor *extr;     /* pointer to data extraction structure */
  DgSelector *sel;       /* pointer to data selection structure */
  DgManipulator *manip;  /* pointer to data manipulation structure */
  GdaDataModel *dm;      /* result set from executed queries */
  gint rownum;           /* result set selected row number */
  DgControlState state;  /* control state */
  struct _DgControl *master;  /* master control node */
  DgControls *details;        /* detail control nodes */
  struct _DgXML *dg;     /* back pointer to data gui structure */
} DgControl;

typedef struct _DgMasterDetail {
  DgControl *master;   /* master control node */
  DgControl *detail;   /* detail control node */
  DgFields *fields;    /* master detail fields */
} DgMasterDetail;

typedef struct _DgMaplet {
  DgField *sfield;  /* sender field */
  DgField *rfield;  /* receiver field */
} DgMaplet;

typedef GList DgMaplets;

typedef struct _DgSendReceive {
  DgControl *sender;     /* control which knows about values to be copied to receiver */
  DgControl *receiver;   /* control which is to receive values from sender */
  DgMaplets *maplets;    /* correspondence of sender fields to receiver fields */
  GtkButton *messenger;  /* optional widget used to initiate data movement */
} DgSendReceive;

typedef GList DgMasterDetails;
typedef GList DgSendReceives;

typedef struct _DgXML {
  DgControls *ctls;         /* complete list of controls */
  DgMasterDetails *mds;     /* complete list of master details */
  DgSendReceives *srs;      /* complete list of send receives */
  GladeXML *xml;            /* glade XML user interface structure */
  GdaConnection *cnc;       /* database connection */
  GtkDialog *error_dialog;  /* dialog used to display errors */
  GtkLabel *error_label;    /* dialog label used to display error */
} DgXML;

typedef struct _DgControlIter {
  DgControl *ctl;
  GQueue *fringe;
} DgControlIter;

void dg_print_control(DgControl *control);

void dg_print_controls(DgControls *controls);

DgControl *dg_get_control_by_name(DgControls *controls, const char *cname);

#endif // PARSER_H
*滑块验证:
您需要登录后才可以回帖 登录 | 马上加入

本版积分规则

申请友链|Archiver|小黑屋|手机版|GTK+中文社区 ( 粤ICP备13080851号 )

我要啦免费统计

GMT+8, 2024-4-29 09:14 , Processed in 0.191534 second(s), 7 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表