зеркало из https://github.com/mozilla/gecko-dev.git
Bug 408823 - "Killing GTK1, deprecated glib uses" [p=romaxa@gmail.com (romaxa) r=mpgritti a1.9=schrep]
This commit is contained in:
Родитель
2e8592133a
Коммит
0c878c9e92
|
@ -77,8 +77,8 @@ EmbedContentListener::OnStartURIOpen(nsIURI *aURI,
|
|||
return rv;
|
||||
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[OPEN_URI],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[OPEN_URI], 0,
|
||||
specString.get(), &return_val);
|
||||
|
||||
*aAbortOpen = return_val;
|
||||
|
|
|
@ -86,8 +86,8 @@ EmbedEventListener::KeyDown(nsIDOMEvent* aDOMEvent)
|
|||
// Return FALSE to this function to mark the event as not
|
||||
// consumed...
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_KEY_DOWN],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_KEY_DOWN], 0,
|
||||
(void *)keyEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -106,8 +106,8 @@ EmbedEventListener::KeyUp(nsIDOMEvent* aDOMEvent)
|
|||
// return FALSE to this function to mark this event as not
|
||||
// consumed...
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_KEY_UP],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_KEY_UP], 0,
|
||||
(void *)keyEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -125,8 +125,8 @@ EmbedEventListener::KeyPress(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_KEY_PRESS],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_KEY_PRESS], 0,
|
||||
(void *)keyEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -144,8 +144,8 @@ EmbedEventListener::MouseDown(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_DOWN],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_DOWN], 0,
|
||||
(void *)mouseEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -163,8 +163,8 @@ EmbedEventListener::MouseUp(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_UP],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_UP], 0,
|
||||
(void *)mouseEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -182,8 +182,8 @@ EmbedEventListener::MouseClick(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_CLICK],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_CLICK], 0,
|
||||
(void *)mouseEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -201,8 +201,8 @@ EmbedEventListener::MouseDblClick(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_DBL_CLICK],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_DBL_CLICK], 0,
|
||||
(void *)mouseEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -220,8 +220,8 @@ EmbedEventListener::MouseOver(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_OVER],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_OVER], 0,
|
||||
(void *)mouseEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -239,8 +239,8 @@ EmbedEventListener::MouseOut(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_OUT],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_MOUSE_OUT], 0,
|
||||
(void *)mouseEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -257,8 +257,8 @@ EmbedEventListener::Activate(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_ACTIVATE],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_ACTIVATE], 0,
|
||||
(void *)uiEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -275,8 +275,8 @@ EmbedEventListener::FocusIn(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_FOCUS_IN],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_FOCUS_IN], 0,
|
||||
(void *)uiEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
@ -293,8 +293,8 @@ EmbedEventListener::FocusOut(nsIDOMEvent* aDOMEvent)
|
|||
return NS_OK;
|
||||
// Return TRUE from your signal handler to mark the event as consumed.
|
||||
gint return_val = FALSE;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_FOCUS_OUT],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DOM_FOCUS_OUT], 0,
|
||||
(void *)uiEvent, &return_val);
|
||||
if (return_val) {
|
||||
aDOMEvent->StopPropagation();
|
||||
|
|
|
@ -75,8 +75,8 @@ EmbedProgress::OnStateChange(nsIWebProgress *aWebProgress,
|
|||
if ((aStateFlags & GTK_MOZ_EMBED_FLAG_IS_NETWORK) &&
|
||||
(aStateFlags & GTK_MOZ_EMBED_FLAG_START))
|
||||
{
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[NET_START]);
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[NET_START], 0);
|
||||
}
|
||||
|
||||
// get the uri for this request
|
||||
|
@ -87,20 +87,20 @@ EmbedProgress::OnStateChange(nsIWebProgress *aWebProgress,
|
|||
if (mOwner->mURI.Equals(uriString))
|
||||
{
|
||||
// for people who know what they are doing
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[NET_STATE],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[NET_STATE], 0,
|
||||
aStateFlags, aStatus);
|
||||
}
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[NET_STATE_ALL],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[NET_STATE_ALL], 0,
|
||||
uriString.get(),
|
||||
(gint)aStateFlags, (gint)aStatus);
|
||||
// and for stop, too
|
||||
if ((aStateFlags & GTK_MOZ_EMBED_FLAG_IS_NETWORK) &&
|
||||
(aStateFlags & GTK_MOZ_EMBED_FLAG_STOP))
|
||||
{
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[NET_STOP]);
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[NET_STOP], 0);
|
||||
// let our owner know that the load finished
|
||||
mOwner->ContentFinishedLoading();
|
||||
}
|
||||
|
@ -122,13 +122,13 @@ EmbedProgress::OnProgressChange(nsIWebProgress *aWebProgress,
|
|||
|
||||
// is it the same as the current uri?
|
||||
if (mOwner->mURI.Equals(uriString)) {
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[PROGRESS],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[PROGRESS], 0,
|
||||
aCurTotalProgress, aMaxTotalProgress);
|
||||
}
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[PROGRESS_ALL],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[PROGRESS_ALL], 0,
|
||||
uriString.get(),
|
||||
aCurTotalProgress, aMaxTotalProgress);
|
||||
return NS_OK;
|
||||
|
@ -162,8 +162,8 @@ EmbedProgress::OnLocationChange(nsIWebProgress *aWebProgress,
|
|||
|
||||
if (!isSubFrameLoad) {
|
||||
mOwner->SetURI(newURI.get());
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[LOCATION]);
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[LOCATION], 0);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -175,8 +175,8 @@ EmbedProgress::OnStatusChange(nsIWebProgress *aWebProgress,
|
|||
nsresult aStatus,
|
||||
const PRUnichar *aMessage)
|
||||
{
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[STATUS_CHANGE],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[STATUS_CHANGE], 0,
|
||||
static_cast<void *>(aRequest),
|
||||
static_cast<int>(aStatus),
|
||||
static_cast<const void *>(aMessage));
|
||||
|
@ -189,8 +189,8 @@ EmbedProgress::OnSecurityChange(nsIWebProgress *aWebProgress,
|
|||
nsIRequest *aRequest,
|
||||
PRUint32 aState)
|
||||
{
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[SECURITY_CHANGE],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[SECURITY_CHANGE], 0,
|
||||
static_cast<void *>(aRequest),
|
||||
aState);
|
||||
return NS_OK;
|
||||
|
|
|
@ -137,8 +137,8 @@ EmbedWindow::SetStatus(PRUint32 aStatusType, const PRUnichar *aStatus)
|
|||
case STATUS_SCRIPT:
|
||||
{
|
||||
mJSStatus = aStatus;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[JS_STATUS]);
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[JS_STATUS], 0);
|
||||
}
|
||||
break;
|
||||
case STATUS_SCRIPT_DEFAULT:
|
||||
|
@ -147,8 +147,8 @@ EmbedWindow::SetStatus(PRUint32 aStatusType, const PRUnichar *aStatus)
|
|||
case STATUS_LINK:
|
||||
{
|
||||
mLinkMessage = aStatus;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[LINK_MESSAGE]);
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[LINK_MESSAGE], 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -190,16 +190,16 @@ EmbedWindow::DestroyBrowserWindow(void)
|
|||
// mark the owner as destroyed so it won't emit events anymore.
|
||||
mOwner->mIsDestroyed = PR_TRUE;
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DESTROY_BROWSER]);
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[DESTROY_BROWSER], 0);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
EmbedWindow::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
|
||||
{
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[SIZE_TO], aCX, aCY);
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[SIZE_TO], 0, aCX, aCY);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -320,8 +320,8 @@ NS_IMETHODIMP
|
|||
EmbedWindow::SetTitle(const PRUnichar *aTitle)
|
||||
{
|
||||
mTitle = aTitle;
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[TITLE]);
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[TITLE], 0);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -359,8 +359,8 @@ EmbedWindow::SetVisibility(PRBool aVisibility)
|
|||
if (mOwner->mIsChrome && !mOwner->mChromeLoaded)
|
||||
return NS_OK;
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[VISIBILITY],
|
||||
g_signal_emit(G_OBJECT(mOwner->mOwningWidget),
|
||||
moz_embed_signals[VISIBILITY], 0,
|
||||
aVisibility);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -406,7 +406,7 @@ EmbedWindow::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords,
|
|||
|
||||
sTipWindow = gtk_window_new(GTK_WINDOW_POPUP);
|
||||
gtk_widget_set_app_paintable(sTipWindow, TRUE);
|
||||
gtk_window_set_policy(GTK_WINDOW(sTipWindow), FALSE, FALSE, TRUE);
|
||||
gtk_window_set_resizable(GTK_WINDOW(sTipWindow), TRUE);
|
||||
// needed to get colors + fonts etc correctly
|
||||
gtk_widget_set_name(sTipWindow, "gtk-tooltips");
|
||||
|
||||
|
@ -423,8 +423,8 @@ EmbedWindow::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords,
|
|||
// realize the widget
|
||||
gtk_widget_realize(sTipWindow);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(sTipWindow), "expose_event",
|
||||
GTK_SIGNAL_FUNC(tooltips_paint_window), NULL);
|
||||
g_signal_connect(G_OBJECT(sTipWindow), "expose_event",
|
||||
G_CALLBACK(tooltips_paint_window), NULL);
|
||||
|
||||
// set up the label for the tooltip
|
||||
GtkWidget *label = gtk_label_new(tipString);
|
||||
|
|
|
@ -73,8 +73,8 @@ EmbedWindowCreator::CreateChromeWindow(nsIWebBrowserChrome *aParent,
|
|||
if (!embedPrivate)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(embedPrivate->mOwningWidget),
|
||||
moz_embed_signals[NEW_WINDOW],
|
||||
g_signal_emit(G_OBJECT(embedPrivate->mOwningWidget),
|
||||
moz_embed_signals[NEW_WINDOW], 0,
|
||||
&newEmbed, (guint)aChromeFlags);
|
||||
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ struct _GtkMozEmbedClass
|
|||
gint (* dom_focus_out) (GtkMozEmbed *embed, gpointer dom_event);
|
||||
};
|
||||
|
||||
GTKMOZEMBED_API(GtkType, gtk_moz_embed_get_type, (void))
|
||||
GTKMOZEMBED_API(GType, gtk_moz_embed_get_type, (void))
|
||||
GTKMOZEMBED_API(GtkWidget*, gtk_moz_embed_new, (void))
|
||||
GTKMOZEMBED_API(void, gtk_moz_embed_push_startup, (void))
|
||||
GTKMOZEMBED_API(void, gtk_moz_embed_pop_startup, (void))
|
||||
|
@ -257,6 +257,7 @@ typedef enum
|
|||
#define GTK_MOZ_EMBED_SINGLE_CLASS(klass) GTK_CHEK_CLASS_CAST((klass), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingleClass)
|
||||
#define GTK_IS_MOZ_EMBED_SINGLE(obj) GTK_CHECK_TYPE((obj), GTK_TYPE_MOZ_EMBED_SINGLE)
|
||||
#define GTK_IS_MOZ_EMBED_SINGLE_CLASS(klass) GTK_CHECK_CLASS_TYPE((klass), GTK_TYPE_MOZ_EMBED)
|
||||
#define GTK_MOZ_EMBED_SINGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingleClass))
|
||||
|
||||
typedef struct _GtkMozEmbedSingle GtkMozEmbedSingle;
|
||||
typedef struct _GtkMozEmbedSingleClass GtkMozEmbedSingleClass;
|
||||
|
@ -276,7 +277,7 @@ struct _GtkMozEmbedSingleClass
|
|||
guint chromemask);
|
||||
};
|
||||
|
||||
GTKMOZEMBED_API(GtkType, gtk_moz_embed_single_get_type, (void))
|
||||
GTKMOZEMBED_API(GType, gtk_moz_embed_single_get_type, (void))
|
||||
GTKMOZEMBED_API(GtkMozEmbedSingle *, gtk_moz_embed_single_get, (void))
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -107,24 +107,29 @@ guint moz_embed_signals[EMBED_LAST_SIGNAL] = { 0 };
|
|||
|
||||
// GtkObject + class-related functions
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_moz_embed_get_type(void)
|
||||
{
|
||||
static GtkType moz_embed_type = 0;
|
||||
if (!moz_embed_type)
|
||||
static GType moz_embed_type = 0;
|
||||
if (moz_embed_type == 0)
|
||||
{
|
||||
static const GtkTypeInfo moz_embed_info =
|
||||
const GTypeInfo our_info =
|
||||
{
|
||||
"GtkMozEmbed",
|
||||
sizeof(GtkMozEmbed),
|
||||
sizeof(GtkMozEmbedClass),
|
||||
(GtkClassInitFunc)gtk_moz_embed_class_init,
|
||||
(GtkObjectInitFunc)gtk_moz_embed_init,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gtk_moz_embed_class_init,
|
||||
NULL,
|
||||
NULL, /* class_data */
|
||||
sizeof(GtkMozEmbed),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gtk_moz_embed_init,
|
||||
};
|
||||
moz_embed_type = gtk_type_unique(GTK_TYPE_BIN, &moz_embed_info);
|
||||
|
||||
moz_embed_type = g_type_register_static(GTK_TYPE_BIN,
|
||||
"GtkMozEmbed",
|
||||
&our_info,
|
||||
(GTypeFlags)0);
|
||||
}
|
||||
|
||||
return moz_embed_type;
|
||||
|
@ -158,214 +163,243 @@ gtk_moz_embed_class_init(GtkMozEmbedClass *klass)
|
|||
// set up our signals
|
||||
|
||||
moz_embed_signals[LINK_MESSAGE] =
|
||||
gtk_signal_new ("link_message",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, link_message),
|
||||
g_signal_new("link_message",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, link_message),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
G_TYPE_NONE, 0);
|
||||
moz_embed_signals[JS_STATUS] =
|
||||
gtk_signal_new ("js_status",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, js_status),
|
||||
g_signal_new("js_status",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, js_status),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
G_TYPE_NONE, 0);
|
||||
moz_embed_signals[LOCATION] =
|
||||
gtk_signal_new ("location",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, location),
|
||||
g_signal_new("location",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, location),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
G_TYPE_NONE, 0);
|
||||
moz_embed_signals[TITLE] =
|
||||
gtk_signal_new("title",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, title),
|
||||
g_signal_new("title",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, title),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
G_TYPE_NONE, 0);
|
||||
moz_embed_signals[PROGRESS] =
|
||||
gtk_signal_new("progress",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, progress),
|
||||
g_signal_new("progress",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, progress),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__INT_INT,
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
|
||||
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
|
||||
moz_embed_signals[PROGRESS_ALL] =
|
||||
gtk_signal_new("progress_all",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, progress_all),
|
||||
g_signal_new("progress_all",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, progress_all),
|
||||
NULL, NULL,
|
||||
gtkmozembed_VOID__STRING_INT_INT,
|
||||
GTK_TYPE_NONE, 3,
|
||||
GTK_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
|
||||
GTK_TYPE_INT, GTK_TYPE_INT);
|
||||
G_TYPE_NONE, 3,
|
||||
G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
|
||||
G_TYPE_INT, G_TYPE_INT);
|
||||
moz_embed_signals[NET_STATE] =
|
||||
gtk_signal_new("net_state",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_state),
|
||||
g_signal_new("net_state",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, net_state),
|
||||
NULL, NULL,
|
||||
gtkmozembed_VOID__INT_UINT,
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_UINT);
|
||||
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT);
|
||||
moz_embed_signals[NET_STATE_ALL] =
|
||||
gtk_signal_new("net_state_all",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_state_all),
|
||||
g_signal_new("net_state_all",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, net_state_all),
|
||||
NULL, NULL,
|
||||
gtkmozembed_VOID__STRING_INT_UINT,
|
||||
GTK_TYPE_NONE, 3,
|
||||
GTK_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
|
||||
GTK_TYPE_INT, GTK_TYPE_UINT);
|
||||
G_TYPE_NONE, 3,
|
||||
G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
|
||||
G_TYPE_INT, G_TYPE_UINT);
|
||||
moz_embed_signals[NET_START] =
|
||||
gtk_signal_new("net_start",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_start),
|
||||
g_signal_new("net_start",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, net_start),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
G_TYPE_NONE, 0);
|
||||
moz_embed_signals[NET_STOP] =
|
||||
gtk_signal_new("net_stop",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_stop),
|
||||
g_signal_new("net_stop",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, net_stop),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
G_TYPE_NONE, 0);
|
||||
moz_embed_signals[NEW_WINDOW] =
|
||||
gtk_signal_new("new_window",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, new_window),
|
||||
g_signal_new("new_window",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, new_window),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__POINTER_UINT,
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_UINT);
|
||||
G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT);
|
||||
moz_embed_signals[VISIBILITY] =
|
||||
gtk_signal_new("visibility",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, visibility),
|
||||
g_signal_new("visibility",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, visibility),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__BOOL,
|
||||
GTK_TYPE_NONE, 1, GTK_TYPE_BOOL);
|
||||
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
|
||||
moz_embed_signals[DESTROY_BROWSER] =
|
||||
gtk_signal_new("destroy_browser",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, destroy_brsr),
|
||||
g_signal_new("destroy_browser",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, destroy_brsr),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
G_TYPE_NONE, 0);
|
||||
moz_embed_signals[OPEN_URI] =
|
||||
gtk_signal_new("open_uri",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, open_uri),
|
||||
g_signal_new("open_uri",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, open_uri),
|
||||
NULL, NULL,
|
||||
gtkmozembed_BOOL__STRING,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_STRING |
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_STRING |
|
||||
G_SIGNAL_TYPE_STATIC_SCOPE);
|
||||
moz_embed_signals[SIZE_TO] =
|
||||
gtk_signal_new("size_to",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, size_to),
|
||||
g_signal_new("size_to",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, size_to),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__INT_INT,
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
|
||||
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
|
||||
moz_embed_signals[DOM_KEY_DOWN] =
|
||||
gtk_signal_new("dom_key_down",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_key_down),
|
||||
g_signal_new("dom_key_down",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_down),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_KEY_PRESS] =
|
||||
gtk_signal_new("dom_key_press",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_key_press),
|
||||
g_signal_new("dom_key_press",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_press),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_KEY_UP] =
|
||||
gtk_signal_new("dom_key_up",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_key_up),
|
||||
g_signal_new("dom_key_up",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_up),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_MOUSE_DOWN] =
|
||||
gtk_signal_new("dom_mouse_down",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_down),
|
||||
g_signal_new("dom_mouse_down",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_down),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_MOUSE_UP] =
|
||||
gtk_signal_new("dom_mouse_up",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_up),
|
||||
g_signal_new("dom_mouse_up",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_up),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_MOUSE_CLICK] =
|
||||
gtk_signal_new("dom_mouse_click",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_click),
|
||||
g_signal_new("dom_mouse_click",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_click),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_MOUSE_DBL_CLICK] =
|
||||
gtk_signal_new("dom_mouse_dbl_click",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_dbl_click),
|
||||
g_signal_new("dom_mouse_dbl_click",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_dbl_click),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_MOUSE_OVER] =
|
||||
gtk_signal_new("dom_mouse_over",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_over),
|
||||
g_signal_new("dom_mouse_over",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_over),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_MOUSE_OUT] =
|
||||
gtk_signal_new("dom_mouse_out",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_out),
|
||||
g_signal_new("dom_mouse_out",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_out),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[SECURITY_CHANGE] =
|
||||
gtk_signal_new("security_change",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, security_change),
|
||||
g_signal_new("security_change",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, security_change),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__POINTER_UINT,
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_UINT);
|
||||
G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT);
|
||||
moz_embed_signals[STATUS_CHANGE] =
|
||||
gtk_signal_new("status_change",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, status_change),
|
||||
g_signal_new("status_change",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, status_change),
|
||||
NULL, NULL,
|
||||
gtkmozembed_VOID__POINTER_INT_POINTER,
|
||||
GTK_TYPE_NONE, 3,
|
||||
GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_POINTER);
|
||||
G_TYPE_NONE, 3,
|
||||
G_TYPE_POINTER, G_TYPE_INT, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_ACTIVATE] =
|
||||
gtk_signal_new("dom_activate",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_activate),
|
||||
g_signal_new("dom_activate",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_activate),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_FOCUS_IN] =
|
||||
gtk_signal_new("dom_focus_in",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_focus_in),
|
||||
g_signal_new("dom_focus_in",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_focus_in),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
moz_embed_signals[DOM_FOCUS_OUT] =
|
||||
gtk_signal_new("dom_focus_out",
|
||||
GTK_RUN_LAST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_focus_out),
|
||||
g_signal_new("dom_focus_out",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedClass, dom_focus_out),
|
||||
NULL, NULL,
|
||||
gtk_marshal_BOOL__POINTER,
|
||||
GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -381,7 +415,7 @@ gtk_moz_embed_init(GtkMozEmbed *embed)
|
|||
GtkWidget *
|
||||
gtk_moz_embed_new(void)
|
||||
{
|
||||
return GTK_WIDGET(gtk_type_new(gtk_moz_embed_get_type()));
|
||||
return GTK_WIDGET(g_object_new(GTK_TYPE_MOZ_EMBED, NULL));
|
||||
}
|
||||
|
||||
// GtkObject methods
|
||||
|
@ -465,16 +499,16 @@ gtk_moz_embed_realize(GtkWidget *widget)
|
|||
|
||||
// connect to the focus out event for the child
|
||||
GtkWidget *child_widget = GTK_BIN(widget)->child;
|
||||
gtk_signal_connect_while_alive(GTK_OBJECT(child_widget),
|
||||
g_signal_connect_object(G_OBJECT(child_widget),
|
||||
"focus_out_event",
|
||||
GTK_SIGNAL_FUNC(handle_child_focus_out),
|
||||
embed,
|
||||
GTK_OBJECT(child_widget));
|
||||
gtk_signal_connect_while_alive(GTK_OBJECT(child_widget),
|
||||
G_CONNECT_AFTER);
|
||||
g_signal_connect_object(G_OBJECT(child_widget),
|
||||
"focus_in_event",
|
||||
GTK_SIGNAL_FUNC(handle_child_focus_in),
|
||||
embed,
|
||||
GTK_OBJECT(child_widget));
|
||||
G_CONNECT_AFTER);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1012,25 +1046,29 @@ guint moz_embed_single_signals[SINGLE_LAST_SIGNAL] = { 0 };
|
|||
|
||||
// GtkObject + class-related functions
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_moz_embed_single_get_type(void)
|
||||
{
|
||||
static GtkType moz_embed_single_type = 0;
|
||||
if (!moz_embed_single_type)
|
||||
static GType moz_embed_single_type = 0;
|
||||
if (moz_embed_single_type == 0)
|
||||
{
|
||||
static const GtkTypeInfo moz_embed_single_info =
|
||||
const GTypeInfo our_info =
|
||||
{
|
||||
"GtkMozEmbedSingle",
|
||||
sizeof(GtkMozEmbedSingle),
|
||||
sizeof(GtkMozEmbedSingleClass),
|
||||
(GtkClassInitFunc)gtk_moz_embed_single_class_init,
|
||||
(GtkObjectInitFunc)gtk_moz_embed_single_init,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
sizeof(GtkMozEmbedClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gtk_moz_embed_single_class_init,
|
||||
NULL,
|
||||
NULL, /* class_data */
|
||||
sizeof(GtkMozEmbed),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gtk_moz_embed_single_init,
|
||||
};
|
||||
moz_embed_single_type = gtk_type_unique(GTK_TYPE_OBJECT,
|
||||
&moz_embed_single_info);
|
||||
|
||||
moz_embed_single_type = g_type_register_static(GTK_TYPE_OBJECT,
|
||||
"GtkMozEmbedSingle",
|
||||
&our_info,
|
||||
(GTypeFlags)0);
|
||||
}
|
||||
|
||||
return moz_embed_single_type;
|
||||
|
@ -1046,13 +1084,14 @@ gtk_moz_embed_single_class_init(GtkMozEmbedSingleClass *klass)
|
|||
// set up our signals
|
||||
|
||||
moz_embed_single_signals[NEW_WINDOW_ORPHAN] =
|
||||
gtk_signal_new("new_window_orphan",
|
||||
GTK_RUN_FIRST,
|
||||
GET_OBJECT_CLASS_TYPE(klass),
|
||||
GTK_SIGNAL_OFFSET(GtkMozEmbedSingleClass,
|
||||
new_window_orphan),
|
||||
g_signal_new("new_window_orphan",
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(GtkMozEmbedSingleClass, new_window_orphan),
|
||||
NULL, NULL,
|
||||
gtk_marshal_NONE__POINTER_UINT,
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_UINT);
|
||||
G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1066,7 +1105,7 @@ gtk_moz_embed_single_init(GtkMozEmbedSingle *embed)
|
|||
GtkMozEmbedSingle *
|
||||
gtk_moz_embed_single_new(void)
|
||||
{
|
||||
return (GtkMozEmbedSingle *)gtk_type_new(gtk_moz_embed_single_get_type());
|
||||
return (GtkMozEmbedSingle *)g_object_new(GTK_TYPE_MOZ_EMBED_SINGLE, NULL);
|
||||
}
|
||||
|
||||
GtkMozEmbedSingle *
|
||||
|
@ -1093,8 +1132,8 @@ gtk_moz_embed_single_create_window(GtkMozEmbed **aNewEmbed,
|
|||
if (!single)
|
||||
return;
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(single),
|
||||
moz_embed_single_signals[NEW_WINDOW_ORPHAN],
|
||||
g_signal_emit(G_OBJECT(single),
|
||||
moz_embed_single_signals[NEW_WINDOW_ORPHAN], 0,
|
||||
aNewEmbed, aChromeFlags);
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче