| 1 |
/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */ |
| 2 |
|
| 3 |
/* AbiSource Application Framework |
| 4 |
* Copyright (C) 1998 AbiSource, Inc. |
| 5 |
* Copyright (C) 2002 William Lachance |
| 6 |
* Copyright (C) 2005 INdT |
| 7 |
* Author: Renato Araujo <[email protected]> |
| 8 |
* |
| 9 |
* This program is free software; you can redistribute it and/or |
| 10 |
* modify it under the terms of the GNU General Public License |
| 11 |
* as published by the Free Software Foundation; either version 2 |
| 12 |
* of the License, or (at your option) any later version. |
| 13 |
* |
| 14 |
* This program is distributed in the hope that it will be useful, |
| 15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 |
* GNU General Public License for more details. |
| 18 |
* |
| 19 |
* You should have received a copy of the GNU General Public License |
| 20 |
* along with this program; if not, write to the Free Software |
| 21 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 22 |
* 02110-1301 USA. |
| 23 |
* |
| 24 |
*/ |
| 25 |
|
| 26 |
#include <gtk/gtk.h> |
| 27 |
#include <gdk/gdkx.h> |
| 28 |
#include <stdio.h> |
| 29 |
#include <stdlib.h> |
| 30 |
#include <unistd.h> |
| 31 |
#include <sys/stat.h> |
| 32 |
#include <string.h> |
| 33 |
|
| 34 |
#include "ap_Features.h" |
| 35 |
|
| 36 |
#include "ut_types.h" |
| 37 |
#include "ut_assert.h" |
| 38 |
#include "ut_files.h" |
| 39 |
#include "ut_sleep.h" |
| 40 |
#include "ev_UnixMenuBar.h" |
| 41 |
#include "ev_EditMethod.h" |
| 42 |
#include "xap_ViewListener.h" |
| 43 |
#include "xap_Frame.h" |
| 44 |
#include "xap_Prefs.h" |
| 45 |
#include "hildon/xap_UnixHildonApp.h" |
| 46 |
|
| 47 |
#include "fv_View.h" |
| 48 |
|
| 49 |
#include "ap_UnixHildonFrameImpl.h" |
| 50 |
|
| 51 |
#include <hildon/hildon-program.h> |
| 52 |
#include <hildon/hildon-window.h> |
| 53 |
|
| 54 |
/** |
| 55 |
* A Constructor |
| 56 |
* @param pUnixFrame the pointer of frame |
| 57 |
* @param pUnixApp the pointer of App |
| 58 |
*/ |
| 59 |
AP_UnixHildonFrameImpl::AP_UnixHildonFrameImpl(AP_UnixFrame *pUnixFrame) |
| 60 |
:AP_UnixFrameImpl(pUnixFrame) |
| 61 |
{ |
| 62 |
UT_DEBUGMSG(("Created AP_UnixHildonFrameImpl %p \n",this)); |
| 63 |
} |
| 64 |
|
| 65 |
/** |
| 66 |
* A Destructor |
| 67 |
*/ |
| 68 |
AP_UnixHildonFrameImpl::~AP_UnixHildonFrameImpl() |
| 69 |
{ |
| 70 |
} |
| 71 |
|
| 72 |
/** |
| 73 |
* Create a new frame instance |
| 74 |
* @return the pointer of new frame |
| 75 |
*/ |
| 76 |
XAP_FrameImpl * AP_UnixHildonFrameImpl::createInstance(XAP_Frame *pFrame) |
| 77 |
{ |
| 78 |
XAP_FrameImpl *pFrameImpl = new AP_UnixHildonFrameImpl(static_cast<AP_UnixFrame *>(pFrame)); |
| 79 |
|
| 80 |
return pFrameImpl; |
| 81 |
} |
| 82 |
|
| 83 |
GtkWidget * AP_UnixHildonFrameImpl::_createInternalWindow(void) |
| 84 |
{ |
| 85 |
XAP_UnixHildonApp * pHApp = static_cast<XAP_UnixHildonApp*>(XAP_App::getApp()); |
| 86 |
GObject * pHildonProgram = (pHApp)->getHildonProgram(); |
| 87 |
GtkWidget *window; |
| 88 |
|
| 89 |
window = hildon_window_new (); |
| 90 |
hildon_program_add_window (HILDON_PROGRAM (pHildonProgram), |
| 91 |
HILDON_WINDOW (window)); |
| 92 |
|
| 93 |
return window; |
| 94 |
} |