notepad_ipc.h

Go to the documentation of this file.
00001 #ifndef __NOTEPAD_IPC_H
00002 #define __NOTEPAD_IPC_H
00003 
00004 /**
00005  * File Name  : notepad_ipc.h
00006  *
00007  * Description: menu handling
00008  */
00009 
00010 /*
00011  * This file is part of notepad.
00012  *
00013  * notepad is free software: you can redistribute it and/or modify
00014  * it under the terms of the GNU General Public License as published by
00015  * the Free Software Foundation, either version 2 of the License, or
00016  * (at your option) any later version.
00017  *
00018  * notepad is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00025  */
00026 
00027 /**
00028  * Copyright (C) 2010 IREX Technologies B.V.
00029  * All rights reserved.
00030  */
00031 
00032 #include <gtk/gtk.h> 
00033 #include "notepad_utils.h"
00034 
00035 namespace notepad
00036 {
00037 
00038     // IPC notepad 
00039 #define DBUS_APPL_NAME                  PACKAGE_NAME
00040 #define DBUS_SERVICE                    "com.irexnet." DBUS_APPL_NAME
00041 #define DBUS_PATH                       "/com/irexnet/" DBUS_APPL_NAME
00042 #define DBUS_INTERFACE                  "com.irexnet." DBUS_APPL_NAME
00043 
00044 #define DBUS_SERVICE_SYSTEM_CONTROL     "com.irexnet.sysd"
00045 #define DBUS_SERVICE_POPUP_MENU         "com.irexnet.popupmenu"
00046 #define DBUS_SERVICE_SETTINGS           "com.irexnet.settings"
00047 
00048 
00049     typedef enum _PenSize 
00050     {
00051         PEN_FINE = 1,
00052         PEN_SMALL,
00053         PEN_MEDIUM,
00054         PEN_LARGE,
00055         PEN_XLARGE
00056     } PenSize;
00057 
00058     //gconf
00059 #define NOTEPAD_GCONF_PATH              "/apps/er/notepad/"
00060 #define GCONF_PEN_SIZE                  NOTEPAD_GCONF_PATH "pen_size"
00061 #define GCONF_DEFAULT_PEN_SIZE          (PEN_SMALL) 
00062 
00063     gboolean    ipc_sys_is_pageturn_inverted(void);         // query if flipbar is inverted
00064     gboolean    ipc_sys_is_in_portrait_mode(void);          // query if display is in portrait mode
00065 
00066     //interface
00067     gboolean    ipc_set_services( void );                   // Setup IPC connection and register API functions
00068     void        ipc_unset_services( void );                 // Unregister API functions
00069     gboolean    ipc_sys_busy(gboolean busy);                // set/unset busy dialog
00070     gboolean    ipc_sys_bg_busy(gboolean busy);             // set/unset busy state without dialog
00071 
00072     np_rotation ipc_get_rotation(void);                     // return system orientation 
00073     const char* ipc_get_mountpoint();                       // return mountpoint of card
00074     void        ipc_sys_startup_complete(int xid);          // Report "settings started" to sysd
00075     void        ipc_change_filename(                        // change the filename in popupmenu
00076             const gchar* filename, 
00077             const gchar* label);
00078     void        ipc_menu_set_pagecounter(                   // Report "pages" to menu
00079             int cur_page,                                   // current page number
00080             int num_pages);                                 // total numer of pages
00081     PenSize     ipc_get_pensize(void);                      // get pensize
00082     void        ipc_set_pensize(const PenSize new_pensize); // set pensize 
00083 
00084     void        menu_init(int pid, gpointer appwindow);     // Initialise popup menus for content browser
00085     void        menu_destroy();                             // Remove the popup menus
00086     void        menu_block(gboolean block);                 // block/unblock the popupmenu
00087 } // namespace
00088 
00089 
00090 
00091 #endif //  __NOTEPAD_IPC_H
Generated by  doxygen 1.6.2-20100208