Begin work on renovating the Null plugins. (On the Linux side, anyways, though some of that will spill over to the Windows side.) Starting with FWnull.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1105 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-05-02 00:51:17 +00:00
parent 45bb6f3d2f
commit 74e0e786b7
18 changed files with 849 additions and 1072 deletions

View File

@ -1,147 +0,0 @@
/* FWnull
* Copyright (C) 2004-2005 PCSX2 Team
*
* 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 <stdlib.h>
#include <string.h>
#include <errno.h>
#include "FW.h"
const unsigned char version = PS2E_FW_VERSION;
const unsigned char revision = 0;
const unsigned char build = 4; // increase that with each version
static char *libraryName = "FWnull Driver";
s8 *fwregs;
#define fwRs32(mem) (*(s32*)&fwregs[(mem) & 0xffff])
#define fwRu32(mem) (*(u32*)&fwregs[(mem) & 0xffff])
u32 CALLBACK PS2EgetLibType() {
return PS2E_LT_FW;
}
char* CALLBACK PS2EgetLibName() {
return libraryName;
}
u32 CALLBACK PS2EgetLibVersion2(u32 type) {
return (version<<16) | (revision<<8) | build;
}
void __Log(char *fmt, ...) {
va_list list;
if (!conf.Log || fwLog == NULL) return;
va_start(list, fmt);
vfprintf(fwLog, fmt, list);
va_end(list);
}
s32 CALLBACK FWinit() {
LoadConfig();
#ifdef FW_LOG
fwLog = fopen("logs/fwLog.txt", "w");
if (fwLog) setvbuf(fwLog, NULL, _IONBF, 0);
FW_LOG("FWnull plugin version %d,%d\n",revision,build);
FW_LOG("FW init\n");
#endif
fwregs = (s8*)malloc(0x10000);
if (fwregs == NULL) {
SysMessage("Error allocating Memory\n"); return -1;
}
return 0;
}
void CALLBACK FWshutdown() {
free(fwregs);
#ifdef FW_LOG
if (fwLog) fclose(fwLog);
#endif
}
s32 CALLBACK FWopen(void *pDsp) {
#ifdef FW_LOG
FW_LOG("FW open\n");
#endif
#ifdef _WIN32
#else
//Display* dsp = *(Display**)pDsp;
#endif
return 0;
}
void CALLBACK FWclose() {
}
u32 CALLBACK FWread32(u32 addr) {
u32 ret=0;
switch (addr) {
case 0x1f808410:
ret = 0x8;
break;
default:
ret = fwRu32(addr);
}
#ifdef FW_LOG
FW_LOG("FW read mem 0x%x: 0x%x\n", addr, ret);
#endif
return ret;
}
void CALLBACK FWwrite32(u32 addr, u32 value) {
switch (addr) {
default:
fwRu32(addr) = value;
break;
}
#ifdef FW_LOG
FW_LOG("FW write mem 0x%x: 0x%x\n", addr, value);
#endif
}
void CALLBACK FWirqCallback(void (*callback)()) {
FWirq = callback;
}
s32 CALLBACK FWfreeze(int mode, freezeData *data) {
return 0;
}
s32 CALLBACK FWtest() {
return 0;
}

View File

@ -1,5 +1,5 @@
/* FWnull /* FWnull
* Copyright (C) 2004-2005 PCSX2 Team * Copyright (C) 2004-2009 PCSX2 Team
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -15,15 +15,17 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __FW_H__ #ifndef __FW_H__
#define __FW_H__ #define __FW_H__
#include <stdio.h> #include <stdio.h>
extern "C"
{
#define FWdefs #define FWdefs
#include "PS2Edefs.h" #include "PS2Edefs.h"
}
#ifdef _WIN32 #ifdef _WIN32
@ -35,25 +37,32 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#define __inline inline #endif
#ifdef _MSC_VER
#define EXPORT_C_(type) extern "C" __declspec(dllexport) type CALLBACK
#else
#define EXPORT_C_(type) extern "C" type
#endif #endif
#define FW_LOG __Log #define FW_LOG __Log
typedef struct { #define fwRs32(mem) (*(s32*)&fwregs[(mem) & 0xffff])
int Log; #define fwRu32(mem) (*(u32*)&fwregs[(mem) & 0xffff])
typedef struct
{
int Log;
} Config; } Config;
Config conf; extern Config conf;
void (*FWirq)(); extern FILE *fwLog;
void SaveConfig(); extern void (*FWirq)();
void LoadConfig();
FILE *fwLog; extern void __Log(char *fmt, ...);
void __Log(char *fmt, ...); extern void SysMessage(char *fmt, ...);
extern void SaveConfig();
void SysMessage(char *fmt, ...); extern void LoadConfig();
#endif #endif

View File

@ -1,134 +1,179 @@
/* FireWire /* FWnull
* Copyright (C) 2002-2004 FireWire Team * Copyright (C) 2004-2009 PCSX2 Team
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <gtk/gtk.h> #include <sys/stat.h>
#include <signal.h> #include <gtk/gtk.h>
#include <signal.h>
#include "interface.h" #include <string>
#include "support.h" using namespace std;
#include "callbacks.h"
#include "FW.h" #include "FW.h"
#include "Config.h" #include "Config.h"
GtkWidget *MsgDlg; extern "C"
{
void OnMsg_Ok() { #include "interface.h"
gtk_widget_destroy(MsgDlg); #include "support.h"
gtk_main_quit(); //#include "callbacks.h"
} }
void cfgSysMessage(char *fmt, ...) { GtkWidget *MsgDlg, *About, *Conf;
GtkWidget *Ok,*Txt; extern string s_strIniPath;
GtkWidget *Box,*Box1;
va_list list; void OnMsg_Ok()
char msg[512]; {
gtk_widget_destroy(MsgDlg);
va_start(list, fmt); gtk_main_quit();
vsprintf(msg, fmt, list); }
va_end(list);
void cfgSysMessage(char *fmt, ...)
if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0; {
GtkWidget *Ok,*Txt;
MsgDlg = gtk_window_new (GTK_WINDOW_POPUP); GtkWidget *Box,*Box1;
gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); va_list list;
gtk_window_set_title(GTK_WINDOW(MsgDlg), "FireWire Msg"); char msg[512];
gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5);
va_start(list, fmt);
Box = gtk_vbox_new(5, 0); vsprintf(msg, fmt, list);
gtk_container_add(GTK_CONTAINER(MsgDlg), Box); va_end(list);
gtk_widget_show(Box);
if (msg[strlen(msg) - 1] == '\n') msg[strlen(msg)-1] = 0;
Txt = gtk_label_new(msg);
MsgDlg = gtk_window_new (GTK_WINDOW_POPUP);
gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5); gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER);
gtk_widget_show(Txt); gtk_window_set_title(GTK_WINDOW(MsgDlg), "FireWire Msg");
gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5);
Box1 = gtk_hbutton_box_new();
gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0); Box = gtk_vbox_new(5, 0);
gtk_widget_show(Box1); gtk_container_add(GTK_CONTAINER(MsgDlg), Box);
gtk_widget_show(Box);
Ok = gtk_button_new_with_label("Ok");
gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsg_Ok), NULL); Txt = gtk_label_new(msg);
gtk_container_add(GTK_CONTAINER(Box1), Ok);
GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5);
gtk_widget_show(Ok); gtk_widget_show(Txt);
gtk_widget_show(MsgDlg); Box1 = gtk_hbutton_box_new();
gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0);
gtk_main(); gtk_widget_show(Box1);
}
Ok = gtk_button_new_with_label("Ok");
GtkWidget *About; gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsg_Ok), NULL);
gtk_container_add(GTK_CONTAINER(Box1), Ok);
void OnAbout_Ok(GtkButton *button, gpointer user_data) { GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT);
gtk_widget_destroy(About); gtk_widget_show(Ok);
gtk_main_quit();
} gtk_widget_show(MsgDlg);
void CFGabout() { gtk_main();
About = create_About(); }
gtk_widget_show_all(About);
gtk_main(); void OnAbout_Ok(GtkButton *button, gpointer user_data)
} {
gtk_widget_destroy(About);
GtkWidget *Conf; gtk_main_quit();
}
void OnConf_Ok(GtkButton *button, gpointer user_data) {
SaveConfig(); void CFGabout()
{
gtk_widget_destroy(Conf); About = create_About();
gtk_main_quit(); gtk_widget_show_all(About);
} gtk_main();
}
void OnConf_Cancel(GtkButton *button, gpointer user_data) {
gtk_widget_destroy(Conf); void OnConf_Ok(GtkButton *button, gpointer user_data) {
gtk_main_quit(); SaveConfig();
}
gtk_widget_destroy(Conf);
void CFGconfigure() { gtk_main_quit();
Conf = create_Config(); }
LoadConfig(); void OnConf_Cancel(GtkButton *button, gpointer user_data)
{
gtk_widget_show_all(Conf); gtk_widget_destroy(Conf);
gtk_main(); gtk_main_quit();
} }
long CFGmessage(char *msg) { void CFGconfigure()
cfgSysMessage(msg); {
Conf = create_Config();
return 0;
} LoadConfig();
int main(int argc, char *argv[]) { gtk_widget_show_all(Conf);
gtk_init(NULL, NULL); gtk_main();
}
if (!strcmp(argv[1], "configure")) {
CFGconfigure(); long CFGmessage(char *msg) {
} else if (!strcmp(argv[1], "about")) { cfgSysMessage(msg);
CFGabout();
} else if (!strcmp(argv[1], "message")) { return 0;
CFGmessage(argv[2]); }
}
/*int main(int argc, char *argv[]) {
return 0; gtk_init(NULL, NULL);
}
if (!strcmp(argv[1], "configure")) {
CFGconfigure();
} else if (!strcmp(argv[1], "about")) {
CFGabout();
} else if (!strcmp(argv[1], "message")) {
CFGmessage(argv[2]);
}
return 0;
}*/
void LoadConfig()
{
FILE *f;
char cfg[255];
strcpy(cfg, s_strIniPath.c_str());
f = fopen(cfg, "r");
if (f == NULL)
{
printf("failed to open %s\n", s_strIniPath.c_str());
SaveConfig();//save and return
return;
}
//fscanf(f, "options = %hhx\n", &confOptions);
fclose(f);
}
void SaveConfig()
{
FILE *f;
char cfg[255];
strcpy(cfg, s_strIniPath.c_str());
f = fopen(cfg,"w");
if (f == NULL)
{
printf("failed to open %s\n", s_strIniPath.c_str());
return;
}
//fprintf(f, "options = %hhx\n", confOptions);
fclose(f);
}

