[gtk-mac-integration] Update internals of former ige-mac-foo files
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-mac-integration] Update internals of former ige-mac-foo files
- Date: Mon, 3 Oct 2011 21:50:16 +0000 (UTC)
commit 1307c538e439d314de72c4bc7be0a37b672985b5
Author: John Ralls <jralls ceridwen us>
Date: Mon Oct 3 14:10:11 2011 -0700
Update internals of former ige-mac-foo files
bindings/python/gtkmacintegration/Makefile.am | 38 ++++----
bindings/python/gtkmacintegration/__init__.py | 18 ++--
.../gtkmacintegration/gtkmacintegration-module.c | 20 ++--
.../gtkmacintegration/gtkmacintegration.override | 26 +++---
data/gtk-mac-integration.pc.in | 6 +-
src/gtk-mac-bundle.c | 78 +++++++-------
src/gtk-mac-bundle.h | 46 ++++----
src/gtk-mac-dock.c | 112 ++++++++++----------
src/gtk-mac-dock.h | 66 ++++++------
src/gtk-mac-image-utils.c | 16 ++--
src/gtk-mac-image-utils.h | 8 +-
src/gtk-mac-integration.h | 10 +-
src/gtk-mac-menu.c | 68 ++++++------
src/gtk-mac-menu.h | 24 ++--
src/gtk-mac-private.h | 10 +-
15 files changed, 273 insertions(+), 273 deletions(-)
---
diff --git a/bindings/python/gtkmacintegration/Makefile.am b/bindings/python/gtkmacintegration/Makefile.am
index 13649bf..a95e8e7 100644
--- a/bindings/python/gtkmacintegration/Makefile.am
+++ b/bindings/python/gtkmacintegration/Makefile.am
@@ -1,31 +1,31 @@
INCLUDES = -I$(top_srcdir)/src $(PYTHON_INCLUDES)
-igemacintegrationdir = $(libdir)/python$(PYTHON_VERSION)/site-packages/igemacintegration
+gtkmacintegrationdir = $(libdir)/python$(PYTHON_VERSION)/site-packages/gtkmacintegration
-igemacintegration_PYTHON = __init__.py
-igemacintegration_LTLIBRARIES = _igemacintegration.la
+gtkmacintegration_PYTHON = __init__.py
+gtkmacintegration_LTLIBRARIES = _gtkmacintegration.la
headers = \
- $(top_srcdir)/src/ige-mac-menu.h \
- $(top_srcdir)/src/ige-mac-dock.h \
- $(top_srcdir)/src/ige-mac-bundle.h
+ $(top_srcdir)/src/gtk-mac-menu.h \
+ $(top_srcdir)/src/gtk-mac-dock.h \
+ $(top_srcdir)/src/gtk-mac-bundle.h
-igemacintegration.defs: $(headers)
+gtkmacintegration.defs: $(headers)
$(PYTHON) $(datadir)/pygobject/2.0/codegen/h2def.py $(headers) > $@
-igemacintegration.c: igemacintegration.defs igemacintegration.override
+gtkmacintegration.c: gtkmacintegration.defs gtkmacintegration.override
-_igemacintegration_la_CFLAGS = \
+_gtkmacintegration_la_CFLAGS = \
$(MAC_CFLAGS) \
$(PYGTK_CFLAGS)
-_igemacintegration_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_igemacintegration
-_igemacintegration_la_LIBADD = \
+_gtkmacintegration_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gtkmacintegration
+_gtkmacintegration_la_LIBADD = \
$(MAC_LIBS) \
$(PYGTK_LIBS) \
- $(top_builddir)/src/libigemacintegration.la
-_igemacintegration_la_SOURCES = \
- igemacintegration.c \
- igemacintegration-module.c
+ $(top_builddir)/src/libgtkmacintegration.la
+_gtkmacintegration_la_SOURCES = \
+ gtkmacintegration.c \
+ gtkmacintegration-module.c
.defs.c:
($(PYGOBJECT_CODEGEN) \
@@ -37,9 +37,9 @@ _igemacintegration_la_SOURCES = \
&& rm -f gen-$*.c
CLEANFILES = \
- igemacintegration.defs \
- igemacintegration.c
+ gtkmacintegration.defs \
+ gtkmacintegration.c
EXTRA_DIST = \
- igemacintegration.defs \
- igemacintegration.override
+ gtkmacintegration.defs \
+ gtkmacintegration.override
diff --git a/bindings/python/gtkmacintegration/__init__.py b/bindings/python/gtkmacintegration/__init__.py
index abf047f..37b7cd2 100644
--- a/bindings/python/gtkmacintegration/__init__.py
+++ b/bindings/python/gtkmacintegration/__init__.py
@@ -19,30 +19,30 @@
import sys
-if 'igemacintegration._igemacintegration' in sys.modules:
- _igemacintegration = sys.modules['igemacintegration._igemacintegration']
+if 'gtkmacintegration._gtkmacintegration' in sys.modules:
+ _gtkmacintegration = sys.modules['gtkmacintegration._gtkmacintegration']
else:
- from igemacintegration import _igemacintegration
+ from gtkmacintegration import _gtkmacintegration
-from igemacintegration._igemacintegration import *
+from gtkmacintegration._gtkmacintegration import *
# Wrapper class for the menu
class MacMenu:
def set_menu_bar(self, menubar):
- ige_mac_menu_set_menu_bar(menubar)
+ gtk_mac_menu_set_menu_bar(menubar)
def set_quit_menu_item(self, item):
- ige_mac_menu_set_quit_menu_item(item)
+ gtk_mac_menu_set_quit_menu_item(item)
def add_app_menu_group(self):
- return MacMenuAppGroup(ige_mac_menu_add_app_menu_group())
+ return MacMenuAppGroup(gtk_mac_menu_add_app_menu_group())
def sync(self, menubar):
- return ige_mac_menu_sync(menubar)
+ return gtk_mac_menu_sync(menubar)
class MacMenuAppGroup:
def __init__(self, group):
self._group = group
def add_app_menu_item(self, item, label=None):
- ige_mac_menu_add_app_menu_item(self._group, item, label)
+ gtk_mac_menu_add_app_menu_item(self._group, item, label)
diff --git a/bindings/python/gtkmacintegration/gtkmacintegration-module.c b/bindings/python/gtkmacintegration/gtkmacintegration-module.c
index 8b41d40..de7d2f1 100644
--- a/bindings/python/gtkmacintegration/gtkmacintegration-module.c
+++ b/bindings/python/gtkmacintegration/gtkmacintegration-module.c
@@ -1,24 +1,24 @@
#include <pygobject.h>
-
-void igemacintegration_register_classes (PyObject *d);
-extern PyMethodDef igemacintegration_functions[];
-
+void gtkmacintegration_register_classes (PyObject *d);
+
+extern PyMethodDef gtkmacintegration_functions[];
+
DL_EXPORT(void)
-init_igemacintegration (void)
+init_gtkmacintegration (void)
{
PyObject *m, *d;
init_pygobject ();
- m = Py_InitModule ("igemacintegration._igemacintegration",
- igemacintegration_functions);
+ m = Py_InitModule ("gtkmacintegration._gtkmacintegration",
+ gtkmacintegration_functions);
d = PyModule_GetDict (m);
- igemacintegration_register_classes (d);
+ gtkmacintegration_register_classes (d);
- if (PyErr_Occurred ()) {
+ if (PyErr_Occurred ()) {
PyErr_Print();
- Py_FatalError ("can't initialize module igemacintegration:");
+ Py_FatalError ("can't initialize module gtkmacintegration:");
}
}
diff --git a/bindings/python/gtkmacintegration/gtkmacintegration.override b/bindings/python/gtkmacintegration/gtkmacintegration.override
index d476517..0247966 100644
--- a/bindings/python/gtkmacintegration/gtkmacintegration.override
+++ b/bindings/python/gtkmacintegration/gtkmacintegration.override
@@ -3,11 +3,11 @@
headers
#include <Python.h>
#include <pygtk/pygtk.h>
-#include <ige-mac-menu.h>
-#include <ige-mac-dock.h>
-#include <ige-mac-bundle.h>
+#include <gtk-mac-menu.h>
+#include <gtk-mac-dock.h>
+#include <gtk-mac-bundle.h>
%%
-modulename igemacintegration
+modulename gtkmacintegration
%%
import gobject.GObject as PyGObject_Type
import gtk.gdk.Pixbuf as PyGdkPixbuf_Type
@@ -18,33 +18,33 @@ import gtk.Window as PyGtkWindow_Type
ignore-glob
*_get_type
%%
-override ige_mac_menu_add_app_menu_group noargs
+override gtk_mac_menu_add_app_menu_group noargs
static PyObject*
-_wrap_ige_mac_menu_add_app_menu_group (PyGObject *self)
+_wrap_gtk_mac_menu_add_app_menu_group (PyGObject *self)
{
- IgeMacMenuGroup *group;
+ GtkMacMenuGroup *group;
PyObject *ret;
- group = ige_mac_menu_add_app_menu_group ();
+ group = gtk_mac_menu_add_app_menu_group ();
ret = PyCObject_FromVoidPtr ((void *) group, NULL);
return ret;
}
%%
-override ige_mac_menu_add_app_menu_item kwargs
+override gtk_mac_menu_add_app_menu_item kwargs
static PyObject*
-_wrap_ige_mac_menu_add_app_menu_item (PyGObject *self, PyObject *args, PyObject *kwargs)
+_wrap_gtk_mac_menu_add_app_menu_item (PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "group", "item", "label", NULL };
PyObject *pygroup;
PyObject *pyitem;
char *label = NULL;
- IgeMacMenuGroup *group;
+ GtkMacMenuGroup *group;
GtkMenuItem *item;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO!z:add_app_menu_item", kwlist,
- &pygroup,
+ &pygroup,
&PyGtkMenuItem_Type, &pyitem,
&label))
return NULL;
@@ -52,7 +52,7 @@ _wrap_ige_mac_menu_add_app_menu_item (PyGObject *self, PyObject *args, PyObject
group = PyCObject_AsVoidPtr (pygroup);
item = GTK_MENU_ITEM (pygobject_get (pyitem));
- ige_mac_menu_add_app_menu_item (group, item, label);
+ gtk_mac_menu_add_app_menu_item (group, item, label);
Py_INCREF (Py_None);
return Py_None;
diff --git a/data/gtk-mac-integration.pc.in b/data/gtk-mac-integration.pc.in
index 8cdc030..b02b32c 100644
--- a/data/gtk-mac-integration.pc.in
+++ b/data/gtk-mac-integration.pc.in
@@ -3,9 +3,9 @@ exec_prefix= exec_prefix@
libdir= libdir@
includedir= includedir@
-Name: ige-mac-integration
+Name: gtk-mac-integration
Description: Mac menu bar and dock integration for GTK+
Requires: @GTK_MAJOR@
Version: @VERSION@
-Libs: -L${libdir} -ligemacintegration
-Cflags: -I${includedir}/igemacintegration -DMAC_INTEGRATION
+Libs: -L${libdir} -lgtkmacintegration
+Cflags: -I${includedir}/gtkmacintegration -DMAC_INTEGRATION
diff --git a/src/gtk-mac-bundle.c b/src/gtk-mac-bundle.c
index eaad8cb..12e984d 100644
--- a/src/gtk-mac-bundle.c
+++ b/src/gtk-mac-bundle.c
@@ -26,11 +26,11 @@
#include <gtk/gtk.h>
#include <Carbon/Carbon.h>
-#include "ige-mac-bundle.h"
+#include "gtk-mac-bundle.h"
-typedef struct IgeMacBundlePriv IgeMacBundlePriv;
+typedef struct GtkMacBundlePriv GtkMacBundlePriv;
-struct IgeMacBundlePriv {
+struct GtkMacBundlePriv {
CFBundleRef cf_bundle;
gchar *path;
gchar *id;
@@ -42,30 +42,30 @@ struct IgeMacBundlePriv {
static void mac_bundle_finalize (GObject *object);
static gchar *cf_string_to_utf8 (CFStringRef str);
-static void mac_bundle_set_environment_value (IgeMacBundle *bundle,
+static void mac_bundle_set_environment_value (GtkMacBundle *bundle,
const gchar *key,
const gchar *value);
-static IgeMacBundle *global_bundle;
+static GtkMacBundle *global_bundle;
-G_DEFINE_TYPE (IgeMacBundle, ige_mac_bundle, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GtkMacBundle, gtk_mac_bundle, G_TYPE_OBJECT)
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), IGE_TYPE_MAC_BUNDLE, IgeMacBundlePriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_MAC_BUNDLE, GtkMacBundlePriv))
static void
-ige_mac_bundle_class_init (IgeMacBundleClass *class)
+gtk_mac_bundle_class_init (GtkMacBundleClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->finalize = mac_bundle_finalize;
- g_type_class_add_private (object_class, sizeof (IgeMacBundlePriv));
+ g_type_class_add_private (object_class, sizeof (GtkMacBundlePriv));
}
static void
-ige_mac_bundle_init (IgeMacBundle *bundle)
+gtk_mac_bundle_init (GtkMacBundle *bundle)
{
- IgeMacBundlePriv *priv = GET_PRIV (bundle);
+ GtkMacBundlePriv *priv = GET_PRIV (bundle);
CFURLRef cf_url;
CFStringRef cf_string;
CFDictionaryRef cf_dict;
@@ -133,7 +133,7 @@ ige_mac_bundle_init (IgeMacBundle *bundle)
static void
mac_bundle_finalize (GObject *object)
{
- IgeMacBundlePriv *priv;
+ GtkMacBundlePriv *priv;
priv = GET_PRIV (object);
@@ -144,20 +144,20 @@ mac_bundle_finalize (GObject *object)
CFRelease (priv->cf_bundle);
- G_OBJECT_CLASS (ige_mac_bundle_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtk_mac_bundle_parent_class)->finalize (object);
}
-IgeMacBundle *
-ige_mac_bundle_new (void)
+GtkMacBundle *
+gtk_mac_bundle_new (void)
{
- return g_object_new (IGE_TYPE_MAC_BUNDLE, NULL);
+ return g_object_new (GTK_TYPE_MAC_BUNDLE, NULL);
}
-IgeMacBundle *
-ige_mac_bundle_get_default (void)
+GtkMacBundle *
+gtk_mac_bundle_get_default (void)
{
if (!global_bundle)
- global_bundle = ige_mac_bundle_new ();
+ global_bundle = gtk_mac_bundle_new ();
return global_bundle;
}
@@ -182,11 +182,11 @@ cf_string_to_utf8 (CFStringRef str)
}
static void
-mac_bundle_set_environment_value (IgeMacBundle *bundle,
+mac_bundle_set_environment_value (GtkMacBundle *bundle,
const gchar *key,
const gchar *value)
{
- IgeMacBundlePriv *priv = GET_PRIV (bundle);
+ GtkMacBundlePriv *priv = GET_PRIV (bundle);
GRegex *regex;
gchar *new_value;
@@ -212,35 +212,35 @@ mac_bundle_set_environment_value (IgeMacBundle *bundle,
}
const gchar *
-ige_mac_bundle_get_id (IgeMacBundle *bundle)
+gtk_mac_bundle_get_id (GtkMacBundle *bundle)
{
- IgeMacBundlePriv *priv = GET_PRIV (bundle);
+ GtkMacBundlePriv *priv = GET_PRIV (bundle);
return priv->id;
}
const gchar *
-ige_mac_bundle_get_path (IgeMacBundle *bundle)
+gtk_mac_bundle_get_path (GtkMacBundle *bundle)
{
- IgeMacBundlePriv *priv = GET_PRIV (bundle);
+ GtkMacBundlePriv *priv = GET_PRIV (bundle);
return priv->path;
}
gboolean
-ige_mac_bundle_get_is_app_bundle (IgeMacBundle *bundle)
+gtk_mac_bundle_get_is_app_bundle (GtkMacBundle *bundle)
{
- IgeMacBundlePriv *priv = GET_PRIV (bundle);
+ GtkMacBundlePriv *priv = GET_PRIV (bundle);
return (priv->type == 'APPL' && priv->id);
}
const gchar *
-ige_mac_bundle_get_datadir (IgeMacBundle *bundle)
+gtk_mac_bundle_get_datadir (GtkMacBundle *bundle)
{
- IgeMacBundlePriv *priv = GET_PRIV (bundle);
+ GtkMacBundlePriv *priv = GET_PRIV (bundle);
- if (!ige_mac_bundle_get_is_app_bundle (bundle))
+ if (!gtk_mac_bundle_get_is_app_bundle (bundle))
return NULL;
if (!priv->datadir)
@@ -256,11 +256,11 @@ ige_mac_bundle_get_datadir (IgeMacBundle *bundle)
}
const gchar *
-ige_mac_bundle_get_localedir (IgeMacBundle *bundle)
+gtk_mac_bundle_get_localedir (GtkMacBundle *bundle)
{
- IgeMacBundlePriv *priv = GET_PRIV (bundle);
+ GtkMacBundlePriv *priv = GET_PRIV (bundle);
- if (!ige_mac_bundle_get_is_app_bundle (bundle))
+ if (!gtk_mac_bundle_get_is_app_bundle (bundle))
return NULL;
if (!priv->localedir)
@@ -277,16 +277,16 @@ ige_mac_bundle_get_localedir (IgeMacBundle *bundle)
}
void
-ige_mac_bundle_setup_environment (IgeMacBundle *bundle)
+gtk_mac_bundle_setup_environment (GtkMacBundle *bundle)
{
- IgeMacBundlePriv *priv = GET_PRIV (bundle);
+ GtkMacBundlePriv *priv = GET_PRIV (bundle);
gchar *resources;
gchar *share, *lib, *etc;
gchar *etc_xdg, *etc_immodules, *etc_gtkrc;
gchar *etc_pixbuf, *etc_pangorc;
const gchar *rc_files;
- if (!ige_mac_bundle_get_is_app_bundle (bundle))
+ if (!gtk_mac_bundle_get_is_app_bundle (bundle))
return;
resources = g_build_filename (priv->path,
@@ -346,18 +346,18 @@ ige_mac_bundle_setup_environment (IgeMacBundle *bundle)
}
gchar *
-ige_mac_bundle_get_resource_path (IgeMacBundle *bundle,
+gtk_mac_bundle_get_resource_path (GtkMacBundle *bundle,
const gchar *name,
const gchar *type,
const gchar *subdir)
{
- IgeMacBundlePriv *priv;
+ GtkMacBundlePriv *priv;
CFURLRef cf_url;
CFStringRef cf_string;
gchar *path;
if (!bundle)
- bundle = ige_mac_bundle_get_default ();
+ bundle = gtk_mac_bundle_get_default ();
priv = GET_PRIV (bundle);
diff --git a/src/gtk-mac-bundle.h b/src/gtk-mac-bundle.h
index 88373d5..8bcdb79 100644
--- a/src/gtk-mac-bundle.h
+++ b/src/gtk-mac-bundle.h
@@ -18,42 +18,42 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __IGE_MAC_BUNDLE_H__
-#define __IGE_MAC_BUNDLE_H__
+#ifndef __GTK_MAC_BUNDLE_H__
+#define __GTK_MAC_BUNDLE_H__
#ifndef __x86_64__
#include <glib-object.h>
G_BEGIN_DECLS
-#define IGE_TYPE_MAC_BUNDLE (ige_mac_bundle_get_type ())
-#define IGE_MAC_BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IGE_TYPE_MAC_BUNDLE, IgeMacBundle))
-#define IGE_MAC_BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IGE_TYPE_MAC_BUNDLE, IgeMacBundleClass))
-#define IGE_IS_MAC_BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IGE_TYPE_MAC_BUNDLE))
-#define IGE_IS_MAC_BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IGE_TYPE_MAC_BUNDLE))
-#define IGE_MAC_BUNDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IGE_TYPE_MAC_BUNDLE, IgeMacBundleClass))
+#define GTK_TYPE_MAC_BUNDLE (gtk_mac_bundle_get_type ())
+#define GTK_MAC_BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MAC_BUNDLE, GtkMacBundle))
+#define GTK_MAC_BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MAC_BUNDLE, GtkMacBundleClass))
+#define GTK_IS_MAC_BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MAC_BUNDLE))
+#define GTK_IS_MAC_BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MAC_BUNDLE))
+#define GTK_MAC_BUNDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MAC_BUNDLE, GtkMacBundleClass))
-typedef struct _IgeMacBundle IgeMacBundle;
-typedef struct _IgeMacBundleClass IgeMacBundleClass;
+typedef struct _GtkMacBundle GtkMacBundle;
+typedef struct _GtkMacBundleClass GtkMacBundleClass;
-struct _IgeMacBundle {
+struct _GtkMacBundle {
GObject parent_instance;
};
-struct _IgeMacBundleClass {
+struct _GtkMacBundleClass {
GObjectClass parent_class;
};
-GType ige_mac_bundle_get_type (void);
-IgeMacBundle *ige_mac_bundle_new (void);
-IgeMacBundle *ige_mac_bundle_get_default (void);
-void ige_mac_bundle_setup_environment (IgeMacBundle *bundle);
-const gchar * ige_mac_bundle_get_id (IgeMacBundle *bundle);
-const gchar * ige_mac_bundle_get_path (IgeMacBundle *bundle);
-gboolean ige_mac_bundle_get_is_app_bundle (IgeMacBundle *bundle);
-const gchar * ige_mac_bundle_get_localedir (IgeMacBundle *bundle);
-const gchar * ige_mac_bundle_get_datadir (IgeMacBundle *bundle);
-gchar * ige_mac_bundle_get_resource_path (IgeMacBundle *bundle,
+GType gtk_mac_bundle_get_type (void);
+GtkMacBundle *gtk_mac_bundle_new (void);
+GtkMacBundle *gtk_mac_bundle_get_default (void);
+void gtk_mac_bundle_setup_environment (GtkMacBundle *bundle);
+const gchar * gtk_mac_bundle_get_id (GtkMacBundle *bundle);
+const gchar * gtk_mac_bundle_get_path (GtkMacBundle *bundle);
+gboolean gtk_mac_bundle_get_is_app_bundle (GtkMacBundle *bundle);
+const gchar * gtk_mac_bundle_get_localedir (GtkMacBundle *bundle);
+const gchar * gtk_mac_bundle_get_datadir (GtkMacBundle *bundle);
+gchar * gtk_mac_bundle_get_resource_path (GtkMacBundle *bundle,
const gchar *name,
const gchar *type,
const gchar *subdir);
@@ -61,4 +61,4 @@ gchar * ige_mac_bundle_get_resource_path (IgeMacBundle *bundle,
G_END_DECLS
#endif /* __x86_64__*/
-#endif /* __IGE_MAC_BUNDLE_H__ */
+#endif /* __GTK_MAC_BUNDLE_H__ */
diff --git a/src/gtk-mac-dock.c b/src/gtk-mac-dock.c
index 89affe8..f64cd2d 100644
--- a/src/gtk-mac-dock.c
+++ b/src/gtk-mac-dock.c
@@ -38,10 +38,10 @@
#include <sys/param.h>
#include <gtk/gtk.h>
-#include "ige-mac-dock.h"
-#include "ige-mac-bundle.h"
-#include "ige-mac-image-utils.h"
-#include "ige-mac-private.h"
+#include "gtk-mac-dock.h"
+#include "gtk-mac-bundle.h"
+#include "gtk-mac-image-utils.h"
+#include "gtk-mac-private.h"
enum {
CLICKED,
@@ -52,9 +52,9 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-typedef struct IgeMacDockPriv IgeMacDockPriv;
+typedef struct GtkMacDockPriv GtkMacDockPriv;
-struct IgeMacDockPriv {
+struct GtkMacDockPriv {
glong id;
};
@@ -72,15 +72,15 @@ static OSErr mac_dock_handle_reopen_application (const AppleEvent *inAppleEvent,
AppleEvent *outAppleEvent,
long inHandlerRefcon);
-G_DEFINE_TYPE (IgeMacDock, ige_mac_dock, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GtkMacDock, gtk_mac_dock, G_TYPE_OBJECT)
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), IGE_TYPE_MAC_DOCK, IgeMacDockPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_MAC_DOCK, GtkMacDockPriv))
static GList *handlers;
-static IgeMacDock *global_dock;
+static GtkMacDock *global_dock;
static void
-ige_mac_dock_class_init (IgeMacDockClass *class)
+gtk_mac_dock_class_init (GtkMacDockClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
@@ -88,7 +88,7 @@ ige_mac_dock_class_init (IgeMacDockClass *class)
signals[CLICKED] =
g_signal_new ("clicked",
- IGE_TYPE_MAC_DOCK,
+ GTK_TYPE_MAC_DOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
@@ -98,7 +98,7 @@ ige_mac_dock_class_init (IgeMacDockClass *class)
/* FIXME: Need marshaller. */
signals[OPEN_DOCUMENTS] =
g_signal_new ("open-documents",
- IGE_TYPE_MAC_DOCK,
+ GTK_TYPE_MAC_DOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
@@ -107,14 +107,14 @@ ige_mac_dock_class_init (IgeMacDockClass *class)
signals[QUIT_ACTIVATE] =
g_signal_new ("quit-activate",
- IGE_TYPE_MAC_DOCK,
+ GTK_TYPE_MAC_DOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- g_type_class_add_private (object_class, sizeof (IgeMacDockPriv));
+ g_type_class_add_private (object_class, sizeof (GtkMacDockPriv));
/* FIXME: Just testing with triggering Carbon to take control over
* the dock menu events instead of Cocoa (which happens when the
@@ -134,9 +134,9 @@ ige_mac_dock_class_init (IgeMacDockClass *class)
}
static void
-ige_mac_dock_init (IgeMacDock *dock)
+gtk_mac_dock_init (GtkMacDock *dock)
{
- IgeMacDockPriv *priv = GET_PRIV (dock);
+ GtkMacDockPriv *priv = GET_PRIV (dock);
static glong id;
priv->id = ++id;
@@ -160,7 +160,7 @@ ige_mac_dock_init (IgeMacDock *dock)
static void
mac_dock_finalize (GObject *object)
{
- IgeMacDockPriv *priv;
+ GtkMacDockPriv *priv;
priv = GET_PRIV (object);
@@ -175,20 +175,20 @@ mac_dock_finalize (GObject *object)
handlers = g_list_remove (handlers, object);
- G_OBJECT_CLASS (ige_mac_dock_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtk_mac_dock_parent_class)->finalize (object);
}
-IgeMacDock *
-ige_mac_dock_new (void)
+GtkMacDock *
+gtk_mac_dock_new (void)
{
- return g_object_new (IGE_TYPE_MAC_DOCK, NULL);
+ return g_object_new (GTK_TYPE_MAC_DOCK, NULL);
}
-IgeMacDock *
-ige_mac_dock_get_default (void)
+GtkMacDock *
+gtk_mac_dock_get_default (void)
{
if (!global_dock)
- global_dock = g_object_new (IGE_TYPE_MAC_DOCK, NULL);
+ global_dock = g_object_new (GTK_TYPE_MAC_DOCK, NULL);
return global_dock;
}
@@ -197,16 +197,16 @@ ige_mac_dock_get_default (void)
* Quit dock menu item (i.e. if there is a dock instance alive).
*/
gboolean
-_ige_mac_dock_is_quit_menu_item_handled (void)
+_gtk_mac_dock_is_quit_menu_item_handled (void)
{
return handlers != NULL;
}
-static IgeMacDock *
+static GtkMacDock *
mac_dock_get_from_id (gulong id)
{
GList *l;
- IgeMacDock *dock = NULL;
+ GtkMacDock *dock = NULL;
for (l = handlers; l; l = l->next)
{
@@ -225,7 +225,7 @@ mac_dock_handle_quit (const AppleEvent *inAppleEvent,
AppleEvent *outAppleEvent,
long inHandlerRefcon)
{
- IgeMacDock *dock;
+ GtkMacDock *dock;
dock = mac_dock_get_from_id (inHandlerRefcon);
@@ -250,7 +250,7 @@ mac_dock_handle_reopen_application (const AppleEvent *inAppleEvent,
AppleEvent *outAppleEvent,
long inHandlerRefcon)
{
- IgeMacDock *dock;
+ GtkMacDock *dock;
dock = mac_dock_get_from_id (inHandlerRefcon);
@@ -265,7 +265,7 @@ mac_dock_handle_open_documents (const AppleEvent *inAppleEvent,
AppleEvent *outAppleEvent,
long inHandlerRefCon)
{
- IgeMacDock *dock;
+ GtkMacDock *dock;
OSStatus status;
AEDescList documents;
gchar path[MAXPATHLEN];
@@ -307,7 +307,7 @@ mac_dock_handle_open_documents (const AppleEvent *inAppleEvent,
}
void
-ige_mac_dock_set_icon_from_pixbuf (IgeMacDock *dock,
+gtk_mac_dock_set_icon_from_pixbuf (GtkMacDock *dock,
GdkPixbuf *pixbuf)
{
if (!pixbuf)
@@ -316,25 +316,25 @@ ige_mac_dock_set_icon_from_pixbuf (IgeMacDock *dock,
{
CGImageRef image;
- image = ige_mac_image_from_pixbuf (pixbuf);
+ image = gtk_mac_image_from_pixbuf (pixbuf);
SetApplicationDockTileImage (image);
CGImageRelease (image);
}
}
void
-ige_mac_dock_set_icon_from_resource (IgeMacDock *dock,
- IgeMacBundle *bundle,
+gtk_mac_dock_set_icon_from_resource (GtkMacDock *dock,
+ GtkMacBundle *bundle,
const gchar *name,
const gchar *type,
const gchar *subdir)
{
gchar *path;
- g_return_if_fail (IGE_IS_MAC_DOCK (dock));
+ g_return_if_fail (GTK_IS_MAC_DOCK (dock));
g_return_if_fail (name != NULL);
- path = ige_mac_bundle_get_resource_path (bundle, name, type, subdir);
+ path = gtk_mac_bundle_get_resource_path (bundle, name, type, subdir);
if (path)
{
GdkPixbuf *pixbuf;
@@ -342,7 +342,7 @@ ige_mac_dock_set_icon_from_resource (IgeMacDock *dock,
pixbuf = gdk_pixbuf_new_from_file (path, NULL);
if (pixbuf)
{
- ige_mac_dock_set_icon_from_pixbuf (dock, pixbuf);
+ gtk_mac_dock_set_icon_from_pixbuf (dock, pixbuf);
g_object_unref (pixbuf);
}
@@ -351,17 +351,17 @@ ige_mac_dock_set_icon_from_resource (IgeMacDock *dock,
}
void
-ige_mac_dock_set_overlay_from_pixbuf (IgeMacDock *dock,
+gtk_mac_dock_set_overlay_from_pixbuf (GtkMacDock *dock,
GdkPixbuf *pixbuf)
{
CGImageRef image;
- g_return_if_fail (IGE_IS_MAC_DOCK (dock));
+ g_return_if_fail (GTK_IS_MAC_DOCK (dock));
g_return_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf));
if (pixbuf)
{
- image = ige_mac_image_from_pixbuf (pixbuf);
+ image = gtk_mac_image_from_pixbuf (pixbuf);
OverlayApplicationDockTileImage (image);
CGImageRelease (image);
}
@@ -370,18 +370,18 @@ ige_mac_dock_set_overlay_from_pixbuf (IgeMacDock *dock,
}
void
-ige_mac_dock_set_overlay_from_resource (IgeMacDock *dock,
- IgeMacBundle *bundle,
+gtk_mac_dock_set_overlay_from_resource (GtkMacDock *dock,
+ GtkMacBundle *bundle,
const gchar *name,
const gchar *type,
const gchar *subdir)
{
gchar *path;
- g_return_if_fail (IGE_IS_MAC_DOCK (dock));
+ g_return_if_fail (GTK_IS_MAC_DOCK (dock));
g_return_if_fail (name != NULL);
- path = ige_mac_bundle_get_resource_path (bundle, name, type, subdir);
+ path = gtk_mac_bundle_get_resource_path (bundle, name, type, subdir);
if (path)
{
GdkPixbuf *pixbuf;
@@ -389,7 +389,7 @@ ige_mac_dock_set_overlay_from_resource (IgeMacDock *dock,
pixbuf = gdk_pixbuf_new_from_file (path, NULL);
if (pixbuf)
{
- ige_mac_dock_set_overlay_from_pixbuf (dock, pixbuf);
+ gtk_mac_dock_set_overlay_from_pixbuf (dock, pixbuf);
g_object_unref (pixbuf);
}
@@ -397,14 +397,14 @@ ige_mac_dock_set_overlay_from_resource (IgeMacDock *dock,
}
}
-struct _IgeMacAttentionRequest {
+struct _GtkMacAttentionRequest {
NMRec nm_request;
guint timeout_id;
gboolean is_cancelled;
};
static gboolean
-mac_dock_attention_cb (IgeMacAttentionRequest *request)
+mac_dock_attention_cb (GtkMacAttentionRequest *request)
{
request->timeout_id = 0;
request->is_cancelled = TRUE;
@@ -418,13 +418,13 @@ mac_dock_attention_cb (IgeMacAttentionRequest *request)
/* FIXME: Add listener for "application activated" and cancel any
* requests.
*/
-IgeMacAttentionRequest *
-ige_mac_dock_attention_request (IgeMacDock *dock,
- IgeMacAttentionType type)
+GtkMacAttentionRequest *
+gtk_mac_dock_attention_request (GtkMacDock *dock,
+ GtkMacAttentionType type)
{
- IgeMacAttentionRequest *request;
+ GtkMacAttentionRequest *request;
- request = g_new0 (IgeMacAttentionRequest, 1);
+ request = g_new0 (GtkMacAttentionRequest, 1);
request->nm_request.nmMark = 1;
request->nm_request.qType = nmType;
@@ -435,7 +435,7 @@ ige_mac_dock_attention_request (IgeMacDock *dock,
return NULL;
}
- if (type == IGE_MAC_ATTENTION_INFO)
+ if (type == GTK_MAC_ATTENTION_INFO)
request->timeout_id = gdk_threads_add_timeout (
1000,
(GSourceFunc) mac_dock_attention_cb,
@@ -445,8 +445,8 @@ ige_mac_dock_attention_request (IgeMacDock *dock,
}
void
-ige_mac_dock_attention_cancel (IgeMacDock *dock,
- IgeMacAttentionRequest *request)
+gtk_mac_dock_attention_cancel (GtkMacDock *dock,
+ GtkMacAttentionRequest *request)
{
if (request->timeout_id)
g_source_remove (request->timeout_id);
@@ -458,7 +458,7 @@ ige_mac_dock_attention_cancel (IgeMacDock *dock,
}
GType
-ige_mac_attention_type_get_type (void)
+gtk_mac_attention_type_get_type (void)
{
/* FIXME */
return 0;
diff --git a/src/gtk-mac-dock.h b/src/gtk-mac-dock.h
index 5a630e8..ef5acd4 100644
--- a/src/gtk-mac-dock.h
+++ b/src/gtk-mac-dock.h
@@ -21,68 +21,68 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __IGE_MAC_DOCK_H__
-#define __IGE_MAC_DOCK_H__
+#ifndef __GTK_MAC_DOCK_H__
+#define __GTK_MAC_DOCK_H__
#ifndef __x86_64__
#include <gtk/gtk.h>
-#include <ige-mac-bundle.h>
+#include <gtk-mac-bundle.h>
G_BEGIN_DECLS
-#define IGE_TYPE_MAC_DOCK (ige_mac_dock_get_type ())
-#define IGE_MAC_DOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IGE_TYPE_MAC_DOCK, IgeMacDock))
-#define IGE_MAC_DOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IGE_TYPE_MAC_DOCK, IgeMacDockClass))
-#define IGE_IS_MAC_DOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IGE_TYPE_MAC_DOCK))
-#define IGE_IS_MAC_DOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IGE_TYPE_MAC_DOCK))
-#define IGE_MAC_DOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IGE_TYPE_MAC_DOCK, IgeMacDockClass))
+#define GTK_TYPE_MAC_DOCK (gtk_mac_dock_get_type ())
+#define GTK_MAC_DOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MAC_DOCK, GtkMacDock))
+#define GTK_MAC_DOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MAC_DOCK, GtkMacDockClass))
+#define GTK_IS_MAC_DOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MAC_DOCK))
+#define GTK_IS_MAC_DOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MAC_DOCK))
+#define GTK_MAC_DOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MAC_DOCK, GtkMacDockClass))
-typedef struct _IgeMacDock IgeMacDock;
-typedef struct _IgeMacDockClass IgeMacDockClass;
+typedef struct _GtkMacDock GtkMacDock;
+typedef struct _GtkMacDockClass GtkMacDockClass;
-typedef struct _IgeMacAttentionRequest IgeMacAttentionRequest;
+typedef struct _GtkMacAttentionRequest GtkMacAttentionRequest;
-struct _IgeMacDock
+struct _GtkMacDock
{
GObject parent_instance;
};
-struct _IgeMacDockClass
+struct _GtkMacDockClass
{
GObjectClass parent_class;
};
typedef enum {
- IGE_MAC_ATTENTION_CRITICAL,
- IGE_MAC_ATTENTION_INFO
-} IgeMacAttentionType;
+ GTK_MAC_ATTENTION_CRITICAL,
+ GTK_MAC_ATTENTION_INFO
+} GtkMacAttentionType;
-GType ige_mac_dock_get_type (void);
-IgeMacDock * ige_mac_dock_new (void);
-IgeMacDock * ige_mac_dock_get_default (void);
-void ige_mac_dock_set_icon_from_pixbuf (IgeMacDock *dock,
+GType gtk_mac_dock_get_type (void);
+GtkMacDock * gtk_mac_dock_new (void);
+GtkMacDock * gtk_mac_dock_get_default (void);
+void gtk_mac_dock_set_icon_from_pixbuf (GtkMacDock *dock,
GdkPixbuf *pixbuf);
-void ige_mac_dock_set_icon_from_resource (IgeMacDock *dock,
- IgeMacBundle *bundle,
+void gtk_mac_dock_set_icon_from_resource (GtkMacDock *dock,
+ GtkMacBundle *bundle,
const gchar *name,
const gchar *type,
const gchar *subdir);
-void ige_mac_dock_set_overlay_from_pixbuf (IgeMacDock *dock,
+void gtk_mac_dock_set_overlay_from_pixbuf (GtkMacDock *dock,
GdkPixbuf *pixbuf);
-void ige_mac_dock_set_overlay_from_resource (IgeMacDock *dock,
- IgeMacBundle *bundle,
+void gtk_mac_dock_set_overlay_from_resource (GtkMacDock *dock,
+ GtkMacBundle *bundle,
const gchar *name,
const gchar *type,
const gchar *subdir);
-IgeMacAttentionRequest *ige_mac_dock_attention_request (IgeMacDock *dock,
- IgeMacAttentionType type);
-void ige_mac_dock_attention_cancel (IgeMacDock *dock,
- IgeMacAttentionRequest *request);
+GtkMacAttentionRequest *gtk_mac_dock_attention_request (GtkMacDock *dock,
+ GtkMacAttentionType type);
+void gtk_mac_dock_attention_cancel (GtkMacDock *dock,
+ GtkMacAttentionRequest *request);
-#define IGE_TYPE_MAC_ATTENTION_TYPE (ige_mac_attention_type_get_type())
-GType ige_mac_attention_type_get_type (void);
+#define GTK_TYPE_MAC_ATTENTION_TYPE (gtk_mac_attention_type_get_type())
+GType gtk_mac_attention_type_get_type (void);
G_END_DECLS
#endif /* __x86_64__ */
-#endif /* __IGE_MAC_DOCK_H__ */
+#endif /* __GTK_MAC_DOCK_H__ */
diff --git a/src/gtk-mac-image-utils.c b/src/gtk-mac-image-utils.c
index ad59359..f88aa63 100644
--- a/src/gtk-mac-image-utils.c
+++ b/src/gtk-mac-image-utils.c
@@ -23,10 +23,10 @@
#include <gtk/gtk.h>
#include <Carbon/Carbon.h>
-#include "ige-mac-image-utils.h"
+#include "gtk-mac-image-utils.h"
CGImageRef
-ige_mac_image_from_pixbuf (GdkPixbuf *pixbuf)
+gtk_mac_image_from_pixbuf (GdkPixbuf *pixbuf)
{
CGColorSpaceRef colorspace;
CGDataProviderRef data_provider;
@@ -35,7 +35,7 @@ ige_mac_image_from_pixbuf (GdkPixbuf *pixbuf)
gint rowstride;
gint pixbuf_width, pixbuf_height;
gboolean has_alpha;
-
+
pixbuf_width = gdk_pixbuf_get_width (pixbuf);
pixbuf_height = gdk_pixbuf_get_height (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
@@ -44,15 +44,15 @@ ige_mac_image_from_pixbuf (GdkPixbuf *pixbuf)
data = gdk_pixbuf_get_pixels (pixbuf);
colorspace = CGColorSpaceCreateDeviceRGB ();
- data_provider = CGDataProviderCreateWithData (NULL, data,
- pixbuf_height * rowstride,
+ data_provider = CGDataProviderCreateWithData (NULL, data,
+ pixbuf_height * rowstride,
NULL);
image = CGImageCreate (pixbuf_width, pixbuf_height, 8,
- has_alpha ? 32 : 24, rowstride,
- colorspace,
+ has_alpha ? 32 : 24, rowstride,
+ colorspace,
has_alpha ? kCGImageAlphaLast : 0,
- data_provider, NULL, FALSE,
+ data_provider, NULL, FALSE,
kCGRenderingIntentDefault);
CGDataProviderRelease (data_provider);
diff --git a/src/gtk-mac-image-utils.h b/src/gtk-mac-image-utils.h
index 5f9bca8..e92a656 100644
--- a/src/gtk-mac-image-utils.h
+++ b/src/gtk-mac-image-utils.h
@@ -17,16 +17,16 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __IGE_MAC_IMAGE_UTILS_H__
-#define __IGE_MAC_IMAGE_UTILS_H__
+#ifndef __GTK_MAC_IMAGE_UTILS_H__
+#define __GTK_MAC_IMAGE_UTILS_H__
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <Carbon/Carbon.h>
G_BEGIN_DECLS
-CGImageRef ige_mac_image_from_pixbuf (GdkPixbuf *pixbuf);
+CGImageRef gtk_mac_image_from_pixbuf (GdkPixbuf *pixbuf);
G_END_DECLS
-#endif /* __IGE_MAC_IMAGE_UTILS_H__ */
+#endif /* __GTK_MAC_IMAGE_UTILS_H__ */
diff --git a/src/gtk-mac-integration.h b/src/gtk-mac-integration.h
index 44e10dc..4859d88 100644
--- a/src/gtk-mac-integration.h
+++ b/src/gtk-mac-integration.h
@@ -21,10 +21,10 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __IGE_MAC_INTEGRATION_H__
-#define __IGE_MAC_INTEGRATION_H__
+#ifndef __GTK_MAC_INTEGRATION_H__
+#define __GTK_MAC_INTEGRATION_H__
-#include <ige-mac-menu.h>
-#include <ige-mac-dock.h>
+#include <gtk-mac-menu.h>
+#include <gtk-mac-dock.h>
-#endif /* __IGE_MAC_INTEGRATION_H__ */
+#endif /* __GTK_MAC_INTEGRATION_H__ */
diff --git a/src/gtk-mac-menu.c b/src/gtk-mac-menu.c
index e0d003c..ef13658 100644
--- a/src/gtk-mac-menu.c
+++ b/src/gtk-mac-menu.c
@@ -32,8 +32,8 @@
#include <Carbon/Carbon.h>
#import <Cocoa/Cocoa.h>
-#include "ige-mac-menu.h"
-#include "ige-mac-private.h"
+#include "gtk-mac-menu.h"
+#include "gtk-mac-private.h"
/* TODO
*
@@ -45,10 +45,10 @@
* - Deleting a menu item that is not the last one in a menu doesn't work
*/
-#define IGE_QUARTZ_MENU_CREATOR 'IGEC'
-#define IGE_QUARTZ_ITEM_WIDGET 'IWID'
+#define GTK_QUARTZ_MENU_CREATOR 'GTKC'
+#define GTK_QUARTZ_ITEM_WIDGET 'IWID'
-#define IGE_MAC_KEY_HANDLER "ige-mac-key-handler"
+#define GTK_MAC_KEY_HANDLER "gtk-mac-key-handler"
#define DEBUG FALSE
#define DEBUG_SET FALSE
@@ -320,8 +320,8 @@ carbon_menu_item_get_checked (GtkWidget *widget) {
/* Get any GtkWidget associated with the item. */
err = GetMenuItemProperty (carbon_item->menu, carbon_item->index,
- IGE_QUARTZ_MENU_CREATOR,
- IGE_QUARTZ_ITEM_WIDGET,
+ GTK_QUARTZ_MENU_CREATOR,
+ GTK_QUARTZ_ITEM_WIDGET,
sizeof (checkWidget), 0, &checkWidget);
if (err) {
if (DEBUG_CARBON)
@@ -624,8 +624,8 @@ carbon_menu_item_create (GtkWidget *menu_item, MenuRef carbon_menu,
carbon_menu_err_return_label_val(err, label_text,
"Failed to insert menu item", NULL);
err = SetMenuItemProperty (carbon_menu, index,
- IGE_QUARTZ_MENU_CREATOR,
- IGE_QUARTZ_ITEM_WIDGET,
+ GTK_QUARTZ_MENU_CREATOR,
+ GTK_QUARTZ_ITEM_WIDGET,
sizeof (menu_item), &menu_item);
if (cfstr)
@@ -705,8 +705,8 @@ menu_event_handler_func (EventHandlerCallRef event_handler_call_ref,
/* Get any GtkWidget associated with the item. */
err = GetMenuItemProperty (command.menu.menuRef,
command.menu.menuItemIndex,
- IGE_QUARTZ_MENU_CREATOR,
- IGE_QUARTZ_ITEM_WIDGET,
+ GTK_QUARTZ_MENU_CREATOR,
+ GTK_QUARTZ_ITEM_WIDGET,
sizeof (widget), 0, &widget);
if (err != noErr) {
carbon_menu_warn(err, "Failed to retrieve the widget associated with the menu item");
@@ -775,7 +775,7 @@ nsevent_handle_menu_key (NSEvent *nsevent) {
}
gboolean
-ige_mac_menu_handle_menu_event (GdkEventKey *event) {
+gtk_mac_menu_handle_menu_event (GdkEventKey *event) {
NSEvent *nsevent;
/* FIXME: If the event here is unallocated, we crash. */
@@ -814,7 +814,7 @@ global_event_filter_func (gpointer windowing_event, GdkEvent *event,
* modal dialog...
*/
if (!focus
- || !g_object_get_data (G_OBJECT (focus), IGE_MAC_KEY_HANDLER)) {
+ || !g_object_get_data (G_OBJECT (focus), GTK_MAC_KEY_HANDLER)) {
if (nsevent_handle_menu_key (nsevent))
return GDK_FILTER_REMOVE;
}
@@ -833,7 +833,7 @@ key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) {
handled = gtk_window_propagate_key_event (window, event);
if (!handled)
- handled = ige_mac_menu_handle_menu_event (event);
+ handled = gtk_mac_menu_handle_menu_event (event);
/* Invoke control/alt accelerators. */
if (!handled && event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))
@@ -1049,7 +1049,7 @@ window_focus(GtkWindow *window, GdkEventFocus *event, CarbonMenu *menu) {
*/
void
-ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell) {
+gtk_mac_menu_set_menu_bar (GtkMenuShell *menu_shell) {
CarbonMenu *current_menu;
MenuRef carbon_menubar;
OSStatus err;
@@ -1093,7 +1093,7 @@ ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell) {
}
void
-ige_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item) {
+gtk_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item) {
MenuRef appmenu;
MenuItemIndex index;
OSStatus err;
@@ -1106,8 +1106,8 @@ ige_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item) {
err = SetMenuItemCommandID (appmenu, index, 0);
carbon_menu_err_return(err,
"Failed to set Quit menu command id");
- err = SetMenuItemProperty (appmenu, index, IGE_QUARTZ_MENU_CREATOR,
- IGE_QUARTZ_ITEM_WIDGET, sizeof (menu_item),
+ err = SetMenuItemProperty (appmenu, index, GTK_QUARTZ_MENU_CREATOR,
+ GTK_QUARTZ_ITEM_WIDGET, sizeof (menu_item),
&menu_item);
carbon_menu_err_return(err,
"Failed to associate Quit menu item");
@@ -1116,15 +1116,15 @@ ige_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item) {
}
void
-ige_mac_menu_connect_window_key_handler (GtkWindow *window) {
- if (g_object_get_data (G_OBJECT (window), IGE_MAC_KEY_HANDLER)) {
+gtk_mac_menu_connect_window_key_handler (GtkWindow *window) {
+ if (g_object_get_data (G_OBJECT (window), GTK_MAC_KEY_HANDLER)) {
g_warning ("Window %p is already connected", window);
return;
}
g_signal_connect (window, "key-press-event",
G_CALLBACK (key_press_event), NULL);
- g_object_set_data (G_OBJECT (window), IGE_MAC_KEY_HANDLER,
+ g_object_set_data (G_OBJECT (window), GTK_MAC_KEY_HANDLER,
GINT_TO_POINTER (1));
}
@@ -1133,7 +1133,7 @@ ige_mac_menu_connect_window_key_handler (GtkWindow *window) {
* global handling can be disabled.
*/
void
-ige_mac_menu_set_global_key_handler_enabled (gboolean enabled) {
+gtk_mac_menu_set_global_key_handler_enabled (gboolean enabled) {
global_key_handler_enabled = enabled;
}
@@ -1141,7 +1141,7 @@ ige_mac_menu_set_global_key_handler_enabled (gboolean enabled) {
* the Quit menu item.
*/
gboolean
-_ige_mac_menu_is_quit_menu_item_handled (void) {
+_gtk_mac_menu_is_quit_menu_item_handled (void) {
MenuRef appmenu;
MenuItemIndex index;
OSStatus err = GetIndMenuItemWithCommandID (NULL, kHICommandQuit, 1,
@@ -1159,18 +1159,18 @@ _ige_mac_menu_is_quit_menu_item_handled (void) {
* (and others, if they want) from their Gtk locations to the app
* menu.
*/
-struct _IgeMacMenuGroup {
+struct _GtkMacMenuGroup {
GList *items;
};
-/* app_menu_groups is a list of IgeMacMenuGroups, itself a list of
+/* app_menu_groups is a list of GtkMacMenuGroups, itself a list of
* menu_items. They're provided to insert separators into the app
* menu, grouping the items.
*/
static GList *app_menu_groups = NULL;
-IgeMacMenuGroup *
-ige_mac_menu_add_app_menu_group (void) {
- IgeMacMenuGroup *group = g_slice_new0 (IgeMacMenuGroup);
+GtkMacMenuGroup *
+gtk_mac_menu_add_app_menu_group (void) {
+ GtkMacMenuGroup *group = g_slice_new0 (GtkMacMenuGroup);
app_menu_groups = g_list_append (app_menu_groups, group);
return group;
@@ -1184,7 +1184,7 @@ ige_mac_menu_add_app_menu_group (void) {
* function.
*/
void
-ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group, GtkMenuItem *menu_item,
+gtk_mac_menu_add_app_menu_item (GtkMacMenuGroup *group, GtkMenuItem *menu_item,
const gchar *label) {
MenuRef appmenu;
GList *list;
@@ -1199,7 +1199,7 @@ ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group, GtkMenuItem *menu_item,
&appmenu, NULL);
carbon_menu_err_return(err, "retrieving app menu failed");
for (list = app_menu_groups; list; list = g_list_next (list)) {
- IgeMacMenuGroup *list_group = list->data;
+ GtkMacMenuGroup *list_group = list->data;
index += g_list_length (list_group->items);
/* adjust index for the separator between groups, but not
@@ -1227,8 +1227,8 @@ ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group, GtkMenuItem *menu_item,
err = InsertMenuItemTextWithCFString (appmenu, cfstr, index, 0, 0);
carbon_menu_err_return(err, "Failed to add menu item");
err = SetMenuItemProperty (appmenu, index + 1,
- IGE_QUARTZ_MENU_CREATOR,
- IGE_QUARTZ_ITEM_WIDGET,
+ GTK_QUARTZ_MENU_CREATOR,
+ GTK_QUARTZ_ITEM_WIDGET,
sizeof (menu_item), &menu_item);
CFRelease (cfstr);
carbon_menu_err_return(err, "Failed to associate Gtk Widget");
@@ -1243,11 +1243,11 @@ ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group, GtkMenuItem *menu_item,
g_warning ("%s: app menu group %p does not exist", G_STRFUNC, group);
}
/** Syncronize changes in the GtkMenuBar to an already-created Mac
- * MenuBar. You must have already run ige_mac_menu_set_menu_bar on the
+ * MenuBar. You must have already run gtk_mac_menu_set_menu_bar on the
* GtkMenuBar to be synced.
*/
void
-ige_mac_menu_sync(GtkMenuShell *menu_shell) {
+gtk_mac_menu_sync(GtkMenuShell *menu_shell) {
CarbonMenu *carbon_menu = carbon_menu_get (GTK_WIDGET(menu_shell));
g_return_if_fail(carbon_menu != NULL);
#if DEBUG_SYNC
diff --git a/src/gtk-mac-menu.h b/src/gtk-mac-menu.h
index 713bcf6..85246d4 100644
--- a/src/gtk-mac-menu.h
+++ b/src/gtk-mac-menu.h
@@ -23,28 +23,28 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __IGE_MAC_MENU_H__
-#define __IGE_MAC_MENU_H__
+#ifndef __GTK_MAC_MENU_H__
+#define __GTK_MAC_MENU_H__
#ifndef __x86_64__
#include <gtk/gtk.h>
G_BEGIN_DECLS
-typedef struct _IgeMacMenuGroup IgeMacMenuGroup;
+typedef struct _GtkMacMenuGroup GtkMacMenuGroup;
-void ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell);
-void ige_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item);
-IgeMacMenuGroup *ige_mac_menu_add_app_menu_group (void);
-void ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group,
+void gtk_mac_menu_set_menu_bar (GtkMenuShell *menu_shell);
+void gtk_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item);
+GtkMacMenuGroup *gtk_mac_menu_add_app_menu_group (void);
+void gtk_mac_menu_add_app_menu_item (GtkMacMenuGroup *group,
GtkMenuItem *menu_item,
const gchar *label);
-void ige_mac_menu_sync (GtkMenuShell *menu_shell);
-gboolean ige_mac_menu_handle_menu_event (GdkEventKey *event);
-void ige_mac_menu_set_global_key_handler_enabled (gboolean enabled);
-void ige_mac_menu_connect_window_key_handler (GtkWindow *window);
+void gtk_mac_menu_sync (GtkMenuShell *menu_shell);
+gboolean gtk_mac_menu_handle_menu_event (GdkEventKey *event);
+void gtk_mac_menu_set_global_key_handler_enabled (gboolean enabled);
+void gtk_mac_menu_connect_window_key_handler (GtkWindow *window);
G_END_DECLS
#endif /* __x86_64__ */
-#endif /* __IGE_MAC_MENU_H__ */
+#endif /* __GTK_MAC_MENU_H__ */
diff --git a/src/gtk-mac-private.h b/src/gtk-mac-private.h
index bbaf514..fbf9042 100644
--- a/src/gtk-mac-private.h
+++ b/src/gtk-mac-private.h
@@ -21,14 +21,14 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __IGE_MAC_PRIVATE_H__
-#define __IGE_MAC_PRIVATE_H__
+#ifndef __GTK_MAC_PRIVATE_H__
+#define __GTK_MAC_PRIVATE_H__
G_BEGIN_DECLS
-gboolean _ige_mac_menu_is_quit_menu_item_handled (void);
-gboolean _ige_mac_dock_is_quit_menu_item_handled (void);
+gboolean _gtk_mac_menu_is_quit_menu_item_handled (void);
+gboolean _gtk_mac_dock_is_quit_menu_item_handled (void);
G_END_DECLS
-#endif /* __IGE_MAC_PRIVATE_H__ */
+#endif /* __GTK_MAC_PRIVATE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]