/usr/include/gnucash/dialog-utils.h is in gnucash-common 1:2.4.10-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | /********************************************************************\
* dialog-utils.h -- utility functions for creating dialogs *
* for GnuCash *
* Copyright (C) 1999-2000 Linas Vepstas *
* Copyright (C) 2005 David Hampton <hampton@employees.org> *
* *
* 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, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#ifndef DIALOG_UTILS_H
#define DIALOG_UTILS_H
#include <glade/glade.h>
#include <gtk/gtk.h>
#include "qof.h"
/* option button callback function */
#ifdef GTKCOMBOBOX_TOOLTIPS_WORK
typedef void (*GNCOptionCallback) (GtkWidget *,
gpointer user_data);
#else
typedef void (*GNCOptionCallback) (GtkWidget *, gint index,
gpointer user_data);
#endif
/* Structure for building option buttons */
typedef struct _GNCOptionInfo GNCOptionInfo;
struct _GNCOptionInfo
{
char *name;
char *tip;
GNCOptionCallback callback;
gpointer user_data;
};
/**** PROTOTYPES *************************************************/
GtkWidget * gnc_build_option_menu (GNCOptionInfo *option_info,
gint num_options);
GtkToolbarStyle gnc_get_toolbar_style (void);
void gnc_get_deficit_color (GdkColor *color);
void gnc_set_label_color (GtkWidget *label, gnc_numeric value);
/********************************************************************\
* Returns the window size to use for the given option prefix, *
* if window sizes are being saved, otherwise returns 0 for both. *
* *
* Args: prefix - the option name prefix *
* width - pointer to width *
* height - pointer to height *
* Returns: nothing *
\*******************************************************************/
void gnc_restore_window_size (const char *prefix, GtkWindow *window);
/********************************************************************\
* Save the window size into options whose names are determined *
* by the string prefix. *
* *
* Args: prefix - determines the options used to save the values *
* width - width of the window to save *
* height - height of the window to save *
* Returns: nothing *
\********************************************************************/
void gnc_save_window_size (const char *section, GtkWindow *window);
void gnc_option_menu_init (GtkWidget * option_menu);
void gnc_option_menu_init_w_signal(GtkWidget * w,
GCallback f,
gpointer cb_data);
int gnc_option_menu_get_active (GtkWidget * option_menu);
/********************************************************************\
* Adjust the window size if it is bigger than the screen size. *
* *
* Args: window - the window to adjust *
* Returns: nothing *
\********************************************************************/
void gnc_window_adjust_for_screen (GtkWindow * window);
gboolean gnc_handle_date_accelerator (GdkEventKey *event,
struct tm *tm,
const char *date_str);
/* This function sets a pixmap of a set or cleared check mark in a
* cell of a GtkCList row.
*
* There are some restrictions on using this function. If you mix
* this function with gtk_clist_{insert, prepend, remove} before
* the clist is realized, then the checks may appear in the wrong
* place. Stick to gtk_clist_append, or use gnc_clist_set_check
* after you have built the list. This only applies to unrealized
* widgets. */
#ifdef __GTK_CLIST_H__
void gnc_clist_set_check (GtkCList *list, int row, int col,
gboolean checked);
#endif
GladeXML * gnc_glade_xml_new (const char *filename, const char *root);
GtkWidget * gnc_glade_lookup_widget (GtkWidget *widget, const char *name);
void gnc_glade_autoconnect_full_func(const gchar *handler_name,
GObject *signal_object,
const gchar *signal_name,
const gchar *signal_data,
GObject *connect_object,
gboolean after,
gpointer user_data);
/** This function generates a button with icon and adds it to a
* GtkDialog. This is similar to just adding a stock button to the
* dialog, only you can add an arbitrary pairing of button and label,
* which the stock system doesn't provide.
*
* @param dialog The dialog where the button should be added.
*
* @param label The text of the button.
*
* @param stock_id The name of the stock button to use.
*
* @param response The response id to return if this button is
* clicked.*/
void gnc_gtk_dialog_add_button (GtkWidget *dialog,
const gchar *label,
const gchar *stock_id,
guint response);
/** Note: This dialog is modal! (It calls gtk_dialog_run() which is modal.)
*/
gint
gnc_dialog_run(GtkDialog *dialog, const gchar *gconf_key);
#endif
|