View File

@ -1,5 +1,5 @@
/* USBlinuz /* FWnull
* Copyright (C) 2002-2004 USBlinuz Team * Copyright (C) 2004-2009 PCSX2 Team
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -18,3 +18,8 @@
void SaveConf(); void SaveConf();
void LoadConf(); void LoadConf();
extern long CFGmessage(char *msg);
extern void CFGconfigure();
extern void cfgSysMessage(char *fmt, ...);
extern void CFGabout();

View File

@ -1,5 +1,5 @@
/* FireWire /* FWnull
* Copyright (C) 2002-2004 FireWire Team * Copyright (C) 2004-2009 PCSX2 Team
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -26,10 +26,11 @@
#include <unistd.h> #include <unistd.h>
#include "FW.h" #include "FW.h"
#include "Config.h"
int ExecCfg(char *arg) int ExecCfg(char *arg)
{ {
char cfg[256]; /*char cfg[256];
struct stat buf; struct stat buf;
strcpy(cfg, "./cfgFWnull"); strcpy(cfg, "./cfgFWnull");
@ -61,7 +62,7 @@ int ExecCfg(char *arg)
} }
printf("cfgFWnull file not found!\n"); printf("cfgFWnull file not found!\n");
return -1; return -1;*/
} }
void SysMessage(char *fmt, ...) void SysMessage(char *fmt, ...)
@ -74,25 +75,28 @@ void SysMessage(char *fmt, ...)
vsprintf(msg, fmt, list); vsprintf(msg, fmt, list);
va_end(list); va_end(list);
sprintf(cmd, "message \"%s\"", msg); //sprintf(cmd, "message \"%s\"", msg);
ExecCfg(cmd); cfgSysMessage(msg);
//ExecCfg(cmd);
} }
void FWconfigure() void FWconfigure()
{ {
char *file; //char *file;
getcwd(file, ArraySize(file)); //getcwd(file, ArraySize(file));
chdir("plugins"); //chdir("plugins");
ExecCfg("configure"); //ExecCfg("configure");
chdir(file); //chdir(file);
CFGconfigure();
} }
void FWabout() void FWabout()
{ {
char *file; //char *file;
getcwd(file, ArraySize(file)); //getcwd(file, ArraySize(file));
chdir("plugins"); //chdir("plugins");
ExecCfg("about"); //ExecCfg("about");
chdir(file); //chdir(file);
CFGabout();
} }

View File

@ -1,5 +1,5 @@
/* FireWire /* FWnull
* Copyright (C) 2002-2004 USBlinuz Team * Copyright (C) 2004-2009 PCSX2 Team
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -14,38 +14,4 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include "FW.h"
void LoadConfig() {
FILE *f;
char cfg[256];
sprintf(cfg, "%s/.PS2E/FWnull.cfg", getenv("HOME"));
f = fopen(cfg, "r");
if (f == NULL) {
return;
}
fclose(f);
}
void SaveConfig() {
FILE *f;
char cfg[256];
sprintf(cfg, "%s/.PS2E", getenv("HOME"));
mkdir(cfg, 0755);
sprintf(cfg, "%s/.PS2E/FWnull.cfg", getenv("HOME"));
f = fopen(cfg, "w");
if (f == NULL)
return;
fclose(f);
}

View File

@ -1,34 +0,0 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
void
OnConf_Ok (GtkButton *button,
gpointer user_data)
{
}
void
OnConf_Cancel (GtkButton *button,
gpointer user_data)
{
}
void
OnAbout_Ok (GtkButton *button,
gpointer user_data)
{
}

View File

@ -1,300 +1,443 @@
<?xml version="1.0"?> <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<GTK-Interface> <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<project> <glade-interface>
<name>FireWire</name>
<program_name>dev9linuz</program_name> <widget class="GtkWindow" id="Config">
<directory></directory> <property name="border_width">5</property>
<source_directory></source_directory> <property name="visible">True</property>
<pixmaps_directory>pixmaps</pixmaps_directory> <property name="title" translatable="yes">DEV9config</property>
<language>C</language> <property name="type">GTK_WINDOW_TOPLEVEL</property>
<gnome_support>False</gnome_support> <property name="window_position">GTK_WIN_POS_NONE</property>
<gettext_support>False</gettext_support> <property name="modal">False</property>
<output_main_file>False</output_main_file> <property name="resizable">True</property>
<output_build_files>False</output_build_files> <property name="destroy_with_parent">False</property>
<backup_source_files>False</backup_source_files> <property name="decorated">True</property>
</project> <property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<widget> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<class>GtkWindow</class> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<name>Config</name> <property name="focus_on_map">True</property>
<border_width>5</border_width> <property name="urgency_hint">False</property>
<title>DEV9config</title>
<type>GTK_WINDOW_TOPLEVEL</type> <child>
<position>GTK_WIN_POS_CENTER</position> <widget class="GtkVBox" id="vbox1">
<modal>False</modal> <property name="border_width">5</property>
<allow_shrink>False</allow_shrink> <property name="visible">True</property>
<allow_grow>True</allow_grow> <property name="homogeneous">False</property>
<auto_shrink>False</auto_shrink> <property name="spacing">5</property>
<widget> <child>
<class>GtkVBox</class> <widget class="GtkFrame" id="frame2">
<name>vbox1</name> <property name="visible">True</property>
<border_width>5</border_width> <property name="label_xalign">0</property>
<homogeneous>False</homogeneous> <property name="label_yalign">0.5</property>
<spacing>5</spacing> <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<widget> <child>
<class>GtkFrame</class> <widget class="GtkHBox" id="hbox1">
<name>frame2</name> <property name="border_width">5</property>
<label>Ethernet</label> <property name="visible">True</property>
<label_xalign>0</label_xalign> <property name="homogeneous">True</property>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> <property name="spacing">5</property>
<child>
<padding>0</padding> <child>
<expand>True</expand> <widget class="GtkLabel" id="label4">
<fill>True</fill> <property name="visible">True</property>
</child> <property name="label" translatable="yes">Device:</property>
<property name="use_underline">False</property>
<widget> <property name="use_markup">False</property>
<class>GtkHBox</class> <property name="justify">GTK_JUSTIFY_CENTER</property>
<name>hbox1</name> <property name="wrap">False</property>
<border_width>5</border_width> <property name="selectable">False</property>
<homogeneous>True</homogeneous> <property name="xalign">0.5</property>
<spacing>5</spacing> <property name="yalign">0.5</property>
<property name="xpad">0</property>
<widget> <property name="ypad">0</property>
<class>GtkLabel</class> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<name>label4</name> <property name="width_chars">-1</property>
<label>Device:</label> <property name="single_line_mode">False</property>
<justify>GTK_JUSTIFY_CENTER</justify> <property name="angle">0</property>
<wrap>False</wrap> </widget>
<xalign>0.5</xalign> <packing>
<yalign>0.5</yalign> <property name="padding">0</property>
<xpad>0</xpad> <property name="expand">False</property>
<ypad>0</ypad> <property name="fill">False</property>
<child> </packing>
<padding>0</padding> </child>
<expand>False</expand>
<fill>False</fill> <child>
</child> <widget class="GtkCombo" id="GtkCombo_Eth">
</widget> <property name="visible">True</property>
<property name="value_in_list">False</property>
<widget> <property name="allow_empty">True</property>
<class>GtkCombo</class> <property name="case_sensitive">False</property>
<name>GtkCombo_Eth</name> <property name="enable_arrow_keys">True</property>
<width>130</width> <property name="enable_arrows_always">False</property>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty> <child internal-child="entry">
<case_sensitive>False</case_sensitive> <widget class="GtkEntry" id="combo-entry1">
<use_arrows>True</use_arrows> <property name="visible">True</property>
<use_arrows_always>False</use_arrows_always> <property name="can_focus">True</property>
<items></items> <property name="editable">True</property>
<child> <property name="visibility">True</property>
<padding>0</padding> <property name="max_length">0</property>
<expand>False</expand> <property name="text" translatable="yes"></property>
<fill>False</fill> <property name="has_frame">True</property>
</child> <property name="invisible_char">*</property>
<property name="activates_default">False</property>
<widget> </widget>
<class>GtkEntry</class> </child>
<child_name>GtkCombo:entry</child_name>
<name>combo-entry1</name> <child internal-child="list">
<can_focus>True</can_focus> <widget class="GtkList" id="convertwidget1">
<editable>True</editable> <property name="visible">True</property>
<text_visible>True</text_visible> <property name="selection_mode">GTK_SELECTION_BROWSE</property>
<text_max_length>0</text_max_length>
<text></text> <child>
</widget> <widget class="GtkListItem" id="convertwidget2">
</widget> <property name="visible">True</property>
</widget>
</widget> <child>
<widget class="GtkLabel" id="convertwidget3">
<widget> <property name="visible">True</property>
<class>GtkFrame</class> <property name="label" translatable="yes"></property>
<name>frame3</name> <property name="use_underline">False</property>
<label>Hdd</label> <property name="use_markup">False</property>
<label_xalign>0</label_xalign> <property name="justify">GTK_JUSTIFY_LEFT</property>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> <property name="wrap">False</property>
<child> <property name="selectable">False</property>
<padding>0</padding> <property name="xalign">0</property>
<expand>True</expand> <property name="yalign">0.5</property>
<fill>True</fill> <property name="xpad">0</property>
</child> <property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<widget> <property name="width_chars">-1</property>
<class>GtkHBox</class> <property name="single_line_mode">False</property>
<name>hbox2</name> <property name="angle">0</property>
<border_width>5</border_width> </widget>
<homogeneous>True</homogeneous> </child>
<spacing>5</spacing> </widget>
</child>
<widget> </widget>
<class>GtkLabel</class> </child>
<name>label5</name> </widget>
<label>Device:</label> <packing>
<justify>GTK_JUSTIFY_CENTER</justify> <property name="padding">0</property>
<wrap>False</wrap> <property name="expand">False</property>
<xalign>0.5</xalign> <property name="fill">False</property>
<yalign>0.5</yalign> </packing>
<xpad>0</xpad> </child>
<ypad>0</ypad> </widget>
<child> </child>
<padding>0</padding>
<expand>False</expand> <child>
<fill>False</fill> <widget class="GtkLabel" id="label1">
</child> <property name="visible">True</property>
</widget> <property name="label" translatable="yes">Ethernet</property>
<property name="use_underline">False</property>
<widget> <property name="use_markup">False</property>
<class>GtkCombo</class> <property name="justify">GTK_JUSTIFY_LEFT</property>
<name>GtkCombo_Hdd</name> <property name="wrap">False</property>
<width>130</width> <property name="selectable">False</property>
<value_in_list>False</value_in_list> <property name="xalign">0.5</property>
<ok_if_empty>True</ok_if_empty> <property name="yalign">0.5</property>
<case_sensitive>False</case_sensitive> <property name="xpad">0</property>
<use_arrows>True</use_arrows> <property name="ypad">0</property>
<use_arrows_always>False</use_arrows_always> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<items></items> <property name="width_chars">-1</property>
<child> <property name="single_line_mode">False</property>
<padding>0</padding> <property name="angle">0</property>
<expand>False</expand> </widget>
<fill>False</fill> <packing>
</child> <property name="type">label_item</property>
</packing>
<widget> </child>
<class>GtkEntry</class> </widget>
<child_name>GtkCombo:entry</child_name> <packing>
<name>entry1</name> <property name="padding">0</property>
<can_focus>True</can_focus> <property name="expand">True</property>
<editable>True</editable> <property name="fill">True</property>
<text_visible>True</text_visible> </packing>
<text_max_length>0</text_max_length> </child>
<text></text>
</widget> <child>
</widget> <widget class="GtkFrame" id="frame3">
</widget> <property name="visible">True</property>
</widget> <property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
<widget> <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<class>GtkHButtonBox</class>
<name>hbuttonbox1</name> <child>
<layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style> <widget class="GtkHBox" id="hbox2">
<spacing>30</spacing> <property name="border_width">5</property>
<child_min_width>85</child_min_width> <property name="visible">True</property>
<child_min_height>27</child_min_height> <property name="homogeneous">True</property>
<child_ipad_x>7</child_ipad_x> <property name="spacing">5</property>
<child_ipad_y>0</child_ipad_y>
<child> <child>
<padding>0</padding> <widget class="GtkLabel" id="label5">
<expand>True</expand> <property name="visible">True</property>
<fill>True</fill> <property name="label" translatable="yes">Device:</property>
</child> <property name="use_underline">False</property>
<property name="use_markup">False</property>
<widget> <property name="justify">GTK_JUSTIFY_CENTER</property>
<class>GtkButton</class> <property name="wrap">False</property>
<name>button1</name> <property name="selectable">False</property>
<can_default>True</can_default> <property name="xalign">0.5</property>
<can_focus>True</can_focus> <property name="yalign">0.5</property>
<signal> <property name="xpad">0</property>
<name>clicked</name> <property name="ypad">0</property>
<handler>OnConf_Ok</handler> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<last_modification_time>Sat, 06 Apr 2002 17:07:56 GMT</last_modification_time> <property name="width_chars">-1</property>
</signal> <property name="single_line_mode">False</property>
<label>Ok</label> <property name="angle">0</property>
<relief>GTK_RELIEF_NORMAL</relief> </widget>
</widget> <packing>
<property name="padding">0</property>
<widget> <property name="expand">False</property>
<class>GtkButton</class> <property name="fill">False</property>
<name>button2</name> </packing>
<can_default>True</can_default> </child>
<can_focus>True</can_focus>
<signal> <child>
<name>clicked</name> <widget class="GtkCombo" id="GtkCombo_Hdd">
<handler>OnConf_Cancel</handler> <property name="visible">True</property>
<last_modification_time>Sat, 06 Apr 2002 17:08:08 GMT</last_modification_time> <property name="value_in_list">False</property>
</signal> <property name="allow_empty">True</property>
<label>Cancel</label> <property name="case_sensitive">False</property>
<relief>GTK_RELIEF_NORMAL</relief> <property name="enable_arrow_keys">True</property>
</widget> <property name="enable_arrows_always">False</property>
</widget>
</widget> <child internal-child="entry">
</widget> <widget class="GtkEntry" id="entry1">
<property name="visible">True</property>
<widget> <property name="can_focus">True</property>
<class>GtkWindow</class> <property name="editable">True</property>
<name>About</name> <property name="visibility">True</property>
<border_width>5</border_width> <property name="max_length">0</property>
<title>DEV9about</title> <property name="text" translatable="yes"></property>
<type>GTK_WINDOW_TOPLEVEL</type> <property name="has_frame">True</property>
<position>GTK_WIN_POS_CENTER</position> <property name="invisible_char">*</property>
<modal>False</modal> <property name="activates_default">False</property>
<allow_shrink>False</allow_shrink> </widget>
<allow_grow>True</allow_grow> </child>
<auto_shrink>False</auto_shrink>
<child internal-child="list">
<widget> <widget class="GtkList" id="convertwidget4">
<class>GtkVBox</class> <property name="visible">True</property>
<name>vbox2</name> <property name="selection_mode">GTK_SELECTION_BROWSE</property>
<border_width>5</border_width>
<homogeneous>False</homogeneous> <child>
<spacing>5</spacing> <widget class="GtkListItem" id="convertwidget5">
<property name="visible">True</property>
<widget>
<class>GtkLabel</class> <child>
<name>label2</name> <widget class="GtkLabel" id="convertwidget6">
<label>FireWire Driver</label> <property name="visible">True</property>
<justify>GTK_JUSTIFY_CENTER</justify> <property name="label" translatable="yes"></property>
<wrap>False</wrap> <property name="use_underline">False</property>
<xalign>0.5</xalign> <property name="use_markup">False</property>
<yalign>0.5</yalign> <property name="justify">GTK_JUSTIFY_LEFT</property>
<xpad>0</xpad> <property name="wrap">False</property>
<ypad>0</ypad> <property name="selectable">False</property>
<child> <property name="xalign">0</property>
<padding>0</padding> <property name="yalign">0.5</property>
<expand>False</expand> <property name="xpad">0</property>
<fill>False</fill> <property name="ypad">0</property>
</child> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
</widget> <property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<widget> <property name="angle">0</property>
<class>GtkLabel</class> </widget>
<name>label3</name> </child>
<label>Author: linuzappz &lt;linuzappz@hotmail.com&gt;</label> </widget>
<justify>GTK_JUSTIFY_LEFT</justify> </child>
<wrap>False</wrap> </widget>
<xalign>0.5</xalign> </child>
<yalign>0.5</yalign> </widget>
<xpad>0</xpad> <packing>
<ypad>0</ypad> <property name="padding">0</property>
<child> <property name="expand">False</property>
<padding>0</padding> <property name="fill">False</property>
<expand>False</expand> </packing>
<fill>False</fill> </child>
</child> </widget>
</widget> </child>
<widget> <child>
<class>GtkHButtonBox</class> <widget class="GtkLabel" id="label15">
<name>hbuttonbox2</name> <property name="visible">True</property>
<layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style> <property name="label" translatable="yes">Hdd</property>
<spacing>30</spacing> <property name="use_underline">False</property>
<child_min_width>85</child_min_width> <property name="use_markup">False</property>
<child_min_height>27</child_min_height> <property name="justify">GTK_JUSTIFY_LEFT</property>
<child_ipad_x>7</child_ipad_x> <property name="wrap">False</property>
<child_ipad_y>0</child_ipad_y> <property name="selectable">False</property>
<child> <property name="xalign">0.5</property>
<padding>0</padding> <property name="yalign">0.5</property>
<expand>True</expand> <property name="xpad">0</property>
<fill>True</fill> <property name="ypad">0</property>
</child> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<widget> <property name="single_line_mode">False</property>
<class>GtkButton</class> <property name="angle">0</property>
<name>button3</name> </widget>
<can_default>True</can_default> <packing>
<can_focus>True</can_focus> <property name="type">label_item</property>
<signal> </packing>
<name>clicked</name> </child>
<handler>OnAbout_Ok</handler> </widget>
<last_modification_time>Sun, 07 Apr 2002 03:43:49 GMT</last_modification_time> <packing>
</signal> <property name="padding">0</property>
<label>Ok</label> <property name="expand">True</property>
<relief>GTK_RELIEF_NORMAL</relief> <property name="fill">True</property>
</widget> </packing>
</widget> </child>
</widget>
</widget> <child>
<widget class="GtkHButtonBox" id="hbuttonbox1">
</GTK-Interface> <property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
<property name="spacing">30</property>
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Ok</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="OnConf_Ok"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button2">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Cancel</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="OnConf_Cancel"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
<widget class="GtkWindow" id="About">
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="title" translatable="yes">DEV9about</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<child>
<widget class="GtkVBox" id="vbox2">
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">5</property>
<child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="label" translatable="yes">FireWire Driver</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="label" translatable="yes">Author: linuzappz &lt;linuzappz@hotmail.com&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
<property name="spacing">30</property>
<child>
<widget class="GtkButton" id="button3">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Ok</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="OnAbout_Ok"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -1,219 +0,0 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
GtkWidget*
create_Config (void)
{
GtkWidget *Config;
GtkWidget *vbox1;
GtkWidget *frame2;
GtkWidget *hbox1;
GtkWidget *label4;
GtkWidget *GtkCombo_Eth;
GtkWidget *combo_entry1;
GtkWidget *frame3;
GtkWidget *hbox2;
GtkWidget *label5;
GtkWidget *GtkCombo_Hdd;
GtkWidget *entry1;
GtkWidget *hbuttonbox1;
GtkWidget *button1;
GtkWidget *button2;
Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_object_set_data (GTK_OBJECT (Config), "Config", Config);
gtk_container_set_border_width (GTK_CONTAINER (Config), 5);
gtk_window_set_title (GTK_WINDOW (Config), "DEV9config");
gtk_window_set_position (GTK_WINDOW (Config), GTK_WIN_POS_CENTER);
vbox1 = gtk_vbox_new (FALSE, 5);
gtk_widget_ref (vbox1);
gtk_object_set_data_full (GTK_OBJECT (Config), "vbox1", vbox1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (Config), vbox1);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);
frame2 = gtk_frame_new ("Ethernet");
gtk_widget_ref (frame2);
gtk_object_set_data_full (GTK_OBJECT (Config), "frame2", frame2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame2);
gtk_box_pack_start (GTK_BOX (vbox1), frame2, TRUE, TRUE, 0);
hbox1 = gtk_hbox_new (TRUE, 5);
gtk_widget_ref (hbox1);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbox1", hbox1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox1);
gtk_container_add (GTK_CONTAINER (frame2), hbox1);
gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5);
label4 = gtk_label_new ("Device:");
gtk_widget_ref (label4);
gtk_object_set_data_full (GTK_OBJECT (Config), "label4", label4,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label4);
gtk_box_pack_start (GTK_BOX (hbox1), label4, FALSE, FALSE, 0);
GtkCombo_Eth = gtk_combo_new ();
gtk_widget_ref (GtkCombo_Eth);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkCombo_Eth", GtkCombo_Eth,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkCombo_Eth);
gtk_box_pack_start (GTK_BOX (hbox1), GtkCombo_Eth, FALSE, FALSE, 0);
gtk_widget_set_usize (GtkCombo_Eth, 130, -2);
combo_entry1 = GTK_COMBO (GtkCombo_Eth)->entry;
gtk_widget_ref (combo_entry1);
gtk_object_set_data_full (GTK_OBJECT (Config), "combo_entry1", combo_entry1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (combo_entry1);
frame3 = gtk_frame_new ("Hdd");
gtk_widget_ref (frame3);
gtk_object_set_data_full (GTK_OBJECT (Config), "frame3", frame3,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame3);
gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0);
hbox2 = gtk_hbox_new (TRUE, 5);
gtk_widget_ref (hbox2);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbox2", hbox2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox2);
gtk_container_add (GTK_CONTAINER (frame3), hbox2);
gtk_container_set_border_width (GTK_CONTAINER (hbox2), 5);
label5 = gtk_label_new ("Device:");
gtk_widget_ref (label5);
gtk_object_set_data_full (GTK_OBJECT (Config), "label5", label5,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label5);
gtk_box_pack_start (GTK_BOX (hbox2), label5, FALSE, FALSE, 0);
GtkCombo_Hdd = gtk_combo_new ();
gtk_widget_ref (GtkCombo_Hdd);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkCombo_Hdd", GtkCombo_Hdd,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkCombo_Hdd);
gtk_box_pack_start (GTK_BOX (hbox2), GtkCombo_Hdd, FALSE, FALSE, 0);
gtk_widget_set_usize (GtkCombo_Hdd, 130, -2);
entry1 = GTK_COMBO (GtkCombo_Hdd)->entry;
gtk_widget_ref (entry1);
gtk_object_set_data_full (GTK_OBJECT (Config), "entry1", entry1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (entry1);
hbuttonbox1 = gtk_hbutton_box_new ();
gtk_widget_ref (hbuttonbox1);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbuttonbox1", hbuttonbox1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbuttonbox1);
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0);
button1 = gtk_button_new_with_label ("Ok");
gtk_widget_ref (button1);
gtk_object_set_data_full (GTK_OBJECT (Config), "button1", button1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button1);
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1);
GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
button2 = gtk_button_new_with_label ("Cancel");
gtk_widget_ref (button2);
gtk_object_set_data_full (GTK_OBJECT (Config), "button2", button2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button2);
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button2);
GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button1), "clicked",
GTK_SIGNAL_FUNC (OnConf_Ok),
NULL);
gtk_signal_connect (GTK_OBJECT (button2), "clicked",
GTK_SIGNAL_FUNC (OnConf_Cancel),
NULL);
return Config;
}
GtkWidget*
create_About (void)
{
GtkWidget *About;
GtkWidget *vbox2;
GtkWidget *label2;
GtkWidget *label3;
GtkWidget *hbuttonbox2;
GtkWidget *button3;
About = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_object_set_data (GTK_OBJECT (About), "About", About);
gtk_container_set_border_width (GTK_CONTAINER (About), 5);
gtk_window_set_title (GTK_WINDOW (About), "DEV9about");
gtk_window_set_position (GTK_WINDOW (About), GTK_WIN_POS_CENTER);
vbox2 = gtk_vbox_new (FALSE, 5);
gtk_widget_ref (vbox2);
gtk_object_set_data_full (GTK_OBJECT (About), "vbox2", vbox2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox2);
gtk_container_add (GTK_CONTAINER (About), vbox2);
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5);
label2 = gtk_label_new ("DEV9linuz Driver");
gtk_widget_ref (label2);
gtk_object_set_data_full (GTK_OBJECT (About), "label2", label2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label2);
gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
label3 = gtk_label_new ("Author: linuzappz <linuzappz@hotmail.com>");
gtk_widget_ref (label3);
gtk_object_set_data_full (GTK_OBJECT (About), "label3", label3,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label3);
gtk_box_pack_start (GTK_BOX (vbox2), label3, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_LEFT);
hbuttonbox2 = gtk_hbutton_box_new ();
gtk_widget_ref (hbuttonbox2);
gtk_object_set_data_full (GTK_OBJECT (About), "hbuttonbox2", hbuttonbox2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbuttonbox2);
gtk_box_pack_start (GTK_BOX (vbox2), hbuttonbox2, TRUE, TRUE, 0);
button3 = gtk_button_new_with_label ("Ok");
gtk_widget_ref (button3);
gtk_object_set_data_full (GTK_OBJECT (About), "button3", button3,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button3);
gtk_container_add (GTK_CONTAINER (hbuttonbox2), button3);
GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button3), "clicked",
GTK_SIGNAL_FUNC (OnAbout_Ok),
NULL);
return About;
}

View File

@ -1,162 +0,0 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <gtk/gtk.h>
#include "support.h"
/* This is an internally used function to check if a pixmap file exists. */
static gchar* check_file_exists (const gchar *directory,
const gchar *filename);
/* This is an internally used function to create pixmaps. */
static GtkWidget* create_dummy_pixmap (GtkWidget *widget);
GtkWidget*
lookup_widget (GtkWidget *widget,
const gchar *widget_name)
{
GtkWidget *parent, *found_widget;
for (;;)
{
if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
else
parent = widget->parent;
if (parent == NULL)
break;
widget = parent;
}
found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget),
widget_name);
if (!found_widget)
g_warning ("Widget not found: %s", widget_name);
return found_widget;
}
/* This is a dummy pixmap we use when a pixmap can't be found. */
static char *dummy_pixmap_xpm[] = {
/* columns rows colors chars-per-pixel */
"1 1 1 1",
" c None",
/* pixels */
" "
};
/* This is an internally used function to create pixmaps. */
static GtkWidget*
create_dummy_pixmap (GtkWidget *widget)
{
GdkColormap *colormap;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
GtkWidget *pixmap;
colormap = gtk_widget_get_colormap (widget);
gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask,
NULL, dummy_pixmap_xpm);
if (gdkpixmap == NULL)
g_error ("Couldn't create replacement pixmap.");
pixmap = gtk_pixmap_new (gdkpixmap, mask);
gdk_pixmap_unref (gdkpixmap);
gdk_bitmap_unref (mask);
return pixmap;
}
static GList *pixmaps_directories = NULL;
/* Use this function to set the directory containing installed pixmaps. */
void
add_pixmap_directory (const gchar *directory)
{
pixmaps_directories = g_list_prepend (pixmaps_directories,
g_strdup (directory));
}
/* This is an internally used function to create pixmaps. */
GtkWidget*
create_pixmap (GtkWidget *widget,
const gchar *filename)
{
gchar *found_filename = NULL;
GdkColormap *colormap;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
GtkWidget *pixmap;
GList *elem;
if (!filename || !filename[0])
return create_dummy_pixmap (widget);
/* We first try any pixmaps directories set by the application. */
elem = pixmaps_directories;
while (elem)
{
found_filename = check_file_exists ((gchar*)elem->data, filename);
if (found_filename)
break;
elem = elem->next;
}
/* If we haven't found the pixmap, try the source directory. */
if (!found_filename)
{
found_filename = check_file_exists ("pixmaps", filename);
}
if (!found_filename)
{
g_warning ("Couldn't find pixmap file: %s", filename);
return create_dummy_pixmap (widget);
}
colormap = gtk_widget_get_colormap (widget);
gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask,
NULL, found_filename);
if (gdkpixmap == NULL)
{
g_warning ("Error loading pixmap file: %s", found_filename);
g_free (found_filename);
return create_dummy_pixmap (widget);
}
g_free (found_filename);
pixmap = gtk_pixmap_new (gdkpixmap, mask);
gdk_pixmap_unref (gdkpixmap);
gdk_bitmap_unref (mask);
return pixmap;
}
/* This is an internally used function to check if a pixmap file exists. */
static gchar*
check_file_exists (const gchar *directory,
const gchar *filename)
{
gchar *full_filename;
struct stat s;
gint status;
full_filename = (gchar*) g_malloc (strlen (directory) + 1
+ strlen (filename) + 1);
strcpy (full_filename, directory);
strcat (full_filename, G_DIR_SEPARATOR_S);
strcat (full_filename, filename);
status = stat (full_filename, &s);
if (status == 0 && S_ISREG (s.st_mode))
return full_filename;
g_free (full_filename);
return NULL;
}

