summaryrefslogtreecommitdiff
path: root/src/api.c
diff options
context:
space:
mode:
authorrhp <rhp>2001-06-01 03:00:01 +0000
committerrhp <rhp>2001-06-01 03:00:01 +0000
commit31d6e2dca070048c339cf7b418ff51d74192b121 (patch)
treeeb8b866c79b6ad7d632a7c5fda4b88a71a677286 /src/api.c
parent85bd843b011bffc151cdb03134f9afcc01edffa7 (diff)
downloadmetacity-31d6e2dca070048c339cf7b418ff51d74192b121.tar.gz
...
Diffstat (limited to 'src/api.c')
-rw-r--r--src/api.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/api.c b/src/api.c
new file mode 100644
index 00000000..da09db4e
--- /dev/null
+++ b/src/api.c
@@ -0,0 +1,54 @@
+/* Metacity misc. public entry points */
+
+/*
+ * Copyright (C) 2001 Havoc Pennington
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include "api.h"
+#include "display.h"
+#include "colors.h"
+
+PangoContext*
+meta_get_pango_context (Screen *xscreen,
+ const PangoFontDescription *desc,
+ Window frame)
+{
+ MetaScreen *screen;
+
+ screen = meta_screen_for_x_screen (xscreen);
+
+ g_return_val_if_fail (screen != NULL, NULL);
+
+ return meta_screen_get_pango_context (screen,
+ desc,
+ /* FIXME, from the frame window */
+ PANGO_DIRECTION_LTR);
+}
+
+gulong
+meta_get_x_pixel (Screen *xscreen, const PangoColor *color)
+{
+ MetaScreen *screen;
+
+ screen = meta_screen_for_x_screen (xscreen);
+
+ g_return_val_if_fail (screen != NULL, 0);
+
+ return meta_screen_get_x_pixel (screen, color);
+}
+