[pygtk/gtk-3.0: 20/55] Deprecated: Remove GdkFont
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygtk/gtk-3.0: 20/55] Deprecated: Remove GdkFont
- Date: Sat, 17 Jul 2010 00:26:05 +0000 (UTC)
commit 07ee8408db06b29c7af0bb00d1e85d0b013f4109
Author: John Stowers <john stowers gmail com>
Date: Sat Jul 10 20:01:12 2010 +1200
Deprecated: Remove GdkFont
gtk/gdk-base-types.defs | 23 ---
gtk/gdk-base.defs | 341 -----------------------------------------------
gtk/gdk.override | 18 ---
gtk/gdkdraw.override | 25 ----
gtk/gdkgc.override | 26 ----
gtk/gtk-base.defs | 44 ------
6 files changed, 0 insertions(+), 477 deletions(-)
---
diff --git a/gtk/gdk-base-types.defs b/gtk/gdk-base-types.defs
index 5f39534..64ec8d9 100644
--- a/gtk/gdk-base-types.defs
+++ b/gtk/gdk-base-types.defs
@@ -204,19 +204,6 @@
(release-func "gdk_event_free")
)
-(define-boxed Font
- (in-module "Gdk")
- (c-name "GdkFont")
- (gtype-id "GDK_TYPE_FONT")
- (copy-func "gdk_font_ref")
- (release-func "gdk_font_unref")
- (fields
- '("GdkFontType" "type")
- '("gint" "ascent")
- '("gint" "descent")
- )
-)
-
(define-boxed Color
(in-module "Gdk")
(c-name "GdkColor")
@@ -477,16 +464,6 @@
)
)
-(define-enum FontType
- (in-module "Gdk")
- (c-name "GdkFontType")
- (gtype-id "GDK_TYPE_FONT_TYPE")
- (values
- '("font" "GDK_FONT_FONT")
- '("fontset" "GDK_FONT_FONTSET")
- )
-)
-
(define-enum CapStyle
(in-module "Gdk")
(c-name "GdkCapStyle")
diff --git a/gtk/gdk-base.defs b/gtk/gdk-base.defs
index 7f0eb67..f3d38e3 100644
--- a/gtk/gdk-base.defs
+++ b/gtk/gdk-base.defs
@@ -1303,50 +1303,6 @@
)
)
-(define-method draw_string
- (deprecated "use GdkDrawable.draw_layout")
- (of-object "GdkDrawable")
- (c-name "gdk_draw_string")
- (return-type "none")
- (parameters
- '("GdkFont*" "font")
- '("GdkGC*" "gc")
- '("gint" "x")
- '("gint" "y")
- '("const-gchar*" "string")
- )
-)
-
-(define-method draw_text
- (deprecated "use GdkDrawable.draw_layout")
- (of-object "GdkDrawable")
- (c-name "gdk_draw_text")
- (return-type "none")
- (parameters
- '("GdkFont*" "font")
- '("GdkGC*" "gc")
- '("gint" "x")
- '("gint" "y")
- '("const-gchar*" "text")
- '("gint" "text_length")
- )
-)
-
-(define-method draw_text_wc
- (deprecated "use GdkDrawable.draw_layout")
- (of-object "GdkDrawable")
- (c-name "gdk_draw_text_wc")
- (return-type "none")
- (parameters
- '("GdkFont*" "font")
- '("GdkGC*" "gc")
- '("gint" "x")
- '("gint" "y")
- '("const-GdkWChar*" "text")
- '("gint" "text_length")
- )
-)
-
(define-method draw_drawable
(of-object "GdkDrawable")
(c-name "gdk_draw_drawable")
@@ -1596,32 +1552,6 @@
)
)
-(define-virtual draw_text
- (of-object "GdkDrawable")
- (return-type "none")
- (parameters
- '("GdkFont*" "font")
- '("GdkGC*" "gc")
- '("gint" "x")
- '("gint" "y")
- '("const-gchar*" "text")
- '("gint" "text_length")
- )
-)
-
-(define-virtual draw_text_wc
- (of-object "GdkDrawable")
- (return-type "none")
- (parameters
- '("GdkFont*" "font")
- '("GdkGC*" "gc")
- '("gint" "x")
- '("gint" "y")
- '("const-GdkWChar*" "text")
- '("gint" "text_length")
- )
-)
-
(define-virtual draw_drawable
(of-object "GdkDrawable")
(return-type "none")
@@ -1974,249 +1904,6 @@
)
-
-
-;; From /opt/gtk2/include/gtk-2.0/gdk/gdkfont.h
-
-(define-function font_get_type
- (c-name "gdk_font_get_type")
- (return-type "GType")
-)
-
-(define-method ref
- (of-object "GdkFont")
- (c-name "gdk_font_ref")
- (return-type "GdkFont*")
-)
-
-(define-method unref
- (of-object "GdkFont")
- (c-name "gdk_font_unref")
- (return-type "none")
-)
-
-(define-method equal
- (of-object "GdkFont")
- (c-name "gdk_font_equal")
- (return-type "gboolean")
- (parameters
- '("const-GdkFont*" "fontb")
- )
-)
-
-(define-method id
- (of-object "GdkFont")
- (c-name "gdk_font_id")
- (return-type "gint")
-)
-
-(define-function font_load_for_display
- (c-name "gdk_font_load_for_display")
- (return-type "GdkFont*")
- (parameters
- '("GdkDisplay*" "display")
- '("const-gchar*" "font_name")
- )
-)
-
-(define-function fontset_load_for_display
- (c-name "gdk_fontset_load_for_display")
- (return-type "GdkFont*")
- (parameters
- '("GdkDisplay*" "display")
- '("const-gchar*" "fontset_name")
- )
-)
-
-(define-function font_from_description_for_display
- (c-name "gdk_font_from_description_for_display")
- (return-type "GdkFont*")
- (parameters
- '("GdkDisplay*" "display")
- '("PangoFontDescription*" "font_desc")
- )
-)
-
-(define-function font_load
- (is-constructor-of GdkFont)
- (c-name "gdk_font_load")
- (return-type "GdkFont*")
- (parameters
- '("const-gchar*" "font_name")
- )
-)
-
-(define-function fontset_load
- (c-name "gdk_fontset_load")
- (return-type "GdkFont*")
- (parameters
- '("const-gchar*" "fontset_name")
- )
-)
-
-(define-function font_from_description
- (c-name "gdk_font_from_description")
- (return-type "GdkFont*")
- (parameters
- '("PangoFontDescription*" "font_desc")
- )
-)
-
-(define-method string_width
- (of-object "GdkFont")
- (c-name "gdk_string_width")
- (return-type "gint")
- (parameters
- '("const-gchar*" "string")
- )
-)
-
-(define-method width
- (of-object "GdkFont")
- (c-name "gdk_text_width")
- (return-type "gint")
- (parameters
- '("const-gchar*" "text")
- '("gint" "text_length" (default "-1"))
- )
-)
-
-(define-method text_width_wc
- (of-object "GdkFont")
- (c-name "gdk_text_width_wc")
- (return-type "gint")
- (parameters
- '("const-GdkWChar*" "text")
- '("gint" "text_length")
- )
-)
-
-(define-method char_width
- (of-object "GdkFont")
- (c-name "gdk_char_width")
- (return-type "gint")
- (parameters
- '("gchar" "character")
- )
-)
-
-(define-method char_width_wc
- (of-object "GdkFont")
- (c-name "gdk_char_width_wc")
- (return-type "gint")
- (parameters
- '("GdkWChar" "character")
- )
-)
-
-(define-method string_measure
- (of-object "GdkFont")
- (c-name "gdk_string_measure")
- (return-type "gint")
- (parameters
- '("const-gchar*" "string")
- )
-)
-
-(define-method measure
- (of-object "GdkFont")
- (c-name "gdk_text_measure")
- (return-type "gint")
- (parameters
- '("const-gchar*" "text")
- '("gint" "text_length" (default "-1"))
- )
-)
-
-(define-method char_measure
- (of-object "GdkFont")
- (c-name "gdk_char_measure")
- (return-type "gint")
- (parameters
- '("gchar" "character")
- )
-)
-
-(define-method string_height
- (of-object "GdkFont")
- (c-name "gdk_string_height")
- (return-type "gint")
- (parameters
- '("const-gchar*" "string")
- )
-)
-
-(define-method height
- (of-object "GdkFont")
- (c-name "gdk_text_height")
- (return-type "gint")
- (parameters
- '("const-gchar*" "text")
- '("gint" "text_length" (default "-1"))
- )
-)
-
-(define-method char_height
- (of-object "GdkFont")
- (c-name "gdk_char_height")
- (return-type "gint")
- (parameters
- '("gchar" "character")
- )
-)
-
-(define-method extents
- (of-object "GdkFont")
- (c-name "gdk_text_extents")
- (return-type "none")
- (parameters
- '("const-gchar*" "text")
- '("gint" "text_length")
- '("gint*" "lbearing")
- '("gint*" "rbearing")
- '("gint*" "width")
- '("gint*" "ascent")
- '("gint*" "descent")
- )
-)
-
-(define-method text_extents_wc
- (of-object "GdkFont")
- (c-name "gdk_text_extents_wc")
- (return-type "none")
- (parameters
- '("const-GdkWChar*" "text")
- '("gint" "text_length")
- '("gint*" "lbearing")
- '("gint*" "rbearing")
- '("gint*" "width")
- '("gint*" "ascent")
- '("gint*" "descent")
- )
-)
-
-(define-method string_extents
- (of-object "GdkFont")
- (c-name "gdk_string_extents")
- (return-type "none")
- (parameters
- '("const-gchar*" "string")
- '("gint*" "lbearing")
- '("gint*" "rbearing")
- '("gint*" "width")
- '("gint*" "ascent")
- '("gint*" "descent")
- )
-)
-
-(define-method "get_display"
- (of-object "GdkFont")
- (c-name "gdk_font_get_display")
- (return-type "GdkDisplay*")
-)
-
-
-
;; From /opt/gtk2/include/gtk-2.0/gdk/gdkgc.h
(define-method ref
@@ -2301,15 +1988,6 @@
)
)
-(define-method set_font
- (of-object "GdkGC")
- (c-name "gdk_gc_set_font")
- (return-type "none")
- (parameters
- '("GdkFont*" "font")
- )
-)
-
(define-method set_function
(of-object "GdkGC")
(c-name "gdk_gc_set_function")
@@ -6814,23 +6492,4 @@
)
)
-(define-method get_xfont
- (of-object "GdkFont")
- (c-name "gdk_x11_font_get_xfont")
- (return-type "gpointer")
-)
-
-(define-method x11_font_get_xdisplay
- (of-object "GdkFont")
- (c-name "gdk_x11_font_get_xdisplay")
- (return-type "Display*")
-)
-
-(define-method get_name
- (of-object "GdkFont")
- (c-name "gdk_x11_font_get_name")
- (return-type "const-char*")
-)
-
-
) ; (ifdef GDK_TARGET_X11
diff --git a/gtk/gdk.override b/gtk/gdk.override
index 0101546..96b06c3 100644
--- a/gtk/gdk.override
+++ b/gtk/gdk.override
@@ -158,24 +158,6 @@ _wrap_gdk_fontset_load(PyObject *self, PyObject *args, PyObject *kwargs)
FALSE, TRUE);
}
%%
-override gdk_text_extents kwargs
-static PyObject *
-_wrap_gdk_text_extents(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "text", NULL };
- gchar *text;
- Py_ssize_t length;
- gint lbearing, rbearing, width, ascent, descent;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#:GdkFont.extents",
- kwlist, &text, &length))
- return NULL;
- gdk_text_extents(pyg_boxed_get(self, GdkFont), text, length,
- &lbearing, &rbearing, &width, &ascent, &descent);
- return Py_BuildValue("(iiiii)", lbearing, rbearing, width,
- ascent, descent);
-}
-%%
override gdk_pixmap_create_from_xpm kwargs
static PyObject *
_wrap_gdk_pixmap_create_from_xpm(PyObject *self, PyObject *args,
diff --git a/gtk/gdkdraw.override b/gtk/gdkdraw.override
index c2133eb..3e34da5 100644
--- a/gtk/gdkdraw.override
+++ b/gtk/gdkdraw.override
@@ -62,31 +62,6 @@ _wrap_gdk_draw_polygon(PyGObject *self, PyObject *args, PyObject *kwargs)
return Py_None;
}
%%
-override gdk_draw_text kwargs
-static PyObject *
-_wrap_gdk_draw_text(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "font", "gc", "x", "y", "text",NULL};
- PyGObject *gc;
- PyObject *font;
- int x, y;
- Py_ssize_t len;
- char *text;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "OO!iis#:GdkDrawable.draw_text", kwlist,
- &font, &PyGdkGC_Type, &gc,
- &x, &y, &text, &len))
- return NULL;
- if (!pyg_boxed_check(font, GDK_TYPE_FONT)) {
- PyErr_SetString(PyExc_TypeError, "font must be a GdkFont");
- return NULL;
- }
- gdk_draw_text(GDK_DRAWABLE(self->obj), pyg_boxed_get(font, GdkFont),
- GDK_GC(gc->obj), x, y, text, len);
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
override gdk_draw_points kwargs
static PyObject *
_wrap_gdk_draw_points(PyGObject *self, PyObject *args, PyObject *kwargs)
diff --git a/gtk/gdkgc.override b/gtk/gdkgc.override
index afa73fd..d0fc2f8 100644
--- a/gtk/gdkgc.override
+++ b/gtk/gdkgc.override
@@ -66,13 +66,6 @@ _wrap_gdk_gc_new(PyGObject *self, PyObject *args, PyObject *kwargs)
PyErr_SetString(PyExc_TypeError, "background must be a GdkColor");
return -1;
}
- if (pyg_boxed_check(font, GDK_TYPE_FONT)) {
- mask |= GDK_GC_FONT;
- values.font = pyg_boxed_get(font, GdkFont);
- } else if (font != Py_None) {
- PyErr_SetString(PyExc_TypeError, "font must be a GdkFont");
- return -1;
- }
if (function != -1) {
mask |= GDK_GC_FUNCTION;
values.function = function;
@@ -199,13 +192,6 @@ _wrap_gdk_gc_new_with_values(PyGObject *self, PyObject *args, PyObject *kwargs)
PyErr_SetString(PyExc_TypeError, "background must be a GdkColor");
return NULL;
}
- if (pyg_boxed_check(font, GDK_TYPE_FONT)) {
- mask |= GDK_GC_FONT;
- values.font = pyg_boxed_get(font, GdkFont);
- } else if (font != Py_None) {
- PyErr_SetString(PyExc_TypeError, "font must be a GdkFont");
- return NULL;
- }
if (function != -1) {
mask |= GDK_GC_FUNCTION;
values.function = function;
@@ -342,13 +328,6 @@ _wrap_gdk_gc_set_values(PyGObject *self, PyObject *args, PyObject *kwargs)
PyErr_SetString(PyExc_TypeError, "background must be a GdkColor");
return NULL;
}
- if (pyg_boxed_check(font, GDK_TYPE_FONT)) {
- mask |= GDK_GC_FONT;
- values.font = pyg_boxed_get(font, GdkFont);
- } else if (font != Py_None) {
- PyErr_SetString(PyExc_TypeError, "font must be a GdkFont");
- return NULL;
- }
if (function != -1) {
mask |= GDK_GC_FUNCTION;
values.function = function;
@@ -562,11 +541,6 @@ _wrap_gdk_gc_tp_setattro(PyGObject *self, PyObject *py_attr, PyObject *value)
gdk_gc_set_background(gc, c);
return 0;
}
- } else if (pyg_boxed_check(value, GDK_TYPE_FONT)) {
- if (!strcmp(attr, "font")) {
- gdk_gc_set_font(gc, pyg_boxed_get(value, GdkFont));
- return 0;
- }
} else if (pygobject_check(value, &PyGdkWindow_Type) || value == Py_None) {
PyGObject *window = (PyGObject *)value;
GdkWindow *w = (value==Py_None)?NULL:GDK_WINDOW(window->obj);
diff --git a/gtk/gtk-base.defs b/gtk/gtk-base.defs
index 01e76a9..f39778b 100644
--- a/gtk/gtk-base.defs
+++ b/gtk/gtk-base.defs
@@ -6889,13 +6889,6 @@
(return-type "gchar*")
)
-(define-method get_font
- (of-object "GtkFontSelection")
- (c-name "gtk_font_selection_get_font")
- (return-type "GdkFont*")
- (deprecated "use GtkFontSelection.get_font_name")
-)
-
(define-method set_font_name
(of-object "GtkFontSelection")
(c-name "gtk_font_selection_set_font_name")
@@ -6940,13 +6933,6 @@
(return-type "gchar*")
)
-(define-method get_font
- (of-object "GtkFontSelectionDialog")
- (c-name "gtk_font_selection_dialog_get_font")
- (return-type "GdkFont*")
- (deprecated "use GtkFontSelectionDialog.get_font_name")
-)
-
(define-method set_font_name
(of-object "GtkFontSelectionDialog")
(c-name "gtk_font_selection_dialog_set_font_name")
@@ -14995,23 +14981,6 @@
(deprecated "")
)
-(define-method get_font
- (of-object "GtkStyle")
- (c-name "gtk_style_get_font")
- (return-type "GdkFont*")
- (deprecated "")
-)
-
-(define-method set_font
- (of-object "GtkStyle")
- (c-name "gtk_style_set_font")
- (return-type "none")
- (parameters
- '("GdkFont*" "font")
- )
- (deprecated "")
-)
-
(define-method set_background
(of-object "GtkStyle")
(c-name "gtk_style_set_background")
@@ -16459,19 +16428,6 @@
(return-type "none")
)
-(define-method insert
- (of-object "GtkText")
- (c-name "gtk_text_insert")
- (return-type "none")
- (parameters
- '("GdkFont*" "font")
- '("const-GdkColor*" "fore")
- '("const-GdkColor*" "back")
- '("const-char*" "chars")
- '("gint" "length")
- )
-)
-
(define-method backward_delete
(of-object "GtkText")
(c-name "gtk_text_backward_delete")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]