View File

@ -8,6 +8,31 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
/*
* Standard gettext macros.
*/
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# define Q_(String) g_strip_context ((String), gettext (String))
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String)
# define Q_(String) g_strip_context ((String), (String))
# define N_(String) (String)
#endif
/* /*
* Public Functions. * Public Functions.
*/ */
@ -21,8 +46,6 @@
GtkWidget* lookup_widget (GtkWidget *widget, GtkWidget* lookup_widget (GtkWidget *widget,
const gchar *widget_name); const gchar *widget_name);
/* get_widget() is deprecated. Use lookup_widget instead. */
#define get_widget lookup_widget
/* Use this function to set the directory containing installed pixmaps. */ /* Use this function to set the directory containing installed pixmaps. */
void add_pixmap_directory (const gchar *directory); void add_pixmap_directory (const gchar *directory);
@ -32,7 +55,15 @@ void add_pixmap_directory (const gchar *directory);
* Private Functions. * Private Functions.
*/ */
/* This is used to create the pixmaps in the interface. */ /* This is used to create the pixmaps used in the interface. */
GtkWidget* create_pixmap (GtkWidget *widget, GtkWidget* create_pixmap (GtkWidget *widget,
const gchar *filename); const gchar *filename);
/* This is used to create the pixbufs used in the interface. */
GdkPixbuf* create_pixbuf (const gchar *filename);
/* This is used to set ATK action descriptions. */
void glade_set_atk_action_description (AtkAction *action,
const gchar *action_name,
const gchar *description);

