Logo Search packages:      
Sourcecode: ibus-chewing version File versions  Download package

maker-dialog.h

/* Generated by GOB (v2.0.15)   (do not edit directly) */



/*
 * Copyright © 2009  Red Hat, Inc. All rights reserved.
 * Copyright © 2009  Ding-Yi Chen <dchen at redhat.com>
 *
 * This file is part of the ibus-chewing Project.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
#include <stdlib.h>
#include <strings.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <locale.h>

#include <glib.h>
#include <glib-object.h>


#ifndef MAKER_DIALOG_H_
#define MAKER_DIALOG_H_



typedef guint MakerDialogPropertyFlags;

typedef struct _PropertyContext PropertyContext;
typedef GValue *(* CallbackGetFunc)(PropertyContext *ctx);
typedef void(* CallbackSetFunc)(PropertyContext *ctx, GValue *value);

typedef struct{
    GType valueType;
    gchar key[30];
    gchar pageName[50];
    gchar label[200];
    gchar defaultValue[100];
    const gchar **validValues;
    gchar *translationContext;

    gint min;
    gint max;

    CallbackGetFunc getFunc;
    CallbackSetFunc setFunc;

    MakerDialogPropertyFlags propertyFlags;
    gint width;
    gint height;
    const gchar *tooltip;
    gpointer userData;
} PropertySpec;

struct _PropertyContext{
    PropertySpec *spec;
    gpointer userData;  //<! User data to be used in callback.

};

#ifndef WIDGET_ID_PREFIX
#define WIDGET_ID_PREFIX "+"
#endif

#ifndef STRING_BUFFER_SIZE_DEFAULT
#define STRING_BUFFER_SIZE_DEFAULT 1000
#endif




#endif /* MAKER_DIALOG_H_ */

#ifndef __MAKER_DIALOG_H__
#define __MAKER_DIALOG_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */


typedef enum {
      MAKER_DIALOG_PROPERTY_FLAG_INVISIBLE = 0x1,
      MAKER_DIALOG_PROPERTY_FLAG_INSENSITIVE = 0x2,
      MAKER_DIALOG_PROPERTY_FLAG_INEDITABLE = 0x4,
      MAKER_DIALOG_PROPERTY_FLAG_HAS_TRANSLATION = 0x8,
      MAKER_DIALOG_PROPERTY_FLAG_TRANSLATION_WITH_CONTEXT = 0x10
} MakerDialogPropertyFlag;
#define MAKER_TYPE_DIALOG_PROPERTY_FLAG maker_dialog_property_flag_get_type()
GType maker_dialog_property_flag_get_type (void);


/*
 * Type checking and casting macros
 */
#define MAKER_TYPE_DIALOG     (maker_dialog_get_type())
#define MAKER_DIALOG(obj)     G_TYPE_CHECK_INSTANCE_CAST((obj), maker_dialog_get_type(), MakerDialog)
#define MAKER_DIALOG_CONST(obj)     G_TYPE_CHECK_INSTANCE_CAST((obj), maker_dialog_get_type(), MakerDialog const)
#define MAKER_DIALOG_CLASS(klass)   G_TYPE_CHECK_CLASS_CAST((klass), maker_dialog_get_type(), MakerDialogClass)
#define MAKER_IS_DIALOG(obj)  G_TYPE_CHECK_INSTANCE_TYPE((obj), maker_dialog_get_type ())

#define MAKER_DIALOG_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), maker_dialog_get_type(), MakerDialogClass)

/* Private structure type */
typedef struct _MakerDialogPrivate MakerDialogPrivate;

/*
 * Main object structure
 */
#ifndef __TYPEDEF_MAKER_DIALOG__
#define __TYPEDEF_MAKER_DIALOG__
typedef struct _MakerDialog MakerDialog;
#endif
struct _MakerDialog {
      GtkDialog __parent__;
      /*< public >*/
      gboolean vbox_homogeneous;
      gint hbox_spacing;
      gint vbox_spacing;
      GtkWidget * dialog_notebook;
      /*< private >*/
      MakerDialogPrivate *_priv;
};

/*
 * Class definition
 */
typedef struct _MakerDialogClass MakerDialogClass;
struct _MakerDialogClass {
      GtkDialogClass __parent__;
};


/*
 * Public methods
 */
GType maker_dialog_get_type   (void);
MakerDialog *     maker_dialog_new  (void);
MakerDialog *     maker_dialog_new_full   (const gchar * title,
                              int notebook_pages,
                              const gchar ** notebook_page_labels,
                              int button_num,
                              const gchar ** button_labels,
                              GtkResponseType * button_responses);
void  maker_dialog_set_verbose_level      (MakerDialog * self,
                              gint level);
PropertyContext *       maker_dialog_add_property_no_gui    (MakerDialog * self,
                              PropertySpec * pSpec,
                              gpointer user_data);
gboolean    maker_dialog_add_property     (MakerDialog * self,
                              PropertySpec * pSpec,
                              const gchar * initValue,
                              gpointer user_data);
void  maker_dialog_align_labels     (MakerDialog * self,
                              const gchar * pageName,
                              gfloat xalign,
                              gfloat yalign);
void  maker_dialog_reload_property_value  (MakerDialog * self,
                              const gchar * key);
gboolean    maker_dialog_write_gconf_schemas_file     (MakerDialog * self,
                              const gchar * filename,
                              const gchar * owner,
                              const gchar * schemasHome,
                              const gchar * locales);
void  maker_dialog_apply_widget_value     (MakerDialog * self,
                              const gchar * key);
GValue *    maker_dialog_get_widget_value (MakerDialog * self,
                              const gchar * key,
                              GValue * gValue);
void  maker_dialog_set_widget_value (MakerDialog * self,
                              const gchar * key,
                              GValue * value);
GtkWidget *       maker_dialog_get_widget (MakerDialog * self,
                              const gchar * widget_key,
                              const gchar * widget_type);
GtkWidget *       maker_dialog_get_widget_by_key      (MakerDialog * self,
                              const gchar * key);
GtkWidget *       maker_dialog_get_widget_by_id (MakerDialog * self,
                              const gchar * id);
PropertyContext *       maker_dialog_get_propertyContext_by_key   (MakerDialog * self,
                              const gchar * key);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif

Generated by  Doxygen 1.6.0   Back to index