And renamed the things in future.c, to round out uipriv_unix.h.
This commit is contained in:
parent
e0a2fc5841
commit
add92694bf
|
@ -1,7 +0,0 @@
|
|||
|
||||
// future.c
|
||||
extern void loadFutures(void);
|
||||
extern PangoAttribute *FUTURE_pango_attr_font_features_new(const gchar *features);
|
||||
extern PangoAttribute *FUTURE_pango_attr_foreground_alpha_new(guint16 alpha);
|
||||
extern PangoAttribute *FUTURE_pango_attr_background_alpha_new(guint16 alpha);
|
||||
extern gboolean FUTURE_gtk_widget_path_iter_set_object_name(GtkWidgetPath *path, gint pos, const char *name);
|
|
@ -57,7 +57,7 @@ static uiForEach processAttribute(const uiAttributedString *s, const uiAttribute
|
|||
(guint16) (g * 65535.0),
|
||||
(guint16) (b * 65535.0)));
|
||||
addattr(p, start, end,
|
||||
FUTURE_pango_attr_foreground_alpha_new(
|
||||
uiprivFUTURE_pango_attr_foreground_alpha_new(
|
||||
(guint16) (a * 65535.0)));
|
||||
break;
|
||||
case uiAttributeTypeBackground:
|
||||
|
@ -69,7 +69,7 @@ static uiForEach processAttribute(const uiAttributedString *s, const uiAttribute
|
|||
(guint16) (g * 65535.0),
|
||||
(guint16) (b * 65535.0)));
|
||||
addattr(p, start, end,
|
||||
FUTURE_pango_attr_background_alpha_new(
|
||||
uiprivFUTURE_pango_attr_background_alpha_new(
|
||||
(guint16) (a * 65535.0)));
|
||||
break;
|
||||
case uiAttributeTypeUnderline:
|
||||
|
@ -125,7 +125,7 @@ static uiForEach processAttribute(const uiAttributedString *s, const uiAttribute
|
|||
break;
|
||||
featurestr = uiprivOpenTypeFeaturesToPangoCSSFeaturesString(features);
|
||||
addattr(p, start, end,
|
||||
FUTURE_pango_attr_font_features_new(featurestr->str));
|
||||
uiprivFUTURE_pango_attr_font_features_new(featurestr->str));
|
||||
g_string_free(featurestr, TRUE);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -68,7 +68,7 @@ static GtkStyleContext *setButtonStyle(GtkWidget *widget)
|
|||
|
||||
path = gtk_widget_path_copy(gtk_style_context_get_path(base));
|
||||
gtk_widget_path_append_type(path, G_TYPE_NONE);
|
||||
if (!FUTURE_gtk_widget_path_iter_set_object_name(path, -1, "button"))
|
||||
if (!uiprivFUTURE_gtk_widget_path_iter_set_object_name(path, -1, "button"))
|
||||
// not on 3.20; try the type
|
||||
gtk_widget_path_iter_set_object_type(path, -1, GTK_TYPE_BUTTON);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ static PangoAttribute *(*newBGAlphaAttr)(guint16 alpha) = NULL;
|
|||
static void (*gwpIterSetObjectName)(GtkWidgetPath *path, gint pos, const char *name) = NULL;
|
||||
|
||||
// note that we treat any error as "the symbols aren't there" (and don't care if dlclose() failed)
|
||||
void loadFutures(void)
|
||||
void uiprivLoadFutures(void)
|
||||
{
|
||||
void *handle;
|
||||
|
||||
|
@ -30,28 +30,28 @@ void loadFutures(void)
|
|||
dlclose(handle);
|
||||
}
|
||||
|
||||
PangoAttribute *FUTURE_pango_attr_font_features_new(const gchar *features)
|
||||
PangoAttribute *uiprivFUTURE_pango_attr_font_features_new(const gchar *features)
|
||||
{
|
||||
if (newFeaturesAttr == NULL)
|
||||
return NULL;
|
||||
return (*newFeaturesAttr)(features);
|
||||
}
|
||||
|
||||
PangoAttribute *FUTURE_pango_attr_foreground_alpha_new(guint16 alpha)
|
||||
PangoAttribute *uiprivFUTURE_pango_attr_foreground_alpha_new(guint16 alpha)
|
||||
{
|
||||
if (newFGAlphaAttr == NULL)
|
||||
return NULL;
|
||||
return (*newFGAlphaAttr)(alpha);
|
||||
}
|
||||
|
||||
PangoAttribute *FUTURE_pango_attr_background_alpha_new(guint16 alpha)
|
||||
PangoAttribute *uiprivFUTURE_pango_attr_background_alpha_new(guint16 alpha)
|
||||
{
|
||||
if (newBGAlphaAttr == NULL)
|
||||
return NULL;
|
||||
return (*newBGAlphaAttr)(alpha);
|
||||
}
|
||||
|
||||
gboolean FUTURE_gtk_widget_path_iter_set_object_name(GtkWidgetPath *path, gint pos, const char *name)
|
||||
gboolean uiprivFUTURE_gtk_widget_path_iter_set_object_name(GtkWidgetPath *path, gint pos, const char *name)
|
||||
{
|
||||
if (gwpIterSetObjectName == NULL)
|
||||
return FALSE;
|
||||
|
|
|
@ -15,7 +15,7 @@ const char *uiInit(uiInitOptions *o)
|
|||
return msg;
|
||||
}
|
||||
uiprivInitAlloc();
|
||||
loadFutures();
|
||||
uiprivLoadFutures();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,4 +54,9 @@ extern cairo_surface_t *uiprivImageAppropriateSurface(uiImage *i, GtkWidget *w);
|
|||
// cellrendererbutton.c
|
||||
extern GtkCellRenderer *uiprivNewCellRendererButton(void);
|
||||
|
||||
#include "OLD_uipriv_unix.h"
|
||||
// future.c
|
||||
extern void uiprivLoadFutures(void);
|
||||
extern PangoAttribute *uiprivFUTURE_pango_attr_font_features_new(const gchar *features);
|
||||
extern PangoAttribute *uiprivFUTURE_pango_attr_foreground_alpha_new(guint16 alpha);
|
||||
extern PangoAttribute *uiprivFUTURE_pango_attr_background_alpha_new(guint16 alpha);
|
||||
extern gboolean uiprivFUTURE_gtk_widget_path_iter_set_object_name(GtkWidgetPath *path, gint pos, const char *name);
|
||||
|
|
Loading…
Reference in New Issue