View File

@ -0,0 +1,33 @@
# Create a shared library libFWnull
AUTOMAKE_OPTIONS = foreign
noinst_LIBRARIES = libFWnull.a
INCLUDES = -I@srcdir@/../../common/include -I@srcdir@/../../3rdparty -I@srcdir@/Linux
libFWnull_a_CXXFLAGS = $(shell pkg-config --cflags gtk+-2.0)
libFWnull_a_CFLAGS = $(shell pkg-config --cflags gtk+-2.0)
# Create a shared object by faking an exe (thanks to ODE makefiles)
traplibdir=$(prefix)
if DEBUGBUILD
preext=d
endif
EXEEXT=$(preext)@so_ext@
traplib_PROGRAMS=libFWnull
libFWnull_SOURCES=
libFWnull_DEPENDENCIES = libFWnull.a
libFWnull_LDFLAGS= @SHARED_LDFLAGS@
libFWnull_LDFLAGS+=-Wl,-soname,@libFWnull_SONAME@
libFWnull_LDADD=$(libFWnull_a_OBJECTS)
libFWnull_a_SOURCES = FW.cpp Linux/Config.cpp Linux/Linux.cpp \
FW.h Linux/Config.h Linux/Linux.h
libFWnull_a_SOURCES += \
Linux/interface.h Linux/support.c \
Linux/interface.c Linux/support.h \
Linux/callbacks.c Linux/callbacks.h
#SUBDIRS = Linux

