diff options
author | José Alburquerque <jaalburqu@svn.gnome.org> | 2011-06-15 16:29:39 -0400 |
---|---|---|
committer | José Alburquerque <jaalburqu@svn.gnome.org> | 2011-06-15 16:36:40 -0400 |
commit | 9bd7541d3feffacd0c732ed93123ce11547009d4 (patch) | |
tree | 10a4602f9baafd32053f3a89127c243736ce7529 /glib/src/glib_functions.defs | |
parent | 088a3a84850ceb1eed06f99d68c051bad45134dc (diff) | |
download | glibmm-9bd7541d3feffacd0c732ed93123ce11547009d4.tar.gz |
DateTime: Add methods and create() methods not creating now instances.
* glib/src/glib_functions.defs: h2def.py missed the g_date_time_add*()
functions because they were preceded by an unknown macro, namely
G_GNUC_WARN_UNUSED_RESULT, so temporarily removed the macros and
regenerated this file to get the definitions for those functions.
h2def.py will probably have to be modified to skip over those macros
properly in the future. Also corrected the
g_date_time_[compare|hash|equal] definitions so that the functions
could be wrapped as method members of DateTime.
* glib/src/glib_functions.defs.patch: Added this patch file so future
editing of the above file should not be necessary.
* glib/src/datetime.hg: Added the missing create() and the rest of the
methods.
* tools/m4/convert_glib.m4: Added necessary conversions.
Diffstat (limited to 'glib/src/glib_functions.defs')
-rw-r--r-- | glib/src/glib_functions.defs | 104 |
1 files changed, 94 insertions, 10 deletions
diff --git a/glib/src/glib_functions.defs b/glib/src/glib_functions.defs index 4adc3ff1..fd38301e 100644 --- a/glib/src/glib_functions.defs +++ b/glib/src/glib_functions.defs @@ -3286,12 +3286,98 @@ ) ) -(define-function g_date_time_compare +(define-method add + (of-object "GDateTime") + (c-name "g_date_time_add") + (return-type "GDateTime*") + (parameters + '("GTimeSpan" "timespan") + ) +) + +(define-method add_years + (of-object "GDateTime") + (c-name "g_date_time_add_years") + (return-type "GDateTime*") + (parameters + '("gint" "years") + ) +) + +(define-method add_months + (of-object "GDateTime") + (c-name "g_date_time_add_months") + (return-type "GDateTime*") + (parameters + '("gint" "months") + ) +) + +(define-method add_weeks + (of-object "GDateTime") + (c-name "g_date_time_add_weeks") + (return-type "GDateTime*") + (parameters + '("gint" "weeks") + ) +) + +(define-method add_days + (of-object "GDateTime") + (c-name "g_date_time_add_days") + (return-type "GDateTime*") + (parameters + '("gint" "days") + ) +) + +(define-method add_hours + (of-object "GDateTime") + (c-name "g_date_time_add_hours") + (return-type "GDateTime*") + (parameters + '("gint" "hours") + ) +) + +(define-method add_minutes + (of-object "GDateTime") + (c-name "g_date_time_add_minutes") + (return-type "GDateTime*") + (parameters + '("gint" "minutes") + ) +) + +(define-method add_seconds + (of-object "GDateTime") + (c-name "g_date_time_add_seconds") + (return-type "GDateTime*") + (parameters + '("gdouble" "seconds") + ) +) + +(define-method add_full + (of-object "GDateTime") + (c-name "g_date_time_add_full") + (return-type "GDateTime*") + (parameters + '("gint" "years") + '("gint" "months") + '("gint" "days") + '("gint" "hours") + '("gint" "minutes") + '("gdouble" "seconds") + ) +) + +(define-method compare + (of-object "GDateTime") (c-name "g_date_time_compare") (return-type "gint") (parameters - '("gconstpointer" "dt1") - '("gconstpointer" "dt2") + '("GDateTime*" "dt2") ) ) @@ -3304,20 +3390,18 @@ ) ) -(define-function g_date_time_hash +(define-method hash + (of-object "GDateTime") (c-name "g_date_time_hash") (return-type "guint") - (parameters - '("gconstpointer" "datetime") - ) ) -(define-function g_date_time_equal +(define-method equal + (of-object "GDateTime") (c-name "g_date_time_equal") (return-type "gboolean") (parameters - '("gconstpointer" "dt1") - '("gconstpointer" "dt2") + '("GDateTime*" "dt2") ) ) |