View File

@ -161,7 +161,7 @@
> >
</File> </File>
<File <File
RelativePath="..\FW.c" RelativePath="..\FW.cpp"
> >
</File> </File>
<File <File

View File

@ -23,7 +23,7 @@ BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch(uMsg) { switch(uMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
LoadConfig(); LoadConfig();
if (conf.Log) CheckDlgButton(hW, IDC_LOGGING, TRUE); if (conf.Log) CheckDlgButton(hW, IDC_LOGGING, TRUE);
return TRUE; return TRUE;
case WM_COMMAND: case WM_COMMAND:

View File

@ -6,9 +6,30 @@ echo ---------------
curdir=`pwd` curdir=`pwd`
cd ${curdir}/Linux
if test "${FWnullOPTIONS+set}" != set ; then
export FWnullOPTIONS=""
fi
if [ $# -gt 0 ] && [ $1 = "all" ]
then
aclocal
automake -a
autoconf
./configure ${FWnullOPTIONS} --prefix=${PCSX2PLUGINS}
make clean make clean
make install
else
make $@ make $@
fi
if [ $? -ne 0 ]
then
exit 1
fi
if [ -s cfgFWnull ] && [ -s libFWnull.so ] if [ -s cfgFWnull ] && [ -s libFWnull.so ]
then then

View File

@ -0,0 +1,80 @@
AC_INIT(FWnull, 0.5,arcum42@gmail.com)
AM_INIT_AUTOMAKE(FWnull,0.5)
AC_PROG_CC([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
AC_PROG_CXX([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
AC_PROG_CPP([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
AC_PROG_INSTALL
AC_PROG_RANLIB
dnl necessary for compiling assembly
AM_PROG_AS
AC_SUBST(FWnull_CURRENT, 0)
AC_SUBST(FWnull_REVISION, 5)
AC_SUBST(FWnull_AGE, 0)
AC_SUBST(FWnull_RELEASE,[$FWnull_CURRENT].[$FWnull_REVISION].[$FWnull_AGE])
AC_SUBST(FWnull_SONAME,libFWnull.so.[$FWnull_CURRENT].[$FWnull_REVISION].[$FWnull_AGE])
CFLAGS=
CPPFLAGS=
CXXFLAGS=
dnl Check for debug build
AC_MSG_CHECKING(debug build)
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [debug build]),
debug=$enableval,debug=no)
if test "x$debug" == xyes
then
AC_DEFINE(_DEBUG,1,[_DEBUG])
CFLAGS+="-g -fPIC -Wall -Wno-unused-value "
CPPFLAGS+="-g -fPIC -Wall -Wno-unused-value "
CXXFLAGS+="-g -fPIC -Wall -Wno-unused-value "
else
AC_DEFINE(NDEBUG,1,[NDEBUG])
CFLAGS+="-O3 -fomit-frame-pointer -fPIC -Wall -Wno-unused-value "
CPPFLAGS+="-O3 -fomit-frame-pointer -fPIC -Wall -Wno-unused-value "
CXXFLAGS+="-O3 -fomit-frame-pointer -fPIC -Wall -Wno-unused-value "
fi
AM_CONDITIONAL(DEBUGBUILD, test x$debug = xyes)
AC_MSG_RESULT($debug)
AC_DEFINE(__LINUX__,1,[__LINUX__])
dnl Check for dev build
AC_MSG_CHECKING(for development build...)
AC_ARG_ENABLE(devbuild, AC_HELP_STRING([--enable-devbuild], [Special Build for developers that simplifies testing and adds extra checks]),
devbuild=$enableval,devbuild=no)
if test "x$devbuild" == xyes
then
AC_DEFINE(FWnull_DEVBUILD,1,[FWnull_DEVBUILD])
fi
AC_MSG_RESULT($devbuild)
AM_CONDITIONAL(RELEASE_TO_PUBLIC, test x$devbuild = xno)
AC_CHECK_FUNCS([ _aligned_malloc _aligned_free ], AC_DEFINE(HAVE_ALIGNED_MALLOC))
dnl gtk
AC_MSG_CHECKING(gtk2+)
AC_CHECK_PROG(GTK_CONFIG, pkg-config, pkg-config)
LIBS+=$(pkg-config --libs gtk+-2.0)
dnl bindir = pcsx2exe
dnl assuming linux environment
so_ext=".so.$FWnull_RELEASE"
SHARED_LDFLAGS="-shared"
AC_SUBST(so_ext)
AC_SUBST(SHARED_LDFLAGS)
AC_CHECK_LIB(stdc++,main,[LIBS="$LIBS -lstdc++"])
AC_OUTPUT([
Makefile
])
echo "Configuration:"
echo " Debug build? $debug"
echo " Dev build? $devbuild"

1
plugins/FWnull/install-sh Symbolic link
View File

@ -0,0 +1 @@
/usr/share/automake-1.10/install-sh

1
plugins/FWnull/missing Symbolic link
View File

@ -0,0 +1 @@
/usr/share/automake-1.10/missing